[postgis-tickets] [PostGIS] #3510: ST_RemoveColinearPoints

PostGIS trac at osgeo.org
Tue Mar 22 08:21:15 PDT 2016


#3510: ST_RemoveColinearPoints
--------------------------+---------------------------
  Reporter:  robe         |      Owner:  pramsey
      Type:  enhancement  |     Status:  new
  Priority:  medium       |  Milestone:  PostGIS 2.3.0
 Component:  postgis      |    Version:  trunk
Resolution:               |   Keywords:
--------------------------+---------------------------

Comment (by strk):

 That's because the DP algorithm never drops the start or end points.
 If you scrolled that ring to start at (2 0) it would work

 {{{
 strk=# select ST_AsText(ST_Simplify('POLYGON((3 0,2 0,2 2,3 2,3 4,5
 4,5 2,9 2,9 0,3 0))'::geometry, 0));
                      st_astext
 ----------------------------------------------------
  POLYGON((3 0,2 0,2 2,3 2,3 4,5 4,5 2,9 2,9 0,3 0))
 (1 row)

 strk=# select ST_AsText(ST_Simplify('POLYGON((2 0,2 2,3 2,3 4,5 4,5
 2,9 2,9 0,3 0,2 0))'::geometry, 0));
                    st_astext
 ------------------------------------------------
  POLYGON((2 0,2 2,3 2,3 4,5 4,5 2,9 2,9 0,2 0))
 (1 row)
 }}}

 We're sill missing an ST_Scroll function, which could help
 here (see also #2175).

 This not-crossing the "ring boundary" (structural one, as
 topologically speaking a ring would not have a boundary)
 is probably missing from other functions too, like
 ST_RemoveRepeatedPoints.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3510#comment:6>
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