[GRASS-SVN] r61855 - in grass-addons/grass7: general/g.proj.all vector/v.in.geopaparazzi vector/v.median
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 10 22:59:25 PDT 2014
Author: annakrat
Date: 2014-09-10 22:59:25 -0700 (Wed, 10 Sep 2014)
New Revision: 61855
Modified:
grass-addons/grass7/general/g.proj.all/g.proj.all.py
grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py
grass-addons/grass7/vector/v.median/v.median.py
Log:
pythonlib: update imports after moved functions in r61854
Modified: grass-addons/grass7/general/g.proj.all/g.proj.all.py
===================================================================
--- grass-addons/grass7/general/g.proj.all/g.proj.all.py 2014-09-11 05:54:54 UTC (rev 61854)
+++ grass-addons/grass7/general/g.proj.all/g.proj.all.py 2014-09-11 05:59:25 UTC (rev 61855)
@@ -82,6 +82,7 @@
import sys
import atexit
+from grass.script.utils import parse_key_val
from grass.script import core as gcore
@@ -136,7 +137,7 @@
if not curr_region:
bounds = gcore.read_command('r.proj', input=raster, flags='g',
**parameters)
- bounds = gcore.parse_key_val(bounds, vsep=' ')
+ bounds = parse_key_val(bounds, vsep=' ')
gcore.run_command('g.region', **bounds)
gcore.run_command('r.proj', input=raster, **parameters)
Modified: grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py
===================================================================
--- grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py 2014-09-11 05:54:54 UTC (rev 61854)
+++ grass-addons/grass7/vector/v.in.geopaparazzi/v.in.geopaparazzi.py 2014-09-11 05:59:25 UTC (rev 61855)
@@ -52,6 +52,7 @@
import sys
import os
import shutil
+from grass.script.utils import basename
from grass.script import core as grass
from grass.script import db as grassdb
from types import DictType, ListType
@@ -167,7 +168,7 @@
# if it is not a latlong location create a latlong location on the fly
if not locn:
# create new location and move to it creating new gisrc file
- new_loc = grass.basename(grass.tempfile(create=False))
+ new_loc = basename(grass.tempfile(create=False))
new_loc_name = 'geopaparazzi_%s' % new_loc
grass.create_location(dbase=env['GISDBASE'], epsg='4326',
location=new_loc_name,
Modified: grass-addons/grass7/vector/v.median/v.median.py
===================================================================
--- grass-addons/grass7/vector/v.median/v.median.py 2014-09-11 05:54:54 UTC (rev 61854)
+++ grass-addons/grass7/vector/v.median/v.median.py 2014-09-11 05:59:25 UTC (rev 61855)
@@ -35,6 +35,7 @@
#%end
import sys, os
+from grass.script.utils import try_remove
from grass.script import core as grass
from numpy import transpose, genfromtxt, median
@@ -55,7 +56,7 @@
output = temp_in)
# x and y of median point
medx, medy = point_med(temp_in)
- grass.try_remove(temp_in)
+ try_remove(temp_in)
# prepare the output
output = "%f|%f" % (medx, medy)
map_name = options['output']
@@ -84,7 +85,7 @@
# output file not exists
else:
outascii = grass.run_command('v.in.ascii', input=temp_out, output = map_name)
- grass.try_remove(temp_out)
+ try_remove(temp_out)
if __name__ == "__main__":
options, flags = grass.parser()
More information about the grass-commit
mailing list