Ticket #1538 (closed enhancement: fixed)

Opened 16 months ago

Last modified 16 months ago

Geography should support SRIDs other than 4326

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

Description

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

Change History

Changed 16 months ago by pramsey

  • status changed from new to closed
  • resolution set to fixed

Applied in trunk at r9029

Changed 16 months ago by rouault

  • status changed from closed to reopened
  • resolution fixed deleted

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.

Changed 16 months 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).

Changed 16 months 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...

Changed 16 months 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? :)

Changed 16 months ago by pramsey

  • status changed from reopened to closed
  • resolution set to fixed

I'm closing this as a duplicate of #1541

Note: See TracTickets for help on using tickets.