[GRASS-user] How to list all unique pixel values (of a raster) covered by polygons (areas) for each polygon separately(?)

nikos.alexandris at felis.uni-freiburg.de nikos.alexandris at felis.uni-freiburg.de
Thu Jan 17 12:17:14 EST 2008


Salut Jose!

This is what I am doing... and I only have 7 polygons - so
it is ok.

But if I have 50 polygons... I am not so sure how to script
it to get (finally) a table with all pixels for each unique
polygon for 2 different images of the same location (for
raster MODIS year 2006 and then another of the same area
MODIS 2007!).

I want to run a regression with the pixel values... (pairs
of 2006 and 2007 values).

Thank you,

Nikos.



On Thu, 17 Jan 2008 16:42:31 +0000
 "Jose Gomez-Dans" <jgomezdans at gmail.com> wrote:
> On Jan 17, 2008 4:30 PM,
> <nikos.alexandris at felis.uni-freiburg.de> wrote:
> 
> > How can I get listed all unique pixel values enclosed
> in
> > each of the polygons I digitised (and for which the
> univ.
> > stats are calculated)?
> >
> 
> Can't you just rasterise your polygons, and use that as a
> mask with
> r.mapcalc? You can loop around in your shell. I tend to
> do that with python,
> but it's similar in GRASS. You can also try starspan.
> Or.... <
> http://grass.gdf-hannover.de/wiki/Aggregate_Values>
> 
> Cheers,
> Jose
> 
> 
> 
> -- 
> Centre for Terrestrial Carbon Dynamics
> Department of Geography, University College London
> Gower Street, London WC1E 6BT, UK

                    
                        .
         Nikos Alexandris - Ph.D. Candidate
                        .
            Department of Remote Sensing
                       and
            Landscape Information Systems
                     (FeLIS)
                        .
      Faculty of Forestry and Natural Environment
          Albert-Ludwigs-University Freiburg
                        .
            Tel.  +49 (0) 761 203 3697
            Fax.  +49 (0) 761 203 3701
             Skype: Nikos.Alexandris
                        .
           Address: Tennenbacher str. 4
              D-79106 Freiburg i. Br.
                     Germany
                        .


More information about the grass-user mailing list