[GRASS-SVN] r73098 - grass/trunk/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 14 19:10:00 PDT 2018


Author: wenzeslaus
Date: 2018-08-14 19:10:00 -0700 (Tue, 14 Aug 2018)
New Revision: 73098

Modified:
   grass/trunk/lib/init/grass.py
Log:
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.)


Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2018-08-15 01:57:45 UTC (rev 73097)
+++ grass/trunk/lib/init/grass.py	2018-08-15 02:10:00 UTC (rev 73098)
@@ -288,11 +288,11 @@
 
 {usage}:
   $CMD_NAME [-h | -help | --help | --h] [-v | --version]
-          [-c | -c geofile | -c EPSG:code[:datum_trans]]
+          [-c | -c geofile | -c EPSG:code[:datum_trans] | -c XY]
           [-e] [-f] [-text | -gtext | -gui] [--config param]
           [[[GISDBASE/]LOCATION_NAME/]MAPSET]
   $CMD_NAME [FLAG]... GISDBASE/LOCATION_NAME/MAPSET --exec EXECUTABLE [EPARAM]...
-  $CMD_NAME --tmp-location [geofile | EPSG] --exec EXECUTABLE [EPARAM]...
+  $CMD_NAME --tmp-location [geofile | EPSG | XY] --exec EXECUTABLE [EPARAM]...
 
 {flags}:
   -h or -help or --help or --h   {help_flag}
@@ -805,6 +805,9 @@
                 datum_trans = None
             gcore.create_location(gisdbase, location,
                                   epsg=epsg, datum_trans=datum_trans)
+        elif geostring == 'XY':
+            # create an XY location
+            gcore.create_location(gisdbase, location)
         else:
             # create location using georeferenced file
             gcore.create_location(gisdbase, location,



More information about the grass-commit mailing list