[GRASS-SVN] r66451 - grass/trunk/scripts/v.import

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Oct 9 10:56:21 PDT 2015


Author: annakrat
Date: 2015-10-09 10:56:21 -0700 (Fri, 09 Oct 2015)
New Revision: 66451

Modified:
   grass/trunk/scripts/v.import/v.import.html
   grass/trunk/scripts/v.import/v.import.py
Log:
v.import: synchronize extent option name with r.import

Modified: grass/trunk/scripts/v.import/v.import.html
===================================================================
--- grass/trunk/scripts/v.import/v.import.html	2015-10-09 16:55:34 UTC (rev 66450)
+++ grass/trunk/scripts/v.import/v.import.html	2015-10-09 17:56:21 UTC (rev 66451)
@@ -23,7 +23,7 @@
 
 <div class="code"><pre>
 # import SHAPE file at full extent and reproject to current location projection
-v.import input=research_area.shp output=research_area extents=input
+v.import input=research_area.shp output=research_area extent=input
 </pre></div>
 
 <h2>SEE ALSO</h2>

Modified: grass/trunk/scripts/v.import/v.import.py
===================================================================
--- grass/trunk/scripts/v.import/v.import.py	2015-10-09 16:55:34 UTC (rev 66450)
+++ grass/trunk/scripts/v.import/v.import.py	2015-10-09 17:56:21 UTC (rev 66451)
@@ -43,12 +43,12 @@
 #% guisection: Output
 #%end
 #%option
-#% key: extents
+#% key: extent
 #% type: string
 #% options: input,region
 #% answer: input
-#% description: Ouput vector map extents
-#% descriptions: input;extents of input map;region;extents of current region
+#% description: Ouput vector map extent
+#% descriptions: input;extent of input map;region;extent of current region
 #% guisection: Output
 #%end
 #%option
@@ -108,7 +108,7 @@
     layers = options['layer']
     
     vflags = None
-    if options['extents'] == 'region':
+    if options['extent'] == 'region':
         vflags = 'r'
     vopts = {}
     if options['encoding']:
@@ -172,7 +172,7 @@
     if grass.parse_command('g.proj', flags = 'g')['name'] == 'xy_location_unprojected':
         grass.fatal(_("Coordinate reference system not available for input <%s>") % GDALdatasource)
     
-    if options['extents'] == 'region':
+    if options['extent'] == 'region':
         # switch to target location
         os.environ['GISRC'] = str(tgtgisrc)
 
@@ -214,7 +214,7 @@
        grass.find_file(output, element='vector', mapset='.')['mapset']:
         grass.fatal(_("option <%s>: <%s> exists.") % ('output', output))
     
-    if options['extents'] == 'region':
+    if options['extent'] == 'region':
         grass.run_command('g.remove', type = 'vector', name = vreg,
                           flags = 'f', quiet = True)
 



More information about the grass-commit mailing list