Skip to content

Commit

Permalink
Update usage of g.mapset to use project. Remove all caps MAPSET and L…
Browse files Browse the repository at this point in the history
…OCATION from g.mapset documentation.
  • Loading branch information
wenzeslaus committed Aug 17, 2023
1 parent 8b428fb commit befd037
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
7 changes: 4 additions & 3 deletions general/g.mapset/g.mapset.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<h2>DESCRIPTION</h2>

<em>g.mapset</em> changes the current working MAPSET, LOCATION, or GISDBASE.
<em>g.mapset</em> changes the current working mapset, project (formerly known
as location), or GISDBASE (directory with one or more projects).
This is a fairly radical maneuver to run mid-session, take care when running
the GUI at the same time.
<p>
Expand Down Expand Up @@ -42,7 +43,7 @@ <h3>Change the current mapset</h3>
To change the current mapset to "user1" use the following command:

<div class="code"><pre>
g.mapset mapset=user1 location=nc_spm_08_grass7
g.mapset mapset=user1 project=nc_spm_08_grass7
</pre></div>

You should receive the following message: "Mapset switched. Your shell
Expand All @@ -52,7 +53,7 @@ <h3>Create a new mapset</h3>

To create a new mapset, use the <b>-c</b> tag as shown below:
<div class="code"><pre>
g.mapset -c mapset=new location=nc_spm_08_grass7
g.mapset -c mapset=new project=nc_spm_08_grass7
</pre></div>

<h2>SEE ALSO</h2>
Expand Down
2 changes: 1 addition & 1 deletion general/g.proj/create.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void create_location(const char *location)
G_fatal_error(_("Unable to create location <%s>"), location);

G_message(_("You can switch to the new location by\n`%s=%s`"),
"g.mapset mapset=PERMANENT location", location);
"g.mapset mapset=PERMANENT project", location);
}

void modify_projinfo(void)
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ def GetListOfMapsets(dbase, location, selectable=False):

if selectable:
ret = RunCommand(
"g.mapset", read=True, flags="l", location=location, dbase=dbase
"g.mapset", read=True, flags="l", project=location, dbase=dbase
)

if not ret:
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/image2target/ii2t_gis_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ def UpdateMapsets(self, location):
"g.mapset",
read=True,
flags="l",
location=locationName,
project=locationName,
gisdbase=self.gisdbase,
)

Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/lmgr/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def _tryToSwitchMapsetFromWorkspaceFile(self, gxwXml):
returncode, errors = RunCommand(
"g.mapset",
dbase=gxwXml.database,
location=gxwXml.location,
project=gxwXml.location,
mapset=gxwXml.mapset,
getErrorMsg=True,
)
Expand Down
4 changes: 2 additions & 2 deletions gui/wxpython/startup/guiutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def switch_mapset_interactively(
RunCommand(
"g.mapset",
parent=guiparent,
location=location,
project=location,
mapset=mapset,
dbase=dbase,
)
Expand All @@ -702,7 +702,7 @@ def switch_mapset_interactively(
)
elif location:
if (
RunCommand("g.mapset", parent=guiparent, location=location, mapset=mapset)
RunCommand("g.mapset", parent=guiparent, project=location, mapset=mapset)
== 0
):
if show_confirmation:
Expand Down
4 changes: 2 additions & 2 deletions python/grass/temporal/stds_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def import_stds(
gscript.run_command(
"g.mapset",
mapset="PERMANENT",
location=location,
project=location,
dbase=old_env["GISDBASE"],
)
except CalledModuleError:
Expand Down Expand Up @@ -590,7 +590,7 @@ def import_stds(
gscript.run_command(
"g.mapset",
mapset=old_env["MAPSET"],
location=old_env["LOCATION_NAME"],
project=old_env["LOCATION_NAME"],
gisdbase=old_env["GISDBASE"],
)
except CalledModuleError:
Expand Down

0 comments on commit befd037

Please sign in to comment.