#4015 closed defect (invalid)
ST_Covers may have bug
Reported by: | petermj | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.4.4 |
Component: | postgis | Version: | 2.4.x |
Keywords: | Cc: |
Description
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….?
Change History (3)
comment:1 by , 7 years ago
Note:
See TracTickets
for help on using tickets.
Sorry, I forgot to add I get the answer: