[GRASS-SVN] r61058 - sandbox/krejcmat/src
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jun 29 04:27:28 PDT 2014
Author: martinl
Date: 2014-06-29 04:27:28 -0700 (Sun, 29 Jun 2014)
New Revision: 61058
Modified:
sandbox/krejcmat/src/mdgrass.py
sandbox/krejcmat/src/r.info.iso.py
sandbox/krejcmat/src/v.info.iso.py
Log:
r/v.info.iso: write output to current directory, fix output options
Modified: sandbox/krejcmat/src/mdgrass.py
===================================================================
--- sandbox/krejcmat/src/mdgrass.py 2014-06-29 11:11:53 UTC (rev 61057)
+++ sandbox/krejcmat/src/mdgrass.py 2014-06-29 11:27:28 UTC (rev 61058)
@@ -273,7 +273,7 @@
# if path is None, use lunch. dir
# TODO change default folder to mapset location
if not path:
- path = os.path.join(self.dirpath,xml_out_name)
+ path = os.path.join(os.getcwd(),xml_out_name)
else:
path = os.path.join(path, xml_out_name)
Modified: sandbox/krejcmat/src/r.info.iso.py
===================================================================
--- sandbox/krejcmat/src/r.info.iso.py 2014-06-29 11:11:53 UTC (rev 61057)
+++ sandbox/krejcmat/src/r.info.iso.py 2014-06-29 11:27:28 UTC (rev 61058)
@@ -29,12 +29,13 @@
#%option G_OPT_F_OUTPUT
#% label: Name for output metadata file
+#% description: Default: /path/to/current/directory/<map>.xml
#% required: no
#%end
#%option G_OPT_M_DIR
#% key: destination
-#% label: Path to destination directory
+#% description: Path to destination directory
#% required: no
#%end
@@ -48,10 +49,10 @@
else:
destination = options['destination']
- if not options['mdout']:
+ if not options['output']:
mdout = None
else:
- mdout=options['mdout']
+ mdout=options['output']
md = GrassMD(options['map'], 'cell')
if options['profil']=='inspire':
Modified: sandbox/krejcmat/src/v.info.iso.py
===================================================================
--- sandbox/krejcmat/src/v.info.iso.py 2014-06-29 11:11:53 UTC (rev 61057)
+++ sandbox/krejcmat/src/v.info.iso.py 2014-06-29 11:27:28 UTC (rev 61058)
@@ -29,12 +29,13 @@
#%option G_OPT_F_OUTPUT
#% label: Name for output metadata file
+#% description: Default: /path/to/current/directory/<map>.xml
#% required: no
#%end
#%option G_OPT_M_DIR
#% key: destination
-#% label: Path to destination directory
+#% description: Path to destination directory
#% required: no
#%end
@@ -48,21 +49,21 @@
else:
destination = options['destination']
- if not options['mdout']:
+ if not options['output']:
mdout = None
else:
- mdout=options['mdout']
+ mdout=options['output']
# create instance of metadata in owslib
md = GrassMD(options['map'], 'vector')
if options['profil']=='inspire':
md.createGrassInspireISO()
- xml_file=md.saveXML(options['destination'],options['mdout'])
+ xml_file=md.saveXML(options['destination'],mdout)
md.readXML(xml_file)
else:
md.createGrassBasicISO()
- md.saveXML(options['destination'],options['mdout'])
+ md.saveXML(options['destination'],mdout)
return 0
More information about the grass-commit
mailing list