[postgis-tickets] [PostGIS] #3410: ST_RemoveRepeatedPoints fails to drop second-to-last point

PostGIS trac at osgeo.org
Mon Dec 28 08:15:07 PST 2015


#3410: ST_RemoveRepeatedPoints fails to drop second-to-last point
---------------------+---------------------------
 Reporter:  strk     |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 2.2.1
Component:  postgis  |    Version:  2.2.x
 Keywords:           |
---------------------+---------------------------
 A 3-vertices line, in which 2nd and 3rd point are at e-10 distance.
 Calling ST_RemoveRepeatedPoint with e-8 distance does not remove anything.

 Self-contained test:
 {{{
 =# with inp as ( select
 '010200000003000000BCAABC2B192739418F7DE0E6AB96524185EB51382828394115AE47D12C96524187EB51382828394115AE47D12C965241'::geometry
 g ) select st_summary(g), st_summary(st_removerepeatedpoints(g,1e-8)),
 st_distance(st_pointn(g,2), st_pointn(g,3)) from inp;
 LOG:  duration: 0.350 ms  statement: with inp as ( select
 '010200000003000000BCAABC2B192739418F7DE0E6AB96524185EB51382828394115AE47D12C96524187EB51382828394115AE47D12C965241'::geometry
 g ) select st_summary(g), st_summary(st_removerepeatedpoints(g,1e-8)),
 st_distance(st_pointn(g,2), st_pointn(g,3)) from inp;
 -[ RECORD 1 ]----------------------------
 st_summary  | LineString[B] with 3 points
 st_summary  | LineString[B] with 3 points
 st_distance | 4.65661287307739e-10
 }}}

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3410>
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