Chris, thanks for your comments

2008/9/25 Christopher Barker <[EMAIL PROTECTED]>

> Perhaps cumbersome, but in fact, at some level, you are indeed doing a
> rasterization with the P-in-P testing, as you are working with ALL the
> pixels in your raster. I bet it would be a lot faster to rasterize the
> polygons once, rather than doing point-in-polygon tests for every single
> raster point.


You are absolutely right. It's just that you have to call external program
such as gdal_rasterize. Is the rasterization stuff supposed to be available
to the Python GDAL bindings? It would make a lot of sense, I guess.

In the end, I ended up rasterising rather than testing each geometry.
Blindingly fast ;)

Cheer,
Jose


-- 
Centre for Terrestrial Carbon Dynamics
Department of Geography, University College London
Gower Street, London WC1E 6BT, UK
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to