EPSG issue between PostGIS and Mapserver

Frank Warmerdam warmerdam at POBOX.COM
Thu Oct 26 06:37:37 PDT 2006


Sylvain Perrinel wrote:
> Hi everybody,
> I've found a difference of code EPSG definitions for 27582  (LambertII) 
> between PostGIS and Mapserver (ie Proj4).
> Proj 4 :
> <27582> +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  <>
> 
> and PostGIS :
> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +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
> 
> The parameter +long_0 is different.
> In a mapfile, this produces a shift between my raster file in code epsg 
> 27582 (LambertII) and my postgis layer in code epsg 4326 (WGS84). This 
> shift correspond of 2.33722917 degrees, ie the difference between 
> Greenwich meridian and Paris meridian.
> 
> It seems that proj4 produces an error with long_0=-2.33722917. Is this a 
> bug?

Sylvain,

This was a generation bug in some versions of the PROJ.4 definitions.
The PROJ 4.5.0 release is out now, and includes a corrected definition.

# NTF (Paris) / France II (deprecated)
<27582> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +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  <>

Either fix up your epsg init file manually, or upgrade to PROJ 4.5.0.

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    | President OSGeo, http://osgeo.org



More information about the MapServer-users mailing list