[postgis-devel] [PostGIS] #799: Patch for casting geometry to geography
PostGIS
trac at osgeo.org
Fri Jan 21 14:56:12 PST 2011
#799: Patch for casting geometry to geography
-------------------------+--------------------------------------------------
Reporter: smarshall | Owner: pramsey
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS 1.5.3
Component: postgis | Version: 1.5.X
Keywords: |
-------------------------+--------------------------------------------------
Related to a post by Radu Ilie on Jan 20, 2011, I have a patch for casting
from geometry to geography that solves his problem. In particular, it
will transform coordinates into the desired range for geography objects
(-90 to 90 lat, -180 to 180 lon). The previous version detected this
problem, but simply issued an error if it occurred.
The attached files add one new external function to the the postgis
library (lwgeom_force_geodetic) and uses it in the function that casts
geometry objects to geography objects (Datum geography_in). The logic is
a very simple clone of the lwgeom_check_geodetic function, except it fixes
any descrepancies it finds.
The API at the SQL level is not changed at all.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/799>
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-devel
mailing list