[Proj] Why is cs2cs not compensating for the difference between ellispoid and sphere?

Even Rouault even.rouault at spatialys.com
Mon Apr 6 12:54:32 EST 2015


Le lundi 06 avril 2015 19:25:53, Andrea Aime a écrit :
> Hi,
> does anybody know why when going from WGS84 to the 1924 authalic sphere
> cs2cs is not compensating for the difference in flattening (and thus not
> changing a bit
> the latitute)?
> 
> cs2cs -v +datum=WGS84 +proj=lonlat +to +proj=lonlat  +a=6371228 +b=6371228
> +units=m +no_defs
> # ---- From Coordinate System ----
> #Lat/long (Geodetic)
> #
> # +datum=WGS84 +proj=lonlat +ellps=WGS84 +towgs84=0,0,0
> # ---- To Coordinate System ----
> #Lat/long (Geodetic)
> #
> # +proj=lonlat +a=6371228 +b=6371228 +units=m +no_defs
> 10 10
> 10dE 10dN 0.000
> 
> I was expecting this behavior only when adding +nadgrids=@nul (as reported
> in the
> faq, http://proj.maptools.org/faq.html, which is using a similar command
> line...).
> 
> What am I missing?

Andrea,

this must be linked to 
http://trac.osgeo.org/proj/wiki/FAQ#WhydoIgetdifferentresultswith4.5.0and4.6.0

Basically you need to add +towgs84=0,0,0 to the target coordinate system so as 
to have a full datum definition.

$ cs2cs +datum=WGS84 +proj=lonlat +to +proj=lonlat  +a=6371228 +b=6371228 
+towgs84=0,0,0
10 10
10dE	9d56'3.819"N 6269.402


Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the Proj mailing list