comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Map Projection Doom and Gloom
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Map Projection Doom and Gloom [message #66634] Sat, 30 May 2009 09:22 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I have spent nearly three days this week (not to mention
a beautiful weekend morning when I expected to be out
listening to Meadow Larks and learning native plant species)
entombed in map projection chaos and despair.

I have written about this before:

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

but it bears repeating. Especially so when it is so
damn easy to ignore good advice and proceed as if the
world were a friendly and reasonable place. I assure
you, it is not. :-(

Here is the crux of my advice: If you are going to use
a map structure for *ANYTHING* (and I really do mean
*ANYTHING*!!), then be absolutely sure you execute
the MAP_PROJ_INIT command *IMMEDIATELY* prior to using
the friggin' thing!

If anyone wants the details, I would be happy to provide
them, but I have been advised by my doctor to wait until
my blood pressure gets back under 200 before I do so. :-(

Cheers,

David

P.S. Let's just say what with all the wailing and gnashing of teeth
this week, I have a much better understanding of what some people
mean by the expression "hell on Earth".

--
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.")
Re: Map Projection Doom and Gloom [message #66672 is a reply to message #66634] Fri, 05 June 2009 08:40 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Here is the crux of my advice: If you are going to use
> a map structure for *ANYTHING* (and I really do mean
> *ANYTHING*!!), then be absolutely sure you execute
> the MAP_PROJ_INIT command *IMMEDIATELY* prior to using
> the friggin' thing!

Just to follow up on this. I've heard from someone who
understands exactly what is going on here. It seems that
the underlying GTCP software that IDL relies on for it's
map projections uses static variables (explained to me as
"equivalent to evil common blocks") to hold various parameters.
(If you look in the MAP_PROJ_INIT source code, you will
see that the ITTVIS programmer puts a helpful note in the code
that the user is calling the GCTP software "at your peril".
Not the kind of thing you really like to see in software
comments.)

So, while the *structure* returned from MAP_PROJ_INIT
doesn't actually change when another MAP_PROJ_INIT call is
made, the underlying data stored in these static variables
*does* change. This is what causes the Great Disconnect
as you compare an unchanged map structure with wacky output.

It is unclear if this is an IDL problem or a GCTP problem.
ENVI, I note, has given up on GCTP completely and is going
(really *unfortunately*, IMHO) to an ESRI map projection engine.
It would have been SO much better if they just moved all this
map projection stuff to a proj.4 Open Software project. (The
ESRI engine uses *some* of the proj.4 stuff, but not all of it
for some reason.)

There is no indication at all that IDL's map projection
software will change any time soon, no matter what ENVI
does. So I wouldn't hold my breath that this will be fixed
in our life times. :-)

Cheers,

David
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: JPEG contour plot without IDL graphics window, can this be done?
Next Topic: update of envi zoom

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:42:56 PDT 2025

Total time taken to generate the page: 0.00660 seconds