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

Paul Norman notifications at github.com
Sat Dec 3 21:09:28 UTC 2016


Whoops, forgot that I had changed more than one location originally.
I'll have to find a test way that results in an empty geom. I doubt I can find a way that tests the path of first invalid then empty.
On Dec 1, 2016 11:50 PM, Sarah Hoffmann <notifications at github.com> wrote:@lonvia commented on this pull request.



In geometry-builder.cpp:
>                      wkbs.emplace_back(multipoly.get(), true, projection);
                 }
             }
             else
             {
                 for(unsigned i=0; i<toplevelpolygons; i++) {
                     geom_ptr poly(polygons->at(i));
-                    if (!poly->isValid() && !excludepoly) {
+                    if ((poly->isEmpty() || !poly->isValid()) && !excludepoly) {

This has the same empty issue. Any chance to add tests for the empty cases?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

-- 
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#issuecomment-264665667
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20161203/1eb11f2c/attachment.html>


More information about the Tile-serving mailing list