[Tile-serving] [openstreetmap/osm2pgsql] Don't let invalid geometries into the database (#655)

Frederik Ramm notifications at github.com
Wed Nov 30 21:17:31 UTC 2016


woodpeck commented on this pull request.



> @@ -209,11 +209,14 @@ geom_ptr geometry_builder::create_simple_poly(GeometryFactory &gf,
     std::unique_ptr<std::vector<Geometry *> > empty(new std::vector<Geometry *>);
     geom_ptr geom(gf.createPolygon(shell.release(), empty.release()));
 
-    if (!geom->isValid()) {
+    if (geom->isEmpty() || !geom->isValid()) {

This code block will attempt to create a buffer(0) around an empty geometry, and then throw an exception because the geometry is still empty.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/655#pullrequestreview-10851015
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20161130/80198911/attachment.html>


More information about the Tile-serving mailing list