[postgis-tickets] [PostGIS] #3274: PostGIS 2.1 dependency on proj.4
PostGIS
trac at osgeo.org
Wed Sep 9 23:55:04 PDT 2015
#3274: PostGIS 2.1 dependency on proj.4
-----------------------+---------------------------
Reporter: watsonta | Owner: pramsey
Type: defect | Status: closed
Priority: high | Milestone: PostGIS 2.1.9
Component: postgis | Version: 2.1.x
Resolution: invalid | Keywords: proj4
-----------------------+---------------------------
Changes (by strk):
* status: new => closed
* resolution: => invalid
Comment:
Alright, response in code, libpgcommon/lwgeom_transform.c circa line 730:
{{{
#if POSTGIS_PROJ_VERSION >= 48
/* For newer versions of Proj we can pull the spheroid paramaeters
and initialize */
/* using them */
pj_get_spheroid_defn(pj1, &major_axis, &eccentricity_squared);
minor_axis = major_axis * sqrt(1-eccentricity_squared);
spheroid_init(s, major_axis, minor_axis);
#else
/* For old versions of Proj we cannot lookup the spheroid
parameters from the API */
/* So we use the WGS84 parameters (boo!) */
spheroid_init(s, WGS84_MAJOR_AXIS, WGS84_MINOR_AXIS);
#endif
}}}
So basically PostGIS can work also with older Proj4 versions, but it needs
to know at compile time.
It then looks like watsonta's binary was built against Proj 4.8 but was
running against a previous version. Very likely a bug in the binary
package, or its dependencies (proj-4.8+ being a dependency of the _binary_
postgis as built by the packager).
Feel free to file a separate ticket if you can reproduce the problem by
building PostGIS yourself.
Thank you.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3274#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list