[gdal-dev] clip raster to one cell at coordinates

Alan Snow alansnow21 at gmail.com
Fri Jan 27 05:19:09 PST 2023


This example may be helpful:
https://gis.stackexchange.com/questions/358036/extracting-data-from-a-raster/358058

On Fri, Jan 27, 2023, 12:00 AM karsten <karsten at terragis.net> wrote:

> Hi All,
>
> in an application I have a user click on a map and I need to
> programmatically clip a raster layer
> to the one raster cell for those coordinates at the click location.
> I was looking e.g. at https://gdal.org/programs/gdal_rasterize.html to
> run as a command
> line tool, but so far could not figure out if I can some can "feed" that a
> vector point to the tool as an input
> without first writing a shape file with the point onto disk.
>
> Does somebody have any pointers to a command line tool (or a python
> example) I could use to achieve this ?
>
> Thanks
> Karsten
>
> Karsten Vennemann
> Principal
>
> Terra GIS LTD
> 2119 Boyer Ave E
> Seattle, WA  98112
> USA
> www.terragis.net
> _______________________________________________
> 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/20230127/12be57b7/attachment.htm>


More information about the gdal-dev mailing list