[GRASS-user] Reading list of vector maps into file or array

Greetings All:

How would one read the vector maps in a current mapset into a file, or a list in an array (using python)? If I do ‘g.list vect > walker.list’, the list is not in one column and seems to be separated by tabs, with 4 columns and a bunch of rows of vector files. Would a simple solution be to begin processing that redirected output?

As background…

After running the r.sim.water module, I get a bunch of walkerXXXX vector maps as outputs for given intervals. Works well thus far.

I’m building an animated GIF of the walkers over time, on a shaded DEM. The method I am using is tedious and am seeking to automate the process. I load all the layers (shaded DEM, walkers at various intervals) and turn on one walker vector, and output a .png from the display monitor. Wash, rinse, repeat until all walkers have been captured as an image, then animate them with the ‘convert’ command.

If anyone has some suggestions on how to get vector maps into a list, please let me know. Also, if there is a better way to solve this problem, any feedback would be greatly appreciated.

Mark

Hi Mark,

Have you tried something like grass.mlist_grouped(type = ‘rast’) (may be you need change to “vect”) on python?

good luck

milton

2009/8/20 M S <mseibel@gmail.com>

Greetings All:

How would one read the vector maps in a current mapset into a file, or a list in an array (using python)? If I do ‘g.list vect > walker.list’, the list is not in one column and seems to be separated by tabs, with 4 columns and a bunch of rows of vector files. Would a simple solution be to begin processing that redirected output?

As background…

After running the r.sim.water module, I get a bunch of walkerXXXX vector maps as outputs for given intervals. Works well thus far.

I’m building an animated GIF of the walkers over time, on a shaded DEM. The method I am using is tedious and am seeking to automate the process. I load all the layers (shaded DEM, walkers at various intervals) and turn on one walker vector, and output a .png from the display monitor. Wash, rinse, repeat until all walkers have been captured as an image, then animate them with the ‘convert’ command.

If anyone has some suggestions on how to get vector maps into a list, please let me know. Also, if there is a better way to solve this problem, any feedback would be greatly appreciated.

Mark


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

Mark:

If I do 'g.list vect > walker.list', the list is not in one
column and seems to be separated by tabs, with 4 columns and
a bunch of rows of vector files.

g.mlist

I'm building an animated GIF of the walkers over time,
on a shaded DEM. The method I am using is tedious and am
seeking to automate the process. I load all the layers
(shaded DEM, walkers at various intervals) and turn on one
walker vector, and output a .png from the display monitor.
Wash, rinse, repeat until all walkers have been captured as
an image, then animate them with the 'convert'
command.

see loop shell scripts in http://grass.osgeo.org/wiki/Movies

Hamish

It is amazing!!!

Thanks hamish!

milton

2009/8/20 Hamish <hamish_b@yahoo.com>

Mark:

If I do ‘g.list vect > walker.list’, the list is not in one
column and seems to be separated by tabs, with 4 columns and
a bunch of rows of vector files.

g.mlist

I’m building an animated GIF of the walkers over time,
on a shaded DEM. The method I am using is tedious and am
seeking to automate the process. I load all the layers
(shaded DEM, walkers at various intervals) and turn on one
walker vector, and output a .png from the display monitor.
Wash, rinse, repeat until all walkers have been captured as
an image, then animate them with the ‘convert’
command.

see loop shell scripts in http://grass.osgeo.org/wiki/Movies

Hamish


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

Most excellent. Thanks to both for the help. Great wiki page too.

Mark

On Thu, Aug 20, 2009 at 12:29 PM, Milton Cezar Ribeiro <miltinho.astronauta@gmail.com> wrote:

It is amazing!!!

Thanks hamish!

milton

2009/8/20 Hamish <hamish_b@yahoo.com>

Mark:

If I do ‘g.list vect > walker.list’, the list is not in one
column and seems to be separated by tabs, with 4 columns and
a bunch of rows of vector files.

g.mlist

I’m building an animated GIF of the walkers over time,
on a shaded DEM. The method I am using is tedious and am
seeking to automate the process. I load all the layers
(shaded DEM, walkers at various intervals) and turn on one
walker vector, and output a .png from the display monitor.
Wash, rinse, repeat until all walkers have been captured as
an image, then animate them with the ‘convert’
command.

see loop shell scripts in http://grass.osgeo.org/wiki/Movies

Hamish


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