[GRASS-SVN] r62580 - in grass/branches/releasebranch_7_0: . lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 3 10:41:40 PST 2014


Author: martinl
Date: 2014-11-03 10:41:40 -0800 (Mon, 03 Nov 2014)
New Revision: 62580

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/lib/init/grass.py
   grass/branches/releasebranch_7_0/lib/init/grass7.html
Log:
grass.py: support datum_trans when creating new location based on EPSG code
          (merge r62424 from trunk)



Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/trunk:61096,62179-62180,62182,62403,62422,62437,62466,62487,62491,62494,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62570,62573,62575
   + /grass/trunk:61096,62179-62180,62182,62403,62422,62424,62437,62466,62487,62491,62494,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62570,62573,62575

Modified: grass/branches/releasebranch_7_0/lib/init/grass.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/init/grass.py	2014-11-03 18:33:12 UTC (rev 62579)
+++ grass/branches/releasebranch_7_0/lib/init/grass.py	2014-11-03 18:41:40 UTC (rev 62580)
@@ -167,7 +167,7 @@
 Geographic Resources Analysis Support System (GRASS GIS).
 
 %s:
-  $CMD_NAME [-h | -help | --help] [-v | --version] [-c | -c geofile | -c EPSG:code]
+  $CMD_NAME [-h | -help | --help] [-v | --version] [-c | -c geofile | -c EPSG:code[:datum_trans]]
           [-e] [-text | -gui] [--config param]
           [[[<GISDBASE>/]<LOCATION_NAME>/]<MAPSET>]
 
@@ -646,8 +646,12 @@
                         if geofile and geofile.upper().find('EPSG:') > -1:
                             # create location using EPSG code
                             epsg = geofile.split(':', 1)[1]
+                            if ':' in epsg:
+                                epsg, datum_trans = epsg.split(':', 1)
+                            else:
+                                datum_trans = None
                             grass.create_location(gisdbase, location_name,
-                                                      epsg=epsg)
+                                                  epsg=epsg, datum_trans=datum_trans)
                         else:
                             # create location using georeferenced file
                             grass.create_location(gisdbase, location_name,

Modified: grass/branches/releasebranch_7_0/lib/init/grass7.html
===================================================================
--- grass/branches/releasebranch_7_0/lib/init/grass7.html	2014-11-03 18:33:12 UTC (rev 62579)
+++ grass/branches/releasebranch_7_0/lib/init/grass7.html	2014-11-03 18:41:40 UTC (rev 62580)
@@ -3,7 +3,7 @@
 <h2>SYNOPSIS</h2>
 
 <b>grass70</b> [<b>-h</b> | <b>-help</b> | <b>--help</b>] [<b>-v</b> | <b>--version</b>]
-    [<b>-c</b> | <b>-c geofile</b> | <b>-c EPSG:code</b>]
+    [<b>-c</b> | <b>-c geofile</b> | <b>-c EPSG:code[:datum_trans]</b>]
     [<b>-text</b> | <b>-gtext</b> | <b>-gui</b>]
     [[[<b><GISDBASE>/</b>]<b><LOCATION_NAME>/</b>]
     	<b><MAPSET></b>]
@@ -27,6 +27,9 @@
 <dt><b>-c EPSG:code</b>
 <dd> Creates new GRASS projected location in specified GISDBASE with given EPSG code
 
+<dt><b>-c EPSG:code:datum_trans</b>
+  <dd> Creates new GRASS projected location in specified GISDBASE with given EPSG code and datum transform parameters
+
 <dt><b>-text</b>
 <dd> Indicates that Text-based User Interface should be used (skip welcome screen)
 
@@ -238,6 +241,11 @@
 <dd> Creates new GRASS location with EPSG code 4326 (latitude-longitude, WGS84)
     in the specified GISDBASE
 
+<dt><b>grass70 -c EPSG:5514:3 $HOME/grassdata/mylocation</b>
+<dd> Creates new GRASS location with EPSG code 5514 (S-JTSK / Krovak
+    East North - SJTSK) with datum transformation paramaters used in
+    Czech Republic in the specified GISDBASE
+
 <dt><b>grass70 -c myvector.shp $HOME/grassdata/mylocation</b>
 <dd> Creates new GRASS location based on georeferenced Shapefile
 



More information about the grass-commit mailing list