[PROJ] How to match a proj string to the db?

Nyall Dawson nyall.dawson at gmail.com
Sun May 12 00:21:25 PDT 2019


On Sun, 12 May 2019 at 17:09, Even Rouault <even.rouault at spatialys.com> wrote:
>
> Hi Nyall,
>
> > If I have a proj string (say +proj=longlat +datum=WGS84 +no_defs
> > +type=crs), how can I match this back to an authority/code from proj's
> > db?
>
> You just hit a bug. The issue is that instanciating from PROJ string for a
> GeographicCRS like the above creates a long,lat coordinate system, whereas
> EPSG:4326 is lat,long. I've just fixed this in master and 6.1 branches by
> setting a flag to indicate that CRS identification must be axis order
> tolerant.
>

Great -- thanks for the confirmation and quick response!

> >
> > proj_identify doesn't seem to be capable of this (maybe by design? The
> > dox say: "This is implemented for GeodeticCRS, ProjectedCRS,
> > VerticalCRS and CompoundCRS"). The dox for proj_identify also have a
> > cryptic note "The candidate CRSs are either hard-coded, or looked in
> > the database when authorityFactory is not null." What exactly does
> > this mean? I can't see where authorityFactory is specified, or a hard
> > coded list of candidates is specified either... Is this outdated
> > documentation?
>
> The later part is a copy&paste from the corresponding C++ which in clearer
> terms translate to "when the database is available". Also fixed.

What about the "hard-coded" part of the text? What exactly does this
mean? I can't see anyway to specify this list of hard-coded
candidates.

Nyall



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


More information about the PROJ mailing list