[GRASS-user] Script for r.proj and g.list issues

Hanlie Pretorius hanlie.pretorius at gmail.com
Mon Sep 13 06:33:14 EDT 2010


I'm working in GRASS 6.4.0RC6 and Ubuntu 10.04.

I'm trying to write a Python script to project hundreds of files from
one location to another. Since r.proj -l outputs text that will have
to be parsed, I decided to rather follow the method explained at this
webpage (<http://www.mail-archive.com/grass-dev@lists.osgeo.org/msg14180.html>),
namely to export a list of rasters to a text file using g.list.

If I run g.list without the mapset option, I get a list of all the
rasters, but I'm particularly interested in the mapset called
'2000_02_february_trmm'. I include some of the output below to prove
that the mapset contains some rasters:
g.list type=rast
raster files available in mapset <2000_02_february_trmm>:
20000201_00_3B42RT  20000208_09_3B42RT  20000215_18_3B42RT
20000208_06_3B42RT  20000215_15_3B42RT  20000223_00_3B42RT
raster files available in mapset <PERMANENT>:
(Mon Sep 13 12:22:14 2010) Command finished (0 sec)

However, g.list is behaving strangely when I ask it to list the
rasters in mapset 2000_02_february_trmm:
g.list type=rast mapset=2000_02_february_trmm>
no raster files available in mapset <2000_02_february_trmm>>
(Mon Sep 13 12:23:11 2010) Command finished (0 sec)

So, I have two questions:

1) Am I following the right method to project the rasters from one
location to the other, or does an easier way exist?

2) Why is g.list not finding my mapset when it clearly exists?


More information about the grass-user mailing list