[GRASS-SVN] r53139 - in grass/trunk: gui/wxpython/core gui/wxpython/dbmgr gui/wxpython/gui_core gui/wxpython/modules gui/wxpython/psmap gui/wxpython/wxplot lib/gis lib/python scripts/d.vect.thematic scripts/i.pansharpen scripts/m.proj scripts/r.out.xyz scripts/r.reclass.area scripts/r.tileset scripts/r3.in.xyz scripts/v.in.geonames scripts/v.in.gns scripts/v.in.lines scripts/v.rast.stats

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Sep 9 04:01:25 PDT 2012


Author: mmetz
Date: 2012-09-09 04:01:24 -0700 (Sun, 09 Sep 2012)
New Revision: 53139

Modified:
   grass/trunk/gui/wxpython/core/utils.py
   grass/trunk/gui/wxpython/dbmgr/base.py
   grass/trunk/gui/wxpython/gui_core/gselect.py
   grass/trunk/gui/wxpython/modules/colorrules.py
   grass/trunk/gui/wxpython/psmap/instructions.py
   grass/trunk/gui/wxpython/wxplot/histogram.py
   grass/trunk/gui/wxpython/wxplot/scatter.py
   grass/trunk/lib/gis/parser_standard_options.c
   grass/trunk/lib/python/core.py
   grass/trunk/lib/python/vector.py
   grass/trunk/scripts/d.vect.thematic/d.vect.thematic
   grass/trunk/scripts/i.pansharpen/i.pansharpen.py
   grass/trunk/scripts/m.proj/m.proj.py
   grass/trunk/scripts/r.out.xyz/r.out.xyz.py
   grass/trunk/scripts/r.reclass.area/r.reclass.area.py
   grass/trunk/scripts/r.tileset/r.tileset.py
   grass/trunk/scripts/r3.in.xyz/r3.in.xyz.py
   grass/trunk/scripts/v.in.geonames/v.in.geonames.py
   grass/trunk/scripts/v.in.gns/v.in.gns.py
   grass/trunk/scripts/v.in.lines/v.in.lines.py
   grass/trunk/scripts/v.rast.stats/v.rast.stats.py
Log:
revert fs back to sep(arator)

Modified: grass/trunk/gui/wxpython/core/utils.py
===================================================================
--- grass/trunk/gui/wxpython/core/utils.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/gui/wxpython/core/utils.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -255,7 +255,7 @@
                          read = True,
                          quiet = True,
                          flags = 'l',
-                         fs = 'newline')
+                         sep = 'newline')
         
         if ret:
             mapsets = ret.splitlines()
@@ -268,7 +268,7 @@
                          read = True,
                          quiet = True,
                          flags = 'p',
-                         fs = 'newline')
+                         sep = 'newline')
         if ret:
             if get == 'accessible':
                 mapsets = ret.splitlines()
@@ -302,7 +302,7 @@
                                read = True,
                                flags = 'g',
                                map = fullname,
-                               fs = ';')
+                               sep = ';')
     if ret != 0:
         sys.stderr.write(_("Vector map <%(map)s>: %(msg)s\n") % { 'map' : fullname, 'msg' : msg })
         return layers
@@ -570,7 +570,7 @@
                        input = '-',
                        proj_input = projIn,
                        proj_output = projOut,
-                       fs = ';',
+                       sep = ';',
                        stdin = '%f;%f' % (coord[0], coord[1]),
                        read = True)
     if coors:

Modified: grass/trunk/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/base.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/gui/wxpython/dbmgr/base.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -177,7 +177,7 @@
                              quiet = True,
                              parent = self,
                              flags = 'c',
-                             fs = fs,
+                             sep = fs,
                              sql = sql,
                              output = outFile.name)
         else:
@@ -189,7 +189,7 @@
                                  map = self.mapDBInfo.map,
                                  layer = layer,
                                  columns = ','.join(columns),
-                                 fs = fs,
+                                 sep = fs,
                                  where = where,
                                  stdout = outFile)
             else:
@@ -199,7 +199,7 @@
                                  flags = 'c',
                                  map = self.mapDBInfo.map,
                                  layer = layer,
-                                 fs = fs,
+                                 sep = fs,
                                  where = where,
                                  stdout = outFile) 
         

Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -689,7 +689,7 @@
             ret = RunCommand('v.db.connect',
                              read = True,
                              quiet = True,
-                             fs = '|',
+                             sep = '|',
                              flags = 'g',
                              map = vector)
             if ret:
@@ -954,7 +954,7 @@
         if self.searchPath:
             mlist = RunCommand('g.mapsets',
                                read = True, flags = 'p',
-                               fs = 'newline').splitlines()
+                               sep = 'newline').splitlines()
         else:
             mlist = GetListOfMapsets(self.gisdbase, self.location,
                                      selectable = False)

Modified: grass/trunk/gui/wxpython/modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/modules/colorrules.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/gui/wxpython/modules/colorrules.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -1369,7 +1369,7 @@
                              map = self.inmap,
                              layer = self.properties['layer'],
                              columns = columns,
-                             fs = sep,
+                             sep = sep,
                              stdout = outFile)
         else:
             self.preview.EraseMap()

Modified: grass/trunk/gui/wxpython/psmap/instructions.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/instructions.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/gui/wxpython/psmap/instructions.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -1396,7 +1396,7 @@
                 rows = ceil(maxim / cols )
             else:
                 cat = grass.read_command('r.category', map = raster,
-                                    fs = ':').strip().split('\n')
+                                    sep = ':').strip().split('\n')
                 rows = ceil(float(len(cat)) / cols )
                             
                 

Modified: grass/trunk/gui/wxpython/wxplot/histogram.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/histogram.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/gui/wxpython/wxplot/histogram.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -150,7 +150,7 @@
                              input = raster,
                              flags = freqflag,
                              nsteps = self.bins,
-                             fs = ',',
+                             sep = ',',
                              quiet = True,
                              read = True)
             

Modified: grass/trunk/gui/wxpython/wxplot/scatter.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/scatter.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/gui/wxpython/wxplot/scatter.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -170,7 +170,7 @@
                              input = '%s,%s' % rpair,
                              flags = freqflag,
                              nsteps = self.bins,
-                             fs = ',',
+                             sep = ',',
                              quiet = True,
                              read = True)
             

Modified: grass/trunk/lib/gis/parser_standard_options.c
===================================================================
--- grass/trunk/lib/gis/parser_standard_options.c	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/lib/gis/parser_standard_options.c	2012-09-09 11:01:24 UTC (rev 53139)
@@ -520,7 +520,7 @@
 	Opt->description = _("Name for output file");
 	break;
     case G_OPT_F_SEP:
-	Opt->key = "fs";
+	Opt->key = "separator";
 	Opt->type = TYPE_STRING;
 	Opt->key_desc = "character";
 	Opt->required = NO;

Modified: grass/trunk/lib/python/core.py
===================================================================
--- grass/trunk/lib/python/core.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/lib/python/core.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -1178,7 +1178,7 @@
         flags = 'l'
     mapsets = read_command('g.mapsets',
                            flags = flags,
-                           fs = 'newline',
+                           sep = 'newline',
                            quiet = True)
     if not mapsets:
         fatal(_("Unable to list mapsets"))

Modified: grass/trunk/lib/python/vector.py
===================================================================
--- grass/trunk/lib/python/vector.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/lib/python/vector.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -47,7 +47,7 @@
     
     @return dictionary
     """
-    s = read_command('v.db.connect', flags = 'g', map = map, fs = ';', **args)
+    s = read_command('v.db.connect', flags = 'g', map = map, sep = ';', **args)
     result = {}
     
     for l in s.splitlines():

Modified: grass/trunk/scripts/d.vect.thematic/d.vect.thematic
===================================================================
--- grass/trunk/scripts/d.vect.thematic/d.vect.thematic	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/d.vect.thematic/d.vect.thematic	2012-09-09 11:01:24 UTC (rev 53139)
@@ -361,9 +361,9 @@
     export GRASS_PNG_AUTO_WRITE
 fi
 
-table=`v.db.connect $GIS_OPT_MAP -g fs=";" | grep -w $GIS_OPT_LAYER | awk -F ";" '{print $2}'`
-database=`v.db.connect $GIS_OPT_MAP -g fs=";" | grep -w $GIS_OPT_LAYER | awk -F ";" '{print $4}'`
-driver=`v.db.connect $GIS_OPT_MAP -g fs=";" | grep -w $GIS_OPT_LAYER | awk -F ";" '{print $5}'`
+table=`v.db.connect $GIS_OPT_MAP -g sep=";" | grep -w $GIS_OPT_LAYER | awk -F ";" '{print $2}'`
+database=`v.db.connect $GIS_OPT_MAP -g sep=";" | grep -w $GIS_OPT_LAYER | awk -F ";" '{print $4}'`
+driver=`v.db.connect $GIS_OPT_MAP -g sep=";" | grep -w $GIS_OPT_LAYER | awk -F ";" '{print $5}'`
 
 if [ -z "$table" ]
     then

Modified: grass/trunk/scripts/i.pansharpen/i.pansharpen.py
===================================================================
--- grass/trunk/scripts/i.pansharpen/i.pansharpen.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/i.pansharpen/i.pansharpen.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -356,7 +356,7 @@
     
     for i in images:
         # calculate number of cells for each grey value for for each image
-        stats_out = grass.pipe_command('r.stats', flags='cin', input= i, fs=':')
+        stats_out = grass.pipe_command('r.stats', flags='cin', input= i, sep=':')
         stats =  stats_out.communicate()[0].split('\n')[:-1]
         stats_dict = dict( s.split(':', 1) for s in stats)
         total_cells = 0 # total non-null cells

Modified: grass/trunk/scripts/m.proj/m.proj.py
===================================================================
--- grass/trunk/scripts/m.proj/m.proj.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/m.proj/m.proj.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -112,7 +112,7 @@
 def main():
     input = options['input']
     output = options['output']
-    fs = options['fs']
+    fs = options['sep']
     proj_in = options['proj_input']
     proj_out = options['proj_output']
     ll_in = flags['i']

Modified: grass/trunk/scripts/r.out.xyz/r.out.xyz.py
===================================================================
--- grass/trunk/scripts/r.out.xyz/r.out.xyz.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/r.out.xyz/r.out.xyz.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -37,7 +37,7 @@
     # if no output filename, output to stdout
     output = options['output']
 
-    ret = grass.run_command("r.stats", flags = "1gn", input = options['input'], fs = options['fs'], output = output)
+    ret = grass.run_command("r.stats", flags = "1gn", input = options['input'], fs = options['sep'], output = output)
     sys.exit(ret)
 
 if __name__ == "__main__":

Modified: grass/trunk/scripts/r.reclass.area/r.reclass.area.py
===================================================================
--- grass/trunk/scripts/r.reclass.area/r.reclass.area.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/r.reclass.area/r.reclass.area.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -101,7 +101,7 @@
     flags = 'aln'
     if grass.raster_info(infile)['datatype'] in ('FCELL', 'DCELL'):
         flags += 'i'
-    p1 = grass.pipe_command('r.stats', flags = flags, input = (clumpfile, infile), fs = '|')
+    p1 = grass.pipe_command('r.stats', flags = flags, input = (clumpfile, infile), sep = '|')
     p2 = grass.feed_command('r.reclass', input = clumpfile, output = recfile, rules = '-')
     rules = ''
     for line in p1.stdout:

Modified: grass/trunk/scripts/r.tileset/r.tileset.py
===================================================================
--- grass/trunk/scripts/r.tileset/r.tileset.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/r.tileset/r.tileset.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -157,7 +157,7 @@
                              flags = 'd',
                              proj_in = source['proj'],
                              proj_out = dest['proj'],
-                             fs = ';,;',
+                             sep = ';',
                              input = file)
     
     if not ret:
@@ -372,7 +372,7 @@
                           (tile_bbox['w'], tile_bbox['s'], tile_bbox['e'], tile_bbox['n'],
                            tile_size_overlap[0], tile_size_overlap[1])
                 else:
-                    fs = options['fs']
+                    fs = options['sep']
                     print "%s%s%s%s%s%s%s%s%s%s%s" % \
                           (tile_bbox['w'], fs, tile_bbox['s'], fs, tile_bbox['e'], fs, tile_bbox['n'], fs,
                            tile_size_overlap[0], fs, tile_size_overlap[1])

Modified: grass/trunk/scripts/r3.in.xyz/r3.in.xyz.py
===================================================================
--- grass/trunk/scripts/r3.in.xyz/r3.in.xyz.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/r3.in.xyz/r3.in.xyz.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -74,7 +74,7 @@
 #% answer: float
 #%End
 #%Option
-#% key: fs
+#% key: sep
 #% type: string
 #% required: no
 #% multiple: no
@@ -190,7 +190,7 @@
     output = options['output']
     method = options['method']
     dtype = options['type']
-    fs = options['fs']
+    fs = options['sep']
     x = options['x']
     y = options['y']
     z = options['z']

Modified: grass/trunk/scripts/v.in.geonames/v.in.geonames.py
===================================================================
--- grass/trunk/scripts/v.in.geonames/v.in.geonames.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/v.in.geonames/v.in.geonames.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -150,7 +150,7 @@
 		   'timezone varchar(50)',
 		   'modification date']
 
-    grass.run_command('v.in.ascii', cat = 0, x = 6, y = 5, fs = '|',
+    grass.run_command('v.in.ascii', cat = 0, x = 6, y = 5, sep = '|',
 		      input = tmpfile, output = outfile,
 		      columns = columns)
 

Modified: grass/trunk/scripts/v.in.gns/v.in.gns.py
===================================================================
--- grass/trunk/scripts/v.in.gns/v.in.gns.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/v.in.gns/v.in.gns.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -135,7 +135,7 @@
 
     columns = [desc[1] for desc in coldescs]
 
-    grass.run_command('v.in.ascii', cat = 0, x = 5, y = 4, fs = ';',
+    grass.run_command('v.in.ascii', cat = 0, x = 5, y = 4, sep = ';',
 		      input = tmpfile, output = filevect,
 		      columns = columns)
 

Modified: grass/trunk/scripts/v.in.lines/v.in.lines.py
===================================================================
--- grass/trunk/scripts/v.in.lines/v.in.lines.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/v.in.lines/v.in.lines.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -44,7 +44,7 @@
 def main():
     global tmp
 
-    fs = options['fs']
+    fs = options['sep']
     threeD = flags['z']
 
     prog = 'v.in.lines'

Modified: grass/trunk/scripts/v.rast.stats/v.rast.stats.py
===================================================================
--- grass/trunk/scripts/v.rast.stats/v.rast.stats.py	2012-09-09 10:54:45 UTC (rev 53138)
+++ grass/trunk/scripts/v.rast.stats/v.rast.stats.py	2012-09-09 11:01:24 UTC (rev 53139)
@@ -131,7 +131,7 @@
 	grass.fatal(_("An error occurred while converting vector to raster"))
 
     # dump cats to file to avoid "too many argument" problem:
-    p = grass.pipe_command('r.category', map = rastertmp, fs = ';', quiet = True)
+    p = grass.pipe_command('r.category', map = rastertmp, sep = ';', quiet = True)
     cats = []
     for line in p.stdout:
 	cats.append(line.rstrip('\r\n').split(';')[0])
@@ -219,7 +219,7 @@
 
     # do the stats
     p = grass.pipe_command('r.univar', flags = 't' + 'g' + extstat, map = raster, 
-                      zones = rastertmp, percentile = percentile, fs = ';')
+                      zones = rastertmp, percentile = percentile, sep = ';')
 
     first_line = 1
     for line in p.stdout:



More information about the grass-commit mailing list