[PROJ] Definition of EPSG:4164

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PROJ] Definition of EPSG:4164

Nyall Dawson
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?

Nyall
_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Definition of EPSG:4164

Even Rouault-2
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.

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Definition of EPSG:4164

Nyall Dawson
On Mon, 13 May 2019 at 11:46, Even Rouault <[hidden email]> 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
_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Definition of EPSG:4164

Even Rouault-2
> 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?

Not sure if there's really an "official" definition, but if you want to
approach past behaviour as much as possible, yes, you should use it. There
should not be any disavantage with using it.
Note however that you will not always get the same results as before. See one
of my recent exchange with Sandro Furieri about EPSG:3003

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj