[Proj] How to convert a sphere to ellipsoid with correct datum?

Heiko Klein Heiko.Klein at met.no
Thu Sep 2 01:35:30 PDT 2010


 From the source of the pj_transform function, it is approx. like this:

  * convert to latlon (unless latlon) (from whichever projection, 
ellipsoid or spherical formular)

  * if datum exists on input and output:
     - apply geodetic->geocentric conversion
     - apply towgs conversion (from input)
     - apply fromwgs conversion (to output)
     - apply geocentric->gedetic conversion

  * convert to requested projection (ellipsoid or spherical formular)


The geodetic<->geocentric code depends only on the spheroid/ellipsoid, 
not of further datum information, and it is strange that this code is 
not run without both datum information, even if the ellipsoid changes.

If I give the NAD27 datum on the input, the code run for datum 
conversion is:

   * pj_apply_gridshift(srcdef)

Nothing is run for geocentric<->geodetic conversion, no towgs code is run.

I'm still very confused on what to use to convert from a spherical earth 
model to one or another projection.

Best regards,

Heiko


On 2010-09-01 11:23, Heiko Klein wrote:
> Hi,
>
> I'm working with meteorological model-data. The models usually use a
> spherical earth. Since the resolution of the models is now ~1km, I have
> to think more about converting those data for people using GIS systems.
> I have only a very rough understanding of datum, geocentric and
> geodetic. Up to now I've only used the ellps-parameters of proj to
> describe the earth.
>
> If I understand it correctly, a spherical earth is completely described
> by the major axis, and geodetic and geocentric coordinates are the same?
>
>
> Using the following does not change the coordinates
>
> ./cs2cs +proj=latlong +ellps=sphere +a=6371000 +e=0 +to +proj=latlong
> +ellps=WGS84
> 10 60
> 10dE	60dN 0.000
>
> since it calculates completely in geocentric coordinates?
>
>
>
> Giving a WGS84 datum on both input and output gives geodetic coordinates?
> /cs2cs +proj=latlong +ellps=sphere +a=6371000 +e=0 +datum=WGS84 +to
> +proj=latlong +ellps=WGS84 +datum=WGS84
> 10 60
> 10dE	60d9'58.075"N 8921.648
>
>
> Why should the sphere-datum be WGS84? Using NAD27 gives me geocentric
> coordinates?
> ./cs2cs +proj=latlong +ellps=sphere +a=6371000 +e=0 +datum=NAD27 +to
> +proj=latlong +ellps=WGS84 +datum=WGS84
> 10 60
> 10dE	60dN 0.000
>
> Does there exist a correct 'datum' for a sphere? Isn't it all the same
> for a sphere? Why do I have to give it at all?
> If I have a measurement station with GPS coordinates, latitude and
> longitude, are they geocentric or geodetic?
>
> And the final and most important question: What is the best description
> of a spherical earth to convert from with cs2cs?
>
>
> Best regards,
>
> Heiko
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj

-- 
Dr. Heiko Klein                              Tel. + 47 22 96 32 58
Development Section / IT Department          Fax. + 47 22 69 63 55
Norwegian Meteorological Institute           http://www.met.no
P.O. Box 43 Blindern  0313 Oslo NORWAY



More information about the Proj mailing list