[postgis-tickets] [PostGIS] #524: Polygon-on-polygon covers for geography

PostGIS trac at osgeo.org
Sun Aug 27 07:55:22 PDT 2017


#524: Polygon-on-polygon covers for geography
----------------------+----------------------------------------------------
  Reporter:  nick     |      Owner:  pramsey
      Type:  patch    |     Status:  new
  Priority:  medium   |  Milestone:  PostGIS 2.4.0
 Component:  postgis  |    Version:  trunk
Resolution:           |   Keywords:  geography polygon st_coveredby history
----------------------+----------------------------------------------------

Comment (by robe):

 Okay I see something wrong here:

 A geography should cover itself and this test fails that.


 {{{
 WITH c(id,geog) AS ( VALUES ( 1, ST_MakeLine(ST_Point(-10,2), ST_Point(-8,
 80) )::geography),
              ( 2, ST_Segmentize(ST_MakeLine(ST_Point(-10,2), ST_Point(-8,
 80) )::geography,50000) )
  )
 SELECT c1.id, c2.id As c2_id
 FROM c As c1 INNER JOIN c AS c2 ON ST_Covers(c1.geog, c2.geog)
 }}}

 I get:

 {{{
  id | c2_id
 ----+-------
   2 |     1
 (1 row)
 }}}


 when I would expect


 {{{
 1  1
 1  2
 2  1
 2  2
 }}}

 The 1 2 is possible might be left out because of rounding issues.

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