Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI: Minimal changes to rename location to project #2993

Merged
merged 13 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 56 additions & 51 deletions doc/grass_database.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

A GRASS GIS Database is simply a set of directories and files
with certain structure which GRASS GIS works efficiently with.
Location is a directory with data related to
Project is a directory with data related to
one geographic location or a project.
All data within one Location has the same cartographic projection.
A Location contains Mapsets and each Mapset contains data related to
All data within one project has the same coordinate reference system.
A project contains Mapsets and each Mapset contains data related to
wenzeslaus marked this conversation as resolved.
Show resolved Hide resolved
a specific task, user or a smaller project.
Within each Location, a mandatory PERMANENT Mapset exists
which can contain commonly used data within a Location such as base maps.
PERMANENT Mapset also contains metadata related to Location
such as projection.
When GRASS GIS is started it connects to a Database, Location and Mapset
Within each project, a mandatory PERMANENT Mapset exists
which can contain commonly used data within one GRASS project
such as base maps.
PERMANENT Mapset also contains metadata related to the project
such as the coordinate reference system.
When GRASS GIS is started it connects to a Database, Project and Mapset
specified by the user.

<p>
Expand All @@ -34,7 +35,7 @@
<h3>GRASS GIS Database</h3>

All data for GRASS GIS must be in GRASS GIS Database which is a directory
(visible on the disk) containing subdirectories which are GRASS Locations.
(visible on the disk) containing subdirectories which are GRASS Projects.
User can have one or more of Databases on the disk. Typically users have
one directory called <code>grassdata</code> in their home directory.
In multi-user environment users often have a <code>grassdata</code> directory
Expand All @@ -52,29 +53,32 @@ <h3>GRASS GIS Database</h3>
inside in a specific format and is accessible by specific tools.
GRASS GIS Databases is in GRASS GIS often called GISDBASE or DATABASE.

<h3>GRASS Locations</h3>
<h3>GRASS Projects</h3>

Location is a directory which contains GRASS Mapsets which are its subdirectories.
All data in one Location have the same projection (coordinate system, datum).
Each Location must contain Mapset called PERMANENT.
Typically, a Location contains all data related to one project
Project is a directory which contains GRASS Mapsets which are its subdirectories.
All data in one Project have the same coordinate reference system (projection, datum).
Each project must contain a Mapset called PERMANENT.
wenzeslaus marked this conversation as resolved.
Show resolved Hide resolved
Typically, a project contains all data related to one real-world project
or a geographic area (geographic location or region).
wenzeslaus marked this conversation as resolved.
Show resolved Hide resolved
Alternatively, Location can simply contain all data in a given projection.
Alternatively, a project can simply contain data in a given coordinate
reference system.

<p>
GRASS Locations can be safely copied or moved as any other directories.
Compressed Location is usually what GRASS users exchange between each other
GRASS projects can be safely copied or moved as any other directories.
Compressed projects are usually what GRASS users exchange between each other
when they want to share a lot of data.
For example, GRASS GIS sample data are provided as Locations.
For example, GRASS GIS sample data are provided as projects.

<p>
Note that projects are referred to as <em>locations</em> in some places, such as older documentation.
Location is an older name for GRASS projects
and has not been completely removed from the code and documentation yet
(contributions welcome).
wenzeslaus marked this conversation as resolved.
Show resolved Hide resolved

<p>
Don't be confused with location as a place (file or directory) in a file system.
The word location in GRASS Location refers to a location or area on Earth
(or whatever is applicable).
Users and programmers familiar with relational databases such as PostgreSQL
can view Location as an individual database inside the system or a storage area
which would be equivalent to GRASS GIS Database. Mapsets in a Locations
are like namespaces or schemas inside a database.
can view projects as individual databases inside a storage area (the GRASS GIS Database).
Mapsets in a project are like namespaces or schemas inside a database.

<!-- TODO: naming limitations and best practices -->

Expand Down Expand Up @@ -104,10 +108,10 @@ <h3>GRASS Mapsets</h3>
<p>
Mapsets are used to store maps related to one project, smaller project,
specific task, issue or subregions.
In multi-user environment, when a team works together on one project,
In a multi-user environment, where team members work together on a single project,
Mapsets support simultaneous access of several users to the maps
stored within the same Location.
Besides access to his or her own
stored within the same project.
Besides access to their own
Mapset, each user can also read maps in PERMANENT Mapsent
and in other users' Mapsets when set.
However, each user can modify or remove only the maps
Expand All @@ -121,19 +125,19 @@ <h3>GRASS Mapsets</h3>
and managed by <a href="g.region.html"><em>g.region</em></a>.

<p>
Mapsets can be copied and moved as directories, however only when it is clear
that the projections of both Locations
Mapsets can be copied and moved as directories only when it is clear
that their projections
wenzeslaus marked this conversation as resolved.
Show resolved Hide resolved
(as reported by <a href="g.proj.html"><em>g.proj</em></a>)
match each other. Since this is sometimes hard to to establish,
match. Since this is sometimes hard to to establish,
petrasovaa marked this conversation as resolved.
Show resolved Hide resolved
it is recommended to use <a href="r.proj.html"><em>r.proj</em></a>
or <a href="v.proj.html"><em>v.proj</em></a> to reproject the data.
The files and directories should not be moved or modified directly,
but only using GRASS GIS tools.

<h3>The role of the PERMANENT Mapset</h3>

When creating a new Location, GRASS GIS automatically creates a special
Mapset called PERMANENT where the core data for the Location are stored.
When creating a new project, GRASS GIS automatically creates a special
Mapset called PERMANENT where the core data for the project are stored.

<p>
Since the maps in PERMANENT Mapset are visible from all the other Mapsets,
Expand All @@ -146,14 +150,14 @@ <h3>The role of the PERMANENT Mapset</h3>
accessed, analyzed, and copied into their own Mapset by the other
users. The PERMANENT Mapset is useful for providing general spatial
data (e.g. an elevation model), accessible but write-protected to all
users who are working in the same Location as the database owner.
users who are working with the same GRASS project as the database owner.
To manipulate or add data to PERMANENT, the owner can start
GRASS GIS and choose the relevant Location and the PERMANENT Mapset.
GRASS GIS and choose the relevant project and the PERMANENT Mapset.

<p>
The PERMANENT Mapset also contains the <code>DEFAULT_WIND</code> file which holds
the default computational region's extent and resolution values
for the Location (which all Mapsets will inherit when they are created).
for the project (which all Mapsets will inherit when they are created).
Users have the option of switching back to the default region at any time.

<h3>Importing, exporting and linking data</h3>
Expand All @@ -168,7 +172,8 @@ <h3>Importing, exporting and linking data</h3>

<p>
For cases when import is not desirable, an option to link external data exists.
Projection of the linked data must match the Location's projection
Projection of the linked data must match the project's
wenzeslaus marked this conversation as resolved.
Show resolved Hide resolved
coordinate reference system
otherwise the external data cannot be linked. (Linking data in different
projection is not allowed as it would require on-the-fly reprojection
which could cause inconsistencies in the data.
Expand All @@ -184,15 +189,15 @@ <h3>Importing, exporting and linking data</h3>
<h3>Starting GRASS GIS</h3>

After launching GRASS GIS for the first time,
the GUI opens in a default Location <code>world_latlong_wgs84</code>.
From there a new Location and Mapset can be created.
the GUI opens in a default project <code>world_latlong_wgs84</code>.
From there a new project can be created.

<p>
<center>
<img src="grass_start.png" alt="GRASS GIS GUI after first start"><br>
</center>

GRASS GIS can be also started with a given Database, Location and Mapset
GRASS GIS can be also started with a given Database, Project and Mapset
wenzeslaus marked this conversation as resolved.
Show resolved Hide resolved
from the command line. For example, the following will start
in a given Mapset with only command line interface:

Expand All @@ -204,34 +209,34 @@ <h3>Starting GRASS GIS</h3>
grass --text D:\grassdata\nc_spm_08_grass7\user1
</pre></div>

And the following will create the given Location with projection given
by the EPSG code and it will start the default interface
And the following will create the given project with coordinate reference
system given by the EPSG code and it will start the default interface
(GUI or command line):

<div class="code"><pre>
# Linux, Mac, *BSD, ...:
grass -c EPSG:5514:3 ~/grassdata/mylocation
grass -c EPSG:5514:3 ~/grassdata/myproject

# Windows
grass -c EPSG:5514:3 D:\grassdata\mylocation
grass -c EPSG:5514:3 D:\grassdata\myproject
</pre></div>

See <a href="grass.html"><em>grass</em></a> command manual for more details.

<h3>Creating a New Location with the Location Wizard</h3>
<h3>Creating a New Project with the Project Wizard</h3>

The <a href="wxGUI.html">GUI</a> provides a
graphical <em>Location Wizard</em> which lets you easily create a
new Location for your own data. You will be guided through a series of
graphical <em>Project Wizard</em> which lets you easily create a
new project for your own data. You will be guided through a series of
dialogues to browse and select predefined projections or to
define custom projections.

<p>
The most convenient way of using <em>Location Wizard</em> is creating new
Location based on a georeferenced file, such as Shapefile or GeoTIFF,
The most convenient way of using <em>Project Wizard</em> is creating new
petrasovaa marked this conversation as resolved.
Show resolved Hide resolved
project based on a georeferenced file, such as Shapefile or GeoTIFF,
or by selecting the corresponding EPSG projection code.
In case of using georeferenced file, you are asked whether the data itself
should be imported into the new Location.
should be imported into the new project.
<!-- TODO: some of this should be or already is automatic
dialog with checkboxes would be also more convenient than multiple questions -->
The default region is then set to match imported map.
Expand All @@ -244,13 +249,13 @@ <h3>Creating a New Location with the Location Wizard</h3>
this was in the text pointing to some unknown text:
* The rules to define the resolution as described above also apply here.
* Find below also some rules to define the default raster resolution
for a new Location.
for a new project.
-->

<p>
If data were already imported, you can add them into the Layer Manager now
and display them.
More data can be imported into the Location, e.g. using import options in
More data can be imported into the project, e.g. using import options in
the <em>File</em> menu in <em>Layer Manager</em> or
<a href="r.import.html"><em>r.import</em></a>.

Expand Down
40 changes: 21 additions & 19 deletions doc/projectionintro.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
<!-- meta page description: Projections and spatial transformations in GRASS GIS-->
<h3>Projection management in general</h3>

A GRASS location is referenced with a single projection and coordinate system
(or unreferenced as XY location). When creating a new location from an existing
A GRASS project is referenced with a single projection and coordinate system
(or unreferenced as XY project). When creating a new project from an existing
raster or vector map using the tools available from the startup screen or
the map import commands, projection and coordinate system are defined.
To change the projection of maps, a new location has to be created and
the desired maps have to be reprojected into it from the source location
To change the projection of maps, a new project has to be created and
the desired maps have to be reprojected into it from the source project
as explained below.

<h3>Raster map projections</h3>
<h3>Reprojecting raster maps</h3>

Raster maps are backward projected in GRASS. This means that the
user has to run the raster projection command (<a href=r.proj.html>r.proj</a>)
in the target location and "pull" the map from the source location.
Both locations need to have a projection defined.
Rasters are reprojected using the raster projection tool
<em><a href=r.proj.html>r.proj</a></em>.
The tool is used in the target project to "pull" a map from its source project.
Both projects need to have a projection defined,
i.e., they cannot be XY (unprojected).

<h3>Raster map transformation</h3>

To transform an unprojected map from a XY location into a projected
location (or another XY location), a forward transformation is performed.
The unreferenced map is geocoded within the XY location by defining
To transform an unprojected map from a XY project into a projected
project (or another XY project), a forward transformation is performed.
The unreferenced map is geocoded within the XY project by defining
four corner points or by seeking several ground control points
(<a href="i.group.html">i.group</a>, <a href="i.target.html">i.target</a>,
<a href="g.gui.gcp.html">g.gui.gcp</a>) and then transformed into the
target location (<a href="i.rectify.html">i.rectify</a>). Polynomial
target project (<a href="i.rectify.html">i.rectify</a>). Polynomial
transformation of 1st, 2nd and 3rd order are supported.
<p>
A graphical user interface is provided by <a href="wxGUI.html">wxGUI</a>.
Expand All @@ -35,19 +36,20 @@ <h3>Raster map transformation</h3>

<h3>Vector map projections</h3>

Vector maps are backward projected in GRASS. This means that the
user has to run the vector projection command (<a href=v.proj.html>v.proj</a>)
in the target location and "pull" the map from the source location.
Both locations need to have a projection defined.
Vectors are reprojected using the vector projection tool
<em><a href=v.proj.html>v.proj</a></em>.
The tool is used in the target project to "pull" a map from its source project.
Both projects need to have a projection defined,
i.e., they cannot be XY (unprojected).

<h3>Vector map transformation</h3>

To transform an unprojected map (e.g. CAD map) into projected coordinates,
a forward transformation is performed. The unreferenced map is imported
into the location with projection and geocoded within this location by
into the project with projection and geocoded within this project by
defining four corner points or by seeking several ground control points.
These points are stored into an ASCII file and then transformed within
the same location (<a href="v.transform.html">v.transform</a>).
the same project (<a href="v.transform.html">v.transform</a>).

Alternatively, <a href="v.rectify.html">v.rectify</a> rectifies a vector
by computing a coordinate transformation for each object in the vector
Expand Down
6 changes: 4 additions & 2 deletions gui/wxpython/datacatalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,13 @@ def OnAddGrassDB(self, event):

# Offer to create a new location
if grassdb_node and not os.listdir(grassdatabase):
message = _("Do you want to create a location?")
message = _(
"Do you want to create a new project (also known as location)?"
)
dlg2 = wx.MessageDialog(
self,
message=message,
caption=_("Create location?"),
caption=_("Create project?"),
style=wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION,
)
if dlg2.ShowModal() == wx.ID_YES:
Expand Down
8 changes: 5 additions & 3 deletions gui/wxpython/datacatalog/g.gui.datacatalog.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ <h2>DESCRIPTION</h2>
Data Catalog allows you to:

<ul>
<li>browse GRASS locations and mapsets in the current GIS directory</li>
<li>browse GRASS projects and mapsets in the current GIS directory</li>
<li>browse GRASS 2D/3D raster and vector maps</li>
<li>rename, copy, move and delete GRASS maps including reprojection between different locations</li>
<li>rename, copy, move and delete GRASS maps including reprojection between different projects</li>
<li>drag and drop maps for copying and moving</li>
<li>searching and filtering maps using regular expressions</li>
<li>display map in current location</li>
<li>display map in current project</li>
<li>show metadata of maps</li>
</ul>

Note that projects are called <em>locations</em> at some places and in old documentation.
wenzeslaus marked this conversation as resolved.
Show resolved Hide resolved

<center>
<img src="datacatalog.png" border="0" alt="data catalog screenshot">
<br>
Expand Down
9 changes: 5 additions & 4 deletions gui/wxpython/datacatalog/toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from icons.icon import MetaIcon

icons = {
"reloadTree": MetaIcon(img="redraw", label=_("Reload GRASS locations")),
"reloadTree": MetaIcon(img="redraw", label=_("Reload GRASS projects")),
"reloadMapset": MetaIcon(img="reload", label=_("Reload current GRASS mapset only")),
"unlocked": MetaIcon(
img="edit", label=_("Restrict edits to the current mapset only")
Expand All @@ -32,14 +32,15 @@
img="grassdb-add", label=_("Add existing or create new database")
),
"addMapset": MetaIcon(
img="mapset-add", label=_("Create new mapset in current location")
img="mapset-add", label=_("Create new mapset in current project")
),
"addLocation": MetaIcon(
img="location-add", label=_("Create new location in current GRASS database")
img="location-add",
label=_("Create new project (location) in current GRASS database"),
),
"downloadLocation": MetaIcon(
img="location-download",
label=_("Download sample location to current GRASS database"),
label=_("Download sample project (location) to current GRASS database"),
),
"importRaster": MetaIcon(
img="raster-import", label=_("Import raster data [r.import]")
Expand Down
Loading
Loading