osm2pgsql icon indicating copy to clipboard operation
osm2pgsql copied to clipboard

Make simplify work with geoms other than linestrings

Open joto opened this issue 3 years ago • 1 comments

The simplify() function currently only works for linestrings.

  • [X] It should also work for multilinestrings.
  • [ ] It should also work for (multi)polygons.

The problem with simplify is

a) there are many different algorithms which have different properties (I believe only Douglas-Peucker is implemented in boost::geometry which we use) b) simplification can make geometries invalid, which is bad and we usually guarantee that we only import valid geometries. This is especially bad for polygons.

See #1663.

joto avatar Sep 16 '22 14:09 joto

See also https://github.com/kleunen/boost_geometry_simplify

joto avatar Oct 03 '22 09:10 joto