[gdal-dev] Best way to test wheter point is contained in Polygon

Christopher Barker Chris.Barker at noaa.gov
Thu Sep 25 16:28:42 EDT 2008


Jose Gomez-Dans wrote:
> You are absolutely right. It's just that you have to call external program
> such as gdal_rasterize.

Ah -- I see what you mean by cumbersome now.

> Is the rasterization stuff supposed to be available
> to the Python GDAL bindings?

That would be nice -- anyone know? I suppose looking at the 
gdal_rasterize code might help you figure it out.

Another option is to rasterize to an in-memory bitmap  with another lib, 
like PIL or pyCairo, or mapnik, or maybe mapserver, though I don't know 
if you could keep it in memory with mapserver.

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

I"m glad that worked out.

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the gdal-dev mailing list