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

g.proj: rename location parameter to project #3573

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 6 additions & 6 deletions general/g.proj/g.proj.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@ <h3>Create new location</h3>
transformation parameters:<br>

<div class="code"><pre>
g.proj -c epsg=4326 location=latlong
g.proj -c epsg=4326 project=latlong
</pre></div>

<p>Create a new location with the co-ordinate system referred to by ESRI-EPSG code
900913 (<a href="http://spatialreference.org/ref/user/6/">Google Mercator Projection</a>)<br>

<div class="code"><pre>
g.proj -c epsg=900913 location=google
g.proj -c epsg=900913 project=google
</pre></div>

<p>Create a new location with the co-ordinate system referred to by EPSG code
Expand All @@ -178,29 +178,29 @@ <h3>Create new location</h3>
<div class="code"><pre>
# list available datums for EPSG code 29900
g.proj -t datumtrans=-1 epsg=29900
g.proj -c epsg=29900 datumtrans=2 location=irish_grid
g.proj -c epsg=29900 datumtrans=2 project=irish_grid
</pre></div>

<p>Create a new location with the same co-ordinate system as the current
location, but forcing a change to datum transformation parameter set no. 1:<br>

<div class="code"><pre>
g.proj -c location=newloc -t datumtrans=1
g.proj -c project=newloc -t datumtrans=1
</pre></div>

<p>Create a new location with the co-ordinate system from a WKT definition
stored in a text file:<br>

<div class="code"><pre>
g.proj -c wkt=irish_grid.prj location=irish_grid
g.proj -c wkt=irish_grid.prj project=irish_grid
</pre></div>

<p>Create a new location from a PROJ description, explicitly
specifying a datum and using the default datum transformation
parameters:<br>

<div class="code"><pre>
g.proj -c location=spain proj4="+proj=utm +zone=30 +ellps=intl" datum=eur50 datumtrans=0
g.proj -c project=spain proj4="+proj=utm +zone=30 +ellps=intl" datum=eur50 datumtrans=0
</pre></div>

<h3>Using g.proj output for GDAL/OGR tools</h3>
Expand Down
10 changes: 5 additions & 5 deletions general/g.proj/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ int main(int argc, char *argv[])
module = G_define_module();
G_add_keyword(_("general"));
G_add_keyword(_("projection"));
G_add_keyword(_("create location"));
G_add_keyword(_("create project"));
#ifdef HAVE_OGR
module->label = _("Prints or modifies GRASS projection information files "
"(in various co-ordinate system descriptions).");
module->description = _("Can also be used to create new GRASS locations.");
module->description = _("Can also be used to create new GRASS projects.");
#else
module->description =
_("Prints and manipulates GRASS projection information files.");
Expand Down Expand Up @@ -212,15 +212,15 @@ int main(int argc, char *argv[])
create = G_define_flag();
create->key = 'c';
create->guisection = _("Modify");
create->description = _("Modify current location projection files");
create->description = _("Modify current project's projection files");

location = G_define_option();
location->key = "location";
location->key = "project";
location->type = TYPE_STRING;
location->key_desc = "name";
location->required = NO;
location->guisection = _("Create");
location->description = _("Name of new location to create");
location->description = _("Name of new project (location) to create");

if (G_parser(argc, argv))
exit(EXIT_FAILURE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@
<label>Display map projection</label>
<command>g.proj -p</command>
<help>Converts co-ordinate system descriptions (i.e. projection information) between various formats (including GRASS format).</help>
<keywords>general,projection,create location</keywords>
<keywords>general,projection,create project</keywords>
<handler>RunMenuCmd</handler>
</menuitem>
<menuitem>
<label>Manage projections</label>
<command>g.proj</command>
<help>Prints or modifies GRASS projection information files (in various co-ordinate system descriptions). Can also be used to create new GRASS locations.</help>
<keywords>general,projection,create location</keywords>
<keywords>general,projection,create project</keywords>
<handler>OnMenuCmd</handler>
</menuitem>
<separator />
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/location_wizard/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -2299,7 +2299,7 @@ def OnEnterPage(self, event):
# print coordsys,proj4string
if coordsys in ("proj", "epsg", "iau", "wkt", "file"):
extra_opts = {}
extra_opts["location"] = "location"
extra_opts["project"] = "project"
extra_opts["getErrorMsg"] = True
extra_opts["read"] = True

Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/xml/wxgui_items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
<label>Display map projection</label>
<command>g.proj -p</command>
<description>Converts co-ordinate system descriptions (i.e. projection information) between various formats (including GRASS format).</description>
<keywords>general,projection,create project,create location</keywords>
<keywords>general,projection,create project,create project</keywords>
</wxgui-item>
<wxgui-item name="InstallExtensionFromAddons">
<label>Install extension from addons</label>
Expand Down
1 change: 1 addition & 0 deletions lib/gis/renamed_options
Original file line number Diff line number Diff line change
Expand Up @@ -730,3 +730,4 @@ r.proj|location:project
i.ortho.elev|location:project
g.download.location|location:project
v.proj|location:project
g.proj|location:project
10 changes: 5 additions & 5 deletions python/grass/script/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,7 @@ def create_project(
quiet=True,
flags="t",
epsg=epsg,
location=mapset_path.location,
project=mapset_path.location,
stderr=PIPE,
env=env,
**kwargs,
Expand All @@ -1802,7 +1802,7 @@ def create_project(
quiet=True,
flags="t",
proj4=proj4,
location=mapset_path.location,
project=mapset_path.location,
stderr=PIPE,
env=env,
**kwargs,
Expand All @@ -1812,7 +1812,7 @@ def create_project(
"g.proj",
quiet=True,
georef=filename,
location=mapset_path.location,
project=mapset_path.location,
stderr=PIPE,
env=env,
)
Expand All @@ -1822,7 +1822,7 @@ def create_project(
"g.proj",
quiet=True,
wkt=wkt,
location=mapset_path.location,
project=mapset_path.location,
stderr=PIPE,
env=env,
)
Expand All @@ -1831,7 +1831,7 @@ def create_project(
"g.proj",
quiet=True,
wkt="-",
location=mapset_path.location,
project=mapset_path.location,
stderr=PIPE,
stdin=PIPE,
env=env,
Expand Down
4 changes: 2 additions & 2 deletions scripts/r.tileset/r.tileset.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ <h2>EXAMPLES</h2>
"IrishGrid". Each tile will be less than 300x400 cells in size, with 3
cells of overlap in the top and right sides of each tile. The output
is in a format where each line is in shell script style. The
substitution <code>`g.proj -j location=IrishGrid`</code> will only
substitution <code>`g.proj -j project=IrishGrid`</code> will only
work in a unix style shell:
<p>
<div class="code"><pre>
r.tileset sourceproj="`g.proj -j location=IrishGrid`" maxrows=400 maxcols=300 overlap=3 -g
r.tileset sourceproj="`g.proj -j project=IrishGrid`" maxrows=400 maxcols=300 overlap=3 -g
</pre></div>

<h2>KNOWN ISSUES</h2>
Expand Down
Loading