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

Home » Public Forums » archive » Re: map_proj_init
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: map_proj_init [message #53356 is a reply to message #53347] Sun, 08 April 2007 11:43 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
marit writes:

> Has anyone run into the problem that subsequent calls to map_proj_init
> using a GCTP projection interfere with previously defined maps? Here
> is an example:
>
> south_proj=MAP_PROJ_INIT('Polar Stereographic' ,/GCTP ,$
> semimajor_axis=6378273.0,semiminor_axis=6356889.4,$
> center_lon=0,center_lat=-70.0,false_easting=0,false_northing =0)
>
> print,map_proj_forward([0,0],[-90.0,-89.0],map_structure=sou th_proj)
> 0.0000000 0.0000000
> 0.0000000 108332.24
>
> north_proj=MAP_PROJ_INIT('Polar Stereographic' ,/GCTP ,$
> semimajor_axis=6378273.0,semiminor_axis=6356889.4,$
> center_lon=0,center_lat=70.0,false_easting=0,false_northing= 0)
>
> print,map_proj_forward([0,0],[-90.0,-89.0],map_structure=sou th_proj)
> 0.0000000 -2.0002841e+23
> 0.0000000 -1.4035070e+09
>
> I haven't yet seen this occur if the second projection is an IDL
> projection; however the IDL projections are not usually useful since
> they can't be set up like a normal projections with false easting and
> false northing and they are mostly spherical not ellipsoidal.

Interestingly, in research preparatory to writing an article
about this for my web page, I discovered that if you use
the map projection *index*, instead of the map projection
name and GCTP keyword, then all is well:

IDL> south_proj=MAP_PROJ_INIT(106, semimajor_axis=6378273.0,$
IDL> semiminor_axis=6356889.4, center_lon=0,center_lat=-70.0,$
IDL> false_easting=0,false_northing=0)
IDL> print,map_proj_forward([0,0],[-90.0,-89.0],$
IDL> map_structure=south_proj)
0.00000000 0.00000000
0.00000000 108332.24
IDL> north_proj = MAP_PROJ_INIT(106, semimajor_axis=6378273.0,$
IDL> semiminor_axis=6356889.4,center_lon=0,center_lat=-70.0,$
IDL> false_easting=0,false_northing=0)
IDL> print,map_proj_forward([0,0],[-90.0,-89.0],$
IDL> map_structure=south_proj)
0.00000000 0.00000000
0.00000000 108332.24

I wonder if this indicates that the bug lies in NOT
selecting the GCTP library routines, and hence, setting
something in !MAP.

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: "Cluster" please help
Next Topic: Re: manipulating structures

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

Current Time: Wed Oct 08 18:20:56 PDT 2025

Total time taken to generate the page: 0.00498 seconds