Reprojecting TIFF Images with Map_Proj_Image [message #71663] |
Mon, 05 July 2010 14:23 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
I learned another detail about re-projecting TIFF images
in the usual way (i.e., much confusion and consternation)
last week. It's worth making note of to avoid a day's
journey down unfruitful paths.
We all know by now (I think) that if you read an image
out of a TIFF file, it is almost always necessary to
reverse the image in the Y direction before the image
is displayed.
image = Read_Tiff(tiffFile)
TV, Reverse(image,2)
But what about warping a TIFF image to a different map
projection? Should the image be reversed before it
is passed to Map_Proj_Image, reversed *after* it has
passed through Map_Proj_Image, or even reversed at all
if it is to be warped?
You might think it wouldn't matter one way or the other.
You would be completely wrong. :-)
I am about 95% sure that the only way to *correctly*
warp a TIFF image to another map projection is to
reverse the image before it is passed to Map_Proj_Image
and then to not reverse it for display. If this is
not done, the image looks "correct", but the georeferencing
is *totally* wrong! (The only way I know to recognize this
for sure is to try to geonavigate the resulting warped image.
I use grid lines for this purpose. Without them I would be
hopelessly lost with respect to knowing if the warped image
is in any sense of the word "correct".)
Anyway, I wanted to get this written down before I forget it,
so I have added it to the second half of this article:
http://www.dfanning.com/map_tips/warpimage.html
I mention it here just so there is some record of it, and for
those of you who are interested in this sort of thing.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|