[gdal-dev] Recommended process for running a intersect test between a raster and a simple vector

Brian mulcahy.brianp at gmail.com
Mon Jan 13 11:22:09 PST 2020

So I am not sure if this is the right place or not. Feel free to remove if
it is not.

The problem:  I am needing to see if an extent (vector polygon, 4 vertices)
has any interaction with a raster stored in the cog format.

I thought about using raster_polygonize and running a intersect but that is
going to be way too slow and I don't need the detail at which the raster is
stored in.
So I was thinking of some alternatives.
Is there anyway to output just the polygon of the raster at a certain
overview level?
Is there any way to run intersects on a raster without converting it?
I know I can retrieve the extent of the raster and quickly determine if an
extent has any interaction with that raster extent. I also know that I can
send points(x,y) and retrieve the value of the raster at that point is
there any way to manipulate /game this? Maybe sending the extent as
individual points with added points in between the vertices and just
running multiple value at location operations? For my need, some false
positives would be acceptable. If it helps raster data is of rivers and

Has anyone else come up with some type of process for this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200113/fa53a99e/attachment.html>

More information about the gdal-dev mailing list