Re: MAP_PROJ_INIT [message #78187 is a reply to message #53364] |
Sat, 29 October 2011 11:10   |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
On 29 oct, 19:14, alx <lecacheux.al...@wanadoo.fr> wrote:
> On 29 oct, 18:48, David Fanning <n...@dfanning.com> wrote:
>
>
>
>
>
>> alx writes:
>>> My problem is actually the following: when applying the
>>> map_proj_forward function to real data,- that is to say when computing
>>> plane coordinates from given GPS longitudes and latitudes, a very
>>> standard operation from GPS data -, I find results wrong by a few
>>> hundred meters...
>>> For instance:
>>> IDL> lon0 = 2.1937863d0 & lat0 = 47.3808737d0
>>> IDL> map = map_proj_init(101, ELLIPSOID=24, ZONE=31)
>>> IDL> print, map_proj_forward(lon0, lat0)
>>> 439142.34 5247587.0
>>> Actual easting and northing (as calculated by using other tools) are
>>> 439144 and 5247806 instead.
>>> I then suspect somme error in map_proj_init, or maybe I am not using
>>> it correctly.
>>> I was wondering if other people had same experience.
>
>> Well, this is *exactly* the problem I was having this
>> week, and the "other tool" was ENVI. Maybe we are going
>> to have to look into this some more. What "other tools"
>> are you using?
>
>> Cheers,
>
>> David
>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")- Masquer le texte des messages précédents -
>
>> - Afficher le texte des messages précédents -
>> What "other tools" are you using?
>
> Several online tools, like "http://www.rcn.montana.edu/resources/tools/
> coordinates.aspx".
> But my reference is the french one: "http://geodesie.ign.fr/index.php?
> p=53&page=circe".
> All these give same results within 1 meter.
> alx.- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -
Well, I ran the command "map = map_proj_init(101, ELLIPSOID=24,
ZONE=31)" in debug mode.
I found that the ELLIPSOID index is wrongly changed to -1 at line
1164 (in "map_proj_getellipsoid"). This may explain why the output map
finally contains a SPHERE reference.
Unavoidably, the rest of the computation will be in error or, at
least, inaccurate.
The ITTVIS programmer seems to feel a bit unconfortable, because on
lines 1376-1379 (in map_proj_init) you can get his own warning :
; Internal routines to initialize GCTP forward and inverse
; projections. Use at your own peril.
MAP_PROJ_GCTP_FORINIT, sMap.simple, gctpZone, sMap.p,
ellipsoid
MAP_PROJ_GCTP_REVINIT, sMap.simple, gctpZone, sMap.p,
ellipsoid
Indeed, sMap.p does no longer contains the original ellipsoid
index ...
alx.
|
|
|