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

2008-09-25 Thread Christopher Barker
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 suppos

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

2008-09-25 Thread Christopher Barker
Jose Gomez-Dans wrote: I have a raster file and a vector file. I want to assign to each pixel in my raster size a value derived from the vector file (which are polygons). To do this, I want to test that the centroid of my pixel lies within a given polygon. In the past, I have done this gdal_ras

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

2008-09-25 Thread Jose Gomez-Dans
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 t

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

2008-09-22 Thread Jose Gomez-Dans
Hi, I have a raster file and a vector file. I want to assign to each pixel in my raster size a value derived from the vector file (which are polygons). To do this, I want to test that the centroid of my pixel lies within a given polygon. In the past, I have done this gdal_rasterize-ing the polygon