Opened 10 months ago

Closed 7 months ago

#3586 closed enhancement (fixed)

Add XY location to grass command interface

Reported by: wenzeslaus Owned by: grass-dev@…
Priority: blocker Milestone: 7.6.0
Component: Startup Version: svn-trunk
Keywords: init, grass.py, location, tmp-location, CRS, XY, CLI, gsoc2018 Cc:
CPU: Unspecified Platform: Unspecified

Description

Add -c XY to create a generic Cartesian coordinate system to grass command (compare options in the current CLI to wxGUI Location Wizard).

The current --help lists -c (with nothing) as a valid syntax which is useful for creating new mapset (as opposed to new location) and it was already there for grass6.

--tmp-location with -c (with nothing) now actually creates XY location, but that's more a side effect than an intention. Being explicit and require XY seems much safer.

Usage would look like:

Usage:
  grass75 [-h | -help | --help | --h] [-v | --version]
          [-c | -c geofile | -c EPSG:code[:datum_trans] | -c XY]
          [-e] [-f] [-text | -gtext | -gui] [--config param]
          [[[GISDBASE/]LOCATION_NAME/]MAPSET]
  grass75 [FLAG]... GISDBASE/LOCATION_NAME/MAPSET --exec EXECUTABLE [EPARAM]...
  grass75 -c [geofile | EPSG | XY] --tmp-location --exec EXECUTABLE [EPARAM]...

This is not limited to -c only but potentially influences also --tmp-location which may or may not require -c (see #3585).

Because of how --tmp-location now works, this would change the interface, hence blocker for 7.6 (it should be resolved before release to keep the interface clean).

Change History (2)

comment:1 Changed 9 months ago by mlennert

Explicit is always better than implicit, so +1.

comment:2 Changed 7 months ago by wenzeslaus

Resolution: fixed
Status: newclosed

In 73098:

init: add creation of XY location (closes #3586)

Passing an empty string to grass.script.core.create_location would be enough
but we are now explict both in code and in the interface.
(Between r72790 and r73096 XY location could be created by not
passing the ARG at all.)

Note: See TracTickets for help on using tickets.