rinfo from other code.
-Jukka Rahkonen-
Lähettäjä: gdal-dev Puolesta Alan Snow
Lähetetty: perjantai 27. tammikuuta 2023 15.19
Vastaanottaja: karsten
Kopio: gdal dev
Aihe: Re: [gdal-dev] clip raster to one cell at coordinates
This example may be helpful:
https://gis.stackexchange.com/questi
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 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
Hi Karsten,
An option is to run gdallocationinfo, get the col (P) and row (L) value and
then feed that into
gdal_translate -srcwin P L col -outsize 1 1 in.tif out.tif ##I think
that's right
You otherwise have to do the "grid logic", which (while easy ...) I'd
rather like to see exposed
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