mirror of
https://github.com/felt/tippecanoe.git
synced 2026-11-28 11:21:19 +01:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
459aef1120 | ||
|
|
d891ca7289 | ||
|
|
bc3ef87c3f |
@@ -1,3 +1,15 @@
|
||||
# 2.59.0
|
||||
|
||||
* Correct `antimeridian_adjusted_bounds` latitude calculation when vertices extend beyond the edge of the Mercator plane
|
||||
|
||||
# 2.58.0
|
||||
|
||||
* Add --generate-variable-depth-tile-pyramid option
|
||||
* Add --line-simplification and --tiny-polygon-size options to tippecanoe-overzoom
|
||||
* Adjust tile feature limit for --retain-points-multiplier
|
||||
* Tune convergence rate for --coalesce-densest and --drop-densest
|
||||
* Fix overreported drop and coalesce counts in strategies
|
||||
|
||||
# 2.57.0
|
||||
|
||||
* Add multi-tile input to tippecanoe-overzoom
|
||||
|
||||
@@ -352,7 +352,7 @@ Parallel processing will also be automatic if the input file is in FlatGeobuf fo
|
||||
specified maximum zoom and to any levels added beyond that.
|
||||
* `--extend-zooms-if-still-dropping-maximum=`_count_: Increase the maxzoom if features are still being dropped at that zoom level
|
||||
by up to _count_ zoom levels.
|
||||
* `-at` or `--truncate-zooms`: Don't produce child tiles for any tile that should be sufficient to be overzoomed to any higher zoom level. Such tiles will be produced with maximum detail and no simplification. Tiles with point features below the basezoom or where any features have to be dropped dynamically, or which contain too many features or bytes with full detail, will be written out with normal detail and split into child tiles.
|
||||
* `-at` or `--generate-variable-depth-tile-pyramid`: Don't produce child tiles for any tile that should be sufficient to be overzoomed to any higher zoom level. Such tiles will be produced with maximum detail and no simplification or polygon cleaning. Tiles with point features below the basezoom or where any features have to be dropped dynamically, or which contain too many features or bytes with full detail, will be written out with normal detail and split into child tiles. Tilesets generated with this option are suitable for use only with tile servers that will find the appropriate tile to overzoom from and will simplify and clean the geometries appropriately before serving the tile.
|
||||
* `-R` _zoom_`/`_x_`/`_y_ or `--one-tile=`_zoom_`/`_x_`/`_y_: Set the minzoom and maxzoom to _zoom_ and produce only
|
||||
the single specified tile at that zoom level.
|
||||
|
||||
|
||||
@@ -3067,7 +3067,7 @@ int main(int argc, char **argv) {
|
||||
{"smallest-maximum-zoom-guess", required_argument, 0, '~'},
|
||||
{"extend-zooms-if-still-dropping", no_argument, &additional[A_EXTEND_ZOOMS], 1},
|
||||
{"extend-zooms-if-still-dropping-maximum", required_argument, 0, '~'},
|
||||
{"truncate-zooms", no_argument, &additional[A_TRUNCATE_ZOOMS], 1},
|
||||
{"generate-variable-depth-tile-pyramid", no_argument, &additional[A_VARIABLE_DEPTH_PYRAMID], 1},
|
||||
{"one-tile", required_argument, 0, 'R'},
|
||||
|
||||
{"Tile resolution", 0, 0, 0},
|
||||
@@ -3113,9 +3113,11 @@ int main(int argc, char **argv) {
|
||||
{"drop-densest-as-needed", no_argument, &additional[A_DROP_DENSEST_AS_NEEDED], 1},
|
||||
{"drop-fraction-as-needed", no_argument, &additional[A_DROP_FRACTION_AS_NEEDED], 1},
|
||||
{"drop-smallest-as-needed", no_argument, &additional[A_DROP_SMALLEST_AS_NEEDED], 1},
|
||||
{"drop-sparsest-as-needed", no_argument, &additional[A_DROP_SPARSEST_AS_NEEDED], 1},
|
||||
{"coalesce-densest-as-needed", no_argument, &additional[A_COALESCE_DENSEST_AS_NEEDED], 1},
|
||||
{"coalesce-fraction-as-needed", no_argument, &additional[A_COALESCE_FRACTION_AS_NEEDED], 1},
|
||||
{"coalesce-smallest-as-needed", no_argument, &additional[A_COALESCE_SMALLEST_AS_NEEDED], 1},
|
||||
{"coalesce-sparsest-as-needed", no_argument, &additional[A_COALESCE_SPARSEST_AS_NEEDED], 1},
|
||||
{"force-feature-limit", no_argument, &prevent[P_DYNAMIC_DROP], 1},
|
||||
{"cluster-densest-as-needed", no_argument, &additional[A_CLUSTER_DENSEST_AS_NEEDED], 1},
|
||||
|
||||
|
||||
+1
-1
@@ -416,7 +416,7 @@ specified maximum zoom and to any levels added beyond that.
|
||||
\fB\fC\-\-extend\-zooms\-if\-still\-dropping\-maximum=\fR\fIcount\fP: Increase the maxzoom if features are still being dropped at that zoom level
|
||||
by up to \fIcount\fP zoom levels.
|
||||
.IP \(bu 2
|
||||
\fB\fC\-at\fR or \fB\fC\-\-truncate\-zooms\fR: Don't produce child tiles for any tile that should be sufficient to be overzoomed to any higher zoom level. Such tiles will be produced with maximum detail and no simplification. Tiles with point features below the basezoom or where any features have to be dropped dynamically, or which contain too many features or bytes with full detail, will be written out with normal detail and split into child tiles.
|
||||
\fB\fC\-at\fR or \fB\fC\-\-generate\-variable\-depth\-tile\-pyramid\fR: Don't produce child tiles for any tile that should be sufficient to be overzoomed to any higher zoom level. Such tiles will be produced with maximum detail and no simplification or polygon cleaning. Tiles with point features below the basezoom or where any features have to be dropped dynamically, or which contain too many features or bytes with full detail, will be written out with normal detail and split into child tiles. Tilesets generated with this option are suitable for use only with tile servers that will find the appropriate tile to overzoom from and will simplify and clean the geometries appropriately before serving the tile.
|
||||
.IP \(bu 2
|
||||
\fB\fC\-R\fR \fIzoom\fP\fB\fC/\fR\fIx\fP\fB\fC/\fR\fIy\fP or \fB\fC\-\-one\-tile=\fR\fIzoom\fP\fB\fC/\fR\fIx\fP\fB\fC/\fR\fIy\fP: Set the minzoom and maxzoom to \fIzoom\fP and produce only
|
||||
the single specified tile at that zoom level.
|
||||
|
||||
@@ -444,6 +444,14 @@ std::string stringify_strategies(std::vector<strategy> const &strategies) {
|
||||
any = true;
|
||||
}
|
||||
|
||||
if (strategies[i].truncated_zooms > 0) {
|
||||
state.nospace = true;
|
||||
state.json_write_string("truncated_zooms");
|
||||
state.nospace = true;
|
||||
state.json_write_number(strategies[i].truncated_zooms);
|
||||
any = true;
|
||||
}
|
||||
|
||||
state.nospace = true;
|
||||
state.json_end_hash();
|
||||
}
|
||||
|
||||
+3
-1
@@ -14,9 +14,11 @@
|
||||
#define A_DROP_DENSEST_AS_NEEDED ((int) 's')
|
||||
#define A_DROP_FRACTION_AS_NEEDED ((int) 'd')
|
||||
#define A_DROP_SMALLEST_AS_NEEDED ((int) 'n')
|
||||
#define A_DROP_SPARSEST_AS_NEEDED ((int) 's' & 0x1F)
|
||||
#define A_COALESCE_DENSEST_AS_NEEDED ((int) 'S')
|
||||
#define A_COALESCE_SMALLEST_AS_NEEDED ((int) 'N')
|
||||
#define A_COALESCE_FRACTION_AS_NEEDED ((int) 'D')
|
||||
#define A_COALESCE_SPARSEST_AS_NEEDED ((int) 't' & 0x1F)
|
||||
#define A_GRID_LOW_ZOOMS ((int) 'L')
|
||||
#define A_DETECT_WRAPAROUND ((int) 'w')
|
||||
#define A_EXTEND_ZOOMS ((int) 'e')
|
||||
@@ -26,7 +28,7 @@
|
||||
#define A_HILBERT ((int) 'h')
|
||||
#define A_VISVALINGAM ((int) 'v')
|
||||
#define A_GENERATE_POLYGON_LABEL_POINTS ((int) 'P')
|
||||
#define A_TRUNCATE_ZOOMS ((int) 't')
|
||||
#define A_VARIABLE_DEPTH_PYRAMID ((int) 't')
|
||||
|
||||
#define P_SIMPLIFY ((int) 's')
|
||||
#define P_SIMPLIFY_LOW ((int) 'S')
|
||||
|
||||
+10
-5
@@ -423,12 +423,15 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
|
||||
|
||||
for (size_t i = 0; i < sf.geometry.size(); i++) {
|
||||
if (sf.geometry[i].op == VT_MOVETO || sf.geometry[i].op == VT_LINETO) {
|
||||
if (sf.geometry[i].y > 0 && sf.geometry[i].y < 0xFFFFFFFF) {
|
||||
// standard -180 to 180 world plane
|
||||
// standard -180 to 180 world plane
|
||||
//
|
||||
// mask X, since it wraps around
|
||||
// pin Y, since it doesn't
|
||||
|
||||
long long x = sf.geometry[i].x & 0xFFFFFFFF;
|
||||
long long y = sf.geometry[i].y & 0xFFFFFFFF;
|
||||
long long x = sf.geometry[i].x & 0xFFFFFFFF;
|
||||
long long y = std::max(std::min(sf.geometry[i].y, 0xFFFFFFFFLL), 0LL);
|
||||
|
||||
{
|
||||
r->file_bbox1[0] = std::min(r->file_bbox1[0], x);
|
||||
r->file_bbox1[1] = std::min(r->file_bbox1[1], y);
|
||||
r->file_bbox1[2] = std::max(r->file_bbox1[2], x);
|
||||
@@ -678,7 +681,7 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
|
||||
// keep old behavior, which loses one bit of precision at the bottom
|
||||
midx = (sf.bbox[0] / 2 + sf.bbox[2] / 2) & ((1LL << 32) - 1);
|
||||
midy = (sf.bbox[1] / 2 + sf.bbox[3] / 2) & ((1LL << 32) - 1);
|
||||
} else if ((additional[A_DROP_DENSEST_AS_NEEDED] || additional[A_COALESCE_DENSEST_AS_NEEDED]) && sf.t == VT_POLYGON) {
|
||||
} else if ((additional[A_DROP_DENSEST_AS_NEEDED] || additional[A_COALESCE_DENSEST_AS_NEEDED] || additional[A_DROP_SPARSEST_AS_NEEDED] || additional[A_COALESCE_SPARSEST_AS_NEEDED]) && sf.t == VT_POLYGON) {
|
||||
// This probably should really apply to all polygons,
|
||||
// but I hate to change the feature sequence in all the
|
||||
// test fixtures again
|
||||
@@ -722,6 +725,8 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
|
||||
|
||||
if (additional[A_DROP_DENSEST_AS_NEEDED] ||
|
||||
additional[A_COALESCE_DENSEST_AS_NEEDED] ||
|
||||
additional[A_DROP_SPARSEST_AS_NEEDED] ||
|
||||
additional[A_COALESCE_SPARSEST_AS_NEEDED] ||
|
||||
additional[A_CLUSTER_DENSEST_AS_NEEDED] ||
|
||||
additional[A_CALCULATE_FEATURE_DENSITY] ||
|
||||
additional[A_DROP_SMALLEST_AS_NEEDED] ||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "3.757458,-84.969764,359.744029,85.007238",
|
||||
"antimeridian_adjusted_bounds": "3.757458,-85.051129,359.744029,85.051129",
|
||||
"bounds": "-179.320808,-85.051129,177.449262,85.051129",
|
||||
"center": "-179.320808,-69.033211,14",
|
||||
"description": "tests/accumulate/out/--set-attribute_thecomma%3aNEWVALUE_--accumulate-attribute_thecomma%3acomma.json.check.mbtiles",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "3.757458,-84.969764,359.744029,85.007238",
|
||||
"antimeridian_adjusted_bounds": "3.757458,-85.051129,359.744029,85.051129",
|
||||
"bounds": "-179.320808,-85.051129,177.449262,85.051129",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/accumulate/out/-z0_--set-attribute_%7b%22num%22%3a5,%22str%22%3a%22abc%22}.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "3.757458,-84.969764,359.744029,85.007238",
|
||||
"antimeridian_adjusted_bounds": "3.757458,-85.051129,359.744029,85.051129",
|
||||
"bounds": "-179.320808,-85.051129,177.449262,85.051129",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/accumulate/out/-z0_--set-attribute_num%3a5_--set-attribute_str%3aabc.json.check.mbtiles",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "3.757458,-84.969764,359.744029,85.007238",
|
||||
"antimeridian_adjusted_bounds": "3.757458,-85.051129,359.744029,85.051129",
|
||||
"bounds": "-179.320808,-85.051129,177.449262,85.051129",
|
||||
"center": "-157.500000,20.489949,3",
|
||||
"description": "tests/accumulate/out/-z3_--accumulate-attribute_%7b%22thesum%22%3a%22sum%22,%22theproduct%22%3a%22product%22}.json.check.mbtiles",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "3.757458,-84.969764,359.744029,85.007238",
|
||||
"antimeridian_adjusted_bounds": "3.757458,-85.051129,359.744029,85.051129",
|
||||
"bounds": "-179.320808,-85.051129,177.449262,85.051129",
|
||||
"center": "112.500000,20.489949,3",
|
||||
"description": "tests/accumulate/out/-z3_-Ethesum%3asum_-Etheproduct%3aproduct_-Ethemax%3amax_-Ethemin%3amin_-Ethemean%3amean_-Etheconcat%3aconcat_-Ethecomma%3acomma_-r1_-K100.json.check.mbtiles",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "3.757458,-84.969764,359.744029,85.007238",
|
||||
"antimeridian_adjusted_bounds": "3.757458,-85.051129,359.744029,85.051129",
|
||||
"bounds": "-179.320808,-85.051129,177.449262,85.051129",
|
||||
"center": "-174.375000,-52.349536,5",
|
||||
"description": "tests/accumulate/out/-z5_-Ethesum%3asum_-Etheproduct%3aproduct_-Ethemax%3amax_-Ethemin%3amin_-Ethemean%3amean_-Etheconcat%3aconcat_-Ethecomma%3acomma.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023803,-85.040752,359.950215,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023803,-85.051129,359.950215,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "90.000000,42.525564,1",
|
||||
"description": "tests/coalesce-id/out/-z1_--coalesce_--reorder.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "-175.220564,-41.299988,179.216647,64.150024",
|
||||
"antimeridian_adjusted_bounds": "-175.220564,-41.299988,179.216647,85.051129",
|
||||
"bounds": "-180.000000,-41.299988,180.000000,85.051129",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/csv/out-null.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "-175.220564,-41.299988,179.216647,64.150024",
|
||||
"antimeridian_adjusted_bounds": "-175.220564,-41.299988,179.216647,85.051129",
|
||||
"bounds": "-180.000000,-41.299988,180.000000,85.051129",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/csv/out.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "180.000000,85.051129,-180.000000,-85.051129",
|
||||
"antimeridian_adjusted_bounds": "-135.232962,-85.051129,-135.232962,-85.051129",
|
||||
"bounds": "-135.232962,-85.051129,-135.232962,-85.051129",
|
||||
"center": "-135.232962,-85.051129,0",
|
||||
"description": "tests/invalid-polygon/out/-z0.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "180.000000,85.051129,-180.000000,-85.051129",
|
||||
"antimeridian_adjusted_bounds": "0.000000,-85.051129,0.000000,-85.051129",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,-85.051129",
|
||||
"center": "0.000000,-85.051129,0",
|
||||
"format": "pbf",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "45.000000,33.256630,2",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/--coalesce_-z2_-Ccat.json.check.mbtiles",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-B10_-z0_--retain-points-multiplier_10_-d8_-yNAME.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "16.875000,44.951199,5",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-R5%2f17%2f11.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "16.875000,44.951199,5",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--drop-densest-as-needed.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "16.875000,44.951199,5",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--drop-fraction-as-needed.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "16.875000,44.951199,5",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--drop-smallest-as-needed.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "16.875000,44.951199,5",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--force-feature-limit.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-110.039063,26.980829,-92.021484,51.998410",
|
||||
"center": "-92.021484,26.980829,0",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z0_--clip-bounding-box_-110,27,-92,52.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z0_--order-largest-first.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z0_--order-smallest-first.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z0_--tiny-polygon-size_100.json.check.mbtiles",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z0_--tiny-polygon-size_50_--order-largest-first.json.check.mbtiles",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z0_--tiny-polygon-size_50_--simplification_50.json.check.mbtiles",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "90.000000,42.525564,1",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z1_-yname_--no-simplification-of-shared-nodes.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "45.000000,33.256630,2",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z2_--convert-polygons-to-label-points.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "22.500000,20.489949,3",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z3_-ai.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "11.250000,48.378236,4",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "11.250000,48.378236,4",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_--drop-polygons.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "11.250000,48.378236,4",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_--grid-low-zooms_-D8.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "11.250000,48.378236,4",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_--no-tiny-polygon-reduction.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "11.250000,48.378236,4",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_-S4.json.check.mbtiles",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "11.250000,48.378236,4",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_-S4_--simplification-at-maximum-zoom_2.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "11.250000,48.378236,4",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_-S4_--visvalingam.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "-101.250000,70.266402,4",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_-pD.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "11.250000,48.378236,4",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z4_-yname_-pc.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "16.875000,44.951199,5",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-densest-as-needed.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "16.875000,44.951199,5",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-fraction-as-needed.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "16.875000,44.951199,5",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-smallest-as-needed.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "16.875000,44.951199,5",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--drop-smallest-as-needed.json.check.mbtiles",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.040752,359.950216,83.645130",
|
||||
"antimeridian_adjusted_bounds": "0.023802,-85.051129,359.950216,83.645130",
|
||||
"bounds": "-180.000000,-85.051129,180.000000,83.645130",
|
||||
"center": "0.000000,0.000000,0",
|
||||
"description": "tests/ne_110m_admin_0_countries/out/-zg_-yname.json.check.mbtiles",
|
||||
|
||||
+4
-3
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "180.000000,85.051129,-180.000000,-85.051129",
|
||||
"antimeridian_adjusted_bounds": "0.000000,85.051129,0.000000,85.051129",
|
||||
"bounds": "-180.000000,85.051129,180.000000,85.051129",
|
||||
"center": "-179.989014,85.051129,14",
|
||||
"description": "tests/raw-tiles/nothing",
|
||||
|
||||
+4
-4
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "-180.000000,12.583700,179.688000,85.027900",
|
||||
"antimeridian_adjusted_bounds": "-180.000000,12.583700,179.688000,85.051129",
|
||||
"bounds": "-180.000000,12.583700,180.000000,85.051129",
|
||||
"center": "0.000000,12.583700,0",
|
||||
"description": "tests/wraparound2/out/-z0_--detect-longitude-wraparound.json.check.mbtiles",
|
||||
|
||||
@@ -877,6 +877,8 @@ void handle_strategies(const unsigned char *s, std::vector<strategy> *st) {
|
||||
(*st)[i].dropped_as_needed += v->value.number.number;
|
||||
} else if (strcmp(k->value.string.string, "coalesced_as_needed") == 0) {
|
||||
(*st)[i].coalesced_as_needed += v->value.number.number;
|
||||
} else if (strcmp(k->value.string.string, "truncated_zooms") == 0) {
|
||||
(*st)[i].truncated_zooms += v->value.number.number;
|
||||
} else if (strcmp(k->value.string.string, "detail_reduced") == 0) {
|
||||
(*st)[i].detail_reduced += v->value.number.number;
|
||||
} else if (strcmp(k->value.string.string, "tiny_polygons") == 0) {
|
||||
|
||||
@@ -772,6 +772,17 @@ static unsigned long long choose_mingap(std::vector<unsigned long long> &gaps, d
|
||||
return gaps[ix];
|
||||
}
|
||||
|
||||
static unsigned long long choose_maxgap(std::vector<unsigned long long> &gaps, double f, unsigned long long existing_gap) {
|
||||
std::stable_sort(gaps.begin(), gaps.end());
|
||||
|
||||
size_t ix = (gaps.size() - 1) * f;
|
||||
while (ix > 0 && gaps[ix] == existing_gap) {
|
||||
ix--;
|
||||
}
|
||||
|
||||
return gaps[ix];
|
||||
}
|
||||
|
||||
// This function is called to choose the new "extent" threshold to try when a tile exceeds the
|
||||
// tile size limit or feature limit and `--drop-smallest-as-needed` or `--coalesce-smallest-as-needed`
|
||||
// has been set.
|
||||
@@ -836,6 +847,11 @@ static unsigned long long calculate_drop_sequence(serial_feature const &sf) {
|
||||
|
||||
struct task {
|
||||
int fileno = 0;
|
||||
size_t todo;
|
||||
|
||||
bool operator<(const struct task &o) const {
|
||||
return todo < o.todo;
|
||||
}
|
||||
};
|
||||
|
||||
// This is the block of parameters that are passed to write_tile() to read a tile
|
||||
@@ -883,6 +899,8 @@ struct write_tile_args {
|
||||
size_t pass = 0;
|
||||
unsigned long long mingap = 0;
|
||||
unsigned long long mingap_out = 0;
|
||||
unsigned long long maxgap = 0;
|
||||
unsigned long long maxgap_out = 0;
|
||||
long long minextent = 0;
|
||||
long long minextent_out = 0;
|
||||
unsigned long long mindrop_sequence = 0;
|
||||
@@ -1542,9 +1560,10 @@ void skip_tile(decompressor *geoms, std::atomic<long long> *geompos_in, bool com
|
||||
}
|
||||
}
|
||||
|
||||
long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, char *global_stringpool, int z, const unsigned tx, const unsigned ty, const int detail, int min_detail, sqlite3 *outdb, const char *outdir, int buffer, const char *fname, compressor **geomfile, std::atomic<long long> *geompos, int minzoom, int maxzoom, double todo, std::atomic<long long> *along, long long alongminus, double gamma, int child_shards, long long *pool_off, unsigned *initial_x, unsigned *initial_y, std::atomic<int> *running, double simplification, std::vector<std::map<std::string, layermap_entry>> *layermaps, std::vector<std::vector<std::string>> *layer_unmaps, size_t tiling_seg, size_t pass, unsigned long long mingap, long long minextent, unsigned long long mindrop_sequence, const char *prefilter, const char *postfilter, json_object *filter, write_tile_args *arg, atomic_strategy *strategy_out, bool compressed_input, node *shared_nodes_map, size_t nodepos, std::string const &shared_nodes_bloom, std::vector<std::string> const &unidecode_data, long long estimated_complexity, std::set<zxy> &skip_children_out) {
|
||||
long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, char *global_stringpool, int z, const unsigned tx, const unsigned ty, const int detail, int min_detail, sqlite3 *outdb, const char *outdir, int buffer, const char *fname, compressor **geomfile, std::atomic<long long> *geompos, int minzoom, int maxzoom, double todo, std::atomic<long long> *along, long long alongminus, double gamma, int child_shards, long long *pool_off, unsigned *initial_x, unsigned *initial_y, std::atomic<int> *running, double simplification, std::vector<std::map<std::string, layermap_entry>> *layermaps, std::vector<std::vector<std::string>> *layer_unmaps, size_t tiling_seg, size_t pass, unsigned long long mingap, unsigned long long maxgap, long long minextent, unsigned long long mindrop_sequence, const char *prefilter, const char *postfilter, json_object *filter, write_tile_args *arg, atomic_strategy *strategy_out, bool compressed_input, node *shared_nodes_map, size_t nodepos, std::string const &shared_nodes_bloom, std::vector<std::string> const &unidecode_data, long long estimated_complexity, std::set<zxy> &skip_children_out) {
|
||||
double merge_fraction = 1;
|
||||
double mingap_fraction = 1;
|
||||
double maxgap_fraction = 1;
|
||||
double minextent_fraction = 1;
|
||||
double mindrop_sequence_fraction = 1;
|
||||
|
||||
@@ -1577,7 +1596,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
int first_detail = detail, second_detail = detail - 1;
|
||||
bool trying_to_stop_early = false;
|
||||
bool can_stop_early = true;
|
||||
if (additional[A_TRUNCATE_ZOOMS]) {
|
||||
if (additional[A_VARIABLE_DEPTH_PYRAMID]) {
|
||||
// If we are trying to stop early, there is an extra first pass with full+extra detail,
|
||||
// and which loops if everything doesn't fit rather than trying to drop or union features.
|
||||
|
||||
@@ -1859,9 +1878,9 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
can_stop_early = false;
|
||||
continue;
|
||||
}
|
||||
} else if (additional[A_DROP_DENSEST_AS_NEEDED]) {
|
||||
} else if (additional[A_DROP_DENSEST_AS_NEEDED] || additional[A_DROP_SPARSEST_AS_NEEDED]) {
|
||||
add_sample_to(gaps, sf.gap, gaps_increment, seq);
|
||||
if (sf.gap < mingap) {
|
||||
if (sf.gap < mingap || sf.gap > maxgap) {
|
||||
if (drop_feature_unless_it_can_be_added_to_a_multiplier_cluster(layer, sf, layer_unmaps, multiplier_seq, strategy, drop_rest, arg->attribute_accum)) {
|
||||
can_stop_early = false;
|
||||
continue;
|
||||
@@ -1890,9 +1909,9 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
drop_rest = true;
|
||||
continue;
|
||||
}
|
||||
} else if (additional[A_COALESCE_DENSEST_AS_NEEDED]) {
|
||||
} else if (additional[A_COALESCE_DENSEST_AS_NEEDED] || additional[A_COALESCE_SPARSEST_AS_NEEDED]) {
|
||||
add_sample_to(gaps, sf.gap, gaps_increment, seq);
|
||||
if (sf.gap < mingap && find_feature_to_accumulate_onto(features, sf, which_serial_feature, layer_unmaps, LLONG_MAX, multiplier_seq)) {
|
||||
if ((sf.gap < mingap || sf.gap > maxgap) && find_feature_to_accumulate_onto(features, sf, which_serial_feature, layer_unmaps, LLONG_MAX, multiplier_seq)) {
|
||||
coalesce_geometry(features[which_serial_feature], sf);
|
||||
features[which_serial_feature].coalesced = true;
|
||||
coalesced_area += sf.extent;
|
||||
@@ -2116,7 +2135,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
geomfile[j]->end(&geompos[j], fname);
|
||||
within[j] = false;
|
||||
|
||||
if (additional[A_TRUNCATE_ZOOMS]) {
|
||||
if (additional[A_VARIABLE_DEPTH_PYRAMID]) {
|
||||
fflush(geomfile[j]->fp);
|
||||
if (pwrite(fileno(geomfile[j]->fp), &estimated_complexity_out, sizeof(estimated_complexity_out), start_geompos[j]) != sizeof(estimated_complexity_out)) {
|
||||
perror("pwrite complexity");
|
||||
@@ -2524,6 +2543,21 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
line_detail++;
|
||||
continue;
|
||||
}
|
||||
} else if (maxgap > 0 && (additional[A_DROP_SPARSEST_AS_NEEDED] || additional[A_COALESCE_SPARSEST_AS_NEEDED])) {
|
||||
maxgap_fraction = maxgap_fraction * scaled_max_tile_features / totalsize * 0.80;
|
||||
unsigned long long m = choose_maxgap(gaps, maxgap_fraction, maxgap);
|
||||
if (m != maxgap) {
|
||||
maxgap = m;
|
||||
if (maxgap < arg->maxgap_out) {
|
||||
arg->maxgap_out = maxgap;
|
||||
arg->still_dropping = true;
|
||||
}
|
||||
if (!quiet) {
|
||||
fprintf(stderr, "Going to try keeping the densest %0.2f%% of the features to make it fit\n", maxgap_fraction * 100.0);
|
||||
}
|
||||
line_detail++;
|
||||
continue;
|
||||
}
|
||||
} else if (additional[A_DROP_SMALLEST_AS_NEEDED] || additional[A_COALESCE_SMALLEST_AS_NEEDED]) {
|
||||
minextent_fraction = minextent_fraction * scaled_max_tile_features / totalsize * 0.75;
|
||||
long long m = choose_minextent(extents, minextent_fraction, minextent);
|
||||
@@ -2636,6 +2670,21 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
line_detail++;
|
||||
continue;
|
||||
}
|
||||
} else if (maxgap > 0 && (additional[A_DROP_SPARSEST_AS_NEEDED] || additional[A_COALESCE_SPARSEST_AS_NEEDED])) {
|
||||
maxgap_fraction = maxgap_fraction * scaled_max_tile_size / (kept_adjust * compressed.size()) * 0.80;
|
||||
unsigned long long m = choose_maxgap(gaps, maxgap_fraction, maxgap);
|
||||
if (m != maxgap) {
|
||||
maxgap = m;
|
||||
if (maxgap < arg->maxgap_out) {
|
||||
arg->maxgap_out = maxgap;
|
||||
arg->still_dropping = true;
|
||||
}
|
||||
if (!quiet) {
|
||||
fprintf(stderr, "Going to try keeping the densest %0.2f%% of the features to make it fit\n", maxgap_fraction * 100.0);
|
||||
}
|
||||
line_detail++;
|
||||
continue;
|
||||
}
|
||||
} else if (additional[A_DROP_SMALLEST_AS_NEEDED] || additional[A_COALESCE_SMALLEST_AS_NEEDED]) {
|
||||
minextent_fraction = minextent_fraction * scaled_max_tile_size / (kept_adjust * compressed.size()) * 0.75;
|
||||
long long m = choose_minextent(extents, minextent_fraction, minextent);
|
||||
@@ -2692,6 +2741,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
// We succeeded in stopping early.
|
||||
// Prune the child tiles.
|
||||
|
||||
strategy.truncated_zooms++;
|
||||
skip_children_out.insert(zxy(z, tx, ty));
|
||||
}
|
||||
|
||||
@@ -2804,7 +2854,7 @@ exit(EXIT_IMPOSSIBLE);
|
||||
skip_tile(&dc, &geompos, arg->compressed);
|
||||
len = 1;
|
||||
} else {
|
||||
len = write_tile(&dc, &geompos, arg->global_stringpool, z, x, y, z == arg->maxzoom ? arg->full_detail : arg->low_detail, arg->min_detail, arg->outdb, arg->outdir, arg->buffer, arg->fname, arg->geomfile, arg->geompos, arg->minzoom, arg->maxzoom, arg->todo, arg->along, geompos, arg->gamma, arg->child_shards, arg->pool_off, arg->initial_x, arg->initial_y, arg->running, arg->simplification, arg->layermaps, arg->layer_unmaps, arg->tiling_seg, arg->pass, arg->mingap, arg->minextent, arg->mindrop_sequence, arg->prefilter, arg->postfilter, arg->filter, arg, arg->strategy, arg->compressed, arg->shared_nodes_map, arg->nodepos, *(arg->shared_nodes_bloom), (*arg->unidecode_data), estimated_complexity, arg->skip_children_out);
|
||||
len = write_tile(&dc, &geompos, arg->global_stringpool, z, x, y, z == arg->maxzoom ? arg->full_detail : arg->low_detail, arg->min_detail, arg->outdb, arg->outdir, arg->buffer, arg->fname, arg->geomfile, arg->geompos, arg->minzoom, arg->maxzoom, arg->todo, arg->along, geompos, arg->gamma, arg->child_shards, arg->pool_off, arg->initial_x, arg->initial_y, arg->running, arg->simplification, arg->layermaps, arg->layer_unmaps, arg->tiling_seg, arg->pass, arg->mingap, arg->maxgap, arg->minextent, arg->mindrop_sequence, arg->prefilter, arg->postfilter, arg->filter, arg, arg->strategy, arg->compressed, arg->shared_nodes_map, arg->nodepos, *(arg->shared_nodes_bloom), (*arg->unidecode_data), estimated_complexity, arg->skip_children_out);
|
||||
}
|
||||
|
||||
if (pthread_mutex_lock(&var_lock) != 0) {
|
||||
@@ -2971,13 +3021,17 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *global_stringpool, std::
|
||||
}
|
||||
|
||||
tasks[j].fileno = j;
|
||||
tasks[j].todo = geom_size[j];
|
||||
dispatch.push_back(&tasks[j]);
|
||||
}
|
||||
|
||||
std::sort(dispatch.begin(), dispatch.end());
|
||||
|
||||
int err = INT_MAX;
|
||||
|
||||
double zoom_gamma = gamma;
|
||||
unsigned long long zoom_mingap = 0;
|
||||
unsigned long long zoom_maxgap = ULLONG_MAX;
|
||||
long long zoom_minextent = 0;
|
||||
unsigned long long zoom_mindrop_sequence = 0;
|
||||
size_t zoom_tile_size = 0;
|
||||
@@ -3011,7 +3065,9 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *global_stringpool, std::
|
||||
args[thread].gamma = zoom_gamma;
|
||||
args[thread].gamma_out = zoom_gamma;
|
||||
args[thread].mingap = zoom_mingap;
|
||||
args[thread].maxgap = zoom_maxgap;
|
||||
args[thread].mingap_out = zoom_mingap;
|
||||
args[thread].maxgap_out = zoom_maxgap;
|
||||
args[thread].minextent = zoom_minextent;
|
||||
args[thread].minextent_out = zoom_minextent;
|
||||
args[thread].mindrop_sequence = zoom_mindrop_sequence;
|
||||
@@ -3094,6 +3150,10 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *global_stringpool, std::
|
||||
zoom_mingap = args[thread].mingap_out;
|
||||
again = true;
|
||||
}
|
||||
if (args[thread].maxgap_out < zoom_maxgap) {
|
||||
zoom_maxgap = args[thread].maxgap_out;
|
||||
again = true;
|
||||
}
|
||||
if (args[thread].minextent_out > zoom_minextent) {
|
||||
zoom_minextent = args[thread].minextent_out;
|
||||
again = true;
|
||||
@@ -3198,4 +3258,5 @@ void atomic_strategy::add_from(struct strategy const &src) {
|
||||
coalesced_as_needed += src.coalesced_as_needed;
|
||||
detail_reduced += src.detail_reduced;
|
||||
tiny_polygons += src.tiny_polygons;
|
||||
truncated_zooms += src.truncated_zooms;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ struct atomic_strategy {
|
||||
std::atomic<size_t> coalesced_as_needed;
|
||||
std::atomic<size_t> detail_reduced;
|
||||
std::atomic<size_t> tiny_polygons;
|
||||
std::atomic<size_t> truncated_zooms;
|
||||
|
||||
atomic_strategy()
|
||||
: dropped_by_rate(0),
|
||||
@@ -25,7 +26,8 @@ struct atomic_strategy {
|
||||
dropped_as_needed(0),
|
||||
coalesced_as_needed(0),
|
||||
detail_reduced(0),
|
||||
tiny_polygons(0) {
|
||||
tiny_polygons(0),
|
||||
truncated_zooms(0) {
|
||||
}
|
||||
|
||||
void add_from(struct strategy const &src);
|
||||
@@ -38,6 +40,7 @@ struct strategy {
|
||||
size_t coalesced_as_needed = 0;
|
||||
size_t detail_reduced = 0;
|
||||
size_t tiny_polygons = 0;
|
||||
size_t truncated_zooms = 0;
|
||||
|
||||
size_t tile_size = 0;
|
||||
size_t feature_count = 0;
|
||||
@@ -51,6 +54,7 @@ struct strategy {
|
||||
tile_size = ts;
|
||||
feature_count = fc;
|
||||
tiny_polygons = s.tiny_polygons;
|
||||
truncated_zooms = s.truncated_zooms;
|
||||
}
|
||||
|
||||
strategy() = default;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#ifndef VERSION_HPP
|
||||
#define VERSION_HPP
|
||||
|
||||
#define VERSION "v2.57.0"
|
||||
#define VERSION "v2.59.0"
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user