[gdal-dev] Crop raster without changing output pixel size

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Wed Sep 25 04:36:05 PDT 2013


Alexander Bruy <alexander.bruy <at> gmail.com> writes:

> 
> 2013/9/25 Jukka Rahkonen <jukka.rahkonen <at> mmmtike.fi>:
> > Have a try by -tr together with -tap
> > http://www.gdal.org/gdalwarp.html
> >
> > I guess it will give about what you want.
> 
> Thanks for hints, I'll try this. But seems to use -tr option I should
> first calculate resolution of the output raster. This can work for
> time from time usage, but not for automated processing.

I would say it another way, check the resolution of the input raster and use
that as -tr. If is to used in something automatic, I am sure that a couple
of rows of Python would do it for you and it should then work forever for
you. I am not a programmer and cannot say how those lines would look like.

-Jukka-

> Anyway, thanks for your help.
> 






More information about the gdal-dev mailing list