[Proj] differents results between cs2cs and proj

Frank Warmerdam fwarmerdam at gmail.com
Thu Jan 27 09:54:38 EST 2005


On Wed, 26 Jan 2005 15:15:00 +0100, Lionel Barth
<lbarth at hachette-livre.fr> wrote:
> Hello,
> 
> I am a new proj user.
> I do not understand why I have differents results using the following
> proj and cs2cs scripts :
> 
> The script :
> "proj    +proj=lcc +lat_1=45.8989 +lat_2=47.6960 +lat_0=46.8000
> +lon_0=2.33722917 \
>       +a=6378249.2 +b=6356515 +x_0=600000 +y_0=2200000 \
>       4.34878E 44.35930755N"
>  answers "760474.90       1930742.15"
> 
> while the script :
> "cs2cs    +proj=latlong +datum=WGS84 +ellps=GRS80 \
>   +to    +proj=lcc +lat_1=45.8989 +lat_2=47.6960 +lat_0=46.8000
> +lon_0=2.33722917 \
>       +a=6378249.2 +b=6356515 +x_0=600000 +y_0=2200000 \
>       4.34878E 44.35930755N"
> answers "760465.95       1931091.70 58.36"
> 
> The differences are 9 meters and about 350 meters. Does anybody know why ?

Lionel, 

In the "proj" case conversion is being done between your projected
space, and geographic coordinates *on the same ellipsoid*.  

In the cs2cs case an ellipsoid conversion between your ellipsoid
and WGS84 is also being done.   

I haven't tracked through the code for your case, but I would imagine
that accounts for the difference.  If you used cs2cs, but specified the
same ellipsoid model as in your projection I think you would fine the
result match proj. 

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 Proj mailing list