[gdal-dev] images with different resolution.

Frank Warmerdam warmerdam at pobox.com
Thu Sep 18 12:04:12 EDT 2008


On 9/18/08, Michele Sanges <michele.sanges at gmail.com> wrote:
> Hello all,
>
> what is the best way to represent two raster images with different
> resolution?
> In other words, how do I calculate the offset respect to the upper left
> corner of the region that includes both the images?
>  Is there a code example?

Michele,

I'm not quite clear on what you are looking for.

Two raster images with different resolutions would normally
be represented as distinct GDAL datasets, each with their
own geotransform indicating their original and pixel size.

You might find it helpful to read over the section on the
geotransform in the data model document:

  http://www.gdal.org/gdal_datamodel.html

If you have the georeferenced origin of a region,and wish
to determine the georeferenced distance from there to the
origin of a particular image you would just subtract the
origin of that images geotransform from the region's origin.
Note that the geotransforms origin is the first and fourth
element of the array for x and y respctively.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
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