[PROJ] Definition of EPSG:4164

Nyall Dawson nyall.dawson at gmail.com
Sun May 12 19:02:15 PDT 2019


On Mon, 13 May 2019 at 11:46, Even Rouault <even.rouault at spatialys.com> wrote:
>
> On lundi 13 mai 2019 08:38:47 CEST Nyall Dawson wrote:
> > Hi list,
> >
> > On proj master, running "projinfo EPSG:4164" results in the output (as
> > expected) of:
> >
> > PROJ.4 string:
> > +proj=longlat +ellps=krass +towgs84=-76,-138,67,0,0,0,0 +no_defs +type=crs
> >
> > Yet, running the code:
> >
> > PJ* crs = proj_create_from_database( 0, "EPSG", "4164",
> > PJ_CATEGORY_CRS, false, nullptr );
> > const char* projstring = proj_as_proj_string( 0, crs, PJ_PROJ_4, nullptr);
> >
> > results in "+proj=longlat +ellps=krass +no_defs +type=crs", with no
> > towgs84 param.
> >
> > What am I missing here?
> >
>
> projinfo does indeed a little more work by calling
> proj_crs_create_bound_crs_to_WGS84() which makes en effort to retrieve a
> towgs84 clause when it is possible to add one (this one is defined in
> proj_experimental.h, which should rather be understood as "proj advanced")
> first.

So should we always be calling proj_crs_create_bound_crs_to_WGS84 (if
I'm trying to get a proj string which matches the official
definition)? When would we *not* want to use this method?

Nyall


More information about the PROJ mailing list