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

Home » Public Forums » archive » Re: 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
Re: Map Projection Doom and Gloom [message #66631] Sat, 30 May 2009 20:34
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
R.G. Stockwell writes:

> I call map_proj_init then the call window, and then immediately call
>
>
> IDL> mapStruct = MAP_PROJ_INIT(117,
> LIMIT=[-90,-180,90,180],CENTER_LONGITUDE=0)
> IDL> window,xsize = 1000,ysize = 500
> IDL> PLOT, mapStruct.uv_box[[0,2]],mapStruct.uv_box[[1,3],/nodata
>
> but then I do a lot of calculations, drawing polygons etc,
> and finally call the map_continents to overlay those lines.
>
> IDL> result = MAP_PROJ_FORWARD(lon,lat,map_structure = mapstruct)
> IDL> MAP_CONTINENTS, /hi,MAP_STRUCTURE = mapstruct,/coasts,/countries,/usa
>
>
> Am I in hell, and not noticing? :)

This is more or less what I am doing, too, although
I am doing it in a widget program that allows you
to select the projection you prefer. But, I have
found it is EXCEEDINGLY hard to debug action-at-
a-distance interactions, since it is nearly
impossible to find a reproducible bug that you can
fix! It really feels more like Whack-A-Mole to me.
And, of course, 90% of your time is spent either
scratching your head in disbelief or fixing things
that don't really need to be fixed.

I now have a map projection object that will perform
the MAP_PROJ_INIT call when I ask it for its map structure.
If I don't dilly-dally using the damn thing, it *usually*
does what it is suppose to do. My biggest problem now
is unravelling all the "fixes" I've put in the past
couple of days. :-(

And, by the way, the Meadow Larks were wonderful. :-)

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.")
Re: Map Projection Doom and Gloom [message #66632 is a reply to message #66631] Sat, 30 May 2009 11:32 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"R.G. Stockwell" <noemail87@please.com> wrote in message
news:gvrtgr$u47$1@aioe.org...
> "David Fanning" <news@dfanning.com> wrote in message
> news:MPG.248b0b41b41ca1f498a6ca@news.giganews.com...
> ...
>> 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!
> ...
>
> sounds scary.


ok, read the web page.
lol, spooky action at a distance. Important to keep in mind.

wow, that is really unbelievable. It'd be interesting to see
what is really going on. I bet when you pass the map stucutre,
that the map routines are not using it but instead using the !Map
variables.

A quick check shows !map is empty before and after, so that is not it.
They must use a secret undocumented map system variable.

cheers,
bob
Re: Map Projection Doom and Gloom [message #66633 is a reply to message #66632] Sat, 30 May 2009 11:22 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"David Fanning" <news@dfanning.com> wrote in message
news:MPG.248b0b41b41ca1f498a6ca@news.giganews.com...
...
> 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!
...

sounds scary.

I call map_proj_init then the call window, and then immediately call


IDL> mapStruct = MAP_PROJ_INIT(117,
LIMIT=[-90,-180,90,180],CENTER_LONGITUDE=0)
IDL> window,xsize = 1000,ysize = 500
IDL> PLOT, mapStruct.uv_box[[0,2]],mapStruct.uv_box[[1,3],/nodata

but then I do a lot of calculations, drawing polygons etc,
and finally call the map_continents to overlay those lines.

IDL> result = MAP_PROJ_FORWARD(lon,lat,map_structure = mapstruct)
IDL> MAP_CONTINENTS, /hi,MAP_STRUCTURE = mapstruct,/coasts,/countries,/usa


Am I in hell, and not noticing? :)

what is the problem you are finding?

cheers,
bob
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: How to extract latitude and longitude information from HDF file?
Next Topic: A Complete Web Development Solution | Halwasiya Infosys

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

Current Time: Wed Oct 08 11:33:19 PDT 2025

Total time taken to generate the page: 0.00630 seconds