Re: Reversing a coordinate operation via proj api
Even Rouault <[email protected]> Fri, 13 Dec 2019 00:55:13 +0100
| Newsgroups | gmane.comp.gis.proj-4.devel |
|---|---|
| Message-ID | <3302018.LyHuapgbYO@even-i700> |
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 ? Then, no. Although that would not be too complicated: separate the steps, reverse their order, for each step add +inv (or remove +inv if already present), and reconcatenate them. (with PROJ master, you'd need also to change +omit_fwd to +omit_inv and +omit_inv to +omit_fwd) If you just want to apply the reverse operation on coordinates, you can call proj_trans()/proj_trans_array()/etc. with direction = PJ_INV instead of PJ_FWD Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ PROJ mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/proj