mirror of
https://github.com/felt/tippecanoe.git
synced 2026-11-25 01:41:18 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d92a17193 | ||
|
|
e8ca6c6de3 | ||
|
|
02e3bac2c0 | ||
|
|
15a3e313ff | ||
|
|
d7bdbe363b | ||
|
|
d359461e61 | ||
|
|
2c56187530 | ||
|
|
e1c665b35d | ||
|
|
0ca14086a9 | ||
|
|
cc5c1c79df | ||
|
|
26bf08deb2 | ||
|
|
dcc3a11915 | ||
|
|
f7dc7faf31 |
@@ -1,3 +1,60 @@
|
||||
# 2.41.0
|
||||
|
||||
* Add Felt-style expression support for -j feature filters
|
||||
* Add --retain-points-multiplier option
|
||||
* Add tippecanoe_decisions metadata field to record basezoom, drop rate, and multiplier
|
||||
* Add multiplier thinning (-m) and feature filters (-j) to tippecanoe-overzoom
|
||||
|
||||
# 2.40.0
|
||||
|
||||
* Slightly reduce compression aggressiveness to improve as-needed dropping speed
|
||||
|
||||
# 2.39.0
|
||||
|
||||
* Reduce memory usage during tiling
|
||||
|
||||
# 2.38.0
|
||||
|
||||
* Tolerate polygon rings with insuffiently many points in input
|
||||
|
||||
# 2.37.1
|
||||
|
||||
* Reduce maximum memory used for vertex sorting
|
||||
|
||||
# 2.37.0
|
||||
|
||||
* Speed up tile-join overzooming and make it use less memory, by not including empty child tiles in the enumeration
|
||||
|
||||
# 2.36.0
|
||||
|
||||
* Make tile-join distrust the source tilesets' metadata maxzoom and minzoom
|
||||
* Add a special case in --detect-longitude-wraparound not to wrap around jumps of exactly 360°
|
||||
|
||||
# 2.35.0
|
||||
|
||||
* Fix a bug in --detect-longitude-wraparound when there are multiple rings
|
||||
|
||||
# 2.34.1
|
||||
|
||||
* Further improvements to tile-join speed
|
||||
|
||||
# 2.34.0
|
||||
|
||||
* Improve speed of overzooming in tile-join
|
||||
|
||||
# 2.33.0
|
||||
|
||||
* Further reduce memory usage of --no-simplification-of-shared-nodes by calculating the list of shared nodes globally using temporary files rather than in memory for each individual tile
|
||||
* Make --no-simplification-of-shared-nodes behave for LineStrings as it does for Polygons, preventing simplification only at crossings, convergences, and divergences, not at every point along collinear segments
|
||||
|
||||
# 2.32.1
|
||||
|
||||
* Reduce memory usage of --no-simplification-of-shared-nodes for polygons
|
||||
|
||||
# 2.32.0
|
||||
|
||||
* Extend --no-simplification-of-shared-nodes to also simplify shared polygon borders consistently
|
||||
|
||||
# 2.31.0
|
||||
|
||||
* Fix tile-join crash when trying to join empty tilesets
|
||||
|
||||
@@ -58,7 +58,7 @@ C = $(wildcard *.c) $(wildcard *.cpp)
|
||||
INCLUDES = -I/usr/local/include -I.
|
||||
LIBS = -L/usr/local/lib
|
||||
|
||||
tippecanoe: geojson.o jsonpull/jsonpull.o tile.o pool.o mbtiles.o geometry.o projection.o memfile.o mvt.o serial.o main.o text.o dirtiles.o pmtiles_file.o plugin.o read_json.o write_json.o geobuf.o flatgeobuf.o evaluator.o geocsv.o csv.o geojson-loop.o json_logger.o visvalingam.o compression.o clip.o
|
||||
tippecanoe: geojson.o jsonpull/jsonpull.o tile.o pool.o mbtiles.o geometry.o projection.o memfile.o mvt.o serial.o main.o text.o dirtiles.o pmtiles_file.o plugin.o read_json.o write_json.o geobuf.o flatgeobuf.o evaluator.o geocsv.o csv.o geojson-loop.o json_logger.o visvalingam.o compression.o clip.o sort.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||
|
||||
tippecanoe-enumerate: enumerate.o
|
||||
@@ -73,10 +73,10 @@ tile-join: tile-join.o projection.o mbtiles.o mvt.o memfile.o dirtiles.o jsonpul
|
||||
tippecanoe-json-tool: jsontool.o jsonpull/jsonpull.o csv.o text.o geojson-loop.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||
|
||||
unit: unit.o text.o
|
||||
unit: unit.o text.o sort.o mvt.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||
|
||||
tippecanoe-overzoom: overzoom.o mvt.o clip.o
|
||||
tippecanoe-overzoom: overzoom.o mvt.o clip.o evaluator.o jsonpull/jsonpull.o text.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||
|
||||
-include $(wildcard *.d)
|
||||
@@ -169,7 +169,7 @@ parallel-test: $(eval SHELL:=$(ADVSHELL))
|
||||
cmp tests/parallel/linear-file.json tests/parallel/parallel-pipes.json
|
||||
rm tests/parallel/*.mbtiles tests/parallel/*.json
|
||||
|
||||
raw-tiles-test:
|
||||
raw-tiles-test: tippecanoe tippecanoe-decode tile-join
|
||||
./tippecanoe -q -f -e tests/raw-tiles/raw-tiles -r1 -pC tests/raw-tiles/hackspots.geojson
|
||||
./tippecanoe-decode -x generator tests/raw-tiles/raw-tiles > tests/raw-tiles/raw-tiles.json.check
|
||||
cmp tests/raw-tiles/raw-tiles.json.check tests/raw-tiles/raw-tiles.json
|
||||
@@ -187,7 +187,7 @@ raw-tiles-test:
|
||||
cmp tests/raw-tiles/nothing.json.check tests/raw-tiles/nothing.json
|
||||
rm -r tests/raw-tiles/nothing tests/raw-tiles/nothing.json.check
|
||||
|
||||
pmtiles-test:
|
||||
pmtiles-test: tippecanoe tippecanoe-decode tile-join
|
||||
./tippecanoe -q -f -o tests/pmtiles/hackspots.pmtiles -r1 -pC tests/raw-tiles/hackspots.geojson
|
||||
./tippecanoe-decode -x generator tests/pmtiles/hackspots.pmtiles > tests/pmtiles/hackspots.json.check
|
||||
cmp tests/pmtiles/hackspots.json.check tests/pmtiles/hackspots.json
|
||||
@@ -224,7 +224,7 @@ pmtiles-test:
|
||||
cmp tests/raw-tiles/nothing.json.check tests/raw-tiles/nothing.json
|
||||
rm -r tests/raw-tiles/nothing.pmtiles tests/raw-tiles/nothing.json.check
|
||||
|
||||
decode-test:
|
||||
decode-test: tippecanoe tippecanoe-decode
|
||||
mkdir -p tests/muni/decode
|
||||
./tippecanoe -q -z11 -Z11 -f -o tests/muni/decode/multi.mbtiles tests/muni/*.json
|
||||
./tippecanoe-decode -x generator -l subway tests/muni/decode/multi.mbtiles > tests/muni/decode/multi.mbtiles.json.check
|
||||
@@ -241,7 +241,7 @@ decode-test:
|
||||
cmp tests/muni/decode/multi.mbtiles.stats.json.check tests/muni/decode/multi.mbtiles.stats.json
|
||||
rm -f tests/muni/decode/multi.mbtiles.json.check tests/muni/decode/multi.mbtiles tests/muni/decode/multi.mbtiles.pipeline.json.check tests/muni/decode/multi.mbtiles.stats.json.check tests/muni/decode/multi.mbtiles.onetile.json.check
|
||||
|
||||
decode-pmtiles-test:
|
||||
decode-pmtiles-test: tippecanoe tippecanoe-decode
|
||||
mkdir -p tests/muni/decode
|
||||
./tippecanoe -q -z11 -Z11 -f -o tests/muni/decode/multi.pmtiles tests/muni/*.json
|
||||
./tippecanoe-decode -x generator -l subway tests/muni/decode/multi.pmtiles | sed 's/pmtiles/mbtiles/g' > tests/muni/decode/multi.pmtiles.json.check
|
||||
@@ -258,7 +258,7 @@ decode-pmtiles-test:
|
||||
cmp tests/muni/decode/multi.pmtiles.stats.json.check tests/muni/decode/multi.mbtiles.stats.json
|
||||
rm -f tests/muni/decode/multi.pmtiles.json.check tests/muni/decode/multi.pmtiles tests/muni/decode/multi.pmtiles.pipeline.json.check tests/muni/decode/multi.pmtiles.stats.json.check tests/muni/decode/multi.pmtiles.onetile.json.check
|
||||
|
||||
pbf-test:
|
||||
pbf-test: tippecanoe-decode
|
||||
./tippecanoe-decode -x generator tests/pbf/11-328-791.vector.pbf 11 328 791 > tests/pbf/11-328-791.vector.pbf.out
|
||||
cmp tests/pbf/11-328-791.json tests/pbf/11-328-791.vector.pbf.out
|
||||
rm tests/pbf/11-328-791.vector.pbf.out
|
||||
@@ -266,7 +266,7 @@ pbf-test:
|
||||
cmp tests/pbf/11-328-791.3857.json tests/pbf/11-328-791.3857.vector.pbf.out
|
||||
rm tests/pbf/11-328-791.3857.vector.pbf.out
|
||||
|
||||
enumerate-test:
|
||||
enumerate-test: tippecanoe tippecanoe-enumerate
|
||||
./tippecanoe -q -z5 -f -o tests/ne_110m_admin_0_countries/out/enum.mbtiles tests/ne_110m_admin_0_countries/in.json.gz
|
||||
./tippecanoe-enumerate tests/ne_110m_admin_0_countries/out/enum.mbtiles > tests/ne_110m_admin_0_countries/out/enum.check
|
||||
cmp tests/ne_110m_admin_0_countries/out/enum.check tests/ne_110m_admin_0_countries/out/enum
|
||||
@@ -287,8 +287,39 @@ overzoom-test: tippecanoe-overzoom
|
||||
./tippecanoe-overzoom -o tests/pbf/14-2616-6331.pbf tests/pbf/11-327-791.pbf 11/327/791 14/2616/6331
|
||||
cmp tests/pbf/14-2616-6331.pbf /dev/null
|
||||
rm tests/pbf/14-2616-6331.pbf
|
||||
# Thinning
|
||||
# 243 features in the source tile tests/pbf/0-0-0-pop.pbf
|
||||
# 9 of them survive as the best of each cluster of 30
|
||||
# ./tippecanoe -z1 -r30 --retain-points-multiplier 30 -f -e out.dir tests/ne_110m_populated_places/in.json
|
||||
# cp out.dir/0/0/0.pbf tests/pbf/0-0-0-pop.pbf
|
||||
./tippecanoe-overzoom -y NAME -m -o tests/pbf/0-0-0-pop-filtered.pbf tests/pbf/0-0-0-pop.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-decode tests/pbf/0-0-0-pop-filtered.pbf 0 0 0 > tests/pbf/0-0-0-pop-filtered.pbf.json.check
|
||||
cmp tests/pbf/0-0-0-pop-filtered.pbf.json.check tests/pbf/0-0-0-pop-filtered.pbf.json
|
||||
rm tests/pbf/0-0-0-pop-filtered.pbf tests/pbf/0-0-0-pop-filtered.pbf.json.check
|
||||
# Filtering
|
||||
# 243 features in the source tile tests/pbf/0-0-0-pop.pbf
|
||||
# 27 of them match the filter and are retained
|
||||
./tippecanoe-overzoom -y NAME -j'{"*":["SCALERANK","eq",0]}' -o tests/pbf/0-0-0-pop-expr.pbf tests/pbf/0-0-0-pop.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-decode tests/pbf/0-0-0-pop-expr.pbf 0 0 0 > tests/pbf/0-0-0-pop-expr.pbf.json.check
|
||||
cmp tests/pbf/0-0-0-pop-expr.pbf.json.check tests/pbf/0-0-0-pop-expr.pbf.json
|
||||
rm tests/pbf/0-0-0-pop-expr.pbf tests/pbf/0-0-0-pop-expr.pbf.json.check
|
||||
# Filtering with multiplier
|
||||
# 243 features in the source tile tests/pbf/0-0-0-pop.pbf
|
||||
# 8 features survive into the output, from 9 clusters of 30
|
||||
./tippecanoe-overzoom -y NAME -y SCALERANK -j'{"*":["SCALERANK","eq",0]}' -m -o tests/pbf/0-0-0-filter-mult.pbf tests/pbf/0-0-0-pop.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-decode tests/pbf/0-0-0-filter-mult.pbf 0 0 0 > tests/pbf/0-0-0-filter-mult.pbf.json.check
|
||||
cmp tests/pbf/0-0-0-filter-mult.pbf.json.check tests/pbf/0-0-0-filter-mult.pbf.json
|
||||
rm tests/pbf/0-0-0-filter-mult.pbf tests/pbf/0-0-0-filter-mult.pbf.json.check
|
||||
# Test that overzooming with a multiplier exactly reverses the effect of tiling with a multiplier
|
||||
./tippecanoe -q -z5 --preserve-point-density-threshold 8 --retain-points-multiplier 3 -f -e tests/muni/out/out.dir tests/muni/muni.json
|
||||
./tippecanoe -q -z5 --preserve-point-density-threshold 8 -f -o tests/muni/out/out.mbtiles tests/muni/muni.json
|
||||
./tippecanoe-overzoom -m -o tests/muni/out/out.dir/000.pbf tests/muni/out/out.dir/0/0/0.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-decode tests/muni/out/out.mbtiles 0 0 0 > tests/muni/out/out.dir/direct.json
|
||||
./tippecanoe-decode tests/muni/out/out.dir/000.pbf 0 0 0 > tests/muni/out/out.dir/overzoomed.json
|
||||
cmp tests/muni/out/out.dir/overzoomed.json tests/muni/out/out.dir/direct.json
|
||||
rm -rf tests/muni/out/out.dir tests/muni/out/out.mbtiles tests/muni/out/out.dir/overzoomed.json tests/muni/out/out.dir/direct.json
|
||||
|
||||
join-test: tile-join
|
||||
join-test: tippecanoe tippecanoe-decode tile-join
|
||||
./tippecanoe -q -f -z12 -o tests/join-population/tabblock_06001420.mbtiles -YALAND10:'Land area' -L'{"file": "tests/join-population/tabblock_06001420.json", "description": "population"}'
|
||||
./tippecanoe -q -f -Z5 -z10 -o tests/join-population/macarthur.mbtiles -l macarthur tests/join-population/macarthur.json
|
||||
./tile-join -q -f -Z6 -z9 -o tests/join-population/macarthur-6-9.mbtiles tests/join-population/macarthur.mbtiles
|
||||
@@ -423,7 +454,7 @@ join-test: tile-join
|
||||
cmp tests/ne_110m_ocean/join/joined.mbtiles.json.check tests/ne_110m_ocean/join/joined.mbtiles.json
|
||||
rm -f tests/ne_110m_ocean/join/ocean.mbtiles tests/ne_110m_ocean/join/countries.mbtiles tests/ne_110m_ocean/join/joined.mbtiles tests/ne_110m_ocean/join/joined.mbtiles.json.check
|
||||
|
||||
join-filter-test:
|
||||
join-filter-test: tippecanoe tippecanoe-decode tile-join
|
||||
# Comes out different from the direct tippecanoe run because null attributes are lost
|
||||
./tippecanoe -q -z0 -f -o tests/feature-filter/out/all.mbtiles tests/feature-filter/in.json
|
||||
./tile-join -q -J tests/feature-filter/filter -f -o tests/feature-filter/out/filtered.mbtiles tests/feature-filter/out/all.mbtiles
|
||||
@@ -446,7 +477,7 @@ json-tool-test: tippecanoe-json-tool
|
||||
rm -f tests/join-population/tabblock_06001420.json.sort tests/join-population/tabblock_06001420.json.sort.joined
|
||||
rm -f tests/join-population/tabblock_06001420-null.json.sort.joined
|
||||
|
||||
allow-existing-test:
|
||||
allow-existing-test: tippecanoe
|
||||
# Make a tileset
|
||||
./tippecanoe -q -Z0 -z0 -f -o tests/allow-existing/both.mbtiles tests/coalesce-tract/tl_2010_06001_tract10.json
|
||||
# Writing to existing should fail
|
||||
@@ -475,7 +506,7 @@ allow-existing-test:
|
||||
if ./tippecanoe -q -Z10 -z11 -F -o tests/allow-existing/both.pmtiles tests/coalesce-tract/tl_2010_06001_tract10.json; then exit 1; else exit 0; fi
|
||||
rm -r tests/allow-existing/both.pmtiles tests/allow-existing/both.dir.json.check tests/allow-existing/both.dir tests/allow-existing/both.mbtiles.json.check tests/allow-existing/both.mbtiles
|
||||
|
||||
csv-test:
|
||||
csv-test: tippecanoe tippecanoe-decode
|
||||
# Reading from named CSV
|
||||
./tippecanoe -q -zg -f -o tests/csv/out.mbtiles tests/csv/ne_110m_populated_places_simple.csv
|
||||
./tippecanoe-decode -x generator -x generator_options tests/csv/out.mbtiles > tests/csv/out.mbtiles.json.check
|
||||
@@ -492,7 +523,7 @@ csv-test:
|
||||
cmp tests/csv/out.mbtiles.json.check tests/csv/out.mbtiles.json
|
||||
rm -f tests/csv/out.mbtiles.json.check tests/csv/out.mbtiles
|
||||
|
||||
layer-json-test:
|
||||
layer-json-test: tippecanoe tippecanoe-decode
|
||||
# GeoJSON with description and named layer
|
||||
./tippecanoe -q -z0 -r1 -yNAME -f -o tests/layer-json/out.mbtiles -L'{"file":"tests/ne_110m_populated_places/in.json", "description":"World cities", "layer":"places"}'
|
||||
./tippecanoe-decode -x generator -x generator_options tests/layer-json/out.mbtiles > tests/layer-json/out.mbtiles.json.check
|
||||
|
||||
@@ -421,7 +421,7 @@ be reduced to the maximum that can be used with the specified _maxzoom_.
|
||||
|
||||
### Filtering features by attributes
|
||||
|
||||
* `-j` *filter* or `--feature-filter`=*filter*: Check features against a per-layer filter (as defined in the [Mapbox GL Style Specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/#other-filter)) and only include those that match. Any features in layers that have no filter specified will be passed through. Filters for the layer `"*"` apply to all layers. The special variable `$zoom` refers to the current zoom level.
|
||||
* `-j` *filter* or `--feature-filter`=*filter*: Check features against a per-layer filter (as defined in the [Mapbox GL Style Specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/#other-filter) or in a Felt filter specification still to be finalized) and only include those that match. Any features in layers that have no filter specified will be passed through. Filters for the layer `"*"` apply to all layers. The special variable `$zoom` refers to the current zoom level.
|
||||
* `-J` *filter-file* or `--feature-filter-file`=*filter-file*: Like `-j`, but read the filter from a file.
|
||||
|
||||
Example: to find the Natural Earth countries with low `scalerank` but high `LABELRANK`:
|
||||
@@ -459,6 +459,7 @@ the same layer, enclose them in an `all` expression so they will all be evaluate
|
||||
If you use `-Bg`, it will guess a zoom level that will keep at most 50,000 features in the densest tile.
|
||||
You can also specify a marker-width with `-Bg`*width* to allow fewer features in the densest tile to
|
||||
compensate for the larger marker, or `-Bf`*number* to allow at most *number* features in the densest tile.
|
||||
* `--retain-points-multiplier=`_multiple_: Retain the specified multiple of points instead of just the number of points that would ordinarily be retained by the drop rate. These can be thinned out later with the `-m` option to `tippecanoe-overzoom`. The start of each cluster is marked in the feature sequence by the `tippecanoe:retain_points_multiplier_first` attribute.
|
||||
* `--drop-denser=`_percentage_: When dropping dots at zoom levels below the base zoom, give the specified _percentage_
|
||||
preference to retaining points in sparse areas and dropping points in dense areas.
|
||||
* `--limit-base-zoom-to-maximum-zoom` or `-Pb`: Limit the guessed base zoom not to exceed the maxzoom, even if this would put more than the requested number of features in a base zoom tile.
|
||||
@@ -492,7 +493,7 @@ the same layer, enclose them in an `all` expression so they will all be evaluate
|
||||
* `-ps` or `--no-line-simplification`: Don't simplify lines and polygons
|
||||
* `-pS` or `--simplify-only-low-zooms`: Don't simplify lines and polygons at maxzoom (but do simplify at lower zooms)
|
||||
* `--simplification-at-maximum-zoom=`_scale_: Use the specified _scale_ at maxzoom instead of the standard simplification scale (which still applies at lower zooms)
|
||||
* `-pn` or `--no-simplification-of-shared-nodes`: Don't simplify away nodes that appear in more than one feature or are used multiple times within the same feature, so that the intersection node will not be lost from intersecting roads. (This will not be effective if you also use `--coalesce`.) For polygons, the vertices where polygon rings meet will be detected, and the shared edges between the polygons will be simplified identically if possible. Use this instead of `--detect-shared-borders`.
|
||||
* `-pn` or `--no-simplification-of-shared-nodes`: Don't simplify away nodes at which LineStrings or Polygon rings converge, diverge, or cross. (This will not be effective if you also use `--coalesce`.) In between intersection nodes, LineString segments or polygon edges will be simplified identically in each feature if possible. Use this instead of `--detect-shared-borders`.
|
||||
* `-pt` or `--no-tiny-polygon-reduction`: Don't combine the area of very small polygons into small squares that represent their combined area.
|
||||
* `-pT` or `--no-tiny-polygon-reduction-at-maximum-zoom`: Combine the area of very small polygons into small squares that represent their combined area only at zoom levels below the maximum.
|
||||
* `--tiny-polygon-size=`_size_: Use the specified _size_ for tiny polygons instead of the default 2. Anything above 6 or so will lead to visible artifacts with the default tile detail.
|
||||
@@ -993,4 +994,6 @@ reads tile `inz/inx/iny` of `in.mvt.gz` and produces tile `outz/outx/outy` of `o
|
||||
* `-b` *buffer*: Set the tile buffer in the output tile (default 5)
|
||||
* `-d` *detail*: Set the detail of the output tile (default 12)
|
||||
* `-y` *attribute*: Retain the specified *attribute* in the output features. All attributes that are not named in a `-y` option will be removed.
|
||||
* `-j` *filter*: Filter features using the same expression syntax as in tippecanoe.
|
||||
* `-m`: If a tile was created with the `--retain-points-multiplier` option, thin the tile back down to its normal feature count during overzooming. The first feature from each cluster will be retained, unless `-j` is used to specify a filter, in which case the first matching filter from each cluster will be retained instead.
|
||||
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <mapbox/geometry/point.hpp>
|
||||
#include <mapbox/geometry/multi_polygon.hpp>
|
||||
#include <mapbox/geometry/wagyu/wagyu.hpp>
|
||||
#include <limits.h>
|
||||
#include "geometry.hpp"
|
||||
#include "errors.hpp"
|
||||
#include "compression.hpp"
|
||||
#include "mvt.hpp"
|
||||
#include "evaluator.hpp"
|
||||
|
||||
static std::vector<std::pair<double, double>> clip_poly1(std::vector<std::pair<double, double>> &geom,
|
||||
long long minx, long long miny, long long maxx, long long maxy,
|
||||
@@ -751,11 +754,13 @@ static std::vector<std::pair<double, double>> clip_poly1(std::vector<std::pair<d
|
||||
}
|
||||
|
||||
std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int ny,
|
||||
int detail, int buffer, std::set<std::string> const &keep) {
|
||||
mvt_tile tile, outtile;
|
||||
bool was_compressed;
|
||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
||||
bool demultiply, json_object *filter) {
|
||||
mvt_tile tile;
|
||||
|
||||
try {
|
||||
bool was_compressed;
|
||||
if (!tile.decode(s, was_compressed)) {
|
||||
fprintf(stderr, "Couldn't parse tile %d/%u/%u\n", oz, ox, oy);
|
||||
exit(EXIT_MVT);
|
||||
@@ -765,6 +770,51 @@ std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int
|
||||
exit(EXIT_PROTOBUF);
|
||||
}
|
||||
|
||||
return overzoom(tile, oz, ox, oy, nz, nx, ny, detail, buffer, keep, do_compress, next_overzoomed_tiles, demultiply, filter);
|
||||
}
|
||||
|
||||
struct tile_feature {
|
||||
drawvec geom;
|
||||
int t;
|
||||
bool has_id;
|
||||
unsigned long long id;
|
||||
std::vector<unsigned> tags;
|
||||
mvt_layer const *layer;
|
||||
};
|
||||
|
||||
void feature_out(tile_feature const &feature, mvt_layer &outlayer, std::set<std::string> const &keep) {
|
||||
// Add geometry to output feature
|
||||
|
||||
mvt_feature outfeature;
|
||||
outfeature.type = feature.t;
|
||||
for (auto const &g : feature.geom) {
|
||||
outfeature.geometry.emplace_back(g.op, g.x, g.y);
|
||||
}
|
||||
|
||||
// ID and attributes, if it didn't get clipped away
|
||||
|
||||
if (outfeature.geometry.size() > 0) {
|
||||
if (feature.has_id) {
|
||||
outfeature.has_id = true;
|
||||
outfeature.id = feature.id;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
|
||||
if (keep.size() == 0 || keep.find(feature.layer->keys[feature.tags[i]]) != keep.end()) {
|
||||
outlayer.tag(outfeature, feature.layer->keys[feature.tags[i]], feature.layer->values[feature.tags[i + 1]]);
|
||||
}
|
||||
}
|
||||
|
||||
outlayer.features.push_back(outfeature);
|
||||
}
|
||||
}
|
||||
|
||||
std::string overzoom(mvt_tile tile, int oz, int ox, int oy, int nz, int nx, int ny,
|
||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
||||
bool demultiply, json_object *filter) {
|
||||
mvt_tile outtile;
|
||||
|
||||
for (auto const &layer : tile.layers) {
|
||||
mvt_layer outlayer = mvt_layer();
|
||||
|
||||
@@ -777,8 +827,37 @@ std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int
|
||||
outlayer.version = layer.version;
|
||||
outlayer.extent = 1LL << det;
|
||||
|
||||
for (auto const &feature : layer.features) {
|
||||
mvt_feature outfeature;
|
||||
std::vector<tile_feature> pending_tile_features;
|
||||
|
||||
for (auto feature : layer.features) {
|
||||
bool flush_multiplier_cluster = false;
|
||||
if (demultiply) {
|
||||
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
|
||||
if (layer.keys[feature.tags[i]] == "tippecanoe:retain_points_multiplier_first") {
|
||||
mvt_value v = layer.values[feature.tags[i + 1]];
|
||||
if (v.type == mvt_bool && v.numeric_value.bool_value) {
|
||||
flush_multiplier_cluster = true;
|
||||
feature.tags.erase(feature.tags.begin() + i, feature.tags.begin() + i + 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
flush_multiplier_cluster = true;
|
||||
}
|
||||
|
||||
if (flush_multiplier_cluster) {
|
||||
if (pending_tile_features.size() > 0) {
|
||||
feature_out(pending_tile_features[0], outlayer, keep);
|
||||
pending_tile_features.clear();
|
||||
}
|
||||
}
|
||||
|
||||
std::set<std::string> exclude_attributes;
|
||||
if (!evaluate(feature, layer, filter, exclude_attributes, nz)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
drawvec geom;
|
||||
int t = feature.type;
|
||||
|
||||
@@ -813,6 +892,23 @@ std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int
|
||||
|
||||
// Clip to output tile
|
||||
|
||||
long long xmin = LLONG_MAX;
|
||||
long long ymin = LLONG_MAX;
|
||||
long long xmax = LLONG_MIN;
|
||||
long long ymax = LLONG_MIN;
|
||||
|
||||
for (auto const &g : geom) {
|
||||
xmin = std::min(xmin, g.x);
|
||||
ymin = std::min(ymin, g.y);
|
||||
xmax = std::max(xmax, g.x);
|
||||
ymax = std::max(ymax, g.y);
|
||||
}
|
||||
|
||||
long long b = outtilesize * buffer / 256;
|
||||
if (xmax < -b || ymax < -b || xmin > outtilesize + b || ymin > outtilesize + b) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (t == VT_LINE) {
|
||||
geom = clip_lines(geom, nz, buffer);
|
||||
} else if (t == VT_POLYGON) {
|
||||
@@ -834,29 +930,20 @@ std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int
|
||||
geom = close_poly(geom);
|
||||
}
|
||||
|
||||
// Add geometry to output feature
|
||||
tile_feature tf;
|
||||
tf.geom = geom;
|
||||
tf.t = t;
|
||||
tf.has_id = feature.has_id;
|
||||
tf.id = feature.id;
|
||||
tf.tags = feature.tags;
|
||||
tf.layer = &layer;
|
||||
|
||||
outfeature.type = t;
|
||||
for (auto const &g : geom) {
|
||||
outfeature.geometry.emplace_back(g.op, g.x, g.y);
|
||||
}
|
||||
pending_tile_features.push_back(tf);
|
||||
}
|
||||
|
||||
// ID and attributes, if it didn't get clipped away
|
||||
|
||||
if (outfeature.geometry.size() > 0) {
|
||||
if (feature.has_id) {
|
||||
outfeature.has_id = true;
|
||||
outfeature.id = feature.id;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
|
||||
if (keep.size() == 0 || keep.find(layer.keys[feature.tags[i]]) != keep.end()) {
|
||||
outlayer.tag(outfeature, layer.keys[feature.tags[i]], layer.values[feature.tags[i + 1]]);
|
||||
}
|
||||
}
|
||||
|
||||
outlayer.features.push_back(outfeature);
|
||||
}
|
||||
if (pending_tile_features.size() > 0) {
|
||||
feature_out(pending_tile_features[0], outlayer, keep);
|
||||
pending_tile_features.clear();
|
||||
}
|
||||
|
||||
if (outlayer.features.size() > 0) {
|
||||
@@ -864,10 +951,38 @@ std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int
|
||||
}
|
||||
}
|
||||
|
||||
if (next_overzoomed_tiles != NULL) {
|
||||
// will any child tiles have features in them?
|
||||
// find out recursively from the tile we just made.
|
||||
//
|
||||
// (yes, we should keep them instead of remaking them
|
||||
// later, but that first requires figuring out where to
|
||||
// keep them.)
|
||||
|
||||
if (outtile.layers.size() > 0) {
|
||||
for (size_t x = 0; x < 2; x++) {
|
||||
for (size_t y = 0; y < 2; y++) {
|
||||
std::string child = overzoom(outtile, nz, nx, ny,
|
||||
nz + 1, nx * 2 + x, ny * 2 + y,
|
||||
detail, buffer, keep, false, NULL,
|
||||
demultiply, filter);
|
||||
if (child.size() > 0) {
|
||||
next_overzoomed_tiles->emplace_back(nx * 2 + x, ny * 2 + y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (outtile.layers.size() > 0) {
|
||||
std::string pbf = outtile.encode();
|
||||
|
||||
std::string compressed;
|
||||
compress(pbf, compressed, true);
|
||||
if (do_compress) {
|
||||
compress(pbf, compressed, true);
|
||||
} else {
|
||||
compressed = pbf;
|
||||
}
|
||||
|
||||
return compressed;
|
||||
} else {
|
||||
|
||||
@@ -318,6 +318,9 @@ void dir_write_metadata(const char *outdir, const metadata &m) {
|
||||
if (m.strategies_json.size() > 0) {
|
||||
out(state, "strategies", m.strategies_json);
|
||||
}
|
||||
if (m.decisions_json.size() > 0) {
|
||||
out(state, "tippecanoe_decisions", m.decisions_json);
|
||||
}
|
||||
out(state, "format", m.format);
|
||||
out(state, "generator", m.generator);
|
||||
out(state, "generator_options", m.generator_options);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sys/stat.h>
|
||||
#include "mbtiles.hpp"
|
||||
|
||||
#ifndef DIRTILES_HPP
|
||||
#define DIRTILES_HPP
|
||||
|
||||
+351
-14
@@ -5,6 +5,123 @@
|
||||
#include "mvt.hpp"
|
||||
#include "evaluator.hpp"
|
||||
#include "errors.hpp"
|
||||
#include "milo/dtoa_milo.h"
|
||||
|
||||
static std::string mvt_value_to_string(mvt_value one, bool &fail) {
|
||||
if (one.type == mvt_string) {
|
||||
return one.string_value;
|
||||
} else if (one.type == mvt_float) {
|
||||
return milo::dtoa_milo(one.numeric_value.float_value);
|
||||
} else if (one.type == mvt_double) {
|
||||
return milo::dtoa_milo(one.numeric_value.double_value);
|
||||
} else if (one.type == mvt_int) {
|
||||
return std::to_string(one.numeric_value.int_value);
|
||||
} else if (one.type == mvt_uint) {
|
||||
return std::to_string(one.numeric_value.uint_value);
|
||||
} else if (one.type == mvt_sint) {
|
||||
return std::to_string(one.numeric_value.sint_value);
|
||||
} else if (one.type == mvt_bool) {
|
||||
return one.numeric_value.bool_value ? "true" : "false";
|
||||
} else if (one.type == mvt_null) {
|
||||
fail = true; // null op string => null
|
||||
return "";
|
||||
} else {
|
||||
fprintf(stderr, "unhandled mvt_type %d\n", one.type);
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
int compare_fsl(mvt_value one, json_object *two, bool &fail) {
|
||||
// In FSL expressions, the attribute value is coerced to the type
|
||||
// of the JSON literal value it is being compared to.
|
||||
//
|
||||
// If it cannot be converted, the comparison returns null
|
||||
// (which is distinct from true and false but is falsy if
|
||||
// it is the final output value).
|
||||
|
||||
if (two->type == JSON_NULL) {
|
||||
fail = true; // anything op null => null
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (two->type == JSON_NUMBER) {
|
||||
double lhs;
|
||||
|
||||
if (one.type == mvt_string) {
|
||||
char *endptr = NULL;
|
||||
const char *s = one.string_value.c_str();
|
||||
lhs = strtod(s, &endptr);
|
||||
if (endptr == s) {
|
||||
fail = true; // non-numeric-string op number => null
|
||||
return 0;
|
||||
}
|
||||
} else if (one.type == mvt_float) {
|
||||
lhs = one.numeric_value.float_value;
|
||||
} else if (one.type == mvt_double) {
|
||||
lhs = one.numeric_value.double_value;
|
||||
} else if (one.type == mvt_int) {
|
||||
lhs = one.numeric_value.int_value;
|
||||
} else if (one.type == mvt_uint) {
|
||||
lhs = one.numeric_value.uint_value;
|
||||
} else if (one.type == mvt_sint) {
|
||||
lhs = one.numeric_value.sint_value;
|
||||
} else if (one.type == mvt_bool) {
|
||||
lhs = one.numeric_value.bool_value;
|
||||
} else if (one.type == mvt_null) {
|
||||
fail = true; // null op number => null
|
||||
return 0;
|
||||
} else {
|
||||
fprintf(stderr, "unhandled mvt_type %d\n", one.type);
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
|
||||
if (lhs < two->value.number.number) {
|
||||
return -1;
|
||||
} else if (lhs > two->value.number.number) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (two->type == JSON_STRING) {
|
||||
std::string lhs = mvt_value_to_string(one, fail);
|
||||
|
||||
return strcmp(lhs.c_str(), two->value.string.string);
|
||||
}
|
||||
|
||||
if (two->type == JSON_TRUE || two->type == JSON_FALSE) {
|
||||
bool lhs;
|
||||
|
||||
if (one.type == mvt_string) {
|
||||
lhs = one.string_value.size() > 0;
|
||||
} else if (one.type == mvt_float) {
|
||||
lhs = one.numeric_value.float_value != 0;
|
||||
} else if (one.type == mvt_double) {
|
||||
lhs = one.numeric_value.double_value != 0;
|
||||
} else if (one.type == mvt_int) {
|
||||
lhs = one.numeric_value.int_value != 0;
|
||||
} else if (one.type == mvt_uint) {
|
||||
lhs = one.numeric_value.uint_value != 0;
|
||||
} else if (one.type == mvt_sint) {
|
||||
lhs = one.numeric_value.sint_value != 0;
|
||||
} else if (one.type == mvt_bool) {
|
||||
lhs = one.numeric_value.bool_value;
|
||||
} else if (one.type == mvt_null) {
|
||||
fail = true; // null op bool => null
|
||||
return 0;
|
||||
} else {
|
||||
fprintf(stderr, "unhandled mvt_type %d\n", one.type);
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
|
||||
bool rhs = two->type == JSON_TRUE;
|
||||
return lhs - rhs;
|
||||
}
|
||||
|
||||
fprintf(stderr, "unhandled JSON type %d\n", two->type);
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
|
||||
int compare(mvt_value one, json_object *two, bool &fail) {
|
||||
if (one.type == mvt_string) {
|
||||
@@ -70,7 +187,36 @@ int compare(mvt_value one, json_object *two, bool &fail) {
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
|
||||
bool eval(std::map<std::string, mvt_value> const &feature, json_object *f, std::set<std::string> &exclude_attributes) {
|
||||
// 0: false
|
||||
// 1: true
|
||||
// -1: incomparable (sql null), treated as false in final output
|
||||
static int eval(std::map<std::string, mvt_value> const &feature, json_object *f, std::set<std::string> &exclude_attributes) {
|
||||
if (f != NULL) {
|
||||
if (f->type == JSON_TRUE) {
|
||||
return 1;
|
||||
} else if (f->type == JSON_FALSE) {
|
||||
return 0;
|
||||
} else if (f->type == JSON_NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (f->type == JSON_NUMBER) {
|
||||
if (f->value.number.number == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (f->type == JSON_STRING) {
|
||||
if (f->value.string.string[0] == '\0') {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (f == NULL || f->type != JSON_ARRAY) {
|
||||
fprintf(stderr, "Filter is not an array: %s\n", json_stringify(f));
|
||||
exit(EXIT_FILTER);
|
||||
@@ -81,6 +227,149 @@ bool eval(std::map<std::string, mvt_value> const &feature, json_object *f, std::
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
// FSL conjunctions
|
||||
if (f->value.array.length == 3 &&
|
||||
f->value.array.array[1]->type == JSON_STRING &&
|
||||
(strcmp(f->value.array.array[1]->value.string.string, "or") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "and") == 0)) {
|
||||
int lhs;
|
||||
|
||||
if (f->value.array.array[0]->type == JSON_STRING) {
|
||||
// if LHS of a boolean conjunction is a string, it is an attribute reference
|
||||
auto ff = feature.find(std::string(f->value.array.array[0]->value.string.string));
|
||||
if (ff != feature.end()) {
|
||||
if (ff->second.type == mvt_bool) {
|
||||
lhs = ff->second.numeric_value.bool_value;
|
||||
} else {
|
||||
lhs = -1; // not boolean: null
|
||||
}
|
||||
} else {
|
||||
lhs = -1; // not found: null
|
||||
}
|
||||
} else {
|
||||
lhs = eval(feature, f->value.array.array[0], exclude_attributes);
|
||||
}
|
||||
|
||||
int rhs = eval(feature, f->value.array.array[2], exclude_attributes);
|
||||
if (lhs < 0 && rhs < 0) {
|
||||
return -1; // null op null => null
|
||||
}
|
||||
if (strcmp(f->value.array.array[1]->value.string.string, "or") == 0) {
|
||||
return (lhs > 0) || (rhs > 0);
|
||||
} else {
|
||||
return (lhs > 0) && (rhs > 0);
|
||||
}
|
||||
}
|
||||
|
||||
// FSL comparators
|
||||
if (f->value.array.length == 3 &&
|
||||
f->value.array.array[0]->type == JSON_STRING &&
|
||||
f->value.array.array[1]->type == JSON_STRING &&
|
||||
(strcmp(f->value.array.array[1]->value.string.string, "lt") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "gt") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "le") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "ge") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "eq") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "ne") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "cn") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "nc") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "in") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "ni") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "is") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "isnt") == 0 ||
|
||||
false)) {
|
||||
mvt_value lhs;
|
||||
lhs.type = mvt_null; // attributes that aren't found are nulls
|
||||
auto ff = feature.find(std::string(f->value.array.array[0]->value.string.string));
|
||||
if (ff != feature.end()) {
|
||||
lhs = ff->second;
|
||||
}
|
||||
|
||||
if (f->value.array.array[2]->type == JSON_NULL && strcmp(f->value.array.array[1]->value.string.string, "is") == 0) {
|
||||
return lhs.type == mvt_null; // null is null => true, anything is null => false
|
||||
}
|
||||
if (f->value.array.array[2]->type == JSON_NULL && strcmp(f->value.array.array[1]->value.string.string, "isnt") == 0) {
|
||||
return lhs.type != mvt_null; // null isnt null => false, anything isnt null => true
|
||||
}
|
||||
|
||||
if (lhs.type == mvt_null) {
|
||||
return -1; // null op anything => null
|
||||
}
|
||||
|
||||
bool fail = false;
|
||||
|
||||
if (f->value.array.array[2]->type == JSON_STRING &&
|
||||
(strcmp(f->value.array.array[1]->value.string.string, "cn") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "nc") == 0)) {
|
||||
std::string s = mvt_value_to_string(lhs, fail);
|
||||
if (fail) {
|
||||
return -1; // null cn anything => false
|
||||
}
|
||||
|
||||
bool contains = strstr(s.c_str(), f->value.array.array[2]->value.string.string);
|
||||
if (strcmp(f->value.array.array[1]->value.string.string, "cn") == 0) {
|
||||
return contains;
|
||||
} else {
|
||||
return !contains;
|
||||
}
|
||||
}
|
||||
|
||||
if (f->value.array.array[2]->type == JSON_ARRAY &&
|
||||
(strcmp(f->value.array.array[1]->value.string.string, "in") == 0 ||
|
||||
strcmp(f->value.array.array[1]->value.string.string, "ni") == 0)) {
|
||||
std::string s = mvt_value_to_string(lhs, fail);
|
||||
if (fail) {
|
||||
return -1; // null in anything => false
|
||||
}
|
||||
|
||||
bool contains = false;
|
||||
for (size_t i = 0; i < f->value.array.array[2]->value.array.length; i++) {
|
||||
if (f->value.array.array[2]->value.array.array[i]->type != JSON_STRING) {
|
||||
return -1; // anything in [not-a-string] => null
|
||||
}
|
||||
|
||||
if (s == f->value.array.array[2]->value.array.array[i]->value.string.string) {
|
||||
contains = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[1]->value.string.string, "in") == 0) {
|
||||
return contains;
|
||||
} else {
|
||||
return !contains;
|
||||
}
|
||||
}
|
||||
|
||||
int cmp = compare_fsl(ff->second, f->value.array.array[2], fail);
|
||||
if (fail) {
|
||||
printf("cast fail\n");
|
||||
return -1; // null
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[1]->value.string.string, "eq") == 0) {
|
||||
return cmp == 0;
|
||||
}
|
||||
if (strcmp(f->value.array.array[1]->value.string.string, "ne") == 0) {
|
||||
return cmp != 0;
|
||||
}
|
||||
if (strcmp(f->value.array.array[1]->value.string.string, "gt") == 0) {
|
||||
return cmp > 0;
|
||||
}
|
||||
if (strcmp(f->value.array.array[1]->value.string.string, "ge") == 0) {
|
||||
return cmp >= 0;
|
||||
}
|
||||
if (strcmp(f->value.array.array[1]->value.string.string, "lt") == 0) {
|
||||
return cmp < 0;
|
||||
}
|
||||
if (strcmp(f->value.array.array[1]->value.string.string, "le") == 0) {
|
||||
return cmp <= 0;
|
||||
}
|
||||
|
||||
fprintf(stderr, "expression fsl comparison: can't happen %s\n", f->value.array.array[1]->value.string.string);
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
|
||||
if (f->value.array.array[0]->type != JSON_STRING) {
|
||||
fprintf(stderr, "Filter operation is not a string: %s\n", json_stringify(f));
|
||||
exit(EXIT_FILTER);
|
||||
@@ -192,17 +481,19 @@ bool eval(std::map<std::string, mvt_value> const &feature, json_object *f, std::
|
||||
}
|
||||
|
||||
for (size_t i = 1; i < f->value.array.length; i++) {
|
||||
bool out = eval(feature, f->value.array.array[i], exclude_attributes);
|
||||
int out = eval(feature, f->value.array.array[i], exclude_attributes);
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "all") == 0) {
|
||||
v = v && out;
|
||||
if (!v) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
v = v || out;
|
||||
if (v) {
|
||||
break;
|
||||
if (out >= 0) { // nulls are ignored in boolean and/or expressions
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "all") == 0) {
|
||||
v = v && out;
|
||||
if (!v) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
v = v || out;
|
||||
if (v) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,7 +572,7 @@ bool eval(std::map<std::string, mvt_value> const &feature, json_object *f, std::
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
bool ok = eval(feature, f->value.array.array[2], exclude_attributes);
|
||||
bool ok = eval(feature, f->value.array.array[2], exclude_attributes) > 0;
|
||||
if (!ok) {
|
||||
exclude_attributes.insert(f->value.array.array[1]->value.string.string);
|
||||
}
|
||||
@@ -304,12 +595,12 @@ bool evaluate(std::map<std::string, mvt_value> const &feature, std::string const
|
||||
|
||||
f = json_hash_get(filter, layer.c_str());
|
||||
if (ok && f != NULL) {
|
||||
ok = eval(feature, f, exclude_attributes);
|
||||
ok = eval(feature, f, exclude_attributes) > 0;
|
||||
}
|
||||
|
||||
f = json_hash_get(filter, "*");
|
||||
if (ok && f != NULL) {
|
||||
ok = eval(feature, f, exclude_attributes);
|
||||
ok = eval(feature, f, exclude_attributes) > 0;
|
||||
}
|
||||
|
||||
return ok;
|
||||
@@ -346,3 +637,49 @@ json_object *parse_filter(const char *s) {
|
||||
json_end(jp);
|
||||
return filter;
|
||||
}
|
||||
|
||||
bool evaluate(mvt_feature const &feat, mvt_layer const &layer, json_object *filter, std::set<std::string> &exclude_attributes, int z) {
|
||||
if (filter != NULL) {
|
||||
std::map<std::string, mvt_value> attributes;
|
||||
|
||||
for (size_t t = 0; t + 1 < feat.tags.size(); t += 2) {
|
||||
std::string key = layer.keys[feat.tags[t]];
|
||||
const mvt_value &val = layer.values[feat.tags[t + 1]];
|
||||
|
||||
attributes.insert(std::pair<std::string, mvt_value>(key, val));
|
||||
}
|
||||
|
||||
if (feat.has_id) {
|
||||
mvt_value v;
|
||||
v.type = mvt_uint;
|
||||
v.numeric_value.uint_value = feat.id;
|
||||
|
||||
attributes.insert(std::pair<std::string, mvt_value>("$id", v));
|
||||
}
|
||||
|
||||
mvt_value v;
|
||||
v.type = mvt_string;
|
||||
|
||||
if (feat.type == mvt_point) {
|
||||
v.string_value = "Point";
|
||||
} else if (feat.type == mvt_linestring) {
|
||||
v.string_value = "LineString";
|
||||
} else if (feat.type == mvt_polygon) {
|
||||
v.string_value = "Polygon";
|
||||
}
|
||||
|
||||
attributes.insert(std::pair<std::string, mvt_value>("$type", v));
|
||||
|
||||
mvt_value v2;
|
||||
v2.type = mvt_uint;
|
||||
v2.numeric_value.uint_value = z;
|
||||
|
||||
attributes.insert(std::pair<std::string, mvt_value>("$zoom", v2));
|
||||
|
||||
if (!evaluate(attributes, layer.name, filter, exclude_attributes)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -11,4 +11,6 @@ bool evaluate(std::map<std::string, mvt_value> const &feature, std::string const
|
||||
json_object *parse_filter(const char *s);
|
||||
json_object *read_filter(const char *fname);
|
||||
|
||||
bool evaluate(mvt_feature const &feat, mvt_layer const &layer, json_object *filter, std::set<std::string> &exclude_attributes, int z);
|
||||
|
||||
#endif
|
||||
|
||||
+38
-3
@@ -485,7 +485,7 @@ drawvec impose_tile_boundaries(drawvec &geom, long long extent) {
|
||||
return out;
|
||||
}
|
||||
|
||||
drawvec simplify_lines(drawvec &geom, int z, int detail, bool mark_tile_bounds, double simplification, size_t retain, drawvec const &shared_nodes) {
|
||||
drawvec simplify_lines(drawvec &geom, int z, int tx, int ty, int detail, bool mark_tile_bounds, double simplification, size_t retain, drawvec const &shared_nodes, struct node *shared_nodes_map, size_t nodepos) {
|
||||
int res = 1 << (32 - detail - z);
|
||||
long long area = 1LL << (32 - z);
|
||||
|
||||
@@ -501,10 +501,35 @@ drawvec simplify_lines(drawvec &geom, int z, int detail, bool mark_tile_bounds,
|
||||
}
|
||||
|
||||
if (prevent[P_SIMPLIFY_SHARED_NODES]) {
|
||||
// This is kind of weird, because we have two lists of shared nodes to look through:
|
||||
// * the drawvec, which is nodes that were introduced during clipping to the tile edge,
|
||||
// and which are in local tile coordinates
|
||||
// * the shared_nodes_map, which was made globally before tiling began, and which
|
||||
// is in global quadkey coordinates.
|
||||
// To look through the latter, we need to offset and encode the coordinates
|
||||
// of the feature we are simplifying.
|
||||
|
||||
auto pt = std::lower_bound(shared_nodes.begin(), shared_nodes.end(), geom[i]);
|
||||
if (pt != shared_nodes.end() && *pt == geom[i]) {
|
||||
geom[i].necessary = true;
|
||||
}
|
||||
|
||||
if (nodepos > 0) {
|
||||
// offset to global
|
||||
draw d = geom[i];
|
||||
if (z != 0) {
|
||||
d.x += tx * (1LL << (32 - z));
|
||||
d.y += ty * (1LL << (32 - z));
|
||||
}
|
||||
|
||||
// to quadkey
|
||||
struct node n;
|
||||
n.index = encode_quadkey((unsigned) d.x, (unsigned) d.y);
|
||||
|
||||
if (bsearch(&n, shared_nodes_map, nodepos / sizeof(node), sizeof(node), nodecmp) != NULL) {
|
||||
geom[i].necessary = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,9 +642,9 @@ drawvec fix_polygon(drawvec &geom) {
|
||||
|
||||
// A polygon ring must contain at least three points
|
||||
// (and really should contain four). If this one does
|
||||
// not have enough, avoid a division by zero trying to
|
||||
// not have any, avoid a division by zero trying to
|
||||
// calculate the centroid below.
|
||||
if (j - i < 3) {
|
||||
if (j - i < 1) {
|
||||
i = j - 1;
|
||||
outer = 0;
|
||||
continue;
|
||||
@@ -636,6 +661,13 @@ drawvec fix_polygon(drawvec &geom) {
|
||||
ring.push_back(ring[0]);
|
||||
}
|
||||
|
||||
// A polygon ring at this point should contain at least four points.
|
||||
// Flesh it out with some vertex copies if it doesn't.
|
||||
|
||||
while (ring.size() < 4) {
|
||||
ring.push_back(ring[0]);
|
||||
}
|
||||
|
||||
// Reverse ring if winding order doesn't match
|
||||
// inner/outer expectation
|
||||
|
||||
@@ -661,6 +693,9 @@ drawvec fix_polygon(drawvec &geom) {
|
||||
ring = tmp;
|
||||
}
|
||||
|
||||
// Now we are rotating the ring to make the first/last point
|
||||
// one that would be unlikely to be simplified away.
|
||||
|
||||
// calculate centroid
|
||||
// a + 1 < size() because point 0 is duplicated at the end
|
||||
long long xtotal = 0;
|
||||
|
||||
+15
-2
@@ -7,6 +7,8 @@
|
||||
#include <string>
|
||||
#include <sqlite3.h>
|
||||
#include <stdio.h>
|
||||
#include <mvt.hpp>
|
||||
#include "jsonpull/jsonpull.h"
|
||||
|
||||
#define VT_POINT 1
|
||||
#define VT_LINE 2
|
||||
@@ -48,6 +50,10 @@ struct draw {
|
||||
}
|
||||
}
|
||||
|
||||
bool operator>(draw const &s) const {
|
||||
return s < *this;
|
||||
}
|
||||
|
||||
bool operator==(draw const &s) const {
|
||||
return y == s.y && x == s.x;
|
||||
}
|
||||
@@ -73,7 +79,7 @@ drawvec clip_lines(drawvec &geom, int z, long long buffer);
|
||||
drawvec stairstep(drawvec &geom, int z, int detail);
|
||||
bool point_within_tile(long long x, long long y, int z);
|
||||
int quick_check(long long *bbox, int z, long long buffer);
|
||||
drawvec simplify_lines(drawvec &geom, int z, int detail, bool mark_tile_bounds, double simplification, size_t retain, drawvec const &shared_nodes);
|
||||
drawvec simplify_lines(drawvec &geom, int z, int tx, int ty, int detail, bool mark_tile_bounds, double simplification, size_t retain, drawvec const &shared_nodes, struct node *shared_nodes_map, size_t nodepos);
|
||||
drawvec reorder_lines(drawvec &geom);
|
||||
drawvec fix_polygon(drawvec &geom);
|
||||
std::vector<drawvec> chop_polygon(std::vector<drawvec> &geoms);
|
||||
@@ -93,7 +99,14 @@ void visvalingam(drawvec &ls, size_t start, size_t end, double threshold, size_t
|
||||
int pnpoly(const drawvec &vert, size_t start, size_t nvert, long long testx, long long testy);
|
||||
double 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);
|
||||
|
||||
std::string overzoom(mvt_tile tile, int oz, int ox, int oy, int nz, int nx, int ny,
|
||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
||||
bool demultiply, json_object *filter);
|
||||
|
||||
std::string overzoom(std::string s, int oz, int ox, int oy, int nz, int nx, int ny,
|
||||
int detail, int buffer, std::set<std::string> const &keep);
|
||||
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
||||
bool demultiply, json_object *filter);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#include "text.hpp"
|
||||
#include "errors.hpp"
|
||||
#include "read_json.hpp"
|
||||
#include "sort.hpp"
|
||||
|
||||
static int low_detail = 12;
|
||||
static int full_detail = -1;
|
||||
@@ -92,6 +93,7 @@ unsigned int drop_denser = 0;
|
||||
std::map<std::string, serial_val> set_attributes;
|
||||
unsigned long long preserve_point_density_threshold = 0;
|
||||
long long extend_zooms_max = 0;
|
||||
int retain_points_multiplier = 1;
|
||||
|
||||
std::vector<order_field> order_by;
|
||||
bool order_reverse;
|
||||
@@ -121,7 +123,8 @@ void checkdisk(std::vector<struct reader> *r) {
|
||||
for (size_t i = 0; i < r->size(); i++) {
|
||||
// Pool and tree are used once.
|
||||
// Geometry and index will be duplicated during sorting and tiling.
|
||||
used += 2 * (*r)[i].geompos + 2 * (*r)[i].indexpos + (*r)[i].poolfile->off + (*r)[i].treefile->off;
|
||||
used += 2 * (*r)[i].geompos + 2 * (*r)[i].indexpos + (*r)[i].poolfile->off + (*r)[i].treefile->off +
|
||||
(*r)[i].vertexpos + (*r)[i].nodepos;
|
||||
}
|
||||
|
||||
static int warned = 0;
|
||||
@@ -301,7 +304,6 @@ int calc_feature_minzoom(struct index *ix, struct drop_state *ds, int maxzoom, d
|
||||
for (ssize_t i = maxzoom; i >= 0; i--) {
|
||||
ds[i].seq++;
|
||||
}
|
||||
ssize_t chosen = maxzoom + 1;
|
||||
for (ssize_t i = maxzoom; i >= 0; i--) {
|
||||
if (ds[i].seq < 0) {
|
||||
feature_minzoom = i + 1;
|
||||
@@ -315,7 +317,6 @@ int calc_feature_minzoom(struct index *ix, struct drop_state *ds, int maxzoom, d
|
||||
ds[j].previndex = ix->ix;
|
||||
}
|
||||
|
||||
chosen = i + 1;
|
||||
break;
|
||||
} else {
|
||||
ds[i].seq -= ds[i].interval;
|
||||
@@ -328,7 +329,7 @@ int calc_feature_minzoom(struct index *ix, struct drop_state *ds, int maxzoom, d
|
||||
// we will go ahead and push it out.
|
||||
|
||||
if (preserve_point_density_threshold > 0) {
|
||||
for (ssize_t i = 0; i < chosen && i < maxzoom; i++) {
|
||||
for (ssize_t i = 0; i < feature_minzoom && i < maxzoom; i++) {
|
||||
if (ix->ix - ds[i].previndex > ((1LL << (32 - i)) / preserve_point_density_threshold) * ((1LL << (32 - i)) / preserve_point_density_threshold)) {
|
||||
feature_minzoom = i;
|
||||
|
||||
@@ -1207,6 +1208,34 @@ void choose_first_zoom(long long *file_bbox, long long *file_bbox1, long long *f
|
||||
}
|
||||
}
|
||||
|
||||
int vertexcmp(const void *void1, const void *void2) {
|
||||
vertex *v1 = (vertex *) void1;
|
||||
vertex *v2 = (vertex *) void2;
|
||||
|
||||
if (v1->mid < v2->mid) {
|
||||
return -1;
|
||||
}
|
||||
if (v1->mid > v2->mid) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (v1->p1 < v2->p1) {
|
||||
return -1;
|
||||
}
|
||||
if (v1->p1 > v2->p1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (v1->p2 < v2->p2) {
|
||||
return -1;
|
||||
}
|
||||
if (v1->p2 > v2->p2) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzoom, int basezoom, double basezoom_marker_width, sqlite3 *outdb, const char *outdir, std::set<std::string> *exclude, std::set<std::string> *include, int exclude_all, json_object *filter, double droprate, int buffer, const char *tmpdir, double gamma, int read_parallel, int forcetable, const char *attribution, bool uses_gamma, long long *file_bbox, long long *file_bbox1, long long *file_bbox2, const char *prefilter, const char *postfilter, const char *description, bool guess_maxzoom, bool guess_cluster_maxzoom, std::map<std::string, int> const *attribute_types, const char *pgm, std::map<std::string, attribute_op> const *attribute_accum, std::map<std::string, std::string> const &attribute_descriptions, std::string const &commandline, int minimum_maxzoom) {
|
||||
int ret = EXIT_SUCCESS;
|
||||
|
||||
@@ -1219,11 +1248,15 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
char treename[strlen(tmpdir) + strlen("/tree.XXXXXXXX") + 1];
|
||||
char geomname[strlen(tmpdir) + strlen("/geom.XXXXXXXX") + 1];
|
||||
char indexname[strlen(tmpdir) + strlen("/index.XXXXXXXX") + 1];
|
||||
char vertexname[strlen(tmpdir) + strlen("/vertex.XXXXXXXX") + 1];
|
||||
char nodename[strlen(tmpdir) + strlen("/node.XXXXXXXX") + 1];
|
||||
|
||||
snprintf(poolname, sizeof(poolname), "%s%s", tmpdir, "/pool.XXXXXXXX");
|
||||
snprintf(treename, sizeof(treename), "%s%s", tmpdir, "/tree.XXXXXXXX");
|
||||
snprintf(geomname, sizeof(geomname), "%s%s", tmpdir, "/geom.XXXXXXXX");
|
||||
snprintf(indexname, sizeof(indexname), "%s%s", tmpdir, "/index.XXXXXXXX");
|
||||
snprintf(vertexname, sizeof(vertexname), "%s%s", tmpdir, "/vertex.XXXXXXXX");
|
||||
snprintf(nodename, sizeof(nodename), "%s%s", tmpdir, "/node.XXXXXXXX");
|
||||
|
||||
r->poolfd = mkstemp_cloexec(poolname);
|
||||
if (r->poolfd < 0) {
|
||||
@@ -1245,6 +1278,16 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
perror(indexname);
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
r->vertexfd = mkstemp_cloexec(vertexname);
|
||||
if (r->vertexfd < 0) {
|
||||
perror(vertexname);
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
r->nodefd = mkstemp_cloexec(nodename);
|
||||
if (r->nodefd < 0) {
|
||||
perror(nodename);
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
|
||||
r->poolfile = memfile_open(r->poolfd);
|
||||
if (r->poolfile == NULL) {
|
||||
@@ -1266,13 +1309,27 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
perror(indexname);
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
r->vertexfile = fopen_oflag(vertexname, "w+b", O_RDWR | O_CLOEXEC);
|
||||
if (r->vertexfile == NULL) {
|
||||
perror(("open vertexfile " + std::string(vertexname)).c_str());
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
r->nodefile = fopen_oflag(nodename, "w+b", O_RDWR | O_CLOEXEC);
|
||||
if (r->nodefile == NULL) {
|
||||
perror(nodename);
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
r->geompos = 0;
|
||||
r->indexpos = 0;
|
||||
r->vertexpos = 0;
|
||||
r->nodepos = 0;
|
||||
|
||||
unlink(poolname);
|
||||
unlink(treename);
|
||||
unlink(geomname);
|
||||
unlink(indexname);
|
||||
unlink(vertexname);
|
||||
unlink(nodename);
|
||||
|
||||
// To distinguish a null value
|
||||
{
|
||||
@@ -1842,6 +1899,9 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
std::atomic<long long> vertexpos(0);
|
||||
std::atomic<long long> nodepos(0);
|
||||
|
||||
for (size_t i = 0; i < CPUS; i++) {
|
||||
if (fclose(readers[i].geomfile) != 0) {
|
||||
perror("fclose geom");
|
||||
@@ -1857,6 +1917,13 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
perror("stat geom\n");
|
||||
exit(EXIT_STAT);
|
||||
}
|
||||
|
||||
vertexpos += readers[i].vertexpos;
|
||||
nodepos += readers[i].nodepos;
|
||||
}
|
||||
|
||||
if (!quiet) {
|
||||
fprintf(stderr, "Merging string pool \r");
|
||||
}
|
||||
|
||||
// Create a combined string pool
|
||||
@@ -1885,7 +1952,6 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
}
|
||||
|
||||
unlink(poolname);
|
||||
|
||||
std::atomic<long long> poolpos(0);
|
||||
|
||||
for (size_t i = 0; i < CPUS; i++) {
|
||||
@@ -1949,6 +2015,162 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
madvise(stringpool, poolpos, MADV_RANDOM);
|
||||
}
|
||||
|
||||
if (!quiet) {
|
||||
fprintf(stderr, "Merging vertices \r");
|
||||
}
|
||||
|
||||
// Sort the vertices;
|
||||
// find nodes where the same central point is part of two different vertices
|
||||
{
|
||||
std::string tmpname = std::string(tmpdir) + "/vertex2.XXXXXX";
|
||||
int vertexfd = mkstemp((char *) tmpname.c_str());
|
||||
if (vertexfd < 0) {
|
||||
perror(("mkstemp vertexfile " + std::string(tmpname)).c_str());
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
unlink(tmpname.c_str());
|
||||
FILE *vertex_out = fdopen(vertexfd, "w+b");
|
||||
if (vertex_out == NULL) {
|
||||
perror(tmpname.c_str());
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
|
||||
std::vector<FILE *> vertex_readers;
|
||||
for (size_t i = 0; i < CPUS; i++) {
|
||||
vertex_readers.push_back(readers[i].vertexfile);
|
||||
rewind(readers[i].vertexfile);
|
||||
}
|
||||
fqsort(vertex_readers, sizeof(vertex), vertexcmp, vertex_out, memsize / 20);
|
||||
|
||||
for (size_t i = 0; i < CPUS; i++) {
|
||||
if (fclose(readers[i].vertexfile) != 0) {
|
||||
perror("fclose vertex");
|
||||
exit(EXIT_CLOSE);
|
||||
}
|
||||
}
|
||||
|
||||
rewind(vertex_out);
|
||||
|
||||
vertex prev(draw(VT_MOVETO, 0, 0), draw(VT_MOVETO, 0, 0), draw(VT_MOVETO, 0, 0));
|
||||
vertex v(draw(VT_MOVETO, 0, 0), draw(VT_MOVETO, 0, 0), draw(VT_MOVETO, 0, 0));
|
||||
while (fread((void *) &v, sizeof(vertex), 1, vertex_out)) {
|
||||
if (v.mid == prev.mid && (v.p1 != prev.p1 || v.p2 != prev.p2)) {
|
||||
long long x = v.mid.x * (1LL << geometry_scale);
|
||||
long long y = v.mid.y * (1LL << geometry_scale);
|
||||
|
||||
#if 0
|
||||
double lon, lat;
|
||||
tile2lonlat(x, y, 32, &lon, &lat);
|
||||
printf("{\"type\":\"Feature\", \"properties\":{}, \"geometry\":{\"type\":\"Point\", \"coordinates\":[%f,%f]}}\n", lon, lat);
|
||||
#endif
|
||||
|
||||
struct node n;
|
||||
n.index = encode_quadkey((unsigned) x, (unsigned) y);
|
||||
|
||||
fwrite_check((char *) &n, sizeof(struct node), 1, readers[0].nodefile, &readers[0].nodepos, "vertices");
|
||||
}
|
||||
prev = v;
|
||||
}
|
||||
|
||||
fclose(vertex_out);
|
||||
}
|
||||
|
||||
if (!quiet) {
|
||||
fprintf(stderr, "Merging nodes \r");
|
||||
}
|
||||
|
||||
// Sort nodes that can't be simplified away; scan the list to remove duplicates
|
||||
|
||||
FILE *shared_nodes;
|
||||
node *shared_nodes_map = NULL; // will be null if there are no shared nodes
|
||||
{
|
||||
// sort
|
||||
|
||||
std::string tmpname = std::string(tmpdir) + "/node2.XXXXXX";
|
||||
int nodefd = mkstemp((char *) tmpname.c_str());
|
||||
if (nodefd < 0) {
|
||||
perror(("mkstemp nodefile " + std::string(tmpname)).c_str());
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
unlink(tmpname.c_str());
|
||||
FILE *node_out;
|
||||
node_out = fdopen(nodefd, "w+b");
|
||||
if (node_out == NULL) {
|
||||
perror(tmpname.c_str());
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
|
||||
std::vector<FILE *> node_readers;
|
||||
for (size_t i = 0; i < CPUS; i++) {
|
||||
node_readers.push_back(readers[i].nodefile);
|
||||
rewind(readers[i].nodefile);
|
||||
}
|
||||
|
||||
fqsort(node_readers, sizeof(node), nodecmp, node_out, memsize / 20);
|
||||
|
||||
for (size_t i = 0; i < CPUS; i++) {
|
||||
if (fclose(readers[i].nodefile) != 0) {
|
||||
perror("fclose node");
|
||||
exit(EXIT_CLOSE);
|
||||
}
|
||||
}
|
||||
|
||||
rewind(node_out);
|
||||
|
||||
// scan
|
||||
|
||||
tmpname = std::string(tmpdir) + "/node3.XXXXXX";
|
||||
nodefd = mkstemp((char *) tmpname.c_str());
|
||||
if (nodefd < 0) {
|
||||
perror(("mkstemp nodefile " + std::string(tmpname)).c_str());
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
unlink(tmpname.c_str());
|
||||
shared_nodes = fdopen(nodefd, "w+b");
|
||||
if (shared_nodes == NULL) {
|
||||
perror(tmpname.c_str());
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
|
||||
// `written` is to see if this node has already been preserved
|
||||
// and doesn't need to be preserved again
|
||||
struct node written;
|
||||
written.index = ULONG_MAX;
|
||||
|
||||
nodepos = 0;
|
||||
struct node here;
|
||||
while (fread((void *) &here, sizeof(here), 1, node_out)) {
|
||||
if (nodecmp((void *) &here, (void *) &written) != 0) {
|
||||
fwrite_check((void *) &here, sizeof(here), 1, shared_nodes, &nodepos, "shared nodes");
|
||||
written = here;
|
||||
|
||||
#if 0
|
||||
unsigned wx, wy;
|
||||
decode_quadkey(here.index, &wx, &wy);
|
||||
double lon, lat;
|
||||
tile2lonlat(wx, wy, 32, &lon, &lat);
|
||||
printf("{\"type\":\"Feature\", \"properties\":{}, \"geometry\":{\"type\":\"Point\", \"coordinates\":[%f,%f]}}\n", lon, lat);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
fflush(shared_nodes);
|
||||
|
||||
if (nodepos > 0) {
|
||||
shared_nodes_map = (node *) mmap(NULL, nodepos, PROT_READ, MAP_PRIVATE, nodefd, 0);
|
||||
if (shared_nodes_map == (node *) MAP_FAILED) {
|
||||
perror("mmap nodes");
|
||||
exit(EXIT_MEMORY);
|
||||
}
|
||||
}
|
||||
|
||||
fclose(node_out);
|
||||
}
|
||||
|
||||
if (!quiet) {
|
||||
fprintf(stderr, "Merging index \r");
|
||||
}
|
||||
|
||||
char indexname[strlen(tmpdir) + strlen("/index.XXXXXXXX") + 1];
|
||||
snprintf(indexname, sizeof(indexname), "%s%s", tmpdir, "/index.XXXXXXXX");
|
||||
|
||||
@@ -2023,7 +2245,9 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
long long s = progress_seq;
|
||||
long long geompos_print = geompos;
|
||||
long long poolpos_print = poolpos;
|
||||
fprintf(stderr, "%lld features, %lld bytes of geometry, %lld bytes of string pool\n", s, geompos_print, poolpos_print);
|
||||
long long vertexpos_print = vertexpos;
|
||||
long long nodepos_print = nodepos;
|
||||
fprintf(stderr, "%lld features, %lld bytes of geometry and attributes, %lld bytes of string pool, %lld bytes of vertices, %lld bytes of nodes\n", s, geompos_print, poolpos_print, vertexpos_print, nodepos_print);
|
||||
}
|
||||
|
||||
if (indexpos == 0) {
|
||||
@@ -2532,7 +2756,7 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
std::atomic<unsigned> midx(0);
|
||||
std::atomic<unsigned> midy(0);
|
||||
std::vector<strategy> strategies;
|
||||
int written = traverse_zooms(fd, size, stringpool, &midx, &midy, maxzoom, minzoom, outdb, outdir, buffer, fname, tmpdir, gamma, full_detail, low_detail, min_detail, pool_off, initial_x, initial_y, simplification, maxzoom_simplification, layermaps, prefilter, postfilter, attribute_accum, filter, strategies, iz);
|
||||
int written = traverse_zooms(fd, size, stringpool, &midx, &midy, maxzoom, minzoom, outdb, outdir, buffer, fname, tmpdir, gamma, full_detail, low_detail, min_detail, pool_off, initial_x, initial_y, simplification, maxzoom_simplification, layermaps, prefilter, postfilter, attribute_accum, filter, strategies, iz, shared_nodes_map, nodepos);
|
||||
|
||||
if (maxzoom != written) {
|
||||
if (written > minzoom) {
|
||||
@@ -2555,6 +2779,8 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
perror("close pool");
|
||||
}
|
||||
|
||||
fclose(shared_nodes);
|
||||
|
||||
// mbtiles-style bounding box and center
|
||||
double minlat = 0, minlon = 0, maxlat = 0, maxlon = 0, midlat = 0, midlon = 0;
|
||||
|
||||
@@ -2598,7 +2824,7 @@ std::pair<int, metadata> read_input(std::vector<source> &sources, char *fname, i
|
||||
ai->second.maxzoom = maxzoom;
|
||||
}
|
||||
|
||||
metadata m = make_metadata(fname, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, minlat2, minlon2, maxlat2, maxlon2, midlat, midlon, attribution, merged_lm, true, description, !prevent[P_TILE_STATS], attribute_descriptions, "tippecanoe", commandline, strategies);
|
||||
metadata m = make_metadata(fname, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, minlat2, minlon2, maxlat2, maxlon2, midlat, midlon, attribution, merged_lm, true, description, !prevent[P_TILE_STATS], attribute_descriptions, "tippecanoe", commandline, strategies, basezoom, droprate, retain_points_multiplier);
|
||||
if (outdb != NULL) {
|
||||
mbtiles_write_metadata(outdb, m, forcetable);
|
||||
} else {
|
||||
@@ -2923,6 +3149,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
{"Dropping a fixed fraction of features by zoom level", 0, 0, 0},
|
||||
{"drop-rate", required_argument, 0, 'r'},
|
||||
{"retain-points-multiplier", required_argument, 0, '~'},
|
||||
{"base-zoom", required_argument, 0, 'B'},
|
||||
{"drop-denser", required_argument, 0, '~'},
|
||||
{"limit-base-zoom-to-maximum-zoom", no_argument, &prevent[P_BASEZOOM_ABOVE_MAXZOOM], 1},
|
||||
@@ -3143,6 +3370,8 @@ int main(int argc, char **argv) {
|
||||
preserve_point_density_threshold = atoll_require(optarg, "Preserve point density threshold");
|
||||
} else if (strcmp(opt, "extend-zooms-if-still-dropping-maximum") == 0) {
|
||||
extend_zooms_max = atoll_require(optarg, "Maximum number by which to extend zooms");
|
||||
} else if (strcmp(opt, "retain-points-multiplier") == 0) {
|
||||
retain_points_multiplier = atoll_require(optarg, "Multiply the fraction of points retained by zoom level");
|
||||
} else {
|
||||
fprintf(stderr, "%s: Unrecognized option --%s\n", argv[0], opt);
|
||||
exit(EXIT_ARGS);
|
||||
|
||||
@@ -62,6 +62,7 @@ extern size_t limit_tile_feature_count;
|
||||
extern size_t limit_tile_feature_count_at_maxzoom;
|
||||
extern std::map<std::string, serial_val> set_attributes;
|
||||
extern long long extend_zooms_max;
|
||||
extern int retain_points_multiplier;
|
||||
|
||||
struct order_field {
|
||||
std::string name;
|
||||
|
||||
+9
-3
@@ -54,7 +54,7 @@ $ tippecanoe \-o file.mbtiles [options] [file.json file.json.gz file.fgb ...]
|
||||
.RE
|
||||
.PP
|
||||
If no files are specified, it reads GeoJSON from the standard input.
|
||||
If multiple files are specified, each is placed in its own layer.
|
||||
If multiple files are specified, each is placed in its own layer \[la]#input-files-and-layer-names\[ra]\&.
|
||||
.PP
|
||||
The GeoJSON features need not be wrapped in a FeatureCollection.
|
||||
You can concatenate multiple GeoJSON features or files together,
|
||||
@@ -526,7 +526,7 @@ The attributes and values may also be specified as JSON keys and values: \fB\fC\
|
||||
.SS Filtering features by attributes
|
||||
.RS
|
||||
.IP \(bu 2
|
||||
\fB\fC\-j\fR \fIfilter\fP or \fB\fC\-\-feature\-filter\fR=\fIfilter\fP: Check features against a per\-layer filter (as defined in the Mapbox GL Style Specification \[la]https://docs.mapbox.com/mapbox-gl-js/style-spec/#other-filter\[ra]) and only include those that match. Any features in layers that have no filter specified will be passed through. Filters for the layer \fB\fC"*"\fR apply to all layers. The special variable \fB\fC$zoom\fR refers to the current zoom level.
|
||||
\fB\fC\-j\fR \fIfilter\fP or \fB\fC\-\-feature\-filter\fR=\fIfilter\fP: Check features against a per\-layer filter (as defined in the Mapbox GL Style Specification \[la]https://docs.mapbox.com/mapbox-gl-js/style-spec/#other-filter\[ra] or in a Felt filter specification still to be finalized) and only include those that match. Any features in layers that have no filter specified will be passed through. Filters for the layer \fB\fC"*"\fR apply to all layers. The special variable \fB\fC$zoom\fR refers to the current zoom level.
|
||||
.IP \(bu 2
|
||||
\fB\fC\-J\fR \fIfilter\-file\fP or \fB\fC\-\-feature\-filter\-file\fR=\fIfilter\-file\fP: Like \fB\fC\-j\fR, but read the filter from a file.
|
||||
.RE
|
||||
@@ -574,6 +574,8 @@ If you use \fB\fC\-Bg\fR, it will guess a zoom level that will keep at most 50,0
|
||||
You can also specify a marker\-width with \fB\fC\-Bg\fR\fIwidth\fP to allow fewer features in the densest tile to
|
||||
compensate for the larger marker, or \fB\fC\-Bf\fR\fInumber\fP to allow at most \fInumber\fP features in the densest tile.
|
||||
.IP \(bu 2
|
||||
\fB\fC\-\-retain\-points\-multiplier=\fR\fImultiple\fP: Retain the specified multiple of points instead of just the number of points that would ordinarily be retained by the drop rate. These can be thinned out later with the \fB\fC\-m\fR option to \fB\fCtippecanoe\-overzoom\fR\&. The start of each cluster is marked in the feature sequence by the \fB\fCtippecanoe:retain_points_multiplier_first\fR attribute.
|
||||
.IP \(bu 2
|
||||
\fB\fC\-\-drop\-denser=\fR\fIpercentage\fP: When dropping dots at zoom levels below the base zoom, give the specified \fIpercentage\fP
|
||||
preference to retaining points in sparse areas and dropping points in dense areas.
|
||||
.IP \(bu 2
|
||||
@@ -629,7 +631,7 @@ the line or polygon within one tile unit of its proper location. You can probabl
|
||||
.IP \(bu 2
|
||||
\fB\fC\-\-simplification\-at\-maximum\-zoom=\fR\fIscale\fP: Use the specified \fIscale\fP at maxzoom instead of the standard simplification scale (which still applies at lower zooms)
|
||||
.IP \(bu 2
|
||||
\fB\fC\-pn\fR or \fB\fC\-\-no\-simplification\-of\-shared\-nodes\fR: Don't simplify away nodes that appear in more than one feature or are used multiple times within the same feature, so that the intersection node will not be lost from intersecting roads. (This will not be effective if you also use \fB\fC\-\-coalesce\fR\&.) For polygons, the vertices where polygon rings meet will be detected, and the shared edges between the polygons will be simplified identically if possible. Use this instead of \fB\fC\-\-detect\-shared\-borders\fR\&.
|
||||
\fB\fC\-pn\fR or \fB\fC\-\-no\-simplification\-of\-shared\-nodes\fR: Don't simplify away nodes at which LineStrings or Polygon rings converge, diverge, or cross. (This will not be effective if you also use \fB\fC\-\-coalesce\fR\&.) In between intersection nodes, LineString segments or polygon edges will be simplified identically in each feature if possible. Use this instead of \fB\fC\-\-detect\-shared\-borders\fR\&.
|
||||
.IP \(bu 2
|
||||
\fB\fC\-pt\fR or \fB\fC\-\-no\-tiny\-polygon\-reduction\fR: Don't combine the area of very small polygons into small squares that represent their combined area.
|
||||
.IP \(bu 2
|
||||
@@ -1260,4 +1262,8 @@ reads tile \fB\fCinz/inx/iny\fR of \fB\fCin.mvt.gz\fR and produces tile \fB\fCou
|
||||
\fB\fC\-d\fR \fIdetail\fP: Set the detail of the output tile (default 12)
|
||||
.IP \(bu 2
|
||||
\fB\fC\-y\fR \fIattribute\fP: Retain the specified \fIattribute\fP in the output features. All attributes that are not named in a \fB\fC\-y\fR option will be removed.
|
||||
.IP \(bu 2
|
||||
\fB\fC\-j\fR \fIfilter\fP: Filter features using the same expression syntax as in tippecanoe.
|
||||
.IP \(bu 2
|
||||
\fB\fC\-m\fR: If a tile was created with the \fB\fC\-\-retain\-points\-multiplier\fR option, thin the tile back down to its normal feature count during overzooming. The first feature from each cluster will be retained, unless \fB\fC\-j\fR is used to specify a filter, in which case the first matching filter from each cluster will be retained instead.
|
||||
.RE
|
||||
|
||||
+33
-5
@@ -7,6 +7,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sqlite3.h>
|
||||
#include <cmath>
|
||||
#include <climits>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <set>
|
||||
@@ -99,17 +101,21 @@ sqlite3 *mbtiles_open(char *dbname, char **argv, int forcetable) {
|
||||
return outdb;
|
||||
}
|
||||
|
||||
void mbtiles_write_tile(sqlite3 *outdb, int z, int tx, int ty, const char *data, int size) {
|
||||
unsigned long long fnv1a(std::string const &s) {
|
||||
// Store tiles by a hash of their contents (fnv1a 64-bit)
|
||||
// http://www.isthe.com/chongo/tech/comp/fnv/
|
||||
const unsigned long long fnv_offset_basis = 14695981039346656037u;
|
||||
const unsigned long long fnv_prime = 1099511628211u;
|
||||
unsigned long long h = fnv_offset_basis;
|
||||
for (int i = 0; i < size; i++) {
|
||||
h ^= (unsigned char) data[i];
|
||||
for (size_t i = 0; i < s.size(); i++) {
|
||||
h ^= (unsigned char) s[i];
|
||||
h *= fnv_prime;
|
||||
}
|
||||
std::string hash = std::to_string(h);
|
||||
return h;
|
||||
}
|
||||
|
||||
void mbtiles_write_tile(sqlite3 *outdb, int z, int tx, int ty, const char *data, int size) {
|
||||
std::string hash = std::to_string(fnv1a(std::string(data, size)));
|
||||
|
||||
// following https://github.com/mapbox/node-mbtiles/blob/master/lib/mbtiles.js
|
||||
|
||||
@@ -597,6 +603,17 @@ void mbtiles_write_metadata(sqlite3 *db, const metadata &m, bool forcetable) {
|
||||
sqlite3_free(sql);
|
||||
}
|
||||
|
||||
if (m.decisions_json.size() > 0) {
|
||||
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('tippecanoe_decisions', %Q);", m.decisions_json.c_str());
|
||||
if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {
|
||||
fprintf(stderr, "set decisions: %s\n", err);
|
||||
if (!forcetable) {
|
||||
exit(EXIT_SQLITE);
|
||||
}
|
||||
}
|
||||
sqlite3_free(sql);
|
||||
}
|
||||
|
||||
if (m.vector_layers_json.size() > 0 || m.tilestats_json.size() > 0) {
|
||||
std::string json;
|
||||
json_writer state(&json);
|
||||
@@ -638,7 +655,7 @@ void mbtiles_write_metadata(sqlite3 *db, const metadata &m, bool forcetable) {
|
||||
}
|
||||
}
|
||||
|
||||
metadata make_metadata(const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double minlat2, double minlon2, double maxlat2, double maxlon2, double midlat, double midlon, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats, std::map<std::string, std::string> const &attribute_descriptions, std::string const &program, std::string const &commandline, std::vector<strategy> const &strategies) {
|
||||
metadata make_metadata(const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double minlat2, double minlon2, double maxlat2, double maxlon2, double midlat, double midlon, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats, std::map<std::string, std::string> const &attribute_descriptions, std::string const &program, std::string const &commandline, std::vector<strategy> const &strategies, int basezoom, double droprate, int retain_points_multiplier) {
|
||||
metadata m;
|
||||
|
||||
m.name = fname;
|
||||
@@ -673,6 +690,17 @@ metadata make_metadata(const char *fname, int minzoom, int maxzoom, double minla
|
||||
|
||||
m.strategies_json = stringify_strategies(strategies);
|
||||
|
||||
if (isinf(droprate)) {
|
||||
droprate = LLONG_MAX;
|
||||
}
|
||||
if (basezoom != maxzoom || droprate != 2.5 || retain_points_multiplier != 1) {
|
||||
m.decisions_json = std::string("{") +
|
||||
"\"basezoom\":" + milo::dtoa_milo(basezoom) + "," +
|
||||
"\"droprate\":" + milo::dtoa_milo(droprate) + "," +
|
||||
"\"retain_points_multiplier\":" + std::to_string(retain_points_multiplier) +
|
||||
std::string("}");
|
||||
}
|
||||
|
||||
if (vector) {
|
||||
{
|
||||
json_writer state(&m.vector_layers_json);
|
||||
|
||||
+4
-1
@@ -66,6 +66,7 @@ struct metadata {
|
||||
|
||||
std::string vector_layers_json;
|
||||
std::string tilestats_json;
|
||||
std::string decisions_json;
|
||||
};
|
||||
|
||||
#include "tile.hpp"
|
||||
@@ -75,7 +76,7 @@ sqlite3 *mbtiles_open(char *dbname, char **argv, int forcetable);
|
||||
void mbtiles_write_tile(sqlite3 *outdb, int z, int tx, int ty, const char *data, int size);
|
||||
void mbtiles_erase_zoom(sqlite3 *outdb, int z);
|
||||
|
||||
metadata make_metadata(const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double minlat2, double minlon2, double maxlat2, double maxlon2, double midlat, double midlon, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats, std::map<std::string, std::string> const &attribute_descriptions, std::string const &program, std::string const &commandline, std::vector<strategy> const &strategies);
|
||||
metadata make_metadata(const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double minlat2, double minlon2, double maxlat2, double maxlon2, double midlat, double midlon, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats, std::map<std::string, std::string> const &attribute_descriptions, std::string const &program, std::string const &commandline, std::vector<strategy> const &strategies, int basezoom, double droprate, int retain_points_multiplier);
|
||||
void mbtiles_write_metadata(sqlite3 *db, const metadata &m, bool forcetable);
|
||||
|
||||
void mbtiles_close(sqlite3 *outdb, const char *pgm);
|
||||
@@ -85,4 +86,6 @@ std::map<std::string, layermap_entry> merge_layermaps(std::vector<std::map<std::
|
||||
|
||||
void add_to_file_keys(std::map<std::string, type_and_string_stats> &file_keys, std::string const &layername, type_and_string const &val);
|
||||
|
||||
unsigned long long fnv1a(std::string const &s);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -89,7 +89,7 @@ int compress(std::string const &input, std::string &output, bool gz) {
|
||||
deflate_s.opaque = Z_NULL;
|
||||
deflate_s.avail_in = 0;
|
||||
deflate_s.next_in = Z_NULL;
|
||||
deflateInit2(&deflate_s, Z_BEST_COMPRESSION, Z_DEFLATED, gz ? 31 : 15, 8, Z_DEFAULT_STRATEGY);
|
||||
deflateInit2(&deflate_s, Z_DEFAULT_COMPRESSION, Z_DEFLATED, gz ? 31 : 15, 8, Z_DEFAULT_STRATEGY);
|
||||
deflate_s.next_in = (Bytef *) input.data();
|
||||
deflate_s.avail_in = input.size();
|
||||
size_t length = 0;
|
||||
|
||||
+19
-2
@@ -6,12 +6,15 @@
|
||||
#include "errors.hpp"
|
||||
#include "mvt.hpp"
|
||||
#include "geometry.hpp"
|
||||
#include "evaluator.hpp"
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
int detail = 12; // tippecanoe-style: mvt extent == 1 << detail
|
||||
int buffer = 5; // tippecanoe-style: mvt buffer == extent * buffer / 256;
|
||||
bool demultiply = false;
|
||||
std::string filter;
|
||||
|
||||
std::set<std::string> keep;
|
||||
|
||||
@@ -25,7 +28,7 @@ int main(int argc, char **argv) {
|
||||
int i;
|
||||
const char *outfile = NULL;
|
||||
|
||||
while ((i = getopt(argc, argv, "y:o:d:b:")) != -1) {
|
||||
while ((i = getopt(argc, argv, "y:d:b:o:mj:")) != -1) {
|
||||
switch (i) {
|
||||
case 'y':
|
||||
keep.insert(optarg);
|
||||
@@ -43,7 +46,16 @@ int main(int argc, char **argv) {
|
||||
buffer = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
demultiply = true;
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
filter = optarg;
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unrecognized flag -%c\n", i);
|
||||
usage(argv);
|
||||
}
|
||||
}
|
||||
@@ -91,7 +103,12 @@ int main(int argc, char **argv) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
std::string out = overzoom(tile, oz, ox, oy, nz, nx, ny, detail, buffer, keep);
|
||||
json_object *json_filter = NULL;
|
||||
if (filter.size() > 0) {
|
||||
json_filter = parse_filter(filter.c_str());
|
||||
}
|
||||
|
||||
std::string out = overzoom(tile, oz, ox, oy, nz, nx, ny, detail, buffer, keep, true, NULL, demultiply, json_filter);
|
||||
fwrite(out.c_str(), sizeof(char), out.size(), f);
|
||||
fclose(f);
|
||||
|
||||
|
||||
@@ -103,6 +103,13 @@ std::string metadata_to_pmtiles_json(metadata m) {
|
||||
state.json_write_string("strategies");
|
||||
state.json_write_json(m.strategies_json);
|
||||
}
|
||||
|
||||
if (m.decisions_json.size() > 0) {
|
||||
state.json_comma_newline();
|
||||
state.json_write_string("tippecanoe_decisions");
|
||||
state.json_write_json(m.decisions_json);
|
||||
}
|
||||
|
||||
out(state, "generator", m.generator);
|
||||
out(state, "generator_options", m.generator_options);
|
||||
|
||||
@@ -428,6 +435,12 @@ sqlite3 *pmtilesmeta2tmp(const char *fname, const char *pmtiles_map) {
|
||||
fprintf(stderr, "set %s in metadata: %s\n", key, err);
|
||||
}
|
||||
sqlite3_free(sql);
|
||||
} else if (strcmp(key, "tippecanoe_decisions") == 0 && o->value.object.values[i]->type == JSON_HASH) {
|
||||
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('tippecanoe_decisions', %Q);", json_stringify(o->value.object.values[i]));
|
||||
if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {
|
||||
fprintf(stderr, "set %s in metadata: %s\n", key, err);
|
||||
}
|
||||
sqlite3_free(sql);
|
||||
} else if (o->value.object.keys[i]->type != JSON_STRING || o->value.object.values[i]->type != JSON_STRING) {
|
||||
fprintf(stderr, "%s\n", key);
|
||||
fprintf(stderr, "%s: non-string in metadata\n", fname);
|
||||
|
||||
+141
-13
@@ -325,19 +325,27 @@ static long long scale_geometry(struct serialization_state *sst, long long *bbox
|
||||
long long y = geom[i].y;
|
||||
|
||||
if (additional[A_DETECT_WRAPAROUND]) {
|
||||
x += offset;
|
||||
if (has_prev) {
|
||||
if (x - prev > (1LL << 31)) {
|
||||
offset -= 1LL << 32;
|
||||
x -= 1LL << 32;
|
||||
} else if (prev - x > (1LL << 31)) {
|
||||
offset += 1LL << 32;
|
||||
x += 1LL << 32;
|
||||
if (geom[i].op == VT_LINETO) {
|
||||
x += offset;
|
||||
if (has_prev) {
|
||||
// jumps at least 180° but not exactly 360°,
|
||||
// which in some data sets is an intentional
|
||||
// line across the world
|
||||
if (x - prev > (1LL << 31) && x - prev != (1LL << 32)) {
|
||||
offset -= 1LL << 32;
|
||||
x -= 1LL << 32;
|
||||
} else if (prev - x > (1LL << 31) && prev - x != (1LL << 32)) {
|
||||
offset += 1LL << 32;
|
||||
x += 1LL << 32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
has_prev = true;
|
||||
prev = x;
|
||||
has_prev = true;
|
||||
prev = x;
|
||||
} else {
|
||||
offset = 0;
|
||||
prev = x;
|
||||
}
|
||||
}
|
||||
|
||||
if (x < bbox[0]) {
|
||||
@@ -393,6 +401,29 @@ static std::string strip_zeroes(std::string s) {
|
||||
return s;
|
||||
}
|
||||
|
||||
int nodecmp(const void *void1, const void *void2) {
|
||||
node *n1 = (node *) void1;
|
||||
node *n2 = (node *) void2;
|
||||
|
||||
if (n1->index < n2->index) {
|
||||
return -1;
|
||||
} else if (n1->index > n2->index) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void add_scaled_node(struct reader *r, serialization_state *sst, draw g) {
|
||||
long long x = SHIFT_LEFT(g.x);
|
||||
long long y = SHIFT_LEFT(g.y);
|
||||
|
||||
struct node n;
|
||||
n.index = encode_quadkey((unsigned) x, (unsigned) y);
|
||||
|
||||
fwrite_check((char *) &n, sizeof(struct node), 1, r->nodefile, &r->nodepos, sst->fname);
|
||||
}
|
||||
|
||||
// called from frontends
|
||||
int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
|
||||
struct reader *r = &(*sst->readers)[sst->segment];
|
||||
@@ -446,11 +477,12 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
|
||||
scaled_geometry = simple_clip_poly(scaled_geometry, SHIFT_RIGHT(c.minx), SHIFT_RIGHT(c.miny), SHIFT_RIGHT(c.maxx), SHIFT_RIGHT(c.maxy), prevent[P_SIMPLIFY_SHARED_NODES]);
|
||||
} else if (sf.t == VT_LINE) {
|
||||
scaled_geometry = clip_lines(scaled_geometry, SHIFT_RIGHT(c.minx), SHIFT_RIGHT(c.miny), SHIFT_RIGHT(c.maxx), SHIFT_RIGHT(c.maxy));
|
||||
scaled_geometry = remove_noop(scaled_geometry, sf.t, 0);
|
||||
} else if (sf.t == VT_POINT) {
|
||||
scaled_geometry = clip_point(scaled_geometry, SHIFT_RIGHT(c.minx), SHIFT_RIGHT(c.miny), SHIFT_RIGHT(c.maxx), SHIFT_RIGHT(c.maxy));
|
||||
}
|
||||
|
||||
scaled_geometry = remove_noop(scaled_geometry, sf.t, 0);
|
||||
|
||||
sf.bbox[0] = LLONG_MAX;
|
||||
sf.bbox[1] = LLONG_MAX;
|
||||
sf.bbox[2] = LLONG_MIN;
|
||||
@@ -480,6 +512,100 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (prevent[P_SIMPLIFY_SHARED_NODES]) {
|
||||
scaled_geometry = remove_noop(scaled_geometry, sf.t, 0);
|
||||
|
||||
if (sf.t == VT_POLYGON || sf.t == VT_LINE) {
|
||||
for (size_t i = 0; i < scaled_geometry.size(); i++) {
|
||||
if (scaled_geometry[i].op == VT_MOVETO) {
|
||||
size_t j;
|
||||
|
||||
for (j = i + 1; j < scaled_geometry.size(); j++) {
|
||||
if (scaled_geometry[j].op != VT_LINETO) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (sf.t == VT_POLYGON && j - i >= 4) {
|
||||
for (size_t k = i; k < j - 1; k++) {
|
||||
// % (j - i - 1) because we don't want the duplicate last point
|
||||
|
||||
struct vertex v(
|
||||
scaled_geometry[(k - i + 0) % (j - i - 1) + i],
|
||||
scaled_geometry[(k - i + 1) % (j - i - 1) + i],
|
||||
scaled_geometry[(k - i + 2) % (j - i - 1) + i]);
|
||||
|
||||
fwrite_check((char *) &v, sizeof(struct vertex), 1, r->vertexfile, &r->vertexpos, sst->fname);
|
||||
}
|
||||
} else if (sf.t == VT_LINE && j - i >= 2) {
|
||||
for (size_t k = i; k + 2 < j; k++) {
|
||||
struct vertex v(
|
||||
scaled_geometry[k + 0],
|
||||
scaled_geometry[k + 1],
|
||||
scaled_geometry[k + 2]);
|
||||
|
||||
fwrite_check((char *) &v, sizeof(struct vertex), 1, r->vertexfile, &r->vertexpos, sst->fname);
|
||||
}
|
||||
}
|
||||
|
||||
// since the starting point is never simplified away,
|
||||
// don't let it be simplified away in any other polygons either.
|
||||
// Needs to appear twice here so that the check below will see
|
||||
// it as appearing in multiple features.
|
||||
add_scaled_node(r, sst, scaled_geometry[i]);
|
||||
|
||||
if (sf.t == VT_LINE && j - i >= 2) {
|
||||
// linestrings also need to preserve the last point
|
||||
|
||||
add_scaled_node(r, sst, scaled_geometry[j - 1]);
|
||||
} else if (sf.t == VT_POLYGON && j - i >= 4) {
|
||||
// To avoid letting polygons get simplified away to nothing,
|
||||
// also keep the furthest-away point from the initial point
|
||||
// (which Douglas-Peucker simplification would keep anyway,
|
||||
// if its search weren't being split up by polygon side).
|
||||
|
||||
double far = 0;
|
||||
size_t which = i;
|
||||
for (size_t k = i + 1; k < j - 1; k++) {
|
||||
double xd = scaled_geometry[k].x - scaled_geometry[i].x;
|
||||
double yd = scaled_geometry[k].y - scaled_geometry[i].y;
|
||||
double d = xd * xd + yd * yd;
|
||||
if (d > far ||
|
||||
((d == far) && (scaled_geometry[k] < scaled_geometry[which]))) {
|
||||
far = d;
|
||||
which = k;
|
||||
}
|
||||
}
|
||||
|
||||
add_scaled_node(r, sst, scaled_geometry[which]);
|
||||
|
||||
// And, likewise, the point most distant from those two points,
|
||||
// which probably would also be the one that Douglas-Peucker
|
||||
// would keep next.
|
||||
|
||||
far = 0;
|
||||
size_t which2 = i;
|
||||
|
||||
for (size_t k = i + 1; k < j - 1; k++) {
|
||||
double d = distance_from_line(scaled_geometry[k].x, scaled_geometry[k].y,
|
||||
scaled_geometry[i].x, scaled_geometry[i].y,
|
||||
scaled_geometry[which].x, scaled_geometry[which].y);
|
||||
if ((d > far) ||
|
||||
((d == far) && (scaled_geometry[k] < scaled_geometry[which2]))) {
|
||||
far = d;
|
||||
which2 = k;
|
||||
}
|
||||
}
|
||||
|
||||
add_scaled_node(r, sst, scaled_geometry[which2]);
|
||||
}
|
||||
|
||||
i = j - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!sf.has_id) {
|
||||
if (additional[A_GENERATE_IDS]) {
|
||||
sf.has_id = true;
|
||||
@@ -583,7 +709,9 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
|
||||
for (size_t i = 0; i < scaled_geometry.size(); i++) {
|
||||
ix += scaled_geometry[i].x + scaled_geometry[i].y;
|
||||
}
|
||||
ix = ix % scaled_geometry.size();
|
||||
if (scaled_geometry.size() != 0) {
|
||||
ix = ix % scaled_geometry.size();
|
||||
}
|
||||
|
||||
// If off the edge of the plane, mask to bring it back into the addressable area
|
||||
midx = SHIFT_LEFT(scaled_geometry[ix].x) & ((1LL << 32) - 1);
|
||||
|
||||
+63
-1
@@ -78,14 +78,20 @@ struct reader {
|
||||
int treefd = -1;
|
||||
int geomfd = -1;
|
||||
int indexfd = -1;
|
||||
int vertexfd = -1;
|
||||
int nodefd = -1;
|
||||
|
||||
struct memfile *poolfile = NULL;
|
||||
struct memfile *treefile = NULL;
|
||||
FILE *geomfile = NULL;
|
||||
FILE *indexfile = NULL;
|
||||
FILE *vertexfile = NULL;
|
||||
FILE *nodefile = NULL;
|
||||
|
||||
std::atomic<long long> geompos;
|
||||
std::atomic<long long> indexpos;
|
||||
std::atomic<long long> vertexpos;
|
||||
std::atomic<long long> nodepos;
|
||||
|
||||
long long file_bbox[4] = {0, 0, 0, 0};
|
||||
|
||||
@@ -97,7 +103,7 @@ struct reader {
|
||||
char *geom_map = NULL;
|
||||
|
||||
reader()
|
||||
: geompos(0), indexpos(0) {
|
||||
: geompos(0), indexpos(0), vertexpos(0), nodepos(0) {
|
||||
}
|
||||
|
||||
reader(reader const &r) {
|
||||
@@ -105,11 +111,15 @@ struct reader {
|
||||
treefd = r.treefd;
|
||||
geomfd = r.geomfd;
|
||||
indexfd = r.indexfd;
|
||||
vertexfd = r.vertexfd;
|
||||
nodefd = r.nodefd;
|
||||
|
||||
poolfile = r.poolfile;
|
||||
treefile = r.treefile;
|
||||
geomfile = r.geomfile;
|
||||
indexfile = r.indexfile;
|
||||
vertexfile = r.vertexfile;
|
||||
nodefile = r.nodefile;
|
||||
|
||||
long long p = r.geompos;
|
||||
geompos = p;
|
||||
@@ -117,6 +127,12 @@ struct reader {
|
||||
p = r.indexpos;
|
||||
indexpos = p;
|
||||
|
||||
p = r.vertexpos;
|
||||
vertexpos = p;
|
||||
|
||||
p = r.nodepos;
|
||||
nodepos = p;
|
||||
|
||||
memcpy(file_bbox, r.file_bbox, sizeof(file_bbox));
|
||||
|
||||
geomst = r.geomst;
|
||||
@@ -158,6 +174,52 @@ struct serialization_state {
|
||||
int exclude_all = 0;
|
||||
};
|
||||
|
||||
struct vertex {
|
||||
// these are scaled geometry,
|
||||
// but because scaling is disabled if P_SHARED_NODES is set,
|
||||
// they are effectively also world coordinates
|
||||
draw p1;
|
||||
draw mid;
|
||||
draw p2;
|
||||
|
||||
vertex(draw one, draw joint, draw two) {
|
||||
if (one < two) {
|
||||
p1 = one;
|
||||
p2 = two;
|
||||
} else {
|
||||
p1 = two;
|
||||
p2 = one;
|
||||
}
|
||||
|
||||
mid = joint;
|
||||
}
|
||||
|
||||
bool operator<(const vertex &v) const {
|
||||
if (mid < v.mid) {
|
||||
return true;
|
||||
} else if (mid == v.mid) {
|
||||
if (p1 < v.p1) {
|
||||
return true;
|
||||
} else if (p1 == v.p1) {
|
||||
if (p2 < v.p2) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
struct node {
|
||||
// this is in quadkey coordinates so that the nodes for each tile
|
||||
// will be adjacent in memory, reducing potential thrashing during
|
||||
// the binary search.
|
||||
unsigned long long index;
|
||||
};
|
||||
|
||||
int nodecmp(const void *void1, const void *void2);
|
||||
|
||||
int serialize_feature(struct serialization_state *sst, serial_feature &sf);
|
||||
void coerce_value(std::string const &key, int &vt, std::string &val, std::map<std::string, int> const *attribute_types);
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#define MAX_MEMORY (1024 * 1024 * 1024) // 1 GB
|
||||
|
||||
void fqsort(std::vector<FILE *> &inputs, size_t width, int (*cmp)(const void *, const void *), FILE *out, size_t mem) {
|
||||
std::string pivot;
|
||||
FILE *fp1, *fp2;
|
||||
|
||||
if (mem > MAX_MEMORY) {
|
||||
mem = MAX_MEMORY;
|
||||
}
|
||||
|
||||
{
|
||||
// read some elements into memory to choose a pivot from
|
||||
//
|
||||
// this is in its own scope so `buf` can go out of scope
|
||||
// before trying to do any sub-sorts.
|
||||
|
||||
std::string buf;
|
||||
|
||||
bool read_everything = false;
|
||||
for (size_t i = 0; i < inputs.size(); i++) {
|
||||
if (buf.size() > mem) {
|
||||
break;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
std::string element;
|
||||
element.resize(width);
|
||||
|
||||
size_t n = fread((void *) element.c_str(), width, 1, inputs[i]);
|
||||
if (n == 0) {
|
||||
if (i + 1 == inputs.size()) {
|
||||
read_everything = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
buf.append(element);
|
||||
|
||||
if (buf.size() > mem) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
qsort((void *) buf.c_str(), buf.size() / width, width, cmp);
|
||||
|
||||
// If that was everything we have to sort, we are done.
|
||||
|
||||
if (read_everything) {
|
||||
fwrite((void *) buf.c_str(), buf.size() / width, width, out);
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, choose a pivot from it, make some temporary files,
|
||||
// write what we have to those files, and then partition the rest
|
||||
// of the input into them.
|
||||
|
||||
// This would be unstable if the pivot is one of several elements
|
||||
// that compare equal. Does it matter?
|
||||
|
||||
size_t pivot_off = width * (buf.size() / width / 2);
|
||||
pivot = std::string(buf, pivot_off, width);
|
||||
|
||||
std::string t1 = "/tmp/sort1.XXXXXX";
|
||||
std::string t2 = "/tmp/sort2.XXXXXX";
|
||||
|
||||
int fd1 = mkstemp((char *) t1.c_str());
|
||||
unlink(t1.c_str());
|
||||
int fd2 = mkstemp((char *) t2.c_str());
|
||||
unlink(t2.c_str());
|
||||
|
||||
fp1 = fdopen(fd1, "w+b");
|
||||
if (fp1 == NULL) {
|
||||
perror(t1.c_str());
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
fp2 = fdopen(fd2, "w+b");
|
||||
if (fp2 == NULL) {
|
||||
perror(t2.c_str());
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
fwrite((void *) buf.c_str(), sizeof(char), pivot_off, fp1);
|
||||
fwrite((void *) ((char *) buf.c_str() + pivot_off), sizeof(char), buf.size() - pivot_off, fp2);
|
||||
}
|
||||
|
||||
// read the remaining input into the temporary files
|
||||
|
||||
for (size_t i = 0; i < inputs.size(); i++) {
|
||||
while (true) {
|
||||
std::string element;
|
||||
element.resize(width);
|
||||
|
||||
size_t n = fread((void *) element.c_str(), width, 1, inputs[i]);
|
||||
if (n == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (cmp((void *) element.c_str(), (void *) pivot.c_str()) < 0) {
|
||||
fwrite((void *) element.c_str(), width, 1, fp1);
|
||||
} else {
|
||||
fwrite((void *) element.c_str(), width, 1, fp2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now sort the sub-ranges into the output.
|
||||
|
||||
rewind(fp1);
|
||||
rewind(fp2);
|
||||
|
||||
std::vector<FILE *> v1;
|
||||
v1.emplace_back(fp1);
|
||||
fqsort(v1, width, cmp, out, mem);
|
||||
fclose(fp1);
|
||||
|
||||
std::vector<FILE *> v2;
|
||||
v2.emplace_back(fp2);
|
||||
fqsort(v2, width, cmp, out, mem);
|
||||
fclose(fp2);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef SORT_HPP
|
||||
#define SORT_HPP
|
||||
|
||||
void fqsort(std::vector<FILE *> &inputs, size_t width, int (*cmp)(const void *, const void *), FILE *out, size_t mem);
|
||||
|
||||
#endif
|
||||
+1
@@ -10,6 +10,7 @@
|
||||
"minzoom": "0",
|
||||
"name": "tests/accumulate/out/-z3_-Ethesum%3asum_-Etheproduct%3aproduct_-Ethemax%3amax_-Ethemin%3amin_-Ethemean%3amean_-Etheconcat%3aconcat_-Ethecomma%3acomma_-r1_-K100.json.check.mbtiles",
|
||||
"strategies": "[{\"coalesced_as_needed\":78},{\"coalesced_as_needed\":65},{\"coalesced_as_needed\":43},{\"coalesced_as_needed\":17}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":3,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,15 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "1.000000,2.000000,1.000000,2.000000",
|
||||
"bounds": "1.000000,2.000000,1.000000,2.000000",
|
||||
"center": "1.000000,2.000000,0",
|
||||
"description": "tests/invalid-linestring/out/-z0.json.check.mbtiles",
|
||||
"format": "pbf",
|
||||
"generator_options": "./tippecanoe -q -a@ -f -o tests/invalid-linestring/out/-z0.json.check.mbtiles -z0 tests/invalid-linestring/too-few.json",
|
||||
"json": "{\"vector_layers\":[{\"id\":\"toofew\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"toofew\",\"count\":1,\"geometry\":\"LineString\",\"attributeCount\":0,\"attributes\":[]}]}}",
|
||||
"maxzoom": "0",
|
||||
"minzoom": "0",
|
||||
"name": "tests/invalid-linestring/out/-z0.json.check.mbtiles",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
] }
|
||||
@@ -0,0 +1 @@
|
||||
{ "type": "Feature", "properties": {}, "geometry": { "type": "LineString", "coordinates": [ [ 1, 2 ] ] } }
|
||||
@@ -0,0 +1 @@
|
||||
{ "type": "Feature", "properties": { "handle": 717, "block": -1, "etype": 13, "space": 0, "layer": "0", "olinetype": "BYLAYER", "linetype": "", "color": "0,0,0,255", "ocolor": 7, "color24": -1, "transparency": 0, "lweight": -1, "linewidth": 0.0, "ltscale": 1.0, "visible": 1, "thickness": 0.0, "ext": null, "name": "SOLID", "solid": 1, "associative": 0, "hstyle": 1, "hpattern": 1, "doubleflag": 0, "angle": 0.0, "scale": 0.0, "deflines": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -135.2329619, -85.526118 ], [ -135.2329619, -85.526118 ] ] ] ] } }
|
||||
@@ -0,0 +1,15 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "180.000000,85.051129,-180.000000,-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",
|
||||
"format": "pbf",
|
||||
"generator_options": "./tippecanoe -q -a@ -f -o tests/invalid-polygon/out/-z0.json.check.mbtiles -z0 tests/invalid-polygon/in.json",
|
||||
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"angle\":\"Number\",\"associative\":\"Number\",\"block\":\"Number\",\"color\":\"String\",\"color24\":\"Number\",\"deflines\":\"Number\",\"doubleflag\":\"Number\",\"etype\":\"Number\",\"handle\":\"Number\",\"hpattern\":\"Number\",\"hstyle\":\"Number\",\"layer\":\"String\",\"linetype\":\"String\",\"linewidth\":\"Number\",\"ltscale\":\"Number\",\"lweight\":\"Number\",\"name\":\"String\",\"ocolor\":\"Number\",\"olinetype\":\"String\",\"scale\":\"Number\",\"solid\":\"Number\",\"space\":\"Number\",\"thickness\":\"Number\",\"transparency\":\"Number\",\"visible\":\"Number\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":1,\"geometry\":\"Polygon\",\"attributeCount\":25,\"attributes\":[{\"attribute\":\"angle\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":0},{\"attribute\":\"associative\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":0},{\"attribute\":\"block\",\"count\":1,\"type\":\"number\",\"values\":[-1],\"min\":-1,\"max\":-1},{\"attribute\":\"color\",\"count\":1,\"type\":\"string\",\"values\":[\"0,0,0,255\"]},{\"attribute\":\"color24\",\"count\":1,\"type\":\"number\",\"values\":[-1],\"min\":-1,\"max\":-1},{\"attribute\":\"deflines\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":0},{\"attribute\":\"doubleflag\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":0},{\"attribute\":\"etype\",\"count\":1,\"type\":\"number\",\"values\":[13],\"min\":13,\"max\":13},{\"attribute\":\"handle\",\"count\":1,\"type\":\"number\",\"values\":[717],\"min\":717,\"max\":717},{\"attribute\":\"hpattern\",\"count\":1,\"type\":\"number\",\"values\":[1],\"min\":1,\"max\":1},{\"attribute\":\"hstyle\",\"count\":1,\"type\":\"number\",\"values\":[1],\"min\":1,\"max\":1},{\"attribute\":\"layer\",\"count\":1,\"type\":\"string\",\"values\":[\"0\"]},{\"attribute\":\"linetype\",\"count\":1,\"type\":\"string\",\"values\":[\"\"]},{\"attribute\":\"linewidth\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":0},{\"attribute\":\"ltscale\",\"count\":1,\"type\":\"number\",\"values\":[1],\"min\":1,\"max\":1},{\"attribute\":\"lweight\",\"count\":1,\"type\":\"number\",\"values\":[-1],\"min\":-1,\"max\":-1},{\"attribute\":\"name\",\"count\":1,\"type\":\"string\",\"values\":[\"SOLID\"]},{\"attribute\":\"ocolor\",\"count\":1,\"type\":\"number\",\"values\":[7],\"min\":7,\"max\":7},{\"attribute\":\"olinetype\",\"count\":1,\"type\":\"string\",\"values\":[\"BYLAYER\"]},{\"attribute\":\"scale\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":0},{\"attribute\":\"solid\",\"count\":1,\"type\":\"number\",\"values\":[1],\"min\":1,\"max\":1},{\"attribute\":\"space\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":0},{\"attribute\":\"thickness\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":0},{\"attribute\":\"transparency\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":0},{\"attribute\":\"visible\",\"count\":1,\"type\":\"number\",\"values\":[1],\"min\":1,\"max\":1}]}]}}",
|
||||
"maxzoom": "0",
|
||||
"minzoom": "0",
|
||||
"name": "tests/invalid-polygon/out/-z0.json.check.mbtiles",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
] }
|
||||
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
||||
"generator_options": "./tippecanoe -q -f -z12 -o tests/join-population/tabblock_06001420.mbtiles '-YALAND10:Land area' '-L{\"file\": \"tests/join-population/tabblock_06001420.json\", \"description\": \"population\"}'; ./tile-join --quiet --force --no-tile-stats -o tests/join-population/joined-no-tile-stats.mbtiles -x GEOID10 -c tests/join-population/population.csv tests/join-population/tabblock_06001420.mbtiles",
|
||||
"json": "{\"vector_layers\":[{\"id\":\"tabblock_06001420\",\"description\":\"population\",\"minzoom\":3,\"maxzoom\":12,\"fields\":{\"ALAND10\":\"Land area\",\"AWATER10\":\"Number\",\"BLOCKCE10\":\"String\",\"COUNTYFP10\":\"String\",\"FUNCSTAT10\":\"String\",\"INTPTLAT10\":\"String\",\"INTPTLON10\":\"String\",\"MTFCC10\":\"String\",\"NAME10\":\"String\",\"STATEFP10\":\"String\",\"TRACTCE10\":\"String\",\"UACE10\":\"String\",\"UATYP10\":\"String\",\"UR10\":\"String\",\"population\":\"Mixed\"}}]}",
|
||||
"maxzoom": "12",
|
||||
"minzoom": "0",
|
||||
"minzoom": "3",
|
||||
"name": "tests/join-population/tabblock_06001420.mbtiles",
|
||||
"strategies": "[{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":258},{\"tiny_polygons\":255},{\"tiny_polygons\":248},{\"tiny_polygons\":151},{\"tiny_polygons\":75},{\"tiny_polygons\":47}]",
|
||||
"type": "overlay",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@
|
||||
"generator_options": "./tippecanoe -q -f -z12 -o tests/join-population/tabblock_06001420.mbtiles '-YALAND10:Land area' '-L{\"file\": \"tests/join-population/tabblock_06001420.json\", \"description\": \"population\"}'; ./tile-join --quiet --force '--tile-stats-sample-values-limit=1' -o tests/join-population/joined-tile-stats-sample-values-limit.mbtiles -x GEOID10 -c tests/join-population/population.csv tests/join-population/tabblock_06001420.mbtiles",
|
||||
"json": "{\"vector_layers\":[{\"id\":\"tabblock_06001420\",\"description\":\"population\",\"minzoom\":3,\"maxzoom\":12,\"fields\":{\"ALAND10\":\"Land area\",\"AWATER10\":\"Number\",\"BLOCKCE10\":\"String\",\"COUNTYFP10\":\"String\",\"FUNCSTAT10\":\"String\",\"INTPTLAT10\":\"String\",\"INTPTLON10\":\"String\",\"MTFCC10\":\"String\",\"NAME10\":\"String\",\"STATEFP10\":\"String\",\"TRACTCE10\":\"String\",\"UACE10\":\"String\",\"UATYP10\":\"String\",\"UR10\":\"String\",\"population\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"tabblock_06001420\",\"count\":1484,\"geometry\":\"Polygon\",\"attributeCount\":15,\"attributes\":[{\"attribute\":\"ALAND10\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":542505},{\"attribute\":\"AWATER10\",\"count\":1,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":1632801},{\"attribute\":\"BLOCKCE10\",\"count\":1,\"type\":\"string\",\"values\":[\"1000\"]},{\"attribute\":\"COUNTYFP10\",\"count\":1,\"type\":\"string\",\"values\":[\"001\"]},{\"attribute\":\"FUNCSTAT10\",\"count\":1,\"type\":\"string\",\"values\":[\"S\"]},{\"attribute\":\"INTPTLAT10\",\"count\":1,\"type\":\"string\",\"values\":[\"+37.882724\"]},{\"attribute\":\"INTPTLON10\",\"count\":1,\"type\":\"string\",\"values\":[\"-122.282320\"]},{\"attribute\":\"MTFCC10\",\"count\":1,\"type\":\"string\",\"values\":[\"G5040\"]},{\"attribute\":\"NAME10\",\"count\":1,\"type\":\"string\",\"values\":[\"Block 1000\"]},{\"attribute\":\"STATEFP10\",\"count\":1,\"type\":\"string\",\"values\":[\"06\"]},{\"attribute\":\"TRACTCE10\",\"count\":1,\"type\":\"string\",\"values\":[\"420100\"]},{\"attribute\":\"UACE10\",\"count\":1,\"type\":\"string\",\"values\":[\"78904\"]},{\"attribute\":\"UATYP10\",\"count\":1,\"type\":\"string\",\"values\":[\"U\"]},{\"attribute\":\"UR10\",\"count\":1,\"type\":\"string\",\"values\":[\"R\"]},{\"attribute\":\"population\",\"count\":1,\"type\":\"string\",\"values\":[\"\"]}]}]}}",
|
||||
"maxzoom": "12",
|
||||
"minzoom": "0",
|
||||
"minzoom": "3",
|
||||
"name": "tests/join-population/tabblock_06001420.mbtiles",
|
||||
"strategies": "[{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":258},{\"tiny_polygons\":255},{\"tiny_polygons\":248},{\"tiny_polygons\":151},{\"tiny_polygons\":75},{\"tiny_polygons\":47}]",
|
||||
"type": "overlay",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"generator_options": "./tippecanoe -q -f -z12 -o tests/join-population/tabblock_06001420.mbtiles '-YALAND10:Land area' '-L{\"file\": \"tests/join-population/tabblock_06001420.json\", \"description\": \"population\"}'; ./tile-join --quiet --force '--tile-stats-values-limit=1' -o tests/join-population/joined-tile-stats-values-limit.mbtiles -x GEOID10 -c tests/join-population/population.csv tests/join-population/tabblock_06001420.mbtiles",
|
||||
"json": "{\"vector_layers\":[{\"id\":\"tabblock_06001420\",\"description\":\"population\",\"minzoom\":3,\"maxzoom\":12,\"fields\":{\"ALAND10\":\"Land area\",\"AWATER10\":\"Number\",\"BLOCKCE10\":\"String\",\"COUNTYFP10\":\"String\",\"FUNCSTAT10\":\"String\",\"INTPTLAT10\":\"String\",\"INTPTLON10\":\"String\",\"MTFCC10\":\"String\",\"NAME10\":\"String\",\"STATEFP10\":\"String\",\"TRACTCE10\":\"String\",\"UACE10\":\"String\",\"UATYP10\":\"String\",\"UR10\":\"String\",\"population\":\"Mixed\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"tabblock_06001420\",\"count\":1484,\"geometry\":\"Polygon\",\"attributeCount\":15,\"attributes\":[{\"attribute\":\"ALAND10\",\"count\":257,\"type\":\"number\",\"values\":[0],\"min\":0,\"max\":542505}]}]}}",
|
||||
"maxzoom": "12",
|
||||
"minzoom": "0",
|
||||
"minzoom": "3",
|
||||
"name": "tests/join-population/tabblock_06001420.mbtiles",
|
||||
"strategies": "[{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":258},{\"tiny_polygons\":255},{\"tiny_polygons\":248},{\"tiny_polygons\":151},{\"tiny_polygons\":75},{\"tiny_polygons\":47}]",
|
||||
"type": "overlay",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,13 +2,13 @@
|
||||
"antimeridian_adjusted_bounds": "237.656250,37.857507,237.744141,37.926868",
|
||||
"attribution": "macarthur's attribution",
|
||||
"bounds": "-122.343750,37.695438,-122.104097,37.926868",
|
||||
"center": "-122.299805,37.892187,12",
|
||||
"center": "-122.299805,37.892187,11",
|
||||
"description": "macarthur description",
|
||||
"format": "pbf",
|
||||
"generator_options": "./tippecanoe -q -f -Z5 -z10 -o tests/join-population/macarthur.mbtiles -l macarthur tests/join-population/macarthur.json; ./tippecanoe -q -f -d10 -D10 -Z9 -z11 -o tests/join-population/macarthur2.mbtiles -l macarthur tests/join-population/macarthur2.json; ./tippecanoe -q -f -z12 -o tests/join-population/tabblock_06001420.mbtiles '-YALAND10:Land area' '-L{\"file\": \"tests/join-population/tabblock_06001420.json\", \"description\": \"population\"}'; ./tile-join -q -f -o tests/join-population/merged.mbtiles tests/join-population/tabblock_06001420.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur2.mbtiles; ./tile-join -q -f -l macarthur -n 'macarthur name' -N 'macarthur description' -A 'macarthur'\"'\"'s attribution' -o tests/join-population/just-macarthur.mbtiles tests/join-population/merged.mbtiles",
|
||||
"json": "{\"vector_layers\":[{\"id\":\"macarthur\",\"description\":\"\",\"minzoom\":5,\"maxzoom\":11,\"fields\":{\"FULLNAME\":\"String\",\"LINEARID\":\"String\",\"MTFCC\":\"String\",\"RTTYP\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"macarthur\",\"count\":171,\"geometry\":\"LineString\",\"attributeCount\":4,\"attributes\":[{\"attribute\":\"FULLNAME\",\"count\":5,\"type\":\"string\",\"values\":[\"Macarthur\",\"Macarthur Blvd\",\"Macarthur Fwy\",\"W Macarthur\",\"W Macarthur Blvd\"]},{\"attribute\":\"LINEARID\",\"count\":42,\"type\":\"string\",\"values\":[\"1102155930810\",\"1102156217102\",\"1102156241736\",\"1102156248968\",\"1102156510290\",\"1102157651658\",\"1102406970092\",\"1102406970093\",\"1102406970094\",\"1102406970095\",\"1102407366406\",\"1102638069562\",\"1102638078801\",\"1102654601627\",\"1102654601663\",\"1102654602215\",\"1102954189105\",\"1102954918511\",\"1103690383700\",\"1103690474249\",\"1103690474250\",\"1103690483026\",\"1103690483032\",\"1103717593123\",\"1104469713187\",\"1104469713198\",\"1104474748623\",\"1104475134288\",\"1104475134436\",\"1104485605278\",\"1104485645649\",\"1104485773833\",\"1104486090991\",\"1104486392881\",\"1105089436004\",\"1105089465114\",\"1105089465116\",\"1105281275434\",\"1105281275687\",\"1105281275688\",\"1105281275689\",\"1105281275692\"]},{\"attribute\":\"MTFCC\",\"count\":2,\"type\":\"string\",\"values\":[\"S1100\",\"S1400\"]},{\"attribute\":\"RTTYP\",\"count\":1,\"type\":\"string\",\"values\":[\"M\"]}]}]}}",
|
||||
"maxzoom": "12",
|
||||
"minzoom": "0",
|
||||
"maxzoom": "11",
|
||||
"minzoom": "5",
|
||||
"name": "macarthur name",
|
||||
"strategies": "[{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":258},{\"tiny_polygons\":255},{\"tiny_polygons\":248},{\"tiny_polygons\":151},{\"tiny_polygons\":75},{\"tiny_polygons\":47}]",
|
||||
"type": "overlay",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -8,6 +8,7 @@
|
||||
"maxzoom": "0",
|
||||
"minzoom": "0",
|
||||
"name": "tests/layer-json/out.mbtiles",
|
||||
"tippecanoe_decisions": "{\"basezoom\":0,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[
|
||||
{ "zoom": 11, "x": 326, "y": 791, "bytes": 376, "compressed": true, "layers": { "muni": { "points": 14, "lines": 0, "polygons": 0, "extent": 4096 } } }
|
||||
,
|
||||
{ "zoom": 11, "x": 327, "y": 792, "bytes": 6533, "compressed": true, "layers": { "muni": { "points": 528, "lines": 0, "polygons": 0, "extent": 4096 } } }
|
||||
{ "zoom": 11, "x": 327, "y": 792, "bytes": 6543, "compressed": true, "layers": { "muni": { "points": 528, "lines": 0, "polygons": 0, "extent": 4096 } } }
|
||||
,
|
||||
{ "zoom": 11, "x": 327, "y": 791, "bytes": 45265, "compressed": true, "layers": { "muni": { "points": 4284, "lines": 0, "polygons": 0, "extent": 4096 }, "subway": { "points": 19, "lines": 0, "polygons": 0, "extent": 4096 } } }
|
||||
{ "zoom": 11, "x": 327, "y": 791, "bytes": 45475, "compressed": true, "layers": { "muni": { "points": 4284, "lines": 0, "polygons": 0, "extent": 4096 }, "subway": { "points": 19, "lines": 0, "polygons": 0, "extent": 4096 } } }
|
||||
,
|
||||
{ "zoom": 11, "x": 954, "y": 791, "bytes": 75, "compressed": true, "layers": { "muni": { "points": 12, "lines": 0, "polygons": 0, "extent": 4096 } } }
|
||||
]
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "11",
|
||||
"name": "tests/muni/out/-Z11_-z13_-B15.json.check.mbtiles",
|
||||
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{\"dropped_by_rate\":4727},{\"dropped_by_rate\":4643},{\"dropped_by_rate\":4210}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":15,\"droprate\":2.5,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "11",
|
||||
"name": "tests/muni/out/-Z11_-z13_-Bf2000.json.check.mbtiles",
|
||||
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{\"dropped_by_rate\":2910},{},{}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":12,\"droprate\":2.5,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"maxzoom": "13",
|
||||
"minzoom": "11",
|
||||
"name": "tests/muni/out/-Z11_-z13_-M10000.json.check.mbtiles",
|
||||
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{\"dropped_by_rate\":18540,\"detail_reduced\":4,\"tile_size_desired\":10857},{\"dropped_by_rate\":6391,\"detail_reduced\":3,\"tile_size_desired\":10700},{}]",
|
||||
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{\"dropped_by_rate\":18540,\"detail_reduced\":4,\"tile_size_desired\":10887},{\"dropped_by_rate\":6391,\"detail_reduced\":3,\"tile_size_desired\":10721},{}]",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,7 @@
|
||||
"maxzoom": "13",
|
||||
"minzoom": "11",
|
||||
"name": "tests/muni/out/-Z11_-z13_-M5000_-as.json.check.mbtiles",
|
||||
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{\"dropped_by_rate\":4080,\"dropped_as_needed\":482,\"tile_size_desired\":10857},{\"dropped_by_rate\":2974,\"dropped_as_needed\":1304,\"tile_size_desired\":10700},{\"dropped_as_needed\":3036,\"tile_size_desired\":9646}]",
|
||||
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{\"dropped_by_rate\":4080,\"dropped_as_needed\":482,\"tile_size_desired\":10887},{\"dropped_by_rate\":2974,\"dropped_as_needed\":1302,\"tile_size_desired\":10721},{\"dropped_as_needed\":3042,\"tile_size_desired\":9664}]",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
@@ -645,6 +645,8 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Gonzalez Dr. & Crespi Dr." }, "geometry": { "type": "Point", "coordinates": [ -122.475564, 37.719694 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Garfield St & Beverly St" }, "geometry": { "type": "Point", "coordinates": [ -122.471530, 37.719728 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Garfield St & Byxbee St" }, "geometry": { "type": "Point", "coordinates": [ -122.469728, 37.719745 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Garfield St & Victoria St" }, "geometry": { "type": "Point", "coordinates": [ -122.465436, 37.719609 ] } }
|
||||
@@ -993,6 +995,8 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Irving St & 2nd Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.764439 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Frederick St & Willard St" }, "geometry": { "type": "Point", "coordinates": [ -122.454686, 37.766084 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Lawton St & 7th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.464085, 37.758603 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "1697 7th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.463570, 37.756771 ] } }
|
||||
@@ -1005,7 +1009,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Geary Blvd & Collins St" }, "geometry": { "type": "Point", "coordinates": [ -122.449987, 37.782231 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Euclid Ave & Presidio Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.446640, 37.785232 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Presidio Ave & California St" }, "geometry": { "type": "Point", "coordinates": [ -122.446725, 37.787369 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Sutter St & Baker St" }, "geometry": { "type": "Point", "coordinates": [ -122.443292, 37.784758 ] } }
|
||||
,
|
||||
@@ -2569,8 +2573,6 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Clement St & 20th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.479845, 37.782307 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Clement St & 20th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.479137, 37.782222 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Geary Blvd & 20th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.479481, 37.780221 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Clement St & 18th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.477506, 37.782290 ] } }
|
||||
@@ -2815,7 +2817,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Broad St & Arch St" }, "geometry": { "type": "Point", "coordinates": [ -122.467378, 37.712514 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Alemany Blvd & St Charles Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.469460, 37.710358 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "St Charles Ave & Alemany Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.469331, 37.710281 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Randolph St & Arch St" }, "geometry": { "type": "Point", "coordinates": [ -122.467217, 37.714203 ] } }
|
||||
,
|
||||
@@ -3017,7 +3019,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Ulloa St & Lenox Way" }, "geometry": { "type": "Point", "coordinates": [ -122.466263, 37.741170 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "West Portal Station Inbound" }, "geometry": { "type": "Point", "coordinates": [ -122.465522, 37.741153 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "West Portal Ave & Ulloa St" }, "geometry": { "type": "Point", "coordinates": [ -122.465909, 37.740763 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "West Portal Ave & 14th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.469052, 37.738099 ] } }
|
||||
,
|
||||
@@ -3071,7 +3073,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "MYRA WAY & DALEWOOD" }, "geometry": { "type": "Point", "coordinates": [ -122.453946, 37.736690 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "19th Ave & Sloat Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.474974, 37.734713 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Sloat Blvd & 19th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.474492, 37.734781 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "19th Ave & Ocean Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.475103, 37.732787 ] } }
|
||||
,
|
||||
@@ -3135,8 +3137,6 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Plymouth Ave & Mangels Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.457765, 37.732236 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Plymouth Ave & Mangels Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.457647, 37.732092 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Monterey Blvd & Faxon Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.459085, 37.730691 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Plymouth Ave & Monterey Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.457529, 37.731107 ] } }
|
||||
@@ -3501,8 +3501,6 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Clement St & 10th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.468998, 37.782799 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Clement St & 10th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.468365, 37.782697 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Geary Blvd & 9th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.467647, 37.780984 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Clement St & 8th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.466874, 37.782901 ] } }
|
||||
@@ -3559,7 +3557,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Euclid Ave & Jordan Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.456961, 37.783859 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "California St & Cherry St" }, "geometry": { "type": "Point", "coordinates": [ -122.456328, 37.785970 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "California St & Maple St" }, "geometry": { "type": "Point", "coordinates": [ -122.455212, 37.786250 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Euclid Ave & Parker Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.454751, 37.783961 ] } }
|
||||
,
|
||||
@@ -3985,7 +3983,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Ortega St & 10th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.466477, 37.752886 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "9th Ave & Ortega St" }, "geometry": { "type": "Point", "coordinates": [ -122.465630, 37.752937 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Ortega St & 9th Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.465630, 37.752776 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Clarendon Ave & Galewood Circle" }, "geometry": { "type": "Point", "coordinates": [ -122.455856, 37.753073 ] } }
|
||||
,
|
||||
@@ -4003,8 +4001,6 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Fillmore St & Grove St" }, "geometry": { "type": "Point", "coordinates": [ -122.431372, 37.776999 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Hayes St & Fillmore St" }, "geometry": { "type": "Point", "coordinates": [ -122.430836, 37.775803 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Fillmore St & Oak St" }, "geometry": { "type": "Point", "coordinates": [ -122.430825, 37.774268 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "14th St & Sanchez St" }, "geometry": { "type": "Point", "coordinates": [ -122.431276, 37.767534 ] } }
|
||||
@@ -4127,7 +4123,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Fillmore St & Chestnut St" }, "geometry": { "type": "Point", "coordinates": [ -122.436469, 37.800892 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Fillmore St & Lombard St" }, "geometry": { "type": "Point", "coordinates": [ -122.435954, 37.799705 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Fillmore St & Lombard St" }, "geometry": { "type": "Point", "coordinates": [ -122.436050, 37.799595 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Steiner St & Union St" }, "geometry": { "type": "Point", "coordinates": [ -122.437059, 37.796789 ] } }
|
||||
,
|
||||
@@ -4249,7 +4245,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Sunnydale Ave & Santos St" }, "geometry": { "type": "Point", "coordinates": [ -122.417532, 37.712233 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Visitacion Ave & Hahn St" }, "geometry": { "type": "Point", "coordinates": [ -122.415183, 37.713532 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Hahn St & Visitacion Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.415226, 37.713396 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Hahn St & Sunnydale Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.416052, 37.712021 ] } }
|
||||
,
|
||||
@@ -4497,7 +4493,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Bernal Heights Blvd & Powhattan St" }, "geometry": { "type": "Point", "coordinates": [ -122.411224, 37.741450 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Bernal Heights Blvd & Powhattan Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.410666, 37.741510 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Bernal Heights Blvd & Bradford St" }, "geometry": { "type": "Point", "coordinates": [ -122.409775, 37.741832 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Cortland Ave & Ellsworth St" }, "geometry": { "type": "Point", "coordinates": [ -122.414614, 37.738829 ] } }
|
||||
,
|
||||
@@ -4579,7 +4575,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Crescent Ave & Anderson St" }, "geometry": { "type": "Point", "coordinates": [ -122.415687, 37.734892 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "945 Ellsworth St" }, "geometry": { "type": "Point", "coordinates": [ -122.417758, 37.732813 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "909 Ellsworth St" }, "geometry": { "type": "Point", "coordinates": [ -122.416792, 37.732838 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "831 Ellsworth St" }, "geometry": { "type": "Point", "coordinates": [ -122.415258, 37.733271 ] } }
|
||||
,
|
||||
@@ -4947,8 +4943,6 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Fillmore St & Grove St" }, "geometry": { "type": "Point", "coordinates": [ -122.431372, 37.776999 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Hayes St & Fillmore St" }, "geometry": { "type": "Point", "coordinates": [ -122.430836, 37.775803 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Hayes St & Webster St" }, "geometry": { "type": "Point", "coordinates": [ -122.429881, 37.776057 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Mcallister St & Laguna St" }, "geometry": { "type": "Point", "coordinates": [ -122.426952, 37.779187 ] } }
|
||||
@@ -5027,11 +5021,11 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Ellis St & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.413155, 37.784876 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Eddy St & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.412425, 37.783884 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Post St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.411320, 37.787878 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Geary Blvd & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.411685, 37.786979 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Geary Blvd & Mason St" }, "geometry": { "type": "Point", "coordinates": [ -122.410280, 37.787174 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "O'Farrell St & Mason St" }, "geometry": { "type": "Point", "coordinates": [ -122.410655, 37.786038 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Ellis St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.411449, 37.785088 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Eddy St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.410784, 37.784105 ] } }
|
||||
,
|
||||
@@ -5091,7 +5085,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Hermann St & Fillmore St" }, "geometry": { "type": "Point", "coordinates": [ -122.429924, 37.770308 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Church St & Duboce Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.429162, 37.769502 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Duboce Ave & Church St - Ramp" }, "geometry": { "type": "Point", "coordinates": [ -122.429130, 37.769460 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429087, 37.767772 ] } }
|
||||
,
|
||||
@@ -5399,7 +5393,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "20th St & Rhode Island St" }, "geometry": { "type": "Point", "coordinates": [ -122.402233, 37.759621 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Southern Heights Ave & Rhode Island St" }, "geometry": { "type": "Point", "coordinates": [ -122.401772, 37.758391 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "De Haro St & 19th St" }, "geometry": { "type": "Point", "coordinates": [ -122.401117, 37.760936 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "De Haro St & 20th St" }, "geometry": { "type": "Point", "coordinates": [ -122.401031, 37.759663 ] } }
|
||||
,
|
||||
@@ -5447,7 +5441,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Tennessee St & 18th St" }, "geometry": { "type": "Point", "coordinates": [ -122.389659, 37.762904 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "18th St & 3rd St" }, "geometry": { "type": "Point", "coordinates": [ -122.388929, 37.762988 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "3rd St & Mariposa St" }, "geometry": { "type": "Point", "coordinates": [ -122.388843, 37.762971 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Connecticut St & 19th St" }, "geometry": { "type": "Point", "coordinates": [ -122.397469, 37.761326 ] } }
|
||||
,
|
||||
@@ -5533,7 +5527,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Jefferson St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.413359, 37.808597 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Beach St & Mason St" }, "geometry": { "type": "Point", "coordinates": [ -122.414120, 37.807411 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "North Point St & Mason St" }, "geometry": { "type": "Point", "coordinates": [ -122.414238, 37.806563 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "North Point St & Mason St" }, "geometry": { "type": "Point", "coordinates": [ -122.413455, 37.806520 ] } }
|
||||
,
|
||||
@@ -5675,7 +5669,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Hyde St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.417296, 37.790167 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Bush St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.416577, 37.789150 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Sutter St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.416910, 37.788217 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Sutter St & Leavenworth St" }, "geometry": { "type": "Point", "coordinates": [ -122.415268, 37.788429 ] } }
|
||||
,
|
||||
@@ -5711,8 +5705,6 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Bay St & Midway St" }, "geometry": { "type": "Point", "coordinates": [ -122.409164, 37.806097 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Kearny St & North Point St" }, "geometry": { "type": "Point", "coordinates": [ -122.407211, 37.807182 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "The Embarcadero & Bay St" }, "geometry": { "type": "Point", "coordinates": [ -122.406278, 37.806944 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "The Embarcadero & Bay St" }, "geometry": { "type": "Point", "coordinates": [ -122.405430, 37.806614 ] } }
|
||||
@@ -5777,7 +5769,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Clay St & Kearny St" }, "geometry": { "type": "Point", "coordinates": [ -122.404411, 37.794474 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Powell St & California St" }, "geometry": { "type": "Point", "coordinates": [ -122.409292, 37.792210 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Powell St & California St" }, "geometry": { "type": "Point", "coordinates": [ -122.409142, 37.792304 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "California St & Stockton St" }, "geometry": { "type": "Point", "coordinates": [ -122.407554, 37.792312 ] } }
|
||||
,
|
||||
@@ -5815,7 +5807,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Bush St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.399765, 37.791312 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Market St & Sansome St" }, "geometry": { "type": "Point", "coordinates": [ -122.400409, 37.790159 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "2nd St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.401310, 37.789065 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Broadway & Davis St" }, "geometry": { "type": "Point", "coordinates": [ -122.398585, 37.798967 ] } }
|
||||
,
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "11",
|
||||
"name": "tests/muni/out/-Z11_-z13_-rf2000.json.check.mbtiles",
|
||||
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{\"dropped_by_rate\":2542},{\"dropped_by_rate\":1547},{}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":13,\"droprate\":1.4510341140028376,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "11",
|
||||
"name": "tests/muni/out/-Z11_-z13_-rf2000_-Bg.json.check.mbtiles",
|
||||
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{\"dropped_by_rate\":2546},{},{}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":12,\"droprate\":2.1055,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "11",
|
||||
"name": "tests/muni/out/-Z11_-z13_-rf2000_-g2.json.check.mbtiles",
|
||||
"strategies": "[{},{},{},{},{},{},{},{},{},{},{},{\"dropped_by_rate\":1349,\"dropped_by_gamma\":963},{\"dropped_by_rate\":747,\"dropped_by_gamma\":752},{\"dropped_by_gamma\":514}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":13,\"droprate\":1.176222768016331,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "0",
|
||||
"name": "tests/muni/out/-r1_-K20.json.check.mbtiles",
|
||||
"strategies": "[{\"coalesced_as_needed\":4608},{\"coalesced_as_needed\":4608},{\"coalesced_as_needed\":4608},{\"coalesced_as_needed\":4608},{\"coalesced_as_needed\":4608},{\"coalesced_as_needed\":4607},{\"coalesced_as_needed\":4607},{\"coalesced_as_needed\":4606},{\"coalesced_as_needed\":6005},{\"coalesced_as_needed\":5393},{\"coalesced_as_needed\":5012},{\"coalesced_as_needed\":4727},{\"coalesced_as_needed\":4577},{\"coalesced_as_needed\":4003},{\"coalesced_as_needed\":3005}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":14,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
+23842
File diff suppressed because it is too large
Load Diff
+34708
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+308
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,7 +9,8 @@
|
||||
"maxzoom": "5",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--drop-fraction-as-needed.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_as_needed\":164,\"tile_size_desired\":39190},{\"dropped_as_needed\":187,\"tile_size_desired\":25154},{\"dropped_as_needed\":190,\"tiny_polygons\":1,\"tile_size_desired\":21201},{\"dropped_as_needed\":181,\"tile_size_desired\":10758},{\"dropped_as_needed\":147,\"tile_size_desired\":6601},{\"tiny_polygons\":2}]",
|
||||
"strategies": "[{\"dropped_as_needed\":164,\"tile_size_desired\":39241},{\"dropped_as_needed\":187,\"tile_size_desired\":25163},{\"dropped_as_needed\":190,\"tiny_polygons\":1,\"tile_size_desired\":21214},{\"dropped_as_needed\":181,\"tile_size_desired\":10758},{\"dropped_as_needed\":147,\"tile_size_desired\":6601},{\"tiny_polygons\":2}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":0,\"droprate\":2.5,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
@@ -23,23 +24,23 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Germany", "sov_a3": "DEU", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Germany", "adm0_a3": "DEU", "geou_dif": 0, "geounit": "Germany", "gu_a3": "DEU", "su_dif": 0, "subunit": "Germany", "su_a3": "DEU", "brk_diff": 0, "name": "Germany", "name_long": "Germany", "brk_a3": "DEU", "brk_name": "Germany", "abbrev": "Ger.", "postal": "D", "formal_en": "Federal Republic of Germany", "name_sort": "Germany", "mapcolor7": 2, "mapcolor8": 5, "mapcolor9": 5, "mapcolor13": 1, "pop_est": 82329758, "gdp_md_est": 2918000, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "1. Developed region: G7", "income_grp": "1. High income: OECD", "wikipedia": -99, "iso_a2": "DE", "iso_a3": "DEU", "iso_n3": "276", "un_a3": "276", "wb_a2": "DE", "wb_a3": "DEU", "woe_id": -99, "adm0_a3_is": "DEU", "adm0_a3_us": "DEU", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Western Europe", "region_wb": "Europe & Central Asia", "name_len": 7, "long_len": 7, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 9.931641, 54.977614 ], [ 9.931641, 54.572062 ], [ 10.986328, 54.367759 ], [ 10.898438, 54.007769 ], [ 11.953125, 54.213861 ], [ 12.480469, 54.470038 ], [ 13.623047, 54.059388 ], [ 14.150391, 53.748711 ], [ 14.326172, 53.225768 ], [ 14.062500, 52.961875 ], [ 14.414062, 52.643063 ], [ 14.677734, 52.106505 ], [ 14.589844, 51.727028 ], [ 15.029297, 51.124213 ], [ 14.589844, 51.013755 ], [ 14.326172, 51.124213 ], [ 14.062500, 50.903033 ], [ 13.359375, 50.736455 ], [ 13.007812, 50.457504 ], [ 12.216797, 50.289339 ], [ 12.480469, 49.553726 ], [ 13.623047, 48.864715 ], [ 13.271484, 48.400032 ], [ 12.919922, 48.283193 ], [ 13.007812, 47.635784 ], [ 12.919922, 47.457809 ], [ 12.656250, 47.694974 ], [ 12.128906, 47.694974 ], [ 11.425781, 47.517201 ], [ 10.546875, 47.576526 ], [ 10.371094, 47.279229 ], [ 9.931641, 47.576526 ], [ 9.580078, 47.517201 ], [ 8.525391, 47.813155 ], [ 8.349609, 47.635784 ], [ 7.470703, 47.635784 ], [ 7.558594, 48.341646 ], [ 8.085938, 49.037868 ], [ 6.679688, 49.210420 ], [ 6.152344, 49.439557 ], [ 6.240234, 49.894634 ], [ 6.064453, 50.120578 ], [ 6.152344, 50.792047 ], [ 5.976562, 51.835778 ], [ 6.591797, 51.835778 ], [ 6.855469, 52.214339 ], [ 7.119141, 53.120405 ], [ 6.943359, 53.488046 ], [ 7.119141, 53.696706 ], [ 7.910156, 53.748711 ], [ 8.085938, 53.540307 ], [ 8.789062, 54.007769 ], [ 8.613281, 54.418930 ], [ 8.525391, 54.977614 ], [ 9.316406, 54.826008 ], [ 9.931641, 54.977614 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 6, "sovereignt": "Kosovo", "sov_a3": "KOS", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Kosovo", "adm0_a3": "KOS", "geou_dif": 0, "geounit": "Kosovo", "gu_a3": "KOS", "su_dif": 0, "subunit": "Kosovo", "su_a3": "KOS", "brk_diff": 1, "name": "Kosovo", "name_long": "Kosovo", "brk_a3": "B57", "brk_name": "Kosovo", "abbrev": "Kos.", "postal": "KO", "formal_en": "Republic of Kosovo", "note_brk": "Self admin.; Claimed by Serbia", "name_sort": "Kosovo", "mapcolor7": 2, "mapcolor8": 2, "mapcolor9": 3, "mapcolor13": 11, "pop_est": 1804838, "gdp_md_est": 5352, "pop_year": -99, "lastcensus": 1981, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "-99", "iso_a3": "-99", "iso_n3": "-99", "un_a3": "-099", "wb_a2": "KV", "wb_a3": "KSV", "woe_id": -99, "adm0_a3_is": "SRB", "adm0_a3_us": "KOS", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Southern Europe", "region_wb": "Europe & Central Asia", "name_len": 6, "long_len": 6, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 20.830078, 43.261206 ], [ 21.621094, 42.682435 ], [ 21.796875, 42.682435 ], [ 21.533203, 42.228517 ], [ 20.742188, 42.032974 ], [ 20.742188, 41.836828 ], [ 20.566406, 41.836828 ], [ 20.566406, 42.228517 ], [ 20.039062, 42.617791 ], [ 20.214844, 42.811522 ], [ 20.478516, 42.875964 ], [ 20.654297, 43.197167 ], [ 20.830078, 43.261206 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 6, "sovereignt": "Montenegro", "sov_a3": "MNE", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Montenegro", "adm0_a3": "MNE", "geou_dif": 0, "geounit": "Montenegro", "gu_a3": "MNE", "su_dif": 0, "subunit": "Montenegro", "su_a3": "MNE", "brk_diff": 0, "name": "Montenegro", "name_long": "Montenegro", "brk_a3": "MNE", "brk_name": "Montenegro", "abbrev": "Mont.", "postal": "ME", "formal_en": "Montenegro", "name_sort": "Montenegro", "mapcolor7": 4, "mapcolor8": 1, "mapcolor9": 4, "mapcolor13": 5, "pop_est": 672180, "gdp_md_est": 6816, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "ME", "iso_a3": "MNE", "iso_n3": "499", "un_a3": "499", "wb_a2": "ME", "wb_a3": "MNE", "woe_id": -99, "adm0_a3_is": "MNE", "adm0_a3_us": "MNE", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Southern Europe", "region_wb": "Europe & Central Asia", "name_len": 10, "long_len": 10, "abbrev_len": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 19.248047, 43.516689 ], [ 19.599609, 43.197167 ], [ 20.302734, 42.875964 ], [ 20.039062, 42.617791 ], [ 19.775391, 42.488302 ], [ 19.775391, 42.682435 ], [ 19.335938, 42.163403 ], [ 19.335938, 41.902277 ], [ 18.457031, 42.488302 ], [ 18.720703, 43.197167 ], [ 19.248047, 43.516689 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 5, "sovereignt": "Georgia", "sov_a3": "GEO", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Georgia", "adm0_a3": "GEO", "geou_dif": 0, "geounit": "Georgia", "gu_a3": "GEO", "su_dif": 0, "subunit": "Georgia", "su_a3": "GEO", "brk_diff": 0, "name": "Georgia", "name_long": "Georgia", "brk_a3": "GEO", "brk_name": "Georgia", "abbrev": "Geo.", "postal": "GE", "formal_en": "Georgia", "name_sort": "Georgia", "mapcolor7": 5, "mapcolor8": 1, "mapcolor9": 3, "mapcolor13": 2, "pop_est": 4615807, "gdp_md_est": 21510, "pop_year": -99, "lastcensus": 2002, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "GE", "iso_a3": "GEO", "iso_n3": "268", "un_a3": "268", "wb_a2": "GE", "wb_a3": "GEO", "woe_id": -99, "adm0_a3_is": "GEO", "adm0_a3_us": "GEO", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "Western Asia", "region_wb": "Europe & Central Asia", "name_len": 7, "long_len": 7, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 40.078125, 43.580391 ], [ 42.363281, 43.197167 ], [ 43.769531, 42.747012 ], [ 43.945312, 42.553080 ], [ 44.560547, 42.682435 ], [ 45.439453, 42.488302 ], [ 45.791016, 42.098222 ], [ 46.406250, 41.836828 ], [ 46.142578, 41.705729 ], [ 46.669922, 41.178654 ], [ 46.494141, 41.046217 ], [ 45.966797, 41.112469 ], [ 45.175781, 41.442726 ], [ 45.000000, 41.244772 ], [ 43.593750, 41.112469 ], [ 42.626953, 41.574361 ], [ 41.572266, 41.508577 ], [ 41.660156, 41.967659 ], [ 41.484375, 42.617791 ], [ 40.869141, 43.004647 ], [ 40.341797, 43.133061 ], [ 39.990234, 43.452919 ], [ 40.078125, 43.580391 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Romania", "sov_a3": "ROU", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Romania", "adm0_a3": "ROU", "geou_dif": 0, "geounit": "Romania", "gu_a3": "ROU", "su_dif": 0, "subunit": "Romania", "su_a3": "ROU", "brk_diff": 0, "name": "Romania", "name_long": "Romania", "brk_a3": "ROU", "brk_name": "Romania", "abbrev": "Rom.", "postal": "RO", "formal_en": "Romania", "name_sort": "Romania", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 3, "mapcolor13": 13, "pop_est": 22215421, "gdp_md_est": 271400, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "2. Developed region: nonG7", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "RO", "iso_a3": "ROU", "iso_n3": "642", "un_a3": "642", "wb_a2": "RO", "wb_a3": "ROM", "woe_id": -99, "adm0_a3_is": "ROU", "adm0_a3_us": "ROU", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Eastern Europe", "region_wb": "Europe & Central Asia", "name_len": 7, "long_len": 7, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 26.630859, 48.224673 ], [ 26.894531, 48.107431 ], [ 28.125000, 46.800059 ], [ 28.037109, 45.951150 ], [ 28.212891, 45.460131 ], [ 28.652344, 45.274886 ], [ 29.179688, 45.460131 ], [ 29.619141, 45.274886 ], [ 29.619141, 45.026950 ], [ 29.179688, 44.840291 ], [ 28.828125, 44.902578 ], [ 28.564453, 43.707594 ], [ 27.949219, 43.834527 ], [ 27.246094, 44.150681 ], [ 26.103516, 43.961191 ], [ 25.576172, 43.707594 ], [ 24.082031, 43.771094 ], [ 23.291016, 43.897892 ], [ 22.939453, 43.834527 ], [ 22.500000, 44.402392 ], [ 22.675781, 44.590467 ], [ 22.500000, 44.715514 ], [ 22.148438, 44.465151 ], [ 21.533203, 44.777936 ], [ 21.445312, 45.151053 ], [ 20.917969, 45.398450 ], [ 20.742188, 45.706179 ], [ 20.214844, 46.134170 ], [ 21.005859, 46.316584 ], [ 22.060547, 47.694974 ], [ 23.115234, 48.107431 ], [ 24.433594, 47.989922 ], [ 24.873047, 47.754098 ], [ 25.224609, 47.872144 ], [ 25.927734, 47.989922 ], [ 26.191406, 48.224673 ], [ 26.630859, 48.224673 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Central African Republic", "sov_a3": "CAF", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Central African Republic", "adm0_a3": "CAF", "geou_dif": 0, "geounit": "Central African Republic", "gu_a3": "CAF", "su_dif": 0, "subunit": "Central African Republic", "su_a3": "CAF", "brk_diff": 0, "name": "Central African Rep.", "name_long": "Central African Republic", "brk_a3": "CAF", "brk_name": "Central African Rep.", "abbrev": "C.A.R.", "postal": "CF", "formal_en": "Central African Republic", "name_sort": "Central African Republic", "mapcolor7": 5, "mapcolor8": 6, "mapcolor9": 6, "mapcolor13": 9, "pop_est": 4511488, "gdp_md_est": 3198, "pop_year": -99, "lastcensus": 2003, "gdp_year": -99, "economy": "7. Least developed region", "income_grp": "5. Low income", "wikipedia": -99, "iso_a2": "CF", "iso_a3": "CAF", "iso_n3": "140", "un_a3": "140", "wb_a2": "CF", "wb_a3": "CAF", "woe_id": -99, "adm0_a3_is": "CAF", "adm0_a3_us": "CAF", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Middle Africa", "region_wb": "Sub-Saharan Africa", "name_len": 20, "long_len": 24, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 22.851562, 11.178402 ], [ 22.939453, 10.746969 ], [ 23.554688, 10.055403 ], [ 23.378906, 9.275622 ], [ 23.466797, 8.928487 ], [ 25.136719, 7.798079 ], [ 25.136719, 7.536764 ], [ 26.191406, 6.577303 ], [ 26.455078, 5.965754 ], [ 27.246094, 5.528511 ], [ 27.333984, 5.266008 ], [ 27.070312, 5.090944 ], [ 25.664062, 5.266008 ], [ 25.312500, 5.178482 ], [ 25.136719, 4.915833 ], [ 24.785156, 4.915833 ], [ 24.433594, 5.090944 ], [ 23.291016, 4.653080 ], [ 22.851562, 4.740675 ], [ 22.412109, 4.039618 ], [ 20.917969, 4.302591 ], [ 19.511719, 5.003394 ], [ 18.896484, 4.740675 ], [ 18.544922, 4.214943 ], [ 18.457031, 3.513421 ], [ 17.138672, 3.688855 ], [ 16.523438, 3.162456 ], [ 15.996094, 2.284551 ], [ 15.820312, 2.986927 ], [ 15.380859, 3.337954 ], [ 15.029297, 3.864255 ], [ 14.941406, 4.214943 ], [ 14.501953, 4.740675 ], [ 14.589844, 5.003394 ], [ 14.501953, 5.441022 ], [ 14.501953, 6.227934 ], [ 14.765625, 6.402648 ], [ 15.292969, 7.449624 ], [ 16.083984, 7.536764 ], [ 16.259766, 7.710992 ], [ 16.699219, 7.536764 ], [ 17.929688, 7.885147 ], [ 18.896484, 8.667918 ], [ 18.808594, 9.015302 ], [ 20.039062, 9.015302 ], [ 21.005859, 9.449062 ], [ 21.708984, 10.574222 ], [ 22.236328, 11.005904 ], [ 22.851562, 11.178402 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Equatorial Guinea", "sov_a3": "GNQ", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Equatorial Guinea", "adm0_a3": "GNQ", "geou_dif": 0, "geounit": "Equatorial Guinea", "gu_a3": "GNQ", "su_dif": 0, "subunit": "Equatorial Guinea", "su_a3": "GNQ", "brk_diff": 0, "name": "Eq. Guinea", "name_long": "Equatorial Guinea", "brk_a3": "GNQ", "brk_name": "Eq. Guinea", "abbrev": "Eq. G.", "postal": "GQ", "formal_en": "Republic of Equatorial Guinea", "name_sort": "Equatorial Guinea", "mapcolor7": 4, "mapcolor8": 1, "mapcolor9": 4, "mapcolor13": 8, "pop_est": 650702, "gdp_md_est": 14060, "pop_year": 0, "lastcensus": 2002, "gdp_year": 0, "economy": "7. Least developed region", "income_grp": "2. High income: nonOECD", "wikipedia": -99, "iso_a2": "GQ", "iso_a3": "GNQ", "iso_n3": "226", "un_a3": "226", "wb_a2": "GQ", "wb_a3": "GNQ", "woe_id": -99, "adm0_a3_is": "GNQ", "adm0_a3_us": "GNQ", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Middle Africa", "region_wb": "Sub-Saharan Africa", "name_len": 10, "long_len": 17, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 11.250000, 2.284551 ], [ 11.250000, 1.054628 ], [ 9.492188, 0.966751 ], [ 9.316406, 1.142502 ], [ 9.667969, 2.284551 ], [ 11.250000, 2.284551 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Chad", "sov_a3": "TCD", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Chad", "adm0_a3": "TCD", "geou_dif": 0, "geounit": "Chad", "gu_a3": "TCD", "su_dif": 0, "subunit": "Chad", "su_a3": "TCD", "brk_diff": 0, "name": "Chad", "name_long": "Chad", "brk_a3": "TCD", "brk_name": "Chad", "abbrev": "Chad", "postal": "TD", "formal_en": "Republic of Chad", "name_sort": "Chad", "mapcolor7": 6, "mapcolor8": 1, "mapcolor9": 8, "mapcolor13": 6, "pop_est": 10329208, "gdp_md_est": 15860, "pop_year": -99, "lastcensus": 2009, "gdp_year": -99, "economy": "7. Least developed region", "income_grp": "5. Low income", "wikipedia": -99, "iso_a2": "TD", "iso_a3": "TCD", "iso_n3": "148", "un_a3": "148", "wb_a2": "TD", "wb_a3": "TCD", "woe_id": -99, "adm0_a3_is": "TCD", "adm0_a3_us": "TCD", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Middle Africa", "region_wb": "Sub-Saharan Africa", "name_len": 4, "long_len": 4, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 15.820312, 23.402765 ], [ 23.818359, 19.559790 ], [ 23.906250, 15.623037 ], [ 23.027344, 15.707663 ], [ 22.324219, 14.349548 ], [ 22.500000, 14.093957 ], [ 22.148438, 13.752725 ], [ 22.324219, 13.410994 ], [ 21.972656, 12.554564 ], [ 22.324219, 12.640338 ], [ 22.500000, 12.297068 ], [ 22.500000, 11.695273 ], [ 22.851562, 11.350797 ], [ 22.851562, 11.178402 ], [ 22.236328, 11.005904 ], [ 21.708984, 10.574222 ], [ 21.005859, 9.449062 ], [ 20.039062, 9.015302 ], [ 18.808594, 9.015302 ], [ 18.896484, 8.667918 ], [ 17.929688, 7.885147 ], [ 16.699219, 7.536764 ], [ 16.259766, 7.710992 ], [ 16.083984, 7.536764 ], [ 15.292969, 7.449624 ], [ 15.468750, 7.710992 ], [ 14.941406, 8.754795 ], [ 14.501953, 8.928487 ], [ 13.974609, 9.535749 ], [ 14.150391, 10.055403 ], [ 14.589844, 9.882275 ], [ 15.468750, 9.968851 ], [ 14.941406, 10.919618 ], [ 14.853516, 12.211180 ], [ 14.501953, 12.897489 ], [ 14.589844, 13.325485 ], [ 13.974609, 13.325485 ], [ 13.974609, 14.008696 ], [ 13.535156, 14.349548 ], [ 13.974609, 15.707663 ], [ 15.205078, 16.636192 ], [ 15.292969, 17.895114 ], [ 15.644531, 19.973349 ], [ 15.908203, 20.385825 ], [ 15.468750, 20.715015 ], [ 15.468750, 21.043491 ], [ 15.117188, 21.289374 ], [ 14.853516, 22.836946 ], [ 15.820312, 23.402765 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 5, "sovereignt": "Qatar", "sov_a3": "QAT", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Qatar", "adm0_a3": "QAT", "geou_dif": 0, "geounit": "Qatar", "gu_a3": "QAT", "su_dif": 0, "subunit": "Qatar", "su_a3": "QAT", "brk_diff": 0, "name": "Qatar", "name_long": "Qatar", "brk_a3": "QAT", "brk_name": "Qatar", "abbrev": "Qatar", "postal": "QA", "formal_en": "State of Qatar", "name_sort": "Qatar", "mapcolor7": 3, "mapcolor8": 6, "mapcolor9": 2, "mapcolor13": 4, "pop_est": 833285, "gdp_md_est": 91330, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "2. High income: nonOECD", "wikipedia": -99, "iso_a2": "QA", "iso_a3": "QAT", "iso_n3": "634", "un_a3": "634", "wb_a2": "QA", "wb_a3": "QAT", "woe_id": -99, "adm0_a3_is": "QAT", "adm0_a3_us": "QAT", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "Western Asia", "region_wb": "Middle East & North Africa", "name_len": 5, "long_len": 5, "abbrev_len": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 51.328125, 26.115986 ], [ 51.591797, 25.799891 ], [ 51.591797, 25.244696 ], [ 51.416016, 24.607069 ], [ 51.152344, 24.527135 ], [ 50.800781, 24.766785 ], [ 50.712891, 25.482951 ], [ 50.976562, 26.037042 ], [ 51.328125, 26.115986 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Sri Lanka", "sov_a3": "LKA", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Sri Lanka", "adm0_a3": "LKA", "geou_dif": 0, "geounit": "Sri Lanka", "gu_a3": "LKA", "su_dif": 0, "subunit": "Sri Lanka", "su_a3": "LKA", "brk_diff": 0, "name": "Sri Lanka", "name_long": "Sri Lanka", "brk_a3": "LKA", "brk_name": "Sri Lanka", "abbrev": "Sri L.", "postal": "LK", "formal_en": "Democratic Socialist Republic of Sri Lanka", "name_sort": "Sri Lanka", "mapcolor7": 3, "mapcolor8": 5, "mapcolor9": 4, "mapcolor13": 9, "pop_est": 21324791, "gdp_md_est": 91870, "pop_year": -99, "lastcensus": 2001, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "LK", "iso_a3": "LKA", "iso_n3": "144", "un_a3": "144", "wb_a2": "LK", "wb_a3": "LKA", "woe_id": -99, "adm0_a3_is": "LKA", "adm0_a3_us": "LKA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "Southern Asia", "region_wb": "South Asia", "name_len": 9, "long_len": 9, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 80.156250, 9.795678 ], [ 80.859375, 9.275622 ], [ 81.826172, 7.536764 ], [ 81.650391, 6.489983 ], [ 81.210938, 6.227934 ], [ 80.332031, 5.965754 ], [ 79.892578, 6.751896 ], [ 79.716797, 8.233237 ], [ 80.156250, 9.795678 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "India", "sov_a3": "IND", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "India", "adm0_a3": "IND", "geou_dif": 0, "geounit": "India", "gu_a3": "IND", "su_dif": 0, "subunit": "India", "su_a3": "IND", "brk_diff": 0, "name": "India", "name_long": "India", "brk_a3": "IND", "brk_name": "India", "abbrev": "India", "postal": "IND", "formal_en": "Republic of India", "name_sort": "India", "mapcolor7": 1, "mapcolor8": 3, "mapcolor9": 2, "mapcolor13": 2, "pop_est": 1166079220, "gdp_md_est": 3297000, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "3. Emerging region: BRIC", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "IN", "iso_a3": "IND", "iso_n3": "356", "un_a3": "356", "wb_a2": "IN", "wb_a3": "IND", "woe_id": -99, "adm0_a3_is": "IND", "adm0_a3_us": "IND", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "Southern Asia", "region_wb": "South Asia", "name_len": 5, "long_len": 5, "abbrev_len": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 77.871094, 35.460670 ], [ 78.925781, 34.307144 ], [ 78.837891, 33.504759 ], [ 79.189453, 32.990236 ], [ 79.189453, 32.472695 ], [ 78.486328, 32.620870 ], [ 78.750000, 31.503629 ], [ 81.123047, 30.221102 ], [ 80.507812, 29.764377 ], [ 80.068359, 28.767659 ], [ 83.320312, 27.371767 ], [ 84.638672, 27.215556 ], [ 85.253906, 26.745610 ], [ 87.187500, 26.431228 ], [ 88.066406, 26.431228 ], [ 88.154297, 26.824071 ], [ 88.066406, 27.449790 ], [ 88.154297, 27.839076 ], [ 88.769531, 28.071980 ], [ 88.857422, 27.137368 ], [ 89.736328, 26.745610 ], [ 90.351562, 26.902477 ], [ 92.021484, 26.824071 ], [ 92.109375, 27.449790 ], [ 91.669922, 27.761330 ], [ 92.460938, 27.916767 ], [ 93.427734, 28.613459 ], [ 94.570312, 29.305561 ], [ 95.361328, 28.998532 ], [ 96.152344, 29.458731 ], [ 96.591797, 28.844674 ], [ 96.240234, 28.381735 ], [ 97.294922, 28.226970 ], [ 97.382812, 27.916767 ], [ 97.031250, 27.683528 ], [ 97.119141, 27.059126 ], [ 96.416016, 27.293689 ], [ 95.097656, 26.588527 ], [ 95.185547, 26.037042 ], [ 94.570312, 25.165173 ], [ 94.570312, 24.686952 ], [ 94.130859, 23.885838 ], [ 93.339844, 24.046464 ], [ 93.251953, 23.079732 ], [ 93.076172, 22.674847 ], [ 93.164062, 22.268764 ], [ 92.636719, 22.024546 ], [ 92.109375, 23.644524 ], [ 91.845703, 23.644524 ], [ 91.669922, 22.998852 ], [ 91.142578, 23.483401 ], [ 91.494141, 24.046464 ], [ 91.933594, 24.126702 ], [ 92.373047, 25.005973 ], [ 91.757812, 25.165173 ], [ 89.912109, 25.244696 ], [ 89.824219, 25.958045 ], [ 89.384766, 26.037042 ], [ 88.593750, 26.431228 ], [ 88.242188, 25.799891 ], [ 88.945312, 25.244696 ], [ 88.330078, 24.846565 ], [ 88.066406, 24.527135 ], [ 88.681641, 24.206890 ], [ 88.505859, 23.644524 ], [ 88.857422, 22.917923 ], [ 89.033203, 22.024546 ], [ 88.857422, 21.698265 ], [ 87.011719, 21.534847 ], [ 87.011719, 20.715015 ], [ 86.484375, 20.138470 ], [ 85.078125, 19.476950 ], [ 83.935547, 18.312811 ], [ 82.177734, 17.056785 ], [ 82.177734, 16.551962 ], [ 80.771484, 15.961329 ], [ 80.332031, 15.876809 ], [ 80.068359, 15.114553 ], [ 80.244141, 12.983148 ], [ 79.892578, 12.039321 ], [ 79.892578, 10.314919 ], [ 79.365234, 10.314919 ], [ 78.925781, 9.535749 ], [ 79.189453, 9.188870 ], [ 78.310547, 8.928487 ], [ 77.958984, 8.233237 ], [ 77.519531, 7.972198 ], [ 76.552734, 8.928487 ], [ 75.761719, 11.350797 ], [ 74.882812, 12.726084 ], [ 74.443359, 14.604847 ], [ 73.564453, 15.961329 ], [ 72.861328, 19.228177 ], [ 72.861328, 20.385825 ], [ 72.597656, 21.371244 ], [ 71.191406, 20.797201 ], [ 70.488281, 20.879343 ], [ 69.169922, 22.105999 ], [ 69.609375, 22.431340 ], [ 69.345703, 22.836946 ], [ 68.203125, 23.725012 ], [ 68.818359, 24.367114 ], [ 71.015625, 24.367114 ], [ 70.839844, 25.244696 ], [ 70.312500, 25.720735 ], [ 70.136719, 26.509905 ], [ 69.521484, 26.902477 ], [ 70.576172, 27.994401 ], [ 71.806641, 27.916767 ], [ 72.861328, 28.998532 ], [ 73.476562, 29.993002 ], [ 74.443359, 30.977609 ], [ 74.443359, 31.728167 ], [ 75.234375, 32.249974 ], [ 74.443359, 32.768800 ], [ 73.740234, 34.307144 ], [ 74.267578, 34.741612 ], [ 75.761719, 34.524661 ], [ 76.904297, 34.669359 ], [ 77.871094, 35.460670 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Malaysia", "sov_a3": "MYS", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Malaysia", "adm0_a3": "MYS", "geou_dif": 0, "geounit": "Malaysia", "gu_a3": "MYS", "su_dif": 0, "subunit": "Malaysia", "su_a3": "MYS", "brk_diff": 0, "name": "Malaysia", "name_long": "Malaysia", "brk_a3": "MYS", "brk_name": "Malaysia", "abbrev": "Malay.", "postal": "MY", "formal_en": "Malaysia", "name_sort": "Malaysia", "mapcolor7": 2, "mapcolor8": 4, "mapcolor9": 3, "mapcolor13": 6, "pop_est": 25715819, "gdp_md_est": 384300, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "MY", "iso_a3": "MYS", "iso_n3": "458", "un_a3": "458", "wb_a2": "MY", "wb_a3": "MYS", "woe_id": -99, "adm0_a3_is": "MYS", "adm0_a3_us": "MYS", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "South-Eastern Asia", "region_wb": "East Asia & Pacific", "name_len": 8, "long_len": 8, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 117.158203, 6.926427 ], [ 117.685547, 6.402648 ], [ 117.685547, 5.965754 ], [ 119.179688, 5.441022 ], [ 119.091797, 5.003394 ], [ 118.476562, 5.003394 ], [ 118.652344, 4.477856 ], [ 117.861328, 4.127285 ], [ 116.982422, 4.302591 ], [ 115.839844, 4.302591 ], [ 115.488281, 3.162456 ], [ 115.136719, 2.811371 ], [ 114.609375, 1.406109 ], [ 113.818359, 1.230374 ], [ 112.851562, 1.493971 ], [ 112.412109, 1.406109 ], [ 111.796875, 0.878872 ], [ 111.181641, 0.966751 ], [ 110.478516, 0.790990 ], [ 109.863281, 1.318243 ], [ 109.687500, 2.021065 ], [ 110.390625, 1.669686 ], [ 111.181641, 1.845384 ], [ 111.357422, 2.723583 ], [ 113.027344, 3.074695 ], [ 114.169922, 4.565474 ], [ 114.697266, 4.039618 ], [ 114.873047, 4.390229 ], [ 115.312500, 4.302591 ], [ 115.488281, 5.441022 ], [ 116.191406, 6.140555 ], [ 116.718750, 6.926427 ], [ 117.158203, 6.926427 ] ] ], [ [ [ 100.283203, 6.664608 ], [ 101.074219, 6.227934 ], [ 101.162109, 5.703448 ], [ 101.777344, 5.790897 ], [ 102.128906, 6.227934 ], [ 102.919922, 5.528511 ], [ 103.359375, 4.828260 ], [ 103.359375, 3.688855 ], [ 103.535156, 2.811371 ], [ 103.886719, 2.547988 ], [ 104.238281, 1.669686 ], [ 104.238281, 1.318243 ], [ 103.535156, 1.230374 ], [ 101.425781, 2.723583 ], [ 101.250000, 3.250209 ], [ 100.722656, 3.951941 ], [ 100.546875, 4.740675 ], [ 100.195312, 5.353521 ], [ 100.283203, 6.053161 ], [ 100.107422, 6.489983 ], [ 100.283203, 6.664608 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 6, "sovereignt": "Brunei", "sov_a3": "BRN", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Brunei", "adm0_a3": "BRN", "geou_dif": 0, "geounit": "Brunei", "gu_a3": "BRN", "su_dif": 0, "subunit": "Brunei", "su_a3": "BRN", "brk_diff": 0, "name": "Brunei", "name_long": "Brunei Darussalam", "brk_a3": "BRN", "brk_name": "Brunei", "abbrev": "Brunei", "postal": "BN", "formal_en": "Negara Brunei Darussalam", "name_sort": "Brunei", "mapcolor7": 4, "mapcolor8": 6, "mapcolor9": 6, "mapcolor13": 12, "pop_est": 388190, "gdp_md_est": 20250, "pop_year": -99, "lastcensus": 2001, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "2. High income: nonOECD", "wikipedia": -99, "iso_a2": "BN", "iso_a3": "BRN", "iso_n3": "096", "un_a3": "096", "wb_a2": "BN", "wb_a3": "BRN", "woe_id": -99, "adm0_a3_is": "BRN", "adm0_a3_us": "BRN", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "South-Eastern Asia", "region_wb": "East Asia & Pacific", "name_len": 6, "long_len": 17, "abbrev_len": 6, "tiny": 2, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 115.488281, 5.441022 ], [ 115.312500, 4.302591 ], [ 114.873047, 4.390229 ], [ 114.697266, 4.039618 ], [ 114.169922, 4.565474 ], [ 115.488281, 5.441022 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 6, "sovereignt": "Malawi", "sov_a3": "MWI", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Malawi", "adm0_a3": "MWI", "geou_dif": 0, "geounit": "Malawi", "gu_a3": "MWI", "su_dif": 0, "subunit": "Malawi", "su_a3": "MWI", "brk_diff": 0, "name": "Malawi", "name_long": "Malawi", "brk_a3": "MWI", "brk_name": "Malawi", "abbrev": "Mal.", "postal": "MW", "formal_en": "Republic of Malawi", "name_sort": "Malawi", "mapcolor7": 1, "mapcolor8": 3, "mapcolor9": 4, "mapcolor13": 5, "pop_est": 14268711, "gdp_md_est": 11810, "pop_year": -99, "lastcensus": 2008, "gdp_year": -99, "economy": "7. Least developed region", "income_grp": "5. Low income", "wikipedia": -99, "iso_a2": "MW", "iso_a3": "MWI", "iso_n3": "454", "un_a3": "454", "wb_a2": "MW", "wb_a3": "MWI", "woe_id": -99, "adm0_a3_is": "MWI", "adm0_a3_us": "MWI", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Eastern Africa", "region_wb": "Sub-Saharan Africa", "name_len": 6, "long_len": 6, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 32.783203, -9.188870 ], [ 33.750000, -9.449062 ], [ 34.277344, -10.141932 ], [ 34.541016, -11.523088 ], [ 34.277344, -12.297068 ], [ 34.541016, -13.581921 ], [ 34.892578, -13.581921 ], [ 35.244141, -13.923404 ], [ 35.683594, -14.604847 ], [ 35.771484, -15.876809 ], [ 35.332031, -16.130262 ], [ 35.068359, -16.804541 ], [ 34.365234, -16.214675 ], [ 34.277344, -15.453680 ], [ 34.541016, -15.029686 ], [ 34.453125, -14.604847 ], [ 34.101562, -14.349548 ], [ 33.750000, -14.434680 ], [ 32.695312, -13.752725 ], [ 32.958984, -12.811801 ], [ 33.310547, -12.468760 ], [ 33.134766, -11.609193 ], [ 33.486328, -10.487812 ], [ 33.222656, -9.709057 ], [ 32.783203, -9.188870 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Zimbabwe", "sov_a3": "ZWE", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Zimbabwe", "adm0_a3": "ZWE", "geou_dif": 0, "geounit": "Zimbabwe", "gu_a3": "ZWE", "su_dif": 0, "subunit": "Zimbabwe", "su_a3": "ZWE", "brk_diff": 0, "name": "Zimbabwe", "name_long": "Zimbabwe", "brk_a3": "ZWE", "brk_name": "Zimbabwe", "abbrev": "Zimb.", "postal": "ZW", "formal_en": "Republic of Zimbabwe", "name_sort": "Zimbabwe", "mapcolor7": 1, "mapcolor8": 5, "mapcolor9": 3, "mapcolor13": 9, "pop_est": 12619600, "gdp_md_est": 9323, "pop_year": 0, "lastcensus": 2002, "gdp_year": 0, "economy": "5. Emerging region: G20", "income_grp": "5. Low income", "wikipedia": -99, "iso_a2": "ZW", "iso_a3": "ZWE", "iso_n3": "716", "un_a3": "716", "wb_a2": "ZW", "wb_a3": "ZWE", "woe_id": -99, "adm0_a3_is": "ZWE", "adm0_a3_us": "ZWE", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Eastern Africa", "region_wb": "Sub-Saharan Africa", "name_len": 8, "long_len": 8, "abbrev_len": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 30.234375, -15.538376 ], [ 30.322266, -15.876809 ], [ 31.201172, -15.876809 ], [ 31.816406, -16.299051 ], [ 32.343750, -16.383391 ], [ 32.871094, -16.720385 ], [ 32.871094, -17.978733 ], [ 32.607422, -19.394068 ], [ 32.783203, -19.725342 ], [ 32.695312, -20.303418 ], [ 32.519531, -20.385825 ], [ 32.255859, -21.125498 ], [ 31.201172, -22.268764 ], [ 30.673828, -22.187405 ], [ 30.322266, -22.268764 ], [ 29.443359, -22.105999 ], [ 28.828125, -21.616579 ], [ 28.037109, -21.453069 ], [ 27.685547, -20.879343 ], [ 27.685547, -20.468189 ], [ 27.333984, -20.385825 ], [ 26.191406, -19.311143 ], [ 25.224609, -17.727759 ], [ 27.070312, -17.978733 ], [ 28.476562, -16.467695 ], [ 28.828125, -16.383391 ], [ 28.916016, -16.045813 ], [ 29.531250, -15.623037 ], [ 30.234375, -15.538376 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Solomon Islands", "sov_a3": "SLB", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Solomon Islands", "adm0_a3": "SLB", "geou_dif": 0, "geounit": "Solomon Islands", "gu_a3": "SLB", "su_dif": 0, "subunit": "Solomon Islands", "su_a3": "SLB", "brk_diff": 0, "name": "Solomon Is.", "name_long": "Solomon Islands", "brk_a3": "SLB", "brk_name": "Solomon Is.", "abbrev": "S. Is.", "postal": "SB", "name_sort": "Solomon Islands", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 1, "mapcolor13": 6, "pop_est": 595613, "gdp_md_est": 1078, "pop_year": -99, "lastcensus": 2009, "gdp_year": -99, "economy": "7. Least developed region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "SB", "iso_a3": "SLB", "iso_n3": "090", "un_a3": "090", "wb_a2": "SB", "wb_a3": "SLB", "woe_id": -99, "adm0_a3_is": "SLB", "adm0_a3_us": "SLB", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Oceania", "region_un": "Oceania", "subregion": "Melanesia", "region_wb": "East Asia & Pacific", "name_len": 11, "long_len": 15, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 161.279297, -10.228437 ], [ 162.158203, -10.487812 ], [ 162.421875, -10.833306 ], [ 161.718750, -10.833306 ], [ 161.279297, -10.228437 ] ] ], [ [ [ 159.697266, -9.275622 ], [ 160.400391, -9.362353 ], [ 160.839844, -9.882275 ], [ 159.873047, -9.795678 ], [ 159.609375, -9.622414 ], [ 159.697266, -9.275622 ] ] ], [ [ [ 160.927734, -8.320212 ], [ 161.279297, -9.102097 ], [ 161.718750, -9.622414 ], [ 161.542969, -9.795678 ], [ 160.751953, -8.928487 ], [ 160.576172, -8.320212 ], [ 160.927734, -8.320212 ] ] ], [ [ [ 158.378906, -7.362467 ], [ 159.609375, -8.059230 ], [ 159.960938, -8.581021 ], [ 158.203125, -7.449624 ], [ 158.378906, -7.362467 ] ] ], [ [ [ 156.533203, -6.577303 ], [ 157.500000, -7.362467 ], [ 157.324219, -7.362467 ], [ 156.884766, -7.188101 ], [ 156.533203, -6.751896 ], [ 156.533203, -6.577303 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Papua New Guinea", "sov_a3": "PNG", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Papua New Guinea", "adm0_a3": "PNG", "geou_dif": 0, "geounit": "Papua New Guinea", "gu_a3": "PNG", "su_dif": 1, "subunit": "Papua New Guinea", "su_a3": "PN1", "brk_diff": 0, "name": "Papua New Guinea", "name_long": "Papua New Guinea", "brk_a3": "PN1", "brk_name": "Papua New Guinea", "abbrev": "P.N.G.", "postal": "PG", "formal_en": "Independent State of Papua New Guinea", "name_sort": "Papua New Guinea", "mapcolor7": 4, "mapcolor8": 2, "mapcolor9": 3, "mapcolor13": 1, "pop_est": 6057263, "gdp_md_est": 13210, "pop_year": -99, "lastcensus": 2000, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "PG", "iso_a3": "PNG", "iso_n3": "598", "un_a3": "598", "wb_a2": "PG", "wb_a3": "PNG", "woe_id": -99, "adm0_a3_is": "PNG", "adm0_a3_us": "PNG", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Oceania", "region_un": "Oceania", "subregion": "Melanesia", "region_wb": "East Asia & Pacific", "name_len": 16, "long_len": 16, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 140.976562, -2.635789 ], [ 144.580078, -3.864255 ], [ 145.810547, -4.915833 ], [ 145.986328, -5.441022 ], [ 147.656250, -6.053161 ], [ 147.919922, -6.577303 ], [ 146.953125, -6.751896 ], [ 147.216797, -7.362467 ], [ 148.095703, -8.059230 ], [ 148.710938, -9.102097 ], [ 149.326172, -9.102097 ], [ 149.238281, -9.535749 ], [ 150.029297, -9.709057 ], [ 149.765625, -9.882275 ], [ 150.820312, -10.314919 ], [ 150.732422, -10.574222 ], [ 150.029297, -10.660608 ], [ 149.765625, -10.401378 ], [ 147.919922, -10.141932 ], [ 146.601562, -8.928487 ], [ 146.074219, -8.059230 ], [ 144.755859, -7.623887 ], [ 143.261719, -8.233237 ], [ 143.437500, -9.015302 ], [ 142.646484, -9.362353 ], [ 142.031250, -9.188870 ], [ 141.064453, -9.102097 ], [ 140.976562, -2.635789 ] ] ], [ [ [ 152.138672, -4.127285 ], [ 152.314453, -4.302591 ], [ 152.314453, -4.828260 ], [ 151.962891, -5.441022 ], [ 151.435547, -5.528511 ], [ 151.259766, -5.878332 ], [ 150.205078, -6.315299 ], [ 149.677734, -6.315299 ], [ 148.359375, -5.703448 ], [ 148.359375, -5.441022 ], [ 149.326172, -5.615986 ], [ 149.853516, -5.528511 ], [ 150.029297, -5.003394 ], [ 150.117188, -5.003394 ], [ 150.205078, -5.528511 ], [ 150.820312, -5.441022 ], [ 151.611328, -4.740675 ], [ 151.523438, -4.127285 ], [ 152.138672, -4.127285 ] ] ], [ [ [ 154.687500, -5.003394 ], [ 154.775391, -5.353521 ], [ 156.005859, -6.577303 ], [ 155.917969, -6.839170 ], [ 155.566406, -6.926427 ], [ 155.126953, -6.577303 ], [ 154.687500, -5.878332 ], [ 154.511719, -5.178482 ], [ 154.687500, -5.003394 ] ] ], [ [ [ 150.908203, -2.460181 ], [ 152.226562, -3.250209 ], [ 153.017578, -3.951941 ], [ 153.105469, -4.477856 ], [ 152.841797, -4.740675 ], [ 152.402344, -3.776559 ], [ 151.347656, -3.074695 ], [ 150.644531, -2.723583 ], [ 150.908203, -2.460181 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
"maxzoom": "5",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--drop-smallest-as-needed.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_as_needed\":174,\"tile_size_desired\":39190},{\"dropped_as_needed\":200,\"tile_size_desired\":25154},{\"dropped_as_needed\":187,\"tiny_polygons\":1,\"tile_size_desired\":21201},{\"dropped_as_needed\":154,\"tile_size_desired\":10758},{\"dropped_as_needed\":79,\"tile_size_desired\":6601},{\"tiny_polygons\":2}]",
|
||||
"strategies": "[{\"dropped_as_needed\":174,\"tile_size_desired\":39241},{\"dropped_as_needed\":200,\"tile_size_desired\":25163},{\"dropped_as_needed\":187,\"tiny_polygons\":1,\"tile_size_desired\":21214},{\"dropped_as_needed\":154,\"tile_size_desired\":10758},{\"dropped_as_needed\":79,\"tile_size_desired\":6601},{\"tiny_polygons\":2}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":0,\"droprate\":2.5,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
"maxzoom": "5",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--force-feature-limit.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_as_needed\":479,\"tile_size_desired\":39190},{\"dropped_as_needed\":264,\"tiny_polygons\":2,\"tile_size_desired\":25154},{\"dropped_as_needed\":221,\"tiny_polygons\":2,\"tile_size_desired\":21201},{\"dropped_as_needed\":93,\"tile_size_desired\":10758},{\"dropped_as_needed\":9,\"tile_size_desired\":6601},{\"tiny_polygons\":2}]",
|
||||
"strategies": "[{\"dropped_as_needed\":479,\"tile_size_desired\":39241},{\"dropped_as_needed\":264,\"tiny_polygons\":2,\"tile_size_desired\":25163},{\"dropped_as_needed\":221,\"tiny_polygons\":2,\"tile_size_desired\":21214},{\"dropped_as_needed\":93,\"tile_size_desired\":10758},{\"dropped_as_needed\":9,\"tile_size_desired\":6601},{\"tiny_polygons\":2}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":0,\"droprate\":2.5,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
@@ -23,23 +24,23 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Germany", "sov_a3": "DEU", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Germany", "adm0_a3": "DEU", "geou_dif": 0, "geounit": "Germany", "gu_a3": "DEU", "su_dif": 0, "subunit": "Germany", "su_a3": "DEU", "brk_diff": 0, "name": "Germany", "name_long": "Germany", "brk_a3": "DEU", "brk_name": "Germany", "abbrev": "Ger.", "postal": "D", "formal_en": "Federal Republic of Germany", "name_sort": "Germany", "mapcolor7": 2, "mapcolor8": 5, "mapcolor9": 5, "mapcolor13": 1, "pop_est": 82329758, "gdp_md_est": 2918000, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "1. Developed region: G7", "income_grp": "1. High income: OECD", "wikipedia": -99, "iso_a2": "DE", "iso_a3": "DEU", "iso_n3": "276", "un_a3": "276", "wb_a2": "DE", "wb_a3": "DEU", "woe_id": -99, "adm0_a3_is": "DEU", "adm0_a3_us": "DEU", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Western Europe", "region_wb": "Europe & Central Asia", "name_len": 7, "long_len": 7, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 9.931641, 54.977614 ], [ 9.931641, 54.572062 ], [ 10.986328, 54.367759 ], [ 10.898438, 54.007769 ], [ 11.953125, 54.213861 ], [ 12.480469, 54.470038 ], [ 13.623047, 54.059388 ], [ 14.150391, 53.748711 ], [ 14.326172, 53.225768 ], [ 14.062500, 52.961875 ], [ 14.414062, 52.643063 ], [ 14.677734, 52.106505 ], [ 14.589844, 51.727028 ], [ 15.029297, 51.124213 ], [ 14.589844, 51.013755 ], [ 14.326172, 51.124213 ], [ 14.062500, 50.903033 ], [ 13.359375, 50.736455 ], [ 13.007812, 50.457504 ], [ 12.216797, 50.289339 ], [ 12.480469, 49.553726 ], [ 13.623047, 48.864715 ], [ 13.271484, 48.400032 ], [ 12.919922, 48.283193 ], [ 13.007812, 47.635784 ], [ 12.919922, 47.457809 ], [ 12.656250, 47.694974 ], [ 12.128906, 47.694974 ], [ 11.425781, 47.517201 ], [ 10.546875, 47.576526 ], [ 10.371094, 47.279229 ], [ 9.931641, 47.576526 ], [ 9.580078, 47.517201 ], [ 8.525391, 47.813155 ], [ 8.349609, 47.635784 ], [ 7.470703, 47.635784 ], [ 7.558594, 48.341646 ], [ 8.085938, 49.037868 ], [ 6.679688, 49.210420 ], [ 6.152344, 49.439557 ], [ 6.240234, 49.894634 ], [ 6.064453, 50.120578 ], [ 6.152344, 50.792047 ], [ 5.976562, 51.835778 ], [ 6.591797, 51.835778 ], [ 6.855469, 52.214339 ], [ 7.119141, 53.120405 ], [ 6.943359, 53.488046 ], [ 7.119141, 53.696706 ], [ 7.910156, 53.748711 ], [ 8.085938, 53.540307 ], [ 8.789062, 54.007769 ], [ 8.613281, 54.418930 ], [ 8.525391, 54.977614 ], [ 9.316406, 54.826008 ], [ 9.931641, 54.977614 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 6, "sovereignt": "Kosovo", "sov_a3": "KOS", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Kosovo", "adm0_a3": "KOS", "geou_dif": 0, "geounit": "Kosovo", "gu_a3": "KOS", "su_dif": 0, "subunit": "Kosovo", "su_a3": "KOS", "brk_diff": 1, "name": "Kosovo", "name_long": "Kosovo", "brk_a3": "B57", "brk_name": "Kosovo", "abbrev": "Kos.", "postal": "KO", "formal_en": "Republic of Kosovo", "note_brk": "Self admin.; Claimed by Serbia", "name_sort": "Kosovo", "mapcolor7": 2, "mapcolor8": 2, "mapcolor9": 3, "mapcolor13": 11, "pop_est": 1804838, "gdp_md_est": 5352, "pop_year": -99, "lastcensus": 1981, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "-99", "iso_a3": "-99", "iso_n3": "-99", "un_a3": "-099", "wb_a2": "KV", "wb_a3": "KSV", "woe_id": -99, "adm0_a3_is": "SRB", "adm0_a3_us": "KOS", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Southern Europe", "region_wb": "Europe & Central Asia", "name_len": 6, "long_len": 6, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 20.830078, 43.261206 ], [ 21.621094, 42.682435 ], [ 21.796875, 42.682435 ], [ 21.533203, 42.228517 ], [ 20.742188, 42.032974 ], [ 20.742188, 41.836828 ], [ 20.566406, 41.836828 ], [ 20.566406, 42.228517 ], [ 20.039062, 42.617791 ], [ 20.214844, 42.811522 ], [ 20.478516, 42.875964 ], [ 20.654297, 43.197167 ], [ 20.830078, 43.261206 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 6, "sovereignt": "Montenegro", "sov_a3": "MNE", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Montenegro", "adm0_a3": "MNE", "geou_dif": 0, "geounit": "Montenegro", "gu_a3": "MNE", "su_dif": 0, "subunit": "Montenegro", "su_a3": "MNE", "brk_diff": 0, "name": "Montenegro", "name_long": "Montenegro", "brk_a3": "MNE", "brk_name": "Montenegro", "abbrev": "Mont.", "postal": "ME", "formal_en": "Montenegro", "name_sort": "Montenegro", "mapcolor7": 4, "mapcolor8": 1, "mapcolor9": 4, "mapcolor13": 5, "pop_est": 672180, "gdp_md_est": 6816, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "ME", "iso_a3": "MNE", "iso_n3": "499", "un_a3": "499", "wb_a2": "ME", "wb_a3": "MNE", "woe_id": -99, "adm0_a3_is": "MNE", "adm0_a3_us": "MNE", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Southern Europe", "region_wb": "Europe & Central Asia", "name_len": 10, "long_len": 10, "abbrev_len": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 19.248047, 43.516689 ], [ 19.599609, 43.197167 ], [ 20.302734, 42.875964 ], [ 20.039062, 42.617791 ], [ 19.775391, 42.488302 ], [ 19.775391, 42.682435 ], [ 19.335938, 42.163403 ], [ 19.335938, 41.902277 ], [ 18.457031, 42.488302 ], [ 18.720703, 43.197167 ], [ 19.248047, 43.516689 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 5, "sovereignt": "Georgia", "sov_a3": "GEO", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Georgia", "adm0_a3": "GEO", "geou_dif": 0, "geounit": "Georgia", "gu_a3": "GEO", "su_dif": 0, "subunit": "Georgia", "su_a3": "GEO", "brk_diff": 0, "name": "Georgia", "name_long": "Georgia", "brk_a3": "GEO", "brk_name": "Georgia", "abbrev": "Geo.", "postal": "GE", "formal_en": "Georgia", "name_sort": "Georgia", "mapcolor7": 5, "mapcolor8": 1, "mapcolor9": 3, "mapcolor13": 2, "pop_est": 4615807, "gdp_md_est": 21510, "pop_year": -99, "lastcensus": 2002, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "GE", "iso_a3": "GEO", "iso_n3": "268", "un_a3": "268", "wb_a2": "GE", "wb_a3": "GEO", "woe_id": -99, "adm0_a3_is": "GEO", "adm0_a3_us": "GEO", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "Western Asia", "region_wb": "Europe & Central Asia", "name_len": 7, "long_len": 7, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 40.078125, 43.580391 ], [ 42.363281, 43.197167 ], [ 43.769531, 42.747012 ], [ 43.945312, 42.553080 ], [ 44.560547, 42.682435 ], [ 45.439453, 42.488302 ], [ 45.791016, 42.098222 ], [ 46.406250, 41.836828 ], [ 46.142578, 41.705729 ], [ 46.669922, 41.178654 ], [ 46.494141, 41.046217 ], [ 45.966797, 41.112469 ], [ 45.175781, 41.442726 ], [ 45.000000, 41.244772 ], [ 43.593750, 41.112469 ], [ 42.626953, 41.574361 ], [ 41.572266, 41.508577 ], [ 41.660156, 41.967659 ], [ 41.484375, 42.617791 ], [ 40.869141, 43.004647 ], [ 40.341797, 43.133061 ], [ 39.990234, 43.452919 ], [ 40.078125, 43.580391 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Romania", "sov_a3": "ROU", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Romania", "adm0_a3": "ROU", "geou_dif": 0, "geounit": "Romania", "gu_a3": "ROU", "su_dif": 0, "subunit": "Romania", "su_a3": "ROU", "brk_diff": 0, "name": "Romania", "name_long": "Romania", "brk_a3": "ROU", "brk_name": "Romania", "abbrev": "Rom.", "postal": "RO", "formal_en": "Romania", "name_sort": "Romania", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 3, "mapcolor13": 13, "pop_est": 22215421, "gdp_md_est": 271400, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "2. Developed region: nonG7", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "RO", "iso_a3": "ROU", "iso_n3": "642", "un_a3": "642", "wb_a2": "RO", "wb_a3": "ROM", "woe_id": -99, "adm0_a3_is": "ROU", "adm0_a3_us": "ROU", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Eastern Europe", "region_wb": "Europe & Central Asia", "name_len": 7, "long_len": 7, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 26.630859, 48.224673 ], [ 26.894531, 48.107431 ], [ 28.125000, 46.800059 ], [ 28.037109, 45.951150 ], [ 28.212891, 45.460131 ], [ 28.652344, 45.274886 ], [ 29.179688, 45.460131 ], [ 29.619141, 45.274886 ], [ 29.619141, 45.026950 ], [ 29.179688, 44.840291 ], [ 28.828125, 44.902578 ], [ 28.564453, 43.707594 ], [ 27.949219, 43.834527 ], [ 27.246094, 44.150681 ], [ 26.103516, 43.961191 ], [ 25.576172, 43.707594 ], [ 24.082031, 43.771094 ], [ 23.291016, 43.897892 ], [ 22.939453, 43.834527 ], [ 22.500000, 44.402392 ], [ 22.675781, 44.590467 ], [ 22.500000, 44.715514 ], [ 22.148438, 44.465151 ], [ 21.533203, 44.777936 ], [ 21.445312, 45.151053 ], [ 20.917969, 45.398450 ], [ 20.742188, 45.706179 ], [ 20.214844, 46.134170 ], [ 21.005859, 46.316584 ], [ 22.060547, 47.694974 ], [ 23.115234, 48.107431 ], [ 24.433594, 47.989922 ], [ 24.873047, 47.754098 ], [ 25.224609, 47.872144 ], [ 25.927734, 47.989922 ], [ 26.191406, 48.224673 ], [ 26.630859, 48.224673 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Central African Republic", "sov_a3": "CAF", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Central African Republic", "adm0_a3": "CAF", "geou_dif": 0, "geounit": "Central African Republic", "gu_a3": "CAF", "su_dif": 0, "subunit": "Central African Republic", "su_a3": "CAF", "brk_diff": 0, "name": "Central African Rep.", "name_long": "Central African Republic", "brk_a3": "CAF", "brk_name": "Central African Rep.", "abbrev": "C.A.R.", "postal": "CF", "formal_en": "Central African Republic", "name_sort": "Central African Republic", "mapcolor7": 5, "mapcolor8": 6, "mapcolor9": 6, "mapcolor13": 9, "pop_est": 4511488, "gdp_md_est": 3198, "pop_year": -99, "lastcensus": 2003, "gdp_year": -99, "economy": "7. Least developed region", "income_grp": "5. Low income", "wikipedia": -99, "iso_a2": "CF", "iso_a3": "CAF", "iso_n3": "140", "un_a3": "140", "wb_a2": "CF", "wb_a3": "CAF", "woe_id": -99, "adm0_a3_is": "CAF", "adm0_a3_us": "CAF", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Middle Africa", "region_wb": "Sub-Saharan Africa", "name_len": 20, "long_len": 24, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 22.851562, 11.178402 ], [ 22.939453, 10.746969 ], [ 23.554688, 10.055403 ], [ 23.378906, 9.275622 ], [ 23.466797, 8.928487 ], [ 25.136719, 7.798079 ], [ 25.136719, 7.536764 ], [ 26.191406, 6.577303 ], [ 26.455078, 5.965754 ], [ 27.246094, 5.528511 ], [ 27.333984, 5.266008 ], [ 27.070312, 5.090944 ], [ 25.664062, 5.266008 ], [ 25.312500, 5.178482 ], [ 25.136719, 4.915833 ], [ 24.785156, 4.915833 ], [ 24.433594, 5.090944 ], [ 23.291016, 4.653080 ], [ 22.851562, 4.740675 ], [ 22.412109, 4.039618 ], [ 20.917969, 4.302591 ], [ 19.511719, 5.003394 ], [ 18.896484, 4.740675 ], [ 18.544922, 4.214943 ], [ 18.457031, 3.513421 ], [ 17.138672, 3.688855 ], [ 16.523438, 3.162456 ], [ 15.996094, 2.284551 ], [ 15.820312, 2.986927 ], [ 15.380859, 3.337954 ], [ 15.029297, 3.864255 ], [ 14.941406, 4.214943 ], [ 14.501953, 4.740675 ], [ 14.589844, 5.003394 ], [ 14.501953, 5.441022 ], [ 14.501953, 6.227934 ], [ 14.765625, 6.402648 ], [ 15.292969, 7.449624 ], [ 16.083984, 7.536764 ], [ 16.259766, 7.710992 ], [ 16.699219, 7.536764 ], [ 17.929688, 7.885147 ], [ 18.896484, 8.667918 ], [ 18.808594, 9.015302 ], [ 20.039062, 9.015302 ], [ 21.005859, 9.449062 ], [ 21.708984, 10.574222 ], [ 22.236328, 11.005904 ], [ 22.851562, 11.178402 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Equatorial Guinea", "sov_a3": "GNQ", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Equatorial Guinea", "adm0_a3": "GNQ", "geou_dif": 0, "geounit": "Equatorial Guinea", "gu_a3": "GNQ", "su_dif": 0, "subunit": "Equatorial Guinea", "su_a3": "GNQ", "brk_diff": 0, "name": "Eq. Guinea", "name_long": "Equatorial Guinea", "brk_a3": "GNQ", "brk_name": "Eq. Guinea", "abbrev": "Eq. G.", "postal": "GQ", "formal_en": "Republic of Equatorial Guinea", "name_sort": "Equatorial Guinea", "mapcolor7": 4, "mapcolor8": 1, "mapcolor9": 4, "mapcolor13": 8, "pop_est": 650702, "gdp_md_est": 14060, "pop_year": 0, "lastcensus": 2002, "gdp_year": 0, "economy": "7. Least developed region", "income_grp": "2. High income: nonOECD", "wikipedia": -99, "iso_a2": "GQ", "iso_a3": "GNQ", "iso_n3": "226", "un_a3": "226", "wb_a2": "GQ", "wb_a3": "GNQ", "woe_id": -99, "adm0_a3_is": "GNQ", "adm0_a3_us": "GNQ", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Middle Africa", "region_wb": "Sub-Saharan Africa", "name_len": 10, "long_len": 17, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 11.250000, 2.284551 ], [ 11.250000, 1.054628 ], [ 9.492188, 0.966751 ], [ 9.316406, 1.142502 ], [ 9.667969, 2.284551 ], [ 11.250000, 2.284551 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Chad", "sov_a3": "TCD", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Chad", "adm0_a3": "TCD", "geou_dif": 0, "geounit": "Chad", "gu_a3": "TCD", "su_dif": 0, "subunit": "Chad", "su_a3": "TCD", "brk_diff": 0, "name": "Chad", "name_long": "Chad", "brk_a3": "TCD", "brk_name": "Chad", "abbrev": "Chad", "postal": "TD", "formal_en": "Republic of Chad", "name_sort": "Chad", "mapcolor7": 6, "mapcolor8": 1, "mapcolor9": 8, "mapcolor13": 6, "pop_est": 10329208, "gdp_md_est": 15860, "pop_year": -99, "lastcensus": 2009, "gdp_year": -99, "economy": "7. Least developed region", "income_grp": "5. Low income", "wikipedia": -99, "iso_a2": "TD", "iso_a3": "TCD", "iso_n3": "148", "un_a3": "148", "wb_a2": "TD", "wb_a3": "TCD", "woe_id": -99, "adm0_a3_is": "TCD", "adm0_a3_us": "TCD", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Middle Africa", "region_wb": "Sub-Saharan Africa", "name_len": 4, "long_len": 4, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 15.820312, 23.402765 ], [ 23.818359, 19.559790 ], [ 23.906250, 15.623037 ], [ 23.027344, 15.707663 ], [ 22.324219, 14.349548 ], [ 22.500000, 14.093957 ], [ 22.148438, 13.752725 ], [ 22.324219, 13.410994 ], [ 21.972656, 12.554564 ], [ 22.324219, 12.640338 ], [ 22.500000, 12.297068 ], [ 22.500000, 11.695273 ], [ 22.851562, 11.350797 ], [ 22.851562, 11.178402 ], [ 22.236328, 11.005904 ], [ 21.708984, 10.574222 ], [ 21.005859, 9.449062 ], [ 20.039062, 9.015302 ], [ 18.808594, 9.015302 ], [ 18.896484, 8.667918 ], [ 17.929688, 7.885147 ], [ 16.699219, 7.536764 ], [ 16.259766, 7.710992 ], [ 16.083984, 7.536764 ], [ 15.292969, 7.449624 ], [ 15.468750, 7.710992 ], [ 14.941406, 8.754795 ], [ 14.501953, 8.928487 ], [ 13.974609, 9.535749 ], [ 14.150391, 10.055403 ], [ 14.589844, 9.882275 ], [ 15.468750, 9.968851 ], [ 14.941406, 10.919618 ], [ 14.853516, 12.211180 ], [ 14.501953, 12.897489 ], [ 14.589844, 13.325485 ], [ 13.974609, 13.325485 ], [ 13.974609, 14.008696 ], [ 13.535156, 14.349548 ], [ 13.974609, 15.707663 ], [ 15.205078, 16.636192 ], [ 15.292969, 17.895114 ], [ 15.644531, 19.973349 ], [ 15.908203, 20.385825 ], [ 15.468750, 20.715015 ], [ 15.468750, 21.043491 ], [ 15.117188, 21.289374 ], [ 14.853516, 22.836946 ], [ 15.820312, 23.402765 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 5, "sovereignt": "Qatar", "sov_a3": "QAT", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Qatar", "adm0_a3": "QAT", "geou_dif": 0, "geounit": "Qatar", "gu_a3": "QAT", "su_dif": 0, "subunit": "Qatar", "su_a3": "QAT", "brk_diff": 0, "name": "Qatar", "name_long": "Qatar", "brk_a3": "QAT", "brk_name": "Qatar", "abbrev": "Qatar", "postal": "QA", "formal_en": "State of Qatar", "name_sort": "Qatar", "mapcolor7": 3, "mapcolor8": 6, "mapcolor9": 2, "mapcolor13": 4, "pop_est": 833285, "gdp_md_est": 91330, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "2. High income: nonOECD", "wikipedia": -99, "iso_a2": "QA", "iso_a3": "QAT", "iso_n3": "634", "un_a3": "634", "wb_a2": "QA", "wb_a3": "QAT", "woe_id": -99, "adm0_a3_is": "QAT", "adm0_a3_us": "QAT", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "Western Asia", "region_wb": "Middle East & North Africa", "name_len": 5, "long_len": 5, "abbrev_len": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 51.328125, 26.115986 ], [ 51.591797, 25.799891 ], [ 51.591797, 25.244696 ], [ 51.416016, 24.607069 ], [ 51.152344, 24.527135 ], [ 50.800781, 24.766785 ], [ 50.712891, 25.482951 ], [ 50.976562, 26.037042 ], [ 51.328125, 26.115986 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Sri Lanka", "sov_a3": "LKA", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Sri Lanka", "adm0_a3": "LKA", "geou_dif": 0, "geounit": "Sri Lanka", "gu_a3": "LKA", "su_dif": 0, "subunit": "Sri Lanka", "su_a3": "LKA", "brk_diff": 0, "name": "Sri Lanka", "name_long": "Sri Lanka", "brk_a3": "LKA", "brk_name": "Sri Lanka", "abbrev": "Sri L.", "postal": "LK", "formal_en": "Democratic Socialist Republic of Sri Lanka", "name_sort": "Sri Lanka", "mapcolor7": 3, "mapcolor8": 5, "mapcolor9": 4, "mapcolor13": 9, "pop_est": 21324791, "gdp_md_est": 91870, "pop_year": -99, "lastcensus": 2001, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "LK", "iso_a3": "LKA", "iso_n3": "144", "un_a3": "144", "wb_a2": "LK", "wb_a3": "LKA", "woe_id": -99, "adm0_a3_is": "LKA", "adm0_a3_us": "LKA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "Southern Asia", "region_wb": "South Asia", "name_len": 9, "long_len": 9, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 80.156250, 9.795678 ], [ 80.859375, 9.275622 ], [ 81.826172, 7.536764 ], [ 81.650391, 6.489983 ], [ 81.210938, 6.227934 ], [ 80.332031, 5.965754 ], [ 79.892578, 6.751896 ], [ 79.716797, 8.233237 ], [ 80.156250, 9.795678 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "India", "sov_a3": "IND", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "India", "adm0_a3": "IND", "geou_dif": 0, "geounit": "India", "gu_a3": "IND", "su_dif": 0, "subunit": "India", "su_a3": "IND", "brk_diff": 0, "name": "India", "name_long": "India", "brk_a3": "IND", "brk_name": "India", "abbrev": "India", "postal": "IND", "formal_en": "Republic of India", "name_sort": "India", "mapcolor7": 1, "mapcolor8": 3, "mapcolor9": 2, "mapcolor13": 2, "pop_est": 1166079220, "gdp_md_est": 3297000, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "3. Emerging region: BRIC", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "IN", "iso_a3": "IND", "iso_n3": "356", "un_a3": "356", "wb_a2": "IN", "wb_a3": "IND", "woe_id": -99, "adm0_a3_is": "IND", "adm0_a3_us": "IND", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "Southern Asia", "region_wb": "South Asia", "name_len": 5, "long_len": 5, "abbrev_len": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 77.871094, 35.460670 ], [ 78.925781, 34.307144 ], [ 78.837891, 33.504759 ], [ 79.189453, 32.990236 ], [ 79.189453, 32.472695 ], [ 78.486328, 32.620870 ], [ 78.750000, 31.503629 ], [ 81.123047, 30.221102 ], [ 80.507812, 29.764377 ], [ 80.068359, 28.767659 ], [ 83.320312, 27.371767 ], [ 84.638672, 27.215556 ], [ 85.253906, 26.745610 ], [ 87.187500, 26.431228 ], [ 88.066406, 26.431228 ], [ 88.154297, 26.824071 ], [ 88.066406, 27.449790 ], [ 88.154297, 27.839076 ], [ 88.769531, 28.071980 ], [ 88.857422, 27.137368 ], [ 89.736328, 26.745610 ], [ 90.351562, 26.902477 ], [ 92.021484, 26.824071 ], [ 92.109375, 27.449790 ], [ 91.669922, 27.761330 ], [ 92.460938, 27.916767 ], [ 93.427734, 28.613459 ], [ 94.570312, 29.305561 ], [ 95.361328, 28.998532 ], [ 96.152344, 29.458731 ], [ 96.591797, 28.844674 ], [ 96.240234, 28.381735 ], [ 97.294922, 28.226970 ], [ 97.382812, 27.916767 ], [ 97.031250, 27.683528 ], [ 97.119141, 27.059126 ], [ 96.416016, 27.293689 ], [ 95.097656, 26.588527 ], [ 95.185547, 26.037042 ], [ 94.570312, 25.165173 ], [ 94.570312, 24.686952 ], [ 94.130859, 23.885838 ], [ 93.339844, 24.046464 ], [ 93.251953, 23.079732 ], [ 93.076172, 22.674847 ], [ 93.164062, 22.268764 ], [ 92.636719, 22.024546 ], [ 92.109375, 23.644524 ], [ 91.845703, 23.644524 ], [ 91.669922, 22.998852 ], [ 91.142578, 23.483401 ], [ 91.494141, 24.046464 ], [ 91.933594, 24.126702 ], [ 92.373047, 25.005973 ], [ 91.757812, 25.165173 ], [ 89.912109, 25.244696 ], [ 89.824219, 25.958045 ], [ 89.384766, 26.037042 ], [ 88.593750, 26.431228 ], [ 88.242188, 25.799891 ], [ 88.945312, 25.244696 ], [ 88.330078, 24.846565 ], [ 88.066406, 24.527135 ], [ 88.681641, 24.206890 ], [ 88.505859, 23.644524 ], [ 88.857422, 22.917923 ], [ 89.033203, 22.024546 ], [ 88.857422, 21.698265 ], [ 87.011719, 21.534847 ], [ 87.011719, 20.715015 ], [ 86.484375, 20.138470 ], [ 85.078125, 19.476950 ], [ 83.935547, 18.312811 ], [ 82.177734, 17.056785 ], [ 82.177734, 16.551962 ], [ 80.771484, 15.961329 ], [ 80.332031, 15.876809 ], [ 80.068359, 15.114553 ], [ 80.244141, 12.983148 ], [ 79.892578, 12.039321 ], [ 79.892578, 10.314919 ], [ 79.365234, 10.314919 ], [ 78.925781, 9.535749 ], [ 79.189453, 9.188870 ], [ 78.310547, 8.928487 ], [ 77.958984, 8.233237 ], [ 77.519531, 7.972198 ], [ 76.552734, 8.928487 ], [ 75.761719, 11.350797 ], [ 74.882812, 12.726084 ], [ 74.443359, 14.604847 ], [ 73.564453, 15.961329 ], [ 72.861328, 19.228177 ], [ 72.861328, 20.385825 ], [ 72.597656, 21.371244 ], [ 71.191406, 20.797201 ], [ 70.488281, 20.879343 ], [ 69.169922, 22.105999 ], [ 69.609375, 22.431340 ], [ 69.345703, 22.836946 ], [ 68.203125, 23.725012 ], [ 68.818359, 24.367114 ], [ 71.015625, 24.367114 ], [ 70.839844, 25.244696 ], [ 70.312500, 25.720735 ], [ 70.136719, 26.509905 ], [ 69.521484, 26.902477 ], [ 70.576172, 27.994401 ], [ 71.806641, 27.916767 ], [ 72.861328, 28.998532 ], [ 73.476562, 29.993002 ], [ 74.443359, 30.977609 ], [ 74.443359, 31.728167 ], [ 75.234375, 32.249974 ], [ 74.443359, 32.768800 ], [ 73.740234, 34.307144 ], [ 74.267578, 34.741612 ], [ 75.761719, 34.524661 ], [ 76.904297, 34.669359 ], [ 77.871094, 35.460670 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Malaysia", "sov_a3": "MYS", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Malaysia", "adm0_a3": "MYS", "geou_dif": 0, "geounit": "Malaysia", "gu_a3": "MYS", "su_dif": 0, "subunit": "Malaysia", "su_a3": "MYS", "brk_diff": 0, "name": "Malaysia", "name_long": "Malaysia", "brk_a3": "MYS", "brk_name": "Malaysia", "abbrev": "Malay.", "postal": "MY", "formal_en": "Malaysia", "name_sort": "Malaysia", "mapcolor7": 2, "mapcolor8": 4, "mapcolor9": 3, "mapcolor13": 6, "pop_est": 25715819, "gdp_md_est": 384300, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "MY", "iso_a3": "MYS", "iso_n3": "458", "un_a3": "458", "wb_a2": "MY", "wb_a3": "MYS", "woe_id": -99, "adm0_a3_is": "MYS", "adm0_a3_us": "MYS", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "South-Eastern Asia", "region_wb": "East Asia & Pacific", "name_len": 8, "long_len": 8, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 117.158203, 6.926427 ], [ 117.685547, 6.402648 ], [ 117.685547, 5.965754 ], [ 119.179688, 5.441022 ], [ 119.091797, 5.003394 ], [ 118.476562, 5.003394 ], [ 118.652344, 4.477856 ], [ 117.861328, 4.127285 ], [ 116.982422, 4.302591 ], [ 115.839844, 4.302591 ], [ 115.488281, 3.162456 ], [ 115.136719, 2.811371 ], [ 114.609375, 1.406109 ], [ 113.818359, 1.230374 ], [ 112.851562, 1.493971 ], [ 112.412109, 1.406109 ], [ 111.796875, 0.878872 ], [ 111.181641, 0.966751 ], [ 110.478516, 0.790990 ], [ 109.863281, 1.318243 ], [ 109.687500, 2.021065 ], [ 110.390625, 1.669686 ], [ 111.181641, 1.845384 ], [ 111.357422, 2.723583 ], [ 113.027344, 3.074695 ], [ 114.169922, 4.565474 ], [ 114.697266, 4.039618 ], [ 114.873047, 4.390229 ], [ 115.312500, 4.302591 ], [ 115.488281, 5.441022 ], [ 116.191406, 6.140555 ], [ 116.718750, 6.926427 ], [ 117.158203, 6.926427 ] ] ], [ [ [ 100.283203, 6.664608 ], [ 101.074219, 6.227934 ], [ 101.162109, 5.703448 ], [ 101.777344, 5.790897 ], [ 102.128906, 6.227934 ], [ 102.919922, 5.528511 ], [ 103.359375, 4.828260 ], [ 103.359375, 3.688855 ], [ 103.535156, 2.811371 ], [ 103.886719, 2.547988 ], [ 104.238281, 1.669686 ], [ 104.238281, 1.318243 ], [ 103.535156, 1.230374 ], [ 101.425781, 2.723583 ], [ 101.250000, 3.250209 ], [ 100.722656, 3.951941 ], [ 100.546875, 4.740675 ], [ 100.195312, 5.353521 ], [ 100.283203, 6.053161 ], [ 100.107422, 6.489983 ], [ 100.283203, 6.664608 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 6, "sovereignt": "Brunei", "sov_a3": "BRN", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Brunei", "adm0_a3": "BRN", "geou_dif": 0, "geounit": "Brunei", "gu_a3": "BRN", "su_dif": 0, "subunit": "Brunei", "su_a3": "BRN", "brk_diff": 0, "name": "Brunei", "name_long": "Brunei Darussalam", "brk_a3": "BRN", "brk_name": "Brunei", "abbrev": "Brunei", "postal": "BN", "formal_en": "Negara Brunei Darussalam", "name_sort": "Brunei", "mapcolor7": 4, "mapcolor8": 6, "mapcolor9": 6, "mapcolor13": 12, "pop_est": 388190, "gdp_md_est": 20250, "pop_year": -99, "lastcensus": 2001, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "2. High income: nonOECD", "wikipedia": -99, "iso_a2": "BN", "iso_a3": "BRN", "iso_n3": "096", "un_a3": "096", "wb_a2": "BN", "wb_a3": "BRN", "woe_id": -99, "adm0_a3_is": "BRN", "adm0_a3_us": "BRN", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Asia", "region_un": "Asia", "subregion": "South-Eastern Asia", "region_wb": "East Asia & Pacific", "name_len": 6, "long_len": 17, "abbrev_len": 6, "tiny": 2, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 115.488281, 5.441022 ], [ 115.312500, 4.302591 ], [ 114.873047, 4.390229 ], [ 114.697266, 4.039618 ], [ 114.169922, 4.565474 ], [ 115.488281, 5.441022 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 6, "sovereignt": "Malawi", "sov_a3": "MWI", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Malawi", "adm0_a3": "MWI", "geou_dif": 0, "geounit": "Malawi", "gu_a3": "MWI", "su_dif": 0, "subunit": "Malawi", "su_a3": "MWI", "brk_diff": 0, "name": "Malawi", "name_long": "Malawi", "brk_a3": "MWI", "brk_name": "Malawi", "abbrev": "Mal.", "postal": "MW", "formal_en": "Republic of Malawi", "name_sort": "Malawi", "mapcolor7": 1, "mapcolor8": 3, "mapcolor9": 4, "mapcolor13": 5, "pop_est": 14268711, "gdp_md_est": 11810, "pop_year": -99, "lastcensus": 2008, "gdp_year": -99, "economy": "7. Least developed region", "income_grp": "5. Low income", "wikipedia": -99, "iso_a2": "MW", "iso_a3": "MWI", "iso_n3": "454", "un_a3": "454", "wb_a2": "MW", "wb_a3": "MWI", "woe_id": -99, "adm0_a3_is": "MWI", "adm0_a3_us": "MWI", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Eastern Africa", "region_wb": "Sub-Saharan Africa", "name_len": 6, "long_len": 6, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 32.783203, -9.188870 ], [ 33.750000, -9.449062 ], [ 34.277344, -10.141932 ], [ 34.541016, -11.523088 ], [ 34.277344, -12.297068 ], [ 34.541016, -13.581921 ], [ 34.892578, -13.581921 ], [ 35.244141, -13.923404 ], [ 35.683594, -14.604847 ], [ 35.771484, -15.876809 ], [ 35.332031, -16.130262 ], [ 35.068359, -16.804541 ], [ 34.365234, -16.214675 ], [ 34.277344, -15.453680 ], [ 34.541016, -15.029686 ], [ 34.453125, -14.604847 ], [ 34.101562, -14.349548 ], [ 33.750000, -14.434680 ], [ 32.695312, -13.752725 ], [ 32.958984, -12.811801 ], [ 33.310547, -12.468760 ], [ 33.134766, -11.609193 ], [ 33.486328, -10.487812 ], [ 33.222656, -9.709057 ], [ 32.783203, -9.188870 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Zimbabwe", "sov_a3": "ZWE", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Zimbabwe", "adm0_a3": "ZWE", "geou_dif": 0, "geounit": "Zimbabwe", "gu_a3": "ZWE", "su_dif": 0, "subunit": "Zimbabwe", "su_a3": "ZWE", "brk_diff": 0, "name": "Zimbabwe", "name_long": "Zimbabwe", "brk_a3": "ZWE", "brk_name": "Zimbabwe", "abbrev": "Zimb.", "postal": "ZW", "formal_en": "Republic of Zimbabwe", "name_sort": "Zimbabwe", "mapcolor7": 1, "mapcolor8": 5, "mapcolor9": 3, "mapcolor13": 9, "pop_est": 12619600, "gdp_md_est": 9323, "pop_year": 0, "lastcensus": 2002, "gdp_year": 0, "economy": "5. Emerging region: G20", "income_grp": "5. Low income", "wikipedia": -99, "iso_a2": "ZW", "iso_a3": "ZWE", "iso_n3": "716", "un_a3": "716", "wb_a2": "ZW", "wb_a3": "ZWE", "woe_id": -99, "adm0_a3_is": "ZWE", "adm0_a3_us": "ZWE", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Eastern Africa", "region_wb": "Sub-Saharan Africa", "name_len": 8, "long_len": 8, "abbrev_len": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 30.234375, -15.538376 ], [ 30.322266, -15.876809 ], [ 31.201172, -15.876809 ], [ 31.816406, -16.299051 ], [ 32.343750, -16.383391 ], [ 32.871094, -16.720385 ], [ 32.871094, -17.978733 ], [ 32.607422, -19.394068 ], [ 32.783203, -19.725342 ], [ 32.695312, -20.303418 ], [ 32.519531, -20.385825 ], [ 32.255859, -21.125498 ], [ 31.201172, -22.268764 ], [ 30.673828, -22.187405 ], [ 30.322266, -22.268764 ], [ 29.443359, -22.105999 ], [ 28.828125, -21.616579 ], [ 28.037109, -21.453069 ], [ 27.685547, -20.879343 ], [ 27.685547, -20.468189 ], [ 27.333984, -20.385825 ], [ 26.191406, -19.311143 ], [ 25.224609, -17.727759 ], [ 27.070312, -17.978733 ], [ 28.476562, -16.467695 ], [ 28.828125, -16.383391 ], [ 28.916016, -16.045813 ], [ 29.531250, -15.623037 ], [ 30.234375, -15.538376 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Solomon Islands", "sov_a3": "SLB", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Solomon Islands", "adm0_a3": "SLB", "geou_dif": 0, "geounit": "Solomon Islands", "gu_a3": "SLB", "su_dif": 0, "subunit": "Solomon Islands", "su_a3": "SLB", "brk_diff": 0, "name": "Solomon Is.", "name_long": "Solomon Islands", "brk_a3": "SLB", "brk_name": "Solomon Is.", "abbrev": "S. Is.", "postal": "SB", "name_sort": "Solomon Islands", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 1, "mapcolor13": 6, "pop_est": 595613, "gdp_md_est": 1078, "pop_year": -99, "lastcensus": 2009, "gdp_year": -99, "economy": "7. Least developed region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "SB", "iso_a3": "SLB", "iso_n3": "090", "un_a3": "090", "wb_a2": "SB", "wb_a3": "SLB", "woe_id": -99, "adm0_a3_is": "SLB", "adm0_a3_us": "SLB", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Oceania", "region_un": "Oceania", "subregion": "Melanesia", "region_wb": "East Asia & Pacific", "name_len": 11, "long_len": 15, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 161.279297, -10.228437 ], [ 162.158203, -10.487812 ], [ 162.421875, -10.833306 ], [ 161.718750, -10.833306 ], [ 161.279297, -10.228437 ] ] ], [ [ [ 159.697266, -9.275622 ], [ 160.400391, -9.362353 ], [ 160.839844, -9.882275 ], [ 159.873047, -9.795678 ], [ 159.609375, -9.622414 ], [ 159.697266, -9.275622 ] ] ], [ [ [ 160.927734, -8.320212 ], [ 161.279297, -9.102097 ], [ 161.718750, -9.622414 ], [ 161.542969, -9.795678 ], [ 160.751953, -8.928487 ], [ 160.576172, -8.320212 ], [ 160.927734, -8.320212 ] ] ], [ [ [ 158.378906, -7.362467 ], [ 159.609375, -8.059230 ], [ 159.960938, -8.581021 ], [ 158.203125, -7.449624 ], [ 158.378906, -7.362467 ] ] ], [ [ [ 156.533203, -6.577303 ], [ 157.500000, -7.362467 ], [ 157.324219, -7.362467 ], [ 156.884766, -7.188101 ], [ 156.533203, -6.751896 ], [ 156.533203, -6.577303 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Papua New Guinea", "sov_a3": "PNG", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Papua New Guinea", "adm0_a3": "PNG", "geou_dif": 0, "geounit": "Papua New Guinea", "gu_a3": "PNG", "su_dif": 1, "subunit": "Papua New Guinea", "su_a3": "PN1", "brk_diff": 0, "name": "Papua New Guinea", "name_long": "Papua New Guinea", "brk_a3": "PN1", "brk_name": "Papua New Guinea", "abbrev": "P.N.G.", "postal": "PG", "formal_en": "Independent State of Papua New Guinea", "name_sort": "Papua New Guinea", "mapcolor7": 4, "mapcolor8": 2, "mapcolor9": 3, "mapcolor13": 1, "pop_est": 6057263, "gdp_md_est": 13210, "pop_year": -99, "lastcensus": 2000, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "PG", "iso_a3": "PNG", "iso_n3": "598", "un_a3": "598", "wb_a2": "PG", "wb_a3": "PNG", "woe_id": -99, "adm0_a3_is": "PNG", "adm0_a3_us": "PNG", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Oceania", "region_un": "Oceania", "subregion": "Melanesia", "region_wb": "East Asia & Pacific", "name_len": 16, "long_len": 16, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 140.976562, -2.635789 ], [ 144.580078, -3.864255 ], [ 145.810547, -4.915833 ], [ 145.986328, -5.441022 ], [ 147.656250, -6.053161 ], [ 147.919922, -6.577303 ], [ 146.953125, -6.751896 ], [ 147.216797, -7.362467 ], [ 148.095703, -8.059230 ], [ 148.710938, -9.102097 ], [ 149.326172, -9.102097 ], [ 149.238281, -9.535749 ], [ 150.029297, -9.709057 ], [ 149.765625, -9.882275 ], [ 150.820312, -10.314919 ], [ 150.732422, -10.574222 ], [ 150.029297, -10.660608 ], [ 149.765625, -10.401378 ], [ 147.919922, -10.141932 ], [ 146.601562, -8.928487 ], [ 146.074219, -8.059230 ], [ 144.755859, -7.623887 ], [ 143.261719, -8.233237 ], [ 143.437500, -9.015302 ], [ 142.646484, -9.362353 ], [ 142.031250, -9.188870 ], [ 141.064453, -9.102097 ], [ 140.976562, -2.635789 ] ] ], [ [ [ 152.138672, -4.127285 ], [ 152.314453, -4.302591 ], [ 152.314453, -4.828260 ], [ 151.962891, -5.441022 ], [ 151.435547, -5.528511 ], [ 151.259766, -5.878332 ], [ 150.205078, -6.315299 ], [ 149.677734, -6.315299 ], [ 148.359375, -5.703448 ], [ 148.359375, -5.441022 ], [ 149.326172, -5.615986 ], [ 149.853516, -5.528511 ], [ 150.029297, -5.003394 ], [ 150.117188, -5.003394 ], [ 150.205078, -5.528511 ], [ 150.820312, -5.441022 ], [ 151.611328, -4.740675 ], [ 151.523438, -4.127285 ], [ 152.138672, -4.127285 ] ] ], [ [ [ 154.687500, -5.003394 ], [ 154.775391, -5.353521 ], [ 156.005859, -6.577303 ], [ 155.917969, -6.839170 ], [ 155.566406, -6.926427 ], [ 155.126953, -6.577303 ], [ 154.687500, -5.878332 ], [ 154.511719, -5.178482 ], [ 154.687500, -5.003394 ] ] ], [ [ [ 150.908203, -2.460181 ], [ 152.226562, -3.250209 ], [ 153.017578, -3.951941 ], [ 153.105469, -4.477856 ], [ 152.841797, -4.740675 ], [ 152.402344, -3.776559 ], [ 151.347656, -3.074695 ], [ 150.644531, -2.723583 ], [ 150.908203, -2.460181 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
|
||||
"maxzoom": "5",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-densest-as-needed.json.check.mbtiles",
|
||||
"strategies": "[{\"coalesced_as_needed\":528,\"detail_reduced\":2,\"tiny_polygons\":2,\"tile_size_desired\":39195},{\"coalesced_as_needed\":212,\"tile_size_desired\":25155},{\"coalesced_as_needed\":190,\"tiny_polygons\":1,\"tile_size_desired\":21206},{\"coalesced_as_needed\":159,\"tile_size_desired\":10751},{\"coalesced_as_needed\":51,\"tile_size_desired\":6591},{\"tiny_polygons\":1}]",
|
||||
"strategies": "[{\"coalesced_as_needed\":528,\"detail_reduced\":2,\"tiny_polygons\":2,\"tile_size_desired\":39242},{\"coalesced_as_needed\":212,\"tile_size_desired\":25160},{\"coalesced_as_needed\":190,\"tiny_polygons\":1,\"tile_size_desired\":21223},{\"coalesced_as_needed\":159,\"tile_size_desired\":10749},{\"coalesced_as_needed\":51,\"tile_size_desired\":6591},{\"tiny_polygons\":1}]",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
|
||||
"maxzoom": "5",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-smallest-as-needed.json.check.mbtiles",
|
||||
"strategies": "[{\"coalesced_as_needed\":1271,\"tiny_polygons\":5,\"tile_size_desired\":39195},{\"coalesced_as_needed\":1189,\"tile_size_desired\":25155},{\"coalesced_as_needed\":727,\"tiny_polygons\":1,\"tile_size_desired\":21206},{\"coalesced_as_needed\":179,\"tile_size_desired\":10751},{\"coalesced_as_needed\":73,\"tile_size_desired\":6591},{\"tiny_polygons\":1}]",
|
||||
"strategies": "[{\"coalesced_as_needed\":1271,\"tiny_polygons\":5,\"tile_size_desired\":39242},{\"coalesced_as_needed\":1189,\"tile_size_desired\":25160},{\"coalesced_as_needed\":727,\"tiny_polygons\":1,\"tile_size_desired\":21223},{\"coalesced_as_needed\":179,\"tile_size_desired\":10749},{\"coalesced_as_needed\":73,\"tile_size_desired\":6591},{\"tiny_polygons\":1}]",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"maxzoom": "5",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_admin_0_countries/out/-z5_-M5000_--drop-smallest-as-needed.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_as_needed\":174,\"tile_size_desired\":39195},{\"dropped_as_needed\":202,\"tile_size_desired\":25155},{\"dropped_as_needed\":190,\"tile_size_desired\":21206},{\"dropped_as_needed\":155,\"tile_size_desired\":10751},{\"dropped_as_needed\":78,\"tile_size_desired\":6591},{\"tiny_polygons\":1}]",
|
||||
"strategies": "[{\"dropped_as_needed\":174,\"tile_size_desired\":39242},{\"dropped_as_needed\":202,\"tile_size_desired\":25160},{\"dropped_as_needed\":190,\"tile_size_desired\":21223},{\"dropped_as_needed\":155,\"tile_size_desired\":10749},{\"dropped_as_needed\":78,\"tile_size_desired\":6591},{\"tiny_polygons\":1}]",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
"maxzoom": "5",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_admin_1_states_provinces_lines/out/-z5_-M500_--drop-smallest-as-needed.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_as_needed\":92,\"tile_size_desired\":1377},{\"dropped_as_needed\":96,\"tile_size_desired\":1738},{\"dropped_as_needed\":115,\"tile_size_desired\":1303},{\"dropped_as_needed\":127,\"tile_size_desired\":1154},{\"dropped_as_needed\":105,\"tile_size_desired\":1228},{\"dropped_as_needed\":106,\"tile_size_desired\":1077}]",
|
||||
"strategies": "[{\"dropped_as_needed\":92,\"tile_size_desired\":1385},{\"dropped_as_needed\":96,\"tile_size_desired\":1739},{\"dropped_as_needed\":115,\"tile_size_desired\":1304},{\"dropped_as_needed\":127,\"tile_size_desired\":1154},{\"dropped_as_needed\":105,\"tile_size_desired\":1228},{\"dropped_as_needed\":106,\"tile_size_desired\":1077}]",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
@@ -10,6 +10,7 @@
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/--smallest-maximum-zoom-guess_2_-Bf20_-rf20_-pb.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_by_rate\":237},{\"dropped_by_rate\":229},{}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":2,\"droprate\":6.599999999999999,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"maxzoom": "3",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/--smallest-maximum-zoom-guess_3_-Bg.json.check.mbtiles",
|
||||
"tippecanoe_decisions": "{\"basezoom\":0,\"droprate\":2.5,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/--smallest-maximum-zoom-guess_3_-rp.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_by_rate\":230},{\"dropped_by_rate\":231},{\"dropped_by_rate\":160},{}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":3,\"droprate\":2.6582825467008166,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
+1
@@ -9,6 +9,7 @@
|
||||
"maxzoom": "8",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-r1_-z8_-J_tests%2ffeature-filter%2fplaces-filter.json.check.mbtiles",
|
||||
"tippecanoe_decisions": "{\"basezoom\":8,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "NAME": "Vancouver" }, "geometry": { "type": "Point", "coordinates": [ -123.134766, 49.267805 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Denver" }, "geometry": { "type": "Point", "coordinates": [ -104.941406, 39.707187 ] } }
|
||||
{ "type": "Feature", "properties": { "NAME": "San Francisco" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Chicago" }, "geometry": { "type": "Point", "coordinates": [ -87.714844, 41.836828 ] } }
|
||||
,
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-yNAME_-z5_-B3.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_by_rate\":227},{\"dropped_by_rate\":227},{\"dropped_by_rate\":152},{},{},{}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":3,\"droprate\":2.5,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-yNAME_-z5_-r1.5.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_by_rate\":211},{\"dropped_by_rate\":214},{\"dropped_by_rate\":179},{\"dropped_by_rate\":138},{\"dropped_by_rate\":70},{}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":5,\"droprate\":1.5,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
+2
-1
@@ -9,7 +9,8 @@
|
||||
"maxzoom": "2",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-z0_-M10000_--drop-densest-as-needed_--extend-zooms-if-still-dropping-maximum_2.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_as_needed\":219,\"tile_size_desired\":74691},{\"dropped_as_needed\":207,\"tile_size_desired\":44398},{\"dropped_as_needed\":181,\"tile_size_desired\":35126}]",
|
||||
"strategies": "[{\"dropped_as_needed\":219,\"tile_size_desired\":74734},{\"dropped_as_needed\":207,\"tile_size_desired\":44415},{\"dropped_as_needed\":181,\"tile_size_desired\":35130}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":0,\"droprate\":2.5,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
+1
@@ -9,6 +9,7 @@
|
||||
"maxzoom": "0",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-z0_-r1_-yNAME_-ySOV0NAME_-yELEVATION_-YNAME%3aCity_-YSOV0NAME%3aCountry.json.check.mbtiles",
|
||||
"tippecanoe_decisions": "{\"basezoom\":0,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"maxzoom": "1",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-z1_-M10000_--coalesce-smallest-as-needed.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_by_rate\":145,\"coalesced_as_needed\":74,\"tile_size_desired\":32932},{\"coalesced_as_needed\":226,\"tile_size_desired\":44398}]",
|
||||
"strategies": "[{\"dropped_by_rate\":145,\"coalesced_as_needed\":74,\"tile_size_desired\":32942},{\"coalesced_as_needed\":226,\"tile_size_desired\":44415}]",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"maxzoom": "1",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-z1_-M10000_--drop-smallest-as-needed.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_by_rate\":145,\"dropped_as_needed\":75,\"tile_size_desired\":32932},{\"dropped_as_needed\":204,\"tile_size_desired\":44398}]",
|
||||
"strategies": "[{\"dropped_by_rate\":145,\"dropped_as_needed\":75,\"tile_size_desired\":32942},{\"dropped_as_needed\":204,\"tile_size_desired\":44415}]",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-z3_-K20_-r1_-yNAME_-k2.json.check.mbtiles",
|
||||
"strategies": "[{\"coalesced_as_needed\":207},{\"coalesced_as_needed\":174},{\"coalesced_as_needed\":108},{}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":3,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"maxzoom": "3",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-z3_-r1_--limit-tile-feature-count_3.json.check.mbtiles",
|
||||
"tippecanoe_decisions": "{\"basezoom\":3,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
+1
@@ -9,6 +9,7 @@
|
||||
"maxzoom": "3",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-z3_-r1_--limit-tile-feature-count_3_--limit-tile-feature-count-at-maximum-zoom_10.json.check.mbtiles",
|
||||
"tippecanoe_decisions": "{\"basezoom\":3,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-zg_-K20_-r1_-yNAME.json.check.mbtiles",
|
||||
"strategies": "[{\"coalesced_as_needed\":207},{\"coalesced_as_needed\":174},{\"coalesced_as_needed\":108},{\"coalesced_as_needed\":51}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":3,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_populated_places/out/-zg_-K20_-r1_-yNAME_-kg.json.check.mbtiles",
|
||||
"strategies": "[{\"coalesced_as_needed\":207},{\"coalesced_as_needed\":174},{\"coalesced_as_needed\":108},{}]",
|
||||
"tippecanoe_decisions": "{\"basezoom\":3,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "SCALERANK": 0, "NAME": "Los Angeles" }, "geometry": { "type": "Point", "coordinates": [ -118.125000, 33.943360 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "SCALERANK": 0, "NAME": "London" }, "geometry": { "type": "Point", "coordinates": [ -0.087891, 51.508742 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "SCALERANK": 0, "NAME": "Santiago" }, "geometry": { "type": "Point", "coordinates": [ -70.664062, -33.431441 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "SCALERANK": 0, "NAME": "Rome" }, "geometry": { "type": "Point", "coordinates": [ 12.480469, 41.902277 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "SCALERANK": 0, "NAME": "Lagos" }, "geometry": { "type": "Point", "coordinates": [ 3.427734, 6.402648 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "SCALERANK": 0, "NAME": "Riyadh" }, "geometry": { "type": "Point", "coordinates": [ 46.757812, 24.607069 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "SCALERANK": 0, "NAME": "Singapore" }, "geometry": { "type": "Point", "coordinates": [ 103.886719, 1.230374 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "SCALERANK": 0, "NAME": "Cape Town" }, "geometry": { "type": "Point", "coordinates": [ 18.457031, -33.943360 ] } }
|
||||
] }
|
||||
] }
|
||||
@@ -0,0 +1,57 @@
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "NAME": "Los Angeles" }, "geometry": { "type": "Point", "coordinates": [ -118.125000, 33.943360 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Mexico City" }, "geometry": { "type": "Point", "coordinates": [ -99.140625, 19.394068 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Washington, D.C." }, "geometry": { "type": "Point", "coordinates": [ -76.992188, 38.891033 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "New York" }, "geometry": { "type": "Point", "coordinates": [ -74.003906, 40.713956 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Bogota" }, "geometry": { "type": "Point", "coordinates": [ -74.091797, 4.565474 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "London" }, "geometry": { "type": "Point", "coordinates": [ -0.087891, 51.508742 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Santiago" }, "geometry": { "type": "Point", "coordinates": [ -70.664062, -33.431441 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Sao Paulo" }, "geometry": { "type": "Point", "coordinates": [ -46.582031, -23.563987 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Rio de Janeiro" }, "geometry": { "type": "Point", "coordinates": [ -43.242188, -22.917923 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Paris" }, "geometry": { "type": "Point", "coordinates": [ 2.373047, 48.864715 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Rome" }, "geometry": { "type": "Point", "coordinates": [ 12.480469, 41.902277 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Istanbul" }, "geometry": { "type": "Point", "coordinates": [ 29.003906, 41.112469 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Moscow" }, "geometry": { "type": "Point", "coordinates": [ 37.617188, 55.727110 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Lagos" }, "geometry": { "type": "Point", "coordinates": [ 3.427734, 6.402648 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Cairo" }, "geometry": { "type": "Point", "coordinates": [ 31.289062, 30.069094 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Riyadh" }, "geometry": { "type": "Point", "coordinates": [ 46.757812, 24.607069 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Kolkata" }, "geometry": { "type": "Point", "coordinates": [ 88.330078, 22.512557 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Mumbai" }, "geometry": { "type": "Point", "coordinates": [ 72.861328, 18.979026 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Singapore" }, "geometry": { "type": "Point", "coordinates": [ 103.886719, 1.230374 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Beijing" }, "geometry": { "type": "Point", "coordinates": [ 116.367188, 39.909736 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Hong Kong" }, "geometry": { "type": "Point", "coordinates": [ 114.169922, 22.268764 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Shanghai" }, "geometry": { "type": "Point", "coordinates": [ 121.464844, 31.203405 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Tokyo" }, "geometry": { "type": "Point", "coordinates": [ 139.746094, 35.675147 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Cape Town" }, "geometry": { "type": "Point", "coordinates": [ 18.457031, -33.943360 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Nairobi" }, "geometry": { "type": "Point", "coordinates": [ 36.826172, -1.318243 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Jakarta" }, "geometry": { "type": "Point", "coordinates": [ 106.875000, -6.227934 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Sydney" }, "geometry": { "type": "Point", "coordinates": [ 151.171875, -33.943360 ] } }
|
||||
] }
|
||||
] }
|
||||
@@ -0,0 +1,21 @@
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "NAME": "Vancouver" }, "geometry": { "type": "Point", "coordinates": [ -123.134766, 49.267805 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Castries" }, "geometry": { "type": "Point", "coordinates": [ -60.996094, 14.008696 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Nukualofa" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ -175.166016, -21.125498 ], [ 184.833984, -21.125498 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Vienna" }, "geometry": { "type": "Point", "coordinates": [ 16.347656, 48.166085 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Niamey" }, "geometry": { "type": "Point", "coordinates": [ 2.109375, 13.496473 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Hargeysa" }, "geometry": { "type": "Point", "coordinates": [ 44.121094, 9.535749 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Chengdu" }, "geometry": { "type": "Point", "coordinates": [ 104.062500, 30.675715 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Cape Town" }, "geometry": { "type": "Point", "coordinates": [ 18.457031, -33.943360 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "NAME": "Suva" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 178.505859, -18.145852 ], [ -181.582031, -18.145852 ] ] } }
|
||||
] }
|
||||
] }
|
||||
Binary file not shown.
@@ -9,6 +9,7 @@
|
||||
"maxzoom": "14",
|
||||
"minzoom": "0",
|
||||
"name": "tests/pmtiles/hackspots.pmtiles",
|
||||
"tippecanoe_decisions": "{\"basezoom\":14,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"maxzoom": "14",
|
||||
"minzoom": "0",
|
||||
"name": "tests/raw-tiles/raw-tiles",
|
||||
"tippecanoe_decisions": "{\"basezoom\":14,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"maxzoom": "14",
|
||||
"minzoom": "0",
|
||||
"name": "tests/raw-tiles/raw-tiles",
|
||||
"tippecanoe_decisions": "{\"basezoom\":14,\"droprate\":1,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"maxzoom": "3",
|
||||
"minzoom": "0",
|
||||
"name": "tests/stable/out/-z3_-B0.json.check.mbtiles",
|
||||
"tippecanoe_decisions": "{\"basezoom\":0,\"droprate\":2.5,\"retain_points_multiplier\":1}",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
@@ -130,21 +130,21 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1103679538189", "FULLNAME": "Old Centreville Rd", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.458506, 38.787409 ], [ -77.458720, 38.785602 ], [ -77.458935, 38.783762 ], [ -77.459021, 38.783227 ], [ -77.459064, 38.782290 ], [ -77.459106, 38.781856 ], [ -77.459493, 38.778410 ], [ -77.459450, 38.778209 ], [ -77.454772, 38.775532 ], [ -77.453613, 38.774897 ], [ -77.452970, 38.774462 ], [ -77.452669, 38.774094 ], [ -77.452497, 38.773525 ], [ -77.452283, 38.773458 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477217", "FULLNAME": "State Rte 28", "RTTYP": "S", "MTFCC": "S1200" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452111, 38.773425 ], [ -77.452283, 38.772622 ], [ -77.452326, 38.772387 ], [ -77.452455, 38.771886 ], [ -77.452497, 38.771685 ], [ -77.452583, 38.771317 ], [ -77.452712, 38.770681 ], [ -77.452798, 38.770514 ], [ -77.452884, 38.770246 ], [ -77.452970, 38.770012 ], [ -77.453098, 38.769811 ], [ -77.453270, 38.769510 ], [ -77.453356, 38.769343 ], [ -77.453570, 38.769042 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477217", "FULLNAME": "State Rte 28", "RTTYP": "S", "MTFCC": "S1200" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452111, 38.773425 ], [ -77.452497, 38.771685 ], [ -77.452884, 38.770246 ], [ -77.453270, 38.769510 ], [ -77.453570, 38.769042 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477454", "FULLNAME": "Centreville Rd", "RTTYP": "M", "MTFCC": "S1200" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452111, 38.773425 ], [ -77.452283, 38.772622 ], [ -77.452326, 38.772387 ], [ -77.452455, 38.771886 ], [ -77.452497, 38.771685 ], [ -77.452583, 38.771317 ], [ -77.452712, 38.770681 ], [ -77.452798, 38.770514 ], [ -77.452884, 38.770246 ], [ -77.452970, 38.770012 ], [ -77.453098, 38.769811 ], [ -77.453270, 38.769510 ], [ -77.453356, 38.769343 ], [ -77.453570, 38.769042 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477454", "FULLNAME": "Centreville Rd", "RTTYP": "M", "MTFCC": "S1200" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452111, 38.773425 ], [ -77.452497, 38.771685 ], [ -77.452884, 38.770246 ], [ -77.453270, 38.769510 ], [ -77.453570, 38.769042 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1106073064085", "FULLNAME": "Blooms Quarry Ln", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452111, 38.773425 ], [ -77.451854, 38.773391 ], [ -77.451768, 38.773391 ], [ -77.451725, 38.773391 ], [ -77.451639, 38.773391 ], [ -77.451339, 38.773458 ], [ -77.451210, 38.773492 ], [ -77.450867, 38.773625 ], [ -77.450824, 38.773659 ], [ -77.450695, 38.773659 ], [ -77.450566, 38.773692 ], [ -77.450266, 38.773692 ], [ -77.449965, 38.773659 ], [ -77.449880, 38.773625 ], [ -77.449322, 38.773358 ], [ -77.448163, 38.772856 ], [ -77.447605, 38.772588 ], [ -77.447305, 38.772387 ], [ -77.447047, 38.772187 ], [ -77.446790, 38.771986 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1106073064085", "FULLNAME": "Blooms Quarry Ln", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452111, 38.773425 ], [ -77.451339, 38.773458 ], [ -77.450824, 38.773659 ], [ -77.450266, 38.773692 ], [ -77.449965, 38.773659 ], [ -77.449322, 38.773358 ], [ -77.447605, 38.772588 ], [ -77.446790, 38.771986 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1102214409896", "FULLNAME": "Centreville Rd", "RTTYP": "M", "MTFCC": "S1200" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452283, 38.773458 ], [ -77.452326, 38.773224 ], [ -77.452497, 38.772421 ], [ -77.452669, 38.771718 ], [ -77.452841, 38.770882 ], [ -77.452927, 38.770581 ], [ -77.453012, 38.770380 ], [ -77.453098, 38.770146 ], [ -77.453227, 38.769845 ], [ -77.453399, 38.769543 ], [ -77.453485, 38.769376 ], [ -77.453699, 38.769075 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1102214409896", "FULLNAME": "Centreville Rd", "RTTYP": "M", "MTFCC": "S1200" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452283, 38.773458 ], [ -77.452669, 38.771718 ], [ -77.452927, 38.770581 ], [ -77.453227, 38.769845 ], [ -77.453699, 38.769075 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1102214411210", "FULLNAME": "State Rte 28", "RTTYP": "S", "MTFCC": "S1200" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452283, 38.773458 ], [ -77.452326, 38.773224 ], [ -77.452497, 38.772421 ], [ -77.452669, 38.771718 ], [ -77.452841, 38.770882 ], [ -77.452927, 38.770581 ], [ -77.453012, 38.770380 ], [ -77.453098, 38.770146 ], [ -77.453227, 38.769845 ], [ -77.453399, 38.769543 ], [ -77.453485, 38.769376 ], [ -77.453699, 38.769075 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1102214411210", "FULLNAME": "State Rte 28", "RTTYP": "S", "MTFCC": "S1200" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452283, 38.773458 ], [ -77.452669, 38.771718 ], [ -77.452927, 38.770581 ], [ -77.453227, 38.769845 ], [ -77.453699, 38.769075 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477418", "FULLNAME": "Manassas Dr", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.443743, 38.768640 ], [ -77.443914, 38.768841 ], [ -77.445374, 38.769711 ], [ -77.445545, 38.769778 ], [ -77.446747, 38.770581 ], [ -77.447648, 38.770982 ], [ -77.448807, 38.771250 ], [ -77.449880, 38.771417 ], [ -77.452283, 38.771752 ], [ -77.452497, 38.771685 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477419", "FULLNAME": "Manassas Dr", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452497, 38.771685 ], [ -77.452326, 38.771584 ], [ -77.452025, 38.771518 ], [ -77.449880, 38.771250 ], [ -77.448764, 38.771083 ], [ -77.447777, 38.770815 ], [ -77.446790, 38.770380 ], [ -77.445674, 38.769644 ], [ -77.445545, 38.769543 ], [ -77.444601, 38.769042 ], [ -77.443743, 38.768640 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1106092774118", "FULLNAME": "Manassas Dr", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452283, 38.773458 ], [ -77.452111, 38.773425 ], [ -77.451854, 38.773391 ], [ -77.451768, 38.773391 ], [ -77.451725, 38.773391 ], [ -77.451639, 38.773391 ], [ -77.451339, 38.773458 ], [ -77.451210, 38.773492 ], [ -77.450867, 38.773625 ], [ -77.450824, 38.773659 ], [ -77.450695, 38.773659 ], [ -77.450566, 38.773692 ], [ -77.450266, 38.773692 ], [ -77.449965, 38.773659 ], [ -77.449880, 38.773625 ], [ -77.449322, 38.773358 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1106092774118", "FULLNAME": "Manassas Dr", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.452283, 38.773458 ], [ -77.452111, 38.773425 ], [ -77.451339, 38.773458 ], [ -77.450824, 38.773659 ], [ -77.450266, 38.773692 ], [ -77.449965, 38.773659 ], [ -77.449322, 38.773358 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477551", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.450566, 38.772287 ], [ -77.450824, 38.772387 ], [ -77.450910, 38.772254 ], [ -77.450738, 38.772153 ], [ -77.450566, 38.772287 ] ] } }
|
||||
,
|
||||
@@ -154,7 +154,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477440", "FULLNAME": "Sunnyside Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.449665, 38.772053 ], [ -77.449493, 38.771952 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1106087402596", "FULLNAME": "Blooms Quarry Rd", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.449322, 38.773358 ], [ -77.448163, 38.772856 ], [ -77.447605, 38.772588 ], [ -77.447305, 38.772387 ], [ -77.447047, 38.772187 ], [ -77.446790, 38.771986 ], [ -77.445030, 38.770614 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1106087402596", "FULLNAME": "Blooms Quarry Rd", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.449322, 38.773358 ], [ -77.447605, 38.772588 ], [ -77.446790, 38.771986 ], [ -77.445030, 38.770614 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477452", "FULLNAME": "White Pine Dr", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.447348, 38.771417 ], [ -77.446961, 38.771250 ], [ -77.446876, 38.771350 ], [ -77.447176, 38.771584 ], [ -77.448249, 38.772321 ], [ -77.449064, 38.772689 ], [ -77.450180, 38.773157 ] ] } }
|
||||
,
|
||||
@@ -336,13 +336,13 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477422", "FULLNAME": "Primrose Ln", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.434087, 38.763989 ], [ -77.433829, 38.764190 ], [ -77.433658, 38.764457 ], [ -77.433443, 38.764491 ], [ -77.433186, 38.764625 ], [ -77.433100, 38.764758 ], [ -77.433143, 38.765026 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1103678606081", "FULLNAME": "Silver Meteor Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.432799, 38.762650 ], [ -77.432885, 38.762851 ], [ -77.432971, 38.763119 ], [ -77.432971, 38.763186 ], [ -77.432971, 38.763253 ], [ -77.432842, 38.763420 ], [ -77.432628, 38.763822 ], [ -77.432585, 38.763855 ], [ -77.432499, 38.763888 ], [ -77.432284, 38.763955 ], [ -77.432241, 38.763955 ], [ -77.432156, 38.763955 ], [ -77.431855, 38.763822 ], [ -77.431812, 38.763822 ], [ -77.431812, 38.763788 ], [ -77.431812, 38.763721 ], [ -77.431941, 38.763353 ], [ -77.432241, 38.762952 ], [ -77.432284, 38.762918 ], [ -77.432456, 38.762784 ], [ -77.432542, 38.762717 ], [ -77.432628, 38.762684 ], [ -77.432714, 38.762684 ], [ -77.432799, 38.762650 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1103678606081", "FULLNAME": "Silver Meteor Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.432799, 38.762650 ], [ -77.432971, 38.763253 ], [ -77.432585, 38.763855 ], [ -77.432156, 38.763955 ], [ -77.431812, 38.763788 ], [ -77.431941, 38.763353 ], [ -77.432284, 38.762918 ], [ -77.432542, 38.762717 ], [ -77.432799, 38.762650 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1103679538423", "FULLNAME": "Black Hawk Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.432799, 38.762650 ], [ -77.432885, 38.762851 ], [ -77.432971, 38.763119 ], [ -77.432971, 38.763186 ], [ -77.432971, 38.763253 ], [ -77.432842, 38.763420 ], [ -77.432628, 38.763822 ], [ -77.432585, 38.763855 ], [ -77.432499, 38.763888 ], [ -77.432284, 38.763955 ], [ -77.432241, 38.763955 ], [ -77.432156, 38.763955 ], [ -77.431855, 38.763822 ], [ -77.431812, 38.763822 ], [ -77.431812, 38.763788 ], [ -77.431812, 38.763721 ], [ -77.431941, 38.763353 ], [ -77.432241, 38.762952 ], [ -77.432284, 38.762918 ], [ -77.432456, 38.762784 ], [ -77.432542, 38.762717 ], [ -77.432628, 38.762684 ], [ -77.432714, 38.762684 ], [ -77.432799, 38.762650 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1103679538423", "FULLNAME": "Black Hawk Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.432799, 38.762650 ], [ -77.432971, 38.763253 ], [ -77.432585, 38.763855 ], [ -77.432156, 38.763955 ], [ -77.431812, 38.763788 ], [ -77.431941, 38.763353 ], [ -77.432284, 38.762918 ], [ -77.432542, 38.762717 ], [ -77.432799, 38.762650 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1103678606039", "FULLNAME": "Silver Meteor Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.433400, 38.762583 ], [ -77.433100, 38.762650 ], [ -77.432928, 38.762684 ], [ -77.432799, 38.762650 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1103678606039", "FULLNAME": "Silver Meteor Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.433400, 38.762583 ], [ -77.432799, 38.762650 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1103679538422", "FULLNAME": "Black Hawk Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.433400, 38.762583 ], [ -77.433100, 38.762650 ], [ -77.432928, 38.762684 ], [ -77.432799, 38.762650 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1103679538422", "FULLNAME": "Black Hawk Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.433400, 38.762583 ], [ -77.432799, 38.762650 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477423", "FULLNAME": "Railroad Dr", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.442241, 38.762617 ], [ -77.441897, 38.762650 ], [ -77.441554, 38.762851 ], [ -77.440696, 38.763688 ], [ -77.440567, 38.763989 ], [ -77.440567, 38.764089 ] ] } }
|
||||
,
|
||||
@@ -434,9 +434,9 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477227", "FULLNAME": "Gary Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.429924, 38.767636 ], [ -77.430696, 38.767101 ], [ -77.431211, 38.766733 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1106087387886", "FULLNAME": "Manassas Dr", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.427735, 38.765361 ], [ -77.427692, 38.765796 ], [ -77.427649, 38.767302 ], [ -77.427478, 38.768673 ], [ -77.427564, 38.769108 ], [ -77.427649, 38.769242 ], [ -77.427735, 38.769376 ], [ -77.427821, 38.769476 ], [ -77.427950, 38.769577 ], [ -77.428079, 38.769677 ], [ -77.428207, 38.769778 ], [ -77.428293, 38.769811 ], [ -77.428422, 38.769878 ], [ -77.428551, 38.769911 ], [ -77.428722, 38.769945 ], [ -77.428808, 38.769978 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "1106087387886", "FULLNAME": "Manassas Dr", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.427735, 38.765361 ], [ -77.427692, 38.765796 ], [ -77.427649, 38.767302 ], [ -77.427478, 38.768673 ], [ -77.427564, 38.769108 ], [ -77.427735, 38.769376 ], [ -77.428079, 38.769677 ], [ -77.428422, 38.769878 ], [ -77.428808, 38.769978 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477374", "FULLNAME": "Fairway Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.427564, 38.769108 ], [ -77.427649, 38.769242 ], [ -77.427735, 38.769376 ], [ -77.427821, 38.769476 ], [ -77.427950, 38.769577 ], [ -77.428079, 38.769677 ], [ -77.428207, 38.769778 ], [ -77.428293, 38.769811 ], [ -77.428422, 38.769878 ], [ -77.428551, 38.769911 ], [ -77.428722, 38.769945 ], [ -77.428808, 38.769978 ], [ -77.430611, 38.769911 ], [ -77.431340, 38.769711 ] ] } }
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477374", "FULLNAME": "Fairway Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.427564, 38.769108 ], [ -77.427735, 38.769376 ], [ -77.428079, 38.769677 ], [ -77.428422, 38.769878 ], [ -77.428808, 38.769978 ], [ -77.430611, 38.769911 ], [ -77.431340, 38.769711 ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "LINEARID": "110410477279", "FULLNAME": "Payne Ct", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -77.428508, 38.767302 ], [ -77.428594, 38.766565 ], [ -77.428551, 38.766197 ] ] } }
|
||||
,
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,46 @@
|
||||
#include <functional>
|
||||
#include "mvt.hpp"
|
||||
#include "dirtiles.hpp" // for zxy
|
||||
|
||||
struct mvt_tile_seq {
|
||||
mvt_tile tile;
|
||||
size_t seq;
|
||||
};
|
||||
|
||||
struct tile_cache {
|
||||
std::map<zxy, mvt_tile_seq> overzoom_cache;
|
||||
std::atomic<size_t> seq;
|
||||
size_t capacity = 1000;
|
||||
|
||||
mvt_tile get(zxy parent_tile, std::function<mvt_tile(zxy)> getter) {
|
||||
mvt_tile source;
|
||||
auto f = overzoom_cache.find(parent_tile);
|
||||
if (f == overzoom_cache.end()) {
|
||||
if (overzoom_cache.size() >= capacity) {
|
||||
// evict the oldest tile to make room
|
||||
|
||||
auto to_erase = overzoom_cache.begin();
|
||||
for (auto here = overzoom_cache.begin(); here != overzoom_cache.end(); ++here) {
|
||||
if (here->second.seq < to_erase->second.seq) {
|
||||
to_erase = here;
|
||||
}
|
||||
}
|
||||
|
||||
overzoom_cache.erase(to_erase);
|
||||
}
|
||||
|
||||
source = getter(parent_tile);
|
||||
|
||||
mvt_tile_seq to_cache;
|
||||
to_cache.tile = source;
|
||||
to_cache.seq = seq++;
|
||||
|
||||
overzoom_cache.emplace(parent_tile, to_cache);
|
||||
} else {
|
||||
f->second.seq = seq++;
|
||||
source = f->second.tile;
|
||||
}
|
||||
|
||||
return source;
|
||||
}
|
||||
};
|
||||
+103
-94
@@ -33,6 +33,7 @@
|
||||
#include "csv.hpp"
|
||||
#include "text.hpp"
|
||||
#include "tile.hpp"
|
||||
#include "tile-cache.hpp"
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
@@ -154,46 +155,8 @@ void append_tile(std::string message, int z, unsigned x, unsigned y, std::map<st
|
||||
mvt_feature feat = layer.features[f];
|
||||
std::set<std::string> exclude_attributes;
|
||||
|
||||
if (filter != NULL) {
|
||||
std::map<std::string, mvt_value> attributes;
|
||||
|
||||
for (size_t t = 0; t + 1 < feat.tags.size(); t += 2) {
|
||||
std::string key = layer.keys[feat.tags[t]];
|
||||
mvt_value &val = layer.values[feat.tags[t + 1]];
|
||||
|
||||
attributes.insert(std::pair<std::string, mvt_value>(key, val));
|
||||
}
|
||||
|
||||
if (feat.has_id) {
|
||||
mvt_value v;
|
||||
v.type = mvt_uint;
|
||||
v.numeric_value.uint_value = feat.id;
|
||||
|
||||
attributes.insert(std::pair<std::string, mvt_value>("$id", v));
|
||||
}
|
||||
|
||||
mvt_value v;
|
||||
v.type = mvt_string;
|
||||
|
||||
if (feat.type == mvt_point) {
|
||||
v.string_value = "Point";
|
||||
} else if (feat.type == mvt_linestring) {
|
||||
v.string_value = "LineString";
|
||||
} else if (feat.type == mvt_polygon) {
|
||||
v.string_value = "Polygon";
|
||||
}
|
||||
|
||||
attributes.insert(std::pair<std::string, mvt_value>("$type", v));
|
||||
|
||||
mvt_value v2;
|
||||
v2.type = mvt_uint;
|
||||
v2.numeric_value.uint_value = z;
|
||||
|
||||
attributes.insert(std::pair<std::string, mvt_value>("$zoom", v2));
|
||||
|
||||
if (!evaluate(attributes, layer.name, filter, exclude_attributes)) {
|
||||
continue;
|
||||
}
|
||||
if (!evaluate(feat, layer, filter, exclude_attributes, z)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
mvt_feature outfeature;
|
||||
@@ -378,14 +341,15 @@ double max(double a, double b) {
|
||||
|
||||
struct tilecmp {
|
||||
bool operator()(std::pair<unsigned, unsigned> const &a, std::pair<unsigned, unsigned> const &b) {
|
||||
// must match behavior of reader::operator<()
|
||||
// must match behavior of tileset_reader::operator<()
|
||||
// except backwards, since we are pulling from the end of the list
|
||||
|
||||
if (a.first < b.first) {
|
||||
if (b.first < a.first) {
|
||||
return true;
|
||||
}
|
||||
if (a.first == b.first) {
|
||||
if (b.first == a.first) {
|
||||
// Y sorts backwards, in TMS order
|
||||
if (a.second > b.second) {
|
||||
if (b.second > a.second) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -394,13 +358,13 @@ struct tilecmp {
|
||||
}
|
||||
} tilecmp;
|
||||
|
||||
// The `reader` is an iterator through the tiles of a tileset,
|
||||
// The `tileset_reader` is an iterator through the tiles of a tileset,
|
||||
// in z/x/tms_y order.
|
||||
//
|
||||
// The basic idea is that it is used like this:
|
||||
//
|
||||
// void blah(const char *fname) {
|
||||
// reader r(fname);
|
||||
// tileset_reader r(fname);
|
||||
//
|
||||
// for (; !r.all_done(); r.advance()) {
|
||||
// std::pair<zxy, std::string> tile = r.current();
|
||||
@@ -411,13 +375,13 @@ struct tilecmp {
|
||||
// }
|
||||
//
|
||||
// The complication is that you can actually keep calling current()
|
||||
// and advance() after the reader claims to be done, in which case
|
||||
// and advance() after the tileset_reader claims to be done, in which case
|
||||
// it will produce overzoomed tiles generated from the tiles in
|
||||
// the maxzoom tileset. The parent tiles for those overzoomed tiles
|
||||
// are retrieved internally using get_tile() rather than through the
|
||||
// main iteration query.
|
||||
|
||||
struct reader {
|
||||
struct tileset_reader {
|
||||
// z/x/y and data of the current tile
|
||||
long long zoom = 0;
|
||||
long long x = 0;
|
||||
@@ -432,13 +396,17 @@ struct reader {
|
||||
// for overzooming
|
||||
int maxzoom_so_far = -1;
|
||||
std::vector<std::pair<unsigned, unsigned>> tiles_at_maxzoom_so_far;
|
||||
std::vector<std::pair<unsigned, unsigned>> overzoomed_tiles;
|
||||
std::vector<std::pair<unsigned, unsigned>> overzoomed_tiles; // tiles at `zoom`
|
||||
std::vector<std::pair<unsigned, unsigned>> next_overzoomed_tiles; // tiles at `zoom + 1`
|
||||
bool overzoom_consumed_at_this_zoom = false;
|
||||
|
||||
// parent tile cache
|
||||
tile_cache cache;
|
||||
|
||||
// for iterating mbtiles
|
||||
sqlite3 *db = NULL;
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
struct reader *next = NULL;
|
||||
struct tileset_reader *next = NULL;
|
||||
|
||||
// for iterating dirtiles
|
||||
std::vector<zxy> dirtiles;
|
||||
@@ -449,7 +417,7 @@ struct reader {
|
||||
char *pmtiles_map = NULL;
|
||||
std::vector<pmtiles::entry_zxy> pmtiles_entries;
|
||||
|
||||
reader(const char *fname) {
|
||||
tileset_reader(const char *fname) {
|
||||
name = fname;
|
||||
struct stat st;
|
||||
if (stat(fname, &st) == 0 && (st.st_mode & S_IFDIR) != 0) {
|
||||
@@ -499,7 +467,7 @@ struct reader {
|
||||
}
|
||||
}
|
||||
|
||||
// Checks the done status not only of this reader but also
|
||||
// Checks the done status not only of this tileset_reader but also
|
||||
// the others chained to it in the queue.
|
||||
//
|
||||
// Also claims not to be done if at least one overzoomed tile
|
||||
@@ -513,7 +481,7 @@ struct reader {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (struct reader *r = next; r != NULL; r = r->next) {
|
||||
for (struct tileset_reader *r = next; r != NULL; r = r->next) {
|
||||
if (!r->done) {
|
||||
return false;
|
||||
}
|
||||
@@ -551,8 +519,8 @@ struct reader {
|
||||
return;
|
||||
}
|
||||
|
||||
auto xy = overzoomed_tiles.front();
|
||||
overzoomed_tiles.erase(overzoomed_tiles.begin());
|
||||
auto xy = overzoomed_tiles.back();
|
||||
overzoomed_tiles.erase(overzoomed_tiles.begin() + overzoomed_tiles.size() - 1);
|
||||
|
||||
x = xy.first;
|
||||
y = xy.second;
|
||||
@@ -637,19 +605,31 @@ struct reader {
|
||||
|
||||
long long scale = (1LL << zoom) / (1LL << maxzoom_so_far);
|
||||
|
||||
for (auto const &xy : tiles_at_maxzoom_so_far) {
|
||||
for (long long xx = 0; xx < scale; xx++) {
|
||||
for (long long yy = 0; yy < scale; yy++) {
|
||||
overzoomed_tiles.push_back(std::pair<unsigned, unsigned>(xy.first * scale + xx, xy.second * scale + yy));
|
||||
// If this is the first overzoomed level, we don't know yet
|
||||
// which tiles will be useful, so spell out all 4 child tiles
|
||||
// from each parent tile.
|
||||
//
|
||||
// If it is further overzoomed than that, we have a list of
|
||||
// which child tiles will have features in them, so use that.
|
||||
|
||||
if (zoom == maxzoom_so_far + 1) {
|
||||
for (auto const &xy : tiles_at_maxzoom_so_far) {
|
||||
for (long long xx = 0; xx < scale; xx++) {
|
||||
for (long long yy = 0; yy < scale; yy++) {
|
||||
overzoomed_tiles.push_back(std::pair<unsigned, unsigned>(xy.first * scale + xx, xy.second * scale + yy));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
overzoomed_tiles = std::move(next_overzoomed_tiles);
|
||||
next_overzoomed_tiles.clear();
|
||||
}
|
||||
|
||||
std::sort(overzoomed_tiles.begin(), overzoomed_tiles.end(), tilecmp);
|
||||
overzoom_consumed_at_this_zoom = false;
|
||||
}
|
||||
|
||||
std::string get_tile(zxy tile) {
|
||||
mvt_tile get_tile(zxy tile) {
|
||||
std::string source;
|
||||
|
||||
if (db != NULL) {
|
||||
@@ -683,12 +663,28 @@ struct reader {
|
||||
source = dir_read_tile(dirbase, tile);
|
||||
}
|
||||
|
||||
return source;
|
||||
mvt_tile content;
|
||||
if (source.size() == 0) {
|
||||
return content;
|
||||
}
|
||||
|
||||
try {
|
||||
bool was_compressed;
|
||||
if (!content.decode(source, was_compressed)) {
|
||||
fprintf(stderr, "Couldn't parse tile %lld/%lld/%lld\n", tile.z, tile.x, tile.y);
|
||||
exit(EXIT_MVT);
|
||||
}
|
||||
} catch (std::exception const &e) {
|
||||
fprintf(stderr, "PBF decoding error in tile %lld/%lld/%lld\n", tile.z, tile.x, tile.y);
|
||||
exit(EXIT_PROTOBUF);
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
// Sort in z/x/tms_y order, because that is the order of the
|
||||
// straightforward query of the mbtiles tiles table.
|
||||
bool operator<(const struct reader &r) const {
|
||||
bool operator<(const struct tileset_reader &r) const {
|
||||
// must match behavior of tilecmp
|
||||
|
||||
if (zoom < r.zoom) {
|
||||
@@ -737,14 +733,18 @@ struct reader {
|
||||
perror("pthread_mutex_lock");
|
||||
}
|
||||
|
||||
std::string source = get_tile(parent_tile);
|
||||
std::function<mvt_tile(zxy)> getter = [&](zxy tile) {
|
||||
return get_tile(tile);
|
||||
};
|
||||
|
||||
mvt_tile source = cache.get(parent_tile, getter);
|
||||
|
||||
if (pthread_mutex_unlock(&retrieve_lock) != 0) {
|
||||
perror("pthread_mutex_unlock");
|
||||
}
|
||||
|
||||
if (source.size() != 0) {
|
||||
std::string ret = overzoom(source, parent_tile.z, parent_tile.x, parent_tile.y, tile.z, tile.x, tile.y, -1, buffer, std::set<std::string>());
|
||||
if (source.layers.size() != 0) {
|
||||
std::string ret = overzoom(source, parent_tile.z, parent_tile.x, parent_tile.y, tile.z, tile.x, tile.y, -1, buffer, std::set<std::string>(), false, &next_overzoomed_tiles, false, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -752,10 +752,10 @@ struct reader {
|
||||
}
|
||||
};
|
||||
|
||||
struct reader *begin_reading(char *fname) {
|
||||
struct reader *r = new reader(fname);
|
||||
struct tileset_reader *begin_reading(char *fname) {
|
||||
struct tileset_reader *r = new tileset_reader(fname);
|
||||
|
||||
// The reason this prefetches is so the reader queue can be
|
||||
// The reason this prefetches is so the tileset_reader queue can be
|
||||
// priority-ordered, so the one with the next relevant tile
|
||||
// is first in line.
|
||||
r->advance();
|
||||
@@ -776,7 +776,7 @@ struct arg {
|
||||
std::set<std::string> *remove_layers = NULL;
|
||||
int ifmatched = 0;
|
||||
json_object *filter = NULL;
|
||||
struct reader *readers = NULL;
|
||||
struct tileset_reader *readers = NULL;
|
||||
};
|
||||
|
||||
void *join_worker(void *v) {
|
||||
@@ -821,7 +821,7 @@ void *join_worker(void *v) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void dispatch_tasks(std::map<zxy, std::vector<std::string>> &tasks, std::vector<std::map<std::string, layermap_entry>> &layermaps, sqlite3 *outdb, const char *outdir, std::vector<std::string> &header, std::map<std::string, std::vector<std::string>> &mapping, std::set<std::string> &exclude, std::set<std::string> &include, int ifmatched, std::set<std::string> &keep_layers, std::set<std::string> &remove_layers, json_object *filter, struct reader *readers) {
|
||||
void dispatch_tasks(std::map<zxy, std::vector<std::string>> &tasks, std::vector<std::map<std::string, layermap_entry>> &layermaps, sqlite3 *outdb, const char *outdir, std::vector<std::string> &header, std::map<std::string, std::vector<std::string>> &mapping, std::set<std::string> &exclude, std::set<std::string> &include, int ifmatched, std::set<std::string> &keep_layers, std::set<std::string> &remove_layers, json_object *filter, struct tileset_reader *readers) {
|
||||
pthread_t pthreads[CPUS];
|
||||
std::vector<arg> args;
|
||||
|
||||
@@ -969,7 +969,7 @@ void handle_vector_layers(json_object *vector_layers, std::map<std::string, laye
|
||||
}
|
||||
}
|
||||
|
||||
void decode(struct reader *readers, std::map<std::string, layermap_entry> &layermap, sqlite3 *outdb, const char *outdir, struct stats *st, std::vector<std::string> &header, std::map<std::string, std::vector<std::string>> &mapping, std::set<std::string> &exclude, std::set<std::string> &include, int ifmatched, std::string &attribution, std::string &description, std::set<std::string> &keep_layers, std::set<std::string> &remove_layers, std::string &name, json_object *filter, std::map<std::string, std::string> &attribute_descriptions, std::string &generator_options, std::vector<strategy> *strategies) {
|
||||
void decode(struct tileset_reader *readers, std::map<std::string, layermap_entry> &layermap, sqlite3 *outdb, const char *outdir, struct stats *st, std::vector<std::string> &header, std::map<std::string, std::vector<std::string>> &mapping, std::set<std::string> &exclude, std::set<std::string> &include, int ifmatched, std::string &attribution, std::string &description, std::set<std::string> &keep_layers, std::set<std::string> &remove_layers, std::string &name, json_object *filter, std::map<std::string, std::string> &attribute_descriptions, std::string &generator_options, std::vector<strategy> *strategies) {
|
||||
std::vector<std::map<std::string, layermap_entry>> layermaps;
|
||||
for (size_t i = 0; i < CPUS; i++) {
|
||||
layermaps.push_back(std::map<std::string, layermap_entry>());
|
||||
@@ -1021,6 +1021,21 @@ void decode(struct reader *readers, std::map<std::string, layermap_entry> &layer
|
||||
f->second.push_back(current.second);
|
||||
}
|
||||
|
||||
// Advance the tileset_reader that we just added as a task.
|
||||
// The reason this prefetches is so the tileset_reader queue can be
|
||||
// priority-ordered, so the one with the next relevant tile
|
||||
// is first in line.
|
||||
readers->advance();
|
||||
|
||||
// pull the tileset_reader off the front of the queue for reordering
|
||||
|
||||
tileset_reader *r = readers;
|
||||
readers = readers->next;
|
||||
r->next = NULL;
|
||||
|
||||
// Is the next tileset_reader on the tileset_reader queue looking at a different tile?
|
||||
// Then this tile is done and we can safely run the output queue.
|
||||
|
||||
if (readers == NULL || readers->zoom != current.first.z || readers->x != current.first.x || readers->y != current.first.y) {
|
||||
if (tasks.size() > 100 * CPUS) {
|
||||
dispatch_tasks(tasks, layermaps, outdb, outdir, header, mapping, exclude, include, ifmatched, keep_layers, remove_layers, filter, readers);
|
||||
@@ -1028,21 +1043,10 @@ void decode(struct reader *readers, std::map<std::string, layermap_entry> &layer
|
||||
}
|
||||
}
|
||||
|
||||
// The reason this prefetches is so the reader queue can be
|
||||
// priority-ordered, so the one with the next relevant tile
|
||||
// is first in line.
|
||||
readers->advance();
|
||||
|
||||
// pull the reader off the front of the queue for reordering
|
||||
|
||||
reader *r = readers;
|
||||
readers = readers->next;
|
||||
r->next = NULL;
|
||||
|
||||
// put the reader back onto the queue,
|
||||
// put the tileset_reader back onto the queue,
|
||||
// in whatever sequence its next tile calls for
|
||||
|
||||
struct reader **rr;
|
||||
struct tileset_reader **rr;
|
||||
for (rr = &readers; *rr != NULL; rr = &((*rr)->next)) {
|
||||
if (*r < **rr) {
|
||||
break;
|
||||
@@ -1066,8 +1070,8 @@ void decode(struct reader *readers, std::map<std::string, layermap_entry> &layer
|
||||
dispatch_tasks(tasks, layermaps, outdb, outdir, header, mapping, exclude, include, ifmatched, keep_layers, remove_layers, filter, readers);
|
||||
layermap = merge_layermaps(layermaps);
|
||||
|
||||
struct reader *next;
|
||||
for (struct reader *r = readers; r != NULL; r = next) {
|
||||
struct tileset_reader *next;
|
||||
for (struct tileset_reader *r = readers; r != NULL; r = next) {
|
||||
next = r->next;
|
||||
r->close();
|
||||
|
||||
@@ -1218,7 +1222,7 @@ int main(int argc, char **argv) {
|
||||
int filearg = 0;
|
||||
json_object *filter = NULL;
|
||||
|
||||
struct reader *readers = NULL;
|
||||
struct tileset_reader *readers = NULL;
|
||||
|
||||
CPUS = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
|
||||
@@ -1417,10 +1421,10 @@ int main(int argc, char **argv) {
|
||||
filearg = 1;
|
||||
while (getline(read_file, sa)) {
|
||||
char *c = const_cast<char *>(sa.c_str());
|
||||
reader *r = begin_reading(c);
|
||||
tileset_reader *r = begin_reading(c);
|
||||
|
||||
// put the new reader in priority order
|
||||
struct reader **rr;
|
||||
// put the new tileset_reader in priority order
|
||||
struct tileset_reader **rr;
|
||||
for (rr = &readers; *rr != NULL; rr = &((*rr)->next)) {
|
||||
if (*r < **rr) {
|
||||
break;
|
||||
@@ -1509,10 +1513,10 @@ int main(int argc, char **argv) {
|
||||
|
||||
if (filearg == 0) {
|
||||
for (i = optind; i < argc; i++) {
|
||||
reader *r = begin_reading(argv[i]);
|
||||
tileset_reader *r = begin_reading(argv[i]);
|
||||
|
||||
// put the new reader in priority order
|
||||
struct reader **rr;
|
||||
// put the new tileset_reader in priority order
|
||||
struct tileset_reader **rr;
|
||||
for (rr = &readers; *rr != NULL; rr = &((*rr)->next)) {
|
||||
if (*r < **rr) {
|
||||
break;
|
||||
@@ -1545,6 +1549,11 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
generator_options.append(commandline);
|
||||
|
||||
// don't trust the source metadata maxzooms;
|
||||
// claim the zooms that were actually written
|
||||
st.maxzoom = INT_MIN;
|
||||
st.minzoom = INT_MAX;
|
||||
|
||||
for (auto &l : layermap) {
|
||||
if (l.second.minzoom < st.minzoom) {
|
||||
st.minzoom = l.second.minzoom;
|
||||
@@ -1559,7 +1568,7 @@ int main(int argc, char **argv) {
|
||||
st.maxlon2 = st.maxlon;
|
||||
}
|
||||
|
||||
metadata m = make_metadata(name.c_str(), st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.minlat2, st.minlon2, st.maxlat2, st.maxlon2, st.midlat, st.midlon, attribution.size() != 0 ? attribution.c_str() : NULL, layermap, true, description.c_str(), !pg, attribute_descriptions, "tile-join", generator_options, strategies);
|
||||
metadata m = make_metadata(name.c_str(), st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.minlat2, st.minlon2, st.maxlat2, st.maxlon2, st.midlat, st.midlon, attribution.size() != 0 ? attribution.c_str() : NULL, layermap, true, description.c_str(), !pg, attribute_descriptions, "tile-join", generator_options, strategies, st.maxzoom, 2.5, 1);
|
||||
|
||||
if (outdb != NULL) {
|
||||
mbtiles_write_metadata(outdb, m, true);
|
||||
|
||||
@@ -480,7 +480,10 @@ struct partial_arg {
|
||||
std::vector<struct partial> *partials = NULL;
|
||||
int task = 0;
|
||||
int tasks = 0;
|
||||
|
||||
drawvec *shared_nodes;
|
||||
node *shared_nodes_map;
|
||||
size_t nodepos;
|
||||
};
|
||||
|
||||
drawvec revive_polygon(drawvec &geom, double area, int z, int detail) {
|
||||
@@ -524,7 +527,7 @@ drawvec revive_polygon(drawvec &geom, double area, int z, int detail) {
|
||||
}
|
||||
}
|
||||
|
||||
double simplify_partial(partial *p, drawvec &shared_nodes) {
|
||||
double simplify_partial(partial *p, drawvec const &shared_nodes, node *shared_nodes_map, size_t nodepos) {
|
||||
drawvec geom;
|
||||
|
||||
for (size_t j = 0; j < p->geoms.size(); j++) {
|
||||
@@ -579,7 +582,7 @@ double simplify_partial(partial *p, drawvec &shared_nodes) {
|
||||
}
|
||||
|
||||
// continues to simplify to line_detail even if we have extra detail
|
||||
drawvec ngeom = simplify_lines(geom, z, line_detail, !(prevent[P_CLIPPING] || prevent[P_DUPLICATION]), p->simplification, t == VT_POLYGON ? 4 : 0, shared_nodes);
|
||||
drawvec ngeom = simplify_lines(geom, z, p->tx, p->ty, line_detail, !(prevent[P_CLIPPING] || prevent[P_DUPLICATION]), p->simplification, t == VT_POLYGON ? 4 : 0, shared_nodes, shared_nodes_map, nodepos);
|
||||
|
||||
if (t != VT_POLYGON || ngeom.size() >= 3) {
|
||||
geom = ngeom;
|
||||
@@ -602,7 +605,7 @@ void *partial_feature_worker(void *v) {
|
||||
std::vector<struct partial> *partials = a->partials;
|
||||
|
||||
for (size_t i = a->task; i < (*partials).size(); i += a->tasks) {
|
||||
double area = simplify_partial(&((*partials)[i]), *(a->shared_nodes));
|
||||
double area = simplify_partial(&((*partials)[i]), *(a->shared_nodes), a->shared_nodes_map, a->nodepos);
|
||||
|
||||
signed char t = (*partials)[i].t;
|
||||
int z = (*partials)[i].z;
|
||||
@@ -1031,7 +1034,8 @@ bool find_common_edges(std::vector<partial> &partials, int z, int line_detail, d
|
||||
}
|
||||
}
|
||||
if (!(prevent[P_SIMPLIFY] || (z == maxzoom && prevent[P_SIMPLIFY_LOW]) || (z < maxzoom && additional[A_GRID_LOW_ZOOMS]))) {
|
||||
simplified_arcs[ai->second] = simplify_lines(dv, z, line_detail, !(prevent[P_CLIPPING] || prevent[P_DUPLICATION]), simplification, 4, drawvec());
|
||||
// tx and ty are 0 here because we aren't trying to do anything with the shared_nodes_map
|
||||
simplified_arcs[ai->second] = simplify_lines(dv, z, 0, 0, line_detail, !(prevent[P_CLIPPING] || prevent[P_DUPLICATION]), simplification, 4, drawvec(), NULL, 0);
|
||||
} else {
|
||||
simplified_arcs[ai->second] = dv;
|
||||
}
|
||||
@@ -1294,40 +1298,6 @@ long long choose_minextent(std::vector<long long> &extents, double f) {
|
||||
return extents[(extents.size() - 1) * (1 - f)];
|
||||
}
|
||||
|
||||
struct joint {
|
||||
draw p1;
|
||||
draw mid;
|
||||
draw p2;
|
||||
|
||||
joint(draw one, draw hinge, draw two) {
|
||||
if (one < two) {
|
||||
p1 = one;
|
||||
p2 = two;
|
||||
} else {
|
||||
p1 = two;
|
||||
p2 = one;
|
||||
}
|
||||
|
||||
mid = hinge;
|
||||
}
|
||||
|
||||
bool operator<(const joint &o) const {
|
||||
if (mid < o.mid) {
|
||||
return true;
|
||||
} else if (mid == o.mid) {
|
||||
if (p1 < o.p1) {
|
||||
return true;
|
||||
} else if (p1 == o.p1) {
|
||||
if (p2 < o.p2) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
struct write_tile_args {
|
||||
struct task *tasks = NULL;
|
||||
char *stringpool = NULL;
|
||||
@@ -1379,6 +1349,8 @@ struct write_tile_args {
|
||||
atomic_strategy *strategy = NULL;
|
||||
int zoom = -1;
|
||||
bool compressed;
|
||||
struct node *shared_nodes_map;
|
||||
size_t nodepos;
|
||||
};
|
||||
|
||||
bool clip_to_tile(serial_feature &sf, int z, long long buffer) {
|
||||
@@ -1484,7 +1456,11 @@ void remove_attributes(serial_feature &sf, std::set<std::string> const &exclude_
|
||||
}
|
||||
}
|
||||
|
||||
serial_feature next_feature(decompressor *geoms, std::atomic<long long> *geompos_in, int z, unsigned tx, unsigned ty, unsigned *initial_x, unsigned *initial_y, long long *original_features, long long *unclipped_features, int nextzoom, int maxzoom, int minzoom, int max_zoom_increment, size_t pass, std::atomic<long long> *along, long long alongminus, int buffer, int *within, compressor **geomfile, std::atomic<long long> *geompos, std::atomic<double> *oprogress, double todo, const char *fname, int child_shards, struct json_object *filter, const char *stringpool, long long *pool_off, std::vector<std::vector<std::string>> *layer_unmaps, bool first_time, bool compressed) {
|
||||
struct multiplier_state {
|
||||
std::map<std::string, size_t> count;
|
||||
};
|
||||
|
||||
serial_feature next_feature(decompressor *geoms, std::atomic<long long> *geompos_in, int z, unsigned tx, unsigned ty, unsigned *initial_x, unsigned *initial_y, long long *original_features, long long *unclipped_features, int nextzoom, int maxzoom, int minzoom, int max_zoom_increment, size_t pass, std::atomic<long long> *along, long long alongminus, int buffer, int *within, compressor **geomfile, std::atomic<long long> *geompos, std::atomic<double> *oprogress, double todo, const char *fname, int child_shards, struct json_object *filter, const char *stringpool, long long *pool_off, std::vector<std::vector<std::string>> *layer_unmaps, bool first_time, bool compressed, multiplier_state *multiplier_state) {
|
||||
while (1) {
|
||||
serial_feature sf;
|
||||
std::string s;
|
||||
@@ -1611,8 +1587,36 @@ serial_feature next_feature(decompressor *geoms, std::atomic<long long> *geompos
|
||||
}
|
||||
}
|
||||
|
||||
if (sf.tippecanoe_minzoom == -1 && z < sf.feature_minzoom) {
|
||||
if (sf.tippecanoe_minzoom == -1) {
|
||||
bool keep = false;
|
||||
|
||||
std::string layername = (*layer_unmaps)[sf.segment][sf.layer];
|
||||
auto count = multiplier_state->count.find(layername);
|
||||
if (count == multiplier_state->count.end()) {
|
||||
multiplier_state->count.emplace(layername, 0);
|
||||
count = multiplier_state->count.find(layername);
|
||||
keep = true; // the first feature in each layer in each tile is always kept
|
||||
}
|
||||
|
||||
sf.dropped = true;
|
||||
|
||||
if (z >= sf.feature_minzoom || keep) {
|
||||
count->second = retain_points_multiplier;
|
||||
|
||||
if (retain_points_multiplier > 1) {
|
||||
serial_val val;
|
||||
val.type = mvt_bool;
|
||||
val.s = "true";
|
||||
|
||||
sf.full_keys.push_back("tippecanoe:retain_points_multiplier_first");
|
||||
sf.full_values.push_back(val);
|
||||
}
|
||||
}
|
||||
|
||||
if (count->second > 0) {
|
||||
sf.dropped = false;
|
||||
count->second -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove nulls, now that the expression evaluation filter has run
|
||||
@@ -1674,9 +1678,10 @@ struct run_prefilter_args {
|
||||
void *run_prefilter(void *v) {
|
||||
run_prefilter_args *rpa = (run_prefilter_args *) v;
|
||||
json_writer state(rpa->prefilter_fp);
|
||||
struct multiplier_state multiplier_state;
|
||||
|
||||
while (1) {
|
||||
serial_feature sf = next_feature(rpa->geoms, rpa->geompos_in, rpa->z, rpa->tx, rpa->ty, rpa->initial_x, rpa->initial_y, rpa->original_features, rpa->unclipped_features, rpa->nextzoom, rpa->maxzoom, rpa->minzoom, rpa->max_zoom_increment, rpa->pass, rpa->along, rpa->alongminus, rpa->buffer, rpa->within, rpa->geomfile, rpa->geompos, rpa->oprogress, rpa->todo, rpa->fname, rpa->child_shards, rpa->filter, rpa->stringpool, rpa->pool_off, rpa->layer_unmaps, rpa->first_time, rpa->compressed);
|
||||
serial_feature sf = next_feature(rpa->geoms, rpa->geompos_in, rpa->z, rpa->tx, rpa->ty, rpa->initial_x, rpa->initial_y, rpa->original_features, rpa->unclipped_features, rpa->nextzoom, rpa->maxzoom, rpa->minzoom, rpa->max_zoom_increment, rpa->pass, rpa->along, rpa->alongminus, rpa->buffer, rpa->within, rpa->geomfile, rpa->geompos, rpa->oprogress, rpa->todo, rpa->fname, rpa->child_shards, rpa->filter, rpa->stringpool, rpa->pool_off, rpa->layer_unmaps, rpa->first_time, rpa->compressed, &multiplier_state);
|
||||
if (sf.t < 0) {
|
||||
break;
|
||||
}
|
||||
@@ -1869,15 +1874,27 @@ void preserve_attributes(std::map<std::string, attribute_op> const *attribute_ac
|
||||
}
|
||||
}
|
||||
|
||||
bool find_partial(std::vector<partial> &partials, serial_feature &sf, ssize_t &out, std::vector<std::vector<std::string>> *layer_unmaps, long long maxextent) {
|
||||
// This function finds the feature in `partials` onto which the attributes or geometry
|
||||
// of a feature that is being dropped (`sf`) will be accumulated or coalesced. It
|
||||
// ordinarily returns the most recently-added feature from the same layer as the feature
|
||||
// that is being dropped, but if there is an active multiplier, will walk multiple
|
||||
// features backward so that the features being dropped will be accumulated round-robin
|
||||
// onto the N features that are being kept. The caller increments the `multiplier_seq`
|
||||
// mod N with each dropped feature to drive the round-robin decision.
|
||||
//
|
||||
bool find_partial(std::vector<partial> &partials, serial_feature &sf, ssize_t &out, std::vector<std::vector<std::string>> *layer_unmaps, long long maxextent, ssize_t multiplier_seq) {
|
||||
for (size_t i = partials.size(); i > 0; i--) {
|
||||
if (partials[i - 1].t == sf.t) {
|
||||
std::string &layername1 = (*layer_unmaps)[partials[i - 1].segment][partials[i - 1].layer];
|
||||
std::string &layername2 = (*layer_unmaps)[sf.segment][sf.layer];
|
||||
|
||||
if (layername1 == layername2 && partials[i - 1].extent <= maxextent) {
|
||||
out = i - 1;
|
||||
return true;
|
||||
if (multiplier_seq <= 0) {
|
||||
out = i - 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
multiplier_seq--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1926,7 +1943,20 @@ void add_sample_to(std::vector<T> &vals, T val, size_t &increment, size_t seq) {
|
||||
}
|
||||
}
|
||||
|
||||
long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, char *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, 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, double fraction, const char *prefilter, const char *postfilter, struct json_object *filter, write_tile_args *arg, atomic_strategy *strategy, bool compressed_input) {
|
||||
void coalesce_geometry(partial &p, serial_feature &sf) {
|
||||
// if the geometry being coalesced on is an exact duplicate
|
||||
// of an existing geometry, just drop it
|
||||
|
||||
for (size_t i = 0; i < p.geoms.size(); i++) {
|
||||
if (p.geoms[i] == sf.geometry) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
p.geoms.push_back(sf.geometry);
|
||||
}
|
||||
|
||||
long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, char *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, 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, double fraction, const char *prefilter, const char *postfilter, struct json_object *filter, write_tile_args *arg, atomic_strategy *strategy, bool compressed_input, struct node *shared_nodes_map, size_t nodepos) {
|
||||
double merge_fraction = 1;
|
||||
double mingap_fraction = 1;
|
||||
double minextent_fraction = 1;
|
||||
@@ -1982,7 +2012,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
|
||||
double coalesced_area = 0;
|
||||
drawvec shared_nodes;
|
||||
std::vector<joint> shared_joints;
|
||||
|
||||
int tile_detail = line_detail;
|
||||
size_t skipped = 0;
|
||||
@@ -2085,12 +2114,14 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
prefilter_jp = json_begin_file(prefilter_read_fp);
|
||||
}
|
||||
|
||||
struct multiplier_state multiplier_state;
|
||||
size_t multiplier_seq = retain_points_multiplier - 1;
|
||||
for (size_t seq = 0;; seq++) {
|
||||
serial_feature sf;
|
||||
ssize_t which_partial = -1;
|
||||
|
||||
if (prefilter == NULL) {
|
||||
sf = next_feature(geoms, geompos_in, z, tx, ty, initial_x, initial_y, &original_features, &unclipped_features, nextzoom, maxzoom, minzoom, max_zoom_increment, pass, along, alongminus, buffer, within, geomfile, geompos, &oprogress, todo, fname, child_shards, filter, stringpool, pool_off, layer_unmaps, first_time, compressed_input);
|
||||
sf = next_feature(geoms, geompos_in, z, tx, ty, initial_x, initial_y, &original_features, &unclipped_features, nextzoom, maxzoom, minzoom, max_zoom_increment, pass, along, alongminus, buffer, within, geomfile, geompos, &oprogress, todo, fname, child_shards, filter, stringpool, pool_off, layer_unmaps, first_time, compressed_input, &multiplier_state);
|
||||
} else {
|
||||
sf = parse_feature(prefilter_jp, z, tx, ty, layermaps, tiling_seg, layer_unmaps, postfilter != NULL);
|
||||
}
|
||||
@@ -2114,15 +2145,19 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
}
|
||||
|
||||
if (sf.dropped) {
|
||||
if (find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX)) {
|
||||
multiplier_seq = (multiplier_seq + 1) % retain_points_multiplier;
|
||||
|
||||
if (find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX, multiplier_seq)) {
|
||||
preserve_attributes(arg->attribute_accum, sf, stringpool, pool_off, partials[which_partial]);
|
||||
strategy->dropped_by_rate++;
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
multiplier_seq = retain_points_multiplier - 1;
|
||||
}
|
||||
|
||||
if (gamma > 0) {
|
||||
if (manage_gap(sf.index, &previndex, scale, gamma, &gap) && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX)) {
|
||||
if (manage_gap(sf.index, &previndex, scale, gamma, &gap) && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX, multiplier_seq)) {
|
||||
preserve_attributes(arg->attribute_accum, sf, stringpool, pool_off, partials[which_partial]);
|
||||
strategy->dropped_by_gamma++;
|
||||
continue;
|
||||
@@ -2141,7 +2176,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
if (indices.size() < MAX_INDICES) {
|
||||
indices.push_back(sf.index);
|
||||
}
|
||||
if ((sf.index < merge_previndex || sf.index - merge_previndex < mingap) && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX)) {
|
||||
if ((sf.index < merge_previndex || sf.index - merge_previndex < mingap) && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX, multiplier_seq)) {
|
||||
partials[which_partial].clustered++;
|
||||
|
||||
if (partials[which_partial].t == VT_POINT &&
|
||||
@@ -2164,7 +2199,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
if (indices.size() < MAX_INDICES) {
|
||||
indices.push_back(sf.index);
|
||||
}
|
||||
if (sf.index - merge_previndex < mingap && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX)) {
|
||||
if (sf.index - merge_previndex < mingap && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX, multiplier_seq)) {
|
||||
preserve_attributes(arg->attribute_accum, sf, stringpool, pool_off, partials[which_partial]);
|
||||
strategy->dropped_as_needed++;
|
||||
continue;
|
||||
@@ -2173,8 +2208,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
if (indices.size() < MAX_INDICES) {
|
||||
indices.push_back(sf.index);
|
||||
}
|
||||
if (sf.index - merge_previndex < mingap && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX)) {
|
||||
partials[which_partial].geoms.push_back(sf.geometry);
|
||||
if (sf.index - merge_previndex < mingap && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX, multiplier_seq)) {
|
||||
coalesce_geometry(partials[which_partial], sf);
|
||||
partials[which_partial].coalesced = true;
|
||||
coalesced_area += sf.extent;
|
||||
preserve_attributes(arg->attribute_accum, sf, stringpool, pool_off, partials[which_partial]);
|
||||
@@ -2185,15 +2220,15 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
add_sample_to(extents, sf.extent, extents_increment, seq);
|
||||
// search here is for LLONG_MAX, not minextent, because we are dropping features, not coalescing them,
|
||||
// so we shouldn't expect to find anything small that we can related this feature to.
|
||||
if (minextent != 0 && sf.extent + coalesced_area <= minextent && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX)) {
|
||||
if (minextent != 0 && sf.extent + coalesced_area <= minextent && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX, multiplier_seq)) {
|
||||
preserve_attributes(arg->attribute_accum, sf, stringpool, pool_off, partials[which_partial]);
|
||||
strategy->dropped_as_needed++;
|
||||
continue;
|
||||
}
|
||||
} else if (additional[A_COALESCE_SMALLEST_AS_NEEDED]) {
|
||||
add_sample_to(extents, sf.extent, extents_increment, seq);
|
||||
if (minextent != 0 && sf.extent + coalesced_area <= minextent && find_partial(partials, sf, which_partial, layer_unmaps, minextent)) {
|
||||
partials[which_partial].geoms.push_back(sf.geometry);
|
||||
if (minextent != 0 && sf.extent + coalesced_area <= minextent && find_partial(partials, sf, which_partial, layer_unmaps, minextent, multiplier_seq)) {
|
||||
coalesce_geometry(partials[which_partial], sf);
|
||||
partials[which_partial].coalesced = true;
|
||||
coalesced_area += sf.extent;
|
||||
preserve_attributes(arg->attribute_accum, sf, stringpool, pool_off, partials[which_partial]);
|
||||
@@ -2215,9 +2250,9 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
}
|
||||
|
||||
fraction_accum += fraction;
|
||||
if (fraction_accum < 1 && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX)) {
|
||||
if (fraction_accum < 1 && find_partial(partials, sf, which_partial, layer_unmaps, LLONG_MAX, multiplier_seq)) {
|
||||
if (additional[A_COALESCE_FRACTION_AS_NEEDED]) {
|
||||
partials[which_partial].geoms.push_back(sf.geometry);
|
||||
coalesce_geometry(partials[which_partial], sf);
|
||||
partials[which_partial].coalesced = true;
|
||||
coalesced_area += sf.extent;
|
||||
strategy->coalesced_as_needed++;
|
||||
@@ -2264,89 +2299,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
} else {
|
||||
kept++;
|
||||
|
||||
if (prevent[P_SIMPLIFY_SHARED_NODES]) {
|
||||
if (sf.t == VT_LINE) {
|
||||
for (auto &g : sf.geometry) {
|
||||
shared_nodes.push_back(g);
|
||||
}
|
||||
} else if (sf.t == VT_POLYGON) {
|
||||
sf.geometry = remove_noop(sf.geometry, sf.t, 0);
|
||||
|
||||
for (size_t i = 0; i < sf.geometry.size(); i++) {
|
||||
if (sf.geometry[i].op == VT_MOVETO) {
|
||||
size_t j;
|
||||
for (j = i + 1; j < sf.geometry.size(); j++) {
|
||||
if (sf.geometry[j].op != VT_LINETO) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// j - 1 because we don't want the duplicate last point
|
||||
for (size_t k = i; k < j - 1; k++) {
|
||||
shared_joints.emplace_back(
|
||||
sf.geometry[k],
|
||||
sf.geometry[(k + 1 - i) % (j - 1 - i) + i],
|
||||
sf.geometry[(k + 2 - i) % (j - 1 - i) + i]);
|
||||
}
|
||||
|
||||
// since the starting point is never simplified away,
|
||||
// don't let it be simplified away in any other polygons either.
|
||||
// Needs to appear twice here so that the check below will see
|
||||
// it as appearing in multiple features.
|
||||
shared_nodes.push_back(sf.geometry[i]);
|
||||
shared_nodes.push_back(sf.geometry[i]);
|
||||
|
||||
// To avoid letting polygons get simplified away to nothing,
|
||||
// also keep the furthest-away point from the initial point
|
||||
// (which Douglas-Peucker simplification would keep anyway,
|
||||
// if its search weren't being split up by polygon side).
|
||||
|
||||
double far = 0;
|
||||
size_t which = i;
|
||||
for (size_t k = i + 1; k < j - 1; k++) {
|
||||
double xd = sf.geometry[k].x - sf.geometry[i].x;
|
||||
double yd = sf.geometry[k].y - sf.geometry[i].y;
|
||||
double d = xd * xd + yd * yd;
|
||||
if (d > far ||
|
||||
((d == far) && (sf.geometry[k] < sf.geometry[which]))) {
|
||||
far = d;
|
||||
which = k;
|
||||
}
|
||||
}
|
||||
|
||||
shared_nodes.push_back(sf.geometry[which]);
|
||||
shared_nodes.push_back(sf.geometry[which]);
|
||||
|
||||
// And, likewise, the point most distant from those two points,
|
||||
// which probably would also be the one that Douglas-Peucker
|
||||
// would keep next.
|
||||
|
||||
far = 0;
|
||||
size_t which2 = i;
|
||||
|
||||
for (size_t k = i + 1; k < j - 1; k++) {
|
||||
double d = distance_from_line(sf.geometry[k].x, sf.geometry[k].y,
|
||||
sf.geometry[i].x, sf.geometry[i].y,
|
||||
sf.geometry[which].x, sf.geometry[which].y);
|
||||
if ((d > far) ||
|
||||
((d == far) && (sf.geometry[k] < sf.geometry[which2]))) {
|
||||
far = d;
|
||||
which2 = k;
|
||||
}
|
||||
}
|
||||
|
||||
shared_nodes.push_back(sf.geometry[which2]);
|
||||
shared_nodes.push_back(sf.geometry[which2]);
|
||||
|
||||
i = j - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (auto &p : sf.edge_nodes) {
|
||||
shared_nodes.push_back(p);
|
||||
shared_nodes.push_back(p);
|
||||
}
|
||||
for (auto &p : sf.edge_nodes) {
|
||||
shared_nodes.push_back(p);
|
||||
}
|
||||
|
||||
partial p;
|
||||
@@ -2390,17 +2344,29 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
partials.push_back(p);
|
||||
|
||||
unsimplified_geometry_size += sf.geometry.size() * sizeof(draw);
|
||||
if (unsimplified_geometry_size > 10 * 1024 * 1024 && !additional[A_DETECT_SHARED_BORDERS] && !prevent[P_SIMPLIFY_SHARED_NODES]) {
|
||||
if (unsimplified_geometry_size > 10 * 1024 * 1024 && !additional[A_DETECT_SHARED_BORDERS]) {
|
||||
// we should be safe to simplify here with P_SIMPLIFY_SHARED_NODES, since they will
|
||||
// have been assembled globally, although that also means that simplification
|
||||
// may not be very effective for reducing memory usage.
|
||||
|
||||
drawvec dv;
|
||||
|
||||
for (; simplified_geometry_through < partials.size(); simplified_geometry_through++) {
|
||||
simplify_partial(&partials[simplified_geometry_through], dv);
|
||||
simplify_partial(&partials[simplified_geometry_through], dv, shared_nodes_map, nodepos);
|
||||
|
||||
for (auto &g : partials[simplified_geometry_through].geoms) {
|
||||
if (partials[simplified_geometry_through].t == VT_POLYGON) {
|
||||
// don't scale up because this is still world coordinates
|
||||
g = clean_or_clip_poly(g, 0, 0, false, false);
|
||||
if (partials[simplified_geometry_through].t == VT_POLYGON) {
|
||||
drawvec to_clean;
|
||||
|
||||
for (auto &g : partials[simplified_geometry_through].geoms) {
|
||||
for (auto &d : g) {
|
||||
to_clean.push_back(d);
|
||||
}
|
||||
}
|
||||
|
||||
// don't scale up because this is still world coordinates
|
||||
to_clean = clean_or_clip_poly(to_clean, 0, 0, false, false);
|
||||
partials[simplified_geometry_through].geoms.clear();
|
||||
partials[simplified_geometry_through].geoms.push_back(to_clean);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2413,37 +2379,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
coalesced_area = 0;
|
||||
}
|
||||
|
||||
{
|
||||
drawvec just_shared_nodes;
|
||||
std::sort(shared_nodes.begin(), shared_nodes.end());
|
||||
|
||||
for (size_t i = 0; i + 1 < shared_nodes.size(); i++) {
|
||||
if (shared_nodes[i] == shared_nodes[i + 1]) {
|
||||
just_shared_nodes.push_back(shared_nodes[i]);
|
||||
|
||||
draw d = shared_nodes[i];
|
||||
i++; // consume the first, point at the duplicate
|
||||
while (i + 1 < shared_nodes.size() && shared_nodes[i + 1] == d) {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shared_nodes = just_shared_nodes;
|
||||
|
||||
std::sort(shared_joints.begin(), shared_joints.end());
|
||||
for (size_t i = 0; i + 1 < shared_joints.size(); i++) {
|
||||
if (shared_joints[i].mid == shared_joints[i + 1].mid) {
|
||||
if (shared_joints[i].p1 != shared_joints[i + 1].p1 ||
|
||||
shared_joints[i].p2 != shared_joints[i + 1].p2) {
|
||||
shared_nodes.push_back(shared_joints[i].mid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(shared_nodes.begin(), shared_nodes.end());
|
||||
shared_joints.clear();
|
||||
}
|
||||
std::sort(shared_nodes.begin(), shared_nodes.end());
|
||||
|
||||
for (size_t i = 0; i < partials.size(); i++) {
|
||||
partial &p = partials[i];
|
||||
@@ -2543,6 +2479,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
args[i].tasks = tasks;
|
||||
args[i].partials = &partials;
|
||||
args[i].shared_nodes = &shared_nodes;
|
||||
args[i].shared_nodes_map = shared_nodes_map;
|
||||
args[i].nodepos = nodepos;
|
||||
|
||||
if (tasks > 1) {
|
||||
if (pthread_create(&pthreads[i], NULL, partial_feature_worker, &args[i]) != 0) {
|
||||
@@ -2564,7 +2502,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < partials.size(); i++) {
|
||||
std::reverse(partials.begin(), partials.end());
|
||||
for (ssize_t i = partials.size() - 1; i >= 0; i--) {
|
||||
std::vector<drawvec> &pgeoms = partials[i].geoms;
|
||||
signed char t = partials[i].t;
|
||||
long long original_seq = partials[i].original_seq;
|
||||
@@ -2608,6 +2547,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
l->second.push_back(c);
|
||||
}
|
||||
}
|
||||
|
||||
partials.erase(partials.begin() + i);
|
||||
}
|
||||
|
||||
partials.clear();
|
||||
@@ -2628,55 +2569,64 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
std::sort(layer_features.begin(), layer_features.end());
|
||||
}
|
||||
|
||||
std::vector<coalesce> out;
|
||||
if (layer_features.size() > 0) {
|
||||
out.push_back(layer_features[0]);
|
||||
}
|
||||
for (size_t x = 1; x < layer_features.size(); x++) {
|
||||
size_t y = out.size() - 1;
|
||||
if (additional[A_COALESCE]) {
|
||||
// coalesce adjacent identical features if requested
|
||||
|
||||
#if 0
|
||||
if (out.size() > 0 && coalcmp(&layer_features[x], &out[y]) < 0) {
|
||||
fprintf(stderr, "\nfeature out of order\n");
|
||||
size_t out = 0;
|
||||
if (layer_features.size() > 0) {
|
||||
out++;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (additional[A_COALESCE] && out.size() > 0 && coalcmp(&layer_features[x], &out[y]) == 0) {
|
||||
for (size_t g = 0; g < layer_features[x].geom.size(); g++) {
|
||||
out[y].geom.push_back(layer_features[x].geom[g]);
|
||||
}
|
||||
out[y].coalesced = true;
|
||||
} else {
|
||||
out.push_back(layer_features[x]);
|
||||
}
|
||||
}
|
||||
for (size_t x = 1; x < layer_features.size(); x++) {
|
||||
size_t y = out - 1;
|
||||
|
||||
layer_features = out;
|
||||
|
||||
out.clear();
|
||||
for (size_t x = 0; x < layer_features.size(); x++) {
|
||||
if (layer_features[x].coalesced && layer_features[x].type == VT_LINE) {
|
||||
layer_features[x].geom = remove_noop(layer_features[x].geom, layer_features[x].type, 0);
|
||||
if (!(prevent[P_SIMPLIFY] || (z == maxzoom && prevent[P_SIMPLIFY_LOW]))) {
|
||||
layer_features[x].geom = simplify_lines(layer_features[x].geom, 32, 0,
|
||||
!(prevent[P_CLIPPING] || prevent[P_DUPLICATION]), simplification, layer_features[x].type == VT_POLYGON ? 4 : 0, shared_nodes);
|
||||
if (out > 0 && coalcmp(&layer_features[x], &layer_features[y]) == 0) {
|
||||
for (size_t g = 0; g < layer_features[x].geom.size(); g++) {
|
||||
layer_features[y].geom.push_back(layer_features[x].geom[g]);
|
||||
}
|
||||
layer_features[y].coalesced = true;
|
||||
} else {
|
||||
layer_features[out++] = layer_features[x];
|
||||
}
|
||||
}
|
||||
|
||||
if (layer_features[x].type == VT_POLYGON) {
|
||||
if (layer_features[x].coalesced) {
|
||||
// we can try scaling up because this is tile coordinates
|
||||
layer_features[x].geom = clean_or_clip_poly(layer_features[x].geom, 0, 0, false, true);
|
||||
layer_features.resize(out);
|
||||
}
|
||||
|
||||
{
|
||||
// clean up coalesced linestrings by simplification
|
||||
// and coalesced polygons by cleaning
|
||||
//
|
||||
// then close polygons
|
||||
|
||||
size_t out = 0;
|
||||
|
||||
for (size_t x = 0; x < layer_features.size(); x++) {
|
||||
if (layer_features[x].coalesced && layer_features[x].type == VT_LINE) {
|
||||
layer_features[x].geom = remove_noop(layer_features[x].geom, layer_features[x].type, 0);
|
||||
if (!(prevent[P_SIMPLIFY] || (z == maxzoom && prevent[P_SIMPLIFY_LOW]))) {
|
||||
// XXX revisit: why does this not take zoom into account?
|
||||
layer_features[x].geom = simplify_lines(layer_features[x].geom, 32, 0, 0, 0,
|
||||
!(prevent[P_CLIPPING] || prevent[P_DUPLICATION]), simplification, layer_features[x].type == VT_POLYGON ? 4 : 0, shared_nodes, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
layer_features[x].geom = close_poly(layer_features[x].geom);
|
||||
if (layer_features[x].type == VT_POLYGON) {
|
||||
if (layer_features[x].coalesced) {
|
||||
// we can try scaling up because this is tile coordinates
|
||||
layer_features[x].geom = clean_or_clip_poly(layer_features[x].geom, 0, 0, false, true);
|
||||
}
|
||||
|
||||
layer_features[x].geom = close_poly(layer_features[x].geom);
|
||||
}
|
||||
|
||||
if (layer_features[x].geom.size() > 0) {
|
||||
layer_features[out++] = layer_features[x];
|
||||
}
|
||||
}
|
||||
|
||||
if (layer_features[x].geom.size() > 0) {
|
||||
out.push_back(layer_features[x]);
|
||||
}
|
||||
layer_features.resize(out);
|
||||
}
|
||||
layer_features = out;
|
||||
|
||||
if (prevent[P_INPUT_ORDER]) {
|
||||
std::sort(layer_features.begin(), layer_features.end(), preservecmp);
|
||||
@@ -2698,16 +2648,19 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
}
|
||||
|
||||
mvt_tile tile;
|
||||
size_t totalsize = 0;
|
||||
|
||||
for (auto layer_iterator = layers.begin(); layer_iterator != layers.end(); ++layer_iterator) {
|
||||
std::vector<coalesce> &layer_features = layer_iterator->second;
|
||||
totalsize += layer_features.size();
|
||||
|
||||
mvt_layer layer;
|
||||
layer.name = layer_iterator->first;
|
||||
layer.version = 2;
|
||||
layer.extent = 1 << tile_detail;
|
||||
|
||||
for (size_t x = 0; x < layer_features.size(); x++) {
|
||||
std::reverse(layer_features.begin(), layer_features.end());
|
||||
for (ssize_t x = layer_features.size() - 1; x >= 0; x--) {
|
||||
mvt_feature feature;
|
||||
|
||||
if (layer_features[x].type == VT_LINE || layer_features[x].type == VT_POLYGON) {
|
||||
@@ -2755,6 +2708,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
}
|
||||
|
||||
layer.features.push_back(feature);
|
||||
layer_features.erase(layer_features.begin() + x);
|
||||
}
|
||||
|
||||
if (layer.features.size() > 0) {
|
||||
@@ -2771,12 +2725,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
fprintf(stderr, "Is your data in the wrong projection? It should be in WGS84/EPSG:4326.\n");
|
||||
}
|
||||
|
||||
size_t totalsize = 0;
|
||||
for (auto layer_iterator = layers.begin(); layer_iterator != layers.end(); ++layer_iterator) {
|
||||
std::vector<coalesce> &layer_features = layer_iterator->second;
|
||||
totalsize += layer_features.size();
|
||||
}
|
||||
|
||||
size_t passes = pass + 1;
|
||||
double progress = floor(((((*geompos_in + *along - alongminus) / (double) todo) + pass) / passes + z) / (maxzoom + 1) * 1000) / 10;
|
||||
if (progress >= oprogress + 0.1) {
|
||||
@@ -2877,6 +2825,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
std::string compressed;
|
||||
std::string pbf = tile.encode();
|
||||
|
||||
tile.layers.clear();
|
||||
|
||||
if (!prevent[P_TILE_COMPRESSION]) {
|
||||
compress(pbf, compressed, true);
|
||||
} else {
|
||||
@@ -3073,7 +3023,7 @@ void *run_thread(void *vargs) {
|
||||
|
||||
// fprintf(stderr, "%d/%u/%u\n", z, x, y);
|
||||
|
||||
long long len = write_tile(&dc, &geompos, arg->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->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->fraction, arg->prefilter, arg->postfilter, arg->filter, arg, arg->strategy, arg->compressed);
|
||||
long long len = write_tile(&dc, &geompos, arg->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->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->fraction, arg->prefilter, arg->postfilter, arg->filter, arg, arg->strategy, arg->compressed, arg->shared_nodes_map, arg->nodepos);
|
||||
|
||||
if (len < 0) {
|
||||
int *err = &arg->err;
|
||||
@@ -3138,7 +3088,7 @@ void *run_thread(void *vargs) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int traverse_zooms(int *geomfd, off_t *geom_size, char *stringpool, std::atomic<unsigned> *midx, std::atomic<unsigned> *midy, int &maxzoom, int minzoom, sqlite3 *outdb, const char *outdir, int buffer, const char *fname, const char *tmpdir, double gamma, int full_detail, int low_detail, int min_detail, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, double maxzoom_simplification, std::vector<std::map<std::string, layermap_entry>> &layermaps, const char *prefilter, const char *postfilter, std::map<std::string, attribute_op> const *attribute_accum, struct json_object *filter, std::vector<strategy> &strategies, int iz) {
|
||||
int traverse_zooms(int *geomfd, off_t *geom_size, char *stringpool, std::atomic<unsigned> *midx, std::atomic<unsigned> *midy, int &maxzoom, int minzoom, sqlite3 *outdb, const char *outdir, int buffer, const char *fname, const char *tmpdir, double gamma, int full_detail, int low_detail, int min_detail, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, double maxzoom_simplification, std::vector<std::map<std::string, layermap_entry>> &layermaps, const char *prefilter, const char *postfilter, std::map<std::string, attribute_op> const *attribute_accum, struct json_object *filter, std::vector<strategy> &strategies, int iz, struct node *shared_nodes_map, size_t nodepos) {
|
||||
last_progress = 0;
|
||||
|
||||
// The existing layermaps are one table per input thread.
|
||||
@@ -3343,6 +3293,8 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *stringpool, std::atomic<
|
||||
args[thread].strategy = &strategy;
|
||||
args[thread].zoom = z;
|
||||
args[thread].compressed = (z != iz);
|
||||
args[thread].shared_nodes_map = shared_nodes_map;
|
||||
args[thread].nodepos = nodepos;
|
||||
|
||||
if (pthread_create(&pthreads[thread], NULL, run_thread, &args[thread]) != 0) {
|
||||
perror("pthread_create");
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <atomic>
|
||||
#include <map>
|
||||
#include "mbtiles.hpp"
|
||||
#include "serial.hpp"
|
||||
#include "jsonpull/jsonpull.h"
|
||||
|
||||
enum attribute_op {
|
||||
@@ -61,9 +62,9 @@ struct strategy {
|
||||
strategy() = default;
|
||||
};
|
||||
|
||||
long long write_tile(char **geom, char *stringpool, unsigned *file_bbox, int z, unsigned x, unsigned y, int detail, int min_detail, int basezoom, sqlite3 *outdb, const char *outdir, double droprate, int buffer, const char *fname, FILE **geomfile, int file_minzoom, int file_maxzoom, double todo, char *geomstart, long long along, double gamma, int nlayers, std::atomic<strategy> *strategy);
|
||||
// long long write_tile(char **geom, char *stringpool, unsigned *file_bbox, int z, unsigned x, unsigned y, int detail, int min_detail, int basezoom, sqlite3 *outdb, const char *outdir, double droprate, int buffer, const char *fname, FILE **geomfile, int file_minzoom, int file_maxzoom, double todo, char *geomstart, long long along, double gamma, int nlayers, std::atomic<strategy> *strategy);
|
||||
|
||||
int traverse_zooms(int *geomfd, off_t *geom_size, char *stringpool, std::atomic<unsigned> *midx, std::atomic<unsigned> *midy, int &maxzoom, int minzoom, sqlite3 *outdb, const char *outdir, int buffer, const char *fname, const char *tmpdir, double gamma, int full_detail, int low_detail, int min_detail, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, double maxzoom_simplification, std::vector<std::map<std::string, layermap_entry> > &layermap, const char *prefilter, const char *postfilter, std::map<std::string, attribute_op> const *attribute_accum, struct json_object *filter, std::vector<strategy> &strategies, int iz);
|
||||
int traverse_zooms(int *geomfd, off_t *geom_size, char *stringpool, std::atomic<unsigned> *midx, std::atomic<unsigned> *midy, int &maxzoom, int minzoom, sqlite3 *outdb, const char *outdir, int buffer, const char *fname, const char *tmpdir, double gamma, int full_detail, int low_detail, int min_detail, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, double maxzoom_simplification, std::vector<std::map<std::string, layermap_entry> > &layermap, const char *prefilter, const char *postfilter, std::map<std::string, attribute_op> const *attribute_accum, struct json_object *filter, std::vector<strategy> &strategies, int iz, struct node *shared_nodes_map, size_t nodepos);
|
||||
|
||||
int manage_gap(unsigned long long index, unsigned long long *previndex, double scale, double gamma, double *gap);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user