[postgis-tickets] [PostGIS] #3425: Clarify PostGIS handling of repeated points wrt validity in docs
PostGIS
trac at osgeo.org
Mon Jan 11 12:17:41 PST 2016
#3425: Clarify PostGIS handling of repeated points wrt validity in docs
-------------------------+---------------------------
Reporter: dbaston | Owner: pramsey
Type: enhancement | Status: new
Priority: low | Milestone: PostGIS 2.3.0
Component: postgis | Version: trunk
Keywords: |
-------------------------+---------------------------
PostGIS considers polygons to be valid if they have consecutive repeated
points within a ring. I came across an interpretation of the OGC spec in
which this is not considered valid
(https://github.com/elastic/elasticsearch/issues/12644#issuecomment-155888645).
Setting aside the question of whether there is any practical value in
considering these polygons invalid, the interpretation goes like this:
- a LineString is a Curve that uses a linear interpolation between points
(6.1.6.1)
- a Curve is simple if it does not pass through the same point twice, with
the possible exception of the two endpoints (6.1.6.1)
- a Curve that is simple and closed is a Ring (6.1.6.1)
- the boundary of a Polygon consists of a set of LinearRings that make up
its exterior and interior boundaries (6.1.11.1b)
It seems that by this reasoning, if you've got consecutive repeated
points, you're not a simple curve, and if you're not a simple curve,
you're not a LinearRing, and so you're not a part of a valid polygon. A
counterargument to this is described here:
https://lists.osgeo.org/pipermail/postgis-users/2010-March/026265.html
Given that there is some confusion or disagreement on this, it seems
worthwhile for the PostGIS docs (Sec. 4.3.5) to clarify that these
polygons are indeed considered valid in PostGIS.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3425>
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