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

Nyall Dawson nyall.dawson at gmail.com
Sun May 12 03:25:52 PDT 2019


On Sun, 12 May 2019 at 17:21, Nyall Dawson <nyall.dawson at gmail.com> wrote:
>
> 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!

I've just tested with master, and I'm still struggling here.

PJ* crs = proj_create( 0, "+proj=longlat +datum=WGS84 +no_defs +type=crs")
if ( PJ_OBJ_LIST *crsList = proj_identify( 0, crs, nullptr, nullptr,
&confidence ) )
{
 // never reached, regardless of proj string
}

Should proj_identify work ok in this situation?

Nyall





> > http://www.spatialys.com


More information about the PROJ mailing list