diff --git a/geometry.cpp b/geometry.cpp index 10417fa2..d80b356b 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1004,7 +1004,7 @@ drawvec clip_lines(drawvec &geom, long long minx, long long miny, long long maxx } // @@@ -static double square_distance_from_line(long long point_x, long long point_y, long long segA_x, long long segA_y, long long segB_x, long long segB_y) { +static long long square_distance_from_line(long long point_x, long long point_y, long long segA_x, long long segA_y, long long segB_x, long long segB_y) { long long p2x = segB_x - segA_x; long long p2y = segB_y - segA_y; double something = p2x * p2x + p2y * p2y; @@ -1051,7 +1051,7 @@ static void douglas_peucker(drawvec &geom, int start, int n, double e, size_t ke int first = recursion_stack.top(); recursion_stack.pop(); - double max_distance = -1; + long long max_distance = -1; int farthest_element_index; if (geom[start + first] < geom[start + second]) { farthest_element_index = second; @@ -1063,9 +1063,9 @@ static void douglas_peucker(drawvec &geom, int start, int n, double e, size_t ke int i; if (geom[start + first] < geom[start + second]) { for (i = first + 1; i < second; i++) { - double temp_dist = square_distance_from_line(geom[start + i].x, geom[start + i].y, geom[start + first].x, geom[start + first].y, geom[start + second].x, geom[start + second].y); + long long temp_dist = square_distance_from_line(geom[start + i].x, geom[start + i].y, geom[start + first].x, geom[start + first].y, geom[start + second].x, geom[start + second].y); - double distance = std::fabs(temp_dist); + long long distance = std::llabs(temp_dist); if ((distance > e || kept < retain) && (distance > max_distance || (distance == max_distance && geom[start + i] < geom[start + farthest_element_index]))) { farthest_element_index = i; @@ -1074,9 +1074,9 @@ static void douglas_peucker(drawvec &geom, int start, int n, double e, size_t ke } } else { for (i = second - 1; i > first; i--) { - double temp_dist = square_distance_from_line(geom[start + i].x, geom[start + i].y, geom[start + first].x, geom[start + first].y, geom[start + second].x, geom[start + second].y); + long long temp_dist = square_distance_from_line(geom[start + i].x, geom[start + i].y, geom[start + first].x, geom[start + first].y, geom[start + second].x, geom[start + second].y); - double distance = std::fabs(temp_dist); + long long distance = std::llabs(temp_dist); if ((distance > e || kept < retain) && (distance > max_distance || (distance == max_distance && geom[start + i] < geom[start + farthest_element_index]))) { farthest_element_index = i; @@ -1120,11 +1120,11 @@ drawvec impose_tile_boundaries(drawvec &geom, long long extent) { if (c > 1) { // clipped if (x1 != geom[i - 1].x || y1 != geom[i - 1].y) { - out.push_back(draw(VT_LINETO, std::round(x1), std::round(y1))); + out.push_back(draw(VT_LINETO, x1, y1)); out[out.size() - 1].necessary = 1; } if (x2 != geom[i - 0].x || y2 != geom[i - 0].y) { - out.push_back(draw(VT_LINETO, std::round(x2), std::round(y2))); + out.push_back(draw(VT_LINETO, x2, y2)); out[out.size() - 1].necessary = 1; } } diff --git a/tests/curve/out/-z2.json b/tests/curve/out/-z2.json index 9c176390..5eebfea6 100644 --- a/tests/curve/out/-z2.json +++ b/tests/curve/out/-z2.json @@ -16,7 +16,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -98.964844, 82.994132 ], [ -82.001953, 81.996942 ], [ -105.996094, 69.990535 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -27.949219, -72.996909 ], [ 90.000000, -73.995328 ], [ 145.019531, -73.995328 ], [ 145.019531, -76.999935 ], [ 92.988281, -79.004962 ], [ -32.958984, -76.999935 ], [ -74.970703, -66.018018 ], [ -97.031250, -37.996163 ], [ -117.949219, 25.958045 ], [ -116.982422, 70.988349 ], [ -98.964844, 82.994132 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.984375, 82.994132 ], [ 135.000000, 79.997168 ], [ -87.978516, 79.997168 ], [ -119.003906, 70.988349 ], [ -111.972656, -75.004940 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 160.048828, -81.996942 ], [ -111.005859, -81.996942 ], [ -138.955078, -75.994839 ], [ -138.955078, 73.995328 ], [ -100.986328, 82.994132 ], [ 108.984375, 82.994132 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.984375, 82.994132 ], [ 135.000000, 79.997168 ], [ -87.978516, 79.997168 ], [ -119.003906, 70.988349 ], [ -118.740234, 68.236823 ], [ -138.955078, 73.995328 ], [ -100.986328, 82.994132 ], [ 108.984375, 82.994132 ] ] ] } } ] } ] } , diff --git a/tests/curve/out/-z2_--no-clipping.json b/tests/curve/out/-z2_--no-clipping.json index efe45048..f01d34b5 100644 --- a/tests/curve/out/-z2_--no-clipping.json +++ b/tests/curve/out/-z2_--no-clipping.json @@ -16,7 +16,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -98.964844, 82.994132 ], [ -82.001953, 81.996942 ], [ -105.996094, 69.990535 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -27.949219, -72.996909 ], [ 90.000000, -73.995328 ], [ 145.019531, -73.995328 ], [ 145.019531, -76.999935 ], [ 92.988281, -79.004962 ], [ -32.958984, -76.999935 ], [ -74.970703, -66.018018 ], [ -97.031250, -37.996163 ], [ -117.949219, 25.958045 ], [ -116.982422, 70.988349 ], [ -98.964844, 82.994132 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.984375, 82.994132 ], [ 135.000000, 79.997168 ], [ -87.978516, 79.997168 ], [ -119.003906, 70.988349 ], [ -111.972656, -75.004940 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 160.048828, -81.996942 ], [ -111.005859, -81.996942 ], [ -138.955078, -75.994839 ], [ -138.955078, 73.995328 ], [ -100.986328, 82.994132 ], [ 108.984375, 82.994132 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.984375, 82.994132 ], [ 135.000000, 79.997168 ], [ -87.978516, 79.997168 ], [ -119.003906, 70.988349 ], [ -118.740234, 68.236823 ], [ -138.955078, 73.995328 ], [ -100.986328, 82.994132 ], [ 108.984375, 82.994132 ] ] ] } } ] } ] } , @@ -24,7 +24,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 82.003058 ], [ -105.996094, 70.005567 ], [ -103.007812, 32.026706 ], [ -82.001953, -33.027088 ], [ -62.973633, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.007440 ], [ 145.019531, -74.007440 ], [ 145.019531, -76.999935 ], [ 93.032227, -79.004962 ], [ -33.002930, -76.999935 ], [ -74.970703, -66.000150 ], [ -96.987305, -37.996163 ], [ -117.993164, 25.997550 ], [ -116.982422, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.028320, 82.999490 ], [ 135.000000, 80.004799 ], [ -87.978516, 80.004799 ], [ -119.003906, 71.002660 ], [ -111.972656, -75.004940 ], [ -91.977539, -76.999935 ], [ 170.024414, -80.004799 ], [ 160.004883, -82.003058 ], [ -111.005859, -82.003058 ], [ -138.999023, -76.005470 ], [ -138.999023, 74.007440 ], [ -100.986328, 82.999490 ], [ 109.028320, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.028320, 82.999490 ], [ 135.000000, 80.004799 ], [ -87.978516, 80.004799 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.253111 ], [ -138.999023, 74.007440 ], [ -100.986328, 82.999490 ], [ 109.028320, 82.999490 ] ] ] } } ] } ] } , @@ -32,7 +32,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 81.996942 ], [ -105.996094, 69.990535 ], [ -103.007812, 31.989442 ], [ -82.001953, -33.027088 ], [ -62.973633, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.007440 ], [ 145.019531, -74.007440 ], [ 145.019531, -76.999935 ], [ 93.032227, -79.004962 ], [ -33.002930, -76.999935 ], [ -74.970703, -66.000150 ], [ -96.987305, -37.996163 ], [ -117.993164, 25.997550 ], [ -116.982422, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.028320, 82.999490 ], [ 135.000000, 79.997168 ], [ -87.978516, 79.997168 ], [ -119.003906, 71.002660 ], [ -111.972656, -75.004940 ], [ -91.977539, -76.999935 ], [ 170.024414, -80.004799 ], [ 160.004883, -82.003058 ], [ -111.005859, -82.003058 ], [ -138.999023, -76.005470 ], [ -138.999023, 73.995328 ], [ -100.986328, 82.999490 ], [ 109.028320, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.028320, 82.999490 ], [ 135.000000, 79.997168 ], [ -87.978516, 79.997168 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.236823 ], [ -138.999023, 73.995328 ], [ -100.986328, 82.999490 ], [ 109.028320, 82.999490 ] ] ] } } ] } ] } , @@ -40,19 +40,19 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 82.003058 ], [ -105.996094, 70.005567 ], [ -103.007812, 32.026706 ], [ -82.001953, -33.027088 ], [ -63.017578, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.007440 ], [ 145.019531, -74.007440 ], [ 145.019531, -76.999935 ], [ 93.032227, -79.004962 ], [ -33.002930, -76.999935 ], [ -75.014648, -66.000150 ], [ -97.031250, -37.996163 ], [ -117.993164, 25.997550 ], [ -117.026367, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.028320, 82.999490 ], [ 135.000000, 80.004799 ], [ -88.022461, 80.004799 ], [ -119.003906, 71.002660 ], [ -112.016602, -75.004940 ], [ -92.021484, -76.999935 ], [ 170.024414, -80.004799 ], [ 160.004883, -82.003058 ], [ -111.005859, -82.003058 ], [ -138.999023, -76.005470 ], [ -138.999023, 74.007440 ], [ -101.030273, 82.999490 ], [ 109.028320, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.028320, 82.999490 ], [ 135.000000, 80.004799 ], [ -88.022461, 80.004799 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.253111 ], [ -138.999023, 74.007440 ], [ -101.030273, 82.999490 ], [ 109.028320, 82.999490 ] ] ] } } ] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 0 }, "features": [ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.028320, 82.999490 ], [ 135.000000, 79.997168 ], [ -88.022461, 79.997168 ], [ -119.003906, 71.002660 ], [ -112.016602, -75.004940 ], [ -92.021484, -76.999935 ], [ 170.024414, -80.004799 ], [ 160.004883, -82.003058 ], [ -111.005859, -82.003058 ], [ -138.999023, -76.005470 ], [ -138.999023, 73.995328 ], [ -101.030273, 82.999490 ], [ 109.028320, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.028320, 82.999490 ], [ 135.000000, 79.997168 ], [ -88.022461, 79.997168 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.236823 ], [ -138.999023, 73.995328 ], [ -101.030273, 82.999490 ], [ 109.028320, 82.999490 ] ] ] } } ] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 3 }, "features": [ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } , @@ -60,7 +60,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 82.000000 ], [ -105.996094, 69.998052 ], [ -103.007812, 32.008076 ], [ -82.001953, -33.008663 ], [ -62.995605, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.001385 ], [ 144.997559, -74.001385 ], [ 144.997559, -76.999935 ], [ 93.010254, -79.000771 ], [ -33.002930, -76.999935 ], [ -74.992676, -66.000150 ], [ -97.009277, -37.996163 ], [ -117.993164, 25.997550 ], [ -117.004395, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } , @@ -68,7 +68,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 82.000000 ], [ -105.996094, 69.998052 ], [ -103.007812, 32.008076 ], [ -82.001953, -33.008663 ], [ -62.995605, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.001385 ], [ 144.997559, -74.001385 ], [ 144.997559, -76.999935 ], [ 93.010254, -79.000771 ], [ -33.002930, -76.999935 ], [ -74.992676, -66.000150 ], [ -97.009277, -37.996163 ], [ -117.993164, 25.997550 ], [ -117.004395, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } , @@ -76,7 +76,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 82.000000 ], [ -105.996094, 69.998052 ], [ -103.007812, 32.008076 ], [ -82.001953, -33.008663 ], [ -62.995605, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.001385 ], [ 144.997559, -74.001385 ], [ 144.997559, -76.999935 ], [ 93.010254, -79.000771 ], [ -33.002930, -76.999935 ], [ -74.992676, -66.000150 ], [ -97.009277, -37.996163 ], [ -117.993164, 25.997550 ], [ -117.004395, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } , @@ -84,7 +84,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 82.000000 ], [ -105.996094, 69.998052 ], [ -103.007812, 32.008076 ], [ -82.001953, -33.008663 ], [ -62.995605, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.001385 ], [ 144.997559, -74.001385 ], [ 144.997559, -76.999935 ], [ 93.010254, -79.000771 ], [ -33.002930, -76.999935 ], [ -74.992676, -66.000150 ], [ -97.009277, -37.996163 ], [ -117.993164, 25.997550 ], [ -117.004395, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } , @@ -98,7 +98,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 82.000000 ], [ -105.996094, 69.998052 ], [ -103.007812, 32.008076 ], [ -82.001953, -33.008663 ], [ -62.995605, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.001385 ], [ 144.997559, -74.001385 ], [ 144.997559, -76.999935 ], [ 93.010254, -79.000771 ], [ -33.002930, -76.999935 ], [ -74.992676, -66.000150 ], [ -97.009277, -37.996163 ], [ -117.993164, 25.997550 ], [ -117.004395, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } , @@ -106,13 +106,13 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 82.000000 ], [ -105.996094, 69.998052 ], [ -103.007812, 32.008076 ], [ -82.001953, -33.008663 ], [ -62.995605, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.001385 ], [ 144.997559, -74.001385 ], [ 144.997559, -76.999935 ], [ 93.010254, -79.000771 ], [ -33.002930, -76.999935 ], [ -74.992676, -66.000150 ], [ -97.009277, -37.996163 ], [ -117.993164, 25.997550 ], [ -117.004395, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 2, "x": 2, "y": 0 }, "features": [ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } , @@ -120,13 +120,13 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 82.000000 ], [ -105.996094, 69.998052 ], [ -103.007812, 32.008076 ], [ -82.001953, -33.008663 ], [ -62.995605, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.001385 ], [ 144.997559, -74.001385 ], [ 144.997559, -76.999935 ], [ 93.010254, -79.000771 ], [ -33.002930, -76.999935 ], [ -74.992676, -66.000150 ], [ -97.009277, -37.996163 ], [ -117.993164, 25.997550 ], [ -117.004395, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 2, "x": 3, "y": 0 }, "features": [ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } ] } diff --git a/tests/curve/out/-z2_--no-duplication.json b/tests/curve/out/-z2_--no-duplication.json index 13ef3f5e..f9dc84a7 100644 --- a/tests/curve/out/-z2_--no-duplication.json +++ b/tests/curve/out/-z2_--no-duplication.json @@ -16,7 +16,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -98.964844, 82.994132 ], [ -82.001953, 81.996942 ], [ -105.996094, 69.990535 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -27.949219, -72.996909 ], [ 90.000000, -73.995328 ], [ 145.019531, -73.995328 ], [ 145.019531, -76.999935 ], [ 92.988281, -79.004962 ], [ -32.958984, -76.999935 ], [ -74.970703, -66.018018 ], [ -97.031250, -37.996163 ], [ -117.949219, 25.958045 ], [ -116.982422, 70.988349 ], [ -98.964844, 82.994132 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.984375, 82.994132 ], [ 135.000000, 79.997168 ], [ -87.978516, 79.997168 ], [ -119.003906, 70.988349 ], [ -111.972656, -75.004940 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 160.048828, -81.996942 ], [ -111.005859, -81.996942 ], [ -138.955078, -75.994839 ], [ -138.955078, 73.995328 ], [ -100.986328, 82.994132 ], [ 108.984375, 82.994132 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.984375, 82.994132 ], [ 135.000000, 79.997168 ], [ -87.978516, 79.997168 ], [ -119.003906, 70.988349 ], [ -118.740234, 68.236823 ], [ -138.955078, 73.995328 ], [ -100.986328, 82.994132 ], [ 108.984375, 82.994132 ] ] ] } } ] } ] } , @@ -24,7 +24,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 81.996942 ], [ -105.996094, 69.990535 ], [ -103.007812, 31.989442 ], [ -82.001953, -33.027088 ], [ -63.017578, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.007440 ], [ 145.019531, -74.007440 ], [ 145.019531, -76.999935 ], [ 93.032227, -79.004962 ], [ -33.002930, -76.999935 ], [ -75.014648, -66.000150 ], [ -97.031250, -37.996163 ], [ -117.993164, 25.997550 ], [ -117.026367, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.028320, 82.999490 ], [ 135.000000, 79.997168 ], [ -88.022461, 79.997168 ], [ -119.003906, 71.002660 ], [ -112.016602, -75.004940 ], [ -92.021484, -76.999935 ], [ 170.024414, -80.004799 ], [ 160.004883, -82.003058 ], [ -111.005859, -82.003058 ], [ -138.999023, -76.005470 ], [ -138.999023, 73.995328 ], [ -101.030273, 82.999490 ], [ 109.028320, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.028320, 82.999490 ], [ 135.000000, 79.997168 ], [ -88.022461, 79.997168 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.236823 ], [ -138.999023, 73.995328 ], [ -101.030273, 82.999490 ], [ 109.028320, 82.999490 ] ] ] } } ] } ] } , @@ -32,7 +32,7 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 82.999490 ], [ -82.001953, 82.000000 ], [ -105.996094, 69.998052 ], [ -103.007812, 32.008076 ], [ -82.001953, -33.008663 ], [ -62.995605, -62.995158 ], [ -27.993164, -72.996909 ], [ 90.000000, -74.001385 ], [ 144.997559, -74.001385 ], [ 144.997559, -76.999935 ], [ 93.010254, -79.000771 ], [ -33.002930, -76.999935 ], [ -74.992676, -66.000150 ], [ -97.009277, -37.996163 ], [ -117.993164, 25.997550 ], [ -117.004395, 71.002660 ], [ -99.008789, 82.999490 ] ] ] } } , -{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -111.994629, -74.999254 ], [ -91.999512, -76.999935 ], [ 170.002441, -80.000984 ], [ 160.004883, -82.000000 ], [ -111.005859, -82.000000 ], [ -138.999023, -76.000156 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.006348, 82.999490 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -118.740234, 68.244968 ], [ -138.999023, 74.001385 ], [ -101.008301, 82.999490 ], [ 109.006348, 82.999490 ] ] ] } } ] } ] } ] }