[Gdal-dev] Display Images in Different Projection (Concept)

Fodder cryan at csse.com.au
Mon Feb 18 06:21:05 EST 2008


OK, So I'm pretty new to GDAL. Basically, I have an existing application and
I want to enable display of georeferenced images. I have an idea about how
I'm going to do it but I was hoping for some feedback before I dived in...

SO, let's say we have a project loaded with a north up projection A and an
image in a different projection B. We want to display the part of the image
that falls within the screen extents. My basic thinking is:
1) take the display extents and reproject them from B to the image
projection A. Use the well known text to identify the image projection. I
have code to convert the points.
2) convert these values to the pixel space (using the reverse of the 6
GeoTransform parameters)
3) take the minimum bounding rectangle of these four points
4) Read each band of the image section bounded by this rectange into a
buffer at a resolution equivalent to the resolution of the original display
(eg., m/pixel) using RasterIO
5) Now for each pixel in the original display work out the repreojected
coordinates (image projection B) then pixel coordinates, and then sample the
colour from the correct location in the buffer.

So this is basically what I had in mind, but I'm sure there must be a
better/easier/faster way. For example, I couldn't find the reverse equations
for the GeoTransform parmeters. I can work them out using simultaneous
equations but I'm guess since they're not out there I might be going about
this the wrong way.

Thanks for reading and replying (hopefully)

Cheers,
Fodder
-- 
View this message in context: http://www.nabble.com/Display-Images-in-Different-Projection-%28Concept%29-tp15542666p15542666.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.



More information about the gdal-dev mailing list