[Proj] PROJ 5.0.0RC2

Kristian Evers kreve at sdfe.dk
Fri Feb 9 05:35:10 EST 2018

In principle we shouldn’t do API changes now, but on the other hand this is the first time the code is properly tested against other libraries so some adjustments can be necessary.

First off, the new API has the following functions:

const PJ_OPERATIONS *proj_list_operations(void);
const PJ_ELLPS *proj_list_ellps(void);
const PJ_UNITS *proj_list_units(void);
const PJ_PRIME_MERIDIANS *proj_list_prime_meridians(void);

Which does the same thing as the pj_get_*_ref() functions you mention. Except that there is no function for getting the list of datums. The reason being that the +datum parameter is “classic” PROJ functionality which will be phased out eventually (we are moving away from the WGS84 hub datum which +datum is based on).

So the simple answer is to use the new API. Unfortunately you will have the same problem since we also have a UV typedef in the new API. So at least I think we should change that in order to not clash with other libraries. Unless there is any objections to this, I will rename the types XY, LP, UV, XXYZ, LPZ, UVZ to PJ_XY, PJ_LP, PJ_UV, PJ_XYZ, PJ_LPZ, PJ_UVZ.

Another solution to the problem would be to move the mentioned functions to proj_api.h. I am reluctant to do that. I want an incentive to move to the new API so the transition happens as fast as possible.

How does that work for you?


> On 9 Feb 2018, at 10:26, Sebastiaan Couwenberg <sebastic at xs4all.nl> wrote:
> On 02/07/2018 10:07 PM, Kristian Evers wrote:
>> Please test and report any problems you may find. Either here or on GitHub. In the unlikely case no issues are discovered I will push the final release two weeks from now.
> Is there still room before the final release for API changes?
> I'm currently rebuilding all Debian packages that depend on proj, and
> this has uncovered some issues in Perl packages: Geo::Proj4 & PDL. They
> both include projects.h which contains a UV typedef that conflicts with
> a Perl header that contains a UV typedef too.
> The related issues are:
> * Geo::Proj4
>   https://github.com/markov2/perl5-Geo-Proj4/issues/1
> * PDL
>   https://sourceforge.net/p/pdl/bugs/444/
> The Geo::Proj4 issues describes (one of) the reasons to include
> projects.h instead of relying on the public APIs:
> "
> Looking back at the code, my memory tells me that it only has to do
> with being able to get names defined in the library:
>  struct PJ_LIST pj_get_list_ref()
>  struct PJ_ELLPS pj_get_ellps_ref()
>  struct PJ_UNITS pj_get_units_ref()
>  struct PJ_DATUM pj_get_datums_ref()
> Access to these tables is very useful to be able to give some help to
> the users. For instance, to create option menus in graphical
> applications. I have no idea whether anyone is using it for real.
> I see that PDL::GIS::Proj also does this:
>  my @a = split(/\n/, `echo | proj -v $params`);
> to get some info.
> "
> What options are there to accommodate the needs of these Perl project in
> their use of proj?
> Kind Regards,
> Bas
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj

More information about the Proj mailing list