[gdal-dev] gdal_translate with pixel size parameters?

Frank Warmerdam warmerdam at p...
Fri Nov 9 14:45:37 EST 2001



Tyler Mitchell wrote:

> 
> I think I'm misusing some terms, my apologies.
> I would actually like to maintain the output size/dimension of the overall
> image, but resample an image from 100m -> 10m pixel sizes.


Tyler,

When you say maintain the output size, I assume you mean preserve the
original geographic extents, right? Clearly if you go from 100m pixels
to 10m pixels and preserve the region, the width and height of the image
in pixels and lines will each increase by a factor of 10.

The resampling in gdal_translate is controlled by setting the size of
the output image, not by setting the desired size of a pixel in
geographic coordinates. So to increase the resolution by a factor
of 10 (as you want), you would set the -outsize arguments to be 10x
the input size of the image.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list