From d4776c8bfb8a4318eb71c030dbffe9f8ac7daf4d Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Wed, 23 Mar 2016 17:35:19 -0700 Subject: [PATCH] Warn when splitting up a 700-sided polygon for the first time --- geometry.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/geometry.cc b/geometry.cc index 0d6cc9c..f1466d1 100644 --- a/geometry.cc +++ b/geometry.cc @@ -1029,6 +1029,12 @@ std::vector chop_polygon(std::vector &geoms) { for (unsigned i = 0; i < geoms.size(); i++) { if (geoms[i].size() > 700) { + static bool warned = false; + if (!warned) { + fprintf(stderr, "Warning: splitting up polygon with more than 700 sides\n"); + warned = true; + } + long long midx = 0, midy = 0, count = 0; long long maxx = LLONG_MIN, maxy = LLONG_MIN, minx = LLONG_MAX, miny = LLONG_MAX;