Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Longstanding Ma...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 12 Topic 5534 of 6249
Post > Topic >>

Longstanding Map Overlay Problem Solved!

by David Fanning <news@[EMAIL PROTECTED] > Mar 14, 2008 at 03:00 PM

Folks,

For well over a year I have been pondering a map overlay problem.
The problem appears when trying to overlay continental outlines
on a GeoTIFF image. If you use the UV_BOX that is returned
in the map projection structure from MAP_PROJ_INIT to set up
a data coordinate space, then the outlines are just ever so 
slightly wrong. However, it you use the UV_BOX that is 
returned from MAP_PROJ_IMAGE, even if you don't warp the 
image, the results are absolutely correct. The problem 
(and solution) is described here.

   http://www.dfanning.com/map_tips/tiffoverlay.html

With a great deal of help from Matt Savoie, I have now
identified the reason these two UV_BOXES are slightly
different. The answer comes down to a limitation in
MAP_PROJ_INIT. 

Specifically, the limitation is that the LIMIT keyword
to MAP_PROJ_INIT can only accept a four-element vector
that describes two opposite corner points on the image.  
The assumption is that the other two opposite corner 
points can also be determined by this method. Unfortunately,
that is not a valid assumption for images that are in
some type of map projection already.

Rather, we need to use an 8-element LIMIT vector to
describe the location of a projected image in lat/lon
space. Something of this sort is available for MAP_SET,
although you must specify the left, top, right, and
bottom of the image, rather than its corners. But
if you try to use an 8-element LIMIT vector with 
MAP_PROJ_INIT, it will accept it without argument, it
will just *completely* ignore its values.

Fortunately, MAP_PROJ_IMAGE *does* calculate the 8-element
limit correctly, and so does return the correct UV_BOX
to set up the data coordinate space. But, as Matt discovered,
it is also possible to set the data coordinate space directly
from values calculated from geotiff information in the file.

So, now we have two solutions, and it is only the most
commonly used method that is wrong. :-)

Anyway, I can't tell you how happy I am to know the reason
for this longstanding discrepancy and I look forward to
submitting a feature request to ITTVIS to get this cleared up.

Cheers,

David
-- 
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Se****e ma de ni thui. ("Perhaps thou speakest truth.")
 




 12 Posts in Topic:
Longstanding Map Overlay Problem Solved!
David Fanning <news@[E  2008-03-14 15:00:20 
Re: Longstanding Map Overlay Problem Solved!
Bulrush <Wasit.Weather  2008-03-15 19:37:11 
Re: Longstanding Map Overlay Problem Solved!
David Fanning <news@[E  2008-03-15 20:42:13 
Re: Longstanding Map Overlay Problem Solved!
David Fanning <news@[E  2008-03-15 20:46:06 
Re: Longstanding Map Overlay Problem Solved!
Bulrush <Wasit.Weather  2008-03-15 21:03:58 
Re: Longstanding Map Overlay Problem Solved!
Bulrush <Wasit.Weather  2008-03-15 22:09:17 
Re: Longstanding Map Overlay Problem Solved!
David Fanning <news@[E  2008-03-15 23:38:55 
Re: Longstanding Map Overlay Problem Solved!
Bulrush <Wasit.Weather  2008-03-16 07:39:59 
Re: Longstanding Map Overlay Problem Solved!
David Fanning <news@[E  2008-03-16 08:54:49 
Re: Longstanding Map Overlay Problem Solved!
Bulrush <Wasit.Weather  2008-03-16 08:40:17 
Re: Longstanding Map Overlay Problem Solved!
David Fanning <news@[E  2008-03-16 10:56:37 
Re: Longstanding Map Overlay Problem Solved!
Bulrush <Wasit.Weather  2008-03-16 10:33:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 14:43:21 CDT 2008.