[GRASS-user] calculate pixel areas with starspan

maning sambale emmanuel.sambale at gmail.com
Fri Nov 24 21:23:08 EST 2006


Just a bit of update:
Starspan is faster processing Gtiff (I'm using Byte) compared to
native GRASS raster.
Although I have not timed it precisely, its around 10 times faster.

Maning

On 11/23/06, maning sambale <emmanuel.sambale at gmail.com> wrote:
> commands goes like tihis
>
> #extract number of pixels by class, vector is a municipality shapefile
> raster is grass raster
>  starspan --vector /home/maning/data/ciPhimuni/ciphimuni.shp --raster
> /home/maning/data/manilageog/sealevel3/cellhd/rise_5_reclass --fields
> MUNICIPALI --count-by-class /home/maning/data/stat/rise_5_class.csv
> --noColRow --noXY --progress
>
> #get statistics
> starspan --vector /home/maning/data/ciPhimuni/ciphimuni.shp --raster
> /home/maning/data/manilageog/sealevel3/cellhd/rise_5_reclass --fields
> MUNICIPALI --stats /home/maning/data/stat/rise_5_stats.csv avg mode
> stdev min max --noColRow --noXY --progress
>
> How do I compute class areas for each polygon?
>
> Cheers,
>
> Maning
>
> On 11/21/06, Dylan Beaudette <dylan.beaudette at gmail.com> wrote:
> > On Sunday 19 November 2006 21:53, maning sambale wrote:
> > > Hi,
> > >
> > > I have grass rasters and I want to calculate raster classes based on
> > > the attributes of a shapefile.  I'm experimenting with starspan and so
> > > far its extremely fast than:
> > >
> > > v.in.ogr #to export shapefile
> > > v.build and v.digit #to check for topology problems
> > > v.to.rast
> > > r.report
> > >
> > > But, how can I get area coverage (in percent and hectares) from a
> > > given raster class in a polygon?
> > >
> > > Any ideas?
> > >
> > > Cheers,
> > >
> > > Maning
> >
> > Hi Manning,
> >
> > How are you invoking starspan, and what exactly do you mean by "an area
> > coverage" ?
> >
> > You might check out the "mini-raster" options in starspan:
> > --mini_rasters <prefix>
> > --mini_raster_strip <filename>
> >
> > I believe that these will extract "mini" rasters for each vector feature. Be
> > sure to read the documentation however.
> >
> > Cheers,
> >
> >
> > --
> > Dylan Beaudette
> > Soils and Biogeochemistry Graduate Group
> > University of California at Davis
> > 530.754.7341
> >
>
>
> --
> |---------|----------------------------------------------------------|
> | __.-._  |"Ohhh. Great warrior. Wars not make one great." -Yoda     |
> | '-._"7' |"Freedom is still the most radical idea of all" -N.Branden|
> |  /'.-c  |Linux registered user #402901, http://counter.li.org/     |
> |  |  /T  |http://esambale.wikispaces.com|
> | _)_/LI  |http://www.geocities.com/esambale/philbiodivmap/philbirds.html   |
> |---------|----------------------------------------------------------|
>


-- 
|---------|----------------------------------------------------------|
| __.-._  |"Ohhh. Great warrior. Wars not make one great." -Yoda     |
| '-._"7' |"Freedom is still the most radical idea of all" -N.Branden|
|  /'.-c  |Linux registered user #402901, http://counter.li.org/     |
|  |  /T  |http://esambale.wikispaces.com|
| _)_/LI  |http://www.geocities.com/esambale/philbiodivmap/philbirds.html   |
|---------|----------------------------------------------------------|




More information about the grass-user mailing list