[GRASS-dev] [GRASS GIS] #3586: Add XY location to grass command interface

#3586: Add XY location to grass command interface
-------------------------------------------------+-------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: blocker | Milestone: 7.6.0
Component: Startup | Version: svn-trunk
Keywords: init, grass.py, location, tmp- | CPU: Unspecified
  location, CRS, XY, CLI, gsoc2018 |
Platform: Unspecified |
-------------------------------------------------+-------------------------
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).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3586&gt;
GRASS GIS <https://grass.osgeo.org>

#3586: Add XY location to grass command interface
-------------------------+-------------------------------------------------
  Reporter: wenzeslaus | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: blocker | Milestone: 7.6.0
Component: Startup | Version: svn-trunk
Resolution: | Keywords: init, grass.py, location, tmp-
       CPU: | location, CRS, XY, CLI, gsoc2018
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by mlennert):

Explicit is always better than implicit, so +1.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3586#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3586: Add XY location to grass command interface
-------------------------+-------------------------------------------------
  Reporter: wenzeslaus | Owner: grass-dev@…
      Type: | Status: closed
  enhancement |
  Priority: blocker | Milestone: 7.6.0
Component: Startup | Version: svn-trunk
Resolution: fixed | Keywords: init, grass.py, location, tmp-
       CPU: | location, CRS, XY, CLI, gsoc2018
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Changes (by wenzeslaus):

* status: new => closed
* resolution: => fixed

Comment:

In [changeset:"73098" 73098]:
{{{
#!CommitTicketReference repository="" revision="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.)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3586#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>