[gdal-dev] gdal_translate with srcwin and center reference point

jratike80 jukka.rahkonen at maanmittauslaitos.fi
Thu Jun 15 00:35:57 PDT 2017

issam boughanmi wrote
> hi,
> i want to use subset a large raster image using gdal_translate with srcwin
> parameter
> but i want also to give some reference point to be at the center of the
> output file .
> so if the output file size is 2000X2000 pixel   for exemple, i want that
> my given point(lat/lon) to be at the center
> any idea on how this can be achieved is welcome .


Instead of -srcwin use -projwin and with very little scripting you can
construct the ulx, uly, lrx, lry values from the coordinates of the given
centre point.

-Jukka Rahkonen-

View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-gdal-translate-with-srcwin-and-center-reference-point-tp5324260p5324298.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

More information about the gdal-dev mailing list