[gdal-dev] Doing segment-wise statistics

Peder Axensten peder at axensten.se
Fri Oct 9 04:20:30 EDT 2009


Go'day,

I'd like to do some segment-wise statistics (mean, standard deviation,  
etc.) on rasters.
The segments will be defined by polygons in a shapefile.
I need to do this in a Python script, so anything without a GUI is fine.

Is there a solution I can use?

If not, I'd appreciate any suggestions or ideas on how I can implement  
it myself. The obvious way I see, is to rasterize the segmentation and  
work through all pixel pairs (segment-id/value). Are there better ways?

Best regards,

Peder Axensten
Research engineer

Swedish University of Agricultural Sciences
Forest Resource Management
Remote Sensing Laboratory
Skogmarksgränd
se-90183 Umeå
Sweden

Phone: +46-90-786.8500
http://www.srh.slu.se/rsl



More information about the gdal-dev mailing list