[patch] add missing projects.h

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] add missing projects.h

mabrand

Hi,

This patch applies to
http://trac.osgeo.org/proj/changeset/2198
and adds another missing file.

regards,

Mark

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj

0002-add-missing-projects.h.patch (753 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Greg Troxel

I had the impression that not installing projects.h was a conscious
choice in 4.8.0.   So perhaps it belongs in noinst_include_HEADERS, but
your patch seems to revert the planned withdrawal, as noted in NEWS.
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Mateusz Loskot
On 26 March 2012 11:18, Greg Troxel <[hidden email]> wrote:
>
> I had the impression that not installing projects.h was a conscious
> choice in 4.8.0.   So perhaps it belongs in noinst_include_HEADERS, but
> your patch seems to revert the planned withdrawal, as noted in NEWS.

Indeed, projects.h is a private header, not part of public API.
Why and where does this decision come from?

http://trac.osgeo.org/proj/ticket/98
http://trac.osgeo.org/osgeo4w/ticket/34
http://trac.osgeo.org/postgis/ticket/126

Thus, the patch should not be applied.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Martin Desruisseaux
"projects.h" was wrongly included by "jniproj.c", because I didn't knew it was a
private file. I will replace the include by "proj_api.h" and test the build.


Le 26/03/12 12:35, Mateusz Loskot a écrit :

> On 26 March 2012 11:18, Greg Troxel<[hidden email]>  wrote:
>> I had the impression that not installing projects.h was a conscious
>> choice in 4.8.0.   So perhaps it belongs in noinst_include_HEADERS, but
>> your patch seems to revert the planned withdrawal, as noted in NEWS.
> Indeed, projects.h is a private header, not part of public API.
> Why and where does this decision come from?
>
> http://trac.osgeo.org/proj/ticket/98
> http://trac.osgeo.org/osgeo4w/ticket/34
> http://trac.osgeo.org/postgis/ticket/126
>
> Thus, the patch should not be applied.
>
> Best regards,

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Martin Desruisseaux
Le 26/03/12 12:54, Martin Desruisseaux a écrit :
> "projects.h" was wrongly included by "jniproj.c", because I didn't knew it was a
> private file. I will replace the include by "proj_api.h" and test the build.

Sorry for the confusion. I though that the error report was about the building
Proj.4 from the sources. I noticed that the source files from
"http://download.osgeo.org/proj/proj-4.8.0.zip" contain "projects.h", so my
above comment doesn't apply.

As a side note, I noticed that some source files use #include <projects.h> while
some other files (namely cs2cs.c, gen_cheb.c, geod.c, geod_for.c, geod_inv.c,
geod_set.c, jniproj.c, p_series.c, pj_deriv.c, pj_ellps.c, pj_list.c,
pj_strerrno.c, proj.c) use #include "projects.h". Is there a policy about which
form should be used?

     Martin

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Sisyphus
In reply to this post by Mateusz Loskot

----- Original Message -----
From: "Mateusz Loskot" <[hidden email]>
To: "PROJ.4 and general Projections Discussions" <[hidden email]>
Cc: "Mark Brand" <[hidden email]>
Sent: Monday, March 26, 2012 9:35 PM
Subject: Re: [Proj] [patch] add missing projects.h


> On 26 March 2012 11:18, Greg Troxel <[hidden email]> wrote:
>>
>> I had the impression that not installing projects.h was a conscious
>> choice in 4.8.0. So perhaps it belongs in noinst_include_HEADERS, but
>> your patch seems to revert the planned withdrawal, as noted in NEWS.
>
> Indeed, projects.h is a private header, not part of public API.

Oh ... so I guess our programs should no longer begin with:

#include <projects.h>

But if we delete that inclusion, will the programs still build ok against
4.7.0 and earlier ?

I recently updated from 4.7.0 to 4.8.0 and found a program (that began by
including projects.h) no longer built - the build failed with an error about
the unknown projCtx_t type. The projCtx_t type is defined in the 4.8.0
projects.h, but not the 4.7.0 projects.h (which was the projects.h that got
loaded).
Naturally, I fixed the error by replacing that 4.7.0 projects.h with a copy
of the projects.h from the 4.8.0 source :-))
(I did wonder why 'make install' had not done that for me .... )

This particular program will likely be built in various places by various
people using different versions of the proj library, so the code needs to be
portable.

Cheers,
Rob

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Frank Warmerdam
On Mon, Mar 26, 2012 at 5:01 PM, Sisyphus <[hidden email]> wrote:
>> Indeed, projects.h is a private header, not part of public API.
>
> Oh ... so I guess our programs should no longer begin with:
>
> #include <projects.h>

Rob,

Right, for several versions proj_api.h has been preferred to use
of projects.h.

> But if we delete that inclusion, will the programs still build ok against
> 4.7.0 and earlier ?

The proj_api.h has existed for several versions; however, if you go
back far enough there would be problems.  Checking back I see it
was introduced 11 years ago.  I'm not exactly sure what version that
would be but surely it is long enough for the deprecation of projects.h
to finally result in it being removed from public installs.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Sisyphus

----- Original Message -----
From: "Frank Warmerdam"

> The proj_api.h has existed for several versions; however, if you go
> back far enough there would be problems.  Checking back I see it
> was introduced 11 years ago.  I'm not exactly sure what version that
> would be but surely it is long enough for the deprecation of projects.h
> to finally result in it being removed from public installs.

The code I'm looking at begins:

#include "projects.h"
#include "proj_api.h"

so it's obviously intended to work only with those versions of the proj
library that contain proj_api.h.

I gather that projects.h became deprecated when proj_api.h was added, and
that including *both* files should *never* have been necessary.

That being so, the removal of projects.h from that code is clearly the right
thing to do - something that could have been done long ago.

(Btw, the code I'm referring to is part of the source of perl's PDL module -
specifically PDL::GIS::Proj4.)

Thanks, Frank.

Cheers,
Rob

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Heiko Klein-3
In reply to this post by Frank Warmerdam
Hi Frank,

I agree that 11 years of deprecation are more than enough, but
deprecation usually means that the functionality is available elsewhere.
 From projects.h, e.g. pj_factors, is still not available through proj_api.h

What should I do with those functions which don't have an equivalent in
proj_api.h?

Heiko

On 2012-03-27 02:29, Frank Warmerdam wrote:

>
> Right, for several versions proj_api.h has been preferred to use
> of projects.h.
>
> The proj_api.h has existed for several versions; however, if you go
> back far enough there would be problems.  Checking back I see it
> was introduced 11 years ago.  I'm not exactly sure what version that
> would be but surely it is long enough for the deprecation of projects.h
> to finally result in it being removed from public installs.
>
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Judd Taylor-2
I'd like to add some information about the problem we're seeing with the missing projects.h file.

The code in question is a PDL (perl data language) binding to the Proj library written back in 2002 or 2003. This code uses projects.h to get the enumeration of the projections and their parameter for use in a code generator that writes the actual bindings and docs used for the interface.

As far as I know, this is not available through proj_api.h. I've not worked directly with Proj since the way back on version 4.4.7, when the above solution using projects.h was suggested on this list. Can anyone here confirm whether this functionality is present in the proj_api.h that ships with 4.8.0?

I'm specifically looking for the function pj_get_list_ref(), which is defined in projects.h.

Thanks,
    Judd


____________________________
Judd Taylor
Software Engineer

Orbital Systems, Ltd.
3807 Carbon Rd.
Irving, TX 75038-3415

[hidden email]
(972) 915-3669 x127

________________________________________
From: [hidden email] [[hidden email]] on behalf of Heiko Klein [[hidden email]]
Sent: Wednesday, March 28, 2012 3:54 AM
To: PROJ.4 and general Projections Discussions
Subject: Re: [Proj] [patch] add missing projects.h

Hi Frank,

I agree that 11 years of deprecation are more than enough, but
deprecation usually means that the functionality is available elsewhere.
 From projects.h, e.g. pj_factors, is still not available through proj_api.h

What should I do with those functions which don't have an equivalent in
proj_api.h?

Heiko

On 2012-03-27 02:29, Frank Warmerdam wrote:

>
> Right, for several versions proj_api.h has been preferred to use
> of projects.h.
>
> The proj_api.h has existed for several versions; however, if you go
> back far enough there would be problems.  Checking back I see it
> was introduced 11 years ago.  I'm not exactly sure what version that
> would be but surely it is long enough for the deprecation of projects.h
> to finally result in it being removed from public installs.
>
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Frank Warmerdam
In reply to this post by Heiko Klein-3
Heiko,

Sorry for the delay in responding.

On Wed, Mar 28, 2012 at 1:54 AM, Heiko Klein <[hidden email]> wrote:
> Hi Frank,
>
> I agree that 11 years of deprecation are more than enough, but deprecation
> usually means that the functionality is available elsewhere. From
> projects.h, e.g. pj_factors, is still not available through proj_api.h
>
> What should I do with those functions which don't have an equivalent in
> proj_api.h?

I don't consider pj_factors a public service of PROJ.4. If you want
to use it you will need the private include file, or alternatively just
consider duplicating the functionality in your project.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

Frank Warmerdam
In reply to this post by Judd Taylor-2
On Mon, Apr 9, 2012 at 8:03 AM, Judd Taylor <[hidden email]> wrote:
> I'd like to add some information about the problem we're seeing with the missing projects.h file.
>
> The code in question is a PDL (perl data language) binding to the Proj library written back in 2002 or 2003. This code uses projects.h to get the enumeration of the projections and their parameter for use in a code generator that writes the actual bindings and docs used for the interface.
>
> As far as I know, this is not available through proj_api.h. I've not worked directly with Proj since the way back on version 4.4.7, when the above solution using projects.h was suggested on this list. Can anyone here confirm whether this functionality is present in the proj_api.h that ships with 4.8.0?
>
> I'm specifically looking for the function pj_get_list_ref(), which is defined in projects.h.


Judd,

Since PDL uses pj_get_list_ref() and directly uses PJ_LIST objects you
are not using the public API, you are using the internal private API.

As such you need to include projects.h, but you shouldn't
expect to build against normal "install" copies of PROJ.4.

I would be open to ways of publishing the various lists but I think
some consideration will be needed.  What I don't want to do is
to expose the internal structures and make the ABI extremely
fragile.  I must confess I'm also not sure why PDL needs the
lists.  It doesn't seem necessary for a minimal bindings.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: [patch] add missing projects.h

support.mn
In reply to this post by mabrand
Hello,

I am following different discussions about this "do some changes in the headers" -matter ...
and I wonder why does anybody need to touch the interface?

To tell the truth I really do not like these changes in the interface - why not keep the interface
constant and do some additional work inside the library to achieve that? That would be more
practical and professional ;)

Regards: Janne.

-----------------------------------------------

Frank Warmerdam [[hidden email]] kirjoitti:

> On Mon, Apr 9, 2012 at 8:03 AM, Judd Taylor <[hidden email]> wrote:
> > I'd like to add some information about the problem we're seeing with the missing projects.h file.
> >
> > The code in question is a PDL (perl data language) binding to the Proj library written back in 2002 or 2003. This code uses projects.h to get the enumeration of the projections and their parameter for use in a code generator that writes the actual bindings and docs used for the interface.
> >
> > As far as I know, this is not available through proj_api.h. I've not worked directly with Proj since the way back on version 4.4.7, when the above solution using projects.h was suggested on this list. Can anyone here confirm whether this functionality is present in the proj_api.h that ships with 4.8.0?
> >
> > I'm specifically looking for the function pj_get_list_ref(), which is defined in projects.h.
>
>
> Judd,
>
> Since PDL uses pj_get_list_ref() and directly uses PJ_LIST objects you
> are not using the public API, you are using the internal private API.
>
> As such you need to include projects.h, but you shouldn't
> expect to build against normal "install" copies of PROJ.4.
>
> I would be open to ways of publishing the various lists but I think
> some consideration will be needed.  What I don't want to do is
> to expose the internal structures and make the ABI extremely
> fragile.  I must confess I'm also not sure why PDL needs the
> lists.  It doesn't seem necessary for a minimal bindings.
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Software Developer
> _______________________________________________
> Proj mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/proj
>

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj