Projection WGS84 in decimal degree

zze-SIGALE PORTANERI F ext RD-BIZZ-SOP fportaneri.ext at RD.FRANCETELECOM.COM
Thu Jan 12 08:59:56 PST 2006


Hi Frank,

Actually, I am able to get points almost OK by forcing a new pm definition in my Layer PROJECTION definition to cancel the Postgis one:

LAYER
  NAME "GPS"
  PROJECTION
    "proj=longlat"
    "ellps=WGS84" 
    "pm=-2.33722917"
  END 
  ...
END

I say almost, because it looks like the GPS points appear at about 6 or 7 meters from the position they should...
I am not familiar enough with projections and I don't know from where comes this light difference, but I guess that 
this can be fixed by tuning the some params of the proj: 

In postgis 0.9.1, the EPSG 27582 proj details are: 
+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=-2.33722917 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs

In any case, this is ok for me.

Thanks again for your time,
Regards
Franck

-----Message d'origine-----
De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la part de Frank Warmerdam
Envoyé : jeudi 12 janvier 2006 16:04
À : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : Re: [UMN_MAPSERVER-USERS] Projection WGS84 in decimal degree

On 1/12/06, zze-SIGALE PORTANERI F ext RD-BIZZ-SOP <fportaneri.ext at rd.francetelecom.com> wrote:
> Hi Frank & Ed,
>
> Thanks for your prompt and efficient answers!!!
>
> You're right, the pbm seems to come from the prime meridiam mismatch (and not decimal degree conversion issue as I thought before).
> I was able to confim this by manually doing some conversion tests using the Convers useful little tool (http://vtopo.free.fr/convers.htm ).
>
> As per example, for a WGS84 GPS point in Paris: longitude=2.38388   latitude=48.85562
>
> In Lambert II Etendu, I have today (wrong value) : X=775063.135566471  
> Y=2431242.54750943 which is given using "Paris" as origin in Convers and which corresponds to the postgis transform call :
>
>   psql> select public.transform(GeometryFromText('POINT (2.38388 48.85562)',  4326), 27582);
>    SRID=27582;POINT(775063.135566471 2431242.54750943)
>
> So I have to find other EPSG values to get the correct X/Y that should be:
> X=603478.33780249   Y=2428587.76696934.
>
> I didn't find it yet, but I keep investigating in the spatial_ref_sys postgis (0.9.1) table!!!

FP,

I think what you will need to do is correct the PROJ.4 definition in the spatial_ref_sys table.  If you examine the +pm and +lon_0 settings you should be able to adjust things.  Generally the problem generating the proj.4 was that the +pm setting was made *and* the +lon_0 was offset by the prime meridian (or something like that).

Best regards,
--
---------------------------------------+--------------------------------
---------------------------------------+------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list