[GRASS-user] v.sample output to text file

Markus Neteler neteler at osgeo.org
Mon Oct 13 13:11:03 EDT 2008


On Mon, Oct 13, 2008 at 6:38 PM, Daniel Victoria
<daniel.victoria at gmail.com> wrote:
> Hi all,
>
> I have a set of 23 Modis NDVI images and I want to sample all images
> at specific points (50 points). What I was looking for was something
> like v.sample but, instead of generating a new vector with the raster
> value, output the values to a text file. I though about using
> i.spectral but it does not work on Windows. Another option would be
> v.what.rast but I'd have to create a lot of columns in the vector file
> first. Is there a quick way to do what I want, or should I make a loop
> and use v.what.rast?

I have written such a script for MODIS LST.

- All LST maps have a timestamp (r.timestamp)
- I generate the list of timestamps I want to loop over
  with a small script
- then I call r.what

In your case, just encapsulate all with another loop for
the coordinate pairs (for loop over cood pairs saved in
a text file).

I can send you offlist the scripts for LST which require
a bit of adaptation for NDVI.

Perhaps, in Python all might be way easier than in Shell.

Markus

It loops over the given


More information about the grass-user mailing list