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

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?

Daniel

On Mon, Oct 13, 2008 at 6:38 PM, Daniel Victoria
<daniel.victoria@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

On Mon, 2008-10-13 at 14:38 -0200, Daniel Victoria 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?

Daniel

Daniel,

this reminds me either starspan or a combination of a MASK in a loop
with r.stats (which I have used for something similar). Or maybe I do
not understand what you need.

Cheers,
Nikos

Silly me! I forgot that I could pipe v.out.ascii to r.what do do
exactly what I wanted!

That's what I get for working with Windows all the time! Man, how I
miss my linux box! Company rules suck (we have to use win)

Daniel

PS - Sorry for the rant

On Mon, Oct 13, 2008 at 3:14 PM, Nikos Alexandris
<nikos.alexandris@felis.uni-freiburg.de> wrote:

On Mon, 2008-10-13 at 14:38 -0200, Daniel Victoria 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?

Daniel

Daniel,

this reminds me either starspan or a combination of a MASK in a loop
with r.stats (which I have used for something similar). Or maybe I do
not understand what you need.

Cheers,
Nikos