Ticket #1545 (new defect)

Opened 4 months ago

Last modified 2 weeks ago

ST_SimplifyPreserveTopology creates invalid geometries [fixed by GEOS-3.3.4]

Reported by: strk Owned by: pramsey
Priority: medium Milestone: PostGIS GEOS
Component: postgis Version: trunk
Keywords: Cc: mtnclimb@…

Description

When simplifying a closed linestring by a tolerance higher than the max extent dimension such closed linestring becomes formed by 2 equal points, which makes it invalid.

I belive the whole point of preserving topology should be preventing such occurrences.

Change History

Changed 4 months ago by strk

Example:

=# select ST_AsText(geom), ST_IsValid(geom), st_astext(ST_SimplifyPreserveTopology(geom,200)), ST_IsValid(ST_SimplifyPreserveTopology(geom, 200)) from ( select 'LINESTRING(0 0, 5 0, 5 5, 0 0)'::geometry as geom ) as f;
NOTICE:  Too few points in geometry component at or near point 0 0
-[ RECORD 1 ]---------------------------
st_astext  | LINESTRING(0 0,5 0,5 5,0 0)
st_isvalid | t
st_astext  | LINESTRING(0 0,0 0)
st_isvalid | f

Changed 4 months ago by strk

  • cc mtnclimb@… added

This is likely a JTS bug

Changed 4 months ago by pramsey

  • milestone changed from PostGIS 2.0.0 to PostGIS 2.1.0

A GEOS bug, not a blocker for 2.0 (it's not new, it's been around forever), so I'm pushing forward.

Changed 3 months ago by strk

Martin fixed this in JTS. See the GEOS part of this here:  http://trac.osgeo.org/geos/ticket/510

Changed 2 weeks ago by strk

  • summary changed from ST_SimplifyPreserveTopology creates invalid geometries to ST_SimplifyPreserveTopology creates invalid geometries [fixed by GEOS-3.3.4]
  • milestone changed from PostGIS 2.1.0 to PostGIS GEOS
Note: See TracTickets for help on using tickets.