Opened 9 years ago

Closed 9 years ago

#1538 closed enhancement (fixed)

Geography should support SRIDs other than 4326

Reported by: pramsey Owned by: pramsey
Priority: high Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc: warmerdam@…

Description

Currently only 4326 / WGS84 is supported, should support any geography system defined in spatial_ref_sys.

Change History (6)

comment:1 Changed 9 years ago by pramsey

Resolution: fixed
Status: newclosed

Applied in trunk at r9029

comment:2 Changed 9 years ago by rouault

Resolution: fixed
Status: closedreopened

Including "projects.h" which is a private proj include break compilation with proj SVN trunk. projects.h is no longer installed (see https://trac.osgeo.org/proj/changeset/1975/trunk/proj/src/Makefile.am) and in the past, postgis removed projects.h dependency. See ChangeLog? entry :

2009-03-10 15:54  mcayland

        * postgis/lwgeom_transform.c: Fix GBT#126: Don't include private
          PROJ.4 header projects.h. It appears that from its inception,
          PostGIS has inadvertently used the PROJ.4 internal projects.h
          header file rather than the correct proj_api.h header file. This
          patch flips over to the new header file and changes everything
          over to use the new external structures/APIS.

comment:3 Changed 9 years ago by pramsey

Any suggestion on how I can access the major axis and eccentricity from the projPJ then? The API doesn't get me there, and the text representation doesn't surface them for most ellipsoids (it just surfaces shorthands like "wgs84" or "clrk86" etc).

comment:4 Changed 9 years ago by rouault

Unfortunately not. I do the same observation as you... I don't see anything in proj public API that could help. Perhaps FrankW would have one ?

I have however an alternative suggestion, but not with proj. You could use GDAL OSR to retrieve those the a and f parameters. But GDAL isn't a required dependency of lwgeom I'm afraid...

comment:5 Changed 9 years ago by pramsey

Cc: warmerdam@… added

I assume things like the is_geodetic and is_geocentric were added to the API to remove the need to get access to the PJ*. So maybe we could get an ellipsoid? Otherwise I do what, create a copy of the PJ struct and force projPJ onto it, crossing my fingers? :)

comment:6 Changed 9 years ago by pramsey

Resolution: fixed
Status: reopenedclosed

I'm closing this as a duplicate of #1541

Note: See TracTickets for help on using tickets.