#195: -g flag in r.proj/v.proj for easily-parsable output for use in scripts
-------------------------------------------+--------------------------------
Reporter: epatton | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: trivial | Milestone: 6.4.0
Component: Raster | Version: svn-trunk
Keywords: r.proj, output, print, script | Platform: Linux
Cpu: x86-64 |
-------------------------------------------+--------------------------------
Hi,
Currently r.proj -l spits out a tab-separated list of rasters; I would
like to request a -g flag to print out rasters (and vectors with v.proj)
one per line so it's easily parsable in one-liner scripts a la:
{{{
for MAP in `r.proj -g location=spearfish mapset=PERMANENT` ; do
r.proj $MAP ...etc.
}}}
#195: -g flag in r.proj/v.proj for easily-parsable output for use in scripts
--------------------------+-------------------------------------------------
Reporter: epatton | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: trivial | Milestone: 6.4.0
Component: Raster | Version: svn-trunk
Resolution: | Keywords: r.proj, output, print, script
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by neteler):
* platform: Linux => All
* cpu: x86-64 => All
Comment:
Sounds reasonable. r.proj (indeed it is r.proj.seg) use G_list_element()
which
needs an extra parameter for that (hence an update to all modules/libs
which
use this function (defined in lib/gis/list.c).
#195: -g flag in r.proj/v.proj for easily-parsable output for use in scripts
--------------------------+-------------------------------------------------
Reporter: epatton | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: closed
Priority: trivial | Milestone: 6.4.0
Component: Raster | Version: svn-trunk
Resolution: worksforme | Keywords: r.proj, output, print, script
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by epatton):
* status: new => closed
* resolution: => worksforme
Comment:
Originally, I wanted to create a list of rasters from outside the current
Location for batch-reprojecting into the current Location. I don't follow
how the -g flag will really accomplish this, but then it is Monday
morning. Regardless, I think the new functionality of the -g flag will be
quite useful in its own right.
As for the initial wish, I guess I could always go to the Location of the
rasters that are to be reprojected, create the list with g.mlist >
list.txt, then use that as input to a r.proj one-liner script.