I have a GeoTiff that has been supplied to me with non square pixels (I suspect due to reprojection to lat lon at some point). However the next step in my processing chain requires a Arc ASCII grid as input and so I need square pixels.
To save me trying to guess the original projection can any one tell me how to use GDAL to resample my image so the pixels become square?
Answer
It's not something I've tried, but I think you can do it with gdalwarp:
gdalwarp -tr 10.0 -10.0 -r bilinear src.tif dst.asc
You would choose a -tr value based on the smallest value of the source's resolution, remembering to negate the y scale if it's a top-down image. gdal_translate has an -outsize parameter that might do the job, but it may just truncate the image, or at best use nearest neighbour interpolation.
I'd be interested in what you find, because sooner or later it's going to happen to someone else!
No comments:
Post a Comment