[postgis-tickets] [PostGIS] #4015: ST_Covers may have bug
PostGIS
trac at osgeo.org
Thu Feb 8 03:06:12 PST 2018
#4015: ST_Covers may have bug
---------------------+---------------------------
Reporter: petermj | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.4.4
Component: postgis | Version: 2.4.x
Keywords: |
---------------------+---------------------------
The following code produces (for me) unexpected results.
I have a large and a small tile (square polygon), and I believe the large
should cover the small, but as a geography is does not, and as a geometry
it does?
The tiles share a corner point, and the neighbouring corners share either
longitude or latitude.
{{{
SELECT
ST_Covers(large.tile, small.tile),
ST_Covers(large.tile::geography, small.tile::geography)
FROM
(SELECT 'POLYGON((-3.34216155333235
55.3991017765333,-3.34058316886567 55.3991017765333,-3.34058316886567
55.4,-3.34216155333235 55.4,-3.34216155333235
55.3991017765333))'::geometry as tile) as large,
(SELECT 'POLYGON((-3.34216155333235
55.3999101776593,-3.34200371488568 55.3999101776593,-3.34200371488568
55.4,-3.34216155333235 55.4,-3.34216155333235
55.3999101776593))'::geometry as tile) as small
;
}}}
I'm happy to be told my knowledge of GIS is incomplete and this is a
standard newbie error, but it felt wrong to my mind....?
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4015>
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