Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 5 down vote accepted

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!

share|improve this answer
This works nicely, only issue is that you can't translate to ascii grid with gdalwarp so you need an intermediate tif and then use gdal_translate. – iant Jun 21 '12 at 13:41
I'm glad it works! Shame about the two-stage process, but that's the nature of text-based formats I guess. – MerseyViking Jun 21 '12 at 13:58
There is -tr parameter in gdal_translate for setting the target resolution and -r parameter for selecting the resampling method, both documented in – user30184 Nov 6 '15 at 13:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.