Ticket #1884 (new defect)
st_centroid fails on a small polygon [fixed by GEOS-3.3.5]
| Reported by: | csandor | Owned by: | pramsey |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS GEOS |
| Component: | postgis | Version: | 1.5.X |
| Keywords: | Cc: |
Description
When I do this select on a very small polygon made of 3 points I get an empty collection:
select ST_AsText(ST_Centroid(ST_GeomFromText('POLYGON((56.5286666667
25.2101666667,56.529 25.2105,56.5288333333 25.2103333333,56.5286666667
25.2101666667))')));
st_astext
GEOMETRYCOLLECTION EMPTY
(1 row)
If I modify one value just a little bit (56.529=>56.529000000001) I get correct results:
select ST_AsText(ST_Centroid(ST_GeomFromText('POLYGON((56.5286666667
25.2101666667,56.529000000001 25.2105,56.5288333333
25.2103333333,56.5286666667 25.2101666667))')));
st_astext
POINT(56.5288333333337 25.2103333333333)
(1 row)
Sandro Santilli confirmed it is bug.
Change History
Note: See
TracTickets for help on using
tickets.
