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

2010-09-13 Thread Martin Landa
Hi,

2010/9/13 Hanlie Pretorius :
>>> g.list type=rast mapset=2000_02_february_trmm>

btw, the scripting library brings group of interfaces to g.list, see [1].

Martin

[1] http://grass.osgeo.org/programming6/pythonlib.html

-- 
Martin Landa  * http://gama.fsv.cvut.cz/~landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


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

2010-09-13 Thread Hanlie Pretorius
2010/9/13, Sylvain Maillard :
> 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)
>> --
>>
>
> you made a mistake in the name of the mapset: you used
> "2000_02_february_trmm>", try again without a > at the end ...
>
>
> Sylvain
>

My bad, sorry!
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


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

2010-09-13 Thread Sylvain Maillard
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)
> --
>

you made a mistake in the name of the mapset: you used
"2000_02_february_trmm>", try again without a > at the end ...


Sylvain
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


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

2010-09-13 Thread Hanlie Pretorius
Hi,

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 (),
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>:
2201_00_3B42RT  2208_09_3B42RT  2215_18_3B42RT
...
2208_06_3B42RT  2215_15_3B42RT  2223_00_3B42RT
raster files available in mapset :
MCD12Q1.A2001001.005_land_cover_type1
...
test_border_nulls
--
(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?


Thanks
Hanlie
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user