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

Brian mulcahy.brianp at gmail.com
Mon Jan 27 12:40:24 PST 2020


So If I have  X,Y, Z numbers how do I select just that tile like mapserver
does?

On Tue, Jan 14, 2020 at 10:09 PM Patrick Young <
patrick.mckendree.young at gmail.com> wrote:

> One trick I like regarding accessing overview levels is to use the open
> option to snag a handle direct to the overview level (see Even's post
> http://erouault.blogspot.com/2014/10/warping-overviews-and-warped-overviews.html);
> then you can run polygonize against a much smaller dataset.  If it's a COG
> presumably it has internal overviews.
>
> On Mon, Jan 13, 2020 at 12:22 PM Brian <mulcahy.brianp at gmail.com> wrote:
>
>> 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
>> inundations.
>>
>> Has anyone else come up with some type of process for this?
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200127/9154a78e/attachment.html>


More information about the gdal-dev mailing list