mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-03-25 05:15:16 +00:00
Merge branch 'master' into wagyu-initializer
This commit is contained in:
commit
60629da37a
@ -1,3 +1,7 @@
|
||||
## 1.30.6
|
||||
|
||||
* Take cluster distance into account when guessing a maxzoom
|
||||
|
||||
## 1.30.4
|
||||
|
||||
* Features within the z0 tile buffer of the antimeridian (not only
|
||||
|
2
Makefile
2
Makefile
@ -296,7 +296,7 @@ csv-test:
|
||||
cmp tests/csv/out-null.mbtiles.json.check tests/csv/out-null.mbtiles.json
|
||||
rm -f tests/csv/out-null.mbtiles.json.check tests/csv/out-null.mbtiles
|
||||
# Same, but specifying csv with -L format
|
||||
./tippecanoe -q -zg -f -o tests/csv/out.mbtiles -L'{"file":"", "format":"csv", "layer":"ne_110m_populated_places_simplecsv"}' < tests/csv/ne_110m_populated_places_simple.csv
|
||||
./tippecanoe -q -zg -f -o tests/csv/out.mbtiles -L'{"file":"", "format":"csv", "layer":"ne_110m_populated_places_simple"}' < tests/csv/ne_110m_populated_places_simple.csv
|
||||
./tippecanoe-decode -x generator tests/csv/out.mbtiles > tests/csv/out.mbtiles.json.check
|
||||
cmp tests/csv/out.mbtiles.json.check tests/csv/out.mbtiles.json
|
||||
rm -f tests/csv/out.mbtiles.json.check tests/csv/out.mbtiles
|
||||
|
@ -94,7 +94,7 @@ void handle(std::string message, int z, unsigned x, unsigned y, std::set<std::st
|
||||
fprintf(stderr, "Couldn't parse tile %d/%u/%u\n", z, x, y);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
} catch (protozero::unknown_pbf_wire_type_exception e) {
|
||||
} catch (std::exception const& e) {
|
||||
fprintf(stderr, "PBF decoding error in tile %d/%u/%u\n", z, x, y);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
15
main.cpp
15
main.cpp
@ -1268,6 +1268,7 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
|
||||
".geojson",
|
||||
".geobuf",
|
||||
".mbtiles",
|
||||
".csv",
|
||||
".gz",
|
||||
};
|
||||
|
||||
@ -1985,6 +1986,20 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
|
||||
if (!quiet) {
|
||||
fprintf(stderr, "Choosing a maxzoom of -z%d for features about %d feet (%d meters) apart\n", maxzoom, (int) ceil(dist_ft), (int) ceil(dist_ft / 3.28084));
|
||||
}
|
||||
|
||||
bool changed = false;
|
||||
while (maxzoom < 32 - full_detail && maxzoom < 33 - low_detail && cluster_distance > 0) {
|
||||
unsigned long long zoom_mingap = ((1LL << (32 - maxzoom)) / 256 * cluster_distance) * ((1LL << (32 - maxzoom)) / 256 * cluster_distance);
|
||||
if (avg > zoom_mingap) {
|
||||
break;
|
||||
}
|
||||
|
||||
maxzoom++;
|
||||
changed = true;
|
||||
}
|
||||
if (changed) {
|
||||
printf("Choosing a maxzoom of -z%d to keep most features distinct with cluster distance %d\n", maxzoom, cluster_distance);
|
||||
}
|
||||
}
|
||||
|
||||
if (dist_count != 0) {
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1154
tests/ne_110m_populated_places/out/-zg_-K20_-r1_-yNAME.json
Normal file
1154
tests/ne_110m_populated_places/out/-zg_-K20_-r1_-yNAME.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
#ifndef VERSION_HPP
|
||||
#define VERSION_HPP
|
||||
|
||||
#define VERSION "v1.30.4"
|
||||
#define VERSION "v1.30.6"
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user