[postgis-tickets] [PostGIS] #4858: ST_DumpPoints ring indices are inconsistent with ST_DumpRings and ST_InteriorRingN
PostGIS
trac at osgeo.org
Tue Mar 9 11:50:54 PST 2021
#4858: ST_DumpPoints ring indices are inconsistent with ST_DumpRings and
ST_InteriorRingN
----------------------+---------------------------
Reporter: mdavis | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.1.2
Component: postgis | Version: 2.5.x
Resolution: | Keywords:
----------------------+---------------------------
Comment (by mdavis):
Sounds like there is reluctance to introduce indexing starting at zero,
since that is not in harmony with Postgres convention.
To satisfy the requirement for 1-based indexing, `ST_DumpRings` could be
changed to start at 1. It is then consistent with `ST_DumpPoints`. This
is inconsistent with `ST_InteriorRingN`, but perhaps that doesn't matter.
To provide a complete and consistent set of ring accessor functions, the
following functions could be added:
`ST_RingN` - returns polygon rings, with 1 = shell and 2..N the holes
`ST_NumRings` - returns the total number of rings in a polygon
These are consistent with (updated) `ST_DumpRings` and `ST_DumpPoints`.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4858#comment:2>
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