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.")
|