[PROJ] Equivalent of OSRSetFromUserInput in proj 6 API

Nyall Dawson nyall.dawson at gmail.com
Mon Apr 8 02:32:23 PDT 2019


On Mon, 8 Apr 2019 at 18:15, Even Rouault <even.rouault at spatialys.com> wrote:
>
> On lundi 8 avril 2019 13:18:07 CEST Nyall Dawson wrote:
> > Hi list,
> >
> > While plugging away at the QGIS proj 6 upgrade I came across code
> > which uses OSRSetFromUserInput in order to convert any freeform string
> > to a coordinate reference system object.
> >
> > Is there an equivalent of this in the proj 6 API I should be using
> > instead of this?
>
> proj_create() will be able to handle PROJ strings, WKT, AUTH:CODE, OGC URNs
> and CRS names (like 'WGS84')
>
> If you pass it a PROJ string that needs to be interpretated as a CRS, you need
> to add " +type=crs" to it, otherwise it will be interpretated as a coordinate
> operation.

Is there any way use proj_create with an EPSG code, but restrict the
results to CRS objects only (for those duplicate codes)?

Nyall

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


More information about the PROJ mailing list