[postgis-tickets] [PostGIS] #3468: ST_GeogFromText should swap longitude when latitude crosses 90 deg

PostGIS trac at osgeo.org
Wed Sep 6 11:48:32 PDT 2017


#3468: ST_GeogFromText should swap longitude when latitude crosses 90 deg
----------------------------+---------------------------
  Reporter:  tomvantilburg  |      Owner:  pramsey
      Type:  defect         |     Status:  closed
  Priority:  blocker        |  Milestone:  PostGIS 2.5.0
 Component:  postgis        |    Version:  2.2.x
Resolution:  wontfix        |   Keywords:
----------------------------+---------------------------
Changes (by pramsey):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 If I evaluate bearing, then altitude
 {{{
 POINT(10 91) == POINT(-170 89)
 }}}
 If I evaluate altitude, then bearing
 {{{
 POINT(10 91) == POINT(10 89)
 }}}
 I don't think there's any stronger case for flipping to the alternate
 hemisphere than there is for not doing so. That just leaves erroring out
 or not, and the case in both bearing and altitude coercion is that a
 NOTICE is raised, which seems sufficient for me.
 {{{
 postgis24=# SELECT ST_AsText(ST_GeogFromText('POINT(10 91)'));
 NOTICE:  Coordinate values were coerced into range [-180 -90, 180 90] for
 GEOGRAPHY
   st_astext
 --------------
  POINT(10 89)
 (1 row)
 }}}

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3468#comment:8>
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