Map_Image Buggers Map Projection Space [message #84523] |
Tue, 21 May 2013 06:39 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
I had an interesting problem reported to me this morning with my
cgTerminatorMap program. On close observation, it appeared the sun was
being located just a little too far North of where it was suppose to be
in any map projection except for the cylindrical projection. We managed
to trace the problem to the Map_Image command, which warps a standard
equirectangular image into the desired map projection space.
What we discovered is that if you plot a map position (lat/lon) *before*
you enter Map_Image, it is in a different location in the window than if
you plot it *after* you exit Map_Image. The latitude map coordinate
range appears to have been buggered by Map_Image. This appears to be a
bug for all map projections except the Cylindrical map projection.
The solution is simple. Simply re-establish the map projection space
after you exit Map_Image and before you annotate your map (with the same
Map_Set command you used earlier, for example).
You can find a corrected cgTerminatorMap program here:
http://www.idlcoyote.com/programs/cgterminatormap.pro
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|