[PROJ] Reversing a coordinate operation via proj api

Nyall Dawson nyall.dawson at gmail.com
Thu Dec 12 16:45:01 PST 2019


On Fri, 13 Dec 2019 at 10:15, Even Rouault <even.rouault at spatialys.com> wrote:
>
> On vendredi 13 décembre 2019 10:06:19 CET Nyall Dawson wrote:
> > On Fri, 13 Dec 2019 at 09:55, Even Rouault <even.rouault at spatialys.com>
> wrote:
> > > Hi Nyall,
> > >
> > > > If I have a proj string representing a coordinate operation, is there
> > > > any existing proj c api to reverse this operation?
> > >
> > > Do you mean, to get a PROJ string corresponding to the reverse operation ?
> >
> > Yes. Or even if there was a method to take any given PROJ coordinate
> > operation object which is already constructed and create a reversed
> > clone of it.
>
> Ah, a proj_coordoperation_create_inverse(PJ_CONTEXT*, PJ*) function should be
> easily doable as there's already the C++ counterpart as
> CoordinateOperation::inverse() (for a PROJ string, PROJ has already the logic
> internally to split & reconstruct)
>
> That will not help you with dealing with released versions, but if it can make
> the future better, I can do that.

It's certainly be handy for debugging, but I'd say it's low-priority
since the workaround is straightforward.

Actually, let me have a shot at implementing this first...

Nyall

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


More information about the PROJ mailing list