<div dir="ltr">Chris, thanks for your comments<br><br><div class="gmail_quote">2008/9/25 Christopher Barker <span dir="ltr"><<a href="mailto:Chris.Barker@noaa.gov">Chris.Barker@noaa.gov</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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.</blockquote>
<div><br>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.<br>
<br>In the end, I ended up rasterising rather than testing each geometry. Blindingly fast ;)<br><br>Cheer,<br>Jose<br></div></div><br clear="all"><br>-- <br>Centre for Terrestrial Carbon Dynamics<br>Department of Geography, University College London<br>
Gower Street, London WC1E 6BT, UK<br>
</div>