[postgis-tickets] [PostGIS] #3805: No way to create geography that croses -180..180 (date-line)

PostGIS trac at osgeo.org
Fri Aug 11 13:04:00 PDT 2017


#3805: No way to create geography that croses -180..180 (date-line)
------------------------+---------------------------
  Reporter:  OlegSerov  |      Owner:  pramsey
      Type:  defect     |     Status:  closed
  Priority:  medium     |  Milestone:  PostGIS 2.3.4
 Component:  postgis    |    Version:  2.3.x
Resolution:  invalid    |   Keywords:
------------------------+---------------------------
Changes (by pramsey):

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


Comment:

 The fact that the 3-space volumetric bounds of alaska and alberta
 intersect (true) does not mean that the actual geographies do, as can be
 seen by running the exact test.

 {{{
 SELECT ST_Intersects(ST_GeogFromText('POLYGON((-116.614 61.7534,-109.804
  61.7534,-109.804 57.5029,-116.614 57.5029,-116.614 61.7534))'),
  (ST_GeogFromText(' POLYGON((172.347846 71.441059,-173.233993
  71.441059,-158.815832 71.441059,-144.397672 71.441059,-129.979511
  71.441059,-129.979511 51.175092,-144.397672 51.175092,-158.815832
  51.175092,-173.233993 51.175092,172.347846 51.175092,172.347846
  71.441059))')));
 }}}

 The && operator is not comparing the things you think. These aren't
 squares drawn on a map, they are volumes in R3 that contain the shapes in
 S2 described by your geographies. If you need a correct result, use the
 actual ST_Intersects() function.

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