mirror of
https://github.com/felt/tippecanoe.git
synced 2026-12-05 06:41:41 +01:00
Compare commits
42
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7af66544d3 | ||
|
|
91a3ff99f8 | ||
|
|
c7f45ee81d | ||
|
|
4d761d4307 | ||
|
|
082487b594 | ||
|
|
b8e8542dfa | ||
|
|
162cb1c1b0 | ||
|
|
5e1240b341 | ||
|
|
4f64526ab4 | ||
|
|
34e1f56bdd | ||
|
|
5b35e5dacf | ||
|
|
1b17becfa3 | ||
|
|
2468cdba25 | ||
|
|
c062c4a240 | ||
|
|
4352b1498f | ||
|
|
1963076817 | ||
|
|
957b1cd9b9 | ||
|
|
a888304b19 | ||
|
|
4f2621186a | ||
|
|
63fcac725a | ||
|
|
734bba7c78 | ||
|
|
1820630392 | ||
|
|
905fe84459 | ||
|
|
ec727172b1 | ||
|
|
e6e1ec3263 | ||
|
|
1b060b7faf | ||
|
|
7c80fccdc1 | ||
|
|
0badb242be | ||
|
|
0dc1e00eee | ||
|
|
0c650b881a | ||
|
|
7fc82a1796 | ||
|
|
cb6cacef15 | ||
|
|
eb9acf9d44 | ||
|
|
a5805bd809 | ||
|
|
d7b2892f98 | ||
|
|
c82e4beee3 | ||
|
|
9a7ac5733f | ||
|
|
533e000faa | ||
|
|
68ab8dcc22 | ||
|
|
6dd49be6c9 | ||
|
|
c2a973d8f6 | ||
|
|
8ac730718a |
@@ -19,3 +19,20 @@ jobs:
|
||||
run: brew install sqlite3
|
||||
- run: uname -a; BUILDTYPE=${{ matrix.version }} make
|
||||
- run: make test
|
||||
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
# Pinned, because different go-md2man versions produce different roff
|
||||
# for the same input, which would make this check fail spuriously.
|
||||
- name: Install go-md2man
|
||||
run: go install github.com/cpuguy83/go-md2man/v2@v2.0.7
|
||||
- name: Regenerate the man page
|
||||
run: PATH="$PATH:$(go env GOPATH)/bin" make -B docs
|
||||
- name: Check that the man page is up to date with README.md
|
||||
run: |
|
||||
git diff --exit-code man/tippecanoe.1 || {
|
||||
echo "::error::man/tippecanoe.1 is out of date. Run 'make docs' and commit the result."
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -38,6 +38,9 @@ tippecanoe-json-tool
|
||||
tippecanoe-overzoom
|
||||
unit
|
||||
|
||||
# Left behind if man page generation fails
|
||||
man/tippecanoe.1.tmp
|
||||
|
||||
# Tests
|
||||
tests/**/*.mbtiles
|
||||
tests/**/*.check
|
||||
|
||||
-110
@@ -1,110 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "6"
|
||||
|
||||
sudo: false
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# test on docker+centos7
|
||||
- os: linux
|
||||
compiler: clang
|
||||
services:
|
||||
- docker
|
||||
sudo: true
|
||||
dist: trusty
|
||||
env: DOCKERFILE=Dockerfile.centos7
|
||||
before_install: []
|
||||
install:
|
||||
- docker build -t tippecanoe-image -f ${DOCKERFILE} .
|
||||
script:
|
||||
- docker run -it tippecanoe-image
|
||||
# test on docker+ubuntu
|
||||
- os: linux
|
||||
compiler: clang
|
||||
services:
|
||||
- docker
|
||||
sudo: true
|
||||
dist: trusty
|
||||
env: DOCKERFILE=Dockerfile
|
||||
before_install: []
|
||||
install:
|
||||
- docker build -t tippecanoe-image -f ${DOCKERFILE} .
|
||||
script:
|
||||
- docker run -it tippecanoe-image
|
||||
# debug+integer-santizer build
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: CLANG_VERSION='3.8.0' BUILDTYPE=Debug CC="clang-3.8" CXX="clang++-3.8" CXXFLAGS="-fsanitize=integer" CFLAGS="-fsanitize=integer" LDFLAGS="-fsanitize=integer"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test' ]
|
||||
packages: [ 'libstdc++6','libstdc++-5-dev' ]
|
||||
# debug+leak+address-sanitizer build
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: CLANG_VERSION='3.8.0' BUILDTYPE=Debug ASAN_OPTIONS=detect_leaks=1 CC="clang-3.8" CXX="clang++-3.8" CXXFLAGS="-fsanitize=address,undefined" CFLAGS="-fsanitize=address,undefined" LDFLAGS="-fsanitize=address,undefined" FEWER=true
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test' ]
|
||||
packages: [ 'libstdc++6','libstdc++-5-dev' ]
|
||||
# coverage+debug build
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: CLANG_VERSION='3.8.0' BUILDTYPE=Debug CC="clang-3.8" CXX="clang++-3.8" CXXFLAGS="--coverage" CFLAGS="--coverage" LDFLAGS="--coverage"
|
||||
after_script:
|
||||
- mason install llvm-cov 3.9.1
|
||||
- mason link llvm-cov 3.9.1
|
||||
- which llvm-cov
|
||||
- curl -S -f https://codecov.io/bash -o codecov
|
||||
- chmod +x codecov
|
||||
- ./codecov -x "llvm-cov gcov" -Z
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test' ]
|
||||
packages: [ 'libstdc++6','libstdc++-5-dev' ]
|
||||
# release+linux+g++
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env: BUILDTYPE=Release CC="gcc-4.9" CXX="g++-4.9"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test']
|
||||
packages: [ 'g++-4.9' ]
|
||||
# release+linux+clang++
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: CLANG_VERSION='3.8.0' BUILDTYPE=Release CC="clang-3.8" CXX="clang++-3.8"
|
||||
addons:
|
||||
apt:
|
||||
sources: ['ubuntu-toolchain-r-test' ]
|
||||
packages: [ 'libstdc++6','libstdc++-5-dev' ]
|
||||
# release+osx
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: BUILDTYPE=Release
|
||||
# debug+osx
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: BUILDTYPE=Debug
|
||||
|
||||
before_install:
|
||||
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
|
||||
- export PATH=${DEPS_DIR}/bin:${PATH} && mkdir -p ${DEPS_DIR}
|
||||
- |
|
||||
if [[ ${CLANG_VERSION:-false} != false ]]; then
|
||||
export CCOMPILER='clang'
|
||||
export CXXCOMPILER='clang++'
|
||||
CLANG_URL="https://mason-binaries.s3.amazonaws.com/${TRAVIS_OS_NAME}-x86_64/clang/${CLANG_VERSION}.tar.gz"
|
||||
travis_retry wget --quiet -O - ${CLANG_URL} | tar --strip-components=1 -xz -C ${DEPS_DIR}
|
||||
fi
|
||||
|
||||
install:
|
||||
- BUILDTYPE=${BUILDTYPE} make -j
|
||||
|
||||
script:
|
||||
- npm install geobuf
|
||||
- if [ -n "${FEWER}" ]; then
|
||||
BUILDTYPE=${BUILDTYPE} make fewer-tests; else
|
||||
BUILDTYPE=${BUILDTYPE} make test geobuf-test;
|
||||
fi
|
||||
+193
@@ -1,3 +1,196 @@
|
||||
# 2.83.0
|
||||
|
||||
* Preserve "spindle" polygons, and the narrow parts of polygons, that are too
|
||||
narrow to survive being rounded to tile coordinates. Previously something
|
||||
like a 1-meter buffer around a long linestring would collapse away to nothing
|
||||
at most zoom levels, except for scattered fragments wherever the rounding
|
||||
happened to keep its two sides apart. Now, before rounding, Tippecanoe looks
|
||||
for edges that have an oppositely-directed edge less than √2 tile units away
|
||||
that is not just the other side of a corner, and unions a one-unit-wide strip
|
||||
along each of them into the cleaned polygon, so the narrow parts come out as
|
||||
continuous lines one (or sometimes two) units thick. Where a polygon is
|
||||
already thick enough, the strips lie within it and change nothing. Long,
|
||||
narrow polygons whose perimeter is more than 8 times the tiny polygon size
|
||||
are also no longer combined into tiny-polygon squares, though they still
|
||||
are once the zoom level is low enough that they are shorter than that.
|
||||
`--no-spindle-preservation` restores the old behavior.
|
||||
* With `--no-simplification-of-shared-nodes`, also find the polygon edges that
|
||||
are shared between different features while finding the shared nodes, and
|
||||
don't add a spindle strip along a narrow part where it would extend past a
|
||||
shared edge into the neighboring feature. So a panhandle between two
|
||||
neighbors still collapses, and the features still tile exactly, but a narrow
|
||||
part with open space on its far side, like a coastal strip, is still kept.
|
||||
Since strips are only needed for edges that are already known to be narrow,
|
||||
the shared edges are only looked up for those, not for every vertex.
|
||||
* When a polygon collapses away to nothing entirely during cleaning, replace it
|
||||
with a line one pixel wide along its outline, so it keeps its shape and
|
||||
location, instead of a rectangle with the polygon's area centered on the
|
||||
average of its vertices. For long, narrow polygons, like Census blocks
|
||||
between roads, the rectangle looked nothing like the polygon. Most polygons
|
||||
that collapse are much smaller than a pixel, so the rectangle was also
|
||||
usually far too big: for Dane County Census blocks at -pt, the median
|
||||
rectangle had 11 times the area of the polygon it replaced. Polygons that
|
||||
are within about a pixel in every direction still get the rectangle, which
|
||||
is then one pixel. With --no-spindle-preservation, the rectangle is still
|
||||
used. With --no-simplification-of-shared-nodes, the outline leaves out the
|
||||
borders that the polygon shares with other features, and a polygon whose
|
||||
borders are all shared is left out entirely, so that its neighbors close
|
||||
over the space instead of being overlapped.
|
||||
* With --no-simplification-of-shared-nodes, snap-round the polygons of each
|
||||
layer in a tile consistently with each other. Wagyu snaps each edge to the
|
||||
"hot pixels" (vertices and rounded intersections) that it passes through,
|
||||
but each polygon was cleaned on its own, with only its own hot pixels, so a
|
||||
border shared by two polygons could be bent through a hot pixel in one of
|
||||
them and not the other, leaving a shard gap or overlap between them. Now the
|
||||
hot pixels of all the polygons in the layer are found first, and each polygon
|
||||
is snapped to the ones near it as well as its own, so shared borders are
|
||||
snapped identically. In this mode the hot pixels are treated as half-open,
|
||||
[x - 0.5, x + 0.5) by [y - 0.5, y + 0.5), as in Hobby's snap rounding,
|
||||
rather than as closed squares, because edges passing diagonally through
|
||||
pixel corners otherwise zigzagged through the same pixels in different
|
||||
orders in different polygons, and could cross each other. Then, where
|
||||
rounding turned a narrow polygon between two others inside out, so that the
|
||||
area it covered is covered by both of its neighbors, that area is removed
|
||||
from all but the earliest of them. These overlaps are found from edges that
|
||||
two polygons share in the same direction, which neighbors that tile exactly
|
||||
never do, and from vertices and edge midpoints of one polygon strictly
|
||||
inside another, after splitting each polygon's edges wherever another
|
||||
polygon's vertex lies on them. The
|
||||
overlapping area is removed at a higher resolution than the tile, so that
|
||||
the polygon isn't snapped to tile coordinates a second time, which could
|
||||
collapse parts of it that the first snapping had left, and leave holes.
|
||||
Where two polygons' edges still cross, removing the overlap has to snap
|
||||
the crossing to tile coordinates, which can leave a smaller overlap, so
|
||||
this is repeated until no overlaps are left (at most 4 times).
|
||||
* In this mode, the spindle strips are unioned with each polygon in the same
|
||||
pass that cleans it, and their hot pixels are included in the layer's, so
|
||||
every polygon is snapped only once. Unioning the strips afterwards snapped
|
||||
the whole polygon a second time, which could bend its borders differently
|
||||
from those of the neighbors it shares them with, which weren't snapped
|
||||
again, so that their edges crossed. For Dane County Census blocks at -D8 -d8 -pt -pn, this
|
||||
reduces the gaps between blocks at z9 and z10 from 55 and 155 pixels to 13
|
||||
and 23, and the overlaps from 113 and 175 to 56 and 59, and takes about 7%
|
||||
longer for Natural Earth countries at -z8 -pn.
|
||||
* Fix Wagyu's snap rounding so that an edge that intersects no other edge
|
||||
is no longer snapped to a hot pixel whose corner it only touches, unless
|
||||
that hot pixel is the rounded location of an intersection. Previously, two
|
||||
parallel 45-degree edges one tile unit apart were each snapped to the
|
||||
other's vertices, so a perfectly valid diagonal polygon one unit wide
|
||||
collapsed to nothing during cleaning, leaving gaps between the features on
|
||||
either side of it. Edges that do intersect others are snapped as before,
|
||||
which is needed to keep the result free of spikes.
|
||||
|
||||
# 2.82.0
|
||||
|
||||
* Fix corruption of a JSON array when a non-final element was removed from it.
|
||||
The old `json_free` / `json_disconnect` passed an element count to `memmove`
|
||||
where a byte count was required, so pruning element 0 of an 8-element array
|
||||
left the first two slots pointing at the same node -- a double free at
|
||||
teardown -- and silently dropped the last element. Only reachable through a
|
||||
whole-document tree, because removing the most recently added element made
|
||||
the bad `memmove` a zero-length no-op. (#388)
|
||||
* Rewrite `jsonpull` in C++ with `unique_ptr` ownership, `std::vector` for
|
||||
arrays and hash entries, and `std::string` for string values, replacing the
|
||||
hand-rolled `malloc`/`realloc`/`free` memory management. Value payloads now
|
||||
live in type-tagged subclasses reached through asserting accessors, so
|
||||
reading a hash as a string fails immediately instead of silently returning
|
||||
garbage. (#388)
|
||||
* Fix `tippecanoe-json-tool --extract` crashing on a numeric attribute, which
|
||||
read the number's storage as a string pointer. (#388)
|
||||
* Fix decoding of a `\u` escape sequence in which a high surrogate is followed
|
||||
by a non-surrogate BMP code point, which combined the two into a single
|
||||
wrong code point. (#388)
|
||||
* Fix a `\uFFFF` escape being decoded to the overlong, invalid four-byte
|
||||
UTF-8 sequence `F0 8F BF BF` instead of `EF BF BF`. (#388)
|
||||
* Fix tile-join reading a non-string field type out of a tileset's tilejson.
|
||||
(#388)
|
||||
* Fix `tippecanoe-decode` and tile-join crashing on a directory tileset whose
|
||||
`metadata.json` holds a non-string value, such as a numeric `minzoom` or a
|
||||
nested object. Those entries are now reported and skipped. (#388)
|
||||
* Fix an uninitialized read when a prefilter or postfilter emitted a feature
|
||||
with `"properties": null`. Both filter readers accepted a null `properties`
|
||||
and then read its length as though it were a hash, which was never
|
||||
initialized for a non-container node. (#388)
|
||||
* Fix the include guard in `evaluator.hpp`, which defined `EVALUATOR HPP`
|
||||
instead of `EVALUATOR_HPP` and so never guarded anything. (#388)
|
||||
|
||||
# 2.81.0
|
||||
|
||||
* Add `--drop-by-attribute-as-needed=`*attribute* to drop the features with
|
||||
the lowest values of a numeric attribute from oversized tiles, and
|
||||
`--drop-by-attribute-order=desc` to drop the highest values instead.
|
||||
Features exactly at the threshold are kept rather than dropped. (#384, #385)
|
||||
* Add `--exclude-all-tile-geometries` to tile-join, to produce tiles that
|
||||
carry only attributes. (#382)
|
||||
* Generate each tool's usage message from the same option table that
|
||||
`getopt_long()` reads, so the hand-written lists in tile-join,
|
||||
tippecanoe-overzoom, tippecanoe-json-tool, tippecanoe-decode, and
|
||||
tippecanoe-enumerate can no longer fall behind the options actually
|
||||
accepted. Options previously reachable only by their short names are now
|
||||
listed. tippecanoe-overzoom reports a missing `-o` instead of passing a
|
||||
null pointer to `fopen()`, and tippecanoe prints its usage when run with
|
||||
no arguments. (#409)
|
||||
* Fix the radix sort used by `--prefer-radix-sort`. A bucket written out
|
||||
directly rather than through the merge was written one byte longer than
|
||||
its length prefix claimed, desynchronizing everything read from the
|
||||
geometry after it. Subdividing could also recurse forever once it ran out
|
||||
of files to split with, shifting by the full width of the index and
|
||||
writing past the end of the arrays of buckets. Radix-sorted output is now
|
||||
checked against the in-memory sort rather than against a stored copy. (#404)
|
||||
* Read FlatGeobuf integer and float properties as numbers. They were tagged
|
||||
with types that the rest of tippecanoe does not treat as numeric, so they
|
||||
were reported in tilestats as "mixed", with quoted values and no min or
|
||||
max, and warned when used as a feature ID. ULong properties are now also
|
||||
read as unsigned rather than signed. (#395)
|
||||
* Respect the `-t` temporary directory option in sorting operations, which
|
||||
previously always used the system temporary directory. (#368)
|
||||
* Keep `--generate-variable-depth-tile-pyramid` from silently dropping
|
||||
features whose explicit per-feature `minzoom` is deeper than the zoom at
|
||||
which their region becomes a leaf. Such a feature was excluded from the
|
||||
leaf tile while its children were never generated, so it appeared at no
|
||||
zoom at all. (#397, #399)
|
||||
* Drop a polygon hole that no remaining ring can parent, instead of failing
|
||||
the whole run. Degenerate input could abort tiling over a single
|
||||
unrepresentable sliver. (#401)
|
||||
* Clamp the feature extent to the `long long` range before converting it,
|
||||
at both ends. The previous `extent <= LLONG_MAX` guard was doubly wrong:
|
||||
`LLONG_MAX` is not representable as a double and rounds up, so an extent
|
||||
at the very top of the range overflowed the conversion and came out as the
|
||||
most negative value rather than the largest, and the guard admitted
|
||||
everything below `LLONG_MIN` as well, which overflowed the other way. Areas
|
||||
are signed, so holes that outweigh their rings can reach the low end. (#406)
|
||||
* Initialize the full width of the `mvt_value` numeric union, which left the
|
||||
bytes of the wider unused member indeterminate even though the implicit
|
||||
copy constructor copies the union as a whole. (#406)
|
||||
* Replace all variable-length arrays with `std::vector` and `std::string`,
|
||||
and build with `-Wvla`. VLAs are a compiler extension rather than standard
|
||||
C++, and clang warns about every one of them by default. (#406)
|
||||
* Remove the unused Dockerfiles, Travis configuration, and lambda
|
||||
directory. (#365)
|
||||
* Correct README statements that disagreed with the code. Among them, `-aD`
|
||||
and `-aS` were documented the wrong way round,
|
||||
`--limit-base-zoom-to-maximum-zoom` was given as `-Pb` rather than `-pb`,
|
||||
and the dot-dropping description had both the fraction and the zoom
|
||||
direction backwards: tippecanoe keeps 1/2.5 of the dots at zooms below the
|
||||
base zoom, rather than dropping that share above it. (#410)
|
||||
* Generate `man/tippecanoe.1` with go-md2man rather than md2man-roff, which
|
||||
is packaged only as a Ruby gem and so had let the page drift out of date.
|
||||
The page now has a proper header and a NAME section, so `man -k` and
|
||||
`whatis` can find it, and no longer silently drops or mangles text the old
|
||||
converter mishandled. CI checks it against README.md. (#408)
|
||||
* Documentation fixes: correct three misspellings in the README and man
|
||||
page, repair the dead All Streets link, and tag more README code blocks
|
||||
with their language. (#375, #391, #400)
|
||||
|
||||
# 2.80.0
|
||||
|
||||
* Remove undocumented command-line options
|
||||
|
||||
# 2.79.0
|
||||
|
||||
* When deduplicating features by ID in tippecanoe-overzoom, be careful
|
||||
to track even features that have been clipped away.
|
||||
|
||||
# 2.78.0
|
||||
|
||||
* Fix potential infinite loops in as-needed dropping and coalescing.
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
FROM ubuntu:22.04 AS tippecanoe-builder
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install make gcc g++ libsqlite3-dev zlib1g-dev
|
||||
|
||||
COPY . /tmp/tippecanoe-src
|
||||
WORKDIR /tmp/tippecanoe-src
|
||||
|
||||
RUN make
|
||||
|
||||
CMD make test
|
||||
|
||||
# Using multistage build reduces the docker image size by alot by only copying the needed binaries
|
||||
FROM ubuntu:22.04
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install libsqlite3-0 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=tippecanoe-builder /tmp/tippecanoe-src/tippecanoe* /usr/local/bin/
|
||||
COPY --from=tippecanoe-builder /tmp/tippecanoe-src/tile-join /usr/local/bin/
|
||||
WORKDIR /app
|
||||
@@ -1,15 +0,0 @@
|
||||
FROM centos:centos8
|
||||
|
||||
RUN yum install -y make sqlite-devel zlib-devel bash git gcc-c++
|
||||
|
||||
# Create a directory and copy in all files
|
||||
RUN mkdir -p /tmp/tippecanoe-src
|
||||
WORKDIR /tmp/tippecanoe-src
|
||||
COPY . /tmp/tippecanoe-src
|
||||
|
||||
# Build tippecanoe
|
||||
RUN make \
|
||||
&& make install
|
||||
|
||||
# Run the tests
|
||||
CMD make test
|
||||
+5
-5
@@ -1,19 +1,19 @@
|
||||
## [Visualizing a Month of Lightning](http://rousseau.io/2015/03/23/visualizing-a-month-of-lightning) by Jordan Rousseau
|
||||
## [Visualizing a Month of Lightning](https://medium.com/@jvrousseau/visualizing-a-month-of-lightning-8ab63d040d8c) by Jordan Rousseau
|
||||
|
||||

|
||||
|
||||
## [Making the most detailed tweet map ever](https://www.mapbox.com/blog/twitter-map-every-tweet/) by Eric Fischer
|
||||
## [Making the most detailed tweet map ever](https://web.archive.org/web/20161220144946/https://www.mapbox.com/blog/twitter-map-every-tweet/) by Eric Fischer
|
||||
|
||||

|
||||
|
||||
## [Superpowering Runkeeper's 1.5 million walks, runs, and bike rides](https://www.mapbox.com/blog/runkeeper-million-routes/)
|
||||
## [Superpowering Runkeeper's 1.5 million walks, runs, and bike rides](https://web.archive.org/web/20161219225305/https://www.mapbox.com/blog/runkeeper-million-routes/)
|
||||
|
||||

|
||||
|
||||
## [The Geotaggers' World Atlas](https://www.mapbox.com/blog/geotaggers-world-atlas/) by Eric Fischer
|
||||
## [The Geotaggers' World Atlas](https://web.archive.org/web/20170319084321/https://www.mapbox.com/blog/geotaggers-world-atlas/) by Eric Fischer
|
||||
|
||||

|
||||
|
||||
## [Atmospheric River](https://www.mapbox.com/blog/atmospheric-river/)
|
||||
## [Atmospheric River](https://web.archive.org/web/20161011171030/https://www.mapbox.com/blog/atmospheric-river/)
|
||||
|
||||

|
||||
|
||||
@@ -11,7 +11,7 @@ CXX := $(CXX)
|
||||
CFLAGS := $(CFLAGS) -fPIE -DBUILD_INFO=$(BUILD_INFO)
|
||||
CXXFLAGS := $(CXXFLAGS) -std=c++17 -fPIE -DBUILD_INFO=$(BUILD_INFO)
|
||||
LDFLAGS := $(LDFLAGS)
|
||||
WARNING_FLAGS := -Wall -Wshadow -Wsign-compare -Wextra -Wunreachable-code -Wuninitialized -Wshadow
|
||||
WARNING_FLAGS := -Wall -Wshadow -Wsign-compare -Wextra -Wunreachable-code -Wuninitialized -Wshadow -Wvla
|
||||
RELEASE_FLAGS := -O3 -DNDEBUG
|
||||
DEBUG_FLAGS := -O0 -DDEBUG -fno-inline-functions -fno-omit-frame-pointer
|
||||
|
||||
@@ -48,8 +48,44 @@ install: tippecanoe tippecanoe-enumerate tippecanoe-decode tile-join tippecanoe-
|
||||
uninstall:
|
||||
rm $(PREFIX)/bin/tippecanoe $(PREFIX)/bin/tippecanoe-enumerate $(PREFIX)/bin/tippecanoe-decode $(PREFIX)/bin/tile-join $(MANDIR)/tippecanoe.1 $(PREFIX)/bin/tippecanoe-json-tool
|
||||
|
||||
# The man page is generated from README.md by go-md2man, which is packaged for
|
||||
# most systems (`brew install go-md2man`, `apt-get install go-md2man`) or can be
|
||||
# built with `go install github.com/cpuguy83/go-md2man/v2@v2.0.7`. CI checks that
|
||||
# the committed man page matches the README, so you don't have to regenerate it
|
||||
# yourself if you don't have go-md2man installed.
|
||||
#
|
||||
# README.md has no .TH or NAME section of its own, since neither would make sense
|
||||
# on GitHub, so prepend them here. go-md2man reads the leading "%" line as the
|
||||
# man page's title, section, date, and source. The version deliberately doesn't
|
||||
# appear there: it would make this page a build product of version.hpp, so every
|
||||
# release would have to regenerate it just to rewrite that one line, and the docs
|
||||
# CI job would fail on any version bump that forgot to.
|
||||
#
|
||||
# Two fixups on the way out:
|
||||
#
|
||||
# - README.md's own title heading becomes the second .SH, right below the NAME
|
||||
# section added above, which reads as a stray "tippecanoe" section. Rename it
|
||||
# to DESCRIPTION, where the text under it belongs anyway.
|
||||
# - go-md2man separates paragraphs with a blank line in addition to the .PP
|
||||
# macro, and a blank line is itself a break in roff, so the two together
|
||||
# double-space the whole page. Drop them, except within .EX and .TS blocks,
|
||||
# where a blank line is part of the example or table rather than spacing.
|
||||
man/tippecanoe.1: README.md
|
||||
md2man-roff README.md > man/tippecanoe.1
|
||||
{ \
|
||||
echo '% TIPPECANOE 1 "" "tippecanoe"'; \
|
||||
echo; \
|
||||
echo '# NAME'; \
|
||||
echo; \
|
||||
echo 'tippecanoe - build vector tilesets from GeoJSON, FlatGeobuf, or CSV features'; \
|
||||
echo; \
|
||||
cat README.md; \
|
||||
} | go-md2man \
|
||||
| awk ' \
|
||||
/^\.SH / && ++sh == 2 { print ".SH DESCRIPTION"; next } \
|
||||
/^\.(EX|TS)$$/ { lit = 1 } \
|
||||
/^\.(EE|TE)$$/ { lit = 0 } \
|
||||
lit || !/^$$/ \
|
||||
' > $@.tmp && mv $@.tmp $@
|
||||
|
||||
PG=
|
||||
|
||||
@@ -59,25 +95,25 @@ C = $(wildcard *.c) $(wildcard *.cpp)
|
||||
INCLUDES = -I/usr/local/include -I. -Iclipper2/include
|
||||
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 platform.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 attribute.o thread.o shared_borders.o clipper2/src/clipper.engine.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 platform.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 polygon.o sort.o attribute.o thread.o shared_borders.o usage.o clipper2/src/clipper.engine.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||
|
||||
tippecanoe-enumerate: enumerate.o
|
||||
tippecanoe-enumerate: enumerate.o usage.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lsqlite3
|
||||
|
||||
tippecanoe-decode: decode.o projection.o mvt.o write_json.o text.o jsonpull/jsonpull.o dirtiles.o pmtiles_file.o
|
||||
tippecanoe-decode: decode.o projection.o mvt.o write_json.o text.o jsonpull/jsonpull.o dirtiles.o pmtiles_file.o usage.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3
|
||||
|
||||
tile-join: tile-join.o platform.o projection.o mbtiles.o mvt.o memfile.o dirtiles.o jsonpull/jsonpull.o text.o evaluator.o csv.o write_json.o pmtiles_file.o clip.o attribute.o thread.o read_json.o clipper2/src/clipper.engine.o
|
||||
tile-join: tile-join.o platform.o projection.o mbtiles.o mvt.o memfile.o dirtiles.o jsonpull/jsonpull.o text.o evaluator.o csv.o write_json.o pmtiles_file.o clip.o attribute.o thread.o read_json.o usage.o clipper2/src/clipper.engine.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||
|
||||
tippecanoe-json-tool: jsontool.o jsonpull/jsonpull.o csv.o text.o geojson-loop.o
|
||||
tippecanoe-json-tool: jsontool.o jsonpull/jsonpull.o csv.o text.o geojson-loop.o usage.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||
|
||||
unit: unit.o text.o sort.o mvt.o projection.o clip.o attribute.o jsonpull/jsonpull.o evaluator.o read_json.o clipper2/src/clipper.engine.o
|
||||
unit: unit.o text.o sort.o mvt.o projection.o clip.o polygon.o attribute.o jsonpull/jsonpull.o evaluator.o read_json.o clipper2/src/clipper.engine.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||
|
||||
tippecanoe-overzoom: overzoom.o mvt.o clip.o evaluator.o jsonpull/jsonpull.o text.o attribute.o read_json.o projection.o read_json.o clipper2/src/clipper.engine.o
|
||||
tippecanoe-overzoom: overzoom.o mvt.o clip.o evaluator.o jsonpull/jsonpull.o text.o attribute.o read_json.o projection.o read_json.o usage.o clipper2/src/clipper.engine.o
|
||||
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||
|
||||
-include $(wildcard *.d)
|
||||
@@ -92,12 +128,12 @@ clean:
|
||||
rm -f ./tippecanoe ./tippecanoe-* ./tile-join ./unit *.o *.d */*.o */*.d tests/**/*.mbtiles tests/**/*.check
|
||||
|
||||
indent:
|
||||
clang-format -i -style="{BasedOnStyle: Google, IndentWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, ColumnLimit: 0, ContinuationIndentWidth: 8, SpaceAfterCStyleCast: true, IndentCaseLabels: false, AllowShortBlocksOnASingleLine: false, AllowShortFunctionsOnASingleLine: false, SortIncludes: false}" $(filter-out flatgeobuf.cpp,$(C)) $(H) jsonpull/*.[ch]
|
||||
clang-format -i -style="{BasedOnStyle: Google, IndentWidth: 8, UseTab: Always, AllowShortIfStatementsOnASingleLine: false, ColumnLimit: 0, ContinuationIndentWidth: 8, SpaceAfterCStyleCast: true, IndentCaseLabels: false, AllowShortBlocksOnASingleLine: false, AllowShortFunctionsOnASingleLine: false, SortIncludes: false}" $(filter-out flatgeobuf.cpp,$(C)) $(H) jsonpull/jsonpull.h jsonpull/jsonpull.cpp
|
||||
|
||||
TESTS = $(wildcard tests/*/out/*.json)
|
||||
SPACE = $(NULL) $(NULL)
|
||||
|
||||
test: tippecanoe tippecanoe-decode $(addsuffix .check,$(TESTS)) raw-tiles-test parallel-test pbf-test join-test enumerate-test decode-test join-filter-test unit json-tool-test allow-existing-test csv-test layer-json-test pmtiles-test decode-pmtiles-test overzoom-test accumulate-test
|
||||
test: tippecanoe tippecanoe-decode $(addsuffix .check,$(TESTS)) raw-tiles-test parallel-test radix-sort-test pbf-test join-test enumerate-test decode-test join-filter-test unit json-tool-test allow-existing-test csv-test layer-json-test pmtiles-test decode-pmtiles-test overzoom-test flatgeobuf-test
|
||||
./unit
|
||||
|
||||
suffixes = json json.gz
|
||||
@@ -108,6 +144,7 @@ suffixes = json json.gz
|
||||
# %22 for quoted quote
|
||||
# %2f for /
|
||||
# %3a for :
|
||||
# %3d for =
|
||||
# %5f for _
|
||||
# %7b for {
|
||||
|
||||
@@ -115,10 +152,11 @@ testargs = \
|
||||
$(subst %20,' ',\
|
||||
$(subst %22,'"',\
|
||||
$(subst %3a,:,\
|
||||
$(subst %2f,/,\
|
||||
$(subst %7b,'{',\
|
||||
$(subst %5f,'_',\
|
||||
$(subst _, ,$(1))))))))
|
||||
$(subst %3d,=,\
|
||||
$(subst %2f,/,\
|
||||
$(subst %7b,'{',\
|
||||
$(subst %5f,'_',\
|
||||
$(subst _, ,$(1)))))))))
|
||||
|
||||
%.json.check:
|
||||
./tippecanoe -q -a@ -f -o $@.mbtiles $(call testargs,$(patsubst %.json.check,%,$(word 4,$(subst /, ,$@)))) $(foreach suffix,$(suffixes),$(sort $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.$(suffix)))) < /dev/null
|
||||
@@ -132,7 +170,7 @@ nogeobuf = tests/overflow/out/-z0.json $(wildcard tests/stringid/out/*.json)
|
||||
geobuf-test: tippecanoe-json-tool $(addsuffix .checkbuf,$(filter-out $(nogeobuf),$(TESTS)))
|
||||
|
||||
# For quicker address sanitizer build, hope that regular JSON parsing is tested enough by parallel and join tests
|
||||
fewer-tests: tippecanoe tippecanoe-decode geobuf-test raw-tiles-test parallel-test pbf-test join-test enumerate-test decode-test join-filter-test unit
|
||||
fewer-tests: tippecanoe tippecanoe-decode geobuf-test raw-tiles-test parallel-test radix-sort-test pbf-test join-test enumerate-test decode-test join-filter-test unit
|
||||
|
||||
# XXX Use proper makefile rules instead of a for loop
|
||||
%.json.checkbuf:
|
||||
@@ -143,6 +181,42 @@ fewer-tests: tippecanoe tippecanoe-decode geobuf-test raw-tiles-test parallel-te
|
||||
cmp $@.out $(patsubst %.checkbuf,%,$@)
|
||||
rm $@.out $@.mbtiles
|
||||
|
||||
# The result of the sort must not depend on how the sort was performed, so instead of
|
||||
# checking the sorted output against an expected copy of it, check that sorting by radix
|
||||
# produces the same tiles as sorting in memory. --prefer-radix-sort lowers the memory
|
||||
# limit to 8K, which radix() then halves again, so the radix subdivision has to recurse
|
||||
# until each bucket is under 4K. How deeply that recurses depends on how many files the
|
||||
# machine will let us open at once, but the sorted result is the same either way, so
|
||||
# this comparison doesn't depend on that.
|
||||
#
|
||||
# What sends the sort down its rarely-taken paths is the shape of the input rather than
|
||||
# the size of it: a feature whose geometry alone is bigger than the memory limit is
|
||||
# sorted as a bucket of its own, and features that share a long run of leading index
|
||||
# bits have to be subdivided until there are no bits left. The first two inputs are
|
||||
# each one of those on purpose -- several separated features too big to sort in memory,
|
||||
# and many features at one location -- and the rest are for breadth.
|
||||
radix-sort-test: tippecanoe tippecanoe-decode
|
||||
mkdir -p tests/radix-sort
|
||||
perl -e 'for ($$f = 0; $$f < 8; $$f++) { print "{ \"type\": \"Feature\", \"properties\": { \"f\": $$f }, \"geometry\": { \"type\": \"LineString\", \"coordinates\": ["; for ($$i = 0; $$i < 2000; $$i++) { print "," unless $$i == 0; printf "[%f,%f]", $$f * 40 - 175 + $$i * 0.001, $$i % 2 * 0.5 - 20; } print "] } }\n"; }' > tests/radix-sort/bigfeatures.json
|
||||
perl -e 'for ($$i = 0; $$i < 500; $$i++) { print "{ \"type\": \"Feature\", \"properties\": { \"i\": $$i }, \"geometry\": { \"type\": \"Point\", \"coordinates\": [ 17, 42 ] } }\n"; }' > tests/radix-sort/onelocation.json
|
||||
$(MAKE) radix-sort-compare RADIXIN="tests/radix-sort/bigfeatures.json" RADIXARGS="-z4"
|
||||
$(MAKE) radix-sort-compare RADIXIN="tests/radix-sort/onelocation.json" RADIXARGS="-z4"
|
||||
$(MAKE) radix-sort-compare RADIXIN="tests/feature-filter/in.json" RADIXARGS="-z4"
|
||||
$(MAKE) radix-sort-compare RADIXIN="tests/ne_110m_ocean/in.json" RADIXARGS="-z4"
|
||||
$(MAKE) radix-sort-compare RADIXIN="tests/border/in.json" RADIXARGS="-z4"
|
||||
$(MAKE) radix-sort-compare RADIXIN="tests/loop/in.json" RADIXARGS="-z4"
|
||||
$(MAKE) radix-sort-compare RADIXIN="tests/tl_2022_11_tract/in.json.gz" RADIXARGS="-z4"
|
||||
$(MAKE) radix-sort-compare RADIXIN="tests/epsg-3857/in.json" RADIXARGS="-z4 -sEPSG:3857"
|
||||
rm -r tests/radix-sort
|
||||
|
||||
radix-sort-compare:
|
||||
./tippecanoe -q -f $(RADIXARGS) -o tests/radix-sort/memory.mbtiles $(RADIXIN)
|
||||
./tippecanoe -q -f $(RADIXARGS) -aR -o tests/radix-sort/radix.mbtiles $(RADIXIN)
|
||||
./tippecanoe-decode -x generator -x generator_options -x name -x description tests/radix-sort/memory.mbtiles > tests/radix-sort/memory.json
|
||||
./tippecanoe-decode -x generator -x generator_options -x name -x description tests/radix-sort/radix.mbtiles > tests/radix-sort/radix.json
|
||||
cmp tests/radix-sort/memory.json tests/radix-sort/radix.json
|
||||
rm tests/radix-sort/memory.mbtiles tests/radix-sort/radix.mbtiles tests/radix-sort/memory.json tests/radix-sort/radix.json
|
||||
|
||||
parallel-test: $(eval SHELL:=$(ADVSHELL))
|
||||
mkdir -p tests/parallel
|
||||
perl -e 'for ($$i = 0; $$i < 20; $$i++) { $$lon = rand(360) - 180; $$lat = rand(180) - 90; $$k = rand(1); $$v = rand(1); print "{ \"type\": \"Feature\", \"properties\": { \"yes\": \"no\", \"who\": 1, \"$$k\": \"$$v\" }, \"geometry\": { \"type\": \"Point\", \"coordinates\": [ $$lon, $$lat ] } }\n"; }' > tests/parallel/in1.json
|
||||
@@ -187,6 +261,14 @@ raw-tiles-test: tippecanoe tippecanoe-decode tile-join
|
||||
./tippecanoe-decode -x generator tests/raw-tiles/nothing > tests/raw-tiles/nothing.json.check
|
||||
cmp tests/raw-tiles/nothing.json.check tests/raw-tiles/nothing.json
|
||||
rm -r tests/raw-tiles/nothing tests/raw-tiles/nothing.json.check
|
||||
# Test that a non-string value in metadata.json is reported and skipped
|
||||
# instead of being read as a string (which used to crash)
|
||||
./tippecanoe -q -f -e tests/raw-tiles/nonstring tests/raw-tiles/hackspots.geojson
|
||||
sed -i.bak 's/"minzoom": "0"/"minzoom": 0/' tests/raw-tiles/nonstring/metadata.json
|
||||
rm tests/raw-tiles/nonstring/metadata.json.bak
|
||||
grep -q '"minzoom": 0' tests/raw-tiles/nonstring/metadata.json
|
||||
./tippecanoe-decode -x generator tests/raw-tiles/nonstring > /dev/null
|
||||
rm -r tests/raw-tiles/nonstring
|
||||
|
||||
pmtiles-test: tippecanoe tippecanoe-decode tile-join
|
||||
./tippecanoe -q -f -o tests/pmtiles/hackspots.pmtiles -r1 -pC tests/raw-tiles/hackspots.geojson
|
||||
@@ -322,7 +404,7 @@ overzoom-test: tippecanoe-overzoom
|
||||
# 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-overzoom -y NAME -j'{"*":["==","SCALERANK",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
|
||||
@@ -334,13 +416,13 @@ overzoom-test: tippecanoe-overzoom
|
||||
# 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-overzoom -y NAME -y SCALERANK -j'{"*":["==","SCALERANK",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
|
||||
# Filtering with multiplier and preserve-input-order
|
||||
# 243 features in the source tile tests/pbf/0-0-0-pop.pbf
|
||||
./tippecanoe-overzoom -y NAME -y SCALERANK -j'{"*":["NAME","cn","e"]}' -m --preserve-input-order -o tests/pbf/0-0-0-filter-mult-order.pbf tests/pbf/0-0-0-pop.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-overzoom -y NAME -y SCALERANK -y LATITUDE -j'{"*":[">","LATITUDE",40]}' -m --preserve-input-order -o tests/pbf/0-0-0-filter-mult-order.pbf tests/pbf/0-0-0-pop.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-decode tests/pbf/0-0-0-filter-mult-order.pbf 0 0 0 > tests/pbf/0-0-0-filter-mult-order.pbf.json.check
|
||||
cmp tests/pbf/0-0-0-filter-mult-order.pbf.json.check tests/pbf/0-0-0-filter-mult-order.pbf.json
|
||||
rm tests/pbf/0-0-0-filter-mult-order.pbf tests/pbf/0-0-0-filter-mult-order.pbf.json.check
|
||||
@@ -352,107 +434,21 @@ overzoom-test: tippecanoe-overzoom
|
||||
./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
|
||||
# Test filter with null attribute
|
||||
./tippecanoe-overzoom -j '{"*":["name","ni",[1,5,6,9]]}' -o tests/pbf/12-2145-1391-filter1.pbf tests/pbf/12-2145-1391.pbf 12/2145/1391 12/2145/1391
|
||||
./tippecanoe-decode tests/pbf/12-2145-1391-filter1.pbf 12 2145 1391 > tests/pbf/12-2145-1391-filter1.pbf.json.check
|
||||
cmp tests/pbf/12-2145-1391-filter1.pbf.json.check tests/pbf/12-2145-1391-filter1.pbf.json
|
||||
rm tests/pbf/12-2145-1391-filter1.pbf.json.check tests/pbf/12-2145-1391-filter1.pbf
|
||||
# Test filter with null attribute in "ni" list
|
||||
./tippecanoe-overzoom -j '{"*":["name","ni",[1,5,6,9,null]]}' -o tests/pbf/12-2145-1391-filter2.pbf tests/pbf/12-2145-1391.pbf 12/2145/1391 12/2145/1391
|
||||
./tippecanoe-decode tests/pbf/12-2145-1391-filter2.pbf 12 2145 1391 > tests/pbf/12-2145-1391-filter2.pbf.json.check
|
||||
cmp tests/pbf/12-2145-1391-filter2.pbf.json.check tests/pbf/12-2145-1391-filter2.pbf.json
|
||||
rm tests/pbf/12-2145-1391-filter2.pbf.json.check tests/pbf/12-2145-1391-filter2.pbf
|
||||
# Tiny polygon reduction
|
||||
./tippecanoe-overzoom --line-simplification=5 --tiny-polygon-size=50 -o tests/pbf/countries-0-0-0.pbf.out tests/pbf/countries-0-0-0.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-decode tests/pbf/countries-0-0-0.pbf.out 0 0 0 > tests/pbf/countries-0-0-0.pbf.out.json.check
|
||||
cmp tests/pbf/countries-0-0-0.pbf.out.json.check tests/pbf/countries-0-0-0.pbf.out.json
|
||||
rm tests/pbf/countries-0-0-0.pbf.out tests/pbf/countries-0-0-0.pbf.out.json.check
|
||||
# Clipping to bounding box
|
||||
./tippecanoe-overzoom --clip-bounding-box 5,5,25.7,50 -o tests/pbf/countries-0-0-0-clip.pbf.out tests/pbf/countries-0-0-0.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-decode tests/pbf/countries-0-0-0-clip.pbf.out 0 0 0 > tests/pbf/countries-0-0-0-clip.pbf.out.json.check
|
||||
cmp tests/pbf/countries-0-0-0-clip.pbf.out.json.check tests/pbf/countries-0-0-0-clip.pbf.out.json
|
||||
rm tests/pbf/countries-0-0-0-clip.pbf.out tests/pbf/countries-0-0-0-clip.pbf.out.json.check
|
||||
# Binning
|
||||
./tippecanoe-overzoom -o tests/pbf/bin-11-327-791.pbf.out --assign-to-bins tests/pbf/sf-zips.json tests/pbf/muni-11-327-791.pbf 11/327/791 11/327/791
|
||||
./tippecanoe-decode tests/pbf/bin-11-327-791.pbf.out 11 327 791 > tests/pbf/bin-11-327-791.pbf.out.json.check
|
||||
cmp tests/pbf/bin-11-327-791.pbf.out.json.check tests/pbf/bin-11-327-791.pbf.out.json
|
||||
rm tests/pbf/bin-11-327-791.pbf.out.json.check tests/pbf/bin-11-327-791.pbf.out
|
||||
# Binning by id
|
||||
./tippecanoe-overzoom -o tests/pbf/bin-11-327-791-ids.pbf.out --assign-to-bins tests/pbf/sf-zips.json --bin-by-id-list bin-ids tests/pbf/yearbuilt.pbf 11/327/791 11/327/791
|
||||
./tippecanoe-decode tests/pbf/bin-11-327-791-ids.pbf.out 11 327 791 > tests/pbf/bin-11-327-791-ids.pbf.out.json.check
|
||||
cmp tests/pbf/bin-11-327-791-ids.pbf.out.json.check tests/pbf/bin-11-327-791-ids.pbf.out.json
|
||||
rm tests/pbf/bin-11-327-791-ids.pbf.out.json.check tests/pbf/bin-11-327-791-ids.pbf.out
|
||||
# Binning by id, clipping by polygon
|
||||
./tippecanoe-overzoom -o tests/pbf/bin-11-327-791-ids-clip.pbf.out --clip-polygon='{"coordinates":[[[-122.4527379,37.8128815],[-122.4598853,37.7834743],[-122.4280914,37.7959397],[-122.4527379,37.8128815]]],"type":"Polygon"}' --assign-to-bins tests/pbf/sf-zips.json --bin-by-id-list bin-ids tests/pbf/yearbuilt.pbf 11/327/791 11/327/791
|
||||
./tippecanoe-decode tests/pbf/bin-11-327-791-ids-clip.pbf.out 11 327 791 > tests/pbf/bin-11-327-791-ids-clip.pbf.out.json.check
|
||||
cmp tests/pbf/bin-11-327-791-ids-clip.pbf.out.json.check tests/pbf/bin-11-327-791-ids-clip.pbf.out.json
|
||||
rm tests/pbf/bin-11-327-791-ids-clip.pbf.out.json.check tests/pbf/bin-11-327-791-ids-clip.pbf.out
|
||||
# Binning by id, clipping by polygon from file
|
||||
./tippecanoe-overzoom -o tests/pbf/bin-11-327-791-ids-clip.pbf.out --clip-polygon-file=tests/pbf/clip-poly.json --assign-to-bins tests/pbf/sf-zips.json --bin-by-id-list bin-ids tests/pbf/yearbuilt.pbf 11/327/791 11/327/791
|
||||
./tippecanoe-decode tests/pbf/bin-11-327-791-ids-clip.pbf.out 11 327 791 > tests/pbf/bin-11-327-791-ids-clip.pbf.out.json.check
|
||||
cmp tests/pbf/bin-11-327-791-ids-clip.pbf.out.json.check tests/pbf/bin-11-327-791-ids-clip.pbf.out.json
|
||||
rm tests/pbf/bin-11-327-791-ids-clip.pbf.out.json.check tests/pbf/bin-11-327-791-ids-clip.pbf.out
|
||||
# Binning by id, attribute stripping
|
||||
# Note that it still works even if we exclude the ID that we are binning by
|
||||
./tippecanoe-overzoom -yZCTA5CE10 -ytippecanoe:count -o tests/pbf/bin-11-327-791-ids-zip.pbf.out --assign-to-bins tests/pbf/sf-zips.json --bin-by-id-list bin-ids tests/pbf/yearbuilt.pbf 11/327/791 11/327/791
|
||||
./tippecanoe-decode tests/pbf/bin-11-327-791-ids-zip.pbf.out 11 327 791 > tests/pbf/bin-11-327-791-ids-zip.pbf.out.json.check
|
||||
cmp tests/pbf/bin-11-327-791-ids-zip.pbf.out.json.check tests/pbf/bin-11-327-791-ids-zip.pbf.out.json
|
||||
rm tests/pbf/bin-11-327-791-ids-zip.pbf.out.json.check tests/pbf/bin-11-327-791-ids-zip.pbf.out
|
||||
# Binning with longitude wraparound problems
|
||||
./tippecanoe-overzoom -o tests/pbf/0-0-0-pop-2-0-1.pbf.out --accumulate-numeric-attributes=tippecanoe --assign-to-bins tests/pbf/h3-2-0-1.geojson tests/pbf/0-0-0.pbf 2/0/1 2/0/1
|
||||
./tippecanoe-decode tests/pbf/0-0-0-pop-2-0-1.pbf.out 2 0 1 > tests/pbf/0-0-0-pop-2-0-1.pbf.out.json.check
|
||||
cmp tests/pbf/0-0-0-pop-2-0-1.pbf.out.json.check tests/pbf/0-0-0-pop-2-0-1.pbf.out.json
|
||||
rm tests/pbf/0-0-0-pop-2-0-1.pbf.out tests/pbf/0-0-0-pop-2-0-1.pbf.out.json.check
|
||||
./tippecanoe-overzoom -o tests/pbf/0-0-0-pop-1-1-0.pbf.out --accumulate-numeric-attributes=tippecanoe --assign-to-bins tests/pbf/h3-1-1-0.geojson tests/pbf/0-0-0.pbf 1/1/0 1/1/0
|
||||
./tippecanoe-decode tests/pbf/0-0-0-pop-1-1-0.pbf.out 1 1 0 > tests/pbf/0-0-0-pop-1-1-0.pbf.out.json.check
|
||||
cmp tests/pbf/0-0-0-pop-1-1-0.pbf.out.json.check tests/pbf/0-0-0-pop-1-1-0.pbf.out.json
|
||||
rm tests/pbf/0-0-0-pop-1-1-0.pbf.out tests/pbf/0-0-0-pop-1-1-0.pbf.out.json.check
|
||||
./tippecanoe-overzoom -o tests/pbf/0-0-0-pop-0-0-0.pbf.out --accumulate-numeric-attributes=tippecanoe --assign-to-bins tests/pbf/h3-0-0-0.geojson tests/pbf/0-0-0.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-decode tests/pbf/0-0-0-pop-0-0-0.pbf.out 0 0 0 > tests/pbf/0-0-0-pop-0-0-0.pbf.out.json.check
|
||||
cmp tests/pbf/0-0-0-pop-0-0-0.pbf.out.json.check tests/pbf/0-0-0-pop-0-0-0.pbf.out.json
|
||||
rm tests/pbf/0-0-0-pop-0-0-0.pbf.out tests/pbf/0-0-0-pop-0-0-0.pbf.out.json.check
|
||||
# Binning, clipping to bounding box
|
||||
./tippecanoe-overzoom --clip-bounding-box 88,67.5,138,78 -o tests/pbf/0-0-0-pop-1-1-0-clip.pbf.out --accumulate-numeric-attributes=tippecanoe --assign-to-bins tests/pbf/h3-1-1-0.geojson tests/pbf/0-0-0.pbf 1/1/0 1/1/0
|
||||
./tippecanoe-decode tests/pbf/0-0-0-pop-1-1-0-clip.pbf.out 1 1 0 > tests/pbf/0-0-0-pop-1-1-0-clip.pbf.out.json.check
|
||||
cmp tests/pbf/0-0-0-pop-1-1-0-clip.pbf.out.json.check tests/pbf/0-0-0-pop-1-1-0-clip.pbf.out.json
|
||||
rm tests/pbf/0-0-0-pop-1-1-0-clip.pbf.out tests/pbf/0-0-0-pop-1-1-0-clip.pbf.out.json.check
|
||||
# Verify fix for crash
|
||||
./tippecanoe-overzoom '-o' tests/10188-crash/out.pbf '-t' '3/2/2' '--assign-to-bins' 'tests/10188-crash/bins.json' '--bin-by-id-list' 'felt:bin_features' '-b5' 'tests/10188-crash/2-0-0.pbf' '2/0/0'
|
||||
rm tests/10188-crash/out.pbf
|
||||
# Polygon clipping
|
||||
./tippecanoe-overzoom -o tests/pbf/countries-1-1-0-clip.pbf --clip-polygon "`cat tests/pbf/region.json`" tests/pbf/countries-1-1-0.pbf 1/1/0 1/1/0
|
||||
./tippecanoe-decode tests/pbf/countries-1-1-0-clip.pbf 1 1 0 > tests/pbf/countries-1-1-0-clip.json.check
|
||||
cmp tests/pbf/countries-1-1-0-clip.json.check tests/pbf/countries-1-1-0-clip.json
|
||||
rm tests/pbf/countries-1-1-0-clip.pbf tests/pbf/countries-1-1-0-clip.json.check
|
||||
# LineString clipping
|
||||
./tippecanoe-overzoom -o tests/pbf/roads-1-1-0-clip.pbf --clip-polygon "`cat tests/pbf/region.json`" tests/pbf/roads-1-1-0.pbf 1/1/0 1/1/0
|
||||
./tippecanoe-decode tests/pbf/roads-1-1-0-clip.pbf 1 1 0 > tests/pbf/roads-1-1-0-clip.json.check
|
||||
cmp tests/pbf/roads-1-1-0-clip.json.check tests/pbf/roads-1-1-0-clip.json
|
||||
rm tests/pbf/roads-1-1-0-clip.pbf tests/pbf/roads-1-1-0-clip.json.check
|
||||
# Point clipping
|
||||
./tippecanoe-overzoom -o tests/pbf/places-1-1-0-clip.pbf --clip-polygon "`cat tests/pbf/region.json`" tests/pbf/places-1-1-0.pbf 1/1/0 1/1/0
|
||||
./tippecanoe-decode tests/pbf/places-1-1-0-clip.pbf 1 1 0 > tests/pbf/places-1-1-0-clip.json.check
|
||||
cmp tests/pbf/places-1-1-0-clip.json.check tests/pbf/places-1-1-0-clip.json
|
||||
rm tests/pbf/places-1-1-0-clip.pbf tests/pbf/places-1-1-0-clip.json.check
|
||||
# Polygon clipping, with excessively large clip region
|
||||
./tippecanoe-overzoom -b10 -o tests/pbf/countries-8-135-86-bigclip.pbf --clip-polygon "`cat tests/pbf/region.json`" tests/pbf/countries-1-1-0.pbf 1/1/0 8/135/86
|
||||
./tippecanoe-decode tests/pbf/countries-8-135-86-bigclip.pbf 8 135 86 > tests/pbf/countries-8-135-86-bigclip.json.check
|
||||
cmp tests/pbf/countries-8-135-86-bigclip.json.check tests/pbf/countries-8-135-86-bigclip.json
|
||||
rm tests/pbf/countries-8-135-86-bigclip.pbf tests/pbf/countries-8-135-86-bigclip.json.check
|
||||
# Clip region that does not intersect with the tile
|
||||
./tippecanoe-overzoom -o tests/pbf/squirrels-13-2413-3077-clip.pbf --clip-polygon-file tests/pbf/squirrels-clip.json tests/pbf/squirrels-13-2413-3077.pbf 13/2413/3077 13/2413/3077
|
||||
cmp tests/pbf/squirrels-13-2413-3077-clip.pbf /dev/null # clipped away
|
||||
rm tests/pbf/squirrels-13-2413-3077-clip.pbf
|
||||
# Deduplication by feature ID
|
||||
./tippecanoe -z0 -f -e tests/pbf/1.json.dir -l layer tests/pbf/1.json
|
||||
./tippecanoe -z0 -f -e tests/pbf/2.json.dir -l layer tests/pbf/2.json
|
||||
./tippecanoe-overzoom -o tests/pbf/merged-nodedup.pbf -t 0/0/0 tests/pbf/1.json.dir/0/0/0.pbf 0/0/0 tests/pbf/2.json.dir/0/0/0.pbf 0/0/0
|
||||
./tippecanoe-decode tests/pbf/merged-nodedup.pbf 0 0 0 > tests/pbf/merged-nodedup.pbf.json.check
|
||||
./tippecanoe-overzoom -b0 -o tests/pbf/merged-nodedup.pbf -t 1/1/0 tests/pbf/1.json.dir/0/0/0.pbf 0/0/0 tests/pbf/2.json.dir/0/0/0.pbf 0/0/0
|
||||
./tippecanoe-decode tests/pbf/merged-nodedup.pbf 1 1 0 > tests/pbf/merged-nodedup.pbf.json.check
|
||||
cmp tests/pbf/merged-nodedup.pbf.json.check tests/pbf/merged-nodedup.pbf.json
|
||||
./tippecanoe-overzoom --deduplicate-by-id -o tests/pbf/merged-dedup.pbf -t 0/0/0 tests/pbf/1.json.dir/0/0/0.pbf 0/0/0 tests/pbf/2.json.dir/0/0/0.pbf 0/0/0
|
||||
./tippecanoe-decode tests/pbf/merged-dedup.pbf 0 0 0 > tests/pbf/merged-dedup.pbf.json.check
|
||||
./tippecanoe-overzoom -b0 --deduplicate-by-id -o tests/pbf/merged-dedup.pbf -t 1/1/0 tests/pbf/1.json.dir/0/0/0.pbf 0/0/0 tests/pbf/2.json.dir/0/0/0.pbf 0/0/0
|
||||
./tippecanoe-decode tests/pbf/merged-dedup.pbf 1 1 0 > tests/pbf/merged-dedup.pbf.json.check
|
||||
cmp tests/pbf/merged-dedup.pbf.json.check tests/pbf/merged-dedup.pbf.json
|
||||
rm -r tests/pbf/1.json.dir tests/pbf/2.json.dir tests/pbf/merged-nodedup.pbf tests/pbf/merged-nodedup.pbf.json.check tests/pbf/merged-dedup.pbf.json.check
|
||||
rm -r tests/pbf/1.json.dir tests/pbf/2.json.dir tests/pbf/merged-nodedup.pbf tests/pbf/merged-nodedup.pbf.json.check tests/pbf/merged-dedup.pbf tests/pbf/merged-dedup.pbf.json.check
|
||||
|
||||
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"}'
|
||||
@@ -588,145 +584,6 @@ join-test: tippecanoe tippecanoe-decode tile-join
|
||||
./tippecanoe-decode -x generator tests/ne_110m_ocean/join/joined.mbtiles > tests/ne_110m_ocean/join/joined.mbtiles.json.check
|
||||
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
|
||||
#
|
||||
# Test sql join
|
||||
#
|
||||
./tile-join -i -f -o tests/join-sql/countries.pmtiles --join-sqlite tests/join-sql/countries.gpkg --join-table countries --join-tile-attribute ne10-admin0:name_en --join-table-expression 'lower(country)' tests/join-sql/bboxes.pmtiles
|
||||
./tippecanoe-decode -x generator tests/join-sql/countries.pmtiles > tests/join-sql/countries.pmtiles.json.check
|
||||
cmp tests/join-sql/countries.pmtiles.json.check tests/join-sql/countries.pmtiles.json
|
||||
rm -f tests/join-sql/countries.pmtiles tests/join-sql/countries.pmtiles.json.check
|
||||
#
|
||||
# Test sql join with limit
|
||||
#
|
||||
./tile-join --join-count-limit 3 -i -f -o tests/join-sql/countries-limit3.pmtiles --join-sqlite tests/join-sql/countries.gpkg --join-table countries --join-tile-attribute ne10-admin0:name_en --join-table-expression 'lower(country)' tests/join-sql/bboxes.pmtiles
|
||||
./tippecanoe-decode -x generator tests/join-sql/countries-limit3.pmtiles > tests/join-sql/countries-limit3.pmtiles.json.check
|
||||
cmp tests/join-sql/countries-limit3.pmtiles.json.check tests/join-sql/countries-limit3.pmtiles.json
|
||||
rm -f tests/join-sql/countries-limit3.pmtiles tests/join-sql/countries-limit3.pmtiles.json.check
|
||||
|
||||
accumulate-test:
|
||||
# there are 144 features with POP1950 in the original dataset
|
||||
test `grep '"POP1950": [0-9]' tests/ne_110m_populated_places_nulls/in.json | wc -l` == 144
|
||||
# and 99 without it
|
||||
test `grep '"POP1950": null' tests/ne_110m_populated_places_nulls/in.json | wc -l` == 99
|
||||
./tippecanoe -yNAME -yPOP1950 -yclustered:cluster_size -yclustered:unrelated -q -z3 -r1.75 -b0 -f -e tests/pbf/accum.dir --accumulate-numeric-attributes=clustered --set-attribute '{"clustered:cluster_size":1}' --accumulate-attribute '{"clustered:cluster_size":"sum"}' --retain-points-multiplier 3 tests/ne_110m_populated_places_nulls/in.json
|
||||
# at this drop rate, there are 61 points at z0 that have no POP1950s clustered onto them....
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep -v 'clustered:count:POP1950' | wc -l` == 61
|
||||
# 26 of which have no POP1950 at all
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep -v 'POP1950' | wc -l` == 26
|
||||
# 35 of which do have POP1950
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep -v 'clustered:count:POP1950' | grep 'POP1950' | wc -l` == 35
|
||||
# plus 60 that are clustered
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep 'clustered:count:POP1950' | wc -l` == 60
|
||||
# the 60 clustered POP1950s have a total count of 109
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep 'clustered:count:POP1950' | sed 's/.*"clustered:count:POP1950": //' | awk '{sum += $$1} END {print sum}'` == 109
|
||||
# we have already established that there are 36 bare POP1950s
|
||||
# which makes a total of 144, which is the total count expected
|
||||
#
|
||||
# meanwhile, regular attribute accumulation.
|
||||
# there are 121 features in the z0 tile, and they all have clustered:cluster_size
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep 'clustered:cluster_size' | wc -l` == 121
|
||||
# there are no features that lack it.
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep -v 'clustered:cluster_size' | wc -l` == 0
|
||||
# they add up to the 243 original features
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | sed 's/.*clustered:cluster_size": //' | awk '{sum += $$1} END {print sum}'` == 243
|
||||
# Make sure we do *not* accumulate a numeric attribute that already has the magic prefix:
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep sum:clustered:unrelated | wc -l` == 0
|
||||
# But that we *do* preserve those attributes into the output features:
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep clustered:unrelated | wc -l` == 61
|
||||
#
|
||||
# on to the sums:
|
||||
# in the original data set, the POP1950s that are present add up to 161590
|
||||
test `grep '"POP1950": [0-9]' tests/ne_110m_populated_places_nulls/in.json | sed 's/.*"POP1950": //' | awk '{sum += $$1} END {print sum}' ` == 161590
|
||||
# in the z0 tile, the clustered POP1950s add up to 116967
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep 'clustered:sum:POP1950' | sed 's/.*"clustered:sum:POP1950": //' | awk '{sum += $$1} END {print sum}'` == 116967
|
||||
# and the non-clustered ones add up to 44623
|
||||
test `./tippecanoe-decode -c tests/pbf/accum.dir/0/0/0.pbf 0 0 0 | grep -v 'clustered:sum:POP1950' | grep POP1950 | sed 's/.*"POP1950": //' | awk '{sum += $$1} END {print sum}'` == 44623
|
||||
# which is the correct 161590
|
||||
#
|
||||
# OK, so do these still hold after megatile filtering?
|
||||
./tippecanoe-overzoom --accumulate-numeric-attributes=clustered --accumulate-attribute '{"clustered:cluster_size":"sum"}' -m -o tests/pbf/accum-0-0-0.pbf tests/pbf/accum.dir/0/0/0.pbf 0/0/0 0/0/0
|
||||
# Now there are 40 features with POP1950 clusters
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep 'clustered:count:POP1950' | wc -l` == 40
|
||||
# There are 4 with bare POP1950
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep -v 'clustered:count:POP1950' | grep 'POP1950' | wc -l` == 4
|
||||
# And 2 with no POP1950 at all
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep -v 'POP1950' | wc -l` == 2
|
||||
# (which is the same as you get if you don't use -retain-points-multiplier when creating the tileset)
|
||||
#
|
||||
# the clustered and megatile-filtered POP1950s add up to 146370
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep 'clustered:sum:POP1950' | sed 's/.*"clustered:sum:POP1950": //' | awk '{sum += $$1} END {print sum}'` == 146370
|
||||
# the non-clustered but megatile-filtered POP1950s add up to 15220
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep -v 'clustered:sum:POP1950' | grep POP1950 | sed 's/.*"POP1950": //' | awk '{sum += $$1} END {print sum}'` == 15220
|
||||
# which add up to 161590 so we have the right global total
|
||||
# Make sure we do *not* accumulate a numeric attribute that already has the magic prefix:
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep sum:clustered:unrelated | wc -l` == 0
|
||||
# But that we *do* preserve those attributes into the output features:
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep clustered:unrelated | wc -l` == 22
|
||||
# the cluster sizes still add up to the 243 original features
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | sed 's/.*clustered:cluster_size": //' | awk '{sum += $$1} END {print sum}'` == 243
|
||||
#
|
||||
# We actually want to serve point tiles without the numeric accumulations,
|
||||
# but with cluster size, so test that combination:
|
||||
./tippecanoe-overzoom --accumulate-attribute '{"clustered:cluster_size":"sum"}' --exclude-prefix clustered:sum --exclude-prefix clustered:count --exclude-prefix clustered:min --exclude-prefix clustered:max --exclude-prefix clustered:mean -m -o tests/pbf/accum-0-0-0.pbf tests/pbf/accum.dir/0/0/0.pbf 0/0/0 0/0/0
|
||||
# There are no POP1950 clusters
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep 'clustered:count:POP1950' | wc -l` == 0
|
||||
# But there are still 28 with bare POP1950
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep -v 'clustered:count:POP1950' | grep 'POP1950' | wc -l` == 28
|
||||
# And 18 with no POP1950 at all
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | grep -v 'POP1950' | wc -l` == 18
|
||||
# which matches the 46 features that you get if you tile without --retain-points-multiplier.
|
||||
# the cluster sizes still add up to the 243 original features
|
||||
test `./tippecanoe-decode -c tests/pbf/accum-0-0-0.pbf 0 0 0 | sed 's/.*clustered:cluster_size": //' | awk '{sum += $$1} END {print sum}'` == 243
|
||||
#
|
||||
# Now on to binning!
|
||||
./tippecanoe-overzoom --assign-to-bins tests/pbf/h3-0-0-0.geojson --accumulate-numeric-attributes=clustered --accumulate-attribute '{"clustered:cluster_size":"sum"}' -o tests/pbf/bins-0-0-0.pbf tests/pbf/accum.dir/0/0/0.pbf 0/0/0 0/0/0
|
||||
# Now there are 30 bins with POP1950 clusters
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep 'clustered:count:POP1950' | wc -l` == 41
|
||||
# There are none with bare POP1950 (which is expected; we should only have summary statistics)
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep -v 'clustered:count:POP1950' | grep 'POP1950' | wc -l` == 0
|
||||
# And 4 with no POP1950 at all
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep -v 'POP1950' | wc -l` == 3
|
||||
#
|
||||
# the clustered and megatile-filtered and binned POP1950s add up to 161590
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep 'clustered:sum:POP1950' | sed 's/.*"clustered:sum:POP1950": //' | awk '{sum += $$1} END {print sum}'` == 161590
|
||||
# which is the right global total
|
||||
# Make sure we do *not* accumulate a numeric attribute that already has the magic prefix:
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep sum:clustered:unrelated | wc -l` == 0
|
||||
# And those attributes do *not* make it onto the bins
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep clustered:unrelated | wc -l` == 0
|
||||
# the cluster sizes still add up to the 243 original features
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | sed 's/.*clustered:cluster_size": //' | awk '{sum += $$1} END {print sum}'` == 243
|
||||
#
|
||||
# Binning with attribute stripping
|
||||
./tippecanoe-overzoom -y clustered:count:POP1950 -y clustered:sum:POP1950 -y POP1950 -y clustered:cluster_size --assign-to-bins tests/pbf/h3-0-0-0.geojson --accumulate-numeric-attributes=clustered --accumulate-attribute '{"clustered:cluster_size":"sum"}' -o tests/pbf/bins-0-0-0.pbf tests/pbf/accum.dir/0/0/0.pbf 0/0/0 0/0/0
|
||||
# Now there are 30 bins with POP1950 clusters
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep 'clustered:count:POP1950' | wc -l` == 41
|
||||
# There are none with bare POP1950 (which is expected; we should only have summary statistics)
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep -v 'clustered:count:POP1950' | grep 'POP1950' | wc -l` == 0
|
||||
# And 4 with no POP1950 at all
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep -v 'POP1950' | wc -l` == 3
|
||||
#
|
||||
# the clustered and megatile-filtered and binned POP1950s add up to 161590
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep 'clustered:sum:POP1950' | sed 's/.*"clustered:sum:POP1950": //' | awk '{sum += $$1} END {print sum}'` == 161590
|
||||
# which is the right global total
|
||||
# Make sure we do *not* accumulate a numeric attribute that already has the magic prefix:
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep sum:clustered:unrelated | wc -l` == 0
|
||||
# And those attributes do *not* make it onto the bins
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | grep clustered:unrelated | wc -l` == 0
|
||||
# the cluster sizes still add up to the 243 original features
|
||||
test `./tippecanoe-decode -c tests/pbf/bins-0-0-0.pbf 0 0 0 | sed 's/.*clustered:cluster_size": //' | awk '{sum += $$1} END {print sum}'` == 243
|
||||
#
|
||||
#
|
||||
# A tile where the counts and means were previously wrong:
|
||||
./tippecanoe-overzoom --accumulate-numeric-attributes=felt -m -o tests/pbf/yearbuilt-accum.pbf tests/pbf/yearbuilt.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-decode tests/pbf/yearbuilt-accum.pbf 0 0 0 > tests/pbf/yearbuilt-accum.pbf.json.check
|
||||
cmp tests/pbf/yearbuilt-accum.pbf.json.check tests/pbf/yearbuilt-accum.pbf.json
|
||||
rm tests/pbf/yearbuilt-accum.pbf tests/pbf/yearbuilt-accum.pbf.json.check
|
||||
# Same tile, with attribute stripping
|
||||
./tippecanoe-overzoom --accumulate-numeric-attributes=felt -y bldgsqft -y felt:sum:bldgsqft -m -o tests/pbf/yearbuilt-accum-bldgsqft.pbf tests/pbf/yearbuilt.pbf 0/0/0 0/0/0
|
||||
./tippecanoe-decode tests/pbf/yearbuilt-accum-bldgsqft.pbf 0 0 0 > tests/pbf/yearbuilt-accum-bldgsqft.pbf.json.check
|
||||
cmp tests/pbf/yearbuilt-accum-bldgsqft.pbf.json.check tests/pbf/yearbuilt-accum-bldgsqft.pbf.json
|
||||
rm tests/pbf/yearbuilt-accum-bldgsqft.pbf tests/pbf/yearbuilt-accum-bldgsqft.pbf.json.check
|
||||
|
||||
join-filter-test: tippecanoe tippecanoe-decode tile-join
|
||||
# Comes out different from the direct tippecanoe run because null attributes are lost
|
||||
@@ -797,6 +654,12 @@ csv-test: tippecanoe tippecanoe-decode
|
||||
cmp tests/csv/out.mbtiles.json.check tests/csv/out.mbtiles.json
|
||||
rm -f tests/csv/out.mbtiles.json.check tests/csv/out.mbtiles
|
||||
|
||||
flatgeobuf-test: tippecanoe tippecanoe-decode
|
||||
./tippecanoe -q -f -z0 -l numeric-properties -o tests/flatgeobuf/numeric-properties.mbtiles tests/flatgeobuf/numeric-properties.fgb
|
||||
./tippecanoe-decode tests/flatgeobuf/numeric-properties.mbtiles 0 0 0 > tests/flatgeobuf/numeric-properties.json.check
|
||||
cmp tests/flatgeobuf/numeric-properties.json.check tests/flatgeobuf/numeric-properties.json
|
||||
rm -f tests/flatgeobuf/numeric-properties.mbtiles tests/flatgeobuf/numeric-properties.json.check
|
||||
|
||||
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"}'
|
||||
|
||||
@@ -20,11 +20,11 @@ the density and texture of the data rather than a simplification from dropping
|
||||
supposedly unimportant features or clustering or aggregating them.
|
||||
|
||||
If you give it all of OpenStreetMap and zoom out, it should give you back
|
||||
something that looks like "[All Streets](http://benfry.com/allstreets/map5.html)"
|
||||
something that looks like "[All Streets](https://benfry.com/allstreets/)"
|
||||
rather than something that looks like an Interstate road atlas.
|
||||
|
||||
If you give it all the building footprints in Los Angeles and zoom out
|
||||
far enough that most individual buildings are no longer discernable, you
|
||||
far enough that most individual buildings are no longer discernible, you
|
||||
should still be able to see the extent and variety of development in every neighborhood,
|
||||
not just the largest downtown buildings.
|
||||
|
||||
@@ -57,8 +57,8 @@ compiler errors.
|
||||
Usage
|
||||
-----
|
||||
|
||||
```sh
|
||||
$ tippecanoe -o file.mbtiles [options] [file.json file.json.gz file.fgb ...]
|
||||
```
|
||||
$ tippecanoe -o file.mbtiles [options] [file.json file.json.gz file.fgb file.csv ...]
|
||||
```
|
||||
|
||||
If no files are specified, it reads GeoJSON from the standard input.
|
||||
@@ -99,7 +99,7 @@ $ tippecanoe -o alameda.mbtiles -l alameda -n "Alameda County from TIGER" -z13 t
|
||||
Create a tileset of all TIGER roads, at only zoom level 12, but with higher detail than normal,
|
||||
with a custom layer name and description, and leaving out the `LINEARID` and `RTTYP` attributes:
|
||||
|
||||
```
|
||||
```sh
|
||||
$ cat tiger/tl_2014_*_roads.json | tippecanoe -o tiger.mbtiles -l roads -n "All TIGER roads, one zoom" -z12 -Z12 -d14 -x LINEARID -x RTTYP
|
||||
```
|
||||
|
||||
@@ -108,7 +108,7 @@ Cookbook
|
||||
|
||||
### Linear features (world railroads), visible at all zoom levels
|
||||
|
||||
```
|
||||
```sh
|
||||
curl -L -O https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_railroads.zip
|
||||
unzip ne_10m_railroads.zip
|
||||
ogr2ogr -f GeoJSON ne_10m_railroads.geojson ne_10m_railroads.shp
|
||||
@@ -122,7 +122,7 @@ tippecanoe -zg -o ne_10m_railroads.mbtiles --drop-densest-as-needed --extend-zoo
|
||||
|
||||
### Discontinuous polygon features (buildings of Rhode Island), visible at all zoom levels
|
||||
|
||||
```
|
||||
```sh
|
||||
curl -L -O https://usbuildingdata.blob.core.windows.net/usbuildings-v1-1/RhodeIsland.zip
|
||||
unzip RhodeIsland.zip
|
||||
|
||||
@@ -135,7 +135,7 @@ tippecanoe -zg -o RhodeIsland.mbtiles --drop-densest-as-needed --extend-zooms-if
|
||||
|
||||
### Continuous polygon features (states and provinces), visible at all zoom levels
|
||||
|
||||
```
|
||||
```sh
|
||||
curl -L -O https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_1_states_provinces.zip
|
||||
unzip -o ne_10m_admin_1_states_provinces.zip
|
||||
ogr2ogr -f GeoJSON ne_10m_admin_1_states_provinces.geojson ne_10m_admin_1_states_provinces.shp
|
||||
@@ -149,7 +149,7 @@ tippecanoe -zg -o ne_10m_admin_1_states_provinces.mbtiles --coalesce-densest-as-
|
||||
|
||||
### Large point dataset (GPS bus locations), for visualization at all zoom levels
|
||||
|
||||
```
|
||||
```sh
|
||||
curl -L -O ftp://avl-data.sfmta.com/avl_data/avl_raw/sfmtaAVLRawData01012013.csv
|
||||
sed 's/PREDICTABLE.*/PREDICTABLE/' sfmtaAVLRawData01012013.csv > sfmta.csv
|
||||
tippecanoe -zg -o sfmta.mbtiles --drop-densest-as-needed --extend-zooms-if-still-dropping sfmta.csv
|
||||
@@ -163,7 +163,7 @@ tippecanoe -zg -o sfmta.mbtiles --drop-densest-as-needed --extend-zooms-if-still
|
||||
|
||||
### Clustered points (world cities), summing the clustered population, visible at all zoom levels
|
||||
|
||||
```
|
||||
```sh
|
||||
curl -L -O https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip
|
||||
unzip -o ne_10m_populated_places.zip
|
||||
ogr2ogr -f GeoJSON ne_10m_populated_places.geojson ne_10m_populated_places.shp
|
||||
@@ -178,7 +178,7 @@ tippecanoe -zg -o ne_10m_populated_places.mbtiles -r1 --cluster-distance=10 --ac
|
||||
|
||||
### Show countries at low zoom levels but states at higher zoom levels
|
||||
|
||||
```
|
||||
```sh
|
||||
curl -L -O https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip
|
||||
unzip ne_10m_admin_0_countries.zip
|
||||
ogr2ogr -f GeoJSON ne_10m_admin_0_countries.geojson ne_10m_admin_0_countries.shp
|
||||
@@ -206,7 +206,7 @@ States and Provinces:
|
||||
|
||||
### Represent multiple sources (Illinois and Indiana counties) as separate layers
|
||||
|
||||
```
|
||||
```sh
|
||||
curl -L -O https://www2.census.gov/geo/tiger/TIGER2010/COUNTY/2010/tl_2010_17_county10.zip
|
||||
unzip tl_2010_17_county10.zip
|
||||
ogr2ogr -f GeoJSON tl_2010_17_county10.geojson tl_2010_17_county10.shp
|
||||
@@ -224,7 +224,7 @@ tippecanoe -zg -o counties-separate.mbtiles --coalesce-densest-as-needed --exten
|
||||
|
||||
### Merge multiple sources (Illinois and Indiana counties) into the same layer
|
||||
|
||||
```
|
||||
```sh
|
||||
curl -L -O https://www2.census.gov/geo/tiger/TIGER2010/COUNTY/2010/tl_2010_17_county10.zip
|
||||
unzip tl_2010_17_county10.zip
|
||||
ogr2ogr -f GeoJSON tl_2010_17_county10.geojson tl_2010_17_county10.shp
|
||||
@@ -242,7 +242,7 @@ As above, but
|
||||
|
||||
### Selectively remove and replace features (Census tracts) to update a tileset
|
||||
|
||||
```
|
||||
```sh
|
||||
# Retrieve and tile California 2000 Census tracts
|
||||
curl -L -O https://www2.census.gov/geo/tiger/TIGER2010/TRACT/2000/tl_2010_06_tract00.zip
|
||||
unzip tl_2010_06_tract00.zip
|
||||
@@ -291,6 +291,11 @@ If your features have a lot of attributes, use `-y` to keep only the ones you re
|
||||
|
||||
If your input is formatted as newline-delimited GeoJSON, use `-P` to make input parsing a lot faster.
|
||||
|
||||
Many of the options below have a short form beginning with `-a` or `-p`. These are the
|
||||
`-a`_letters_ (`--additional=`_letters_) and `-p`_letters_ (`--prevent=`_letters_) options, and each
|
||||
accepts several letters at once, so for example `-ansd` is the same as `-an -as -ad`
|
||||
and `-pkC` is the same as `-pk -pC`.
|
||||
|
||||
### Output tileset
|
||||
|
||||
* `-o` _file_`.mbtiles`, _file_`.pmtiles` or `--output=`_file_`.mbtiles`: Name the output file.
|
||||
@@ -301,9 +306,9 @@ If your input is formatted as newline-delimited GeoJSON, use `-P` to make input
|
||||
|
||||
### Tileset description and attribution
|
||||
|
||||
* `-n` _name_ or `--name=`_name_: Human-readable name for the tileset (default file.json)
|
||||
* `-n` _name_ or `--name=`_name_: Human-readable name for the tileset (default: the name of the output file or directory)
|
||||
* `-A` _text_ or `--attribution=`_text_: Attribution (HTML) to be shown with maps that use data from this tileset.
|
||||
* `-N` _description_ or `--description=`_description_: Description for the tileset (default file.mbtiles)
|
||||
* `-N` _description_ or `--description=`_description_: Description for the tileset (default: the name of the output file or directory)
|
||||
|
||||
### Input files and layer names
|
||||
|
||||
@@ -316,11 +321,11 @@ If your input is formatted as newline-delimited GeoJSON, use `-P` to make input
|
||||
* `-L` _name_`:`_file.json_ or `--named-layer=`_name_`:`_file.json_: Specify layer names for individual files. If your shell supports it, you can use a subshell redirect like `-L` _name_`:<(cat dir/*.json)` to specify a layer name for the output of streamed input.
|
||||
* `-L{`_layer-json_`}` or `--named-layer={`_layer-json_`}`: Specify an input file and layer options by a JSON object. The JSON object must contain a `"file"` key to specify the filename to read from. (If the `"file"` key is an empty string, it means to read from the standard input stream.) It may also contain a `"layer"` field to specify the name of the layer, and/or a `"description"` field to specify the layer's description in the tileset metadata, and/or a `"format"` field to specify `csv` or `fgb` file format if it is not obvious from the `name`. Example:
|
||||
|
||||
```
|
||||
```sh
|
||||
tippecanoe -z5 -o world.mbtiles -L'{"file":"ne_10m_admin_0_countries.json", "layer":"countries", "description":"Natural Earth countries"}'
|
||||
```
|
||||
|
||||
CSV input files currently support only Point geometries, from columns named `latitude`, `longitude`, `lat`, `lon`, `long`, `lng`, `x`, or `y`.
|
||||
CSV input files currently support only Point geometries, from columns named `lat`, `lon`, `long`, `lng`, `x`, or `y`, or from any column whose name contains `latitude` or `longitude`. Column names are matched without regard to case.
|
||||
|
||||
### Parallel processing of input
|
||||
|
||||
@@ -352,7 +357,7 @@ Parallel processing will also be automatic if the input file is in FlatGeobuf fo
|
||||
specified maximum zoom and to any levels added beyond that.
|
||||
* `--extend-zooms-if-still-dropping-maximum=`_count_: Increase the maxzoom if features are still being dropped at that zoom level
|
||||
by up to _count_ zoom levels.
|
||||
* `-at` or `--generate-variable-depth-tile-pyramid`: Don't produce child tiles for any tile that should be sufficient to be overzoomed to any higher zoom level. Such tiles will be produced with maximum detail and no simplification or polygon cleaning. Tiles with point features below the basezoom or where any features have to be dropped dynamically, or which contain too many features or bytes with full detail, will be written out with normal detail and split into child tiles. Tilesets generated with this option are suitable for use only with tile servers that will find the appropriate tile to overzoom from and will simplify and clean the geometries appropriately before serving the tile.
|
||||
* `-at` or `--generate-variable-depth-tile-pyramid`: Don't produce child tiles for any tile that should be sufficient to be overzoomed to any higher zoom level. Such tiles will be produced with maximum detail, retaining every vertex that is not collinear with its neighbors, but their polygons are still cleaned so that overlapping areas are merged rather than left stacked. Tiles with point features below the basezoom, or which contain too many features or bytes with full detail, will be written out with normal detail and split into child tiles. If any features have to be dropped dynamically at a zoom level, no tile in that zoom level is truncated, so that the whole zoom level is reduced consistently; any tile that was already being skipped because an ancestor had been truncated is written out after all. Tilesets generated with this option are suitable for use only with tile servers that will find the appropriate tile to overzoom from and will simplify the geometries appropriately before serving the tile.
|
||||
* `-R` _zoom_`/`_x_`/`_y_ or `--one-tile=`_zoom_`/`_x_`/`_y_: Set the minzoom and maxzoom to _zoom_ and produce only
|
||||
the single specified tile at that zoom level.
|
||||
|
||||
@@ -415,8 +420,9 @@ be reduced to the maximum that can be used with the specified _maxzoom_.
|
||||
* `-Y`_attribute_`:`_description_ or `--attribute-description=`_attribute_`:`_description_: Set the `description` for the specified attribute in the tileset metadata to _description_ instead of the usual `String`, `Number`, or `Boolean`.
|
||||
* `-E`_attribute_`:`_operation_ or `--accumulate-attribute=`_attribute_`:`_operation_: Preserve the named _attribute_ from features
|
||||
that are dropped, coalesced-as-needed, or clustered. The _operation_ may be
|
||||
`sum`, `product`, `mean`, `max`, `min`, `concat`, or `comma`
|
||||
`sum`, `product`, `mean`, `max`, `min`, `concat`, `comma`, or `count`
|
||||
to specify how the named _attribute_ is accumulated onto the attribute of the same name in a feature that does survive.
|
||||
(The `count` operation replaces the attribute with the number of features, including the survivor, that carried it.)
|
||||
The attributes and operations may also be specified as JSON keys and values: `--accumulate-attribute='{"attr": "operation", "attr2": "operation2"}'`.
|
||||
* `--set-attribute` _attribute_`:`_value_: Set the value of the specified _attribute_ in each feature to the specified _value_. This is mostly useful to give an attribute in each feature an initial value for `--accumulate-attribute`.
|
||||
The attributes and values may also be specified as JSON keys and values: `--set-attribute='{"attr": value, "attr2": value}'`.
|
||||
@@ -433,20 +439,20 @@ be reduced to the maximum that can be used with the specified _maxzoom_.
|
||||
|
||||
Example: to find the Natural Earth countries with low `scalerank` but high `LABELRANK`:
|
||||
|
||||
```
|
||||
```sh
|
||||
tippecanoe -z5 -o filtered.mbtiles -j '{ "ne_10m_admin_0_countries": [ "all", [ "<", "scalerank", 3 ], [ ">", "LABELRANK", 5 ] ] }' ne_10m_admin_0_countries.geojson
|
||||
```
|
||||
|
||||
Example: to retain only major TIGER roads at low zoom levels:
|
||||
|
||||
```
|
||||
```sh
|
||||
tippecanoe -o roads.mbtiles -j '{ "*": [ "any", [ ">=", "$zoom", 11 ], [ "in", "MTFCC", "S1100", "S1200" ] ] }' tl_2015_06001_roads.json
|
||||
```
|
||||
|
||||
Tippecanoe also accepts expressions of the form `[ "attribute-filter", name, expression ]`, to filter individual feature attributes
|
||||
instead of entire features. For example, you can exclude the road names at low zoom levels by doing
|
||||
|
||||
```
|
||||
```sh
|
||||
tippecanoe -o roads.mbtiles -j '{ "*": [ "attribute-filter", "FULLNAME", [ ">=", "$zoom", 9 ] ] }' tl_2015_06001_roads.json
|
||||
```
|
||||
|
||||
@@ -466,27 +472,30 @@ 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. The `--tile-size-limit` will also be extended at low zoom levels to allow for the multiplied features.
|
||||
* `--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. The maximum tile size (`--maximum-tile-bytes`) will also be extended at low zoom levels to allow for the multiplied features.
|
||||
* `--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.
|
||||
* `--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.
|
||||
* `-al` or `--drop-lines`: Let "dot" dropping at lower zooms apply to lines too
|
||||
* `-ap` or `--drop-polygons`: Let "dot" dropping at lower zooms apply to polygons too
|
||||
* `-K` _distance_ or `--cluster-distance=`_distance_: Cluster points (as with `--cluster-densest-as-needed`, but without the experimental discovery process) that are approximately within _distance_ of each other. The units are tile coordinates within a nominally 256-pixel tile, so the maximum value of 255 allows only one feature per tile. Values around 10 are probably appropriate for typical marker sizes. See `--cluster-densest-as-needed` below for behavior.
|
||||
* `-k` _zoom_ or `--cluster-maxzoom=`_zoom_: Max zoom on which to cluster points if clustering is enabled.
|
||||
* `-kg` or `--cluster-maxzoom=g`: Set `--cluster-maxzoom=` to `maxzoom - 1` so that all features are visible at the maximum zoom level.
|
||||
* `--preserve-point-density-threshold=`_level_: At the low zoom levels, do not reduce point density below the specified _level_, even if the specfied drop rate would normally call for it, so that low-density areas of the map do not appear blank. The unit is the distance between preserved points, as a fraction of the size of a tile. Values of 32 or 64 are probably appropriate for typical marker sizes.
|
||||
* `--preserve-point-density-threshold=`_level_: At the low zoom levels, do not reduce point density below the specified _level_, even if the specified drop rate would normally call for it, so that low-density areas of the map do not appear blank. The unit is the distance between preserved points, as a fraction of the size of a tile. Values of 32 or 64 are probably appropriate for typical marker sizes.
|
||||
* `--preserve-multiplier-density-threshold=`_level_: As with `--preserve-point-density-threshold`, but for the additional features retained by `--retain-points-multiplier`: features that would otherwise be dropped are instead added to the multiplier cluster if they are farther than the specified _level_ from the previous retained feature, so that sparse areas still have features available to be thinned to. The unit is the same as for `--preserve-point-density-threshold`.
|
||||
|
||||
### Dropping a fraction of features to keep under tile size limits
|
||||
|
||||
* `-as` or `--drop-densest-as-needed`: If a tile is too large, try to reduce it to under 500K by increasing the minimum spacing between features. The discovered spacing applies to the entire zoom level.
|
||||
* `-ad` or `--drop-fraction-as-needed`: Dynamically drop some fraction of features from each zoom level to keep large tiles under the 500K size limit. (This is like `-pd` but applies to the entire zoom level, not to each tile.)
|
||||
* `-an` or `--drop-smallest-as-needed`: Dynamically drop the smallest features (physically smallest: the shortest lines or the smallest polygons) from each zoom level to keep large tiles under the 500K size limit.
|
||||
* `--drop-by-attribute-as-needed=`_attribute_: Dynamically drop features with the lowest values of the specified numeric _attribute_ from each zoom level to keep large tiles under the 500K size limit. Use `--drop-by-attribute-order=desc` to instead drop features with the highest values.
|
||||
* `-aN` or `--coalesce-smallest-as-needed`: Dynamically combine the smallest features (physically smallest: the shortest lines or the smallest polygons or the densest points) from each zoom level into other nearby features to keep large tiles under the 500K size limit. This option will probably not help very much with LineStrings. It is mostly intended for polygons, to maintain the full original area covered by polygons while still reducing the feature count somehow. The attributes of the small polygons are *not* preserved into the combined features (except through `--accumulate-attribute`), only their geometry. Furthermore, the polygons to which nested polygons are coalesced may not necessarily be the immediately enclosing features.
|
||||
* `-aD` or `--coalesce-densest-as-needed`: Dynamically combine the densest features from each zoom level into other nearby features to keep large tiles under the 500K size limit. (Again, mostly useful for polygons.)
|
||||
* `-aS` or `--coalesce-fraction-as-needed`: Dynamically combine a fraction of features from each zoom level into other nearby features to keep large tiles under the 500K size limit. (Again, mostly useful for polygons.)
|
||||
* `-aS` or `--coalesce-densest-as-needed`: Dynamically combine the densest features from each zoom level into other nearby features to keep large tiles under the 500K size limit. (Again, mostly useful for polygons.)
|
||||
* `-aD` or `--coalesce-fraction-as-needed`: Dynamically combine a fraction of features from each zoom level into other nearby features to keep large tiles under the 500K size limit. (Again, mostly useful for polygons.)
|
||||
* `-pd` or `--force-feature-limit`: Dynamically drop some fraction of features from large tiles to keep them under the 500K size limit. It will probably look ugly at the tile boundaries. (This is like `-ad` but applies to each tile individually, not to the entire zoom level.) You probably don't want to use this.
|
||||
* `-aC` or `--cluster-densest-as-needed`: If a tile is too large, try to reduce its size by increasing the minimum spacing between features, and leaving one placeholder feature from each group. The remaining feature will be given a `"clustered": true` attribute to indicate that it represents a cluster, a `"point_count"` attribute to indicate the number of features that were clustered into it, and a `"sqrt_point_count"` attribute to indicate the relative width of a feature to represent the cluster. If the features being clustered are points, the representative feature will be located at the average of the original points' locations; otherwise, one of the original features will be left as the representative.
|
||||
* `-aC` or `--cluster-densest-as-needed`: If a tile is too large, try to reduce its size by increasing the minimum spacing between features, and leaving one placeholder feature from each group. The remaining feature will be given a `"clustered": true` attribute to indicate that it represents a cluster, a `"point_count"` attribute to indicate the number of features that were clustered into it, a `"point_count_abbreviated"` attribute containing that count abbreviated for display (for example `1.2k` or `15k`), and a `"sqrt_point_count"` attribute to indicate the relative width of a feature to represent the cluster. If the features being clustered are points, the representative feature will be located at the average of the original points' locations (unless you use `--keep-point-cluster-position`); otherwise, one of the original features will be left as the representative.
|
||||
* `-aa` or `--keep-point-cluster-position`: When clustering points, leave the representative feature at the location of the first point of the cluster instead of moving it to the average of the clustered points' locations.
|
||||
|
||||
### Dropping tightly overlapping features
|
||||
|
||||
@@ -500,15 +509,16 @@ 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 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`.
|
||||
* `-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. Polygons in the same layer are also snap-rounded to tile coordinates consistently with each other, so that the borders they share are snapped identically and do not leave gaps or overlaps between them. 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.
|
||||
* `--no-spindle-preservation`: Don't preserve the narrow parts of polygons. Normally, parts of polygons that are too narrow to survive being rounded to tile coordinates (like a buffer of a few meters around a long road or river) are kept as continuous lines of polygon one pixel wide, and long, narrow polygons are kept as polygons rather than being combined into tiny-polygon squares. A polygon that still collapses away entirely is replaced by a line one pixel wide along its outline, rather than by a rectangle with its area. With this option, they are allowed to collapse away, which leaves them as scattered fragments wherever the rounding happens to keep their two sides apart. With `--no-simplification-of-shared-nodes`, narrow parts are not preserved where that would make them overlap a neighboring feature that shares a border with them, like a panhandle between two other political units, and a polygon that collapses away entirely and only borders other features is left out rather than replaced, so that features that tile exactly continue to do so.
|
||||
* `-av` or `--visvalingam`: Use Visvalingam's simplification algorithm rather than Douglas-Peucker's.
|
||||
|
||||
### Attempts to improve shared polygon boundaries
|
||||
|
||||
* `-ab` or `--detect-shared-borders`: DEPRECATED. In the manner of [TopoJSON](https://github.com/mbostock/topojson/wiki/Introduction), detect borders that are shared between multiple polygons and simplify them identically in each polygon. This takes more time and memory than considering each polygon individually. Use `no-simplification-of-shared-nodes` instead, which is faster and more correct.
|
||||
* `-ab` or `--detect-shared-borders`: DEPRECATED. In the manner of [TopoJSON](https://github.com/mbostock/topojson/wiki/Introduction), detect borders that are shared between multiple polygons and simplify them identically in each polygon. This takes more time and memory than considering each polygon individually. Use `--no-simplification-of-shared-nodes` instead, which is faster and more correct.
|
||||
* `-aL` or `--grid-low-zooms`: At all zoom levels below _maxzoom_, snap all lines and polygons to a stairstep grid instead of allowing diagonals. You will also want to specify a tile resolution, probably `-D8`. This option provides a way to display continuous parcel, gridded, or binned data at low zooms without overwhelming the tiles with tiny polygons, since features will either get stretched out to the grid unit or lost entirely, depending on how they happened to be aligned in the original data. You probably don't want to use this.
|
||||
|
||||
### Controlling clipping to tile boundaries
|
||||
@@ -567,9 +577,16 @@ the same layer, enclose them in an `all` expression so they will all be evaluate
|
||||
* `-q` or `--quiet`: Work quietly instead of reporting progress or warning messages
|
||||
* `-Q` or `--no-progress-indicator`: Don't report progress, but still give warnings
|
||||
* `-U` _seconds_ or `--progress-interval=`_seconds_: Don't report progress more often than the specified number of _seconds_.
|
||||
* `-u` or `--json-progress`: like `-quiet` but logs progress as a JSON object. Use in combination with `-U`.
|
||||
* `-u` or `--json-progress`: like `--quiet` but logs progress as a JSON object. Use in combination with `-U`.
|
||||
|
||||
### Version
|
||||
|
||||
* `-v` or `--version`: Report Tippecanoe's version number
|
||||
|
||||
### Help
|
||||
|
||||
* `-H` or `--help`: List the available options and exit
|
||||
|
||||
### Filters
|
||||
|
||||
* `-C` _command_ or `--prefilter=`_command_: Specify a shell filter command to be run at the start of assembling each tile
|
||||
@@ -597,7 +614,7 @@ contain `index`, `sequence`, `extent`, and `dropped`, elements, which must be pa
|
||||
* Make a tileset of the Natural Earth countries to zoom level 5, and also copy the GeoJSON features
|
||||
to files in a `tiles/z/x/y.geojson` directory hierarchy.
|
||||
|
||||
```
|
||||
```sh
|
||||
tippecanoe -o countries.mbtiles -z5 -C 'mkdir -p tiles/$1/$2; tee tiles/$1/$2/$3.geojson' ne_10m_admin_0_countries.json
|
||||
```
|
||||
|
||||
@@ -605,13 +622,13 @@ tippecanoe -o countries.mbtiles -z5 -C 'mkdir -p tiles/$1/$2; tee tiles/$1/$2/$3
|
||||
intersect the [bounding box of Germany](https://www.flickr.com/places/info/23424829).
|
||||
(The `limit-tiles-to-bbox` script is [in the Tippecanoe source directory](filters/limit-tiles-to-bbox).)
|
||||
|
||||
```
|
||||
```sh
|
||||
tippecanoe -o countries.mbtiles -z5 -C './filters/limit-tiles-to-bbox 5.8662 47.2702 15.0421 55.0581 $*' ne_10m_admin_0_countries.json
|
||||
```
|
||||
|
||||
* Make a tileset of TIGER roads in Tippecanoe County, leaving out all but primary and secondary roads (as [classified by TIGER](https://www.census.gov/geo/reference/mtfcc.html)) below zoom level 11.
|
||||
|
||||
```
|
||||
```sh
|
||||
tippecanoe -o roads.mbtiles -c 'if [ $1 -lt 11 ]; then grep "\"MTFCC\": \"S1[12]00\""; else cat; fi' tl_2016_18157_roads.json
|
||||
```
|
||||
|
||||
@@ -628,7 +645,7 @@ Tippecanoe defines a GeoJSON extension that you can use to specify the minimum a
|
||||
at which an individual feature will be included in the vector tileset being produced.
|
||||
If you have a feature like this:
|
||||
|
||||
```
|
||||
```json
|
||||
{
|
||||
"type" : "Feature",
|
||||
"tippecanoe" : { "maxzoom" : 9, "minzoom" : 4 },
|
||||
@@ -640,7 +657,7 @@ If you have a feature like this:
|
||||
}
|
||||
```
|
||||
|
||||
with a `tippecanoe` object specifiying a `maxzoom` of 9 and a `minzoom` of 4, the feature
|
||||
with a `tippecanoe` object specifying a `maxzoom` of 9 and a `minzoom` of 4, the feature
|
||||
will only appear in the vector tiles for zoom levels 4 through 9. Note that the `tippecanoe`
|
||||
object belongs to the Feature, not to its `properties`. If you specify a `minzoom` for a feature,
|
||||
it will be preserved down to that zoom level even if dot-dropping with `-r` would otherwise have
|
||||
@@ -649,7 +666,7 @@ dropped it.
|
||||
You can also specify a layer name in the `tippecanoe` object, which will take precedence over
|
||||
the filename or name specified using `--layer`, like this:
|
||||
|
||||
```
|
||||
```json
|
||||
{
|
||||
"type" : "Feature",
|
||||
"tippecanoe" : { "layer" : "streets" },
|
||||
@@ -673,11 +690,11 @@ Geometric simplifications
|
||||
At every zoom level, line and polygon features are subjected to Douglas-Peucker
|
||||
simplification to the resolution of the tile.
|
||||
|
||||
For point features, it drops 1/2.5 of the dots for each zoom level above the
|
||||
For point features, it keeps only 1/2.5 of the dots for each zoom level below the
|
||||
point base zoom (which is normally the same as the `-z` max zoom, but can be
|
||||
a different zoom specified with `-B` if you have precise but sparse data).
|
||||
I don't know why 2.5 is the appropriate number, but the densities of many different
|
||||
data sets fall off at about this same rate. You can use -r to specify a different rate.
|
||||
data sets fall off at about this same rate. You can use `-r` to specify a different rate.
|
||||
|
||||
You can use the gamma option to thin out especially dense clusters of points.
|
||||
For any area where dots are closer than one pixel together (at whatever zoom level),
|
||||
@@ -703,8 +720,13 @@ lower resolutions before failing if it still doesn't fit.
|
||||
Development
|
||||
-----------
|
||||
|
||||
Requires sqlite3 and zlib (should already be installed on MacOS). Rebuilding the manpage
|
||||
uses md2man (`gem install md2man`).
|
||||
Requires sqlite3 and zlib (should already be installed on MacOS).
|
||||
|
||||
The manpage is generated from this README by `make docs`, which uses
|
||||
[go-md2man](https://github.com/cpuguy83/go-md2man) (`brew install go-md2man` or
|
||||
`apt-get install go-md2man`). You don't have to run it yourself: CI regenerates the
|
||||
manpage and fails if the committed copy doesn't match, so it will tell you if an
|
||||
edit here needs `make docs` run against it.
|
||||
|
||||
Linux:
|
||||
|
||||
@@ -718,15 +740,16 @@ and perhaps
|
||||
|
||||
make install
|
||||
|
||||
Tippecanoe now requires features from the 2011 C++ standard. If your compiler is older than
|
||||
that, you will need to install a newer one. On MacOS, updating to the lastest XCode should
|
||||
get you a new enough version of `clang++`. On Linux, you should be able to upgrade `g++` with
|
||||
Tippecanoe requires features from the 2017 C++ standard (it is built with `-std=c++17`).
|
||||
If your compiler is older than that, you will need to install a newer one. On MacOS, updating
|
||||
to the latest XCode should get you a new enough version of `clang++`. On Linux, you should be
|
||||
able to upgrade `g++` with
|
||||
|
||||
```
|
||||
```sh
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y g++-5
|
||||
export CXX=g++-5
|
||||
sudo apt-get install -y g++-9
|
||||
export CXX=g++-9
|
||||
```
|
||||
|
||||
Docker Image
|
||||
@@ -779,11 +802,14 @@ The options are:
|
||||
* `-o` *out.mbtiles*, *out.pmtiles* or `--output=`*out.mbtiles*: Write the new tiles to the specified .mbtiles file.
|
||||
* `-e` *directory* or `--output-to-directory=`*directory*: Write the new tiles to the specified directory instead of to an mbtiles file.
|
||||
* `-f` or `--force`: Remove *out.mbtiles* if it already exists.
|
||||
* `-r` or `--read-from`: list of input mbtiles to read from.
|
||||
|
||||
### Input tilesets
|
||||
|
||||
* `-r` *file* or `--read-from=`*file*: Read the list of input tilesets from the named *file*, one filename per line, instead of naming them all on the command line.
|
||||
|
||||
### Overzooming
|
||||
|
||||
* `--overzoom`: If one of the source tilesets has a larger maxzoom than the others, scale up tiles from the tilesets with the lower maxzooms so they will all have the same maxzoom in the output tileset.
|
||||
* `-O` or `--overzoom`: If one of the source tilesets has a larger maxzoom than the others, scale up tiles from the tilesets with the lower maxzooms so they will all have the same maxzoom in the output tileset.
|
||||
* `--buffer=`_pixels_ or `-b` _pixels_: Set the size of the tile buffer in the overzoomed tiles.
|
||||
|
||||
### Tileset description and attribution
|
||||
@@ -812,6 +838,8 @@ The options are:
|
||||
* `-x` *key* or `--exclude=`*key*: Remove attributes named *key* from the output. You can use this to remove the field you are matching against if you no longer need it after joining, or to remove any other attributes you don't want. You can use multiple `-x` options to remove multiple attributes.
|
||||
* `-X` or `--exclude-all`: Remove all attributes from the output.
|
||||
* `-y` *key* or `--include=`*key*: Remove all attributes except for those named *key* from the output. You can use multiple `-y` options to retain multiple attributes.
|
||||
* `--exclude-all-tile-attributes`: Remove the attributes that were already present in the source tiles, keeping only any that are joined from a CSV with `-c`.
|
||||
* `--exclude-all-tile-geometries`: Copy the features' attributes but not their geometries, so the output tiles describe the features without locating them.
|
||||
* `-i` or `--if-matched`: Only include features that matched the CSV.
|
||||
* `-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.
|
||||
* `-J` *filter-file* or `--feature-filter-file`=*filter-file*: Like `-j`, but read the filter from a file.
|
||||
@@ -826,6 +854,10 @@ The options are:
|
||||
* `--tile-stats-sample-values-limit=`*count*: Calculate `tilestats` attribute statistics based on *count* values instead of the default 1000.
|
||||
* `--tile-stats-values-limit=`*count*: Report *count* unique attribute values in `tilestats` instead of the default 100.
|
||||
|
||||
### Progress indicator
|
||||
|
||||
* `-q` or `--quiet`: Work quietly instead of reporting progress
|
||||
|
||||
Because tile-join just copies the geometries to the new .mbtiles without processing them
|
||||
(except to rescale the extents if necessary),
|
||||
it doesn't have any of tippecanoe's recourses if the new tiles are bigger than the 500K tile limit.
|
||||
@@ -858,7 +890,7 @@ awk 'BEGIN {
|
||||
|
||||
which looks like this:
|
||||
|
||||
```
|
||||
```csv
|
||||
GEOID10,population
|
||||
"060014277003018",0
|
||||
"060014283014046",0
|
||||
@@ -916,8 +948,10 @@ resolutions.
|
||||
* `-c` or `--tag-layer-and-zoom`: Include each feature's layer and zoom level as part of its `tippecanoe` object rather than as a FeatureCollection wrapper
|
||||
* `-S` or `--stats`: Just report statistics about each tile's size and the number of features in it, as a JSON structure.
|
||||
* `-f` or `--force`: Decode tiles even if polygon ring order or closure problems are detected
|
||||
* `-I` or `--integer`: Report coordinates in integer tile coordinates
|
||||
* `-F` or `--fraction`: Report coordinates as a fraction of the tile extent
|
||||
* `-I` or `--integer-coordinates`: Report coordinates in integer tile coordinates
|
||||
* `-F` or `--fractional-coordinates`: Report coordinates as a fraction of the tile extent
|
||||
* `-y` _attribute_ or `--include=`*attribute*: Include only the named attributes in the decoded features, excluding all those not explicitly named. (Multiple `-y` options can be specified.)
|
||||
* `-x` _name_ or `--exclude-metadata-row=`*name*: Omit the named row from the tileset metadata in the output. (Multiple `-x` options can be specified.)
|
||||
|
||||
tippecanoe-json-tool
|
||||
====================
|
||||
@@ -956,7 +990,7 @@ for Tippecanoe County, Indiana.
|
||||
|
||||
Download Census block geometry, and convert to GeoJSON:
|
||||
|
||||
```
|
||||
```sh
|
||||
$ curl -L -O https://www2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_18157_tabblock10.zip
|
||||
$ unzip tl_2010_18157_tabblock10.zip
|
||||
$ ogr2ogr -f GeoJSON tl_2010_18157_tabblock10.json tl_2010_18157_tabblock10.shp
|
||||
@@ -964,7 +998,7 @@ $ ogr2ogr -f GeoJSON tl_2010_18157_tabblock10.json tl_2010_18157_tabblock10.shp
|
||||
|
||||
Download Indiana employment data, and fix name of join key in header
|
||||
|
||||
```
|
||||
```sh
|
||||
$ curl -L -O https://lehd.ces.census.gov/data/lodes/LODES7/in/wac/in_wac_S000_JT00_2015.csv.gz
|
||||
$ gzip -dc in_wac_S000_JT00_2015.csv.gz | sed '1s/w_geocode/GEOID10/' > in_wac_S000_JT00_2015.csv
|
||||
```
|
||||
@@ -972,13 +1006,13 @@ $ gzip -dc in_wac_S000_JT00_2015.csv.gz | sed '1s/w_geocode/GEOID10/' > in_wac_S
|
||||
Sort GeoJSON block geometry so it is ordered by block ID. If you don't do this, you will get a
|
||||
"GeoJSON file is out of sort" error.
|
||||
|
||||
```
|
||||
```sh
|
||||
$ tippecanoe-json-tool -e GEOID10 tl_2010_18157_tabblock10.json | LC_ALL=C sort > tl_2010_18157_tabblock10.sort.json
|
||||
```
|
||||
|
||||
Join block geometries to employment attributes:
|
||||
|
||||
```
|
||||
```sh
|
||||
$ tippecanoe-json-tool -c in_wac_S000_JT00_2015.csv tl_2010_18157_tabblock10.sort.json > blocks-wac.json
|
||||
```
|
||||
|
||||
@@ -1004,10 +1038,19 @@ and produces tile `outz/outx/outy` of `out.mvt.gz` from them.
|
||||
|
||||
### Options
|
||||
|
||||
* `-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.
|
||||
* `-o` *file* or `--output=`*file*: Write the output tile to the named *file*.
|
||||
* `-t` _zoom_`/`_x_`/`_y_ or `--source-tile=`_zoom_`/`_x_`/`_y_: Specify the coordinates of the tile to produce, so that several input tiles, each followed by its own _zoom_`/`_x_`/`_y_, can be combined into it, as in the second example above.
|
||||
* `-b` *buffer* or `--buffer=`*buffer*: Set the tile buffer in the output tile (default 5)
|
||||
* `-d` *detail* or `--full-detail=`*detail*: Set the detail of the output tile (default 12)
|
||||
* `-y` *attribute* or `--include=`*attribute*: Retain the specified *attribute* in the output features. All attributes that are not named in a `-y` option will be removed.
|
||||
* `-x` *attribute* or `--exclude=`*attribute*: Remove the specified *attribute* from the output features.
|
||||
* `--exclude-prefix=`*prefix*: Remove any attribute whose name begins with the specified *prefix* from the output features.
|
||||
* `-j` *filter* or `--feature-filter=`*filter*: Filter features using the same expression syntax as in tippecanoe.
|
||||
* `-J` *filter-file* or `--feature-filter-file=`*filter-file*: Like `-j`, but read the filter from a file.
|
||||
* `-m` or `--filter-points-multiplier`: 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.
|
||||
* `-S` *scale* or `--line-simplification=`*scale*: Simplify lines and polygons in the output tile, multiplying the standard tolerance by *scale*. The default of 0 means not to simplify at all.
|
||||
* `--tiny-polygon-size=`*size*: Combine the area of very small polygons into small squares of the specified *size* that represent their combined area, as `tippecanoe` does. The default of 0 means not to do tiny polygon reduction at all.
|
||||
* `--deduplicate-by-id`: When several input tiles are combined, include only the first feature with any given feature ID within each layer, so that features that appear in more than one input tile are not duplicated in the output.
|
||||
* `--preserve-input-order`: Restore a set of filtered features to its original input order
|
||||
* `--accumulate-attribute`: Behaves as in `tippecanoe` to sum attributes from the features of a multiplier cluster that are not included in the final output. The attributes from features that are filtered away with `-j` are *not* accumulated onto the output feature.
|
||||
* `-E` *attribute*`:`*operation* or `--accumulate-attribute=`*attribute*`:`*operation*: Behaves as in `tippecanoe` to sum attributes from the features of a multiplier cluster that are not included in the final output. The attributes from features that are filtered away with `-j` are *not* accumulated onto the output feature.
|
||||
* `--no-tile-compression`: Don't compress the PBF vector tile data in the output tile.
|
||||
|
||||
+8
-11
@@ -42,10 +42,10 @@ void set_attribute_accum(std::unordered_map<std::string, attribute_op> &attribut
|
||||
|
||||
void set_attribute_accum(std::unordered_map<std::string, attribute_op> &attribute_accum, const char *arg, char **argv) {
|
||||
if (*arg == '{') {
|
||||
json_pull *jp = json_begin_string(arg);
|
||||
json_object *o = json_read_tree(jp);
|
||||
json_pull_ptr jp = json_begin_string(arg);
|
||||
json_object_ptr o = json_read_tree(jp);
|
||||
|
||||
if (o == NULL) {
|
||||
if (o == nullptr) {
|
||||
fprintf(stderr, "%s: -E%s: %s\n", *argv, arg, jp->error);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
@@ -55,24 +55,21 @@ void set_attribute_accum(std::unordered_map<std::string, attribute_op> &attribut
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < o->value.object.length; i++) {
|
||||
json_object *k = o->value.object.keys[i];
|
||||
json_object *v = o->value.object.values[i];
|
||||
for (size_t i = 0; i < o->entries().size(); i++) {
|
||||
const auto &e = o->entries()[i];
|
||||
|
||||
if (k->type != JSON_STRING) {
|
||||
if (e.key->type != JSON_STRING) {
|
||||
fprintf(stderr, "%s: -E%s: key %zu not a string\n", *argv, arg, i);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
if (v->type != JSON_STRING) {
|
||||
if (e.value->type != JSON_STRING) {
|
||||
fprintf(stderr, "%s: -E%s: value %zu not a string\n", *argv, arg, i);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
|
||||
set_attribute_accum(attribute_accum, k->value.string.string, v->value.string.string);
|
||||
set_attribute_accum(attribute_accum, e.key->string(), e.value->string());
|
||||
}
|
||||
|
||||
json_free(o);
|
||||
json_end(jp);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1045,7 +1045,11 @@ static drawvec simplify_lines_basic(drawvec &geom, int z, int detail, double sim
|
||||
return geom;
|
||||
}
|
||||
|
||||
drawvec reduce_tiny_poly(drawvec const &geom, int z, int detail, bool *still_needs_simplification, bool *reduced_away, double *accum_area, double tiny_polygon_size) {
|
||||
// A ring that is longer than this many times the tiny polygon size is long enough
|
||||
// to be visible as a line even if its area is too small to be visible as a polygon
|
||||
#define SPINDLE_PERIMETER 8
|
||||
|
||||
drawvec reduce_tiny_poly(drawvec const &geom, int z, int detail, bool *still_needs_simplification, bool *reduced_away, double *accum_area, double tiny_polygon_size, std::function<double(drawvec const &, size_t, size_t)> const &spindle_length) {
|
||||
drawvec out;
|
||||
const double pixel = (1LL << (32 - detail - z)) * (double) tiny_polygon_size;
|
||||
|
||||
@@ -1080,7 +1084,18 @@ drawvec reduce_tiny_poly(drawvec const &geom, int z, int detail, bool *still_nee
|
||||
// OR it is an inner ring and we haven't output an outer ring for it to be
|
||||
// cut out of, so we are just subtracting its area from the tiny polygon
|
||||
// rather than trying to deal with it geometrically
|
||||
if ((area > 0 && area <= pixel * pixel) || (area < 0 && !included_last_outer)) {
|
||||
//
|
||||
// But a long, narrow outer ring is not tiny even if its area is small,
|
||||
// so if we are preserving spindles, let it represent itself.
|
||||
// (The length that counts is the length that spindle preservation
|
||||
// can actually preserve, which leaves out borders shared with
|
||||
// other features if --no-simplification-of-shared-nodes is used.)
|
||||
bool tiny = (area > 0 && area <= pixel * pixel);
|
||||
if (tiny && spindle_length && spindle_length(geom, i, j) > SPINDLE_PERIMETER * pixel) {
|
||||
tiny = false;
|
||||
}
|
||||
|
||||
if (tiny || (area < 0 && !included_last_outer)) {
|
||||
*accum_area += area;
|
||||
*reduced_away = true;
|
||||
|
||||
@@ -1214,47 +1229,6 @@ bool pnpoly_mp(drawvec const &geom, long long x, long long y) {
|
||||
return found;
|
||||
}
|
||||
|
||||
clipbbox parse_clip_poly(std::string arg) {
|
||||
json_pull *jp = json_begin_string(arg.c_str());
|
||||
json_object *j = json_read_tree(jp);
|
||||
if (j == NULL) {
|
||||
fprintf(stderr, "Expected JSON object, not %s\n", arg.c_str());
|
||||
exit(EXIT_ARGS);
|
||||
}
|
||||
if (j->type != JSON_HASH) {
|
||||
fprintf(stderr, "Expected JSON geometry object, not %s\n", arg.c_str());
|
||||
exit(EXIT_ARGS);
|
||||
}
|
||||
|
||||
std::pair<int, drawvec> parsed_geometry = parse_geometry(j, jp, j, 0, 0, 0, 1LL << 32, false, false);
|
||||
json_end(jp);
|
||||
|
||||
clipbbox out;
|
||||
out.minx = LLONG_MAX;
|
||||
out.miny = LLONG_MAX;
|
||||
out.maxx = LLONG_MIN;
|
||||
out.maxy = LLONG_MIN;
|
||||
for (auto const &d : parsed_geometry.second) {
|
||||
if (d.op == VT_MOVETO || d.op == VT_LINETO) {
|
||||
if (d.x < out.minx) {
|
||||
out.minx = d.x;
|
||||
}
|
||||
if (d.y < out.miny) {
|
||||
out.miny = d.y;
|
||||
}
|
||||
if (d.x > out.maxx) {
|
||||
out.maxx = d.x;
|
||||
}
|
||||
if (d.y > out.maxy) {
|
||||
out.maxy = d.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
out.dv = std::move(parsed_geometry.second);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int ny,
|
||||
int detail_or_unspecified, int buffer,
|
||||
std::set<std::string> const &keep,
|
||||
@@ -1266,9 +1240,9 @@ std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int n
|
||||
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
||||
std::vector<std::string> const &unidecode_data, double simplification,
|
||||
double tiny_polygon_size,
|
||||
std::vector<mvt_layer> const &bins, std::string const &bin_by_id_list,
|
||||
std::string const &accumulate_numeric, size_t feature_limit,
|
||||
std::vector<clipbbox> const &clipbboxes,
|
||||
std::vector<mvt_layer> const &unused2, std::string const &unused3,
|
||||
std::string const &unused, size_t feature_limit,
|
||||
std::vector<clipbbox> const &unused4,
|
||||
bool deduplicate_by_id) {
|
||||
std::vector<source_tile> decoded;
|
||||
|
||||
@@ -1295,7 +1269,7 @@ std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int n
|
||||
decoded.push_back(out);
|
||||
}
|
||||
|
||||
return overzoom(decoded, nz, nx, ny, detail_or_unspecified, buffer, keep, exclude, exclude_prefix, do_compress, next_overzoomed_tiles, demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins, bin_by_id_list, accumulate_numeric, feature_limit, clipbboxes, deduplicate_by_id);
|
||||
return overzoom(decoded, nz, nx, ny, detail_or_unspecified, buffer, keep, exclude, exclude_prefix, do_compress, next_overzoomed_tiles, demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, unused2, unused3, unused, feature_limit, unused4, deduplicate_by_id);
|
||||
}
|
||||
|
||||
// like a minimal serial_feature, but with mvt_feature-style attributes
|
||||
@@ -1330,152 +1304,6 @@ static bool should_keep(std::string const &key,
|
||||
return false;
|
||||
}
|
||||
|
||||
static void add_mean(mvt_feature &feature, mvt_layer &layer, std::string const &accumulate_numeric,
|
||||
std::set<std::string> const &keep, std::set<std::string> const &exclude,
|
||||
std::vector<std::string> const &exclude_prefix) {
|
||||
std::string accumulate_numeric_colon = accumulate_numeric + ":";
|
||||
|
||||
std::unordered_map<std::string, size_t> attributes;
|
||||
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
|
||||
std::string const &key = layer.keys[feature.tags[i]];
|
||||
if (starts_with(key, accumulate_numeric_colon)) {
|
||||
attributes.emplace(key, i);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
|
||||
std::string accumulate_numeric_sum_colon = accumulate_numeric + ":sum:";
|
||||
|
||||
std::string const &key = layer.keys[feature.tags[i]];
|
||||
if (starts_with(key, accumulate_numeric_sum_colon)) {
|
||||
std::string trunc = key.substr(accumulate_numeric_sum_colon.size());
|
||||
auto const f = attributes.find(accumulate_numeric + ":count:" + trunc);
|
||||
if (f != attributes.end()) {
|
||||
mvt_value const &sum = layer.values[feature.tags[i + 1]];
|
||||
mvt_value const &count = layer.values[feature.tags[f->second + 1]];
|
||||
double count_val = mvt_value_to_double(count);
|
||||
if (count_val <= 0) {
|
||||
fprintf(stderr, "can't happen: count is %s (type %d)\n", count.toString().c_str(), count.type);
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
mvt_value mean;
|
||||
mean.type = mvt_double;
|
||||
mean.numeric_value.double_value = mvt_value_to_double(sum) / count_val;
|
||||
|
||||
if (should_keep(key, keep, exclude, exclude_prefix)) {
|
||||
layer.tag(feature, accumulate_numeric + ":mean:" + trunc, mean);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// accumulate :sum:, :min:, :max:, and :count: versions of the specified attribute
|
||||
static void preserve_numeric(const std::string &key, const mvt_value &val, // numeric attribute being accumulated
|
||||
std::vector<std::shared_ptr<std::string>> &full_keys, // keys of feature being accumulated onto
|
||||
std::vector<mvt_value> &full_values, // values of features being accumulated onto
|
||||
const std::string &accumulate_numeric, // prefix of accumulations
|
||||
std::set<std::string> &keys, // key presence in the source feature
|
||||
std::map<std::string, size_t> &numeric_out_field, // key index in the output feature
|
||||
key_pool &key_pool,
|
||||
std::set<std::string> const &keep, std::set<std::string> const &exclude,
|
||||
std::vector<std::string> const &exclude_prefix) {
|
||||
// If this is a numeric attribute, but there is also a prefix:sum (etc.) for the
|
||||
// same attribute, we want to use that one instead of this one.
|
||||
|
||||
for (auto const &op : numeric_operations) {
|
||||
std::string compound_key = accumulate_numeric + ":" + op.first + ":" + key;
|
||||
auto compound_found = keys.find(compound_key);
|
||||
if (compound_found != keys.end()) {
|
||||
// found, so skip this one
|
||||
} else {
|
||||
// not found, so accumulate this one
|
||||
|
||||
// if this is already prefixed, strip off the prefix
|
||||
// if it is the right one, and skip the attribute if
|
||||
// it is the wrong one.
|
||||
|
||||
std::string outkey = key;
|
||||
bool starting_from_accumulation;
|
||||
|
||||
if (starts_with(outkey, accumulate_numeric + ":")) {
|
||||
std::string prefix = accumulate_numeric + ":" + op.first + ":";
|
||||
if (starts_with(outkey, prefix)) {
|
||||
outkey = outkey.substr(prefix.size());
|
||||
starting_from_accumulation = true; // from a subaccumulation
|
||||
} else {
|
||||
continue; // to next operation
|
||||
}
|
||||
} else {
|
||||
starting_from_accumulation = false; // from a plain value
|
||||
}
|
||||
// and then put it back on for the output field
|
||||
std::string prefixed = accumulate_numeric + ":" + op.first + ":" + outkey;
|
||||
|
||||
if (!should_keep(prefixed, keep, exclude, exclude_prefix)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Does it exist in the output feature already?
|
||||
|
||||
auto prefixed_attr = numeric_out_field.find(prefixed);
|
||||
if (prefixed_attr == numeric_out_field.end()) {
|
||||
// No? Does it exist unprefixed in the output feature already?
|
||||
|
||||
auto out_attr = numeric_out_field.find(outkey);
|
||||
if (out_attr == numeric_out_field.end()) {
|
||||
// not present at all, so copy our value to the prefixed output
|
||||
numeric_out_field.emplace(prefixed, full_keys.size());
|
||||
full_keys.push_back(key_pool.pool(prefixed));
|
||||
|
||||
if (op.second == op_count) {
|
||||
if (starting_from_accumulation) {
|
||||
// copy our count
|
||||
full_values.push_back(val);
|
||||
} else {
|
||||
// new count of 1
|
||||
full_values.push_back(mvt_value(1));
|
||||
}
|
||||
} else {
|
||||
full_values.push_back(val);
|
||||
}
|
||||
} else {
|
||||
// exists unprefixed, so copy it, and then accumulate on our value
|
||||
numeric_out_field.emplace(prefixed, full_keys.size());
|
||||
full_keys.push_back(key_pool.pool(prefixed));
|
||||
|
||||
if (op.second == op_count) {
|
||||
mvt_value v;
|
||||
if (starting_from_accumulation) {
|
||||
// sum our count onto the existing 1
|
||||
v = mvt_value(1 + mvt_value_to_long_long(val));
|
||||
} else {
|
||||
// sum our 1 onto the existing 1
|
||||
v = mvt_value(2);
|
||||
}
|
||||
full_values.push_back(v);
|
||||
} else {
|
||||
full_values.push_back(full_values[out_attr->second]);
|
||||
preserve_attribute(op.second, prefixed, val, full_keys, full_values, key_pool);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// exists, so accumulate on our value
|
||||
if (op.second == op_count) {
|
||||
if (starting_from_accumulation) {
|
||||
// sum our count onto the existing count
|
||||
full_values[prefixed_attr->second] = mvt_value(mvt_value_to_long_long(full_values[prefixed_attr->second]) + mvt_value_to_long_long(val));
|
||||
} else {
|
||||
full_values[prefixed_attr->second] = mvt_value(mvt_value_to_long_long(full_values[prefixed_attr->second]) + 1);
|
||||
}
|
||||
} else {
|
||||
preserve_attribute(op.second, prefixed, val, full_keys, full_values, key_pool);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_closepath_from_mvt(drawvec &geom) {
|
||||
// mvt geometries close polygons with a mvt_closepath operation
|
||||
// tippecanoe-internal geometries close polygons with a lineto to the initial point
|
||||
@@ -1497,9 +1325,9 @@ static bool feature_out(std::vector<tile_feature> const &features, mvt_layer &ou
|
||||
std::set<std::string> const &exclude,
|
||||
std::vector<std::string> const &exclude_prefix,
|
||||
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
||||
std::string const &accumulate_numeric,
|
||||
std::string const &,
|
||||
key_pool &key_pool, int buffer, bool include_nonaggregate,
|
||||
std::vector<clipbbox> const &clipbboxes, int nz, int nx, int ny,
|
||||
std::vector<clipbbox> const &, int, int, int,
|
||||
std::set<unsigned long long> *deduplicate_ids) {
|
||||
// Add geometry to output feature
|
||||
|
||||
@@ -1507,7 +1335,7 @@ static bool feature_out(std::vector<tile_feature> const &features, mvt_layer &ou
|
||||
int t = features[0].t;
|
||||
|
||||
bool fix_polygons = false;
|
||||
if ((buffer >= 0 || clipbboxes.size() > 0) && t == VT_POLYGON) {
|
||||
if ((buffer >= 0) && t == VT_POLYGON) {
|
||||
fix_polygons = true;
|
||||
}
|
||||
|
||||
@@ -1528,48 +1356,6 @@ static bool feature_out(std::vector<tile_feature> const &features, mvt_layer &ou
|
||||
geom = remove_noop(geom, t, 0);
|
||||
}
|
||||
|
||||
if (clipbboxes.size() != 0) {
|
||||
// bounding box is in world coordinates at world scale
|
||||
// feature is in local coordinates at tile scale
|
||||
|
||||
long long dx = (long long) nx << (32 - nz);
|
||||
long long dy = (long long) ny << (32 - nz);
|
||||
double scale = (double) outlayer.extent / (1LL << (32 - nz));
|
||||
|
||||
for (auto const &c_world : clipbboxes) {
|
||||
clipbbox c = c_world;
|
||||
|
||||
c.minx = std::llround((c_world.minx - dx) * scale);
|
||||
c.miny = std::llround((c_world.miny - dy) * scale);
|
||||
c.maxx = std::llround((c_world.maxx - dx) * scale);
|
||||
c.maxy = std::llround((c_world.maxy - dy) * scale);
|
||||
|
||||
for (auto &p : c.dv) {
|
||||
p.x = std::llround((p.x - dx) * scale);
|
||||
p.y = std::llround((p.y - dy) * scale);
|
||||
}
|
||||
|
||||
if (t == VT_POLYGON) {
|
||||
geom = simple_clip_poly(geom, c.minx, c.miny, c.maxx, c.maxy, false);
|
||||
if (c.dv.size() > 0 && geom.size() > 0) {
|
||||
geom = clip_poly_poly(geom, c.dv);
|
||||
}
|
||||
} else if (t == VT_LINE) {
|
||||
geom = clip_lines(geom, c.minx, c.miny, c.maxx, c.maxy);
|
||||
if (c.dv.size() > 0 && geom.size() > 0) {
|
||||
geom = clip_lines_poly(geom, c.dv);
|
||||
}
|
||||
} else if (t == VT_POINT) {
|
||||
geom = clip_point(geom, c.minx, c.miny, c.maxx, c.maxy);
|
||||
if (c.dv.size() > 0 && geom.size() > 0) {
|
||||
geom = clip_point_poly(geom, c.dv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
geom = remove_noop(geom, t, 0);
|
||||
}
|
||||
|
||||
if (fix_polygons) {
|
||||
geom = clean_or_clip_poly(geom, 0, 0, false, false);
|
||||
geom = close_poly(geom);
|
||||
@@ -1599,7 +1385,7 @@ static bool feature_out(std::vector<tile_feature> const &features, mvt_layer &ou
|
||||
|
||||
outfeature.seq = features[0].seq;
|
||||
|
||||
if (attribute_accum.size() > 0 || accumulate_numeric.size() > 0) {
|
||||
if (attribute_accum.size() > 0) {
|
||||
// convert the attributes of the output feature
|
||||
// from layer references to a vector so they can have
|
||||
// attributes from the other features of the
|
||||
@@ -1617,11 +1403,6 @@ static bool feature_out(std::vector<tile_feature> const &features, mvt_layer &ou
|
||||
// this attribute has an accumulator, so convert it
|
||||
full_keys.push_back(key_pool.pool(f.layer->keys[f.tags[i]]));
|
||||
full_values.push_back(f.layer->values[f.tags[i + 1]]);
|
||||
} else if (accumulate_numeric.size() > 0 && f.layer->values[f.tags[i + 1]].is_numeric()) {
|
||||
// convert numeric for accumulation
|
||||
numeric_out_field.emplace(key, full_keys.size());
|
||||
full_keys.push_back(key_pool.pool(key));
|
||||
full_values.push_back(f.layer->values[f.tags[i + 1]]);
|
||||
} else if (include_nonaggregate) {
|
||||
// otherwise just tag it directly onto the output feature
|
||||
outlayer.tag(outfeature, f.layer->keys[f.tags[i]], f.layer->values[f.tags[i + 1]]);
|
||||
@@ -1650,14 +1431,6 @@ static bool feature_out(std::vector<tile_feature> const &features, mvt_layer &ou
|
||||
if (found != attribute_accum.end()) {
|
||||
mvt_value val = features[i].layer->values[features[i].tags[j + 1]];
|
||||
preserve_attribute(found->second, key, val, full_keys, full_values, key_pool);
|
||||
} else if (accumulate_numeric.size() > 0) {
|
||||
const mvt_value &val = features[i].layer->values[features[i].tags[j + 1]];
|
||||
if (val.is_numeric()) {
|
||||
preserve_numeric(key, val, full_keys, full_values,
|
||||
accumulate_numeric,
|
||||
keys, numeric_out_field, key_pool,
|
||||
keep, exclude, exclude_prefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1671,10 +1444,6 @@ static bool feature_out(std::vector<tile_feature> const &features, mvt_layer &ou
|
||||
outlayer.tag(outfeature, *full_keys[i], full_values[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (accumulate_numeric.size() > 0) {
|
||||
add_mean(outfeature, outlayer, accumulate_numeric, keep, exclude, exclude_prefix);
|
||||
}
|
||||
} else if (include_nonaggregate) {
|
||||
for (size_t i = 0; i + 1 < features[0].tags.size(); i += 2) {
|
||||
if (should_keep(features[0].layer->keys[features[0].tags[i]], keep, exclude, exclude_prefix)) {
|
||||
@@ -1696,316 +1465,6 @@ static struct preservecmp {
|
||||
}
|
||||
} preservecmp;
|
||||
|
||||
struct index_event {
|
||||
unsigned long long where;
|
||||
enum index_event_kind {
|
||||
ENTER = 0, // new bin in is now active
|
||||
CHECK, // point needs to be checked against active bins
|
||||
EXIT // bin has ceased to be active
|
||||
} kind;
|
||||
size_t layer;
|
||||
size_t feature;
|
||||
long long xmin, ymin, xmax, ymax;
|
||||
|
||||
index_event(unsigned long long where_, index_event_kind kind_, size_t layer_, size_t feature_,
|
||||
long long xmin_, long long ymin_, long long xmax_, long long ymax_)
|
||||
: where(where_), kind(kind_), layer(layer_), feature(feature_), xmin(xmin_), ymin(ymin_), xmax(xmax_), ymax(ymax_) {
|
||||
}
|
||||
|
||||
bool operator<(const index_event &ie) const {
|
||||
if (where < ie.where) {
|
||||
return true;
|
||||
} else if (where == ie.where) {
|
||||
if (kind < ie.kind) {
|
||||
return true;
|
||||
} else if (kind == ie.kind) {
|
||||
if (layer < ie.layer) {
|
||||
return true;
|
||||
} else if (layer == ie.layer) {
|
||||
if (feature < ie.feature) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
struct active_bin {
|
||||
size_t layer;
|
||||
size_t feature;
|
||||
|
||||
active_bin(size_t layer_, size_t feature_)
|
||||
: layer(layer_), feature(feature_) {
|
||||
}
|
||||
|
||||
bool operator<(const active_bin &o) const {
|
||||
if (layer < o.layer) {
|
||||
return true;
|
||||
} else if (layer == o.layer) {
|
||||
if (feature < o.feature) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t outfeature;
|
||||
long long xmin, ymin, xmax, ymax;
|
||||
size_t counter = 0;
|
||||
};
|
||||
|
||||
void get_quadkey_bounds(long long xmin, long long ymin, long long xmax, long long ymax,
|
||||
unsigned long long *start, unsigned long long *end) {
|
||||
if (xmin < 0 || ymin < 0 || xmax >= 1LL << 32 || ymax >= 1LL << 32) {
|
||||
*start = 0;
|
||||
*end = ULLONG_MAX;
|
||||
return;
|
||||
}
|
||||
|
||||
*start = encode_quadkey(xmin, ymin);
|
||||
*end = encode_quadkey(xmax, ymax);
|
||||
|
||||
for (ssize_t i = 62; i >= 0; i -= 2) {
|
||||
if ((*start & (3LL << i)) != (*end & (3LL << i))) {
|
||||
for (; i >= 0; i -= 2) {
|
||||
*start &= ~(3LL << i);
|
||||
*end |= 3LL << i;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool bbox_intersects(long long x1min, long long y1min, long long x1max, long long y1max,
|
||||
long long x2min, long long y2min, long long x2max, long long y2max) {
|
||||
if (x1max < x2min) {
|
||||
return false;
|
||||
}
|
||||
if (x2max < x1min) {
|
||||
return false;
|
||||
}
|
||||
if (y1max < y2min) {
|
||||
return false;
|
||||
}
|
||||
if (y2max < y1min) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static std::vector<size_t> parse_ids_string(mvt_value const &v) {
|
||||
std::vector<size_t> out;
|
||||
std::string s = v.toString();
|
||||
|
||||
for (size_t i = 0; i < s.size(); i++) {
|
||||
if (i == 0 || s[i - 1] == ',') {
|
||||
out.push_back(atoll(s.c_str() + i));
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
mvt_tile assign_to_bins(mvt_tile &features,
|
||||
std::vector<mvt_layer> const &bins, std::string const &bin_by_id_list,
|
||||
int z, int x, int y,
|
||||
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
||||
std::string const &accumulate_numeric,
|
||||
std::set<std::string> keep,
|
||||
std::set<std::string> exclude,
|
||||
std::vector<std::string> exclude_prefix,
|
||||
int buffer, std::vector<clipbbox> const &clipbboxes) {
|
||||
std::vector<index_event> events;
|
||||
key_pool key_pool;
|
||||
|
||||
if (bins.size() == 0) {
|
||||
return mvt_tile();
|
||||
}
|
||||
|
||||
// Index bins
|
||||
for (size_t i = 0; i < bins.size(); i++) {
|
||||
for (size_t j = 0; j < bins[i].features.size(); j++) {
|
||||
long long xmin, ymin, xmax, ymax;
|
||||
unsigned long long start, end;
|
||||
|
||||
get_bbox(bins[i].features[j].geometry, &xmin, &ymin, &xmax, &ymax, z, x, y, bins[i].detail());
|
||||
get_quadkey_bounds(xmin, ymin, xmax, ymax, &start, &end);
|
||||
events.emplace_back(start, index_event::ENTER, i, j, xmin, ymin, xmax, ymax);
|
||||
events.emplace_back(end, index_event::EXIT, i, j, xmin, ymin, xmax, ymax);
|
||||
}
|
||||
}
|
||||
|
||||
std::map<unsigned long long, std::pair<size_t, size_t>> fid_to_feature;
|
||||
|
||||
// Index points
|
||||
for (size_t i = 0; i < features.layers.size(); i++) {
|
||||
for (size_t j = 0; j < features.layers[i].features.size(); j++) {
|
||||
long long xmin, ymin, xmax, ymax;
|
||||
unsigned long long start, end;
|
||||
|
||||
if (features.layers[i].features[j].geometry.size() > 0) {
|
||||
if (features.layers[i].features[j].has_id) {
|
||||
fid_to_feature.emplace(features.layers[i].features[j].id, std::make_pair(i, j));
|
||||
}
|
||||
|
||||
get_bbox(features.layers[i].features[j].geometry, &xmin, &ymin, &xmax, &ymax, z, x, y, features.layers[i].detail());
|
||||
get_quadkey_bounds(xmin, ymin, xmax, ymax, &start, &end);
|
||||
events.emplace_back(start, index_event::CHECK, i, j, xmin, ymin, xmax, ymax);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(events.begin(), events.end());
|
||||
std::set<active_bin> active;
|
||||
|
||||
mvt_layer outlayer;
|
||||
outlayer.extent = bins[0].extent;
|
||||
outlayer.version = 2;
|
||||
outlayer.name = features.layers[0].name;
|
||||
|
||||
std::vector<std::vector<tile_feature>> outfeatures;
|
||||
|
||||
for (auto &e : events) {
|
||||
if (e.kind == index_event::ENTER) {
|
||||
active_bin a(e.layer, e.feature);
|
||||
a.xmin = e.xmin;
|
||||
a.ymin = e.ymin;
|
||||
a.xmax = e.xmax;
|
||||
a.ymax = e.ymax;
|
||||
|
||||
const mvt_feature &bin = bins[e.layer].features[e.feature];
|
||||
|
||||
{
|
||||
tile_feature outfeature;
|
||||
for (auto const &g : bin.geometry) {
|
||||
outfeature.geom.emplace_back(g.op, g.x, g.y);
|
||||
}
|
||||
outfeature.t = bin.type;
|
||||
outfeature.has_id = bin.has_id;
|
||||
outfeature.id = bin.id;
|
||||
outfeature.tags = bin.tags;
|
||||
outfeature.layer = &bins[e.layer];
|
||||
outfeature.seq = e.feature;
|
||||
|
||||
a.outfeature = outfeatures.size();
|
||||
outfeatures.push_back({std::move(outfeature)});
|
||||
}
|
||||
|
||||
if (bin_by_id_list.size() > 0) {
|
||||
for (size_t k = 0; k < bin.tags.size(); k += 2) {
|
||||
if (bins[e.layer].keys[bin.tags[k]] == bin_by_id_list) {
|
||||
std::vector<size_t> ids = parse_ids_string(bins[e.layer].values[bin.tags[k + 1]]);
|
||||
for (auto &id : ids) {
|
||||
auto f = fid_to_feature.find(id);
|
||||
if (f != fid_to_feature.end()) {
|
||||
mvt_feature &feature = features.layers[f->second.first].features[f->second.second];
|
||||
if (feature.geometry.size() > 0) {
|
||||
tile_feature outfeature;
|
||||
for (auto const &g : feature.geometry) {
|
||||
outfeature.geom.emplace_back(g.op, g.x, g.y);
|
||||
}
|
||||
feature.geometry.clear();
|
||||
outfeature.t = feature.type;
|
||||
outfeature.has_id = feature.has_id;
|
||||
outfeature.id = feature.id;
|
||||
outfeature.tags = feature.tags;
|
||||
outfeature.layer = &features.layers[e.layer];
|
||||
outfeature.seq = e.feature;
|
||||
outfeatures.back().push_back(std::move(outfeature));
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
active.insert(std::move(a));
|
||||
} else if (e.kind == index_event::CHECK) {
|
||||
if (bin_by_id_list.size() > 0) {
|
||||
continue; // only bin by id, not geometrically
|
||||
}
|
||||
|
||||
auto const &feature = features.layers[e.layer].features[e.feature];
|
||||
|
||||
if (feature.geometry.size() == 0) {
|
||||
// already assigned by ID
|
||||
continue;
|
||||
}
|
||||
|
||||
// if we can't find a real match,
|
||||
// assign points to the most nearby bin
|
||||
ssize_t which_outfeature = outfeatures.size() - 1;
|
||||
|
||||
for (auto const &a : active) {
|
||||
auto const &bin = bins[a.layer].features[a.feature];
|
||||
|
||||
if (bbox_intersects(e.xmin, e.ymin, e.xmax, e.ymax,
|
||||
a.xmin, a.ymin, a.xmax, a.ymax)) {
|
||||
if (pnpoly_mp(bin.geometry, feature.geometry[0].x, feature.geometry[0].y)) {
|
||||
which_outfeature = a.outfeature;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (which_outfeature >= 0) {
|
||||
tile_feature outfeature;
|
||||
for (auto const &g : feature.geometry) {
|
||||
outfeature.geom.emplace_back(g.op, g.x, g.y);
|
||||
}
|
||||
outfeature.t = feature.type;
|
||||
outfeature.has_id = feature.has_id;
|
||||
outfeature.id = feature.id;
|
||||
outfeature.tags = feature.tags;
|
||||
outfeature.layer = &features.layers[e.layer];
|
||||
outfeature.seq = e.feature;
|
||||
outfeatures[which_outfeature].push_back(std::move(outfeature));
|
||||
}
|
||||
} else /* EXIT */ {
|
||||
auto const &found = active.find({e.layer, e.feature});
|
||||
if (found != active.end()) {
|
||||
active.erase(found);
|
||||
} else {
|
||||
fprintf(stderr, "event mismatch: can't happen\n");
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < outfeatures.size(); i++) {
|
||||
if (outfeatures[i].size() > 1) {
|
||||
if (feature_out(outfeatures[i], outlayer,
|
||||
keep, exclude, exclude_prefix, attribute_accum,
|
||||
accumulate_numeric, key_pool, buffer, true,
|
||||
clipbboxes, z, x, y, NULL)) {
|
||||
mvt_feature &nfeature = outlayer.features.back();
|
||||
mvt_value val;
|
||||
val.type = mvt_uint;
|
||||
val.numeric_value.uint_value = outfeatures[i].size() - 1;
|
||||
|
||||
std::string attrname;
|
||||
if (accumulate_numeric.size() == 0) {
|
||||
attrname = "tippecanoe:count";
|
||||
} else {
|
||||
attrname = accumulate_numeric + ":count";
|
||||
}
|
||||
if (should_keep(attrname, keep, exclude, exclude_prefix)) {
|
||||
outlayer.tag(nfeature, attrname, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mvt_tile ret;
|
||||
ret.layers.push_back(outlayer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int ny,
|
||||
int detail_or_unspecified, int buffer,
|
||||
std::set<std::string> const &keep,
|
||||
@@ -2017,9 +1476,9 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
||||
std::vector<std::string> const &unidecode_data, double simplification,
|
||||
double tiny_polygon_size,
|
||||
std::vector<mvt_layer> const &bins, std::string const &bin_by_id_list,
|
||||
std::string const &accumulate_numeric, size_t feature_limit,
|
||||
std::vector<clipbbox> const &clipbboxes,
|
||||
std::vector<mvt_layer> const &unused2, std::string const &unused3,
|
||||
std::string const &unused, size_t feature_limit,
|
||||
std::vector<clipbbox> const &unused4,
|
||||
bool deduplicate_by_id) {
|
||||
mvt_tile outtile;
|
||||
key_pool key_pool;
|
||||
@@ -2093,30 +1552,6 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
}
|
||||
}
|
||||
|
||||
// Clip to user-specified bounding boxes.
|
||||
// Bounding box clip first, to reduce complexity of the full clip.
|
||||
// But don't clip here if we are binning, because we need to bin points in the buffer
|
||||
if (bins.size() == 0) {
|
||||
for (auto &c : clipbboxes) {
|
||||
if (t == VT_POLYGON) {
|
||||
geom = simple_clip_poly(geom, c.minx, c.miny, c.maxx, c.maxy, false);
|
||||
if (c.dv.size() > 0 && geom.size() > 0) {
|
||||
geom = clip_poly_poly(geom, c.dv);
|
||||
}
|
||||
} else if (t == VT_LINE) {
|
||||
geom = clip_lines(geom, c.minx, c.miny, c.maxx, c.maxy);
|
||||
if (c.dv.size() > 0 && geom.size() > 0) {
|
||||
geom = clip_lines_poly(geom, c.dv);
|
||||
}
|
||||
} else if (t == VT_POINT) {
|
||||
geom = clip_point(geom, c.minx, c.miny, c.maxx, c.maxy);
|
||||
if (c.dv.size() > 0 && geom.size() > 0) {
|
||||
geom = clip_point_poly(geom, c.dv);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now offset from world coordinates to output tile coordinates,
|
||||
// but retain world scale, because that is what tippecanoe zoom-oriented clipping expects
|
||||
|
||||
@@ -2126,8 +1561,7 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
g.y -= ny * outtilesize;
|
||||
}
|
||||
|
||||
// Don't clip here if we are binning, because we need to bin points in the buffer
|
||||
if (bins.size() == 0) {
|
||||
{
|
||||
// Clip to output tile
|
||||
|
||||
long long xmin = LLONG_MAX;
|
||||
@@ -2145,6 +1579,9 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
long long b = outtilesize * buffer / 256;
|
||||
if (xmax < -b || ymax < -b || xmin > outtilesize + b || ymin > outtilesize + b) {
|
||||
// quick exclusion by bounding box
|
||||
if (deduplicate_by_id && feature.has_id) {
|
||||
deduplicate_by_id_set->insert(feature.id);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2160,6 +1597,9 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
|
||||
if (geom.size() == 0) {
|
||||
// clipped away
|
||||
if (deduplicate_by_id && feature.has_id) {
|
||||
deduplicate_by_id_set->insert(feature.id);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2184,7 +1624,7 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
|
||||
if (flush_multiplier_cluster) {
|
||||
if (pending_tile_features.size() > 0) {
|
||||
feature_out(pending_tile_features, *outlayer, keep, exclude, exclude_prefix, attribute_accum, accumulate_numeric, key_pool, -1, bins.size() == 0, std::vector<clipbbox>(), nz, nx, ny, deduplicate_by_id_set);
|
||||
feature_out(pending_tile_features, *outlayer, keep, exclude, exclude_prefix, attribute_accum, unused, key_pool, -1, true, std::vector<clipbbox>(), nz, nx, ny, deduplicate_by_id_set);
|
||||
if (outlayer->features.size() >= feature_limit) {
|
||||
break;
|
||||
}
|
||||
@@ -2194,6 +1634,10 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
|
||||
std::set<std::string> exclude_attributes;
|
||||
if (filter != NULL && !evaluate(feature, layer, filter, exclude_attributes, nz, unidecode_data)) {
|
||||
// filtered away
|
||||
if (deduplicate_by_id && feature.has_id) {
|
||||
deduplicate_by_id_set->insert(feature.id);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2231,6 +1675,14 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
geom = close_poly(geom);
|
||||
}
|
||||
|
||||
if (geom.size() == 0) {
|
||||
// simplified away
|
||||
if (deduplicate_by_id && feature.has_id) {
|
||||
deduplicate_by_id_set->insert(feature.id);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
tile_feature tf;
|
||||
tf.geom = std::move(geom);
|
||||
tf.t = t;
|
||||
@@ -2244,7 +1696,7 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
}
|
||||
|
||||
if (pending_tile_features.size() > 0) {
|
||||
feature_out(pending_tile_features, *outlayer, keep, exclude, exclude_prefix, attribute_accum, accumulate_numeric, key_pool, -1, bins.size() == 0, std::vector<clipbbox>(), nz, nx, ny, deduplicate_by_id_set);
|
||||
feature_out(pending_tile_features, *outlayer, keep, exclude, exclude_prefix, attribute_accum, unused, key_pool, -1, true, std::vector<clipbbox>(), nz, nx, ny, deduplicate_by_id_set);
|
||||
pending_tile_features.clear();
|
||||
if (outlayer->features.size() >= feature_limit) {
|
||||
break;
|
||||
@@ -2283,8 +1735,8 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
nz + 1, nx * 2 + x, ny * 2 + y,
|
||||
detail_or_unspecified, buffer, keep, exclude, exclude_prefix, false, NULL,
|
||||
demultiply, filter, preserve_input_order, attribute_accum, unidecode_data,
|
||||
simplification, tiny_polygon_size, bins, bin_by_id_list, accumulate_numeric,
|
||||
1, clipbboxes, deduplicate_by_id);
|
||||
simplification, tiny_polygon_size, unused2, unused3, unused,
|
||||
1, unused4, deduplicate_by_id);
|
||||
if (child.size() > 0) {
|
||||
next_overzoomed_tiles->emplace_back(nx * 2 + x, ny * 2 + y);
|
||||
}
|
||||
@@ -2293,12 +1745,6 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
||||
}
|
||||
}
|
||||
|
||||
if (bins.size() > 0) {
|
||||
outtile = assign_to_bins(outtile, bins, bin_by_id_list, nz, nx, ny,
|
||||
attribute_accum, accumulate_numeric,
|
||||
keep, exclude, exclude_prefix, buffer, clipbboxes);
|
||||
}
|
||||
|
||||
for (ssize_t i = outtile.layers.size() - 1; i >= 0; i--) {
|
||||
if (outtile.layers[i].features.size() == 0) {
|
||||
outtile.layers.erase(outtile.layers.begin() + i);
|
||||
|
||||
+39
-27
@@ -24,6 +24,7 @@
|
||||
#include "dirtiles.hpp"
|
||||
#include "pmtiles_file.hpp"
|
||||
#include "errors.hpp"
|
||||
#include "usage.hpp"
|
||||
|
||||
int minzoom = 0;
|
||||
int maxzoom = 32;
|
||||
@@ -549,8 +550,42 @@ void decode(char *fname, int z, unsigned x, unsigned y, std::set<std::string> co
|
||||
}
|
||||
}
|
||||
|
||||
static const struct option long_options[] = {
|
||||
{"Tiles to decode", 0, 0, 0},
|
||||
{"minimum-zoom", required_argument, 0, 'Z'},
|
||||
{"maximum-zoom", required_argument, 0, 'z'},
|
||||
{"layer", required_argument, 0, 'l'},
|
||||
|
||||
{"Output format", 0, 0, 0},
|
||||
{"projection", required_argument, 0, 's'},
|
||||
{"fractional-coordinates", no_argument, 0, 'F'},
|
||||
{"integer-coordinates", no_argument, 0, 'I'},
|
||||
{"tag-layer-and-zoom", no_argument, 0, 'c'},
|
||||
{"stats", no_argument, 0, 'S'},
|
||||
|
||||
{"Filtering the output", 0, 0, 0},
|
||||
{"include", required_argument, 0, 'y'},
|
||||
{"exclude-metadata-row", required_argument, 0, 'x'},
|
||||
|
||||
{"Ignoring errors in the input", 0, 0, 0},
|
||||
{"force", no_argument, 0, 'f'},
|
||||
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
|
||||
// the options above, with the usage message headings removed
|
||||
static struct option real_long_options[sizeof(long_options) / sizeof(long_options[0])];
|
||||
|
||||
void usage(char **argv) {
|
||||
fprintf(stderr, "Usage: %s [-s projection] [-Z minzoom] [-z maxzoom] [-l layer ...] file.mbtiles [zoom x y]\n", argv[0]);
|
||||
static const char *const forms[] = {
|
||||
"[options] tileset",
|
||||
"[options] tileset zoom x y",
|
||||
NULL,
|
||||
};
|
||||
|
||||
print_usage(stderr, argv[0], forms, long_options, NULL);
|
||||
fprintf(stderr, "\nThe tileset can be an .mbtiles or .pmtiles file or a directory of tiles,\n");
|
||||
fprintf(stderr, "or, if zoom/x/y is specified, a single .pbf tile.\n");
|
||||
exit(EXIT_ARGS);
|
||||
}
|
||||
|
||||
@@ -564,33 +599,10 @@ int main(int argc, char **argv) {
|
||||
std::set<std::string> exclude_meta;
|
||||
int coordinate_mode = 0;
|
||||
|
||||
struct option long_options[] = {
|
||||
{"projection", required_argument, 0, 's'},
|
||||
{"fractional-coordinates", no_argument, 0, 'F'},
|
||||
{"integer-coordinates", no_argument, 0, 'I'},
|
||||
{"maximum-zoom", required_argument, 0, 'z'},
|
||||
{"minimum-zoom", required_argument, 0, 'Z'},
|
||||
{"layer", required_argument, 0, 'l'},
|
||||
{"tag-layer-and-zoom", no_argument, 0, 'c'},
|
||||
{"stats", no_argument, 0, 'S'},
|
||||
{"force", no_argument, 0, 'f'},
|
||||
{"exclude-metadata-row", required_argument, 0, 'x'},
|
||||
{"include", required_argument, 0, 'y'},
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
strip_usage_headings(long_options, real_long_options);
|
||||
std::string getopt_str = getopt_string(real_long_options);
|
||||
|
||||
std::string getopt_str;
|
||||
for (size_t lo = 0; long_options[lo].name != NULL; lo++) {
|
||||
if (long_options[lo].val > ' ') {
|
||||
getopt_str.push_back(long_options[lo].val);
|
||||
|
||||
if (long_options[lo].has_arg == required_argument) {
|
||||
getopt_str.push_back(':');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while ((i = getopt_long(argc, argv, getopt_str.c_str(), long_options, NULL)) != -1) {
|
||||
while ((i = getopt_long(argc, argv, getopt_str.c_str(), real_long_options, NULL)) != -1) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
break;
|
||||
|
||||
+11
-8
@@ -248,9 +248,9 @@ sqlite3 *dirmeta2tmp(const char *fname) {
|
||||
if (f == NULL) {
|
||||
perror(name.c_str());
|
||||
} else {
|
||||
json_pull *jp = json_begin_file(f);
|
||||
json_object *o = json_read_tree(jp);
|
||||
if (o == NULL) {
|
||||
json_pull_ptr jp = json_begin_file(f);
|
||||
json_object_ptr o = json_read_tree(jp);
|
||||
if (o == nullptr) {
|
||||
fprintf(stderr, "%s: metadata parsing error: %s\n", name.c_str(), jp->error);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
@@ -260,19 +260,22 @@ sqlite3 *dirmeta2tmp(const char *fname) {
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < o->value.object.length; i++) {
|
||||
if (o->value.object.keys[i]->type != JSON_STRING || o->value.object.values[i]->type != JSON_STRING) {
|
||||
for (const auto &e : o->entries()) {
|
||||
// Skip, not just warn: a metadata.json from another tool may
|
||||
// have a numeric minzoom or a nested object, and string()
|
||||
// asserts on the type.
|
||||
if (e.key->type != JSON_STRING || e.value->type != JSON_STRING) {
|
||||
fprintf(stderr, "%s: non-string in metadata\n", name.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
char *sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES (%Q, %Q);", o->value.object.keys[i]->value.string.string, o->value.object.values[i]->value.string.string);
|
||||
char *sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES (%Q, %Q);", e.key->string().c_str(), e.value->string().c_str());
|
||||
if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {
|
||||
fprintf(stderr, "set %s in metadata: %s\n", o->value.object.keys[i]->value.string.string, err);
|
||||
fprintf(stderr, "set %s in metadata: %s\n", e.key->string().c_str(), err);
|
||||
}
|
||||
sqlite3_free(sql);
|
||||
}
|
||||
|
||||
json_end(jp);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
|
||||
+19
-2
@@ -1,8 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <string>
|
||||
#include <sqlite3.h>
|
||||
#include "errors.hpp"
|
||||
#include "usage.hpp"
|
||||
|
||||
void enumerate(char *fname) {
|
||||
sqlite3 *db;
|
||||
@@ -48,8 +51,20 @@ void enumerate(char *fname) {
|
||||
}
|
||||
}
|
||||
|
||||
// there are no options, but the table is still what the usage message
|
||||
// and the getopt string are derived from, so that they will keep up
|
||||
// with any options that are added later
|
||||
static const struct option long_options[] = {
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
|
||||
void usage(char **argv) {
|
||||
fprintf(stderr, "Usage: %s file.mbtiles ...\n", argv[0]);
|
||||
static const char *const forms[] = {
|
||||
"file.mbtiles ...",
|
||||
NULL,
|
||||
};
|
||||
|
||||
print_usage(stderr, argv[0], forms, long_options, NULL);
|
||||
exit(EXIT_ARGS);
|
||||
}
|
||||
|
||||
@@ -58,7 +73,9 @@ int main(int argc, char **argv) {
|
||||
// extern char *optarg;
|
||||
int i;
|
||||
|
||||
while ((i = getopt(argc, argv, "")) != -1) {
|
||||
std::string getopt_str = getopt_string(long_options);
|
||||
|
||||
while ((i = getopt_long(argc, argv, getopt_str.c_str(), long_options, NULL)) != -1) {
|
||||
usage(argv);
|
||||
}
|
||||
|
||||
|
||||
+91
-422
@@ -9,170 +9,6 @@
|
||||
#include "milo/dtoa_milo.h"
|
||||
#include "text.hpp"
|
||||
|
||||
static std::string mvt_value_to_string(mvt_value const &one, bool &fail, std::vector<std::string> const &unidecode_data) {
|
||||
switch (one.type) {
|
||||
case mvt_string:
|
||||
if (unidecode_data.size() > 0) {
|
||||
return unidecode_smash(unidecode_data, one.c_str());
|
||||
} else {
|
||||
return one.get_string_value();
|
||||
}
|
||||
case mvt_float:
|
||||
return milo::dtoa_milo(one.numeric_value.float_value);
|
||||
case mvt_double:
|
||||
return milo::dtoa_milo(one.numeric_value.double_value);
|
||||
case mvt_int:
|
||||
return std::to_string(one.numeric_value.int_value);
|
||||
case mvt_uint:
|
||||
return std::to_string(one.numeric_value.uint_value);
|
||||
case mvt_sint:
|
||||
return std::to_string(one.numeric_value.sint_value);
|
||||
case mvt_bool:
|
||||
return one.numeric_value.bool_value ? "true" : "false";
|
||||
case mvt_null:
|
||||
fail = true; // null op string => null
|
||||
return "";
|
||||
case mvt_no_such_key:
|
||||
default:
|
||||
fprintf(stderr, "unhandled mvt_type %d\n", one.type);
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
// Alter the JSON parse tree in place to replace the original match string
|
||||
// with its unidecode-smashed version.
|
||||
//
|
||||
// To avoid repeated re-smashings of the same JSON object, objects that have
|
||||
// already been smashed are marked by setting their refcon to the unidecode data.
|
||||
static void smash(std::vector<std::string> const &unidecode_data, json_object *j) {
|
||||
if (j->value.string.refcon == (void *) &unidecode_data) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string s = unidecode_smash(unidecode_data, j->value.string.string);
|
||||
j->value.string.string = (char *) realloc(j->value.string.string, s.size() + 1);
|
||||
if (j->value.string.string == NULL) {
|
||||
perror("realloc for unidecode_smash");
|
||||
exit(EXIT_MEMORY);
|
||||
}
|
||||
strcpy(j->value.string.string, s.c_str());
|
||||
j->value.string.refcon = (void *) &unidecode_data;
|
||||
}
|
||||
|
||||
int compare_fsl(mvt_value const &one, json_object *two, bool &fail, std::vector<std::string> const &unidecode_data) {
|
||||
// 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;
|
||||
|
||||
switch (one.type) {
|
||||
case mvt_string: {
|
||||
char *endptr = NULL;
|
||||
const char *s = one.c_str();
|
||||
lhs = strtod(s, &endptr);
|
||||
if (endptr == s) {
|
||||
fail = true; // non-numeric-string op number => null
|
||||
return 0;
|
||||
}
|
||||
} break;
|
||||
case mvt_float:
|
||||
lhs = one.numeric_value.float_value;
|
||||
break;
|
||||
case mvt_double:
|
||||
lhs = one.numeric_value.double_value;
|
||||
break;
|
||||
case mvt_int:
|
||||
lhs = one.numeric_value.int_value;
|
||||
break;
|
||||
case mvt_uint:
|
||||
lhs = one.numeric_value.uint_value;
|
||||
break;
|
||||
case mvt_sint:
|
||||
lhs = one.numeric_value.sint_value;
|
||||
break;
|
||||
case mvt_bool:
|
||||
lhs = one.numeric_value.bool_value;
|
||||
break;
|
||||
case mvt_null:
|
||||
fail = true; // null op number => null
|
||||
return 0;
|
||||
default:
|
||||
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, unidecode_data);
|
||||
|
||||
if (unidecode_data.size() > 0) {
|
||||
smash(unidecode_data, two);
|
||||
}
|
||||
|
||||
return strcmp(lhs.c_str(), two->value.string.string);
|
||||
}
|
||||
|
||||
if (two->type == JSON_TRUE || two->type == JSON_FALSE) {
|
||||
bool lhs;
|
||||
|
||||
switch (one.type) {
|
||||
case mvt_string:
|
||||
lhs = one.get_string_view().size() > 0;
|
||||
break;
|
||||
case mvt_float:
|
||||
lhs = one.numeric_value.float_value != 0;
|
||||
break;
|
||||
case mvt_double:
|
||||
lhs = one.numeric_value.double_value != 0;
|
||||
break;
|
||||
case mvt_int:
|
||||
lhs = one.numeric_value.int_value != 0;
|
||||
break;
|
||||
case mvt_uint:
|
||||
lhs = one.numeric_value.uint_value != 0;
|
||||
break;
|
||||
case mvt_sint:
|
||||
lhs = one.numeric_value.sint_value != 0;
|
||||
break;
|
||||
case mvt_bool:
|
||||
lhs = one.numeric_value.bool_value;
|
||||
break;
|
||||
case mvt_null:
|
||||
fail = true; // null op bool => null
|
||||
return 0;
|
||||
|
||||
case mvt_no_such_key:
|
||||
default:
|
||||
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 const &one, json_object *two, bool &fail) {
|
||||
switch (one.type) {
|
||||
case mvt_string:
|
||||
@@ -181,7 +17,7 @@ int compare(mvt_value const &one, json_object *two, bool &fail) {
|
||||
return false; // string vs non-string
|
||||
}
|
||||
|
||||
return strcmp(one.c_str(), two->value.string.string);
|
||||
return strcmp(one.c_str(), two->string().c_str());
|
||||
|
||||
case mvt_double:
|
||||
case mvt_float:
|
||||
@@ -216,9 +52,9 @@ int compare(mvt_value const &one, json_object *two, bool &fail) {
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
|
||||
if (v < two->value.number.number) {
|
||||
if (v < two->number()) {
|
||||
return -1;
|
||||
} else if (v > two->value.number.number) {
|
||||
} else if (v > two->number()) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
@@ -256,7 +92,7 @@ int compare(mvt_value const &one, json_object *two, bool &fail) {
|
||||
// 1: true
|
||||
// -1: incomparable (sql null), treated as false in final output
|
||||
static int eval(std::function<mvt_value(std::string const &)> feature, json_object *f, std::set<std::string> &exclude_attributes, std::vector<std::string> const &unidecode_data) {
|
||||
if (f != NULL) {
|
||||
if (f != nullptr) {
|
||||
if (f->type == JSON_TRUE) {
|
||||
return 1;
|
||||
} else if (f->type == JSON_FALSE) {
|
||||
@@ -266,7 +102,7 @@ static int eval(std::function<mvt_value(std::string const &)> feature, json_obje
|
||||
}
|
||||
|
||||
if (f->type == JSON_NUMBER) {
|
||||
if (f->value.number.number == 0) {
|
||||
if (f->number() == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
@@ -274,7 +110,7 @@ static int eval(std::function<mvt_value(std::string const &)> feature, json_obje
|
||||
}
|
||||
|
||||
if (f->type == JSON_STRING) {
|
||||
if (f->value.string.string[0] == '\0') {
|
||||
if (f->string().empty()) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
@@ -282,288 +118,129 @@ static int eval(std::function<mvt_value(std::string const &)> feature, json_obje
|
||||
}
|
||||
}
|
||||
|
||||
if (f == NULL || f->type != JSON_ARRAY) {
|
||||
fprintf(stderr, "Filter is not an array: %s\n", json_stringify(f));
|
||||
if (f == nullptr || f->type != JSON_ARRAY) {
|
||||
fprintf(stderr, "Filter is not an array: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
if (f->value.array.length < 1) {
|
||||
fprintf(stderr, "Array too small in filter: %s\n", json_stringify(f));
|
||||
if (f->array().size() < 1) {
|
||||
fprintf(stderr, "Array too small in filter: %s\n", json_stringify(f).c_str());
|
||||
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
|
||||
mvt_value ff = feature(std::string(f->value.array.array[0]->value.string.string));
|
||||
if (ff.type != mvt_no_such_key) {
|
||||
if (ff.type == mvt_bool) {
|
||||
lhs = ff.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, unidecode_data);
|
||||
}
|
||||
|
||||
int rhs = eval(feature, f->value.array.array[2], exclude_attributes, unidecode_data);
|
||||
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 = feature(std::string(f->value.array.array[0]->value.string.string));
|
||||
if (lhs.type == mvt_no_such_key) {
|
||||
lhs.type = mvt_null;
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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)) {
|
||||
if (lhs.type == mvt_null) {
|
||||
return -1; // null cn/nc anything => null
|
||||
}
|
||||
|
||||
std::string s = mvt_value_to_string(lhs, fail, unidecode_data);
|
||||
if (fail) {
|
||||
return -1; // null cn anything => false
|
||||
}
|
||||
|
||||
bool contains;
|
||||
if (unidecode_data.size() > 0) {
|
||||
smash(unidecode_data, f->value.array.array[2]);
|
||||
}
|
||||
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)) {
|
||||
// no null check here, since null can be in or not in
|
||||
|
||||
bool contains = false;
|
||||
for (size_t i = 0; i < f->value.array.array[2]->value.array.length; i++) {
|
||||
if (lhs.type == mvt_null) {
|
||||
if (f->value.array.array[2]->value.array.array[i]->type == JSON_NULL) {
|
||||
contains = true; // null is null
|
||||
break;
|
||||
} else {
|
||||
contains = false; // null isnt non-null
|
||||
}
|
||||
} else {
|
||||
fail = false;
|
||||
static std::vector<std::string> no_unidecode_data;
|
||||
int cmp = compare_fsl(lhs, f->value.array.array[2]->value.array.array[i], fail, no_unidecode_data);
|
||||
|
||||
if (fail) {
|
||||
contains = false; // non-null isnt null
|
||||
} else if (cmp == 0) {
|
||||
contains = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[1]->value.string.string, "in") == 0) {
|
||||
return contains;
|
||||
} else {
|
||||
return !contains;
|
||||
}
|
||||
}
|
||||
|
||||
if (lhs.type == mvt_null) {
|
||||
return -1; // null compared to anything => null
|
||||
}
|
||||
|
||||
int cmp = compare_fsl(lhs, f->value.array.array[2], fail, unidecode_data);
|
||||
if (fail) {
|
||||
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));
|
||||
if (f->array()[0]->type != JSON_STRING) {
|
||||
fprintf(stderr, "Filter operation is not a string: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "has") == 0 ||
|
||||
strcmp(f->value.array.array[0]->value.string.string, "!has") == 0) {
|
||||
if (f->value.array.length != 2) {
|
||||
fprintf(stderr, "Wrong number of array elements in filter: %s\n", json_stringify(f));
|
||||
const std::string &op = f->array()[0]->string();
|
||||
|
||||
if (op == "has" ||
|
||||
op == "!has") {
|
||||
if (f->array().size() != 2) {
|
||||
fprintf(stderr, "Wrong number of array elements in filter: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "has") == 0) {
|
||||
if (f->value.array.array[1]->type != JSON_STRING) {
|
||||
fprintf(stderr, "\"has\" key is not a string: %s\n", json_stringify(f));
|
||||
if (op == "has") {
|
||||
if (f->array()[1]->type != JSON_STRING) {
|
||||
fprintf(stderr, "\"has\" key is not a string: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
return feature(std::string(f->value.array.array[1]->value.string.string)).type != mvt_no_such_key;
|
||||
return feature(f->array()[1]->string()).type != mvt_no_such_key;
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "!has") == 0) {
|
||||
if (f->value.array.array[1]->type != JSON_STRING) {
|
||||
fprintf(stderr, "\"!has\" key is not a string: %s\n", json_stringify(f));
|
||||
if (op == "!has") {
|
||||
if (f->array()[1]->type != JSON_STRING) {
|
||||
fprintf(stderr, "\"!has\" key is not a string: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
return feature(std::string(f->value.array.array[1]->value.string.string)).type == mvt_no_such_key;
|
||||
return feature(f->array()[1]->string()).type == mvt_no_such_key;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "==") == 0 ||
|
||||
strcmp(f->value.array.array[0]->value.string.string, "!=") == 0 ||
|
||||
strcmp(f->value.array.array[0]->value.string.string, ">") == 0 ||
|
||||
strcmp(f->value.array.array[0]->value.string.string, ">=") == 0 ||
|
||||
strcmp(f->value.array.array[0]->value.string.string, "<") == 0 ||
|
||||
strcmp(f->value.array.array[0]->value.string.string, "<=") == 0) {
|
||||
if (f->value.array.length != 3) {
|
||||
fprintf(stderr, "Wrong number of array elements in filter: %s\n", json_stringify(f));
|
||||
if (op == "==" ||
|
||||
op == "!=" ||
|
||||
op == ">" ||
|
||||
op == ">=" ||
|
||||
op == "<" ||
|
||||
op == "<=") {
|
||||
if (f->array().size() != 3) {
|
||||
fprintf(stderr, "Wrong number of array elements in filter: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
if (f->value.array.array[1]->type != JSON_STRING) {
|
||||
fprintf(stderr, "comparison key is not a string: %s\n", json_stringify(f));
|
||||
if (f->array()[1]->type != JSON_STRING) {
|
||||
fprintf(stderr, "comparison key is not a string: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
mvt_value ff = feature(std::string(f->value.array.array[1]->value.string.string));
|
||||
mvt_value ff = feature(f->array()[1]->string());
|
||||
if (ff.type == mvt_no_such_key) {
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
const char *s = json_stringify(f);
|
||||
fprintf(stderr, "Warning: attribute not found for comparison: %s\n", s);
|
||||
free((void *) s);
|
||||
fprintf(stderr, "Warning: attribute not found for comparison: %s\n", json_stringify(f).c_str());
|
||||
warned = true;
|
||||
}
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "!=") == 0) {
|
||||
if (op == "!=") {
|
||||
return true; // attributes that aren't found are not equal
|
||||
}
|
||||
return false; // not found: comparison is false
|
||||
}
|
||||
|
||||
bool fail = false;
|
||||
int cmp = compare(ff, f->value.array.array[2], fail);
|
||||
int cmp = compare(ff, f->array()[2].get(), fail);
|
||||
|
||||
if (fail) {
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
const char *s = json_stringify(f);
|
||||
fprintf(stderr, "Warning: mismatched type in comparison: %s\n", s);
|
||||
free((void *) s);
|
||||
fprintf(stderr, "Warning: mismatched type in comparison: %s\n", json_stringify(f).c_str());
|
||||
warned = true;
|
||||
}
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "!=") == 0) {
|
||||
if (op == "!=") {
|
||||
return true; // mismatched types are not equal
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "==") == 0) {
|
||||
if (op == "==") {
|
||||
return cmp == 0;
|
||||
}
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "!=") == 0) {
|
||||
if (op == "!=") {
|
||||
return cmp != 0;
|
||||
}
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, ">") == 0) {
|
||||
if (op == ">") {
|
||||
return cmp > 0;
|
||||
}
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, ">=") == 0) {
|
||||
if (op == ">=") {
|
||||
return cmp >= 0;
|
||||
}
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "<") == 0) {
|
||||
if (op == "<") {
|
||||
return cmp < 0;
|
||||
}
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "<=") == 0) {
|
||||
if (op == "<=") {
|
||||
return cmp <= 0;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Internal error: can't happen: %s\n", json_stringify(f));
|
||||
fprintf(stderr, "Internal error: can't happen: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "all") == 0 ||
|
||||
strcmp(f->value.array.array[0]->value.string.string, "any") == 0 ||
|
||||
strcmp(f->value.array.array[0]->value.string.string, "none") == 0) {
|
||||
if (op == "all" ||
|
||||
op == "any" ||
|
||||
op == "none") {
|
||||
bool v;
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "all") == 0) {
|
||||
if (op == "all") {
|
||||
v = true;
|
||||
} else {
|
||||
v = false;
|
||||
}
|
||||
|
||||
for (size_t i = 1; i < f->value.array.length; i++) {
|
||||
int out = eval(feature, f->value.array.array[i], exclude_attributes, unidecode_data);
|
||||
for (size_t i = 1; i < f->array().size(); i++) {
|
||||
int out = eval(feature, f->array()[i].get(), exclude_attributes, unidecode_data);
|
||||
|
||||
if (out >= 0) { // nulls are ignored in boolean and/or expressions
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "all") == 0) {
|
||||
if (op == "all") {
|
||||
v = v && out;
|
||||
if (!v) {
|
||||
break;
|
||||
@@ -577,51 +254,47 @@ static int eval(std::function<mvt_value(std::string const &)> feature, json_obje
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "none") == 0) {
|
||||
if (op == "none") {
|
||||
return !v;
|
||||
} else {
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "in") == 0 ||
|
||||
strcmp(f->value.array.array[0]->value.string.string, "!in") == 0) {
|
||||
if (f->value.array.length < 2) {
|
||||
fprintf(stderr, "Array too small in filter: %s\n", json_stringify(f));
|
||||
if (op == "in" ||
|
||||
op == "!in") {
|
||||
if (f->array().size() < 2) {
|
||||
fprintf(stderr, "Array too small in filter: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
if (f->value.array.array[1]->type != JSON_STRING) {
|
||||
fprintf(stderr, "\"!in\" key is not a string: %s\n", json_stringify(f));
|
||||
if (f->array()[1]->type != JSON_STRING) {
|
||||
fprintf(stderr, "\"!in\" key is not a string: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
mvt_value ff = feature(std::string(f->value.array.array[1]->value.string.string));
|
||||
mvt_value ff = feature(f->array()[1]->string());
|
||||
if (ff.type == mvt_no_such_key) {
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
const char *s = json_stringify(f);
|
||||
fprintf(stderr, "Warning: attribute not found for comparison: %s\n", s);
|
||||
free((void *) s);
|
||||
fprintf(stderr, "Warning: attribute not found for comparison: %s\n", json_stringify(f).c_str());
|
||||
warned = true;
|
||||
}
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "!in") == 0) {
|
||||
if (op == "!in") {
|
||||
return true; // attributes that aren't found are not in
|
||||
}
|
||||
return false; // not found: comparison is false
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
for (size_t i = 2; i < f->value.array.length; i++) {
|
||||
for (size_t i = 2; i < f->array().size(); i++) {
|
||||
bool fail = false;
|
||||
int cmp = compare(ff, f->value.array.array[i], fail);
|
||||
int cmp = compare(ff, f->array()[i].get(), fail);
|
||||
|
||||
if (fail) {
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
const char *s = json_stringify(f);
|
||||
fprintf(stderr, "Warning: mismatched type in comparison: %s\n", s);
|
||||
free((void *) s);
|
||||
fprintf(stderr, "Warning: mismatched type in comparison: %s\n", json_stringify(f).c_str());
|
||||
warned = true;
|
||||
}
|
||||
cmp = 1;
|
||||
@@ -633,39 +306,39 @@ static int eval(std::function<mvt_value(std::string const &)> feature, json_obje
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "in") == 0) {
|
||||
if (op == "in") {
|
||||
return found;
|
||||
} else {
|
||||
return !found;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(f->value.array.array[0]->value.string.string, "attribute-filter") == 0) {
|
||||
if (f->value.array.length != 3) {
|
||||
fprintf(stderr, "Wrong number of array elements in filter: %s\n", json_stringify(f));
|
||||
if (op == "attribute-filter") {
|
||||
if (f->array().size() != 3) {
|
||||
fprintf(stderr, "Wrong number of array elements in filter: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
if (f->value.array.array[1]->type != JSON_STRING) {
|
||||
fprintf(stderr, "\"attribute-filter\" key is not a string: %s\n", json_stringify(f));
|
||||
if (f->array()[1]->type != JSON_STRING) {
|
||||
fprintf(stderr, "\"attribute-filter\" key is not a string: %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
bool ok = eval(feature, f->value.array.array[2], exclude_attributes, unidecode_data) > 0;
|
||||
bool ok = eval(feature, f->array()[2].get(), exclude_attributes, unidecode_data) > 0;
|
||||
if (!ok) {
|
||||
exclude_attributes.insert(f->value.array.array[1]->value.string.string);
|
||||
exclude_attributes.insert(f->array()[1]->string());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Unknown filter %s\n", json_stringify(f));
|
||||
fprintf(stderr, "Unknown filter %s\n", json_stringify(f).c_str());
|
||||
exit(EXIT_FILTER);
|
||||
}
|
||||
|
||||
bool evaluate(std::function<mvt_value(std::string const &)> feature, std::string const &layer, json_object *filter, std::set<std::string> &exclude_attributes, std::vector<std::string> const &unidecode_data) {
|
||||
if (filter == NULL || filter->type != JSON_HASH) {
|
||||
fprintf(stderr, "Error: filter is not a hash: %s\n", json_stringify(filter));
|
||||
static bool evaluate(std::function<mvt_value(std::string const &)> feature, std::string const &layer, json_object *filter, std::set<std::string> &exclude_attributes, std::vector<std::string> const &unidecode_data) {
|
||||
if (filter == nullptr || filter->type != JSON_HASH) {
|
||||
fprintf(stderr, "Error: filter is not a hash: %s\n", json_stringify(filter).c_str());
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
|
||||
@@ -673,47 +346,43 @@ bool evaluate(std::function<mvt_value(std::string const &)> feature, std::string
|
||||
json_object *f;
|
||||
|
||||
f = json_hash_get(filter, layer.c_str());
|
||||
if (ok && f != NULL) {
|
||||
if (ok && f != nullptr) {
|
||||
ok = eval(feature, f, exclude_attributes, unidecode_data) > 0;
|
||||
}
|
||||
|
||||
f = json_hash_get(filter, "*");
|
||||
if (ok && f != NULL) {
|
||||
if (ok && f != nullptr) {
|
||||
ok = eval(feature, f, exclude_attributes, unidecode_data) > 0;
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
json_object *read_filter(const char *fname) {
|
||||
json_object_ptr read_filter(const char *fname) {
|
||||
FILE *fp = fopen(fname, "r");
|
||||
if (fp == NULL) {
|
||||
perror(fname);
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
|
||||
json_pull *jp = json_begin_file(fp);
|
||||
json_object *filter = json_read_tree(jp);
|
||||
if (filter == NULL) {
|
||||
json_pull_ptr jp = json_begin_file(fp);
|
||||
json_object_ptr filter = json_read_tree(jp);
|
||||
if (filter == nullptr) {
|
||||
fprintf(stderr, "%s: %s\n", fname, jp->error);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
json_disconnect(filter);
|
||||
json_end(jp);
|
||||
fclose(fp);
|
||||
return filter;
|
||||
}
|
||||
|
||||
json_object *parse_filter(const char *s) {
|
||||
json_pull *jp = json_begin_string(s);
|
||||
json_object *filter = json_read_tree(jp);
|
||||
if (filter == NULL) {
|
||||
json_object_ptr parse_filter(const char *s) {
|
||||
json_pull_ptr jp = json_begin_string(s);
|
||||
json_object_ptr filter = json_read_tree(jp);
|
||||
if (filter == nullptr) {
|
||||
fprintf(stderr, "Could not parse filter %s\n", s);
|
||||
fprintf(stderr, "%s\n", jp->error);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
json_disconnect(filter);
|
||||
json_end(jp);
|
||||
return filter;
|
||||
}
|
||||
|
||||
|
||||
+7
-3
@@ -1,5 +1,5 @@
|
||||
#ifndef EVALUATOR_HPP
|
||||
#define EVALUATOR HPP
|
||||
#define EVALUATOR_HPP
|
||||
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
@@ -7,9 +7,13 @@
|
||||
#include "jsonpull/jsonpull.h"
|
||||
#include "mvt.hpp"
|
||||
|
||||
// The `filter` parameters take a borrowed pointer; the caller (in
|
||||
// main.cpp, tile-join, overzoom) keeps the json_object_ptr alive
|
||||
// across every per-feature evaluate() call. A raw pointer avoids
|
||||
// touching unique_ptr at all on this hot path.
|
||||
bool evaluate(std::unordered_map<std::string, mvt_value> const &feature, std::string const &layer, json_object *filter, std::set<std::string> &exclude_attributes, std::vector<std::string> const &unidecode_data);
|
||||
json_object *parse_filter(const char *s);
|
||||
json_object *read_filter(const char *fname);
|
||||
json_object_ptr parse_filter(const char *s);
|
||||
json_object_ptr 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, std::vector<std::string> const &unidecode_data);
|
||||
|
||||
|
||||
+10
-10
@@ -163,13 +163,13 @@ void readFeature(const FlatGeobuf::Feature *feature, long long feature_sequence_
|
||||
|
||||
serial_val sv;
|
||||
if (col_type == FlatGeobuf::ColumnType_Byte) {
|
||||
sv.type = mvt_sint;
|
||||
sv.type = mvt_double;
|
||||
int8_t byte_val;
|
||||
memcpy(&byte_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(byte_val));
|
||||
sv.s = std::to_string(byte_val);
|
||||
p_pos += sizeof(uint16_t) + sizeof(byte_val);
|
||||
} else if (col_type == FlatGeobuf::ColumnType_UByte) {
|
||||
sv.type = mvt_uint;
|
||||
sv.type = mvt_double;
|
||||
uint8_t ubyte_val;
|
||||
memcpy(&ubyte_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(ubyte_val));
|
||||
sv.s = std::to_string(ubyte_val);
|
||||
@@ -185,43 +185,43 @@ void readFeature(const FlatGeobuf::Feature *feature, long long feature_sequence_
|
||||
}
|
||||
p_pos += sizeof(uint16_t) + sizeof(bool_val);
|
||||
} else if (col_type == FlatGeobuf::ColumnType_Short) {
|
||||
sv.type = mvt_sint;
|
||||
sv.type = mvt_double;
|
||||
int16_t short_val;
|
||||
memcpy(&short_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(short_val));
|
||||
sv.s = std::to_string(short_val);
|
||||
p_pos += sizeof(uint16_t) + sizeof(short_val);
|
||||
} else if (col_type == FlatGeobuf::ColumnType_UShort) {
|
||||
sv.type = mvt_uint;
|
||||
sv.type = mvt_double;
|
||||
uint16_t ushort_val;
|
||||
memcpy(&ushort_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(ushort_val));
|
||||
sv.s = std::to_string(ushort_val);
|
||||
p_pos += sizeof(uint16_t) + sizeof(ushort_val);
|
||||
} else if (col_type == FlatGeobuf::ColumnType_Int) {
|
||||
sv.type = mvt_sint;
|
||||
sv.type = mvt_double;
|
||||
int32_t int_val;
|
||||
memcpy(&int_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(int_val));
|
||||
sv.s = std::to_string(int_val);
|
||||
p_pos += sizeof(uint16_t) + sizeof(int_val);
|
||||
} else if (col_type == FlatGeobuf::ColumnType_UInt) {
|
||||
sv.type = mvt_uint;
|
||||
sv.type = mvt_double;
|
||||
uint32_t uint_val;
|
||||
memcpy(&uint_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(uint_val));
|
||||
sv.s = std::to_string(uint_val);
|
||||
p_pos += sizeof(uint16_t) + sizeof(uint_val);
|
||||
} else if (col_type == FlatGeobuf::ColumnType_Long) {
|
||||
sv.type = mvt_sint;
|
||||
sv.type = mvt_double;
|
||||
int64_t long_val;
|
||||
memcpy(&long_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(long_val));
|
||||
sv.s = std::to_string(long_val);
|
||||
p_pos += sizeof(uint16_t) + sizeof(long_val);
|
||||
} else if (col_type == FlatGeobuf::ColumnType_ULong) {
|
||||
sv.type = mvt_uint;
|
||||
int64_t ulong_val;
|
||||
sv.type = mvt_double;
|
||||
uint64_t ulong_val;
|
||||
memcpy(&ulong_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(ulong_val));
|
||||
sv.s = std::to_string(ulong_val);
|
||||
p_pos += sizeof(uint16_t) + sizeof(ulong_val);
|
||||
} else if (col_type == FlatGeobuf::ColumnType_Float) {
|
||||
sv.type = mvt_float;
|
||||
sv.type = mvt_double;
|
||||
float float_val;
|
||||
memcpy(&float_val, feature->properties()->data() + p_pos + sizeof(uint16_t), sizeof(float_val));
|
||||
sv.s = milo::dtoa_milo(float_val);
|
||||
|
||||
+9
-12
@@ -394,28 +394,25 @@ void readFeature(protozero::pbf_reader &pbf, size_t dim, double e, std::vector<s
|
||||
|
||||
auto tip = other.find("tippecanoe");
|
||||
if (tip != other.end()) {
|
||||
json_pull *jp = json_begin_string(tip->second.s.c_str());
|
||||
json_object *o = json_read_tree(jp);
|
||||
json_pull_ptr jp = json_begin_string(tip->second.s.c_str());
|
||||
json_object_ptr o = json_read_tree(jp);
|
||||
|
||||
if (o != NULL) {
|
||||
if (o != nullptr) {
|
||||
json_object *min = json_hash_get(o, "minzoom");
|
||||
if (min != NULL && (min->type == JSON_NUMBER)) {
|
||||
sf.tippecanoe_minzoom = integer_zoom(sst->fname, milo::dtoa_milo(min->value.number.number));
|
||||
if (min != nullptr && (min->type == JSON_NUMBER)) {
|
||||
sf.tippecanoe_minzoom = integer_zoom(sst->fname, milo::dtoa_milo(min->number()));
|
||||
}
|
||||
|
||||
json_object *max = json_hash_get(o, "maxzoom");
|
||||
if (max != NULL && (max->type == JSON_NUMBER)) {
|
||||
sf.tippecanoe_maxzoom = integer_zoom(sst->fname, milo::dtoa_milo(max->value.number.number));
|
||||
if (max != nullptr && (max->type == JSON_NUMBER)) {
|
||||
sf.tippecanoe_maxzoom = integer_zoom(sst->fname, milo::dtoa_milo(max->number()));
|
||||
}
|
||||
|
||||
json_object *tlayer = json_hash_get(o, "layer");
|
||||
if (tlayer != NULL && (tlayer->type == JSON_STRING)) {
|
||||
layername = tlayer->value.string.string;
|
||||
if (tlayer != nullptr && (tlayer->type == JSON_STRING)) {
|
||||
layername = tlayer->string();
|
||||
}
|
||||
}
|
||||
|
||||
json_free(o);
|
||||
json_end(jp);
|
||||
}
|
||||
|
||||
serialize_feature(sst, sf, layername);
|
||||
|
||||
+28
-27
@@ -12,6 +12,7 @@
|
||||
#include <errno.h>
|
||||
#include "geojson-loop.hpp"
|
||||
#include "jsonpull/jsonpull.h"
|
||||
#include "text.hpp"
|
||||
|
||||
// XXX duplicated
|
||||
#define GEOM_TYPES 6
|
||||
@@ -26,34 +27,34 @@ static const char *geometry_names[GEOM_TYPES] = {
|
||||
|
||||
// XXX duplicated
|
||||
static void json_context(json_object *j) {
|
||||
char *s = json_stringify(j);
|
||||
std::string s = json_stringify(j);
|
||||
|
||||
if (strlen(s) >= 500) {
|
||||
snprintf(s + 497, strlen(s) + 1 - 497, "...");
|
||||
if (s.size() >= 500) {
|
||||
s = truncate_string(s, 497);
|
||||
s.append("...");
|
||||
}
|
||||
|
||||
fprintf(stderr, "in JSON object %s\n", s);
|
||||
free(s); // stringify
|
||||
fprintf(stderr, "in JSON object %s\n", s.c_str());
|
||||
}
|
||||
|
||||
void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
void parse_json(json_feature_action *jfa, json_pull_ptr &jp) {
|
||||
long long found_hashes = 0;
|
||||
long long found_features = 0;
|
||||
long long found_geometries = 0;
|
||||
|
||||
while (1) {
|
||||
json_object *j = json_read(jp);
|
||||
if (j == NULL) {
|
||||
if (jp->error != NULL) {
|
||||
if (j == nullptr) {
|
||||
if (jp->error != nullptr) {
|
||||
fprintf(stderr, "%s:%d: %s: ", jfa->fname.c_str(), jp->line, jp->error);
|
||||
if (jp->root != NULL) {
|
||||
json_context(jp->root);
|
||||
if (jp->root != nullptr) {
|
||||
json_context(jp->root.get());
|
||||
} else {
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
json_free(jp->root);
|
||||
jp->root.reset();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -66,7 +67,7 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
}
|
||||
|
||||
json_object *type = json_hash_get(j, "type");
|
||||
if (type == NULL || type->type != JSON_STRING) {
|
||||
if (type == nullptr || type->type != JSON_STRING) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -74,25 +75,25 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
int i;
|
||||
int is_geometry = 0;
|
||||
for (i = 0; i < GEOM_TYPES; i++) {
|
||||
if (strcmp(type->value.string.string, geometry_names[i]) == 0) {
|
||||
if (type->string() == geometry_names[i]) {
|
||||
is_geometry = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_geometry) {
|
||||
if (j->parent != NULL) {
|
||||
if (j->parent->type == JSON_ARRAY && j->parent->parent != NULL) {
|
||||
if (j->parent != nullptr) {
|
||||
if (j->parent->type == JSON_ARRAY && j->parent->parent != nullptr) {
|
||||
if (j->parent->parent->type == JSON_HASH) {
|
||||
json_object *geometries = json_hash_get(j->parent->parent, "geometries");
|
||||
if (geometries != NULL) {
|
||||
if (geometries != nullptr) {
|
||||
// Parent of Parent must be a GeometryCollection
|
||||
is_geometry = 0;
|
||||
}
|
||||
}
|
||||
} else if (j->parent->type == JSON_HASH) {
|
||||
json_object *geometry = json_hash_get(j->parent, "geometry");
|
||||
if (geometry != NULL) {
|
||||
if (geometry != nullptr) {
|
||||
// Parent must be a Feature
|
||||
is_geometry = 0;
|
||||
}
|
||||
@@ -102,8 +103,8 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
|
||||
if (is_geometry) {
|
||||
json_object *jo = j;
|
||||
while (jo != NULL) {
|
||||
if (jo->parent != NULL && jo->parent->type == JSON_HASH) {
|
||||
while (jo != nullptr) {
|
||||
if (jo->parent != nullptr && jo->parent->type == JSON_HASH) {
|
||||
if (json_hash_get(jo->parent, "properties") == jo) {
|
||||
// Ancestor is the value corresponding to a properties key
|
||||
is_geometry = 0;
|
||||
@@ -120,14 +121,14 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
}
|
||||
found_geometries++;
|
||||
|
||||
jfa->add_feature(j, false, NULL, NULL, NULL, j);
|
||||
jfa->add_feature(j, false, nullptr, nullptr, nullptr, j);
|
||||
json_free(j);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(type->value.string.string, "Feature") != 0) {
|
||||
if (strcmp(type->value.string.string, "FeatureCollection") == 0) {
|
||||
if (type->string() != "Feature") {
|
||||
if (type->string() == "FeatureCollection") {
|
||||
jfa->check_crs(j);
|
||||
json_free(j);
|
||||
}
|
||||
@@ -141,7 +142,7 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
found_features++;
|
||||
|
||||
json_object *geometry = json_hash_get(j, "geometry");
|
||||
if (geometry == NULL) {
|
||||
if (geometry == nullptr) {
|
||||
fprintf(stderr, "%s:%d: feature with no geometry: ", jfa->fname.c_str(), jp->line);
|
||||
json_context(j);
|
||||
json_free(j);
|
||||
@@ -149,7 +150,7 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
}
|
||||
|
||||
json_object *properties = json_hash_get(j, "properties");
|
||||
if (properties == NULL || (properties->type != JSON_HASH && properties->type != JSON_NULL)) {
|
||||
if (properties == nullptr || (properties->type != JSON_HASH && properties->type != JSON_NULL)) {
|
||||
fprintf(stderr, "%s:%d: feature without properties hash: ", jfa->fname.c_str(), jp->line);
|
||||
json_context(j);
|
||||
json_free(j);
|
||||
@@ -159,8 +160,8 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
bool is_feature = true;
|
||||
{
|
||||
json_object *jo = j;
|
||||
while (jo != NULL) {
|
||||
if (jo->parent != NULL && jo->parent->type == JSON_HASH) {
|
||||
while (jo != nullptr) {
|
||||
if (jo->parent != nullptr && jo->parent->type == JSON_HASH) {
|
||||
if (json_hash_get(jo->parent, "properties") == jo) {
|
||||
// Ancestor is the value corresponding to a properties key
|
||||
is_feature = false;
|
||||
@@ -178,7 +179,7 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
json_object *id = json_hash_get(j, "id");
|
||||
|
||||
json_object *geometries = json_hash_get(geometry, "geometries");
|
||||
if (geometries != NULL && geometries->type == JSON_ARRAY) {
|
||||
if (geometries != nullptr && geometries->type == JSON_ARRAY) {
|
||||
jfa->add_feature(geometries, true, properties, id, tippecanoe, j);
|
||||
} else {
|
||||
jfa->add_feature(geometry, false, properties, id, tippecanoe, j);
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ struct json_feature_action {
|
||||
virtual void check_crs(json_object *j) = 0;
|
||||
};
|
||||
|
||||
void parse_json(json_feature_action *action, json_pull *jp);
|
||||
void parse_json(json_feature_action *action, json_pull_ptr &jp);
|
||||
|
||||
+52
-50
@@ -42,7 +42,7 @@
|
||||
|
||||
int serialize_geojson_feature(struct serialization_state *sst, json_object *geometry, json_object *properties, json_object *id, int layer, json_object *tippecanoe, json_object *feature, std::string const &layername) {
|
||||
json_object *geometry_type = json_hash_get(geometry, "type");
|
||||
if (geometry_type == NULL) {
|
||||
if (geometry_type == nullptr) {
|
||||
static int warned = 0;
|
||||
if (!warned) {
|
||||
fprintf(stderr, "%s:%d: null geometry (additional not reported): ", sst->fname, sst->line);
|
||||
@@ -60,7 +60,7 @@ int serialize_geojson_feature(struct serialization_state *sst, json_object *geom
|
||||
}
|
||||
|
||||
json_object *coordinates = json_hash_get(geometry, "coordinates");
|
||||
if (coordinates == NULL || coordinates->type != JSON_ARRAY) {
|
||||
if (coordinates == nullptr || coordinates->type != JSON_ARRAY) {
|
||||
fprintf(stderr, "%s:%d: feature without coordinates array: ", sst->fname, sst->line);
|
||||
json_context(feature);
|
||||
return 0;
|
||||
@@ -68,12 +68,12 @@ int serialize_geojson_feature(struct serialization_state *sst, json_object *geom
|
||||
|
||||
int t;
|
||||
for (t = 0; t < GEOM_TYPES; t++) {
|
||||
if (strcmp(geometry_type->value.string.string, geometry_names[t]) == 0) {
|
||||
if (geometry_type->string() == geometry_names[t]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (t >= GEOM_TYPES) {
|
||||
fprintf(stderr, "%s:%d: Can't handle geometry type %s: ", sst->fname, sst->line, geometry_type->value.string.string);
|
||||
fprintf(stderr, "%s:%d: Can't handle geometry type %s: ", sst->fname, sst->line, geometry_type->string().c_str());
|
||||
json_context(feature);
|
||||
return 0;
|
||||
}
|
||||
@@ -82,48 +82,48 @@ int serialize_geojson_feature(struct serialization_state *sst, json_object *geom
|
||||
int tippecanoe_maxzoom = -1;
|
||||
std::string tippecanoe_layername = layername;
|
||||
|
||||
if (tippecanoe != NULL) {
|
||||
if (tippecanoe != nullptr) {
|
||||
json_object *min = json_hash_get(tippecanoe, "minzoom");
|
||||
if (min != NULL && (min->type == JSON_NUMBER)) {
|
||||
tippecanoe_minzoom = integer_zoom(sst->fname, milo::dtoa_milo(min->value.number.number));
|
||||
if (min != nullptr && (min->type == JSON_NUMBER)) {
|
||||
tippecanoe_minzoom = integer_zoom(sst->fname, milo::dtoa_milo(min->number()));
|
||||
}
|
||||
|
||||
json_object *max = json_hash_get(tippecanoe, "maxzoom");
|
||||
if (max != NULL && (max->type == JSON_NUMBER)) {
|
||||
tippecanoe_maxzoom = integer_zoom(sst->fname, milo::dtoa_milo(max->value.number.number));
|
||||
if (max != nullptr && (max->type == JSON_NUMBER)) {
|
||||
tippecanoe_maxzoom = integer_zoom(sst->fname, milo::dtoa_milo(max->number()));
|
||||
}
|
||||
|
||||
json_object *ln = json_hash_get(tippecanoe, "layer");
|
||||
if (ln != NULL && (ln->type == JSON_STRING)) {
|
||||
tippecanoe_layername = std::string(ln->value.string.string);
|
||||
if (ln != nullptr && (ln->type == JSON_STRING)) {
|
||||
tippecanoe_layername = ln->string();
|
||||
}
|
||||
}
|
||||
|
||||
bool has_id = false;
|
||||
unsigned long long id_value = 0;
|
||||
if (id != NULL) {
|
||||
if (id != nullptr) {
|
||||
if (id->type == JSON_NUMBER) {
|
||||
if (id->value.number.number >= 0) {
|
||||
if (id->number() >= 0) {
|
||||
char *err = NULL;
|
||||
std::string id_number = milo::dtoa_milo(id->value.number.number);
|
||||
std::string id_number = milo::dtoa_milo(id->number());
|
||||
id_value = strtoull(id_number.c_str(), &err, 10);
|
||||
|
||||
if (id->value.number.large_unsigned != 0) {
|
||||
id_value = id->value.number.large_unsigned;
|
||||
if (id->large_unsigned() != 0) {
|
||||
id_value = id->large_unsigned();
|
||||
}
|
||||
|
||||
if (err != NULL && *err != '\0') {
|
||||
static bool warned_frac = false;
|
||||
|
||||
if (!warned_frac) {
|
||||
fprintf(stderr, "Warning: Can't represent non-integer feature ID %s\n", milo::dtoa_milo(id->value.number.number).c_str());
|
||||
fprintf(stderr, "Warning: Can't represent non-integer feature ID %s\n", milo::dtoa_milo(id->number()).c_str());
|
||||
warned_frac = true;
|
||||
}
|
||||
} else if (id->value.number.large_unsigned == 0 && std::to_string(id_value) != milo::dtoa_milo(id->value.number.number)) {
|
||||
} else if (id->large_unsigned() == 0 && std::to_string(id_value) != milo::dtoa_milo(id->number())) {
|
||||
static bool warned = false;
|
||||
|
||||
if (!warned) {
|
||||
fprintf(stderr, "Warning: Can't represent too-large feature ID %s\n", milo::dtoa_milo(id->value.number.number).c_str());
|
||||
fprintf(stderr, "Warning: Can't represent too-large feature ID %s\n", milo::dtoa_milo(id->number()).c_str());
|
||||
warned = true;
|
||||
}
|
||||
} else {
|
||||
@@ -133,7 +133,7 @@ int serialize_geojson_feature(struct serialization_state *sst, json_object *geom
|
||||
static bool warned_neg = false;
|
||||
|
||||
if (!warned_neg) {
|
||||
fprintf(stderr, "Warning: Can't represent negative feature ID %s\n", milo::dtoa_milo(id->value.number.number).c_str());
|
||||
fprintf(stderr, "Warning: Can't represent negative feature ID %s\n", milo::dtoa_milo(id->number()).c_str());
|
||||
warned_neg = true;
|
||||
}
|
||||
}
|
||||
@@ -142,20 +142,20 @@ int serialize_geojson_feature(struct serialization_state *sst, json_object *geom
|
||||
|
||||
if (additional[A_CONVERT_NUMERIC_IDS] && id->type == JSON_STRING) {
|
||||
char *err = NULL;
|
||||
id_value = strtoull(id->value.string.string, &err, 10);
|
||||
id_value = strtoull(id->string().c_str(), &err, 10);
|
||||
|
||||
if (err != NULL && *err != '\0') {
|
||||
static bool warned_frac = false;
|
||||
|
||||
if (!warned_frac) {
|
||||
fprintf(stderr, "Warning: Can't represent non-integer feature ID %s\n", id->value.string.string);
|
||||
fprintf(stderr, "Warning: Can't represent non-integer feature ID %s\n", id->string().c_str());
|
||||
warned_frac = true;
|
||||
}
|
||||
} else if (std::to_string(id_value) != id->value.string.string) {
|
||||
} else if (std::to_string(id_value) != id->string()) {
|
||||
static bool warned = false;
|
||||
|
||||
if (!warned) {
|
||||
fprintf(stderr, "Warning: Can't represent too-large feature ID %s\n", id->value.string.string);
|
||||
fprintf(stderr, "Warning: Can't represent too-large feature ID %s\n", id->string().c_str());
|
||||
warned = true;
|
||||
}
|
||||
} else {
|
||||
@@ -168,33 +168,29 @@ int serialize_geojson_feature(struct serialization_state *sst, json_object *geom
|
||||
static bool warned_nan = false;
|
||||
|
||||
if (!warned_nan) {
|
||||
char *s = json_stringify(id);
|
||||
fprintf(stderr, "Warning: Can't represent non-numeric feature ID %s\n", s);
|
||||
free(s); // stringify
|
||||
fprintf(stderr, "Warning: Can't represent non-numeric feature ID %s\n", json_stringify(id).c_str());
|
||||
warned_nan = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
size_t nprop = 0;
|
||||
if (properties != NULL && properties->type == JSON_HASH) {
|
||||
nprop = properties->value.object.length;
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<std::string>> full_keys;
|
||||
std::vector<serial_val> values;
|
||||
|
||||
full_keys.reserve(nprop);
|
||||
values.reserve(nprop);
|
||||
key_pool key_pool;
|
||||
|
||||
for (size_t i = 0; i < nprop; i++) {
|
||||
if (properties->value.object.keys[i]->type == JSON_STRING) {
|
||||
serial_val sv = stringify_value(properties->value.object.values[i], sst->fname, sst->line, feature);
|
||||
if (properties != nullptr && properties->type == JSON_HASH) {
|
||||
const auto &entries = properties->entries();
|
||||
full_keys.reserve(entries.size());
|
||||
values.reserve(entries.size());
|
||||
|
||||
full_keys.emplace_back(key_pool.pool(properties->value.object.keys[i]->value.string.string));
|
||||
values.push_back(std::move(sv));
|
||||
for (const auto &e : entries) {
|
||||
if (e.key->type == JSON_STRING) {
|
||||
serial_val sv = stringify_value(e.value.get(), sst->fname, sst->line, feature);
|
||||
|
||||
full_keys.emplace_back(key_pool.pool(e.key->string()));
|
||||
values.push_back(std::move(sv));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,14 +216,14 @@ int serialize_geojson_feature(struct serialization_state *sst, json_object *geom
|
||||
|
||||
void check_crs(json_object *j, const char *reading) {
|
||||
json_object *crs = json_hash_get(j, "crs");
|
||||
if (crs != NULL) {
|
||||
if (crs != nullptr) {
|
||||
json_object *properties = json_hash_get(crs, "properties");
|
||||
if (properties != NULL) {
|
||||
if (properties != nullptr) {
|
||||
json_object *name = json_hash_get(properties, "name");
|
||||
if (name != NULL && name->type == JSON_STRING) {
|
||||
if (strcmp(name->value.string.string, projection->alias) != 0) {
|
||||
if (name != nullptr && name->type == JSON_STRING) {
|
||||
if (name->string() != projection->alias) {
|
||||
if (!quiet) {
|
||||
fprintf(stderr, "%s: Warning: GeoJSON specified projection \"%s\", not the expected \"%s\".\n", reading, name->value.string.string, projection->alias);
|
||||
fprintf(stderr, "%s: Warning: GeoJSON specified projection \"%s\", not the expected \"%s\".\n", reading, name->string().c_str(), projection->alias);
|
||||
fprintf(stderr, "%s: If \"%s\" is not the expected projection, use -s to specify the right one.\n", reading, projection->alias);
|
||||
}
|
||||
}
|
||||
@@ -242,11 +238,13 @@ struct json_serialize_action : json_feature_action {
|
||||
std::string layername;
|
||||
|
||||
int add_feature(json_object *geometry, bool geometrycollection, json_object *properties, json_object *id, json_object *tippecanoe, json_object *feature) {
|
||||
// Only json_read results reach this; a detached tree has no parser.
|
||||
assert(geometry->parser != nullptr);
|
||||
sst->line = geometry->parser->line;
|
||||
if (geometrycollection) {
|
||||
int ret = 1;
|
||||
for (size_t g = 0; g < geometry->value.array.length; g++) {
|
||||
ret &= serialize_geojson_feature(sst, geometry->value.array.array[g], properties, id, layer, tippecanoe, feature, layername);
|
||||
for (size_t g = 0; g < geometry->array().size(); g++) {
|
||||
ret &= serialize_geojson_feature(sst, geometry->array()[g].get(), properties, id, layer, tippecanoe, feature, layername);
|
||||
}
|
||||
return ret;
|
||||
} else {
|
||||
@@ -259,7 +257,7 @@ struct json_serialize_action : json_feature_action {
|
||||
}
|
||||
};
|
||||
|
||||
void parse_json(struct serialization_state *sst, json_pull *jp, int layer, std::string layername) {
|
||||
void parse_json(struct serialization_state *sst, json_pull_ptr &jp, int layer, std::string layername) {
|
||||
json_serialize_action jsa;
|
||||
jsa.fname = sst->fname;
|
||||
jsa.sst = sst;
|
||||
@@ -296,7 +294,7 @@ ssize_t json_map_read(struct json_pull *jp, char *buffer, size_t n) {
|
||||
return n;
|
||||
}
|
||||
|
||||
struct json_pull *json_begin_map(char *map, long long len) {
|
||||
json_pull_ptr json_begin_map(char *map, long long len) {
|
||||
struct jsonmap *jm = new jsonmap;
|
||||
if (jm == NULL) {
|
||||
perror("Out of memory");
|
||||
@@ -310,7 +308,11 @@ struct json_pull *json_begin_map(char *map, long long len) {
|
||||
return json_begin(json_map_read, jm);
|
||||
}
|
||||
|
||||
void json_end_map(struct json_pull *jp) {
|
||||
void json_end_map(json_pull_ptr &jp) {
|
||||
if (jp == nullptr) {
|
||||
return;
|
||||
}
|
||||
delete (struct jsonmap *) jp->source;
|
||||
jp->source = nullptr;
|
||||
json_end(jp);
|
||||
}
|
||||
|
||||
+6
-6
@@ -10,21 +10,21 @@
|
||||
#include "serial.hpp"
|
||||
|
||||
struct parse_json_args {
|
||||
json_pull *jp;
|
||||
json_pull_ptr jp;
|
||||
int layer;
|
||||
std::string *layername;
|
||||
|
||||
struct serialization_state *sst;
|
||||
|
||||
parse_json_args(json_pull *jp1, int layer1, std::string *layername1, struct serialization_state *sst1)
|
||||
: jp(jp1), layer(layer1), layername(layername1), sst(sst1) {
|
||||
parse_json_args(json_pull_ptr jp1, int layer1, std::string *layername1, struct serialization_state *sst1)
|
||||
: jp(std::move(jp1)), layer(layer1), layername(layername1), sst(sst1) {
|
||||
}
|
||||
};
|
||||
|
||||
struct json_pull *json_begin_map(char *map, long long len);
|
||||
void json_end_map(struct json_pull *jp);
|
||||
json_pull_ptr json_begin_map(char *map, long long len);
|
||||
void json_end_map(json_pull_ptr &jp);
|
||||
|
||||
void parse_json(struct serialization_state *sst, json_pull *jp, int layer, std::string layername);
|
||||
void parse_json(struct serialization_state *sst, json_pull_ptr &jp, int layer, std::string layername);
|
||||
void *run_parse_json(void *v);
|
||||
|
||||
#endif
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
#define GEOMETRY_HPP
|
||||
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <atomic>
|
||||
#include <set>
|
||||
#include <string>
|
||||
@@ -74,7 +75,7 @@ drawvec remove_noop(drawvec geom, int type, int shift);
|
||||
drawvec clip_point(drawvec &geom, int z, long long buffer);
|
||||
drawvec clean_or_clip_poly(drawvec &geom, int z, int buffer, bool clip, bool try_scaling);
|
||||
drawvec close_poly(drawvec &geom);
|
||||
drawvec reduce_tiny_poly(const drawvec &geom, int z, int detail, bool *still_needs_simplification, bool *reduced_away, double *accum_area, double tiny_polygon_size);
|
||||
drawvec reduce_tiny_poly(const drawvec &geom, int z, int detail, bool *still_needs_simplification, bool *reduced_away, double *accum_area, double tiny_polygon_size, std::function<double(drawvec const &, size_t, size_t)> const &spindle_length = nullptr);
|
||||
int clip(long long *x0, long long *y0, long long *x1, long long *y1, long long xmin, long long ymin, long long xmax, long long ymax);
|
||||
drawvec clip_lines(drawvec &geom, int z, long long buffer);
|
||||
drawvec stairstep(drawvec &geom, int z, int detail);
|
||||
|
||||
@@ -1,996 +0,0 @@
|
||||
#define _GNU_SOURCE // for asprintf()
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include "jsonpull.h"
|
||||
#include "../milo/milo.h"
|
||||
|
||||
#define BUFFER 10000
|
||||
|
||||
struct string {
|
||||
char *buf;
|
||||
size_t n;
|
||||
size_t nalloc;
|
||||
};
|
||||
|
||||
static void string_init(struct string *s);
|
||||
static void string_free(struct string *s);
|
||||
|
||||
json_pull *json_begin(ssize_t (*read)(struct json_pull *, char *buffer, size_t n), void *source) {
|
||||
json_pull *j = malloc(sizeof(json_pull));
|
||||
if (j == NULL) {
|
||||
perror("Out of memory");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
j->error = NULL;
|
||||
j->line = 1;
|
||||
j->container = NULL;
|
||||
j->root = NULL;
|
||||
|
||||
j->read = read;
|
||||
j->source = source;
|
||||
j->buffer_head = 0;
|
||||
j->buffer_tail = 0;
|
||||
|
||||
j->buffer = malloc(BUFFER);
|
||||
if (j->buffer == NULL) {
|
||||
perror("Out of memory");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
j->number_buffer = malloc(sizeof(struct string));
|
||||
if (j->number_buffer == NULL) {
|
||||
perror("Out of memory");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
string_init(j->number_buffer);
|
||||
|
||||
return j;
|
||||
}
|
||||
|
||||
static inline int peek(json_pull *j) {
|
||||
if (j->buffer_head < j->buffer_tail) {
|
||||
return (unsigned char) j->buffer[j->buffer_head];
|
||||
} else {
|
||||
j->buffer_head = 0;
|
||||
j->buffer_tail = j->read(j, j->buffer, BUFFER);
|
||||
if (j->buffer_head >= j->buffer_tail) {
|
||||
return EOF;
|
||||
}
|
||||
return (unsigned char) j->buffer[j->buffer_head];
|
||||
}
|
||||
}
|
||||
|
||||
static inline int next(json_pull *j) {
|
||||
if (j->buffer_head < j->buffer_tail) {
|
||||
return (unsigned char) j->buffer[j->buffer_head++];
|
||||
} else {
|
||||
j->buffer_head = 0;
|
||||
j->buffer_tail = j->read(j, j->buffer, BUFFER);
|
||||
if (j->buffer_head >= j->buffer_tail) {
|
||||
return EOF;
|
||||
}
|
||||
return (unsigned char) j->buffer[j->buffer_head++];
|
||||
}
|
||||
}
|
||||
|
||||
static ssize_t read_file(json_pull *j, char *buffer, size_t n) {
|
||||
return fread(buffer, 1, n, j->source);
|
||||
}
|
||||
|
||||
json_pull *json_begin_file(FILE *f) {
|
||||
return json_begin(read_file, f);
|
||||
}
|
||||
|
||||
static ssize_t read_string(json_pull *j, char *buffer, size_t n) {
|
||||
const char *cp = j->source;
|
||||
size_t out = 0;
|
||||
|
||||
while (out < n && cp[out] != '\0') {
|
||||
buffer[out] = cp[out];
|
||||
out++;
|
||||
}
|
||||
|
||||
j->source = (void *) (cp + out);
|
||||
return out;
|
||||
}
|
||||
|
||||
json_pull *json_begin_string(const char *s) {
|
||||
return json_begin(read_string, (void *) s);
|
||||
}
|
||||
|
||||
void json_end(json_pull *p) {
|
||||
string_free(p->number_buffer);
|
||||
free(p->number_buffer);
|
||||
|
||||
json_free(p->root);
|
||||
free(p->buffer);
|
||||
free(p);
|
||||
}
|
||||
|
||||
static inline int read_wrap(json_pull *j) {
|
||||
int c = next(j);
|
||||
|
||||
if (c == '\n') {
|
||||
j->line++;
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
#define SIZE_FOR(i, size) ((size_t) ((((i) + 7) & ~7) * size))
|
||||
|
||||
static json_object *fabricate_object(json_pull *jp, json_object *parent, json_type type) {
|
||||
json_object *o = malloc(sizeof(struct json_object));
|
||||
if (o == NULL) {
|
||||
perror("Out of memory");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
o->type = type;
|
||||
o->parent = parent;
|
||||
o->parser = jp;
|
||||
|
||||
if (type == JSON_ARRAY) {
|
||||
o->value.array.array = NULL;
|
||||
o->value.array.length = 0;
|
||||
} else if (type == JSON_HASH) {
|
||||
o->value.object.keys = NULL;
|
||||
o->value.object.values = NULL;
|
||||
o->value.object.length = 0;
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
static json_object *add_object(json_pull *j, json_type type) {
|
||||
json_object *c = j->container;
|
||||
json_object *o = fabricate_object(j, c, type);
|
||||
|
||||
if (c != NULL) {
|
||||
if (c->type == JSON_ARRAY) {
|
||||
if (c->expect == JSON_ITEM) {
|
||||
if (SIZE_FOR(c->value.array.length + 1, sizeof(json_object *)) != SIZE_FOR(c->value.array.length, sizeof(json_object *))) {
|
||||
if (SIZE_FOR(c->value.array.length + 1, sizeof(json_object *)) < SIZE_FOR(c->value.array.length, sizeof(json_object *))) {
|
||||
fprintf(stderr, "Array size overflow\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
c->value.array.array = realloc(c->value.array.array, SIZE_FOR(c->value.array.length + 1, sizeof(json_object *)));
|
||||
if (c->value.array.array == NULL) {
|
||||
perror("Out of memory");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
c->value.array.array[c->value.array.length++] = o;
|
||||
c->expect = JSON_COMMA;
|
||||
} else {
|
||||
j->error = "Expected a comma, not a list item";
|
||||
free(o);
|
||||
return NULL;
|
||||
}
|
||||
} else if (c->type == JSON_HASH) {
|
||||
if (c->expect == JSON_VALUE) {
|
||||
c->value.object.values[c->value.object.length - 1] = o;
|
||||
c->expect = JSON_COMMA;
|
||||
} else if (c->expect == JSON_KEY) {
|
||||
if (type != JSON_STRING) {
|
||||
j->error = "Hash key is not a string";
|
||||
free(o);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (SIZE_FOR(c->value.object.length + 1, sizeof(json_object *)) != SIZE_FOR(c->value.object.length, sizeof(json_object *))) {
|
||||
if (SIZE_FOR(c->value.object.length + 1, sizeof(json_object *)) < SIZE_FOR(c->value.object.length, sizeof(json_object *))) {
|
||||
fprintf(stderr, "Hash size overflow\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
c->value.object.keys = realloc(c->value.object.keys, SIZE_FOR(c->value.object.length + 1, sizeof(json_object *)));
|
||||
c->value.object.values = realloc(c->value.object.values, SIZE_FOR(c->value.object.length + 1, sizeof(json_object *)));
|
||||
if (c->value.object.keys == NULL || c->value.object.values == NULL) {
|
||||
perror("Out of memory");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
c->value.object.keys[c->value.object.length] = o;
|
||||
c->value.object.values[c->value.object.length] = NULL;
|
||||
c->value.object.length++;
|
||||
c->expect = JSON_COLON;
|
||||
} else {
|
||||
j->error = "Expected a comma or colon";
|
||||
free(o);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (j->root != NULL) {
|
||||
json_free(j->root);
|
||||
}
|
||||
|
||||
j->root = o;
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
json_object *json_hash_get(json_object *o, const char *s) {
|
||||
if (o == NULL || o->type != JSON_HASH) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t i;
|
||||
for (i = 0; i < o->value.object.length; i++) {
|
||||
if (o->value.object.keys[i] != NULL && o->value.object.keys[i]->type == JSON_STRING) {
|
||||
if (strcmp(o->value.object.keys[i]->value.string.string, s) == 0) {
|
||||
return o->value.object.values[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void string_init(struct string *s) {
|
||||
s->nalloc = 500;
|
||||
s->buf = malloc(s->nalloc);
|
||||
if (s->buf == NULL) {
|
||||
perror("Out of memory");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
s->n = 0;
|
||||
s->buf[0] = '\0';
|
||||
}
|
||||
|
||||
static void string_append(struct string *s, char c) {
|
||||
if (s->n + 2 >= s->nalloc) {
|
||||
size_t prev = s->nalloc;
|
||||
s->nalloc += 500;
|
||||
if (s->nalloc <= prev) {
|
||||
fprintf(stderr, "String size overflowed\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
s->buf = realloc(s->buf, s->nalloc);
|
||||
if (s->buf == NULL) {
|
||||
perror("Out of memory");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
s->buf[s->n++] = c;
|
||||
s->buf[s->n] = '\0';
|
||||
}
|
||||
|
||||
static void string_append_string(struct string *s, char *add) {
|
||||
size_t len = strlen(add);
|
||||
|
||||
if (s->n + len + 1 >= s->nalloc) {
|
||||
size_t prev = s->nalloc;
|
||||
s->nalloc += 500 + len;
|
||||
if (s->nalloc <= prev) {
|
||||
fprintf(stderr, "String size overflowed\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
s->buf = realloc(s->buf, s->nalloc);
|
||||
if (s->buf == NULL) {
|
||||
perror("Out of memory");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
for (; *add != '\0'; add++) {
|
||||
s->buf[s->n++] = *add;
|
||||
}
|
||||
|
||||
s->buf[s->n] = '\0';
|
||||
}
|
||||
|
||||
static void string_free(struct string *s) {
|
||||
free(s->buf);
|
||||
}
|
||||
|
||||
json_object *json_read_separators(json_pull *j, json_separator_callback cb, void *state) {
|
||||
int c;
|
||||
|
||||
// In case there is an error at the top level
|
||||
if (j->container == NULL) {
|
||||
if (j->root != NULL) {
|
||||
json_free(j->root);
|
||||
}
|
||||
|
||||
j->root = NULL;
|
||||
}
|
||||
|
||||
again:
|
||||
c = read_wrap(j);
|
||||
if (c == EOF) {
|
||||
if (j->container != NULL) {
|
||||
j->error = "Reached EOF without all containers being closed";
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
/////////////////////////// Byte order mark
|
||||
|
||||
case 0xEF: {
|
||||
int c2 = peek(j);
|
||||
if (c2 == 0xBB) {
|
||||
c2 = read_wrap(j);
|
||||
c2 = peek(j);
|
||||
if (c2 == 0xBF) {
|
||||
c2 = read_wrap(j);
|
||||
c = ' ';
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
j->error = "Corrupt byte-order mark found";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/////////////////////////// Whitespace
|
||||
|
||||
case ' ':
|
||||
case '\t':
|
||||
case '\r':
|
||||
case '\n':
|
||||
case 0x1E:
|
||||
goto again;
|
||||
|
||||
/////////////////////////// Arrays
|
||||
|
||||
case '[': {
|
||||
json_object *o = add_object(j, JSON_ARRAY);
|
||||
if (o == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
j->container = o;
|
||||
j->container->expect = JSON_ITEM;
|
||||
|
||||
if (cb != NULL) {
|
||||
cb(JSON_ARRAY, j, state);
|
||||
}
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
case ']': {
|
||||
if (j->container == NULL) {
|
||||
j->error = "Found ] at top level";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (j->container->type != JSON_ARRAY) {
|
||||
j->error = "Found ] not in an array";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (j->container->expect != JSON_COMMA) {
|
||||
if (!(j->container->expect == JSON_ITEM && j->container->value.array.length == 0)) {
|
||||
j->error = "Found ] without final element";
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
json_object *ret = j->container;
|
||||
j->container = ret->parent;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/////////////////////////// Hashes
|
||||
|
||||
case '{': {
|
||||
json_object *o = add_object(j, JSON_HASH);
|
||||
if (o == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
j->container = o;
|
||||
j->container->expect = JSON_KEY;
|
||||
|
||||
if (cb != NULL) {
|
||||
cb(JSON_HASH, j, state);
|
||||
}
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
case '}': {
|
||||
if (j->container == NULL) {
|
||||
j->error = "Found } at top level";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (j->container->type != JSON_HASH) {
|
||||
j->error = "Found } not in a hash";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (j->container->expect != JSON_COMMA) {
|
||||
if (!(j->container->expect == JSON_KEY && j->container->value.object.length == 0)) {
|
||||
j->error = "Found } without final element";
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
json_object *ret = j->container;
|
||||
j->container = ret->parent;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/////////////////////////// Null
|
||||
|
||||
case 'n': {
|
||||
if (read_wrap(j) != 'u' || read_wrap(j) != 'l' || read_wrap(j) != 'l') {
|
||||
j->error = "Found misspelling of null";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return add_object(j, JSON_NULL);
|
||||
}
|
||||
|
||||
/////////////////////////// NaN
|
||||
|
||||
case 'N': {
|
||||
if (read_wrap(j) != 'a' || read_wrap(j) != 'N') {
|
||||
j->error = "Found misspelling of NaN";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
j->error = "JSON does not allow NaN";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/////////////////////////// Infinity
|
||||
|
||||
case 'I': {
|
||||
if (read_wrap(j) != 'n' || read_wrap(j) != 'f' || read_wrap(j) != 'i' ||
|
||||
read_wrap(j) != 'n' || read_wrap(j) != 'i' || read_wrap(j) != 't' ||
|
||||
read_wrap(j) != 'y') {
|
||||
j->error = "Found misspelling of Infinity";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
j->error = "JSON does not allow Infinity";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/////////////////////////// True
|
||||
|
||||
case 't': {
|
||||
if (read_wrap(j) != 'r' || read_wrap(j) != 'u' || read_wrap(j) != 'e') {
|
||||
j->error = "Found misspelling of true";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return add_object(j, JSON_TRUE);
|
||||
}
|
||||
|
||||
/////////////////////////// False
|
||||
|
||||
case 'f': {
|
||||
if (read_wrap(j) != 'a' || read_wrap(j) != 'l' || read_wrap(j) != 's' || read_wrap(j) != 'e') {
|
||||
j->error = "Found misspelling of false";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return add_object(j, JSON_FALSE);
|
||||
}
|
||||
|
||||
/////////////////////////// Comma
|
||||
|
||||
case ',': {
|
||||
if (j->container != NULL) {
|
||||
if (j->container->expect != JSON_COMMA) {
|
||||
j->error = "Found unexpected comma";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (j->container->type == JSON_HASH) {
|
||||
j->container->expect = JSON_KEY;
|
||||
} else {
|
||||
j->container->expect = JSON_ITEM;
|
||||
}
|
||||
}
|
||||
|
||||
if (cb != NULL) {
|
||||
cb(JSON_COMMA, j, state);
|
||||
}
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
/////////////////////////// Colon
|
||||
|
||||
case ':': {
|
||||
if (j->container == NULL) {
|
||||
j->error = "Found colon at top level";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (j->container->expect != JSON_COLON) {
|
||||
j->error = "Found unexpected colon";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
j->container->expect = JSON_VALUE;
|
||||
|
||||
if (cb != NULL) {
|
||||
cb(JSON_COLON, j, state);
|
||||
}
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
/////////////////////////// Numbers
|
||||
|
||||
case '-':
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9': {
|
||||
j->number_buffer->n = 0;
|
||||
int decimal = 0;
|
||||
|
||||
if (c == '-') {
|
||||
string_append(j->number_buffer, c);
|
||||
c = read_wrap(j);
|
||||
}
|
||||
|
||||
if (c == '0') {
|
||||
string_append(j->number_buffer, c);
|
||||
} else if (c >= '1' && c <= '9') {
|
||||
string_append(j->number_buffer, c);
|
||||
c = peek(j);
|
||||
|
||||
while (c >= '0' && c <= '9') {
|
||||
string_append(j->number_buffer, read_wrap(j));
|
||||
c = peek(j);
|
||||
}
|
||||
}
|
||||
|
||||
if (peek(j) == '.') {
|
||||
string_append(j->number_buffer, read_wrap(j));
|
||||
decimal = 1;
|
||||
|
||||
c = peek(j);
|
||||
if (c < '0' || c > '9') {
|
||||
j->error = "Decimal point without digits";
|
||||
string_free(j->number_buffer);
|
||||
return NULL;
|
||||
}
|
||||
while (c >= '0' && c <= '9') {
|
||||
string_append(j->number_buffer, read_wrap(j));
|
||||
c = peek(j);
|
||||
}
|
||||
}
|
||||
|
||||
c = peek(j);
|
||||
if (c == 'e' || c == 'E') {
|
||||
string_append(j->number_buffer, read_wrap(j));
|
||||
decimal = 1;
|
||||
|
||||
c = peek(j);
|
||||
if (c == '+' || c == '-') {
|
||||
string_append(j->number_buffer, read_wrap(j));
|
||||
}
|
||||
|
||||
c = peek(j);
|
||||
if (c < '0' || c > '9') {
|
||||
j->error = "Exponent without digits";
|
||||
string_free(j->number_buffer);
|
||||
return NULL;
|
||||
}
|
||||
while (c >= '0' && c <= '9') {
|
||||
string_append(j->number_buffer, read_wrap(j));
|
||||
c = peek(j);
|
||||
}
|
||||
}
|
||||
|
||||
json_object *n = add_object(j, JSON_NUMBER);
|
||||
if (n != NULL) {
|
||||
n->value.number.number = atof(j->number_buffer->buf);
|
||||
n->value.number.large_signed = 0;
|
||||
n->value.number.large_unsigned = 0;
|
||||
|
||||
#define MAX_SAFE_INTEGER 9007199254740991.0
|
||||
#define MIN_SAFE_INTEGER -9007199254740991.0
|
||||
|
||||
if (!decimal && n->value.number.number > MAX_SAFE_INTEGER) {
|
||||
errno = 0;
|
||||
char *err = NULL;
|
||||
unsigned long long ull = strtoull(j->number_buffer->buf, &err, 10);
|
||||
if (errno == 0 && (err == NULL || *err == '\0')) {
|
||||
n->value.number.large_unsigned = ull;
|
||||
}
|
||||
}
|
||||
if (!decimal && n->value.number.number < MIN_SAFE_INTEGER) {
|
||||
errno = 0;
|
||||
char *err = NULL;
|
||||
long long ll = strtoll(j->number_buffer->buf, &err, 10);
|
||||
if (errno == 0 && (err == NULL || *err == '\0')) {
|
||||
n->value.number.large_signed = ll;
|
||||
}
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/////////////////////////// Strings
|
||||
|
||||
case '"': {
|
||||
struct string val;
|
||||
string_init(&val);
|
||||
|
||||
int surrogate = -1;
|
||||
while ((c = read_wrap(j)) != EOF) {
|
||||
if (c == '"') {
|
||||
if (surrogate >= 0) {
|
||||
string_append(&val, 0xE0 | (surrogate >> 12));
|
||||
string_append(&val, 0x80 | ((surrogate >> 6) & 0x3F));
|
||||
string_append(&val, 0x80 | (surrogate & 0x3F));
|
||||
surrogate = -1;
|
||||
}
|
||||
|
||||
break;
|
||||
} else if (c == '\\') {
|
||||
c = read_wrap(j);
|
||||
|
||||
if (c == 'u') {
|
||||
char hex[5] = "aaaa";
|
||||
int i;
|
||||
for (i = 0; i < 4; i++) {
|
||||
hex[i] = read_wrap(j);
|
||||
if (hex[i] < '0' || (hex[i] > '9' && hex[i] < 'A') || (hex[i] > 'F' && hex[i] < 'a') || hex[i] > 'f') {
|
||||
j->error = "Invalid \\u hex character";
|
||||
string_free(&val);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long ch = strtoul(hex, NULL, 16);
|
||||
if (ch >= 0xd800 && ch <= 0xdbff) {
|
||||
if (surrogate < 0) {
|
||||
surrogate = ch;
|
||||
} else {
|
||||
// Impossible surrogate, so output the first half,
|
||||
// keep what might be a legitimate new first half.
|
||||
string_append(&val, 0xE0 | (surrogate >> 12));
|
||||
string_append(&val, 0x80 | ((surrogate >> 6) & 0x3F));
|
||||
string_append(&val, 0x80 | (surrogate & 0x3F));
|
||||
surrogate = ch;
|
||||
}
|
||||
continue;
|
||||
} else if (ch >= 0xdc00 && c <= 0xdfff) {
|
||||
if (surrogate >= 0) {
|
||||
long c1 = surrogate - 0xd800;
|
||||
long c2 = ch - 0xdc00;
|
||||
ch = ((c1 << 10) | c2) + 0x010000;
|
||||
surrogate = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (surrogate >= 0) {
|
||||
string_append(&val, 0xE0 | (surrogate >> 12));
|
||||
string_append(&val, 0x80 | ((surrogate >> 6) & 0x3F));
|
||||
string_append(&val, 0x80 | (surrogate & 0x3F));
|
||||
surrogate = -1;
|
||||
}
|
||||
|
||||
if (ch <= 0x7F) {
|
||||
string_append(&val, ch);
|
||||
} else if (ch <= 0x7FF) {
|
||||
string_append(&val, 0xC0 | (ch >> 6));
|
||||
string_append(&val, 0x80 | (ch & 0x3F));
|
||||
} else if (ch < 0xFFFF) {
|
||||
string_append(&val, 0xE0 | (ch >> 12));
|
||||
string_append(&val, 0x80 | ((ch >> 6) & 0x3F));
|
||||
string_append(&val, 0x80 | (ch & 0x3F));
|
||||
} else {
|
||||
string_append(&val, 0xF0 | (ch >> 18));
|
||||
string_append(&val, 0x80 | ((ch >> 12) & 0x3F));
|
||||
string_append(&val, 0x80 | ((ch >> 6) & 0x3F));
|
||||
string_append(&val, 0x80 | (ch & 0x3F));
|
||||
}
|
||||
} else {
|
||||
if (surrogate >= 0) {
|
||||
string_append(&val, 0xE0 | (surrogate >> 12));
|
||||
string_append(&val, 0x80 | ((surrogate >> 6) & 0x3F));
|
||||
string_append(&val, 0x80 | (surrogate & 0x3F));
|
||||
surrogate = -1;
|
||||
}
|
||||
|
||||
if (c == '"') {
|
||||
string_append(&val, '"');
|
||||
} else if (c == '\\') {
|
||||
string_append(&val, '\\');
|
||||
} else if (c == '/') {
|
||||
string_append(&val, '/');
|
||||
} else if (c == 'b') {
|
||||
string_append(&val, '\b');
|
||||
} else if (c == 'f') {
|
||||
string_append(&val, '\f');
|
||||
} else if (c == 'n') {
|
||||
string_append(&val, '\n');
|
||||
} else if (c == 'r') {
|
||||
string_append(&val, '\r');
|
||||
} else if (c == 't') {
|
||||
string_append(&val, '\t');
|
||||
} else {
|
||||
j->error = "Found backslash followed by unknown character";
|
||||
string_free(&val);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
} else if (c < ' ') {
|
||||
j->error = "Found control character in string";
|
||||
string_free(&val);
|
||||
return NULL;
|
||||
} else {
|
||||
if (surrogate >= 0) {
|
||||
string_append(&val, 0xE0 | (surrogate >> 12));
|
||||
string_append(&val, 0x80 | ((surrogate >> 6) & 0x3F));
|
||||
string_append(&val, 0x80 | (surrogate & 0x3F));
|
||||
surrogate = -1;
|
||||
}
|
||||
|
||||
string_append(&val, c);
|
||||
}
|
||||
}
|
||||
if (c == EOF) {
|
||||
j->error = "String without closing quote mark";
|
||||
string_free(&val);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
json_object *s = add_object(j, JSON_STRING);
|
||||
if (s != NULL) {
|
||||
s->value.string.string = val.buf;
|
||||
s->value.string.refcon = NULL;
|
||||
} else {
|
||||
string_free(&val);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
j->error = "Found unexpected character";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
json_object *json_read(json_pull *j) {
|
||||
return json_read_separators(j, NULL, NULL);
|
||||
}
|
||||
|
||||
json_object *json_read_tree(json_pull *p) {
|
||||
json_object *j;
|
||||
|
||||
while ((j = json_read(p)) != NULL) {
|
||||
if (j->parent == NULL) {
|
||||
return j;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void json_free(json_object *o) {
|
||||
size_t i;
|
||||
|
||||
if (o == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Free any data linked from here
|
||||
|
||||
if (o->type == JSON_ARRAY) {
|
||||
json_object **a = o->value.array.array;
|
||||
size_t n = o->value.array.length;
|
||||
|
||||
o->value.array.array = NULL;
|
||||
o->value.array.length = 0;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
json_free(a[i]);
|
||||
}
|
||||
|
||||
free(a);
|
||||
} else if (o->type == JSON_HASH) {
|
||||
json_object **k = o->value.object.keys;
|
||||
json_object **v = o->value.object.values;
|
||||
size_t n = o->value.object.length;
|
||||
|
||||
o->value.object.keys = NULL;
|
||||
o->value.object.values = NULL;
|
||||
o->value.object.length = 0;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
json_free(k[i]);
|
||||
json_free(v[i]);
|
||||
}
|
||||
|
||||
free(k);
|
||||
free(v);
|
||||
} else if (o->type == JSON_STRING) {
|
||||
free(o->value.string.string);
|
||||
} else if (o->type == JSON_NUMBER) {
|
||||
;
|
||||
}
|
||||
|
||||
json_disconnect(o);
|
||||
|
||||
free(o);
|
||||
}
|
||||
|
||||
static void json_disconnect_parser(json_object *o) {
|
||||
if (o->type == JSON_HASH) {
|
||||
size_t i;
|
||||
for (i = 0; i < o->value.object.length; i++) {
|
||||
json_disconnect_parser(o->value.object.keys[i]);
|
||||
json_disconnect_parser(o->value.object.values[i]);
|
||||
}
|
||||
} else if (o->type == JSON_ARRAY) {
|
||||
size_t i;
|
||||
for (i = 0; i < o->value.array.length; i++) {
|
||||
json_disconnect_parser(o->value.array.array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
o->parser = NULL;
|
||||
}
|
||||
|
||||
void json_disconnect(json_object *o) {
|
||||
// Expunge references to this as an array element
|
||||
// or a hash key or value.
|
||||
|
||||
if (o->parent != NULL) {
|
||||
if (o->parent->type == JSON_ARRAY) {
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < o->parent->value.array.length; i++) {
|
||||
if (o->parent->value.array.array[i] == o) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i < o->parent->value.array.length) {
|
||||
memmove(o->parent->value.array.array + i, o->parent->value.array.array + i + 1, o->parent->value.array.length - i - 1);
|
||||
o->parent->value.array.length--;
|
||||
}
|
||||
}
|
||||
|
||||
if (o->parent->type == JSON_HASH) {
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < o->parent->value.object.length; i++) {
|
||||
if (o->parent->value.object.keys[i] == o) {
|
||||
o->parent->value.object.keys[i] = fabricate_object(o->parser, o->parent, JSON_NULL);
|
||||
break;
|
||||
}
|
||||
if (o->parent->value.object.values[i] == o) {
|
||||
o->parent->value.object.values[i] = fabricate_object(o->parser, o->parent, JSON_NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i < o->parent->value.object.length) {
|
||||
if (o->parent->value.object.keys[i] != NULL && o->parent->value.object.keys[i]->type == JSON_NULL) {
|
||||
if (o->parent->value.object.values[i] != NULL && o->parent->value.object.values[i]->type == JSON_NULL) {
|
||||
free(o->parent->value.object.keys[i]);
|
||||
free(o->parent->value.object.values[i]);
|
||||
|
||||
memmove(o->parent->value.object.keys + i, o->parent->value.object.keys + i + 1, o->parent->value.object.length - i - 1);
|
||||
memmove(o->parent->value.object.values + i, o->parent->value.object.values + i + 1, o->parent->value.object.length - i - 1);
|
||||
o->parent->value.object.length--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (o->parser != NULL && o->parser->root == o) {
|
||||
o->parser->root = NULL;
|
||||
}
|
||||
|
||||
json_disconnect_parser(o);
|
||||
o->parent = NULL;
|
||||
}
|
||||
|
||||
static void json_print_one(struct string *val, json_object *o) {
|
||||
if (o == NULL) {
|
||||
string_append_string(val, "...");
|
||||
} else if (o->type == JSON_STRING) {
|
||||
string_append(val, '\"');
|
||||
|
||||
char *cp;
|
||||
for (cp = o->value.string.string; *cp != '\0'; cp++) {
|
||||
if (*cp == '\\' || *cp == '"') {
|
||||
string_append(val, '\\');
|
||||
string_append(val, *cp);
|
||||
} else if (*cp >= 0 && *cp < ' ') {
|
||||
char *s;
|
||||
if (asprintf(&s, "\\u%04x", *cp) >= 0) {
|
||||
string_append_string(val, s);
|
||||
free(s);
|
||||
}
|
||||
} else {
|
||||
string_append(val, *cp);
|
||||
}
|
||||
}
|
||||
|
||||
string_append(val, '\"');
|
||||
} else if (o->type == JSON_NUMBER) {
|
||||
if (o->value.number.large_signed != 0) {
|
||||
char s[65];
|
||||
sprintf(s, "%lld", o->value.number.large_signed);
|
||||
string_append_string(val, s);
|
||||
} else if (o->value.number.large_unsigned != 0) {
|
||||
char s[65];
|
||||
sprintf(s, "%llu", o->value.number.large_unsigned);
|
||||
string_append_string(val, s);
|
||||
} else {
|
||||
char *s = dtoa_milo(o->value.number.number);
|
||||
string_append_string(val, s);
|
||||
free(s);
|
||||
}
|
||||
} else if (o->type == JSON_NULL) {
|
||||
string_append_string(val, "null");
|
||||
} else if (o->type == JSON_TRUE) {
|
||||
string_append_string(val, "true");
|
||||
} else if (o->type == JSON_FALSE) {
|
||||
string_append_string(val, "false");
|
||||
} else if (o->type == JSON_HASH) {
|
||||
string_append(val, '}');
|
||||
} else if (o->type == JSON_ARRAY) {
|
||||
string_append(val, ']');
|
||||
}
|
||||
}
|
||||
|
||||
static void json_print(struct string *val, json_object *o) {
|
||||
if (o == NULL) {
|
||||
// Hash value in incompletely read hash
|
||||
string_append_string(val, "...");
|
||||
} else if (o->type == JSON_HASH) {
|
||||
string_append(val, '{');
|
||||
|
||||
size_t i;
|
||||
for (i = 0; i < o->value.object.length; i++) {
|
||||
json_print(val, o->value.object.keys[i]);
|
||||
string_append(val, ':');
|
||||
json_print(val, o->value.object.values[i]);
|
||||
if (i + 1 < o->value.object.length) {
|
||||
string_append(val, ',');
|
||||
}
|
||||
}
|
||||
string_append(val, '}');
|
||||
} else if (o->type == JSON_ARRAY) {
|
||||
string_append(val, '[');
|
||||
size_t i;
|
||||
for (i = 0; i < o->value.array.length; i++) {
|
||||
json_print(val, o->value.array.array[i]);
|
||||
if (i + 1 < o->value.array.length) {
|
||||
string_append(val, ',');
|
||||
}
|
||||
}
|
||||
string_append(val, ']');
|
||||
} else {
|
||||
json_print_one(val, o);
|
||||
}
|
||||
}
|
||||
|
||||
char *json_stringify(json_object *o) {
|
||||
struct string val;
|
||||
string_init(&val);
|
||||
json_print(&val, o);
|
||||
|
||||
return val.buf;
|
||||
}
|
||||
@@ -0,0 +1,857 @@
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE // for asprintf()
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "jsonpull.h"
|
||||
#include "../milo/milo.h"
|
||||
|
||||
#define BUFFER 10000
|
||||
|
||||
json_pull_ptr json_begin(ssize_t (*read)(struct json_pull *, char *buffer, size_t n), void *source) {
|
||||
auto j = std::make_shared<json_pull>();
|
||||
j->read = read;
|
||||
j->source = source;
|
||||
j->buffer.resize(BUFFER);
|
||||
return j;
|
||||
}
|
||||
|
||||
static inline int peek(json_pull *j) {
|
||||
if (j->buffer_head < j->buffer_tail) {
|
||||
return (unsigned char) j->buffer[j->buffer_head];
|
||||
} else {
|
||||
j->buffer_head = 0;
|
||||
j->buffer_tail = j->read(j, j->buffer.data(), BUFFER);
|
||||
if (j->buffer_head >= j->buffer_tail) {
|
||||
return EOF;
|
||||
}
|
||||
return (unsigned char) j->buffer[j->buffer_head];
|
||||
}
|
||||
}
|
||||
|
||||
static inline int next(json_pull *j) {
|
||||
if (j->buffer_head < j->buffer_tail) {
|
||||
return (unsigned char) j->buffer[j->buffer_head++];
|
||||
} else {
|
||||
j->buffer_head = 0;
|
||||
j->buffer_tail = j->read(j, j->buffer.data(), BUFFER);
|
||||
if (j->buffer_head >= j->buffer_tail) {
|
||||
return EOF;
|
||||
}
|
||||
return (unsigned char) j->buffer[j->buffer_head++];
|
||||
}
|
||||
}
|
||||
|
||||
static ssize_t read_file(json_pull *j, char *buffer, size_t n) {
|
||||
return fread(buffer, 1, n, (FILE *) j->source);
|
||||
}
|
||||
|
||||
json_pull_ptr json_begin_file(FILE *f) {
|
||||
return json_begin(read_file, f);
|
||||
}
|
||||
|
||||
static ssize_t read_string(json_pull *j, char *buffer, size_t n) {
|
||||
const char *cp = (const char *) j->source;
|
||||
size_t out = 0;
|
||||
|
||||
while (out < n && cp[out] != '\0') {
|
||||
buffer[out] = cp[out];
|
||||
out++;
|
||||
}
|
||||
|
||||
j->source = (void *) (cp + out);
|
||||
return out;
|
||||
}
|
||||
|
||||
json_pull_ptr json_begin_string(const char *s) {
|
||||
return json_begin(read_string, (void *) s);
|
||||
}
|
||||
|
||||
void json_end(json_pull_ptr &p) {
|
||||
p.reset();
|
||||
}
|
||||
|
||||
static inline int read_wrap(json_pull *j) {
|
||||
int c = next(j);
|
||||
|
||||
if (c == '\n') {
|
||||
j->line++;
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
// JSON_TRUE / JSON_FALSE / JSON_NULL and the parse-token types are bare
|
||||
// json_objects; the value-bearing types each get their own subclass.
|
||||
static json_object_ptr make_object(json_type type, json_object *parent, json_pull *jp) {
|
||||
switch (type) {
|
||||
case JSON_NUMBER:
|
||||
return json_object_ptr(new json_number(parent, jp));
|
||||
case JSON_STRING:
|
||||
return json_object_ptr(new json_string(parent, jp));
|
||||
case JSON_ARRAY:
|
||||
return json_object_ptr(new json_array(parent, jp));
|
||||
case JSON_HASH:
|
||||
return json_object_ptr(new json_hash(parent, jp));
|
||||
default:
|
||||
return json_object_ptr(new json_object(type, parent, jp));
|
||||
}
|
||||
}
|
||||
|
||||
static inline json_pull::parse_frame *current_frame(json_pull *j) {
|
||||
return j->container_stack.empty() ? nullptr : &j->container_stack.back();
|
||||
}
|
||||
|
||||
// Install a new node of `type` in the current container, or as the parser's
|
||||
// root if the stack is empty. Returns it borrowed, or nullptr after setting
|
||||
// j->error.
|
||||
static json_object *add_object(json_pull *j, json_type type) {
|
||||
json_pull::parse_frame *f = current_frame(j);
|
||||
json_object *c = f ? f->container : nullptr;
|
||||
json_object_ptr o = make_object(type, c, j);
|
||||
json_object *raw = o.get();
|
||||
|
||||
if (f != nullptr) {
|
||||
if (c->type == JSON_ARRAY) {
|
||||
if (f->expect == JSON_ITEM) {
|
||||
c->array().push_back(std::move(o));
|
||||
f->expect = JSON_COMMA;
|
||||
} else {
|
||||
j->error = "Expected a comma, not a list item";
|
||||
return nullptr;
|
||||
}
|
||||
} else if (c->type == JSON_HASH) {
|
||||
if (f->expect == JSON_VALUE) {
|
||||
// A colon is the only thing that sets JSON_VALUE, and it
|
||||
// requires a key already pushed.
|
||||
assert(!c->entries().empty());
|
||||
c->entries().back().value = std::move(o);
|
||||
f->expect = JSON_COMMA;
|
||||
} else if (f->expect == JSON_KEY) {
|
||||
if (type != JSON_STRING) {
|
||||
j->error = "Hash key is not a string";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
c->entries().push_back({std::move(o), nullptr});
|
||||
f->expect = JSON_COLON;
|
||||
} else {
|
||||
j->error = "Expected a comma or colon";
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Replacing the parser's root destroys the previous top-level
|
||||
// value (if no one called json_disconnect / json_read_tree to
|
||||
// take ownership of it).
|
||||
j->root = std::move(o);
|
||||
}
|
||||
|
||||
return raw;
|
||||
}
|
||||
|
||||
json_object *json_hash_get(json_object *o, const char *s) {
|
||||
if (o == nullptr || o->type != JSON_HASH) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (const auto &e : o->entries()) {
|
||||
if (e.key != nullptr && e.key->type == JSON_STRING && e.key->string() == s) {
|
||||
return e.value.get();
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
json_object *json_hash_get(const json_object_ptr &o, const char *s) {
|
||||
return json_hash_get(o.get(), s);
|
||||
}
|
||||
|
||||
json_object *json_read_separators(json_pull_ptr &jp, json_separator_callback cb, void *state) {
|
||||
int c;
|
||||
json_pull *j = jp.get();
|
||||
|
||||
// In case there is an error at the top level
|
||||
if (j->container_stack.empty()) {
|
||||
j->root.reset();
|
||||
}
|
||||
|
||||
again:
|
||||
c = read_wrap(j);
|
||||
if (c == EOF) {
|
||||
if (!j->container_stack.empty()) {
|
||||
j->error = "Reached EOF without all containers being closed";
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
/////////////////////////// Byte order mark
|
||||
|
||||
case 0xEF: {
|
||||
int c2 = peek(j);
|
||||
if (c2 == 0xBB) {
|
||||
c2 = read_wrap(j);
|
||||
c2 = peek(j);
|
||||
if (c2 == 0xBF) {
|
||||
c2 = read_wrap(j);
|
||||
c = ' ';
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
j->error = "Corrupt byte-order mark found";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/////////////////////////// Whitespace
|
||||
|
||||
case ' ':
|
||||
case '\t':
|
||||
case '\r':
|
||||
case '\n':
|
||||
case 0x1E:
|
||||
goto again;
|
||||
|
||||
/////////////////////////// Arrays
|
||||
|
||||
case '[': {
|
||||
json_object *o = add_object(j, JSON_ARRAY);
|
||||
if (o == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
j->container_stack.push_back({o, JSON_ITEM});
|
||||
|
||||
if (cb != nullptr) {
|
||||
cb(JSON_ARRAY, j, state);
|
||||
}
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
case ']': {
|
||||
json_pull::parse_frame *f = current_frame(j);
|
||||
if (f == nullptr) {
|
||||
j->error = "Found ] at top level";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
json_object *cc = f->container;
|
||||
if (cc->type != JSON_ARRAY) {
|
||||
j->error = "Found ] not in an array";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (f->expect != JSON_COMMA) {
|
||||
if (!(f->expect == JSON_ITEM && cc->array().size() == 0)) {
|
||||
j->error = "Found ] without final element";
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
j->container_stack.pop_back();
|
||||
return cc;
|
||||
}
|
||||
|
||||
/////////////////////////// Hashes
|
||||
|
||||
case '{': {
|
||||
json_object *o = add_object(j, JSON_HASH);
|
||||
if (o == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
j->container_stack.push_back({o, JSON_KEY});
|
||||
|
||||
if (cb != nullptr) {
|
||||
cb(JSON_HASH, j, state);
|
||||
}
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
case '}': {
|
||||
json_pull::parse_frame *f = current_frame(j);
|
||||
if (f == nullptr) {
|
||||
j->error = "Found } at top level";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
json_object *cc = f->container;
|
||||
if (cc->type != JSON_HASH) {
|
||||
j->error = "Found } not in a hash";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (f->expect != JSON_COMMA) {
|
||||
if (!(f->expect == JSON_KEY && cc->entries().size() == 0)) {
|
||||
j->error = "Found } without final element";
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
j->container_stack.pop_back();
|
||||
return cc;
|
||||
}
|
||||
|
||||
/////////////////////////// Null
|
||||
|
||||
case 'n': {
|
||||
if (read_wrap(j) != 'u' || read_wrap(j) != 'l' || read_wrap(j) != 'l') {
|
||||
j->error = "Found misspelling of null";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return add_object(j, JSON_NULL);
|
||||
}
|
||||
|
||||
/////////////////////////// NaN
|
||||
|
||||
case 'N': {
|
||||
if (read_wrap(j) != 'a' || read_wrap(j) != 'N') {
|
||||
j->error = "Found misspelling of NaN";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
j->error = "JSON does not allow NaN";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/////////////////////////// Infinity
|
||||
|
||||
case 'I': {
|
||||
if (read_wrap(j) != 'n' || read_wrap(j) != 'f' || read_wrap(j) != 'i' ||
|
||||
read_wrap(j) != 'n' || read_wrap(j) != 'i' || read_wrap(j) != 't' ||
|
||||
read_wrap(j) != 'y') {
|
||||
j->error = "Found misspelling of Infinity";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
j->error = "JSON does not allow Infinity";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/////////////////////////// True
|
||||
|
||||
case 't': {
|
||||
if (read_wrap(j) != 'r' || read_wrap(j) != 'u' || read_wrap(j) != 'e') {
|
||||
j->error = "Found misspelling of true";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return add_object(j, JSON_TRUE);
|
||||
}
|
||||
|
||||
/////////////////////////// False
|
||||
|
||||
case 'f': {
|
||||
if (read_wrap(j) != 'a' || read_wrap(j) != 'l' || read_wrap(j) != 's' || read_wrap(j) != 'e') {
|
||||
j->error = "Found misspelling of false";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return add_object(j, JSON_FALSE);
|
||||
}
|
||||
|
||||
/////////////////////////// Comma
|
||||
|
||||
case ',': {
|
||||
json_pull::parse_frame *f = current_frame(j);
|
||||
if (f != nullptr) {
|
||||
if (f->expect != JSON_COMMA) {
|
||||
j->error = "Found unexpected comma";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (f->container->type == JSON_HASH) {
|
||||
f->expect = JSON_KEY;
|
||||
} else {
|
||||
f->expect = JSON_ITEM;
|
||||
}
|
||||
}
|
||||
|
||||
if (cb != nullptr) {
|
||||
cb(JSON_COMMA, j, state);
|
||||
}
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
/////////////////////////// Colon
|
||||
|
||||
case ':': {
|
||||
json_pull::parse_frame *f = current_frame(j);
|
||||
if (f == nullptr) {
|
||||
j->error = "Found colon at top level";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (f->expect != JSON_COLON) {
|
||||
j->error = "Found unexpected colon";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
f->expect = JSON_VALUE;
|
||||
|
||||
if (cb != nullptr) {
|
||||
cb(JSON_COLON, j, state);
|
||||
}
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
/////////////////////////// Numbers
|
||||
|
||||
case '-':
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9': {
|
||||
j->number_buffer.clear();
|
||||
int decimal = 0;
|
||||
|
||||
if (c == '-') {
|
||||
j->number_buffer.push_back(c);
|
||||
c = read_wrap(j);
|
||||
}
|
||||
|
||||
if (c == '0') {
|
||||
j->number_buffer.push_back(c);
|
||||
} else if (c >= '1' && c <= '9') {
|
||||
j->number_buffer.push_back(c);
|
||||
c = peek(j);
|
||||
|
||||
while (c >= '0' && c <= '9') {
|
||||
j->number_buffer.push_back(read_wrap(j));
|
||||
c = peek(j);
|
||||
}
|
||||
}
|
||||
|
||||
if (peek(j) == '.') {
|
||||
j->number_buffer.push_back(read_wrap(j));
|
||||
decimal = 1;
|
||||
|
||||
c = peek(j);
|
||||
if (c < '0' || c > '9') {
|
||||
j->error = "Decimal point without digits";
|
||||
return nullptr;
|
||||
}
|
||||
while (c >= '0' && c <= '9') {
|
||||
j->number_buffer.push_back(read_wrap(j));
|
||||
c = peek(j);
|
||||
}
|
||||
}
|
||||
|
||||
c = peek(j);
|
||||
if (c == 'e' || c == 'E') {
|
||||
j->number_buffer.push_back(read_wrap(j));
|
||||
decimal = 1;
|
||||
|
||||
c = peek(j);
|
||||
if (c == '+' || c == '-') {
|
||||
j->number_buffer.push_back(read_wrap(j));
|
||||
}
|
||||
|
||||
c = peek(j);
|
||||
if (c < '0' || c > '9') {
|
||||
j->error = "Exponent without digits";
|
||||
return nullptr;
|
||||
}
|
||||
while (c >= '0' && c <= '9') {
|
||||
j->number_buffer.push_back(read_wrap(j));
|
||||
c = peek(j);
|
||||
}
|
||||
}
|
||||
|
||||
json_object *n = add_object(j, JSON_NUMBER);
|
||||
if (n != nullptr) {
|
||||
double d = atof(j->number_buffer.c_str());
|
||||
n->set_number(d);
|
||||
|
||||
#define MAX_SAFE_INTEGER 9007199254740991.0
|
||||
#define MIN_SAFE_INTEGER -9007199254740991.0
|
||||
|
||||
if (!decimal && d > MAX_SAFE_INTEGER) {
|
||||
errno = 0;
|
||||
char *err = nullptr;
|
||||
unsigned long long ull = strtoull(j->number_buffer.c_str(), &err, 10);
|
||||
if (errno == 0 && (err == nullptr || *err == '\0')) {
|
||||
n->set_large_unsigned(ull);
|
||||
}
|
||||
}
|
||||
if (!decimal && d < MIN_SAFE_INTEGER) {
|
||||
errno = 0;
|
||||
char *err = nullptr;
|
||||
long long ll = strtoll(j->number_buffer.c_str(), &err, 10);
|
||||
if (errno == 0 && (err == nullptr || *err == '\0')) {
|
||||
n->set_large_signed(ll);
|
||||
}
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/////////////////////////// Strings
|
||||
|
||||
case '"': {
|
||||
// Reused across tokens; see json_pull::string_buffer.
|
||||
std::string &val = j->string_buffer;
|
||||
val.clear();
|
||||
|
||||
int surrogate = -1;
|
||||
while ((c = read_wrap(j)) != EOF) {
|
||||
if (c == '"') {
|
||||
if (surrogate >= 0) {
|
||||
val.push_back(0xE0 | (surrogate >> 12));
|
||||
val.push_back(0x80 | ((surrogate >> 6) & 0x3F));
|
||||
val.push_back(0x80 | (surrogate & 0x3F));
|
||||
surrogate = -1;
|
||||
}
|
||||
|
||||
break;
|
||||
} else if (c == '\\') {
|
||||
c = read_wrap(j);
|
||||
|
||||
if (c == 'u') {
|
||||
char hex[5] = "aaaa";
|
||||
int i;
|
||||
for (i = 0; i < 4; i++) {
|
||||
hex[i] = read_wrap(j);
|
||||
if (hex[i] < '0' || (hex[i] > '9' && hex[i] < 'A') || (hex[i] > 'F' && hex[i] < 'a') || hex[i] > 'f') {
|
||||
j->error = "Invalid \\u hex character";
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long ch = strtoul(hex, nullptr, 16);
|
||||
if (ch >= 0xd800 && ch <= 0xdbff) {
|
||||
if (surrogate < 0) {
|
||||
surrogate = ch;
|
||||
} else {
|
||||
// Impossible surrogate, so output the first half,
|
||||
// keep what might be a legitimate new first half.
|
||||
val.push_back(0xE0 | (surrogate >> 12));
|
||||
val.push_back(0x80 | ((surrogate >> 6) & 0x3F));
|
||||
val.push_back(0x80 | (surrogate & 0x3F));
|
||||
surrogate = ch;
|
||||
}
|
||||
continue;
|
||||
} else if (ch >= 0xdc00 && ch <= 0xdfff) {
|
||||
if (surrogate >= 0) {
|
||||
long c1 = surrogate - 0xd800;
|
||||
long c2 = ch - 0xdc00;
|
||||
ch = ((c1 << 10) | c2) + 0x010000;
|
||||
surrogate = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (surrogate >= 0) {
|
||||
val.push_back(0xE0 | (surrogate >> 12));
|
||||
val.push_back(0x80 | ((surrogate >> 6) & 0x3F));
|
||||
val.push_back(0x80 | (surrogate & 0x3F));
|
||||
surrogate = -1;
|
||||
}
|
||||
|
||||
if (ch <= 0x7F) {
|
||||
val.push_back(ch);
|
||||
} else if (ch <= 0x7FF) {
|
||||
val.push_back(0xC0 | (ch >> 6));
|
||||
val.push_back(0x80 | (ch & 0x3F));
|
||||
} else if (ch <= 0xFFFF) {
|
||||
val.push_back(0xE0 | (ch >> 12));
|
||||
val.push_back(0x80 | ((ch >> 6) & 0x3F));
|
||||
val.push_back(0x80 | (ch & 0x3F));
|
||||
} else {
|
||||
// Only reachable for a code point assembled from a
|
||||
// surrogate pair above, since `ch` on its own comes
|
||||
// from four hex digits and so cannot exceed 0xFFFF.
|
||||
val.push_back(0xF0 | (ch >> 18));
|
||||
val.push_back(0x80 | ((ch >> 12) & 0x3F));
|
||||
val.push_back(0x80 | ((ch >> 6) & 0x3F));
|
||||
val.push_back(0x80 | (ch & 0x3F));
|
||||
}
|
||||
} else {
|
||||
if (surrogate >= 0) {
|
||||
val.push_back(0xE0 | (surrogate >> 12));
|
||||
val.push_back(0x80 | ((surrogate >> 6) & 0x3F));
|
||||
val.push_back(0x80 | (surrogate & 0x3F));
|
||||
surrogate = -1;
|
||||
}
|
||||
|
||||
if (c == '"') {
|
||||
val.push_back('"');
|
||||
} else if (c == '\\') {
|
||||
val.push_back('\\');
|
||||
} else if (c == '/') {
|
||||
val.push_back('/');
|
||||
} else if (c == 'b') {
|
||||
val.push_back('\b');
|
||||
} else if (c == 'f') {
|
||||
val.push_back('\f');
|
||||
} else if (c == 'n') {
|
||||
val.push_back('\n');
|
||||
} else if (c == 'r') {
|
||||
val.push_back('\r');
|
||||
} else if (c == 't') {
|
||||
val.push_back('\t');
|
||||
} else {
|
||||
j->error = "Found backslash followed by unknown character";
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
} else if (c < ' ') {
|
||||
j->error = "Found control character in string";
|
||||
return nullptr;
|
||||
} else {
|
||||
if (surrogate >= 0) {
|
||||
val.push_back(0xE0 | (surrogate >> 12));
|
||||
val.push_back(0x80 | ((surrogate >> 6) & 0x3F));
|
||||
val.push_back(0x80 | (surrogate & 0x3F));
|
||||
surrogate = -1;
|
||||
}
|
||||
|
||||
val.push_back(c);
|
||||
}
|
||||
}
|
||||
if (c == EOF) {
|
||||
j->error = "String without closing quote mark";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
json_object *s = add_object(j, JSON_STRING);
|
||||
if (s != nullptr) {
|
||||
// Copy, not move, so the buffer keeps its capacity.
|
||||
s->string() = val;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
j->error = "Found unexpected character";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
json_object *json_read(json_pull_ptr &j) {
|
||||
return json_read_separators(j, nullptr, nullptr);
|
||||
}
|
||||
|
||||
static void detach_subtree(json_object *o);
|
||||
|
||||
json_object_ptr json_read_tree(json_pull_ptr &p) {
|
||||
json_object *j;
|
||||
|
||||
while ((j = json_read(p)) != nullptr) {
|
||||
if (j->parent == nullptr) {
|
||||
json_object_ptr tree = std::move(p->root);
|
||||
detach_subtree(tree.get());
|
||||
return tree;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Move the owning json_object_ptr out of whatever vector slot or hash entry
|
||||
// holds `o`. Empty if nothing tracked owns it -- already detached, or borrowed
|
||||
// from elsewhere.
|
||||
//
|
||||
// Detaching one half of a hash entry would disturb the surrounding key/value
|
||||
// pairing, so the extracted half is replaced by a JSON_NULL placeholder and the
|
||||
// entry is erased only once both halves are gone.
|
||||
static json_object_ptr take_from_owner(json_object *o) {
|
||||
if (o == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
json_object *parent = o->parent;
|
||||
if (parent == nullptr) {
|
||||
// Top-level value: the parser owns it via root, unless the
|
||||
// caller already moved it out.
|
||||
json_pull *parser = o->parser;
|
||||
if (parser != nullptr && parser->root.get() == o) {
|
||||
return std::move(parser->root);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (parent->type == JSON_ARRAY) {
|
||||
auto &arr = parent->array();
|
||||
for (size_t i = 0; i < arr.size(); i++) {
|
||||
if (arr[i].get() == o) {
|
||||
json_object_ptr taken = std::move(arr[i]);
|
||||
arr.erase(arr.begin() + i);
|
||||
return taken;
|
||||
}
|
||||
}
|
||||
} else if (parent->type == JSON_HASH) {
|
||||
auto &entries = parent->entries();
|
||||
for (size_t i = 0; i < entries.size(); i++) {
|
||||
auto &e = entries[i];
|
||||
if (e.key.get() == o) {
|
||||
json_object_ptr taken = std::move(e.key);
|
||||
e.key = make_object(JSON_NULL, parent, parent->parser);
|
||||
if (e.value != nullptr && e.value->type == JSON_NULL && e.key->type == JSON_NULL) {
|
||||
entries.erase(entries.begin() + i);
|
||||
}
|
||||
return taken;
|
||||
}
|
||||
if (e.value.get() == o) {
|
||||
json_object_ptr taken = std::move(e.value);
|
||||
e.value = make_object(JSON_NULL, parent, parent->parser);
|
||||
if (e.key != nullptr && e.key->type == JSON_NULL && e.value->type == JSON_NULL) {
|
||||
entries.erase(entries.begin() + i);
|
||||
}
|
||||
return taken;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Splice `o` out of its owner and destroy it; `o` dangles afterwards. No need
|
||||
// to clear back-pointers, since nothing will observe them again.
|
||||
void json_free(json_object *o) {
|
||||
(void) take_from_owner(o);
|
||||
}
|
||||
|
||||
// See Ownership model in jsonpull.h for why only `parser` is cleared here.
|
||||
static void clear_parser_pointers(json_object *o) {
|
||||
if (o == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (o->type == JSON_HASH) {
|
||||
for (const auto &e : o->entries()) {
|
||||
clear_parser_pointers(e.key.get());
|
||||
clear_parser_pointers(e.value.get());
|
||||
}
|
||||
} else if (o->type == JSON_ARRAY) {
|
||||
const auto &arr = o->array();
|
||||
for (size_t i = 0; i < arr.size(); i++) {
|
||||
clear_parser_pointers(arr[i].get());
|
||||
}
|
||||
}
|
||||
|
||||
o->parser = nullptr;
|
||||
}
|
||||
|
||||
// The root's `parent` pointed out of the subtree, at a node the parser still
|
||||
// owns; leaving it set would make a later json_free look for this node in a
|
||||
// container that no longer holds it.
|
||||
static void detach_subtree(json_object *o) {
|
||||
if (o == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
clear_parser_pointers(o);
|
||||
o->parent = nullptr;
|
||||
}
|
||||
|
||||
json_object_ptr json_disconnect(json_object *o) {
|
||||
json_object_ptr taken = take_from_owner(o);
|
||||
if (taken != nullptr) {
|
||||
detach_subtree(taken.get());
|
||||
}
|
||||
return taken;
|
||||
}
|
||||
|
||||
static void json_print_one(std::string &val, const json_object *o) {
|
||||
if (o == nullptr) {
|
||||
val.append("...");
|
||||
} else if (o->type == JSON_STRING) {
|
||||
val.push_back('\"');
|
||||
|
||||
// Range, not c_str(): the value may contain an embedded NUL, which the
|
||||
// control-character branch below escapes like any other.
|
||||
for (char c : o->string()) {
|
||||
if (c == '\\' || c == '"') {
|
||||
val.push_back('\\');
|
||||
val.push_back(c);
|
||||
} else if (c >= 0 && c < ' ') {
|
||||
char *s;
|
||||
if (asprintf(&s, "\\u%04x", c) >= 0) {
|
||||
val.append(s);
|
||||
free(s);
|
||||
}
|
||||
} else {
|
||||
val.push_back(c);
|
||||
}
|
||||
}
|
||||
|
||||
val.push_back('\"');
|
||||
} else if (o->type == JSON_NUMBER) {
|
||||
if (o->large_signed() != 0) {
|
||||
char s[65];
|
||||
snprintf(s, sizeof(s), "%lld", o->large_signed());
|
||||
val.append(s);
|
||||
} else if (o->large_unsigned() != 0) {
|
||||
char s[65];
|
||||
snprintf(s, sizeof(s), "%llu", o->large_unsigned());
|
||||
val.append(s);
|
||||
} else {
|
||||
char *s = dtoa_milo(o->number());
|
||||
val.append(s);
|
||||
free(s);
|
||||
}
|
||||
} else if (o->type == JSON_NULL) {
|
||||
val.append("null");
|
||||
} else if (o->type == JSON_TRUE) {
|
||||
val.append("true");
|
||||
} else if (o->type == JSON_FALSE) {
|
||||
val.append("false");
|
||||
}
|
||||
// JSON_HASH and JSON_ARRAY never reach here: json_print handles both
|
||||
// itself and only delegates to json_print_one for the scalar types.
|
||||
}
|
||||
|
||||
static void json_print(std::string &val, const json_object *o) {
|
||||
if (o == nullptr) {
|
||||
// Hash value in incompletely read hash
|
||||
val.append("...");
|
||||
} else if (o->type == JSON_HASH) {
|
||||
val.push_back('{');
|
||||
|
||||
const auto &entries = o->entries();
|
||||
for (size_t i = 0; i < entries.size(); i++) {
|
||||
json_print(val, entries[i].key.get());
|
||||
val.push_back(':');
|
||||
json_print(val, entries[i].value.get());
|
||||
if (i + 1 < entries.size()) {
|
||||
val.push_back(',');
|
||||
}
|
||||
}
|
||||
val.push_back('}');
|
||||
} else if (o->type == JSON_ARRAY) {
|
||||
val.push_back('[');
|
||||
const auto &arr = o->array();
|
||||
for (size_t i = 0; i < arr.size(); i++) {
|
||||
json_print(val, arr[i].get());
|
||||
if (i + 1 < arr.size()) {
|
||||
val.push_back(',');
|
||||
}
|
||||
}
|
||||
val.push_back(']');
|
||||
} else {
|
||||
json_print_one(val, o);
|
||||
}
|
||||
}
|
||||
|
||||
std::string json_stringify(const json_object *o) {
|
||||
std::string val;
|
||||
json_print(val, o);
|
||||
return val;
|
||||
}
|
||||
+281
-54
@@ -1,9 +1,12 @@
|
||||
#ifndef JSONPULL_H
|
||||
#define JSONPULL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
typedef enum json_type {
|
||||
// These types can be returned by json_read()
|
||||
@@ -25,74 +28,298 @@ typedef enum json_type {
|
||||
JSON_VALUE,
|
||||
} json_type;
|
||||
|
||||
typedef struct json_object {
|
||||
struct json_object *parent;
|
||||
struct json_pull *parser;
|
||||
struct json_object;
|
||||
struct json_pull;
|
||||
|
||||
union {
|
||||
struct {
|
||||
double number;
|
||||
unsigned long long large_unsigned;
|
||||
long long large_signed;
|
||||
} number;
|
||||
// Ownership model
|
||||
//
|
||||
// Every node has exactly one owner: its parent (a json_object_ptr in the
|
||||
// parent's vector or hash entry), the parser (jp->root) for a top-level value,
|
||||
// or the caller once json_read_tree / json_disconnect hands the tree over.
|
||||
// json_read and json_hash_get return borrowed pointers, valid while the owning
|
||||
// container is intact.
|
||||
//
|
||||
// `parent` and `parser` are non-owning, so they cannot form a cycle. Detaching
|
||||
// clears every `parser` in the subtree, since the json_pull may die first, and
|
||||
// clears `parent` only on the detached root, which pointed out of the subtree.
|
||||
// Interior `parent` links stay, so a detached tree is still walkable upwards
|
||||
// and json_free / json_disconnect still work inside it -- both find a node's
|
||||
// owner through `parent`.
|
||||
//
|
||||
// json_object has no vptr; json_object_deleter switches on `type` and
|
||||
// static_casts so the right subclass destructor runs. Payloads live in those
|
||||
// subclasses rather than one wide struct, and the accessors assert on `type`
|
||||
// before downcasting.
|
||||
//
|
||||
// json_pull_ptr is a shared_ptr: a parser is created and freed once.
|
||||
|
||||
struct {
|
||||
char *string;
|
||||
void *refcon; // reference constant for caller's use
|
||||
} string;
|
||||
// Stateless, so json_object_ptr stays one pointer wide. See Ownership model.
|
||||
struct json_object_deleter {
|
||||
void operator()(json_object *p) const noexcept;
|
||||
};
|
||||
|
||||
struct {
|
||||
struct json_object **array;
|
||||
size_t length;
|
||||
} array;
|
||||
typedef std::unique_ptr<json_object, json_object_deleter> json_object_ptr;
|
||||
typedef std::shared_ptr<json_pull> json_pull_ptr;
|
||||
|
||||
struct {
|
||||
struct json_object **keys;
|
||||
struct json_object **values;
|
||||
size_t length;
|
||||
} object;
|
||||
} value;
|
||||
// One key/value pair in a JSON_HASH, held in source order.
|
||||
struct json_entry {
|
||||
json_object_ptr key;
|
||||
json_object_ptr value;
|
||||
};
|
||||
|
||||
struct json_object {
|
||||
json_object *parent = nullptr;
|
||||
json_pull *parser = nullptr;
|
||||
|
||||
json_type type;
|
||||
int expect;
|
||||
} json_object;
|
||||
|
||||
typedef struct json_pull {
|
||||
char *error;
|
||||
int line;
|
||||
json_object(json_type t)
|
||||
: type(t) {
|
||||
}
|
||||
json_object(json_type t, json_object *p, json_pull *pl)
|
||||
: parent(p), parser(pl), type(t) {
|
||||
}
|
||||
|
||||
ssize_t (*read)(struct json_pull *, char *buf, size_t n);
|
||||
void *source;
|
||||
char *buffer;
|
||||
ssize_t buffer_tail;
|
||||
ssize_t buffer_head;
|
||||
inline std::string &string();
|
||||
inline const std::string &string() const;
|
||||
|
||||
json_object *container;
|
||||
json_object *root;
|
||||
// large_unsigned() / large_signed() return 0 when the number is not
|
||||
// held in that representation, the convention callers already expect.
|
||||
inline double number() const;
|
||||
inline unsigned long long large_unsigned() const;
|
||||
inline long long large_signed() const;
|
||||
inline void set_number(double d);
|
||||
inline void set_large_unsigned(unsigned long long u);
|
||||
inline void set_large_signed(long long s);
|
||||
|
||||
struct string *number_buffer;
|
||||
} json_pull;
|
||||
inline std::vector<json_object_ptr> &array();
|
||||
inline const std::vector<json_object_ptr> &array() const;
|
||||
|
||||
json_pull *json_begin_file(FILE *f);
|
||||
json_pull *json_begin_string(const char *s);
|
||||
inline std::vector<json_entry> &entries();
|
||||
inline const std::vector<json_entry> &entries() const;
|
||||
};
|
||||
|
||||
json_pull *json_begin(ssize_t (*read)(struct json_pull *, char *buffer, size_t n), void *source);
|
||||
void json_end(json_pull *p);
|
||||
struct json_number : json_object {
|
||||
enum repr_t { REPR_DOUBLE,
|
||||
REPR_LARGE_UNSIGNED,
|
||||
REPR_LARGE_SIGNED };
|
||||
|
||||
repr_t repr = REPR_DOUBLE;
|
||||
union value_t {
|
||||
double d;
|
||||
unsigned long long u;
|
||||
long long s;
|
||||
value_t()
|
||||
: d(0) {
|
||||
}
|
||||
} value;
|
||||
|
||||
json_number()
|
||||
: json_object(JSON_NUMBER) {
|
||||
}
|
||||
json_number(json_object *p, json_pull *pl)
|
||||
: json_object(JSON_NUMBER, p, pl) {
|
||||
}
|
||||
};
|
||||
|
||||
struct json_string : json_object {
|
||||
std::string string_value;
|
||||
|
||||
json_string()
|
||||
: json_object(JSON_STRING) {
|
||||
}
|
||||
json_string(json_object *p, json_pull *pl)
|
||||
: json_object(JSON_STRING, p, pl) {
|
||||
}
|
||||
};
|
||||
|
||||
struct json_array : json_object {
|
||||
std::vector<json_object_ptr> array_value;
|
||||
|
||||
// 2 slots: coordinate pairs dominate the parse workload.
|
||||
json_array()
|
||||
: json_object(JSON_ARRAY) {
|
||||
array_value.reserve(2);
|
||||
}
|
||||
json_array(json_object *p, json_pull *pl)
|
||||
: json_object(JSON_ARRAY, p, pl) {
|
||||
array_value.reserve(2);
|
||||
}
|
||||
};
|
||||
|
||||
struct json_hash : json_object {
|
||||
std::vector<json_entry> entries_value;
|
||||
|
||||
// 4 slots: the typical GeoJSON property hash.
|
||||
json_hash()
|
||||
: json_object(JSON_HASH) {
|
||||
entries_value.reserve(4);
|
||||
}
|
||||
json_hash(json_object *p, json_pull *pl)
|
||||
: json_object(JSON_HASH, p, pl) {
|
||||
entries_value.reserve(4);
|
||||
}
|
||||
};
|
||||
|
||||
inline std::string &json_object::string() {
|
||||
assert(type == JSON_STRING);
|
||||
return static_cast<json_string *>(this)->string_value;
|
||||
}
|
||||
inline const std::string &json_object::string() const {
|
||||
assert(type == JSON_STRING);
|
||||
return static_cast<const json_string *>(this)->string_value;
|
||||
}
|
||||
|
||||
inline double json_object::number() const {
|
||||
assert(type == JSON_NUMBER);
|
||||
auto *n = static_cast<const json_number *>(this);
|
||||
switch (n->repr) {
|
||||
case json_number::REPR_LARGE_UNSIGNED:
|
||||
return static_cast<double>(n->value.u);
|
||||
case json_number::REPR_LARGE_SIGNED:
|
||||
return static_cast<double>(n->value.s);
|
||||
case json_number::REPR_DOUBLE:
|
||||
default:
|
||||
return n->value.d;
|
||||
}
|
||||
}
|
||||
inline unsigned long long json_object::large_unsigned() const {
|
||||
assert(type == JSON_NUMBER);
|
||||
auto *n = static_cast<const json_number *>(this);
|
||||
return n->repr == json_number::REPR_LARGE_UNSIGNED ? n->value.u : 0;
|
||||
}
|
||||
inline long long json_object::large_signed() const {
|
||||
assert(type == JSON_NUMBER);
|
||||
auto *n = static_cast<const json_number *>(this);
|
||||
return n->repr == json_number::REPR_LARGE_SIGNED ? n->value.s : 0;
|
||||
}
|
||||
inline void json_object::set_number(double d) {
|
||||
assert(type == JSON_NUMBER);
|
||||
auto *n = static_cast<json_number *>(this);
|
||||
n->repr = json_number::REPR_DOUBLE;
|
||||
n->value.d = d;
|
||||
}
|
||||
inline void json_object::set_large_unsigned(unsigned long long u) {
|
||||
assert(type == JSON_NUMBER);
|
||||
auto *n = static_cast<json_number *>(this);
|
||||
n->repr = json_number::REPR_LARGE_UNSIGNED;
|
||||
n->value.u = u;
|
||||
}
|
||||
inline void json_object::set_large_signed(long long s) {
|
||||
assert(type == JSON_NUMBER);
|
||||
auto *n = static_cast<json_number *>(this);
|
||||
n->repr = json_number::REPR_LARGE_SIGNED;
|
||||
n->value.s = s;
|
||||
}
|
||||
|
||||
inline std::vector<json_object_ptr> &json_object::array() {
|
||||
assert(type == JSON_ARRAY);
|
||||
return static_cast<json_array *>(this)->array_value;
|
||||
}
|
||||
inline const std::vector<json_object_ptr> &json_object::array() const {
|
||||
assert(type == JSON_ARRAY);
|
||||
return static_cast<const json_array *>(this)->array_value;
|
||||
}
|
||||
|
||||
inline std::vector<json_entry> &json_object::entries() {
|
||||
assert(type == JSON_HASH);
|
||||
return static_cast<json_hash *>(this)->entries_value;
|
||||
}
|
||||
inline const std::vector<json_entry> &json_object::entries() const {
|
||||
assert(type == JSON_HASH);
|
||||
return static_cast<const json_hash *>(this)->entries_value;
|
||||
}
|
||||
|
||||
inline void json_object_deleter::operator()(json_object *p) const noexcept {
|
||||
if (p == nullptr) {
|
||||
return;
|
||||
}
|
||||
switch (p->type) {
|
||||
case JSON_NUMBER:
|
||||
delete static_cast<json_number *>(p);
|
||||
break;
|
||||
case JSON_STRING:
|
||||
delete static_cast<json_string *>(p);
|
||||
break;
|
||||
case JSON_ARRAY:
|
||||
delete static_cast<json_array *>(p);
|
||||
break;
|
||||
case JSON_HASH:
|
||||
delete static_cast<json_hash *>(p);
|
||||
break;
|
||||
default:
|
||||
// JSON_TRUE / JSON_FALSE / JSON_NULL: no extra fields.
|
||||
delete p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
struct json_pull {
|
||||
const char *error = nullptr; // points at a string literal; no allocation
|
||||
int line = 1;
|
||||
|
||||
ssize_t (*read)(struct json_pull *, char *buf, size_t n) = nullptr;
|
||||
void *source = nullptr;
|
||||
std::vector<char> buffer;
|
||||
ssize_t buffer_tail = 0;
|
||||
ssize_t buffer_head = 0;
|
||||
|
||||
// Currently-open containers, innermost last, each with the token it
|
||||
// expects next. `container` is borrowed; the owner is the surrounding
|
||||
// container, or `root` for the outermost.
|
||||
struct parse_frame {
|
||||
json_object *container;
|
||||
json_type expect;
|
||||
};
|
||||
std::vector<parse_frame> container_stack;
|
||||
|
||||
// Most recently completed top-level value, owned until the next one
|
||||
// starts parsing or the caller takes it.
|
||||
json_object_ptr root;
|
||||
|
||||
// Reused across tokens, cleared but not shrunk, so they stop
|
||||
// reallocating once grown to the largest token seen.
|
||||
std::string number_buffer;
|
||||
std::string string_buffer;
|
||||
};
|
||||
|
||||
json_pull_ptr json_begin_file(FILE *f);
|
||||
json_pull_ptr json_begin_string(const char *s);
|
||||
|
||||
json_pull_ptr json_begin(ssize_t (*read)(struct json_pull *, char *buffer, size_t n), void *source);
|
||||
|
||||
// Resets the caller's pointer. Optional: the parser frees itself when the
|
||||
// last json_pull_ptr to it goes away.
|
||||
void json_end(json_pull_ptr &p);
|
||||
|
||||
typedef void (*json_separator_callback)(json_type type, json_pull *j, void *state);
|
||||
|
||||
json_object *json_read_tree(json_pull *j);
|
||||
json_object *json_read(json_pull *j);
|
||||
json_object *json_read_separators(json_pull *j, json_separator_callback cb, void *state);
|
||||
void json_free(json_object *j);
|
||||
void json_disconnect(json_object *j);
|
||||
// The next completed node, borrowed. Valid until the next call that extends
|
||||
// or trims the parser's tree. nullptr at end of input or on error.
|
||||
json_object *json_read(json_pull_ptr &j);
|
||||
json_object *json_read_separators(json_pull_ptr &j, json_separator_callback cb, void *state);
|
||||
|
||||
// Drains the next top-level value out of the parser and hands it over. The
|
||||
// returned tree can outlive the json_pull. See Ownership model for what the
|
||||
// detach does and does not clear.
|
||||
json_object_ptr json_read_tree(json_pull_ptr &j);
|
||||
|
||||
// json_free splices `o` out of its parent (if any), or clears the
|
||||
// parser's root if `o` is the parser's current top-level value, and
|
||||
// destroys the subtree. After this call, `o` is a dangling pointer
|
||||
// that must not be used. Safe to call with nullptr.
|
||||
void json_free(json_object *o);
|
||||
|
||||
// Splices `o` out of whatever owns it and hands it over, same detach as
|
||||
// json_read_tree. See Ownership model.
|
||||
json_object_ptr json_disconnect(json_object *o);
|
||||
|
||||
// Borrowed value for `s`. nullptr if `o` is not a hash, `s` is absent, or the
|
||||
// hash is mid-parse with that value slot unfilled -- a JSON `null` is none of
|
||||
// those, and comes back as a JSON_NULL node.
|
||||
json_object *json_hash_get(const json_object_ptr &o, const char *s);
|
||||
json_object *json_hash_get(json_object *o, const char *s);
|
||||
|
||||
char *json_stringify(json_object *o);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
std::string json_stringify(const json_object *o);
|
||||
|
||||
#endif
|
||||
|
||||
+60
-89
@@ -13,6 +13,7 @@
|
||||
#include "geojson-loop.hpp"
|
||||
#include "milo/dtoa_milo.h"
|
||||
#include "errors.hpp"
|
||||
#include "usage.hpp"
|
||||
|
||||
int fail = EXIT_SUCCESS;
|
||||
bool wrap = false;
|
||||
@@ -146,17 +147,16 @@ void out(std::string const &s, int type, json_object *properties) {
|
||||
bool found = false;
|
||||
|
||||
json_object *o = json_hash_get(properties, extract);
|
||||
if (o != NULL) {
|
||||
if (o != nullptr) {
|
||||
found = true;
|
||||
if (o->type == JSON_STRING || o->type == JSON_NUMBER) {
|
||||
extracted = sort_quote(o->value.string.string);
|
||||
if (o->type == JSON_STRING) {
|
||||
extracted = sort_quote(o->string().c_str());
|
||||
} else {
|
||||
// Don't really know what to do about sort quoting
|
||||
// for arbitrary objects
|
||||
|
||||
const char *out = json_stringify(o);
|
||||
extracted = sort_quote(out);
|
||||
free((void *) out);
|
||||
// Numbers, booleans, null, and any other non-string
|
||||
// values are rendered via json_stringify(); calling
|
||||
// o->string() here would assert because the type-tagged
|
||||
// accessor requires JSON_STRING.
|
||||
extracted = sort_quote(json_stringify(o).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,13 +232,13 @@ void join_csv(json_object *j) {
|
||||
}
|
||||
|
||||
json_object *properties = json_hash_get(j, "properties");
|
||||
json_object *key = NULL;
|
||||
json_object *key = nullptr;
|
||||
|
||||
if (properties != NULL) {
|
||||
if (properties != nullptr) {
|
||||
key = json_hash_get(properties, header[0].c_str());
|
||||
}
|
||||
|
||||
if (key == NULL) {
|
||||
if (key == nullptr) {
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
fprintf(stderr, "Warning: couldn't find CSV key \"%s\" in JSON\n", header[0].c_str());
|
||||
@@ -249,13 +249,11 @@ void join_csv(json_object *j) {
|
||||
|
||||
std::string joinkey;
|
||||
if (key->type == JSON_STRING) {
|
||||
joinkey = key->value.string.string;
|
||||
joinkey = key->string();
|
||||
} else if (key->type == JSON_NUMBER) {
|
||||
joinkey = milo::dtoa_milo(key->value.number.number);
|
||||
joinkey = milo::dtoa_milo(key->number());
|
||||
} else {
|
||||
const char *s = json_stringify(key);
|
||||
joinkey = s;
|
||||
free((void *) s);
|
||||
joinkey = json_stringify(key);
|
||||
}
|
||||
|
||||
if (joinkey < prev_joinkey) {
|
||||
@@ -305,14 +303,7 @@ void join_csv(json_object *j) {
|
||||
}
|
||||
|
||||
if (fields.size() > 0 && joinkey == fields[0]) {
|
||||
// This knows more about the structure of JSON objects than it ought to
|
||||
// The 8 is to round up at least as much as SIZE_FOR in json_pull.c
|
||||
properties->value.object.keys = (json_object **) realloc((void *) properties->value.object.keys, (properties->value.object.length + 8 + fields.size()) * sizeof(json_object *));
|
||||
properties->value.object.values = (json_object **) realloc((void *) properties->value.object.values, (properties->value.object.length + 8 + fields.size()) * sizeof(json_object *));
|
||||
if (properties->value.object.keys == NULL || properties->value.object.values == NULL) {
|
||||
perror("realloc");
|
||||
exit(EXIT_MEMORY);
|
||||
}
|
||||
properties->entries().reserve(properties->entries().size() + fields.size());
|
||||
|
||||
for (size_t i = 1; i < fields.size(); i++) {
|
||||
std::string k = header[i];
|
||||
@@ -330,46 +321,21 @@ void join_csv(json_object *j) {
|
||||
}
|
||||
|
||||
if (attr_type != JSON_NULL) {
|
||||
// This knows more about the structure of JSON objects than it ought to
|
||||
|
||||
json_object *ko = (json_object *) malloc(sizeof(json_object));
|
||||
json_object *vo = (json_object *) malloc(sizeof(json_object));
|
||||
if (ko == NULL || vo == NULL) {
|
||||
perror("malloc");
|
||||
exit(EXIT_MEMORY);
|
||||
}
|
||||
|
||||
ko->type = JSON_STRING;
|
||||
ko->parent = properties;
|
||||
ko->parser = properties->parser;
|
||||
|
||||
ko->value.string.string = strdup(k.c_str());
|
||||
if (ko->value.string.string == NULL) {
|
||||
perror("strdup");
|
||||
exit(EXIT_MEMORY);
|
||||
}
|
||||
|
||||
vo->type = attr_type;
|
||||
vo->parent = properties;
|
||||
vo->parser = properties->parser;
|
||||
json_object_ptr ko(new json_string(properties, properties->parser));
|
||||
ko->string() = k;
|
||||
|
||||
json_object_ptr vo;
|
||||
if (attr_type == JSON_STRING) {
|
||||
vo->value.string.string = strdup(v.c_str());
|
||||
if (vo->value.string.string == NULL) {
|
||||
perror("strdup");
|
||||
exit(EXIT_MEMORY);
|
||||
}
|
||||
vo = json_object_ptr(new json_string(properties, properties->parser));
|
||||
vo->string() = v;
|
||||
} else if (attr_type == JSON_NUMBER) {
|
||||
vo->value.number.number = atof(v.c_str());
|
||||
vo->value.number.large_unsigned = 0;
|
||||
vo->value.number.large_signed = 0;
|
||||
vo = json_object_ptr(new json_number(properties, properties->parser));
|
||||
vo->set_number(atof(v.c_str()));
|
||||
} else {
|
||||
abort();
|
||||
}
|
||||
|
||||
properties->value.object.keys[properties->value.object.length] = ko;
|
||||
properties->value.object.values[properties->value.object.length] = vo;
|
||||
properties->value.object.length++;
|
||||
properties->entries().push_back({std::move(ko), std::move(vo)});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -382,13 +348,9 @@ struct json_join_action : json_feature_action {
|
||||
join_csv(feature);
|
||||
}
|
||||
|
||||
char *s = json_stringify(feature);
|
||||
out(s, 1, json_hash_get(feature, "properties"));
|
||||
free(s);
|
||||
out(json_stringify(feature), 1, json_hash_get(feature, "properties"));
|
||||
} else {
|
||||
char *s = json_stringify(geometry);
|
||||
out(s, 2, NULL);
|
||||
free(s);
|
||||
out(json_stringify(geometry), 2, nullptr);
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -399,42 +361,52 @@ struct json_join_action : json_feature_action {
|
||||
};
|
||||
|
||||
void process(FILE *fp, const char *fname) {
|
||||
json_pull *jp = json_begin_file(fp);
|
||||
json_pull_ptr jp = json_begin_file(fp);
|
||||
|
||||
json_join_action jja;
|
||||
jja.fname = fname;
|
||||
parse_json(&jja, jp);
|
||||
json_end(jp);
|
||||
}
|
||||
|
||||
static const struct option long_options[] = {
|
||||
{"Wrapping the output", 0, 0, 0},
|
||||
{"wrap", no_argument, 0, 'w'},
|
||||
|
||||
{"Sorting and joining", 0, 0, 0},
|
||||
{"extract", required_argument, 0, 'e'},
|
||||
{"csv", required_argument, 0, 'c'},
|
||||
{"empty-csv-columns-are-null", no_argument, &pe, 1},
|
||||
|
||||
{"", 0, 0, 0},
|
||||
{"prevent", required_argument, 0, 'p'},
|
||||
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
|
||||
// the options above, with the usage message headings removed
|
||||
static struct option real_long_options[sizeof(long_options) / sizeof(long_options[0])];
|
||||
|
||||
void usage(char **argv) {
|
||||
static const char *const forms[] = {
|
||||
"[options] [file.json ...]",
|
||||
NULL,
|
||||
};
|
||||
|
||||
print_usage(stderr, argv[0], forms, long_options, NULL);
|
||||
fprintf(stderr, "\nIf no files are named, the JSON is read from the standard input.\n");
|
||||
exit(EXIT_ARGS);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
const char *csv = NULL;
|
||||
|
||||
struct option long_options[] = {
|
||||
{"wrap", no_argument, 0, 'w'},
|
||||
{"extract", required_argument, 0, 'e'},
|
||||
{"csv", required_argument, 0, 'c'},
|
||||
{"empty-csv-columns-are-null", no_argument, &pe, 1},
|
||||
{"prevent", required_argument, 0, 'p'},
|
||||
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
|
||||
std::string getopt_str;
|
||||
for (size_t lo = 0; long_options[lo].name != NULL; lo++) {
|
||||
if (long_options[lo].val > ' ') {
|
||||
getopt_str.push_back(long_options[lo].val);
|
||||
|
||||
if (long_options[lo].has_arg == required_argument) {
|
||||
getopt_str.push_back(':');
|
||||
}
|
||||
}
|
||||
}
|
||||
strip_usage_headings(long_options, real_long_options);
|
||||
std::string getopt_str = getopt_string(real_long_options);
|
||||
|
||||
extern int optind;
|
||||
int i;
|
||||
|
||||
while ((i = getopt_long(argc, argv, getopt_str.c_str(), long_options, NULL)) != -1) {
|
||||
while ((i = getopt_long(argc, argv, getopt_str.c_str(), real_long_options, NULL)) != -1) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
break;
|
||||
@@ -461,8 +433,7 @@ int main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unexpected option -%c\n", i);
|
||||
exit(EXIT_ARGS);
|
||||
usage(argv);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
*.zip
|
||||
tmp/*
|
||||
@@ -1,34 +0,0 @@
|
||||
# Build the tippecanoe layer (binary)
|
||||
|
||||
1. On an AWS Linux 2 instance or image:
|
||||
|
||||
sudo yum update
|
||||
sudo yum install git clang sqlite-devel zlib-devel
|
||||
|
||||
2. Create a ZIP archive with the `tippecanoe` binary at `bin/tippecanoe` and upload as a Lambda layer
|
||||
3. Copy [lambda_function.py](lambda_function.py) (python 3.9 runtime)
|
||||
4. set the environment variable `OUTPUT_BUCKET` to your output bucket; give lambda IAM role access to input/output buckets
|
||||
5. Enable ACLs on the output bucket
|
||||
|
||||
```json
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "AllowGet",
|
||||
"Effect": "Allow",
|
||||
"Action": "s3:GetObject",
|
||||
"Resource": "arn:aws:s3:::protomaps-tippecanoe-test/*"
|
||||
},
|
||||
{
|
||||
"Sid": "AllowPut",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:PutObject",
|
||||
"s3:PutObjectAcl"
|
||||
],
|
||||
"Resource": "arn:aws:s3:::protomaps-tippecanoe-test-output/*"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -1,2 +0,0 @@
|
||||
boto3==1.20.32
|
||||
botocore==1.23.32
|
||||
@@ -1,49 +0,0 @@
|
||||
import os
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
import boto3
|
||||
from botocore import UNSIGNED
|
||||
from botocore.config import Config
|
||||
|
||||
# if the input bucket is publicly readable
|
||||
#s3 = boto3.client('s3',config=Config(signature_version=UNSIGNED))
|
||||
|
||||
def lambda_handler(event, context):
|
||||
bucket_name = event['Records'][0]['s3']['bucket']['name']
|
||||
input_key = event['Records'][0]['s3']['object']['key']
|
||||
tmpdir = '/tmp'
|
||||
run_tippecanoe('tippecanoe',tmpdir,bucket_name, input_key)
|
||||
return {
|
||||
'statusCode': 200,
|
||||
'body': json.dumps('Done!')
|
||||
}
|
||||
|
||||
# input formats: "geojsonseq", "fgb", "geobuf", "geojson", "csv"
|
||||
def split_key(key):
|
||||
if key.endswith(".gz"):
|
||||
root, ext = os.path.splitext(key[0:-3])
|
||||
return root, ext + ".gz"
|
||||
else:
|
||||
return os.path.splitext(key)
|
||||
|
||||
def run_tippecanoe(executable, tmpdir, bucket_name, input_key):
|
||||
s3 = boto3.client('s3')
|
||||
root, ext = split_key(input_key)
|
||||
input_path = os.path.join(tmpdir,'input' + ext)
|
||||
output_path = os.path.join(tmpdir,'output.mbtiles')
|
||||
s3.download_file(bucket_name,input_key,input_path)
|
||||
p = subprocess.Popen([executable,'-o',output_path,input_path,'--force','-u','-U','5'],stderr=subprocess.PIPE)
|
||||
for line in p.stderr:
|
||||
try:
|
||||
j = json.loads(line)
|
||||
s3.put_object(Body=json.dumps(j),Bucket=os.environ['OUTPUT_BUCKET'],Key=root + ".progress",ACL="public-read",ContentType="application/json",ContentDisposition="inline")
|
||||
except json.decoder.JSONDecodeError:
|
||||
pass
|
||||
s3.upload_file(output_path,os.environ['OUTPUT_BUCKET'],root + ".mbtiles")
|
||||
|
||||
if __name__ == "__main__":
|
||||
tmpdir = 'tmp'
|
||||
bucket_name = sys.argv[1]
|
||||
input_key = sys.argv[2]
|
||||
run_tippecanoe('../tippecanoe', tmpdir, bucket_name, input_key)
|
||||
@@ -1,26 +0,0 @@
|
||||
from tippecanoe import split_key
|
||||
import unittest
|
||||
|
||||
class TestTippecanoe(unittest.TestCase):
|
||||
def test_basic(self):
|
||||
root, ext = split_key("file.json")
|
||||
self.assertEqual(root,"file")
|
||||
self.assertEqual(ext,".json")
|
||||
|
||||
def test_basic_gz(self):
|
||||
root, ext = split_key("file.csv.gz")
|
||||
self.assertEqual(root,"file")
|
||||
self.assertEqual(ext,".csv.gz")
|
||||
|
||||
def test_nested_key(self):
|
||||
root, ext = split_key("dir/file.fgb")
|
||||
self.assertEqual(root,"dir/file")
|
||||
self.assertEqual(ext,".fgb")
|
||||
|
||||
def test_nested_key_gz(self):
|
||||
root, ext = split_key("dir/file.geojsonseq.gz")
|
||||
self.assertEqual(root,"dir/file")
|
||||
self.assertEqual(ext,".geojsonseq.gz")
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -52,7 +52,6 @@ extern std::map<std::string, serial_val> set_attributes;
|
||||
extern long long extend_zooms_max;
|
||||
extern int retain_points_multiplier;
|
||||
extern size_t maximum_string_attribute_length;
|
||||
extern std::string accumulate_numeric;
|
||||
extern unsigned long long preserve_multiplier_density_threshold;
|
||||
|
||||
struct order_field {
|
||||
|
||||
+588
-769
File diff suppressed because it is too large
Load Diff
@@ -27,14 +27,20 @@ struct edge {
|
||||
mapbox::geometry::point<T> bot;
|
||||
mapbox::geometry::point<T> top;
|
||||
double dx;
|
||||
// Whether this edge intersects any other edge, which is found while
|
||||
// building the hot pixels. An edge that does not intersect any other
|
||||
// edge is not snapped to hot pixels whose corners it only touches.
|
||||
bool intersected = false;
|
||||
|
||||
edge(edge<T>&& e) noexcept : bot(std::move(e.bot)), top(std::move(e.top)), dx(std::move(e.dx)) {
|
||||
edge(edge<T>&& e) noexcept
|
||||
: bot(std::move(e.bot)), top(std::move(e.top)), dx(std::move(e.dx)), intersected(e.intersected) {
|
||||
}
|
||||
|
||||
edge& operator=(edge<T>&& e) noexcept {
|
||||
bot = std::move(e.bot);
|
||||
top = std::move(e.top);
|
||||
dx = std::move(e.dx);
|
||||
intersected = e.intersected;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,6 +159,12 @@ struct ring_manager {
|
||||
ring_vector<T> children;
|
||||
point_vector<T> all_points;
|
||||
hot_pixel_vector<T> hot_pixels;
|
||||
// The hot pixels that are the rounded locations of intersections, sorted,
|
||||
// which edges must be snapped to even if they only touch their corners
|
||||
hot_pixel_vector<T> intersection_hot_pixels;
|
||||
// Snapping to a common set of hot pixels shared with other geometries:
|
||||
// treat pixels as half-open, and don't skip any corner touches that remain
|
||||
bool snap_all_corners = false;
|
||||
hot_pixel_itr<T> current_hp_itr;
|
||||
std::deque<point<T>> points;
|
||||
std::deque<ring<T>> rings;
|
||||
@@ -172,6 +178,7 @@ struct ring_manager {
|
||||
: children(),
|
||||
all_points(),
|
||||
hot_pixels(),
|
||||
intersection_hot_pixels(),
|
||||
current_hp_itr(hot_pixels.end()),
|
||||
points(),
|
||||
rings(),
|
||||
|
||||
@@ -100,8 +100,39 @@ T round_towards_max(double val) {
|
||||
}
|
||||
}
|
||||
|
||||
// The x range of the hot pixels that an edge passes through within a row is
|
||||
// found by rounding the x range that the edge covers within the row outward.
|
||||
// When an end of that range is exactly halfway between two integers, the edge
|
||||
// only touches the corner of the pixel beyond it. These round such a value
|
||||
// inward instead, to exclude that pixel, for the cases where it should be.
|
||||
template <typename T>
|
||||
inline T get_edge_min_x(edge<T> const& edge, const T current_y) {
|
||||
T round_inward_min(double val) {
|
||||
// 0.5 rounds to 1
|
||||
// 0.0 rounds to 0
|
||||
// -0.5 rounds to 0
|
||||
double half = std::floor(val) + 0.5;
|
||||
if (values_are_equal(val, half)) {
|
||||
return static_cast<T>(std::ceil(val));
|
||||
} else {
|
||||
return static_cast<T>(std::llround(val));
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T round_inward_max(double val) {
|
||||
// 0.5 rounds to 0
|
||||
// 0.0 rounds to 0
|
||||
// -0.5 rounds to -1
|
||||
double half = std::floor(val) + 0.5;
|
||||
if (values_are_equal(val, half)) {
|
||||
return static_cast<T>(std::floor(val));
|
||||
} else {
|
||||
return static_cast<T>(std::llround(val));
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T get_edge_min_x(edge<T> const& edge, const T current_y, bool inward = false) {
|
||||
if (is_horizontal(edge)) {
|
||||
if (edge.bot.x < edge.top.x) {
|
||||
return edge.bot.x;
|
||||
@@ -114,7 +145,7 @@ inline T get_edge_min_x(edge<T> const& edge, const T current_y) {
|
||||
} else {
|
||||
double lower_range_y = static_cast<double>(current_y - edge.bot.y) - 0.5;
|
||||
double return_val = static_cast<double>(edge.bot.x) + edge.dx * lower_range_y;
|
||||
T value = round_towards_min<T>(return_val);
|
||||
T value = inward ? round_inward_min<T>(return_val) : round_towards_min<T>(return_val);
|
||||
return value;
|
||||
}
|
||||
} else {
|
||||
@@ -123,14 +154,14 @@ inline T get_edge_min_x(edge<T> const& edge, const T current_y) {
|
||||
} else {
|
||||
double return_val =
|
||||
static_cast<double>(edge.bot.x) + edge.dx * (static_cast<double>(current_y - edge.bot.y) + 0.5);
|
||||
T value = round_towards_min<T>(return_val);
|
||||
T value = inward ? round_inward_min<T>(return_val) : round_towards_min<T>(return_val);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T get_edge_max_x(edge<T> const& edge, const T current_y) {
|
||||
inline T get_edge_max_x(edge<T> const& edge, const T current_y, bool inward = false) {
|
||||
if (is_horizontal(edge)) {
|
||||
if (edge.bot.x > edge.top.x) {
|
||||
return edge.bot.x;
|
||||
@@ -143,7 +174,7 @@ inline T get_edge_max_x(edge<T> const& edge, const T current_y) {
|
||||
} else {
|
||||
double lower_range_y = static_cast<double>(current_y - edge.bot.y) - 0.5;
|
||||
double return_val = static_cast<double>(edge.bot.x) + edge.dx * lower_range_y;
|
||||
T value = round_towards_max<T>(return_val);
|
||||
T value = inward ? round_inward_max<T>(return_val) : round_towards_max<T>(return_val);
|
||||
return value;
|
||||
}
|
||||
} else {
|
||||
@@ -152,12 +183,61 @@ inline T get_edge_max_x(edge<T> const& edge, const T current_y) {
|
||||
} else {
|
||||
double return_val =
|
||||
static_cast<double>(edge.bot.x) + edge.dx * (static_cast<double>(current_y - edge.bot.y) + 0.5);
|
||||
T value = round_towards_max<T>(return_val);
|
||||
T value = inward ? round_inward_max<T>(return_val) : round_towards_max<T>(return_val);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The range of columns of hot pixels that an edge passes through within a row,
|
||||
// treating each pixel as half-open, [x - 0.5, x + 0.5) by [y - 0.5, y + 0.5),
|
||||
// which is consistent with the rounding of intersection points. Unlike the
|
||||
// closed pixels used by get_edge_min_x and get_edge_max_x, a point on the
|
||||
// boundary between two pixels belongs to only one of them, so an edge passing
|
||||
// diagonally through a corner is not snapped to both of the pixels on either
|
||||
// side of the corner. When several geometries are snapped to a common set of
|
||||
// hot pixels, snapping to both made edges from different geometries zigzag
|
||||
// through the same pixels in different orders and cross each other.
|
||||
template <typename T>
|
||||
inline void get_edge_half_open_x_range(edge<T> const& edge, const T current_y, T& x_min, T& x_max) {
|
||||
if (is_horizontal(edge)) {
|
||||
x_min = std::min(edge.bot.x, edge.top.x);
|
||||
x_max = std::max(edge.bot.x, edge.top.x);
|
||||
return;
|
||||
}
|
||||
|
||||
// edge.top has the smaller y and edge.bot the larger
|
||||
double y_lo = static_cast<double>(current_y) - 0.5;
|
||||
double y_hi = static_cast<double>(current_y) + 0.5;
|
||||
bool hi_included = false;
|
||||
if (y_lo < static_cast<double>(edge.top.y)) {
|
||||
y_lo = static_cast<double>(edge.top.y);
|
||||
}
|
||||
if (y_hi >= static_cast<double>(edge.bot.y)) {
|
||||
y_hi = static_cast<double>(edge.bot.y);
|
||||
hi_included = true;
|
||||
}
|
||||
|
||||
double x_lo = static_cast<double>(edge.bot.x) + edge.dx * (y_lo - static_cast<double>(edge.bot.y));
|
||||
double x_hi = static_cast<double>(edge.bot.x) + edge.dx * (y_hi - static_cast<double>(edge.bot.y));
|
||||
|
||||
if (x_lo <= x_hi) {
|
||||
x_min = static_cast<T>(std::floor(x_lo + 0.5));
|
||||
if (hi_included) {
|
||||
x_max = static_cast<T>(std::floor(x_hi + 0.5));
|
||||
} else {
|
||||
x_max = static_cast<T>(std::ceil(x_hi + 0.5)) - 1;
|
||||
}
|
||||
} else {
|
||||
x_max = static_cast<T>(std::floor(x_lo + 0.5));
|
||||
if (hi_included) {
|
||||
x_min = static_cast<T>(std::floor(x_hi + 0.5));
|
||||
} else {
|
||||
x_min = static_cast<T>(std::floor(x_hi - 0.5)) + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void hot_pixel_set_left_to_right(T y,
|
||||
T start_x,
|
||||
@@ -167,9 +247,20 @@ void hot_pixel_set_left_to_right(T y,
|
||||
hot_pixel_itr<T>& itr,
|
||||
hot_pixel_itr<T>& end,
|
||||
bool add_end_point) {
|
||||
// An edge that only touches the corner of a hot pixel is not snapped to it,
|
||||
// unless the edge intersects some other edge or the hot pixel is the rounded
|
||||
// location of an intersection, where snapping is needed to keep the result
|
||||
// consistent. Otherwise two parallel diagonal edges one unit apart would
|
||||
// each be snapped to the other's vertices, and a valid polygon one unit
|
||||
// wide would collapse to nothing.
|
||||
T x_min_inward = get_edge_min_x(*(bnd.current_edge), y, true);
|
||||
T x_max_inward = get_edge_max_x(*(bnd.current_edge), y, true);
|
||||
T x_min = get_edge_min_x(*(bnd.current_edge), y);
|
||||
x_min = std::max(x_min, start_x);
|
||||
T x_max = get_edge_max_x(*(bnd.current_edge), y);
|
||||
if (rings.snap_all_corners) {
|
||||
get_edge_half_open_x_range(*(bnd.current_edge), y, x_min, x_max);
|
||||
}
|
||||
x_min = std::max(x_min, start_x);
|
||||
x_max = std::min(x_max, end_x);
|
||||
for (; itr != end; ++itr) {
|
||||
if (itr->x < x_min) {
|
||||
@@ -181,6 +272,12 @@ void hot_pixel_set_left_to_right(T y,
|
||||
if (!add_end_point && itr->x == end_x) {
|
||||
continue;
|
||||
}
|
||||
if ((itr->x < x_min_inward || itr->x > x_max_inward) && !rings.snap_all_corners &&
|
||||
!bnd.current_edge->intersected &&
|
||||
!std::binary_search(rings.intersection_hot_pixels.begin(), rings.intersection_hot_pixels.end(), *itr,
|
||||
hot_pixel_sorter<T>())) {
|
||||
continue;
|
||||
}
|
||||
point_ptr<T> op = bnd.ring->points;
|
||||
bool to_front = (bnd.side == edge_left);
|
||||
if (to_front && (*itr == *op)) {
|
||||
@@ -204,9 +301,20 @@ void hot_pixel_set_right_to_left(T y,
|
||||
hot_pixel_rev_itr<T>& itr,
|
||||
hot_pixel_rev_itr<T>& end,
|
||||
bool add_end_point) {
|
||||
// An edge that only touches the corner of a hot pixel is not snapped to it,
|
||||
// unless the edge intersects some other edge or the hot pixel is the rounded
|
||||
// location of an intersection, where snapping is needed to keep the result
|
||||
// consistent. Otherwise two parallel diagonal edges one unit apart would
|
||||
// each be snapped to the other's vertices, and a valid polygon one unit
|
||||
// wide would collapse to nothing.
|
||||
T x_min_inward = get_edge_min_x(*(bnd.current_edge), y, true);
|
||||
T x_max_inward = get_edge_max_x(*(bnd.current_edge), y, true);
|
||||
T x_min = get_edge_min_x(*(bnd.current_edge), y);
|
||||
x_min = std::max(x_min, end_x);
|
||||
T x_max = get_edge_max_x(*(bnd.current_edge), y);
|
||||
if (rings.snap_all_corners) {
|
||||
get_edge_half_open_x_range(*(bnd.current_edge), y, x_min, x_max);
|
||||
}
|
||||
x_min = std::max(x_min, end_x);
|
||||
x_max = std::min(x_max, start_x);
|
||||
for (; itr != end; ++itr) {
|
||||
if (itr->x > x_max) {
|
||||
@@ -218,6 +326,12 @@ void hot_pixel_set_right_to_left(T y,
|
||||
if (!add_end_point && itr->x == end_x) {
|
||||
continue;
|
||||
}
|
||||
if ((itr->x < x_min_inward || itr->x > x_max_inward) && !rings.snap_all_corners &&
|
||||
!bnd.current_edge->intersected &&
|
||||
!std::binary_search(rings.intersection_hot_pixels.begin(), rings.intersection_hot_pixels.end(), *itr,
|
||||
hot_pixel_sorter<T>())) {
|
||||
continue;
|
||||
}
|
||||
point_ptr<T> op = bnd.ring->points;
|
||||
bool to_front = (bnd.side == edge_left);
|
||||
if (to_front && (*itr == *op)) {
|
||||
@@ -237,6 +351,10 @@ void sort_hot_pixels(ring_manager<T>& rings) {
|
||||
std::sort(rings.hot_pixels.begin(), rings.hot_pixels.end(), hot_pixel_sorter<T>());
|
||||
auto last = std::unique(rings.hot_pixels.begin(), rings.hot_pixels.end());
|
||||
rings.hot_pixels.erase(last, rings.hot_pixels.end());
|
||||
|
||||
std::sort(rings.intersection_hot_pixels.begin(), rings.intersection_hot_pixels.end(), hot_pixel_sorter<T>());
|
||||
last = std::unique(rings.intersection_hot_pixels.begin(), rings.intersection_hot_pixels.end());
|
||||
rings.intersection_hot_pixels.erase(last, rings.intersection_hot_pixels.end());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -302,6 +420,12 @@ void add_to_hot_pixels(mapbox::geometry::point<T> const& pt, ring_manager<T>& ri
|
||||
rings.hot_pixels.push_back(pt);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void add_intersection_to_hot_pixels(mapbox::geometry::point<T> const& pt, ring_manager<T>& rings) {
|
||||
rings.hot_pixels.push_back(pt);
|
||||
rings.intersection_hot_pixels.push_back(pt);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void add_first_point(bound<T>& bnd,
|
||||
active_bound_list<T>& active_bounds,
|
||||
|
||||
@@ -30,7 +30,9 @@ struct hp_intersection_swap {
|
||||
throw std::runtime_error("Trying to find intersection of lines that do not intersect");
|
||||
// LCOV_EXCL_END
|
||||
}
|
||||
add_to_hot_pixels(round_point<T>(pt), manager);
|
||||
b1->current_edge->intersected = true;
|
||||
b2->current_edge->intersected = true;
|
||||
add_intersection_to_hot_pixels(round_point<T>(pt), manager);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -60,7 +62,9 @@ bool horizontals_at_top_scanbeam(T top_y,
|
||||
if (*bnd_next != nullptr && (*bnd_next)->current_edge->top.y != top_y &&
|
||||
(*bnd_next)->current_edge->bot.y != top_y) {
|
||||
mapbox::geometry::point<T> pt(wround<T>((*bnd_next)->current_x), top_y);
|
||||
add_to_hot_pixels(pt, manager);
|
||||
(*bnd_next)->current_edge->intersected = true;
|
||||
current_edge->intersected = true;
|
||||
add_intersection_to_hot_pixels(pt, manager);
|
||||
}
|
||||
std::iter_swap(bnd_curr, bnd_next);
|
||||
++bnd_curr;
|
||||
@@ -76,7 +80,9 @@ bool horizontals_at_top_scanbeam(T top_y,
|
||||
if (*bnd_prev != nullptr && (*bnd_prev)->current_edge->top.y != top_y &&
|
||||
(*bnd_prev)->current_edge->bot.y != top_y) {
|
||||
mapbox::geometry::point<T> pt(wround<T>((*bnd_prev)->current_x), top_y);
|
||||
add_to_hot_pixels(pt, manager);
|
||||
(*bnd_prev)->current_edge->intersected = true;
|
||||
current_edge->intersected = true;
|
||||
add_intersection_to_hot_pixels(pt, manager);
|
||||
}
|
||||
std::iter_swap(bnd_curr, bnd_prev);
|
||||
--bnd_curr;
|
||||
|
||||
@@ -1296,7 +1296,10 @@ void correct_tree(ring_manager<T>& manager) {
|
||||
}
|
||||
if (!found) {
|
||||
if ((*itr)->is_hole()) {
|
||||
throw std::runtime_error("Could not properly place hole to a parent.");
|
||||
// No remaining ring contains this hole (degenerate input, e.g. stacked
|
||||
// duplicate rings from coalesced tiny-polygon placeholders); drop it
|
||||
// rather than fail the entire tiling run.
|
||||
remove_ring_and_points(*itr, manager, false);
|
||||
} else {
|
||||
// Assign to base of tree by passing nullptr
|
||||
reassign_as_child(*itr, static_cast<ring_ptr<T>>(nullptr), manager);
|
||||
|
||||
@@ -31,12 +31,36 @@ class wagyu {
|
||||
private:
|
||||
local_minimum_list<T> minima_list;
|
||||
bool reverse_output;
|
||||
std::vector<mapbox::geometry::point<T>> extra_hot_pixels;
|
||||
|
||||
wagyu(wagyu const&) = delete;
|
||||
wagyu& operator=(wagyu const&) = delete;
|
||||
|
||||
public:
|
||||
wagyu() : minima_list(), reverse_output(false) {
|
||||
wagyu() : minima_list(), reverse_output(false), extra_hot_pixels() {
|
||||
}
|
||||
|
||||
// The hot pixels (the vertices and the rounded locations of intersections)
|
||||
// of the rings that have been added so far. Running this on all the rings
|
||||
// of several separate geometries, and passing the result to add_hot_pixels()
|
||||
// for each of them, makes edges that the geometries share snap identically
|
||||
// in each of them. This uses up the added rings, so it should be called on a
|
||||
// wagyu that is only being used to find hot pixels, not to execute.
|
||||
std::vector<mapbox::geometry::point<T>> hot_pixels() {
|
||||
ring_manager<T> manager;
|
||||
if (!minima_list.empty()) {
|
||||
build_hot_pixels(minima_list, manager);
|
||||
}
|
||||
return std::move(manager.hot_pixels);
|
||||
}
|
||||
|
||||
// Additional hot pixels, from hot_pixels() of a larger set of rings, for edges
|
||||
// to be snapped to as well as the hot pixels of the rings themselves. When these
|
||||
// are provided, edges are snapped to every hot pixel they touch, including those
|
||||
// whose corners they only touch, so that whether a shared edge is snapped to a
|
||||
// hot pixel does not depend on which geometry it is part of.
|
||||
void add_hot_pixels(std::vector<mapbox::geometry::point<T>> const& pixels) {
|
||||
extra_hot_pixels.insert(extra_hot_pixels.end(), pixels.begin(), pixels.end());
|
||||
}
|
||||
|
||||
~wagyu() {
|
||||
@@ -126,6 +150,11 @@ public:
|
||||
interrupt_check(); // Check for interruptions
|
||||
|
||||
build_hot_pixels(minima_list, manager);
|
||||
if (!extra_hot_pixels.empty()) {
|
||||
manager.snap_all_corners = true;
|
||||
manager.hot_pixels.insert(manager.hot_pixels.end(), extra_hot_pixels.begin(), extra_hot_pixels.end());
|
||||
sort_hot_pixels(manager);
|
||||
}
|
||||
|
||||
interrupt_check(); // Check for interruptions
|
||||
|
||||
|
||||
+4
-1
@@ -701,7 +701,10 @@ metadata make_metadata(const char *fname, int minzoom, int maxzoom, double minla
|
||||
m.strategies_json = stringify_strategies(strategies);
|
||||
|
||||
if (std::isinf(droprate)) {
|
||||
droprate = LLONG_MAX;
|
||||
// JSON has no representation for infinity, so substitute a huge
|
||||
// finite value. The cast is explicit because LLONG_MAX itself is
|
||||
// not representable as a double and rounds up to 2^63.
|
||||
droprate = (double) LLONG_MAX;
|
||||
}
|
||||
if (basezoom != maxzoom || droprate != 2.5 || retain_points_multiplier != 1) {
|
||||
m.decisions_json = std::string("{") +
|
||||
|
||||
@@ -407,7 +407,8 @@ std::string mvt_tile::encode() {
|
||||
std::string feature_string;
|
||||
protozero::pbf_writer feature_writer(feature_string);
|
||||
|
||||
feature_writer.add_enum(3, layers[i].features[f].type);
|
||||
if (layers[i].features[f].type >= 0)
|
||||
feature_writer.add_enum(3, layers[i].features[f].type);
|
||||
|
||||
std::vector<unsigned> sorted_tags = layers[i].features[f].tags;
|
||||
for (size_t v = 1; v < sorted_tags.size(); v += 2) {
|
||||
|
||||
@@ -93,12 +93,21 @@ struct mvt_value {
|
||||
long long sint_value;
|
||||
bool bool_value;
|
||||
int null_value;
|
||||
// Initializing string_value initializes the union's full width, which
|
||||
// the static_assert below checks. Setting only a narrower member (a
|
||||
// double, say) would leave the remaining bytes indeterminate, and the
|
||||
// implicit copy constructor copies the union as a whole, so those
|
||||
// bytes get read even when they aren't the member in use.
|
||||
struct {
|
||||
size_t off;
|
||||
size_t len;
|
||||
} string_value;
|
||||
} string_value = {0, 0};
|
||||
} numeric_value;
|
||||
|
||||
static_assert(sizeof(numeric_value) == sizeof(numeric_value.string_value),
|
||||
"string_value must span the whole union, since its default member "
|
||||
"initializer is what initializes the union");
|
||||
|
||||
std::string get_string_value() const {
|
||||
if (type == mvt_string) {
|
||||
return std::string(*s, numeric_value.string_value.off, numeric_value.string_value.len);
|
||||
|
||||
+2
-1
@@ -29,7 +29,7 @@
|
||||
#define A_VISVALINGAM ((int) 'v')
|
||||
#define A_DETECT_WRAPAROUND ((int) 'w')
|
||||
#define A_KEEP_POINT_CLUSTER_POSITION ((int) 'a')
|
||||
#define A_DISTINGUISH_DUPLICATES ((int) 'u')
|
||||
#define A_DROP_BY_ATTRIBUTE_AS_NEEDED ((int) 'A')
|
||||
|
||||
#define P_TILE_COMPRESSION ((int) 'C')
|
||||
#define P_DUPLICATION ((int) 'D')
|
||||
@@ -49,6 +49,7 @@
|
||||
#define P_POLYGON_SPLIT ((int) 'p')
|
||||
#define P_SIMPLIFY ((int) 's')
|
||||
#define P_TINY_POLYGON_REDUCTION ((int) 't')
|
||||
#define P_SPINDLES ((int) 'L')
|
||||
#define P_USE_SOURCE_POLYGON_WINDING ((int) 'w')
|
||||
|
||||
extern int prevent[256];
|
||||
|
||||
+65
-137
@@ -11,6 +11,7 @@
|
||||
#include "text.hpp"
|
||||
#include "read_json.hpp"
|
||||
#include "projection.hpp"
|
||||
#include "usage.hpp"
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
@@ -25,19 +26,65 @@ std::string filter;
|
||||
bool preserve_input_order = false;
|
||||
std::unordered_map<std::string, attribute_op> attribute_accum;
|
||||
std::vector<std::string> unidecode_data;
|
||||
std::vector<mvt_layer> bins;
|
||||
std::string accumulate_numeric;
|
||||
|
||||
std::set<std::string> keep;
|
||||
std::set<std::string> exclude;
|
||||
std::vector<std::string> exclude_prefix;
|
||||
std::vector<clipbbox> clipbboxes;
|
||||
|
||||
static const struct option long_options[] = {
|
||||
{"Output tile", 0, 0, 0},
|
||||
{"output", required_argument, 0, 'o'},
|
||||
{"source-tile", required_argument, 0, 't'},
|
||||
{"no-tile-compression", no_argument, 0, 'd' & 0x1F},
|
||||
|
||||
{"Tile resolution", 0, 0, 0},
|
||||
{"full-detail", required_argument, 0, 'd'},
|
||||
{"buffer", required_argument, 0, 'b'},
|
||||
|
||||
{"Filtering feature attributes", 0, 0, 0},
|
||||
{"include", required_argument, 0, 'y'},
|
||||
{"exclude", required_argument, 0, 'x'},
|
||||
{"exclude-prefix", required_argument, 0, 'x' & 0x1F},
|
||||
|
||||
{"Modifying feature attributes", 0, 0, 0},
|
||||
{"accumulate-attribute", required_argument, 0, 'E'},
|
||||
|
||||
{"Filtering features", 0, 0, 0},
|
||||
{"feature-filter", required_argument, 0, 'j'},
|
||||
{"feature-filter-file", required_argument, 0, 'J'},
|
||||
{"filter-points-multiplier", no_argument, 0, 'm'},
|
||||
{"deduplicate-by-id", no_argument, 0, 'i' & 0x1F},
|
||||
|
||||
{"Line and polygon simplification", 0, 0, 0},
|
||||
{"line-simplification", required_argument, 0, 'S'},
|
||||
{"tiny-polygon-size", required_argument, 0, 's' & 0x1F},
|
||||
|
||||
{"Reordering features within the tile", 0, 0, 0},
|
||||
{"preserve-input-order", no_argument, 0, 'o' & 0x1F},
|
||||
|
||||
{"", 0, 0, 0},
|
||||
{"unidecode-data", required_argument, 0, 'u' & 0x1F},
|
||||
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
|
||||
// the options above, with the usage message headings removed
|
||||
static struct option real_long_options[sizeof(long_options) / sizeof(long_options[0])];
|
||||
|
||||
void usage(char **argv) {
|
||||
fprintf(stderr, "Usage: %s -o newtile.pbf.gz tile.pbf.gz oz/ox/oy nz/nx/ny\n", argv[0]);
|
||||
fprintf(stderr, "to create tile nz/nx/ny from tile oz/ox/oy\n");
|
||||
fprintf(stderr, "Usage: %s -o newtile.pbf.gz -t nz/nx/ny tile.pbf.gz oz/ox/oy tile2.pbf.gz oz2/ox2/oy2\n", argv[0]);
|
||||
fprintf(stderr, "to create tile nz/nx/ny from tiles oz/ox/oy and oz2/ox2/oy2\n");
|
||||
static const char *const forms[] = {
|
||||
"[options] tile.pbf.gz oz/ox/oy nz/nx/ny",
|
||||
"[options] --source-tile=nz/nx/ny tile.pbf.gz oz/ox/oy ...",
|
||||
NULL,
|
||||
};
|
||||
static const struct usage_required_option required[] = {
|
||||
{"output", "newtile.pbf.gz", 0},
|
||||
{NULL, NULL, 0},
|
||||
};
|
||||
|
||||
print_usage(stderr, argv[0], forms, long_options, required);
|
||||
fprintf(stderr, "\nThe tile nz/nx/ny is created from the tile or tiles oz/ox/oy that contain it.\n");
|
||||
fprintf(stderr, "In the second form, each source tile is named by a file name and a z/x/y pair.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -67,52 +114,14 @@ int main(int argc, char **argv) {
|
||||
const char *outfile = NULL;
|
||||
double simplification = 0;
|
||||
double tiny_polygon_size = 0;
|
||||
std::string assign_to_bins;
|
||||
std::string bin_by_id_list;
|
||||
|
||||
std::vector<input_tile> sources;
|
||||
|
||||
struct option long_options[] = {
|
||||
{"include", required_argument, 0, 'y'},
|
||||
{"exclude", required_argument, 0, 'x'},
|
||||
{"exclude-prefix", required_argument, 0, 'x' & 0x1F},
|
||||
{"full-detail", required_argument, 0, 'd'},
|
||||
{"buffer", required_argument, 0, 'b'},
|
||||
{"output", required_argument, 0, 'o'},
|
||||
{"filter-points-multiplier", no_argument, 0, 'm'},
|
||||
{"feature-filter", required_argument, 0, 'j'},
|
||||
{"feature-filter-file", required_argument, 0, 'J'},
|
||||
{"preserve-input-order", no_argument, 0, 'o' & 0x1F},
|
||||
{"accumulate-attribute", required_argument, 0, 'E'},
|
||||
{"unidecode-data", required_argument, 0, 'u' & 0x1F},
|
||||
{"line-simplification", required_argument, 0, 'S'},
|
||||
{"tiny-polygon-size", required_argument, 0, 's' & 0x1F},
|
||||
{"source-tile", required_argument, 0, 't'},
|
||||
{"assign-to-bins", required_argument, 0, 'b' & 0x1F},
|
||||
{"bin-by-id-list", required_argument, 0, 'c' & 0x1F},
|
||||
{"accumulate-numeric-attributes", required_argument, 0, 'a' & 0x1F},
|
||||
{"no-tile-compression", no_argument, 0, 'd' & 0x1F},
|
||||
{"clip-bounding-box", required_argument, 0, 'k' & 0x1F},
|
||||
{"clip-polygon", required_argument, 0, 'l' & 0x1F},
|
||||
{"clip-polygon-file", required_argument, 0, 'm' & 0x1F},
|
||||
{"deduplicate-by-id", no_argument, 0, 'i' & 0x1F},
|
||||
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
|
||||
std::string getopt_str;
|
||||
for (size_t lo = 0; long_options[lo].name != NULL; lo++) {
|
||||
if (long_options[lo].val > ' ') {
|
||||
getopt_str.push_back(long_options[lo].val);
|
||||
|
||||
if (long_options[lo].has_arg == required_argument) {
|
||||
getopt_str.push_back(':');
|
||||
}
|
||||
}
|
||||
}
|
||||
strip_usage_headings(long_options, real_long_options);
|
||||
std::string getopt_str = getopt_string(real_long_options);
|
||||
|
||||
int option_index = 0;
|
||||
while ((i = getopt_long(argc, argv, getopt_str.c_str(), long_options, &option_index)) != -1) {
|
||||
while ((i = getopt_long(argc, argv, getopt_str.c_str(), real_long_options, &option_index)) != -1) {
|
||||
switch (i) {
|
||||
case 'y':
|
||||
keep.insert(optarg);
|
||||
@@ -174,47 +183,10 @@ int main(int argc, char **argv) {
|
||||
simplification = atof(optarg);
|
||||
break;
|
||||
|
||||
case 'b' & 0x1F:
|
||||
assign_to_bins = optarg;
|
||||
break;
|
||||
|
||||
case 'c' & 0x1F:
|
||||
bin_by_id_list = optarg;
|
||||
break;
|
||||
|
||||
case 'a' & 0x1F:
|
||||
accumulate_numeric = optarg;
|
||||
break;
|
||||
|
||||
case 'd' & 0x1F:
|
||||
do_compress = false;
|
||||
break;
|
||||
|
||||
case 'k' & 0x1F: {
|
||||
clipbbox clip;
|
||||
if (sscanf(optarg, "%lf,%lf,%lf,%lf", &clip.lon1, &clip.lat1, &clip.lon2, &clip.lat2) == 4) {
|
||||
projection->project(clip.lon1, clip.lat1, 32, &clip.minx, &clip.maxy);
|
||||
projection->project(clip.lon2, clip.lat2, 32, &clip.maxx, &clip.miny);
|
||||
clipbboxes.push_back(clip);
|
||||
} else {
|
||||
fprintf(stderr, "%s: Can't parse bounding box --clip-bounding-box=%s\n", argv[0], optarg);
|
||||
exit(EXIT_ARGS);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'l' & 0x1F: {
|
||||
clipbbox clip = parse_clip_poly(optarg);
|
||||
clipbboxes.push_back(clip);
|
||||
break;
|
||||
}
|
||||
|
||||
case 'm' & 0x1F: {
|
||||
clipbbox clip = parse_clip_poly(read_json_file(optarg));
|
||||
clipbboxes.push_back(clip);
|
||||
break;
|
||||
}
|
||||
|
||||
case 'i' & 0x1F: {
|
||||
deduplicate_by_id = true;
|
||||
break;
|
||||
@@ -229,6 +201,11 @@ int main(int argc, char **argv) {
|
||||
std::vector<input_tile> its;
|
||||
int nz, nx, ny;
|
||||
|
||||
if (outfile == NULL) {
|
||||
fprintf(stderr, "%s: must specify -o newtile.pbf.gz\n", argv[0]);
|
||||
usage(argv);
|
||||
}
|
||||
|
||||
if (outtile == NULL) { // single input
|
||||
if (argc - optind != 3) {
|
||||
fprintf(stderr, "Wrong number of arguments\n");
|
||||
@@ -283,59 +260,10 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
if (assign_to_bins.size() != 0) {
|
||||
FILE *f = fopen(assign_to_bins.c_str(), "r");
|
||||
if (f == NULL) {
|
||||
perror(assign_to_bins.c_str());
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
|
||||
int det = detail;
|
||||
if (det < 0) {
|
||||
det = 12;
|
||||
}
|
||||
bins = parse_layers(f, nz, nx, ny, 1LL << det, true);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
// clip the clip polygons, if any, to the tile bounds,
|
||||
// to reduce their complexity
|
||||
|
||||
bool clipped_to_nothing = false;
|
||||
if (clipbboxes.size() > 0) {
|
||||
long long wx1 = (nx - buffer / 256.0) * (1LL << (32 - nz));
|
||||
long long wy1 = (ny - buffer / 256.0) * (1LL << (32 - nz));
|
||||
long long wx2 = (nx + 1 + buffer / 256.0) * (1LL << (32 - nz));
|
||||
long long wy2 = (ny + 1 + buffer / 256.0) * (1LL << (32 - nz));
|
||||
|
||||
drawvec tile_bounds;
|
||||
tile_bounds.emplace_back(VT_MOVETO, wx1, wy1);
|
||||
tile_bounds.emplace_back(VT_LINETO, wx2, wy1);
|
||||
tile_bounds.emplace_back(VT_LINETO, wx2, wy2);
|
||||
tile_bounds.emplace_back(VT_LINETO, wx1, wy2);
|
||||
tile_bounds.emplace_back(VT_LINETO, wx1, wy1);
|
||||
|
||||
for (auto &c : clipbboxes) {
|
||||
c.minx = std::max(c.minx, wx1);
|
||||
c.miny = std::max(c.miny, wy1);
|
||||
c.maxx = std::min(c.maxx, wx2);
|
||||
c.maxy = std::min(c.maxy, wy2);
|
||||
|
||||
if (c.dv.size() > 0) {
|
||||
c.dv = clip_poly_poly(c.dv, tile_bounds);
|
||||
|
||||
if (c.dv.size() == 0) {
|
||||
clipped_to_nothing = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string out;
|
||||
|
||||
if (!clipped_to_nothing) {
|
||||
json_object *json_filter = NULL;
|
||||
{
|
||||
json_object_ptr json_filter;
|
||||
if (filter.size() > 0) {
|
||||
json_filter = parse_filter(filter.c_str());
|
||||
}
|
||||
@@ -361,7 +289,7 @@ int main(int argc, char **argv) {
|
||||
its.push_back(std::move(t));
|
||||
}
|
||||
|
||||
out = overzoom(its, nz, nx, ny, detail, buffer, keep, exclude, exclude_prefix, do_compress, NULL, demultiply, json_filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins, bin_by_id_list, accumulate_numeric, SIZE_MAX, clipbboxes, deduplicate_by_id);
|
||||
out = overzoom(its, nz, nx, ny, detail, buffer, keep, exclude, exclude_prefix, do_compress, NULL, demultiply, json_filter.get(), preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, std::vector<mvt_layer>(), "", "", SIZE_MAX, std::vector<clipbbox>(), deduplicate_by_id);
|
||||
}
|
||||
|
||||
FILE *f = fopen(outfile, "wb");
|
||||
|
||||
+43
-41
@@ -27,9 +27,7 @@
|
||||
#include "errors.hpp"
|
||||
#include "thread.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "jsonpull/jsonpull.h"
|
||||
}
|
||||
|
||||
#include "plugin.hpp"
|
||||
#include "write_json.hpp"
|
||||
@@ -145,53 +143,55 @@ std::vector<mvt_layer> parse_layers(int fd, int z, unsigned x, unsigned y, std::
|
||||
}
|
||||
|
||||
// Reads from the prefilter
|
||||
serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::vector<std::map<std::string, layermap_entry>> *layermaps, size_t tiling_seg, std::vector<std::vector<std::string>> *layer_unmaps, bool postfilter, key_pool &key_pool) {
|
||||
serial_feature parse_feature(json_pull_ptr &jp, int z, unsigned x, unsigned y, std::vector<std::map<std::string, layermap_entry>> *layermaps, size_t tiling_seg, std::vector<std::vector<std::string>> *layer_unmaps, bool postfilter, key_pool &key_pool) {
|
||||
serial_feature sf;
|
||||
|
||||
while (1) {
|
||||
// json_read also returns the intermediate containers of a feature
|
||||
// still being assembled, so the `continue` paths leave `j` alone;
|
||||
// freeing one would splice it out of its parent. `j` is only freed
|
||||
// once it is a complete Feature.
|
||||
json_object *j = json_read(jp);
|
||||
if (j == NULL) {
|
||||
if (jp->error != NULL) {
|
||||
if (j == nullptr) {
|
||||
if (jp->error != nullptr) {
|
||||
fprintf(stderr, "Filter output:%d: %s: ", jp->line, jp->error);
|
||||
if (jp->root != NULL) {
|
||||
json_context(jp->root);
|
||||
if (jp->root != nullptr) {
|
||||
json_context(jp->root.get());
|
||||
} else {
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
|
||||
json_free(jp->root);
|
||||
jp->root.reset();
|
||||
sf.t = -1;
|
||||
return sf;
|
||||
}
|
||||
|
||||
json_object *type = json_hash_get(j, "type");
|
||||
if (type == NULL || type->type != JSON_STRING) {
|
||||
if (type == nullptr || type->type != JSON_STRING) {
|
||||
continue;
|
||||
}
|
||||
if (strcmp(type->value.string.string, "Feature") != 0) {
|
||||
if (type->string() != "Feature") {
|
||||
continue;
|
||||
}
|
||||
|
||||
json_object *geometry = json_hash_get(j, "geometry");
|
||||
if (geometry == NULL) {
|
||||
if (geometry == nullptr) {
|
||||
fprintf(stderr, "Filter output:%d: filtered feature with no geometry: ", jp->line);
|
||||
json_context(j);
|
||||
json_free(j);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
|
||||
json_object *properties = json_hash_get(j, "properties");
|
||||
if (properties == NULL || (properties->type != JSON_HASH && properties->type != JSON_NULL)) {
|
||||
if (properties == nullptr || (properties->type != JSON_HASH && properties->type != JSON_NULL)) {
|
||||
fprintf(stderr, "Filter output:%d: feature without properties hash: ", jp->line);
|
||||
json_context(j);
|
||||
json_free(j);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
|
||||
json_object *geometry_type = json_hash_get(geometry, "type");
|
||||
if (geometry_type == NULL) {
|
||||
if (geometry_type == nullptr) {
|
||||
fprintf(stderr, "Filter output:%d: null geometry (additional not reported): ", jp->line);
|
||||
json_context(j);
|
||||
exit(EXIT_JSON);
|
||||
@@ -204,7 +204,7 @@ serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::
|
||||
}
|
||||
|
||||
json_object *coordinates = json_hash_get(geometry, "coordinates");
|
||||
if (coordinates == NULL || coordinates->type != JSON_ARRAY) {
|
||||
if (coordinates == nullptr || coordinates->type != JSON_ARRAY) {
|
||||
fprintf(stderr, "Filter output:%d: feature without coordinates array: ", jp->line);
|
||||
json_context(j);
|
||||
exit(EXIT_JSON);
|
||||
@@ -212,12 +212,12 @@ serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::
|
||||
|
||||
int t;
|
||||
for (t = 0; t < GEOM_TYPES; t++) {
|
||||
if (strcmp(geometry_type->value.string.string, geometry_names[t]) == 0) {
|
||||
if (geometry_type->string() == geometry_names[t]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (t >= GEOM_TYPES) {
|
||||
fprintf(stderr, "Filter output:%d: Can't handle geometry type %s: ", jp->line, geometry_type->value.string.string);
|
||||
fprintf(stderr, "Filter output:%d: Can't handle geometry type %s: ", jp->line, geometry_type->string().c_str());
|
||||
json_context(j);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
@@ -253,29 +253,29 @@ serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::
|
||||
|
||||
std::string layername = "unknown";
|
||||
json_object *tippecanoe = json_hash_get(j, "tippecanoe");
|
||||
if (tippecanoe != NULL) {
|
||||
if (tippecanoe != nullptr) {
|
||||
json_object *layer = json_hash_get(tippecanoe, "layer");
|
||||
if (layer != NULL && layer->type == JSON_STRING) {
|
||||
layername = std::string(layer->value.string.string);
|
||||
if (layer != nullptr && layer->type == JSON_STRING) {
|
||||
layername = layer->string();
|
||||
}
|
||||
|
||||
json_object *index = json_hash_get(tippecanoe, "index");
|
||||
if (index != NULL && index->type == JSON_NUMBER) {
|
||||
sf.index = index->value.number.number;
|
||||
if (index != nullptr && index->type == JSON_NUMBER) {
|
||||
sf.index = index->number();
|
||||
}
|
||||
|
||||
json_object *sequence = json_hash_get(tippecanoe, "sequence");
|
||||
if (sequence != NULL && sequence->type == JSON_NUMBER) {
|
||||
sf.seq = sequence->value.number.number;
|
||||
if (sequence != nullptr && sequence->type == JSON_NUMBER) {
|
||||
sf.seq = sequence->number();
|
||||
}
|
||||
|
||||
json_object *extent = json_hash_get(tippecanoe, "extent");
|
||||
if (extent != NULL && extent->type == JSON_NUMBER) {
|
||||
sf.extent = extent->value.number.number;
|
||||
if (extent != nullptr && extent->type == JSON_NUMBER) {
|
||||
sf.extent = extent->number();
|
||||
}
|
||||
|
||||
json_object *dropped = json_hash_get(tippecanoe, "dropped");
|
||||
if (dropped != NULL && dropped->type == JSON_TRUE) {
|
||||
if (dropped != nullptr && dropped->type == JSON_TRUE) {
|
||||
sf.dropped = FEATURE_DROPPED; // dropped
|
||||
} else {
|
||||
sf.dropped = FEATURE_KEPT; // kept
|
||||
@@ -300,10 +300,10 @@ serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::
|
||||
}
|
||||
|
||||
json_object *id = json_hash_get(j, "id");
|
||||
if (id != NULL && id->type == JSON_NUMBER) {
|
||||
sf.id = id->value.number.number;
|
||||
if (id->value.number.large_unsigned > 0) {
|
||||
sf.id = id->value.number.large_unsigned;
|
||||
if (id != nullptr && id->type == JSON_NUMBER) {
|
||||
sf.id = id->number();
|
||||
if (id->large_unsigned() > 0) {
|
||||
sf.id = id->large_unsigned();
|
||||
}
|
||||
sf.has_id = true;
|
||||
}
|
||||
@@ -347,18 +347,20 @@ serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < properties->value.object.length; i++) {
|
||||
serial_val v = stringify_value(properties->value.object.values[i], "Filter output", jp->line, j);
|
||||
if (properties->type == JSON_HASH) {
|
||||
for (const auto &e : properties->entries()) {
|
||||
serial_val v = stringify_value(e.value.get(), "Filter output", jp->line, j);
|
||||
|
||||
// Nulls can be excluded here because the expression evaluation filter
|
||||
// would have already run before prefiltering
|
||||
// Nulls can be excluded here because the expression evaluation filter
|
||||
// would have already run before prefiltering
|
||||
|
||||
if (v.type != mvt_null) {
|
||||
sf.full_keys.push_back(key_pool.pool(std::string(properties->value.object.keys[i]->value.string.string)));
|
||||
sf.full_values.push_back(v);
|
||||
if (v.type != mvt_null) {
|
||||
sf.full_keys.push_back(key_pool.pool(e.key->string()));
|
||||
sf.full_values.push_back(v);
|
||||
|
||||
if (!postfilter) {
|
||||
add_to_tilestats(ts->second.tilestats, std::string(properties->value.object.keys[i]->value.string.string), v);
|
||||
if (!postfilter) {
|
||||
add_to_tilestats(ts->second.tilestats, e.key->string(), v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
struct key_pool;
|
||||
std::vector<mvt_layer> filter_layers(const char *filter, std::vector<mvt_layer> &layer, unsigned z, unsigned x, unsigned y, std::vector<std::map<std::string, layermap_entry>> *layermaps, size_t tiling_seg, std::vector<std::vector<std::string>> *layer_unmaps, int extent);
|
||||
void setup_filter(const char *filter, int *write_to, int *read_from, pid_t *pid, unsigned z, unsigned x, unsigned y);
|
||||
serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::vector<std::map<std::string, layermap_entry>> *layermaps, size_t tiling_seg, std::vector<std::vector<std::string>> *layer_unmaps, bool filters, key_pool &key_pool);
|
||||
serial_feature parse_feature(json_pull_ptr &jp, int z, unsigned x, unsigned y, std::vector<std::map<std::string, layermap_entry>> *layermaps, size_t tiling_seg, std::vector<std::vector<std::string>> *layer_unmaps, bool filters, key_pool &key_pool);
|
||||
|
||||
+25
-20
@@ -397,9 +397,9 @@ sqlite3 *pmtilesmeta2tmp(const char *fname, const char *pmtiles_map) {
|
||||
exit(EXIT_OPEN);
|
||||
}
|
||||
|
||||
json_pull *jp = json_begin_string(decompressed_json.c_str());
|
||||
json_object *o = json_read_tree(jp);
|
||||
if (o == NULL) {
|
||||
json_pull_ptr jp = json_begin_string(decompressed_json.c_str());
|
||||
json_object_ptr o = json_read_tree(jp);
|
||||
if (o == nullptr) {
|
||||
fprintf(stderr, "%s: metadata parsing error: %s\n", fname, jp->error);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
@@ -415,45 +415,50 @@ sqlite3 *pmtilesmeta2tmp(const char *fname, const char *pmtiles_map) {
|
||||
state.nospace = true;
|
||||
state.json_write_hash();
|
||||
|
||||
for (size_t i = 0; i < o->value.object.length; i++) {
|
||||
const char *key = o->value.object.keys[i]->value.string.string;
|
||||
if (strcmp(key, "vector_layers") == 0 && o->value.object.values[i]->type == JSON_ARRAY) {
|
||||
for (const auto &e : o->entries()) {
|
||||
// Check before reading, since string() asserts on the type.
|
||||
if (e.key->type != JSON_STRING) {
|
||||
fprintf(stderr, "%s: non-string key in metadata\n", fname);
|
||||
continue;
|
||||
}
|
||||
|
||||
const std::string &key = e.key->string();
|
||||
if (key == "vector_layers" && e.value->type == JSON_ARRAY) {
|
||||
has_json = true;
|
||||
state.nospace = true;
|
||||
state.json_write_string("vector_layers");
|
||||
state.nospace = true;
|
||||
state.json_write_json(json_stringify(o->value.object.values[i]));
|
||||
} else if (strcmp(key, "tilestats") == 0 && o->value.object.values[i]->type == JSON_HASH) {
|
||||
state.json_write_json(json_stringify(e.value.get()));
|
||||
} else if (key == "tilestats" && e.value->type == JSON_HASH) {
|
||||
has_json = true;
|
||||
state.nospace = true;
|
||||
state.json_write_string("tilestats");
|
||||
state.nospace = true;
|
||||
state.json_write_json(json_stringify(o->value.object.values[i]));
|
||||
} else if (strcmp(key, "strategies") == 0 && o->value.object.values[i]->type == JSON_ARRAY) {
|
||||
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('strategies', %Q);", json_stringify(o->value.object.values[i]));
|
||||
state.json_write_json(json_stringify(e.value.get()));
|
||||
} else if (key == "strategies" && e.value->type == JSON_ARRAY) {
|
||||
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('strategies', %Q);", json_stringify(e.value.get()).c_str());
|
||||
if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {
|
||||
fprintf(stderr, "set %s in metadata: %s\n", key, err);
|
||||
fprintf(stderr, "set %s in metadata: %s\n", key.c_str(), 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]));
|
||||
} else if (key == "tippecanoe_decisions" && e.value->type == JSON_HASH) {
|
||||
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('tippecanoe_decisions', %Q);", json_stringify(e.value.get()).c_str());
|
||||
if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {
|
||||
fprintf(stderr, "set %s in metadata: %s\n", key, err);
|
||||
fprintf(stderr, "set %s in metadata: %s\n", key.c_str(), 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);
|
||||
} else if (e.value->type != JSON_STRING) {
|
||||
fprintf(stderr, "%s\n", key.c_str());
|
||||
fprintf(stderr, "%s: non-string in metadata\n", fname);
|
||||
} else {
|
||||
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES (%Q, %Q);", key, o->value.object.values[i]->value.string.string);
|
||||
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES (%Q, %Q);", key.c_str(), e.value->string().c_str());
|
||||
if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {
|
||||
fprintf(stderr, "set %s in metadata: %s\n", key, err);
|
||||
fprintf(stderr, "set %s in metadata: %s\n", key.c_str(), err);
|
||||
}
|
||||
sqlite3_free(sql);
|
||||
}
|
||||
}
|
||||
|
||||
json_end(jp);
|
||||
state.nospace = true;
|
||||
state.json_end_hash();
|
||||
|
||||
|
||||
+984
@@ -0,0 +1,984 @@
|
||||
// Preservation of "spindle" polygons: polygons, or parts of polygons, that are
|
||||
// narrower than one tile pixel, like a 1-meter buffer around a long linestring.
|
||||
//
|
||||
// When such a polygon is scaled down to tile coordinates, the two sides of the
|
||||
// spindle round to the same or adjacent pixel rows more or less at random, so after
|
||||
// polygon cleaning the feature usually collapses away to nothing in most places
|
||||
// while surviving as disconnected fragments wherever the rounding happens to keep
|
||||
// the two sides apart.
|
||||
//
|
||||
// The approach here is to look at the feature in unrounded tile coordinates,
|
||||
// before it is rounded, to find the edges of each ring that have another,
|
||||
// oppositely-directed edge less than a pixel away, which is also not just the
|
||||
// other side of a corner. Those are the edges that are at risk of collapsing.
|
||||
// For each of them, we construct a "strip" polygon one pixel wide, one side
|
||||
// of which is the edge as it will be rounded, and the other side of which is
|
||||
// offset by one pixel toward the inside of the polygon. The strips are then
|
||||
// unioned with the normally-cleaned polygon, so the narrow parts of the feature
|
||||
// come out as a continuous line of polygon one (or sometimes two) pixels thick
|
||||
// instead of disappearing.
|
||||
//
|
||||
// Where the polygon is already at least a pixel thick, the strips lie entirely
|
||||
// within it and do not change the result, so they cost only some time in the
|
||||
// union, and only for features that have narrow parts.
|
||||
|
||||
#include <cmath>
|
||||
#include <climits>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include <tuple>
|
||||
#include <mapbox/geometry/point.hpp>
|
||||
#include <mapbox/geometry/multi_polygon.hpp>
|
||||
#include <mapbox/geometry/wagyu/wagyu.hpp>
|
||||
#include "geometry.hpp"
|
||||
#include "errors.hpp"
|
||||
#include "polygon.hpp"
|
||||
|
||||
// Boundaries closer together than this (in tile pixels) may collapse
|
||||
// when they are rounded to integer tile coordinates, since rounding can
|
||||
// move each vertex by up to half a pixel in each dimension
|
||||
static const double THIN_DISTANCE = M_SQRT2;
|
||||
|
||||
// Nearby boundaries are only considered to enclose a narrow part of the polygon
|
||||
// if they are at least this far apart (in tile pixels) along the ring, so that
|
||||
// ordinary corners do not count.
|
||||
static const double MIN_ALONG_RING = 4 * THIN_DISTANCE;
|
||||
|
||||
// Spacing, in tile pixels, of the points along an edge that are checked
|
||||
// for being close to a nearby edge
|
||||
static const double SAMPLE_SPACING = 1.0;
|
||||
|
||||
shared_edge *shared_edges_map = NULL;
|
||||
size_t shared_edges_count = 0;
|
||||
|
||||
namespace {
|
||||
|
||||
struct fedge {
|
||||
double x1, y1, x2, y2; // unrounded tile coordinates
|
||||
long long wx1, wy1, wx2, wy2; // world coordinates, relative to the tile origin
|
||||
size_t ring; // which ring the edge is part of
|
||||
double arc; // distance along the ring to the start of the edge
|
||||
double len; // length of the edge
|
||||
double minx, miny, maxx, maxy;
|
||||
bool thin = false; // within THIN_DISTANCE of some other edge
|
||||
bool crosses_shared = false; // and that other edge is shared with another feature
|
||||
int shared = -1; // is this edge shared with another feature? -1 if not yet known
|
||||
};
|
||||
|
||||
double point_segment_distance_sq(double px, double py, fedge const &e, double &t) {
|
||||
double dx = e.x2 - e.x1;
|
||||
double dy = e.y2 - e.y1;
|
||||
double len_sq = dx * dx + dy * dy;
|
||||
t = 0;
|
||||
if (len_sq > 0) {
|
||||
t = ((px - e.x1) * dx + (py - e.y1) * dy) / len_sq;
|
||||
t = std::max(0.0, std::min(1.0, t));
|
||||
}
|
||||
double cx = e.x1 + t * dx - px;
|
||||
double cy = e.y1 + t * dy - py;
|
||||
return cx * cx + cy * cy;
|
||||
}
|
||||
|
||||
double cross(double ox, double oy, double ax, double ay, double bx, double by) {
|
||||
return (ax - ox) * (by - oy) - (ay - oy) * (bx - ox);
|
||||
}
|
||||
|
||||
double segment_distance_sq(fedge const &a, fedge const &b) {
|
||||
double c1 = cross(a.x1, a.y1, a.x2, a.y2, b.x1, b.y1);
|
||||
double c2 = cross(a.x1, a.y1, a.x2, a.y2, b.x2, b.y2);
|
||||
double c3 = cross(b.x1, b.y1, b.x2, b.y2, a.x1, a.y1);
|
||||
double c4 = cross(b.x1, b.y1, b.x2, b.y2, a.x2, a.y2);
|
||||
if (((c1 > 0 && c2 < 0) || (c1 < 0 && c2 > 0)) &&
|
||||
((c3 > 0 && c4 < 0) || (c3 < 0 && c4 > 0))) {
|
||||
return 0; // they cross
|
||||
}
|
||||
|
||||
double t;
|
||||
double d = point_segment_distance_sq(a.x1, a.y1, b, t);
|
||||
d = std::min(d, point_segment_distance_sq(a.x2, a.y2, b, t));
|
||||
d = std::min(d, point_segment_distance_sq(b.x1, b.y1, a, t));
|
||||
d = std::min(d, point_segment_distance_sq(b.x2, b.y2, a, t));
|
||||
return d;
|
||||
}
|
||||
|
||||
// Is some part of edge `e` within THIN_DISTANCE of edge `f`
|
||||
// at a place that is not just the other side of a corner?
|
||||
bool close_along(fedge const &e, fedge const &f, std::vector<double> const &ring_perimeters) {
|
||||
// Only look at the part of `e` that is within reach of `f`'s bounding box
|
||||
double t0 = 0, t1 = 1;
|
||||
double dx = e.x2 - e.x1;
|
||||
double dy = e.y2 - e.y1;
|
||||
|
||||
auto restrict = [&](double p, double dp, double lo, double hi) {
|
||||
if (dp == 0) {
|
||||
if (p < lo || p > hi) {
|
||||
t0 = 1;
|
||||
t1 = 0;
|
||||
}
|
||||
} else {
|
||||
double a = (lo - p) / dp;
|
||||
double b = (hi - p) / dp;
|
||||
if (a > b) {
|
||||
std::swap(a, b);
|
||||
}
|
||||
t0 = std::max(t0, a);
|
||||
t1 = std::min(t1, b);
|
||||
}
|
||||
};
|
||||
restrict(e.x1, dx, f.minx - THIN_DISTANCE, f.maxx + THIN_DISTANCE);
|
||||
restrict(e.y1, dy, f.miny - THIN_DISTANCE, f.maxy + THIN_DISTANCE);
|
||||
if (t0 > t1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
double span = (t1 - t0) * e.len;
|
||||
size_t samples = std::ceil(span / SAMPLE_SPACING) + 1;
|
||||
const double thin_sq = THIN_DISTANCE * THIN_DISTANCE;
|
||||
|
||||
for (size_t s = 0; s < samples; s++) {
|
||||
double t = samples == 1 ? (t0 + t1) / 2 : t0 + (t1 - t0) * s / (samples - 1);
|
||||
double px = e.x1 + dx * t;
|
||||
double py = e.y1 + dy * t;
|
||||
|
||||
double u;
|
||||
if (point_segment_distance_sq(px, py, f, u) < thin_sq) {
|
||||
if (e.ring != f.ring) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// The other boundary is nearby in space. But is it also far away
|
||||
// along the ring? If not, it is just the other side of a corner,
|
||||
// not the other side of a narrow part of the polygon.
|
||||
double here = e.arc + e.len * t;
|
||||
double there = f.arc + f.len * u;
|
||||
double along = std::fabs(here - there);
|
||||
along = std::min(along, ring_perimeters[e.ring] - along);
|
||||
|
||||
if (along >= MIN_ALONG_RING) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make a strip polygon one pixel wide along the edge from (x1,y1) to (x2,y2),
|
||||
// in world coordinates. One side of the strip is the edge as it will be rounded
|
||||
// to tile coordinates, so where the polygon is already at least a pixel thick
|
||||
// the strip lies entirely within it and adds nothing. The other side is offset
|
||||
// by one pixel (along whichever axis is closer to perpendicular to the edge)
|
||||
// toward the side of the edge where the polygon is, which is always the left
|
||||
// for correctly-wound rings.
|
||||
void add_strip(drawvec &out, long long x1, long long y1, long long x2, long long y2, int shift) {
|
||||
long long ax = std::llround((double) x1 / (1LL << shift));
|
||||
long long ay = std::llround((double) y1 / (1LL << shift));
|
||||
long long bx = std::llround((double) x2 / (1LL << shift));
|
||||
long long by = std::llround((double) y2 / (1LL << shift));
|
||||
|
||||
long long dx = bx - ax;
|
||||
long long dy = by - ay;
|
||||
if (dx == 0 && dy == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
long long ox, oy;
|
||||
if (std::llabs(dx) >= std::llabs(dy)) {
|
||||
ox = 0;
|
||||
oy = dx > 0 ? 1 : -1;
|
||||
} else {
|
||||
ox = dy > 0 ? -1 : 1;
|
||||
oy = 0;
|
||||
}
|
||||
|
||||
drawvec ring;
|
||||
ring.emplace_back(VT_MOVETO, ax, ay);
|
||||
ring.emplace_back(VT_LINETO, bx, by);
|
||||
ring.emplace_back(VT_LINETO, bx + ox, by + oy);
|
||||
ring.emplace_back(VT_LINETO, ax + ox, ay + oy);
|
||||
ring.emplace_back(VT_LINETO, ax, ay);
|
||||
|
||||
// orient it as an outer ring
|
||||
if (get_area(ring, 0, ring.size()) < 0) {
|
||||
std::reverse(ring.begin(), ring.end());
|
||||
ring[0].op = VT_MOVETO;
|
||||
ring[ring.size() - 1].op = VT_LINETO;
|
||||
}
|
||||
|
||||
for (auto const &d : ring) {
|
||||
out.push_back(d);
|
||||
}
|
||||
}
|
||||
|
||||
// Is there an edge shared with another feature that starts at (ax, ay)
|
||||
// and runs in the direction of (bx, by)? After simplification, the other end
|
||||
// of the shared edge may no longer be in the geometry, but it must lie within
|
||||
// the simplification tolerance of this edge.
|
||||
bool shared_toward(long long ax, long long ay, long long bx, long long by, double tolerance) {
|
||||
if (shared_edges_count == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto first = std::lower_bound(shared_edges_map, shared_edges_map + shared_edges_count, std::make_pair(ay, ax),
|
||||
[](shared_edge const &se, std::pair<long long, long long> const &p) {
|
||||
return se.ay < p.first || (se.ay == p.first && se.ax < p.second);
|
||||
});
|
||||
|
||||
double dx = bx - ax;
|
||||
double dy = by - ay;
|
||||
double len = std::hypot(dx, dy);
|
||||
if (len == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto it = first; it != shared_edges_map + shared_edges_count && it->ay == ay && it->ax == ax; ++it) {
|
||||
double qx = it->bx - ax;
|
||||
double qy = it->by - ay;
|
||||
|
||||
// how far along this edge, and how far off to the side of it, is the other end?
|
||||
double along = (qx * dx + qy * dy) / len;
|
||||
double off = std::fabs(qx * dy - qy * dx) / len;
|
||||
|
||||
if (along > 0 && off <= tolerance) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Is this edge (or what is left of it after simplification) shared with another feature?
|
||||
bool is_shared(fedge &e, double tolerance, long long ox, long long oy) {
|
||||
if (shared_edges_count == 0) {
|
||||
return false;
|
||||
}
|
||||
if (e.shared < 0) {
|
||||
e.shared = shared_toward(e.wx1 + ox, e.wy1 + oy, e.wx2 + ox, e.wy2 + oy, tolerance) ||
|
||||
shared_toward(e.wx2 + ox, e.wy2 + oy, e.wx1 + ox, e.wy1 + oy, tolerance);
|
||||
}
|
||||
return e.shared;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
drawvec thin_polygon_strips(drawvec const &geom, int z, int detail, double simplification, long long ox, long long oy) {
|
||||
drawvec out;
|
||||
|
||||
int shift = 32 - detail - z;
|
||||
if (shift <= 0) {
|
||||
// tile coordinates are at least as precise as world coordinates,
|
||||
// so scaling cannot make anything collapse
|
||||
return out;
|
||||
}
|
||||
double scale = 1LL << shift;
|
||||
|
||||
// Decompose the rings into edges, in unrounded tile coordinates
|
||||
|
||||
std::vector<fedge> edges;
|
||||
std::vector<double> ring_perimeters;
|
||||
for (size_t i = 0; i < geom.size(); i++) {
|
||||
if (geom[i].op == VT_MOVETO) {
|
||||
size_t j;
|
||||
for (j = i + 1; j < geom.size(); j++) {
|
||||
if (geom[j].op != VT_LINETO) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (j - i >= 3) {
|
||||
double arc = 0;
|
||||
for (size_t k = i; k < j; k++) {
|
||||
size_t n = (k + 1 < j) ? k + 1 : i; // close the ring if it isn't already
|
||||
if (geom[k].x != geom[n].x || geom[k].y != geom[n].y) {
|
||||
fedge ed;
|
||||
ed.x1 = geom[k].x / scale;
|
||||
ed.y1 = geom[k].y / scale;
|
||||
ed.x2 = geom[n].x / scale;
|
||||
ed.y2 = geom[n].y / scale;
|
||||
ed.wx1 = geom[k].x;
|
||||
ed.wy1 = geom[k].y;
|
||||
ed.wx2 = geom[n].x;
|
||||
ed.wy2 = geom[n].y;
|
||||
ed.ring = ring_perimeters.size();
|
||||
ed.arc = arc;
|
||||
ed.len = std::hypot(ed.x2 - ed.x1, ed.y2 - ed.y1);
|
||||
ed.minx = std::min(ed.x1, ed.x2);
|
||||
ed.miny = std::min(ed.y1, ed.y2);
|
||||
ed.maxx = std::max(ed.x1, ed.x2);
|
||||
ed.maxy = std::max(ed.y1, ed.y2);
|
||||
edges.push_back(ed);
|
||||
arc += ed.len;
|
||||
}
|
||||
}
|
||||
ring_perimeters.push_back(arc);
|
||||
}
|
||||
|
||||
i = j - 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (edges.size() < 2) {
|
||||
return out;
|
||||
}
|
||||
|
||||
// Sweep down through the edges in order of their tops to find pairs
|
||||
// of edges whose bounding boxes come within THIN_DISTANCE of each other.
|
||||
|
||||
std::vector<size_t> order(edges.size());
|
||||
for (size_t i = 0; i < order.size(); i++) {
|
||||
order[i] = i;
|
||||
}
|
||||
std::sort(order.begin(), order.end(), [&](size_t a, size_t b) {
|
||||
return edges[a].miny < edges[b].miny;
|
||||
});
|
||||
|
||||
// How far a simplified shared border may have strayed from the original shared edges
|
||||
const double tolerance = (1 + std::max(simplification, 0.0)) * scale;
|
||||
|
||||
std::vector<size_t> active;
|
||||
const double thin_sq = THIN_DISTANCE * THIN_DISTANCE;
|
||||
bool any = false;
|
||||
|
||||
for (size_t oi = 0; oi < order.size(); oi++) {
|
||||
size_t ei = order[oi];
|
||||
fedge &e = edges[ei];
|
||||
|
||||
size_t keep = 0;
|
||||
for (size_t ai = 0; ai < active.size(); ai++) {
|
||||
size_t fi = active[ai];
|
||||
fedge &f = edges[fi];
|
||||
|
||||
if (f.maxy + THIN_DISTANCE < e.miny) {
|
||||
continue; // f is entirely above anything that remains; retire it
|
||||
}
|
||||
active[keep++] = fi;
|
||||
|
||||
// Once both edges are known to be thin (and, if there are shared
|
||||
// edges, to need no strip anyway), there is nothing more to learn.
|
||||
if (e.thin && f.thin && (shared_edges_count == 0 || (e.crosses_shared && f.crosses_shared))) {
|
||||
continue;
|
||||
}
|
||||
if (f.maxx + THIN_DISTANCE < e.minx || e.maxx + THIN_DISTANCE < f.minx) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Only boundaries that run in opposite directions enclose a
|
||||
// narrow stretch of polygon (or of hole) between them.
|
||||
// Boundaries running in the same direction are just
|
||||
// consecutive edges, or nearby parallel features.
|
||||
double edx = e.x2 - e.x1, edy = e.y2 - e.y1;
|
||||
double fdx = f.x2 - f.x1, fdy = f.y2 - f.y1;
|
||||
if (edx * fdx + edy * fdy >= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Clipping to the tile boundary (Sutherland-Hodgman) leaves
|
||||
// zero-width bridges that run out along the clip line and back.
|
||||
// Those are not real parts of the polygon, so don't revive them.
|
||||
if ((e.y1 == e.y2 && f.y1 == f.y2 && e.y1 == f.y1) ||
|
||||
(e.x1 == e.x2 && f.x1 == f.x2 && e.x1 == f.x1)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (segment_distance_sq(e, f) >= thin_sq) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// A strip along `e` would extend past `f`, so if `f` is an edge
|
||||
// shared with another feature, the strip would overlap that feature.
|
||||
if ((!e.thin || (shared_edges_count > 0 && !e.crosses_shared)) && close_along(e, f, ring_perimeters)) {
|
||||
e.thin = true;
|
||||
any = true;
|
||||
if (is_shared(f, tolerance, ox, oy)) {
|
||||
e.crosses_shared = true;
|
||||
}
|
||||
}
|
||||
if ((!f.thin || (shared_edges_count > 0 && !f.crosses_shared)) && close_along(f, e, ring_perimeters)) {
|
||||
f.thin = true;
|
||||
any = true;
|
||||
if (is_shared(e, tolerance, ox, oy)) {
|
||||
f.crosses_shared = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
active.resize(keep);
|
||||
active.push_back(ei);
|
||||
}
|
||||
|
||||
if (!any) {
|
||||
return out;
|
||||
}
|
||||
|
||||
// A narrow part whose far side is an edge shared with another feature,
|
||||
// like a panhandle between two neighboring political units, is left to
|
||||
// collapse, so that the features still tile exactly instead of overlapping.
|
||||
for (auto const &e : edges) {
|
||||
if (e.thin && !e.crosses_shared) {
|
||||
add_strip(out, e.wx1, e.wy1, e.wx2, e.wy2, shift);
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
drawvec outline_strips(drawvec const &geom, int z, int detail, double simplification, long long ox, long long oy, bool *all_shared) {
|
||||
drawvec out;
|
||||
*all_shared = false;
|
||||
|
||||
int shift = 32 - detail - z;
|
||||
if (shift <= 0) {
|
||||
return out;
|
||||
}
|
||||
|
||||
// How far a simplified shared border may have strayed from the original shared edges
|
||||
const double tolerance = (1 + std::max(simplification, 0.0)) * (1LL << shift);
|
||||
size_t edges = 0, shared = 0;
|
||||
|
||||
for (size_t i = 0; i < geom.size(); i++) {
|
||||
if (geom[i].op == VT_MOVETO) {
|
||||
size_t j;
|
||||
for (j = i + 1; j < geom.size(); j++) {
|
||||
if (geom[j].op != VT_LINETO) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (j - i >= 3) {
|
||||
for (size_t k = i; k < j; k++) {
|
||||
size_t n = (k + 1 < j) ? k + 1 : i; // close the ring if it isn't already
|
||||
if (geom[k].x == geom[n].x && geom[k].y == geom[n].y) {
|
||||
continue;
|
||||
}
|
||||
edges++;
|
||||
|
||||
// Along a border shared with another feature, that feature
|
||||
// already covers the space, so leave it to close over it.
|
||||
if (shared_edges_count > 0 &&
|
||||
(shared_toward(geom[k].x + ox, geom[k].y + oy, geom[n].x + ox, geom[n].y + oy, tolerance) ||
|
||||
shared_toward(geom[n].x + ox, geom[n].y + oy, geom[k].x + ox, geom[k].y + oy, tolerance))) {
|
||||
shared++;
|
||||
continue;
|
||||
}
|
||||
|
||||
add_strip(out, geom[k].x, geom[k].y, geom[n].x, geom[n].y, shift);
|
||||
}
|
||||
}
|
||||
|
||||
i = j - 1;
|
||||
}
|
||||
}
|
||||
|
||||
*all_shared = edges > 0 && shared == edges;
|
||||
return out;
|
||||
}
|
||||
|
||||
double unshared_perimeter(drawvec const &geom, size_t i, size_t j, long long ox, long long oy) {
|
||||
double perimeter = 0;
|
||||
|
||||
for (size_t k = i; k + 1 < j; k++) {
|
||||
long long ax = geom[k].x + ox, ay = geom[k].y + oy;
|
||||
long long bx = geom[k + 1].x + ox, by = geom[k + 1].y + oy;
|
||||
|
||||
if (shared_edges_count > 0) {
|
||||
auto first = std::lower_bound(shared_edges_map, shared_edges_map + shared_edges_count, shared_edge{ax, ay, bx, by},
|
||||
[](shared_edge const &a, shared_edge const &b) {
|
||||
return std::make_tuple(a.ay, a.ax, a.by, a.bx) < std::make_tuple(b.ay, b.ax, b.by, b.bx);
|
||||
});
|
||||
if (first != shared_edges_map + shared_edges_count &&
|
||||
first->ax == ax && first->ay == ay && first->bx == bx && first->by == by) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
perimeter += std::hypot((double) bx - ax, (double) by - ay);
|
||||
}
|
||||
|
||||
return perimeter;
|
||||
}
|
||||
|
||||
static void add_rings(mapbox::geometry::wagyu::wagyu<long long> &wagyu, drawvec const &geom, mapbox::geometry::wagyu::polygon_type type, long long scale) {
|
||||
for (size_t i = 0; i < geom.size(); i++) {
|
||||
if (geom[i].op == VT_MOVETO) {
|
||||
size_t j;
|
||||
for (j = i + 1; j < geom.size(); j++) {
|
||||
if (geom[j].op != VT_LINETO) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (j >= i + 4) {
|
||||
mapbox::geometry::linear_ring<long long> lr;
|
||||
for (size_t k = i; k < j; k++) {
|
||||
lr.push_back(mapbox::geometry::point<long long>(geom[k].x * scale, geom[k].y * scale));
|
||||
}
|
||||
wagyu.add_ring(lr, type);
|
||||
}
|
||||
|
||||
i = j - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Run wagyu on `subject` (positive fill) and optionally `clip` (non-zero fill),
|
||||
// at `scale` times tile resolution, and round the result back to tile resolution.
|
||||
// Returns false, rather than exiting, if wagyu fails, since the callers have
|
||||
// a valid polygon to fall back on.
|
||||
// The hot pixels from `hot` (sorted by y, then x) that are within a pixel of
|
||||
// the bounding box of `geom`, which are the only ones its edges could touch
|
||||
static std::vector<mapbox::geometry::point<long long>> hot_pixels_near(drawvec const &geom, hot_pixel_list const &hot) {
|
||||
std::vector<mapbox::geometry::point<long long>> out;
|
||||
if (geom.size() == 0 || hot.size() == 0) {
|
||||
return out;
|
||||
}
|
||||
|
||||
long long minx = LLONG_MAX, miny = LLONG_MAX, maxx = LLONG_MIN, maxy = LLONG_MIN;
|
||||
for (auto const &d : geom) {
|
||||
minx = std::min(minx, (long long) d.x);
|
||||
miny = std::min(miny, (long long) d.y);
|
||||
maxx = std::max(maxx, (long long) d.x);
|
||||
maxy = std::max(maxy, (long long) d.y);
|
||||
}
|
||||
|
||||
for (long long y = miny - 1; y <= maxy + 1; y++) {
|
||||
auto it = std::lower_bound(hot.begin(), hot.end(), std::make_pair(y, minx - 1));
|
||||
for (; it != hot.end() && it->first == y && it->second <= maxx + 1; ++it) {
|
||||
out.emplace_back(it->second, it->first);
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
static bool wagyu_union(drawvec const &subject, drawvec const *clip, long long scale, drawvec &out, bool require_exact, hot_pixel_list const *hot = NULL) {
|
||||
mapbox::geometry::multi_polygon<long long> result;
|
||||
|
||||
try {
|
||||
mapbox::geometry::wagyu::wagyu<long long> wagyu;
|
||||
add_rings(wagyu, subject, mapbox::geometry::wagyu::polygon_type_subject, scale);
|
||||
if (clip != NULL) {
|
||||
add_rings(wagyu, *clip, mapbox::geometry::wagyu::polygon_type_clip, scale);
|
||||
}
|
||||
if (hot != NULL && scale == 1) {
|
||||
drawvec both = subject;
|
||||
if (clip != NULL) {
|
||||
both.insert(both.end(), clip->begin(), clip->end());
|
||||
}
|
||||
std::vector<mapbox::geometry::point<long long>> near = hot_pixels_near(both, *hot);
|
||||
if (near.size() > 0) {
|
||||
wagyu.add_hot_pixels(near);
|
||||
}
|
||||
}
|
||||
wagyu.execute(mapbox::geometry::wagyu::clip_type_union, result, mapbox::geometry::wagyu::fill_type_positive, mapbox::geometry::wagyu::fill_type_non_zero);
|
||||
} catch (std::runtime_error &e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
out.clear();
|
||||
for (auto const &poly : result) {
|
||||
for (auto const &ring : poly) {
|
||||
for (size_t k = 0; k < ring.size(); k++) {
|
||||
if (require_exact && (ring[k].x % scale != 0 || ring[k].y % scale != 0)) {
|
||||
return false;
|
||||
}
|
||||
out.emplace_back(k == 0 ? VT_MOVETO : VT_LINETO, std::llround(ring[k].x / (double) scale), std::llround(ring[k].y / (double) scale));
|
||||
}
|
||||
if (ring.size() > 0 && (ring.front().x != ring.back().x || ring.front().y != ring.back().y)) {
|
||||
out.emplace_back(VT_LINETO, std::llround(ring.front().x / (double) scale), std::llround(ring.front().y / (double) scale));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
drawvec union_polygon_strips(drawvec const &geom, drawvec const &strips, hot_pixel_list const *hot) {
|
||||
if (strips.size() == 0) {
|
||||
return geom;
|
||||
}
|
||||
|
||||
// The strips from the two sides of a spindle are nearly coincident,
|
||||
// and cross each other at very shallow angles. If the union were done
|
||||
// at tile resolution, rounding the intersections to integer coordinates
|
||||
// would make the strips collapse in places, which is the very problem
|
||||
// they are trying to solve. So do the union at a higher resolution,
|
||||
// and then clean the result again at tile resolution.
|
||||
//
|
||||
// The cleaned polygon uses the positive fill rule as usual, but the strips
|
||||
// use non-zero so that overlapping strips can never cancel each other out.
|
||||
//
|
||||
// Wagyu can fail on some of these unions ("Trying to find intersection
|
||||
// of lines that do not intersect"), depending on platform floating point
|
||||
// details like fused multiply-add. The strips are only an improvement on
|
||||
// an already-valid polygon, so if it fails, try again at tile resolution,
|
||||
// and if that fails too, give up on the strips for this feature.
|
||||
|
||||
drawvec unioned;
|
||||
if (!wagyu_union(geom, &strips, 16, unioned, false)) {
|
||||
if (!wagyu_union(geom, &strips, 1, unioned, false)) {
|
||||
return geom;
|
||||
}
|
||||
return unioned;
|
||||
}
|
||||
|
||||
// Clean the rounded union at tile resolution, the same way
|
||||
// clean_or_clip_poly() would, but without exiting on failure.
|
||||
// (Or, if there is a set of hot pixels to snap to consistently
|
||||
// with other features, at tile resolution with those.)
|
||||
drawvec out;
|
||||
if (hot != NULL) {
|
||||
if (wagyu_union(unioned, NULL, 1, out, false, hot)) {
|
||||
return out;
|
||||
}
|
||||
} else if (wagyu_union(unioned, NULL, 16, out, true)) {
|
||||
return out;
|
||||
}
|
||||
if (wagyu_union(unioned, NULL, 1, out, false)) {
|
||||
return out;
|
||||
}
|
||||
if (wagyu_union(geom, &strips, 1, out, false)) {
|
||||
return out;
|
||||
}
|
||||
return geom;
|
||||
}
|
||||
|
||||
hot_pixel_list layer_hot_pixels(std::vector<drawvec const *> const &geoms) {
|
||||
hot_pixel_list out;
|
||||
|
||||
try {
|
||||
mapbox::geometry::wagyu::wagyu<long long> wagyu;
|
||||
for (auto const *g : geoms) {
|
||||
add_rings(wagyu, *g, mapbox::geometry::wagyu::polygon_type_subject, 1);
|
||||
}
|
||||
for (auto const &p : wagyu.hot_pixels()) {
|
||||
out.emplace_back(p.y, p.x);
|
||||
}
|
||||
} catch (std::runtime_error &e) {
|
||||
// Without a consistent set of hot pixels, each feature is
|
||||
// just snapped to its own, as it would otherwise be.
|
||||
out.clear();
|
||||
}
|
||||
|
||||
std::sort(out.begin(), out.end());
|
||||
out.erase(std::unique(out.begin(), out.end()), out.end());
|
||||
return out;
|
||||
}
|
||||
|
||||
drawvec clean_polygon_with_hot_pixels(drawvec const &geom, drawvec const &strips, hot_pixel_list const &hot, bool *ok) {
|
||||
drawvec out;
|
||||
*ok = wagyu_union(geom, strips.size() > 0 ? &strips : NULL, 1, out, false, &hot);
|
||||
return out;
|
||||
}
|
||||
|
||||
namespace {
|
||||
struct directed_edge {
|
||||
long long ax, ay, bx, by;
|
||||
|
||||
bool operator==(directed_edge const &o) const {
|
||||
return ax == o.ax && ay == o.ay && bx == o.bx && by == o.by;
|
||||
}
|
||||
};
|
||||
|
||||
struct directed_edge_hash {
|
||||
size_t operator()(directed_edge const &e) const {
|
||||
size_t h = std::hash<long long>()(e.ax);
|
||||
h = h * 1000003 ^ std::hash<long long>()(e.ay);
|
||||
h = h * 1000003 ^ std::hash<long long>()(e.bx);
|
||||
h = h * 1000003 ^ std::hash<long long>()(e.by);
|
||||
return h;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename F>
|
||||
void for_each_edge(drawvec const &geom, F f) {
|
||||
for (size_t i = 0; i < geom.size(); i++) {
|
||||
if (geom[i].op == VT_MOVETO) {
|
||||
size_t j;
|
||||
for (j = i + 1; j < geom.size(); j++) {
|
||||
if (geom[j].op != VT_LINETO) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (size_t k = i; k + 1 < j; k++) {
|
||||
if (geom[k].x != geom[k + 1].x || geom[k].y != geom[k + 1].y) {
|
||||
f(directed_edge{geom[k].x, geom[k].y, geom[k + 1].x, geom[k + 1].y});
|
||||
}
|
||||
}
|
||||
i = j - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// Whether the point (px / 2, py / 2) is strictly inside the polygon `geom` by
|
||||
// the nonzero winding rule, with exact integer arithmetic. (The point is given
|
||||
// in doubled coordinates so that the midpoints of edges can be tested exactly.)
|
||||
// A point exactly on the polygon's boundary does not count as inside.
|
||||
static bool strictly_inside(drawvec const &geom, long long px, long long py) {
|
||||
int wn = 0;
|
||||
for (size_t i = 0; i < geom.size(); i++) {
|
||||
if (geom[i].op == VT_MOVETO) {
|
||||
size_t j;
|
||||
for (j = i + 1; j < geom.size(); j++) {
|
||||
if (geom[j].op != VT_LINETO) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (size_t k = i; k + 1 < j; k++) {
|
||||
long long x1 = 2 * (long long) geom[k].x, y1 = 2 * (long long) geom[k].y;
|
||||
long long x2 = 2 * (long long) geom[k + 1].x, y2 = 2 * (long long) geom[k + 1].y;
|
||||
long long cross = (x2 - x1) * (py - y1) - (px - x1) * (y2 - y1);
|
||||
if (cross == 0 && std::min(x1, x2) <= px && px <= std::max(x1, x2) && std::min(y1, y2) <= py && py <= std::max(y1, y2)) {
|
||||
return false; // on the boundary
|
||||
}
|
||||
if (y1 <= py) {
|
||||
if (y2 > py && cross > 0) {
|
||||
wn++;
|
||||
}
|
||||
} else {
|
||||
if (y2 <= py && cross < 0) {
|
||||
wn--;
|
||||
}
|
||||
}
|
||||
}
|
||||
i = j - 1;
|
||||
}
|
||||
}
|
||||
return wn != 0;
|
||||
}
|
||||
|
||||
// Add a vertex to each polygon's edges wherever a vertex of any of the polygons
|
||||
// lies exactly on the edge, between its ends. This doesn't change any polygon's
|
||||
// shape, but it means that wherever two polygons' borders run along each other,
|
||||
// they have the same edges, which overlap detection depends on.
|
||||
static void split_at_vertices(std::vector<drawvec> &polys) {
|
||||
const long long cell = 16;
|
||||
auto key = [](long long cx, long long cy) {
|
||||
return (cx << 32) ^ (cy & 0xFFFFFFFF);
|
||||
};
|
||||
auto cell_of = [&](long long v) {
|
||||
return (long long) std::floor(v / (double) cell);
|
||||
};
|
||||
|
||||
std::unordered_map<long long, std::vector<std::pair<long long, long long>>> grid;
|
||||
for (auto const &g : polys) {
|
||||
for (auto const &d : g) {
|
||||
grid[key(cell_of(d.x), cell_of(d.y))].emplace_back(d.x, d.y);
|
||||
}
|
||||
}
|
||||
for (auto &c : grid) {
|
||||
std::sort(c.second.begin(), c.second.end());
|
||||
c.second.erase(std::unique(c.second.begin(), c.second.end()), c.second.end());
|
||||
}
|
||||
|
||||
for (auto &g : polys) {
|
||||
drawvec out;
|
||||
for (size_t k = 0; k < g.size(); k++) {
|
||||
out.push_back(g[k]);
|
||||
if (k + 1 >= g.size() || g[k + 1].op != VT_LINETO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
long long ax = g[k].x, ay = g[k].y, bx = g[k + 1].x, by = g[k + 1].y;
|
||||
long long dx = bx - ax, dy = by - ay;
|
||||
long long len_sq = dx * dx + dy * dy;
|
||||
if (len_sq == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::vector<std::pair<long long, std::pair<long long, long long>>> on;
|
||||
for (long long cx = cell_of(std::min(ax, bx)); cx <= cell_of(std::max(ax, bx)); cx++) {
|
||||
for (long long cy = cell_of(std::min(ay, by)); cy <= cell_of(std::max(ay, by)); cy++) {
|
||||
auto found = grid.find(key(cx, cy));
|
||||
if (found == grid.end()) {
|
||||
continue;
|
||||
}
|
||||
for (auto const &v : found->second) {
|
||||
long long cross = dx * (v.second - ay) - dy * (v.first - ax);
|
||||
if (cross != 0) {
|
||||
continue;
|
||||
}
|
||||
long long along = dx * (v.first - ax) + dy * (v.second - ay);
|
||||
if (along > 0 && along < len_sq) {
|
||||
on.emplace_back(along, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(on.begin(), on.end());
|
||||
for (auto const &v : on) {
|
||||
out.emplace_back(VT_LINETO, v.second.first, v.second.second);
|
||||
}
|
||||
}
|
||||
g = std::move(out);
|
||||
}
|
||||
}
|
||||
|
||||
size_t remove_overlaps(std::vector<drawvec *> const &geoms_in, hot_pixel_list const *hot) {
|
||||
// Work on copies whose edges are split wherever another polygon's vertex is on
|
||||
// them, and only copy back the polygons whose overlapping area is removed.
|
||||
std::vector<drawvec> split;
|
||||
for (auto const *g : geoms_in) {
|
||||
split.push_back(*g);
|
||||
}
|
||||
split_at_vertices(split);
|
||||
std::vector<drawvec *> geoms;
|
||||
for (auto &g : split) {
|
||||
geoms.push_back(&g);
|
||||
}
|
||||
|
||||
// Which polygon (the earliest) each directed edge is part of. Cleaned rings
|
||||
// all have their polygon's interior on the same side, so two polygons that
|
||||
// tile exactly traverse the border they share in opposite directions, and
|
||||
// two polygons that share an edge in the same direction both cover the area
|
||||
// beside it. With consistent snapping, edges of different polygons don't
|
||||
// cross, so this is where overlaps between them show up.
|
||||
std::unordered_map<directed_edge, size_t, directed_edge_hash> owner;
|
||||
std::vector<std::vector<size_t>> overlaps(geoms.size());
|
||||
|
||||
for (size_t i = 0; i < geoms.size(); i++) {
|
||||
for_each_edge(*geoms[i], [&](directed_edge const &e) {
|
||||
auto found = owner.find(e);
|
||||
if (found == owner.end()) {
|
||||
owner.emplace(e, i);
|
||||
} else if (found->second != i) {
|
||||
std::vector<size_t> &o = overlaps[i];
|
||||
if (std::find(o.begin(), o.end(), found->second) == o.end()) {
|
||||
o.push_back(found->second);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Where the polygons' boundaries don't share any edges in the same direction
|
||||
// where they overlap, the overlap is bounded by an edge of one of them that
|
||||
// isn't on the other's boundary, so the other covers both sides of it, and the
|
||||
// edge's midpoint (or one of its ends) is strictly inside the other.
|
||||
{
|
||||
const long long cell = 16;
|
||||
std::vector<long long> minx(geoms.size()), miny(geoms.size()), maxx(geoms.size()), maxy(geoms.size());
|
||||
std::unordered_map<long long, std::vector<size_t>> grid;
|
||||
auto key = [](long long cx, long long cy) {
|
||||
return (cx << 32) ^ (cy & 0xFFFFFFFF);
|
||||
};
|
||||
for (size_t i = 0; i < geoms.size(); i++) {
|
||||
minx[i] = miny[i] = LLONG_MAX;
|
||||
maxx[i] = maxy[i] = LLONG_MIN;
|
||||
for (auto const &d : *geoms[i]) {
|
||||
minx[i] = std::min(minx[i], (long long) d.x);
|
||||
miny[i] = std::min(miny[i], (long long) d.y);
|
||||
maxx[i] = std::max(maxx[i], (long long) d.x);
|
||||
maxy[i] = std::max(maxy[i], (long long) d.y);
|
||||
}
|
||||
if (geoms[i]->size() == 0) {
|
||||
continue;
|
||||
}
|
||||
for (long long cx = std::floor(minx[i] / (double) cell); cx <= std::floor(maxx[i] / (double) cell); cx++) {
|
||||
for (long long cy = std::floor(miny[i] / (double) cell); cy <= std::floor(maxy[i] / (double) cell); cy++) {
|
||||
grid[key(cx, cy)].push_back(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < geoms.size(); i++) {
|
||||
// The vertices and the midpoints of the edges, in doubled coordinates
|
||||
std::vector<std::pair<long long, long long>> points;
|
||||
drawvec const &g = *geoms[i];
|
||||
for (size_t k = 0; k < g.size(); k++) {
|
||||
points.emplace_back(2 * (long long) g[k].x, 2 * (long long) g[k].y);
|
||||
if (k + 1 < g.size() && g[k + 1].op == VT_LINETO) {
|
||||
points.emplace_back((long long) g[k].x + g[k + 1].x, (long long) g[k].y + g[k + 1].y);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto const &pt : points) {
|
||||
double x = pt.first / 2.0, y = pt.second / 2.0;
|
||||
auto found = grid.find(key(std::floor(x / cell), std::floor(y / cell)));
|
||||
if (found == grid.end()) {
|
||||
continue;
|
||||
}
|
||||
for (size_t j : found->second) {
|
||||
if (j == i || x < minx[j] || x > maxx[j] || y < miny[j] || y > maxy[j]) {
|
||||
continue;
|
||||
}
|
||||
size_t later = std::max(i, j), earlier = std::min(i, j);
|
||||
std::vector<size_t> &o = overlaps[later];
|
||||
if (std::find(o.begin(), o.end(), earlier) != o.end()) {
|
||||
continue;
|
||||
}
|
||||
if (strictly_inside(*geoms[j], pt.first, pt.second)) {
|
||||
o.push_back(earlier);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
size_t changed = 0;
|
||||
for (size_t i = 0; i < geoms.size(); i++) {
|
||||
if (overlaps[i].size() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// The polygons have already been snapped, and their edges don't cross,
|
||||
// so the difference doesn't need any new vertices. Snapping them again at
|
||||
// tile resolution could still bend their edges (for example, a 45-degree
|
||||
// edge through the corner of the hot pixel of the vertex beside it) and
|
||||
// collapse parts of them, so do it at a higher resolution, where the
|
||||
// vertices are far from each other's hot pixels, and use the result if
|
||||
// it does only have the original vertices. Otherwise, snap at tile
|
||||
// resolution to the layer's hot pixels, consistently with the rest.
|
||||
drawvec out;
|
||||
bool done = false;
|
||||
for (long long scale : {16LL, 1LL}) {
|
||||
mapbox::geometry::multi_polygon<long long> result;
|
||||
try {
|
||||
mapbox::geometry::wagyu::wagyu<long long> wagyu;
|
||||
add_rings(wagyu, *geoms[i], mapbox::geometry::wagyu::polygon_type_subject, scale);
|
||||
drawvec all = *geoms[i];
|
||||
for (size_t earlier : overlaps[i]) {
|
||||
add_rings(wagyu, *geoms[earlier], mapbox::geometry::wagyu::polygon_type_clip, scale);
|
||||
all.insert(all.end(), geoms[earlier]->begin(), geoms[earlier]->end());
|
||||
}
|
||||
if (scale == 1 && hot != NULL) {
|
||||
std::vector<mapbox::geometry::point<long long>> near = hot_pixels_near(all, *hot);
|
||||
if (near.size() > 0) {
|
||||
wagyu.add_hot_pixels(near);
|
||||
}
|
||||
}
|
||||
wagyu.execute(mapbox::geometry::wagyu::clip_type_difference, result, mapbox::geometry::wagyu::fill_type_positive, mapbox::geometry::wagyu::fill_type_positive);
|
||||
} catch (std::runtime_error &e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
out.clear();
|
||||
bool exact = true;
|
||||
for (auto const &poly : result) {
|
||||
for (auto const &ring : poly) {
|
||||
for (size_t k = 0; k < ring.size(); k++) {
|
||||
if (ring[k].x % scale != 0 || ring[k].y % scale != 0) {
|
||||
exact = false;
|
||||
}
|
||||
out.emplace_back(k == 0 ? VT_MOVETO : VT_LINETO, ring[k].x / scale, ring[k].y / scale);
|
||||
}
|
||||
if (ring.size() > 0 && (ring.front().x != ring.back().x || ring.front().y != ring.back().y)) {
|
||||
out.emplace_back(VT_LINETO, ring.front().x / scale, ring.front().y / scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (exact) {
|
||||
done = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (done) {
|
||||
*geoms[i] = std::move(out);
|
||||
*geoms_in[i] = *geoms[i];
|
||||
changed++;
|
||||
}
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#ifndef POLYGON_HPP
|
||||
#define POLYGON_HPP
|
||||
|
||||
#include "geometry.hpp"
|
||||
|
||||
// One direction of a polygon edge that is shared between two or more
|
||||
// different polygon features, as identified by --no-simplification-of-shared-nodes,
|
||||
// in world coordinates. The list of these is sorted by `a` (y, then x)
|
||||
// and then by `b` (y, then x), and is used to avoid adding spindle strips
|
||||
// along edges that border other features, where they would overlap them.
|
||||
struct shared_edge {
|
||||
long long ax, ay;
|
||||
long long bx, by;
|
||||
};
|
||||
|
||||
extern shared_edge *shared_edges_map;
|
||||
extern size_t shared_edges_count;
|
||||
|
||||
// Find the parts of a polygon (in world coordinates) that are narrower than
|
||||
// a pixel at zoom level z with the specified tile detail, and return strips
|
||||
// (in tile coordinates) covering the pixels along them.
|
||||
//
|
||||
// `simplification` is the simplification tolerance, in tile units, that the
|
||||
// geometry was simplified with, which is how far a simplified shared border
|
||||
// may have strayed from the original shared edges. (ox, oy) is the world
|
||||
// coordinate of the tile origin that the geometry is relative to.
|
||||
drawvec thin_polygon_strips(drawvec const &geom, int z, int detail, double simplification = 1, long long ox = 0, long long oy = 0);
|
||||
|
||||
// The length of the ring from geom[i] to geom[j] (world coordinates relative to
|
||||
// a tile origin at (ox, oy)) that is not made of edges shared with other features
|
||||
double unshared_perimeter(drawvec const &geom, size_t i, size_t j, long long ox, long long oy);
|
||||
|
||||
// Strips (in tile coordinates) one pixel wide along every edge of a polygon
|
||||
// (in world coordinates relative to a tile origin at (ox, oy)), which together
|
||||
// trace its outline. This is used to stand in for a polygon that has collapsed
|
||||
// away to nothing entirely. Edges shared with other features (with
|
||||
// --no-simplification-of-shared-nodes) are left out, since those features
|
||||
// already cover the space, and *all_shared is set if every edge was shared.
|
||||
drawvec outline_strips(drawvec const &geom, int z, int detail, double simplification, long long ox, long long oy, bool *all_shared);
|
||||
|
||||
// Hot pixels for snap rounding, as (y, x) in tile coordinates, sorted
|
||||
typedef std::vector<std::pair<long long, long long>> hot_pixel_list;
|
||||
|
||||
// Union the strips from thin_polygon_strips() with a cleaned polygon
|
||||
// (both in tile coordinates). If `hot` is provided, the result is snapped
|
||||
// to those hot pixels as in clean_polygon_with_hot_pixels().
|
||||
drawvec union_polygon_strips(drawvec const &geom, drawvec const &strips, hot_pixel_list const *hot = NULL);
|
||||
|
||||
// The hot pixels (vertices and rounded intersections) of all the polygons in
|
||||
// `geoms` (in tile coordinates), so that each of them can be cleaned with
|
||||
// clean_polygon_with_hot_pixels() and edges that they share are snapped
|
||||
// identically in each, instead of differently depending on which other
|
||||
// vertices each polygon happens to have.
|
||||
hot_pixel_list layer_hot_pixels(std::vector<drawvec const *> const &geoms);
|
||||
|
||||
// Clean a polygon (in tile coordinates), snapping its edges to the hot pixels
|
||||
// from layer_hot_pixels() as well as its own, and union it with its spindle
|
||||
// strips (from thin_polygon_strips(), which may be empty) in the same pass,
|
||||
// so that it is only snapped once. The strips should have been included in
|
||||
// layer_hot_pixels(). Sets *ok to false if that fails.
|
||||
drawvec clean_polygon_with_hot_pixels(drawvec const &geom, drawvec const &strips, hot_pixel_list const &hot, bool *ok);
|
||||
|
||||
// Polygons (in tile coordinates, in order of priority) that have been cleaned
|
||||
// with consistent snapping should tile without crossing, but where rounding
|
||||
// turned a narrow polygon between two others inside out, the area it covered
|
||||
// may be covered by both of its neighbors. Remove each such overlapping area
|
||||
// from all but the first of the polygons that cover it. Returns how many
|
||||
// polygons were changed.
|
||||
// `hot` is the hot pixels of the layer, from layer_hot_pixels(), if any.
|
||||
size_t remove_overlaps(std::vector<drawvec *> const &geoms_in, hot_pixel_list const *hot);
|
||||
|
||||
#endif
|
||||
+53
-56
@@ -43,18 +43,18 @@ int mb_geometry[GEOM_TYPES] = {
|
||||
};
|
||||
|
||||
void json_context(json_object *j) {
|
||||
char *s = json_stringify(j);
|
||||
std::string s = json_stringify(j);
|
||||
|
||||
if (strlen(s) >= 500) {
|
||||
snprintf(s + 497, strlen(s) + 1 - 497, "...");
|
||||
if (s.size() >= 500) {
|
||||
s = truncate_string(s, 497);
|
||||
s.append("...");
|
||||
}
|
||||
|
||||
fprintf(stderr, "in JSON object %s\n", s);
|
||||
free(s); // stringify
|
||||
fprintf(stderr, "in JSON object %s\n", s.c_str());
|
||||
}
|
||||
|
||||
void parse_coordinates(int t, json_object *j, drawvec &out, int op, const char *fname, int line, json_object *feature) {
|
||||
if (j == NULL || j->type != JSON_ARRAY) {
|
||||
if (j == nullptr || j->type != JSON_ARRAY) {
|
||||
fprintf(stderr, "%s:%d: expected array for geometry type %d: ", fname, line, t);
|
||||
json_context(feature);
|
||||
return;
|
||||
@@ -63,7 +63,7 @@ void parse_coordinates(int t, json_object *j, drawvec &out, int op, const char *
|
||||
int within = geometry_within[t];
|
||||
if (within >= 0) {
|
||||
size_t i;
|
||||
for (i = 0; i < j->value.array.length; i++) {
|
||||
for (i = 0; i < j->array().size(); i++) {
|
||||
if (within == GEOM_POINT) {
|
||||
if (i == 0 || mb_geometry[t] == VT_POINT) {
|
||||
op = VT_MOVETO;
|
||||
@@ -72,16 +72,16 @@ void parse_coordinates(int t, json_object *j, drawvec &out, int op, const char *
|
||||
}
|
||||
}
|
||||
|
||||
parse_coordinates(within, j->value.array.array[i], out, op, fname, line, feature);
|
||||
parse_coordinates(within, j->array()[i].get(), out, op, fname, line, feature);
|
||||
}
|
||||
} else {
|
||||
if (j->value.array.length >= 2 && j->value.array.array[0]->type == JSON_NUMBER && j->value.array.array[1]->type == JSON_NUMBER) {
|
||||
if (j->array().size() >= 2 && j->array()[0]->type == JSON_NUMBER && j->array()[1]->type == JSON_NUMBER) {
|
||||
long long x, y;
|
||||
double lon = j->value.array.array[0]->value.number.number;
|
||||
double lat = j->value.array.array[1]->value.number.number;
|
||||
double lon = j->array()[0]->number();
|
||||
double lat = j->array()[1]->number();
|
||||
projection->project(lon, lat, 32, &x, &y);
|
||||
|
||||
if (j->value.array.length > 2) {
|
||||
if (j->array().size() > 2) {
|
||||
static int warned = 0;
|
||||
|
||||
if (!warned) {
|
||||
@@ -124,12 +124,12 @@ void parse_coordinates(int t, json_object *j, drawvec &out, int op, const char *
|
||||
serial_val stringify_value(json_object *value, const char *reading, int line, json_object *feature) {
|
||||
serial_val sv;
|
||||
|
||||
if (value != NULL) {
|
||||
if (value != nullptr) {
|
||||
int vt = value->type;
|
||||
|
||||
if (vt == JSON_STRING) {
|
||||
sv.type = mvt_string;
|
||||
sv.s = value->value.string.string;
|
||||
sv.s = value->string();
|
||||
|
||||
std::string err = check_utf8(sv.s);
|
||||
if (err.size() > 0) {
|
||||
@@ -140,12 +140,12 @@ serial_val stringify_value(json_object *value, const char *reading, int line, js
|
||||
} else if (vt == JSON_NUMBER) {
|
||||
sv.type = mvt_double;
|
||||
|
||||
if (value->value.number.large_unsigned != 0) {
|
||||
sv.s = std::to_string(value->value.number.large_unsigned);
|
||||
} else if (value->value.number.large_signed != 0) {
|
||||
sv.s = std::to_string(value->value.number.large_signed);
|
||||
if (value->large_unsigned() != 0) {
|
||||
sv.s = std::to_string(value->large_unsigned());
|
||||
} else if (value->large_signed() != 0) {
|
||||
sv.s = std::to_string(value->large_signed());
|
||||
} else {
|
||||
sv.s = milo::dtoa_milo(value->value.number.number);
|
||||
sv.s = milo::dtoa_milo(value->number());
|
||||
}
|
||||
} else if (vt == JSON_TRUE) {
|
||||
sv.type = mvt_bool;
|
||||
@@ -158,9 +158,7 @@ serial_val stringify_value(json_object *value, const char *reading, int line, js
|
||||
sv.s = "null";
|
||||
} else {
|
||||
sv.type = mvt_string;
|
||||
const char *v = json_stringify(value);
|
||||
sv.s = std::string(v);
|
||||
free((void *) v); // stringify
|
||||
sv.s = json_stringify(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,10 +176,10 @@ static std::vector<mvt_geometry> to_feature(drawvec &geom) {
|
||||
return out;
|
||||
}
|
||||
|
||||
std::pair<int, drawvec> parse_geometry(json_object *geometry, json_pull *jp, json_object *j,
|
||||
std::pair<int, drawvec> parse_geometry(json_object *geometry, json_pull_ptr &jp, json_object *j,
|
||||
int z, int x, int y, long long extent, bool fix_longitudes, bool mvt_style) {
|
||||
json_object *geometry_type = json_hash_get(geometry, "type");
|
||||
if (geometry_type == NULL) {
|
||||
if (geometry_type == nullptr) {
|
||||
fprintf(stderr, "Filter output:%d: null geometry (additional not reported): ", jp->line);
|
||||
json_context(j);
|
||||
exit(EXIT_JSON);
|
||||
@@ -194,7 +192,7 @@ std::pair<int, drawvec> parse_geometry(json_object *geometry, json_pull *jp, jso
|
||||
}
|
||||
|
||||
json_object *coordinates = json_hash_get(geometry, "coordinates");
|
||||
if (coordinates == NULL || coordinates->type != JSON_ARRAY) {
|
||||
if (coordinates == nullptr || coordinates->type != JSON_ARRAY) {
|
||||
fprintf(stderr, "Filter output:%d: geometry without coordinates array: ", jp->line);
|
||||
json_context(j);
|
||||
exit(EXIT_JSON);
|
||||
@@ -202,12 +200,12 @@ std::pair<int, drawvec> parse_geometry(json_object *geometry, json_pull *jp, jso
|
||||
|
||||
int t;
|
||||
for (t = 0; t < GEOM_TYPES; t++) {
|
||||
if (strcmp(geometry_type->value.string.string, geometry_names[t]) == 0) {
|
||||
if (geometry_type->string() == geometry_names[t]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (t >= GEOM_TYPES) {
|
||||
fprintf(stderr, "Filter output:%d: Can't handle geometry type %s: ", jp->line, geometry_type->value.string.string);
|
||||
fprintf(stderr, "Filter output:%d: Can't handle geometry type %s: ", jp->line, geometry_type->string().c_str());
|
||||
json_context(j);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
@@ -305,47 +303,47 @@ std::vector<mvt_layer> parse_layers(FILE *fp, int z, unsigned x, unsigned y, int
|
||||
std::map<std::string, mvt_layer> ret;
|
||||
std::shared_ptr<std::string> tile_stringpool = std::make_shared<std::string>();
|
||||
|
||||
json_pull *jp = json_begin_file(fp);
|
||||
json_pull_ptr jp = json_begin_file(fp);
|
||||
while (1) {
|
||||
json_object *j = json_read(jp);
|
||||
if (j == NULL) {
|
||||
if (jp->error != NULL) {
|
||||
if (j == nullptr) {
|
||||
if (jp->error != nullptr) {
|
||||
fprintf(stderr, "Filter output:%d: %s: ", jp->line, jp->error);
|
||||
if (jp->root != NULL) {
|
||||
json_context(jp->root);
|
||||
if (jp->root != nullptr) {
|
||||
json_context(jp->root.get());
|
||||
} else {
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
|
||||
json_free(jp->root);
|
||||
jp->root.reset();
|
||||
break;
|
||||
}
|
||||
|
||||
// Only complete Features are freed; see plugin.cpp::parse_feature.
|
||||
json_object *type = json_hash_get(j, "type");
|
||||
if (type == NULL || type->type != JSON_STRING) {
|
||||
if (type == nullptr || type->type != JSON_STRING) {
|
||||
continue;
|
||||
}
|
||||
if (strcmp(type->value.string.string, "Feature") != 0) {
|
||||
if (type->string() != "Feature") {
|
||||
continue;
|
||||
}
|
||||
|
||||
json_object *properties = json_hash_get(j, "properties");
|
||||
if (properties == NULL || (properties->type != JSON_HASH && properties->type != JSON_NULL)) {
|
||||
if (properties == nullptr || (properties->type != JSON_HASH && properties->type != JSON_NULL)) {
|
||||
fprintf(stderr, "Filter output:%d: feature without properties hash: ", jp->line);
|
||||
json_context(j);
|
||||
json_free(j);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
|
||||
std::string layername = "unknown";
|
||||
json_object *tippecanoe = json_hash_get(j, "tippecanoe");
|
||||
json_object *layer = NULL;
|
||||
if (tippecanoe != NULL) {
|
||||
json_object *layer = nullptr;
|
||||
if (tippecanoe != nullptr) {
|
||||
layer = json_hash_get(tippecanoe, "layer");
|
||||
if (layer != NULL && layer->type == JSON_STRING) {
|
||||
layername = std::string(layer->value.string.string);
|
||||
if (layer != nullptr && layer->type == JSON_STRING) {
|
||||
layername = layer->string();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,10 +358,9 @@ std::vector<mvt_layer> parse_layers(FILE *fp, int z, unsigned x, unsigned y, int
|
||||
auto l = ret.find(layername);
|
||||
|
||||
json_object *geometry = json_hash_get(j, "geometry");
|
||||
if (geometry == NULL) {
|
||||
if (geometry == nullptr) {
|
||||
fprintf(stderr, "Filter output:%d: filtered feature with no geometry: ", jp->line);
|
||||
json_context(j);
|
||||
json_free(j);
|
||||
exit(EXIT_JSON);
|
||||
}
|
||||
|
||||
@@ -378,23 +375,25 @@ std::vector<mvt_layer> parse_layers(FILE *fp, int z, unsigned x, unsigned y, int
|
||||
feature.geometry = to_feature(dv);
|
||||
|
||||
json_object *id = json_hash_get(j, "id");
|
||||
if (id != NULL && id->type == JSON_NUMBER) {
|
||||
feature.id = id->value.number.number;
|
||||
if (id->value.number.large_unsigned > 0) {
|
||||
feature.id = id->value.number.large_unsigned;
|
||||
if (id != nullptr && id->type == JSON_NUMBER) {
|
||||
feature.id = id->number();
|
||||
if (id->large_unsigned() > 0) {
|
||||
feature.id = id->large_unsigned();
|
||||
}
|
||||
feature.has_id = true;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < properties->value.object.length; i++) {
|
||||
serial_val sv = stringify_value(properties->value.object.values[i], "Filter output", jp->line, j);
|
||||
if (properties->type == JSON_HASH) {
|
||||
for (const auto &e : properties->entries()) {
|
||||
serial_val sv = stringify_value(e.value.get(), "Filter output", jp->line, j);
|
||||
|
||||
// Nulls can be excluded here because this is the postfilter
|
||||
// and it is nearly time to create the vector representation
|
||||
// Nulls can be excluded here because this is the postfilter
|
||||
// and it is nearly time to create the vector representation
|
||||
|
||||
if (sv.type != mvt_null) {
|
||||
mvt_value v = stringified_to_mvt_value(sv.type, sv.s.c_str(), tile_stringpool);
|
||||
l->second.tag(feature, std::string(properties->value.object.keys[i]->value.string.string), v);
|
||||
if (sv.type != mvt_null) {
|
||||
mvt_value v = stringified_to_mvt_value(sv.type, sv.s.c_str(), tile_stringpool);
|
||||
l->second.tag(feature, e.key->string(), v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,8 +403,6 @@ std::vector<mvt_layer> parse_layers(FILE *fp, int z, unsigned x, unsigned y, int
|
||||
json_free(j);
|
||||
}
|
||||
|
||||
json_end(jp);
|
||||
|
||||
std::vector<mvt_layer> final;
|
||||
for (auto a : ret) {
|
||||
final.push_back(a.second);
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ extern int mb_geometry[GEOM_TYPES];
|
||||
|
||||
void json_context(json_object *j);
|
||||
void parse_coordinates(int t, json_object *j, drawvec &out, int op, const char *fname, int line, json_object *feature);
|
||||
std::pair<int, drawvec> parse_geometry(json_object *geometry, json_pull *jp, json_object *j,
|
||||
std::pair<int, drawvec> parse_geometry(json_object *geometry, json_pull_ptr &jp, json_object *j,
|
||||
int z, int x, int y, long long extent, bool fix_longitudes, bool mvt_style);
|
||||
std::vector<mvt_layer> parse_layers(FILE *fp, int z, unsigned x, unsigned y, int extent, bool fix_longitudes);
|
||||
|
||||
|
||||
+12
-4
@@ -525,7 +525,8 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
|
||||
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]);
|
||||
scaled_geometry[(k - i + 2) % (j - i - 1) + i],
|
||||
*(sst->layer_seq), sf.layer, sf.segment);
|
||||
|
||||
fwrite_check((char *) &v, sizeof(struct vertex), 1, r->vertexfile, &r->vertexpos, sst->fname);
|
||||
}
|
||||
@@ -665,10 +666,18 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
|
||||
// VT_POINT extent will be calculated in write_tile from the distance between adjacent features.
|
||||
}
|
||||
|
||||
if (extent <= LLONG_MAX) {
|
||||
// Clamp before converting, since converting a double that is out of range
|
||||
// for a long long is undefined. The bounds are asymmetric: LLONG_MAX is not
|
||||
// representable as a double and rounds up to 2^63, so the upper bound has to
|
||||
// be exclusive, while LLONG_MIN is exactly -2^63 and so can be included.
|
||||
// Areas are signed, so holes that outweigh their rings can make this
|
||||
// negative.
|
||||
if (extent >= (double) LLONG_MIN && extent < (double) LLONG_MAX) {
|
||||
sf.extent = (long long) extent;
|
||||
} else if (extent < 0) {
|
||||
sf.extent = LLONG_MIN;
|
||||
} else {
|
||||
sf.extent = LLONG_MAX;
|
||||
sf.extent = LLONG_MAX; // also the NaN case
|
||||
}
|
||||
|
||||
if (sst->want_dist && sf.t == VT_POLYGON) {
|
||||
@@ -743,7 +752,6 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
|
||||
prevent[P_DYNAMIC_DROP] ||
|
||||
additional[A_INCREASE_GAMMA_AS_NEEDED] ||
|
||||
additional[A_GENERATE_POLYGON_LABEL_POINTS] ||
|
||||
additional[A_DISTINGUISH_DUPLICATES] ||
|
||||
sst->uses_gamma ||
|
||||
retain_points_multiplier > 1 ||
|
||||
preserve_multiplier_density_threshold > 0 ||
|
||||
|
||||
+34
-1
@@ -284,7 +284,20 @@ struct vertex {
|
||||
draw mid;
|
||||
draw p2;
|
||||
|
||||
vertex(draw one, draw joint, draw two) {
|
||||
// Which polygon feature this vertex is part of, so that edges shared
|
||||
// between different polygon features can be identified. Features do not
|
||||
// necessarily have IDs, and sequence numbers are only unique within a layer
|
||||
// and a reading segment, so a feature is identified by all three.
|
||||
// `seq` is -1 if the vertex is part of a line rather than a polygon.
|
||||
long long seq = -1;
|
||||
int layer = -1;
|
||||
int segment = -1;
|
||||
|
||||
vertex(draw one, draw joint, draw two, long long seq_ = -1, int layer_ = -1, int segment_ = -1) {
|
||||
seq = seq_;
|
||||
layer = layer_;
|
||||
segment = segment_;
|
||||
|
||||
if (one < two) {
|
||||
p1 = one;
|
||||
p2 = two;
|
||||
@@ -296,6 +309,24 @@ struct vertex {
|
||||
mid = joint;
|
||||
}
|
||||
|
||||
bool is_polygon() const {
|
||||
return seq >= 0;
|
||||
}
|
||||
|
||||
bool same_feature(const vertex &v) const {
|
||||
return seq == v.seq && layer == v.layer && segment == v.segment;
|
||||
}
|
||||
|
||||
bool feature_less(const vertex &v) const {
|
||||
if (layer != v.layer) {
|
||||
return layer < v.layer;
|
||||
}
|
||||
if (segment != v.segment) {
|
||||
return segment < v.segment;
|
||||
}
|
||||
return seq < v.seq;
|
||||
}
|
||||
|
||||
bool operator<(const vertex &v) const {
|
||||
if (mid < v.mid) {
|
||||
return true;
|
||||
@@ -305,6 +336,8 @@ struct vertex {
|
||||
} else if (p1 == v.p1) {
|
||||
if (p2 < v.p2) {
|
||||
return true;
|
||||
} else if (p2 == v.p2) {
|
||||
return feature_less(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#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) {
|
||||
void fqsort(std::vector<FILE *> &inputs, size_t width, int (*cmp)(const void *, const void *), FILE *out, size_t mem, const char *tmpdir) {
|
||||
std::string pivot;
|
||||
FILE *fp1, *fp2;
|
||||
|
||||
@@ -67,8 +67,8 @@ void fqsort(std::vector<FILE *> &inputs, size_t width, int (*cmp)(const void *,
|
||||
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";
|
||||
std::string t1 = std::string(tmpdir) + "/sort1.XXXXXX";
|
||||
std::string t2 = std::string(tmpdir) + "/sort2.XXXXXX";
|
||||
|
||||
int fd1 = mkstemp((char *) t1.c_str());
|
||||
unlink(t1.c_str());
|
||||
@@ -117,11 +117,11 @@ void fqsort(std::vector<FILE *> &inputs, size_t width, int (*cmp)(const void *,
|
||||
|
||||
std::vector<FILE *> v1;
|
||||
v1.emplace_back(fp1);
|
||||
fqsort(v1, width, cmp, out, mem);
|
||||
fqsort(v1, width, cmp, out, mem, tmpdir);
|
||||
fclose(fp1);
|
||||
|
||||
std::vector<FILE *> v2;
|
||||
v2.emplace_back(fp2);
|
||||
fqsort(v2, width, cmp, out, mem);
|
||||
fqsort(v2, width, cmp, out, mem, tmpdir);
|
||||
fclose(fp2);
|
||||
}
|
||||
|
||||
@@ -1,6 +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);
|
||||
void fqsort(std::vector<FILE *> &inputs, size_t width, int (*cmp)(const void *, const void *), FILE *out, size_t mem, const char *tmpdir);
|
||||
|
||||
#endif
|
||||
|
||||
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
+14
-14
File diff suppressed because one or more lines are too long
@@ -58,7 +58,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 2 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -93.229980, 1.757537 ], [ -92.680664, 0.000000 ], [ -90.000000, -8.754795 ], [ -88.242188, -14.392118 ], [ -88.242188, -51.385495 ], [ -90.000000, -48.951366 ], [ -97.009277, -37.996163 ], [ -109.687500, 0.000000 ], [ -110.214844, 1.757537 ], [ -93.229980, 1.757537 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -93.229980, 1.757537 ], [ -92.680664, 0.000000 ], [ -90.000000, -8.754795 ], [ -88.242188, -14.392118 ], [ -88.242188, -51.385495 ], [ -88.264160, -51.385495 ], [ -88.264160, -51.358062 ], [ -90.000000, -48.951366 ], [ -97.009277, -37.996163 ], [ -109.687500, 0.000000 ], [ -110.214844, 1.757537 ], [ -93.229980, 1.757537 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -115.773926, 1.757537 ], [ -115.729980, 0.000000 ], [ -112.829590, -66.513260 ], [ -112.785645, -67.204032 ], [ -138.999023, -67.204032 ], [ -138.999023, 1.757537 ], [ -115.773926, 1.757537 ] ] ] } }
|
||||
] }
|
||||
@@ -90,13 +90,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 1, "y": 2 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -91.757812, -3.030812 ], [ -90.000000, -8.754795 ], [ -82.001953, -33.008663 ], [ -62.995605, -62.995158 ], [ -52.338867, -66.513260 ], [ -50.075684, -67.204032 ], [ -71.433105, -67.204032 ], [ -73.498535, -66.513260 ], [ -74.992676, -66.000150 ], [ -90.000000, -48.951366 ], [ -91.757812, -46.392411 ], [ -91.757812, -3.030812 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -91.735840, -3.030812 ], [ -91.735840, -3.096636 ], [ -90.000000, -8.754795 ], [ -82.001953, -33.008663 ], [ -62.995605, -62.995158 ], [ -52.338867, -66.513260 ], [ -50.075684, -67.204032 ], [ -71.433105, -67.204032 ], [ -73.498535, -66.513260 ], [ -74.992676, -66.000150 ], [ -90.000000, -48.951366 ], [ -91.757812, -46.392411 ], [ -91.757812, -3.096636 ], [ -91.779785, -3.030812 ], [ -91.735840, -3.030812 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 1, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -91.757812, 82.588941 ], [ -90.000000, 82.486209 ], [ -82.001953, 82.000000 ], [ -90.000000, 79.125832 ], [ -91.757812, 78.367146 ], [ -91.757812, 82.588941 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -91.735840, 82.588941 ], [ -90.000000, 82.486209 ], [ -82.001953, 82.000000 ], [ -90.000000, 79.125832 ], [ -91.735840, 78.376004 ], [ -91.735840, 78.367146 ], [ -91.779785, 78.367146 ], [ -91.757812, 78.376004 ], [ -91.757812, 82.588941 ], [ -91.735840, 82.588941 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 1.757812, 82.999490 ], [ 1.757812, 80.000984 ], [ -88.000488, 80.000984 ], [ -90.000000, 79.576460 ], [ -91.757812, 79.187834 ], [ -91.757812, 82.999490 ], [ 1.757812, 82.999490 ] ] ] } }
|
||||
] }
|
||||
|
||||
+26
-26
@@ -1,7 +1,7 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "-180.000000,0.000000,177.539063,68.269386",
|
||||
"bounds": "-180.000000,0.000000,180.000000,68.269386",
|
||||
"center": "-174.375000,16.560724,5",
|
||||
"center": "-151.875000,58.691485,5",
|
||||
"description": "tests/dateline/out/-z5.json.check.mbtiles",
|
||||
"format": "pbf",
|
||||
"generator_options": "./tippecanoe -q -a@ -f -o tests/dateline/out/-z5.json.check.mbtiles -z5 tests/dateline/in.json",
|
||||
@@ -14,7 +14,7 @@
|
||||
}, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -187.031250, 56.992883 ], [ -187.031250, 65.694476 ], [ -182.460938, 67.339861 ], [ -180.000000, 67.508568 ], [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.527295 ], [ -184.218750, 37.160317 ], [ -187.031250, 38.891033 ], [ -187.031250, 50.457504 ], [ -185.976562, 47.279229 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ], [ -185.976562, 58.813742 ], [ -187.031250, 56.992883 ] ] ], [ [ [ 187.031250, 43.961191 ], [ 187.031250, 35.460670 ], [ 175.781250, 37.160317 ], [ 161.718750, 45.336702 ], [ 156.796875, 54.977614 ], [ 163.476562, 62.431074 ], [ 170.507812, 64.774125 ], [ 177.539062, 67.339861 ], [ 180.000000, 67.508568 ], [ 187.031250, 68.007571 ], [ 187.031250, 63.704722 ], [ 182.109375, 62.593341 ], [ 180.000000, 61.648162 ], [ 174.023438, 58.813742 ], [ 171.562500, 54.367759 ], [ 174.023438, 47.279229 ], [ 182.460938, 44.339565 ], [ 187.031250, 43.961191 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.527295 ], [ -184.218750, 37.160317 ], [ -187.031250, 38.891033 ], [ -187.031250, 50.176898 ], [ -187.119141, 50.457504 ], [ -187.031250, 50.457504 ], [ -187.031250, 56.992883 ], [ -187.119141, 56.992883 ], [ -187.031250, 57.136239 ], [ -187.031250, 65.694476 ], [ -182.460938, 67.339861 ], [ -180.000000, 67.508568 ], [ -169.101562, 68.269387 ] ], [ [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ], [ -185.976562, 58.813742 ], [ -186.943359, 57.136239 ], [ -186.943359, 50.176898 ], [ -185.976562, 47.279229 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ] ] ], [ [ [ 187.031250, 68.007571 ], [ 187.031250, 63.704722 ], [ 182.109375, 62.593341 ], [ 180.000000, 61.648162 ], [ 174.023438, 58.813742 ], [ 171.562500, 54.367759 ], [ 174.023438, 47.279229 ], [ 182.460938, 44.339565 ], [ 187.031250, 43.961191 ], [ 187.031250, 35.460670 ], [ 175.781250, 37.160317 ], [ 161.718750, 45.336702 ], [ 156.796875, 54.977614 ], [ 163.476562, 62.431074 ], [ 170.507812, 64.774125 ], [ 177.539062, 67.339861 ], [ 180.000000, 67.508568 ], [ 187.031250, 68.007571 ] ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "180" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 180.000000, 9.968851 ], [ 180.000000, 29.993002 ] ], [ [ -180.000000, 9.968851 ], [ -180.000000, 29.993002 ] ] ] } }
|
||||
,
|
||||
@@ -42,7 +42,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -183.515625, 60.020952 ], [ -183.515625, 66.964476 ], [ -182.460938, 67.339861 ], [ -180.000000, 67.508568 ], [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.527295 ], [ -183.515625, 37.055177 ], [ -183.515625, 46.437857 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ], [ -183.515625, 60.020952 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.527295 ], [ -183.515625, 37.055177 ], [ -183.515625, 66.964476 ], [ -182.460938, 67.339861 ], [ -180.000000, 67.508568 ], [ -169.101562, 68.269387 ] ], [ [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ], [ -183.471680, 60.042904 ], [ -183.471680, 46.407564 ], [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "180" }, "geometry": { "type": "LineString", "coordinates": [ [ -180.000000, 10.012130 ], [ -180.000000, 29.993002 ] ] } }
|
||||
,
|
||||
@@ -82,7 +82,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -181.757812, 60.844911 ], [ -181.757812, 67.204032 ], [ -150.688477, 67.204032 ], [ -146.821289, 66.513260 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.509636 ], [ -181.757812, 36.791691 ], [ -181.757812, 45.828799 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ], [ -181.757812, 60.844911 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -150.688477, 67.204032 ], [ -146.821289, 66.513260 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.509636 ], [ -181.757812, 36.791691 ], [ -181.757812, 67.204032 ], [ -150.688477, 67.204032 ] ], [ [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ], [ -181.735840, 60.855613 ], [ -181.735840, 45.813486 ], [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "180" }, "geometry": { "type": "LineString", "coordinates": [ [ -180.000000, 9.990491 ], [ -180.000000, 29.993002 ] ] } }
|
||||
,
|
||||
@@ -162,7 +162,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 0, "y": 2 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -180.878906, 61.249102 ], [ -180.878906, 66.861082 ], [ -148.743896, 66.861082 ], [ -146.810303, 66.513260 ], [ -144.492188, 66.089364 ], [ -135.000000, 62.568045 ], [ -134.648438, 62.431074 ], [ -134.121094, 61.217379 ], [ -134.121094, 48.305121 ], [ -135.000000, 47.650588 ], [ -144.195557, 40.313043 ], [ -180.878906, 40.313043 ], [ -180.878906, 45.521744 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ], [ -180.878906, 61.249102 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -148.743896, 66.861082 ], [ -146.810303, 66.513260 ], [ -144.492188, 66.089364 ], [ -135.000000, 62.568045 ], [ -134.648438, 62.431074 ], [ -134.121094, 61.217379 ], [ -134.121094, 48.305121 ], [ -135.000000, 47.650588 ], [ -144.195557, 40.313043 ], [ -180.878906, 40.313043 ], [ -180.878906, 66.861082 ], [ -148.743896, 66.861082 ] ], [ [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ], [ -180.867920, 61.254386 ], [ -180.867920, 45.514046 ], [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "-180" }, "geometry": { "type": "LineString", "coordinates": [ [ -180.000000, 40.313043 ], [ -180.000000, 40.979898 ], [ -180.000000, 50.000678 ] ] } }
|
||||
] }
|
||||
@@ -170,7 +170,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 0, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -146.810303, 66.513260 ], [ -144.876709, 66.160511 ], [ -180.878906, 66.160511 ], [ -180.878906, 67.449657 ], [ -180.000000, 67.512771 ], [ -169.101562, 68.269387 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -146.810303, 66.513260 ], [ -144.898682, 66.164951 ], [ -144.876709, 66.164951 ], [ -144.876709, 66.160511 ], [ -180.878906, 66.160511 ], [ -180.878906, 67.449657 ], [ -180.000000, 67.512771 ], [ -169.101562, 68.269387 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -272,7 +272,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 0, "y": 5 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.060547, 45.525592 ], [ -157.060547, 40.647304 ], [ -180.439453, 40.647304 ], [ -180.439453, 45.367584 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -157.500000, 45.402307 ], [ -157.060547, 45.525592 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.060547, 56.022948 ], [ -157.060547, 40.647304 ], [ -180.439453, 40.647304 ], [ -180.439453, 56.022948 ], [ -180.433960, 56.022948 ], [ -180.433960, 45.363725 ], [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -157.500000, 45.402307 ], [ -157.066040, 45.525592 ], [ -157.066040, 56.022948 ], [ -157.060547, 56.022948 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "-180" }, "geometry": { "type": "LineString", "coordinates": [ [ -180.000000, 40.647304 ], [ -180.000000, 40.979898 ], [ -180.000000, 50.000678 ] ] } }
|
||||
] }
|
||||
@@ -280,7 +280,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 0, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.060547, 63.484863 ], [ -157.500000, 63.595005 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.650771 ], [ -180.439453, 61.449271 ], [ -180.439453, 66.687784 ], [ -157.060547, 66.687784 ], [ -157.060547, 63.484863 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.060547, 66.687784 ], [ -157.060547, 55.528631 ], [ -157.066040, 55.528631 ], [ -157.066040, 63.487315 ], [ -157.500000, 63.595005 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.650771 ], [ -180.433960, 61.451896 ], [ -180.433960, 55.528631 ], [ -180.439453, 55.528631 ], [ -180.439453, 66.687784 ], [ -157.060547, 66.687784 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -304,13 +304,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 1, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.939453, 63.707156 ], [ -157.939453, 66.687784 ], [ -147.777100, 66.687784 ], [ -146.810303, 66.513260 ], [ -144.492188, 66.089364 ], [ -135.000000, 62.570575 ], [ -134.648438, 62.431074 ], [ -134.560547, 62.232115 ], [ -134.560547, 55.528631 ], [ -143.986816, 55.528631 ], [ -143.959351, 55.776573 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -157.500000, 63.595005 ], [ -157.939453, 63.707156 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -147.777100, 66.687784 ], [ -146.810303, 66.513260 ], [ -144.492188, 66.089364 ], [ -135.000000, 62.570575 ], [ -134.648438, 62.431074 ], [ -134.560547, 62.232115 ], [ -134.560547, 55.528631 ], [ -157.939453, 55.528631 ], [ -157.939453, 55.531739 ], [ -143.986816, 55.531739 ], [ -143.959351, 55.776573 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -157.500000, 63.595005 ], [ -157.939453, 63.707156 ], [ -157.939453, 66.687784 ], [ -147.777100, 66.687784 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 1, "y": 3 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.939453, 68.157253 ], [ -157.500000, 68.153165 ], [ -156.093750, 68.138852 ], [ -146.810303, 66.513260 ], [ -145.843506, 66.337505 ], [ -157.939453, 66.337505 ], [ -157.939453, 68.157253 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.939453, 68.157253 ], [ -157.500000, 68.153165 ], [ -156.093750, 68.138852 ], [ -146.810303, 66.513260 ], [ -145.854492, 66.339710 ], [ -145.843506, 66.339710 ], [ -145.843506, 66.337505 ], [ -157.939453, 66.337505 ], [ -157.939453, 68.157253 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -364,13 +364,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 5 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.939453, 56.022948 ], [ 157.939453, 52.912215 ], [ 157.500000, 53.719466 ], [ 156.796875, 54.977614 ], [ 157.450562, 55.776573 ], [ 157.653809, 56.022948 ], [ 157.939453, 56.022948 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.939453, 56.022948 ], [ 157.939453, 52.922151 ], [ 157.944946, 52.912215 ], [ 157.933960, 52.912215 ], [ 157.933960, 52.922151 ], [ 157.500000, 53.719466 ], [ 156.796875, 54.977614 ], [ 157.450562, 55.776573 ], [ 157.653809, 56.022948 ], [ 157.939453, 56.022948 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.939453, 56.368293 ], [ 157.939453, 55.528631 ], [ 157.247314, 55.528631 ], [ 157.450562, 55.776573 ], [ 157.500000, 55.838314 ], [ 157.939453, 56.368293 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.939453, 56.368293 ], [ 157.939453, 55.528631 ], [ 157.247314, 55.528631 ], [ 157.450562, 55.776573 ], [ 157.500000, 55.838314 ], [ 157.933960, 56.362207 ], [ 157.933960, 56.368293 ], [ 157.939453, 56.368293 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -402,7 +402,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 15, "y": 5 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 180.439453, 45.058001 ], [ 180.439453, 40.647304 ], [ 169.996948, 40.647304 ], [ 169.431152, 40.979898 ], [ 161.718750, 45.336702 ], [ 157.500000, 53.719466 ], [ 157.060547, 54.511516 ], [ 157.060547, 55.304138 ], [ 157.653809, 56.022948 ], [ 172.446899, 56.022948 ], [ 172.309570, 55.776573 ], [ 171.562500, 54.367759 ], [ 174.023438, 47.279229 ], [ 180.439453, 45.058001 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 180.439453, 56.022948 ], [ 180.439453, 56.019878 ], [ 172.446899, 56.019878 ], [ 172.309570, 55.776573 ], [ 171.562500, 54.367759 ], [ 174.023438, 47.279229 ], [ 180.439453, 45.058001 ], [ 180.439453, 40.647304 ], [ 169.996948, 40.647304 ], [ 169.431152, 40.979898 ], [ 161.718750, 45.336702 ], [ 157.500000, 53.719466 ], [ 157.060547, 54.511516 ], [ 157.060547, 55.304138 ], [ 157.653809, 56.022948 ], [ 180.439453, 56.022948 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "-180" }, "geometry": { "type": "LineString", "coordinates": [ [ 180.000000, 40.647304 ], [ 180.000000, 40.979898 ], [ 180.000000, 50.000678 ] ] } }
|
||||
] }
|
||||
@@ -464,7 +464,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 0, "y": 11 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -180.219727, 45.290347 ], [ -177.539062, 44.339565 ], [ -168.750000, 43.636075 ], [ -168.530273, 43.620171 ], [ -168.530273, 40.813809 ], [ -180.219727, 40.813809 ], [ -180.219727, 45.290347 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -180.216980, 49.066668 ], [ -180.216980, 45.288414 ], [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -168.750000, 43.636075 ], [ -168.530273, 43.620171 ], [ -168.530273, 40.813809 ], [ -180.219727, 40.813809 ], [ -180.219727, 49.066668 ], [ -180.216980, 49.066668 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "-180" }, "geometry": { "type": "LineString", "coordinates": [ [ -180.000000, 40.813809 ], [ -180.000000, 40.979898 ], [ -180.000000, 48.922499 ], [ -180.000000, 49.066668 ] ] } }
|
||||
] }
|
||||
@@ -478,13 +478,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 0, "y": 9 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -180.219727, 61.550184 ], [ -180.219727, 61.710706 ], [ -179.865417, 61.710706 ], [ -180.219727, 61.550184 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -179.865417, 61.712008 ], [ -179.865417, 61.710706 ], [ -168.530273, 61.710706 ], [ -168.530273, 61.709404 ], [ -179.868164, 61.709404 ], [ -180.216980, 61.551493 ], [ -180.216980, 55.652798 ], [ -180.219727, 55.652798 ], [ -180.219727, 61.710706 ], [ -179.868164, 61.710706 ], [ -179.865417, 61.712008 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 0, "y": 8 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -168.530273, 64.421851 ], [ -168.750000, 64.433707 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.649467 ], [ -180.219727, 61.550184 ], [ -180.219727, 66.600676 ], [ -168.530273, 66.600676 ], [ -168.530273, 64.421851 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -168.530273, 66.600676 ], [ -168.530273, 61.501734 ], [ -168.533020, 61.501734 ], [ -168.533020, 64.421851 ], [ -168.750000, 64.433707 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.649467 ], [ -180.216980, 61.551493 ], [ -180.216980, 61.501734 ], [ -180.219727, 61.501734 ], [ -180.219727, 66.600676 ], [ -168.530273, 66.600676 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -502,13 +502,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 1, "y": 11 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.280273, 45.463983 ], [ -157.280273, 40.813809 ], [ -168.969727, 40.813809 ], [ -168.969727, 43.653963 ], [ -168.750000, 43.636075 ], [ -164.882812, 43.325178 ], [ -157.500000, 45.404235 ], [ -157.280273, 45.463983 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.280273, 49.066668 ], [ -157.280273, 40.813809 ], [ -168.969727, 40.813809 ], [ -168.969727, 49.066668 ], [ -168.966980, 49.066668 ], [ -168.966980, 43.653963 ], [ -168.750000, 43.636075 ], [ -164.882812, 43.325178 ], [ -157.500000, 45.404235 ], [ -157.283020, 45.463983 ], [ -157.283020, 49.066668 ], [ -157.280273, 49.066668 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 1, "y": 8 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -168.969727, 64.445557 ], [ -168.969727, 66.600676 ], [ -157.280273, 66.600676 ], [ -157.280273, 63.539987 ], [ -157.500000, 63.596226 ], [ -158.554688, 63.860036 ], [ -168.750000, 64.433707 ], [ -168.969727, 64.445557 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.280273, 66.600676 ], [ -157.280273, 61.501734 ], [ -157.283020, 61.501734 ], [ -157.283020, 63.541211 ], [ -157.500000, 63.596226 ], [ -158.554688, 63.860036 ], [ -168.750000, 64.433707 ], [ -168.969727, 64.445557 ], [ -168.969727, 66.600676 ], [ -157.280273, 66.600676 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -532,13 +532,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 2, "y": 10 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.030273, 50.401515 ], [ -146.030273, 48.777913 ], [ -149.161377, 48.777913 ], [ -146.030273, 50.401515 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.030273, 55.899956 ], [ -146.030273, 48.777913 ], [ -149.158630, 48.777913 ], [ -149.161377, 48.776103 ], [ -149.161377, 48.777913 ], [ -157.719727, 48.777913 ], [ -157.719727, 48.779723 ], [ -149.158630, 48.779723 ], [ -148.886719, 48.922499 ], [ -146.250000, 50.289339 ], [ -146.033020, 50.399765 ], [ -146.033020, 55.899956 ], [ -146.030273, 55.899956 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 2, "y": 9 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.030273, 59.299552 ], [ -146.250000, 59.505061 ], [ -148.007812, 61.100789 ], [ -149.869995, 61.606396 ], [ -150.257263, 61.710706 ], [ -146.030273, 61.710706 ], [ -146.030273, 59.299552 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -150.257263, 61.712008 ], [ -150.251770, 61.710706 ], [ -146.030273, 61.710706 ], [ -146.030273, 59.302356 ], [ -146.027527, 59.299552 ], [ -146.030273, 59.299552 ], [ -146.030273, 55.652798 ], [ -146.033020, 55.652798 ], [ -146.033020, 59.302356 ], [ -146.250000, 59.505061 ], [ -148.007812, 61.100789 ], [ -149.869995, 61.606396 ], [ -150.251770, 61.709404 ], [ -157.719727, 61.709404 ], [ -157.719727, 61.710706 ], [ -150.257263, 61.710706 ], [ -150.257263, 61.712008 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -550,7 +550,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 2, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.719727, 68.155209 ], [ -157.500000, 68.153165 ], [ -156.093750, 68.138852 ], [ -146.813049, 66.513260 ], [ -146.329651, 66.425537 ], [ -157.719727, 66.425537 ], [ -157.719727, 68.155209 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.719727, 68.155209 ], [ -157.500000, 68.153165 ], [ -156.093750, 68.138852 ], [ -146.813049, 66.513260 ], [ -146.335144, 66.426636 ], [ -146.329651, 66.426636 ], [ -146.329651, 66.425537 ], [ -157.719727, 66.425537 ], [ -157.719727, 68.155209 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -574,7 +574,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 3, "y": 9 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.469727, 59.707941 ], [ -146.469727, 61.710706 ], [ -134.780273, 61.710706 ], [ -134.780273, 55.652798 ], [ -143.973083, 55.652798 ], [ -143.959351, 55.776573 ], [ -143.789062, 57.136239 ], [ -146.250000, 59.505061 ], [ -146.469727, 59.707941 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -134.780273, 61.710706 ], [ -134.780273, 55.652798 ], [ -146.469727, 55.652798 ], [ -146.469727, 55.654348 ], [ -143.973083, 55.654348 ], [ -143.959351, 55.776573 ], [ -143.789062, 57.136239 ], [ -146.250000, 59.505061 ], [ -146.469727, 59.707941 ], [ -146.469727, 61.710706 ], [ -134.780273, 61.710706 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -664,13 +664,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 29, "y": 10 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.719727, 55.899956 ], [ 157.719727, 53.317749 ], [ 157.500000, 53.719466 ], [ 156.796875, 54.977614 ], [ 157.447815, 55.776573 ], [ 157.549438, 55.899956 ], [ 157.719727, 55.899956 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.719727, 55.899956 ], [ 157.719727, 53.322671 ], [ 157.722473, 53.317749 ], [ 157.716980, 53.317749 ], [ 157.716980, 53.322671 ], [ 157.500000, 53.719466 ], [ 156.796875, 54.977614 ], [ 157.447815, 55.776573 ], [ 157.549438, 55.899956 ], [ 157.719727, 55.899956 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 29, "y": 9 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.719727, 56.104215 ], [ 157.719727, 55.652798 ], [ 157.346191, 55.652798 ], [ 157.447815, 55.776573 ], [ 157.500000, 55.839856 ], [ 157.719727, 56.104215 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.719727, 56.104215 ], [ 157.719727, 55.652798 ], [ 157.346191, 55.652798 ], [ 157.447815, 55.776573 ], [ 157.500000, 55.839856 ], [ 157.716980, 56.101152 ], [ 157.716980, 56.104215 ], [ 157.719727, 56.104215 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -750,7 +750,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 31, "y": 10 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 172.378235, 55.899956 ], [ 172.309570, 55.776573 ], [ 171.562500, 54.367759 ], [ 173.485107, 48.922499 ], [ 173.534546, 48.777913 ], [ 168.530273, 48.777913 ], [ 168.530273, 55.899956 ], [ 172.378235, 55.899956 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 180.219727, 55.899956 ], [ 180.219727, 55.898416 ], [ 172.378235, 55.898416 ], [ 172.309570, 55.776573 ], [ 171.562500, 54.367759 ], [ 173.485107, 48.922499 ], [ 173.534546, 48.779723 ], [ 180.219727, 48.779723 ], [ 180.219727, 48.777913 ], [ 168.530273, 48.777913 ], [ 168.530273, 55.899956 ], [ 180.219727, 55.899956 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "-180" }, "geometry": { "type": "LineString", "coordinates": [ [ 180.000000, 48.777913 ], [ 180.000000, 48.922499 ], [ 180.000000, 50.000678 ] ] } }
|
||||
] }
|
||||
@@ -758,7 +758,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 31, "y": 9 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 180.131836, 61.710706 ], [ 179.903870, 61.606396 ], [ 174.023438, 58.813742 ], [ 172.312317, 55.776573 ], [ 172.243652, 55.652798 ], [ 168.530273, 55.652798 ], [ 168.530273, 61.710706 ], [ 180.131836, 61.710706 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 180.131836, 61.712008 ], [ 180.131836, 61.710706 ], [ 180.219727, 61.710706 ], [ 180.219727, 61.709404 ], [ 180.129089, 61.709404 ], [ 179.903870, 61.606396 ], [ 174.023438, 58.813742 ], [ 172.312317, 55.776573 ], [ 172.243652, 55.652798 ], [ 168.530273, 55.652798 ], [ 168.530273, 61.710706 ], [ 180.129089, 61.710706 ], [ 180.131836, 61.712008 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "-180.000000,0.000000,177.539063,68.269386",
|
||||
"bounds": "-180.000000,0.000000,180.000000,68.269386",
|
||||
"center": "174.375000,44.951199,5",
|
||||
"center": "-151.875000,58.691485,5",
|
||||
"description": "tests/dateline/out/-z5_-b0.json.check.mbtiles",
|
||||
"format": "pbf",
|
||||
"generator_options": "./tippecanoe -q -a@ -f -o tests/dateline/out/-z5_-b0.json.check.mbtiles -z5 -b0 tests/dateline/in.json",
|
||||
@@ -14,7 +14,7 @@
|
||||
}, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -180.000000, 61.648162 ], [ -180.000000, 67.508568 ], [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.527295 ], [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ] ] ], [ [ [ 180.000000, 45.213004 ], [ 180.000000, 36.527295 ], [ 175.781250, 37.160317 ], [ 161.718750, 45.336702 ], [ 156.796875, 54.977614 ], [ 163.476562, 62.431074 ], [ 170.507812, 64.774125 ], [ 177.539062, 67.339861 ], [ 180.000000, 67.508568 ], [ 180.000000, 61.648162 ], [ 174.023438, 58.813742 ], [ 171.562500, 54.367759 ], [ 174.023438, 47.279229 ], [ 180.000000, 45.213004 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.527295 ], [ -180.000000, 67.508568 ], [ -169.101562, 68.269387 ] ], [ [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -179.912109, 61.689872 ], [ -179.912109, 45.151053 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ] ] ], [ [ [ 180.000000, 67.508568 ], [ 180.000000, 61.648162 ], [ 174.023438, 58.813742 ], [ 171.562500, 54.367759 ], [ 174.023438, 47.279229 ], [ 180.000000, 45.213004 ], [ 180.000000, 36.527295 ], [ 175.781250, 37.160317 ], [ 161.718750, 45.336702 ], [ 156.796875, 54.977614 ], [ 163.476562, 62.431074 ], [ 170.507812, 64.774125 ], [ 177.539062, 67.339861 ], [ 180.000000, 67.508568 ] ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "180" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 180.000000, 9.968851 ], [ 180.000000, 29.993002 ] ], [ [ -180.000000, 9.968851 ], [ -180.000000, 29.993002 ] ] ] } }
|
||||
,
|
||||
@@ -36,7 +36,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -180.000000, 61.648162 ], [ -180.000000, 67.508568 ], [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.527295 ], [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.527295 ], [ -180.000000, 67.508568 ], [ -169.101562, 68.269387 ] ], [ [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -179.956055, 61.669024 ], [ -179.956055, 45.182037 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "180" }, "geometry": { "type": "LineString", "coordinates": [ [ -180.000000, 10.012130 ], [ -180.000000, 29.993002 ] ] } }
|
||||
,
|
||||
@@ -68,7 +68,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -180.000000, 61.648162 ], [ -180.000000, 66.513260 ], [ -146.821289, 66.513260 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.509636 ], [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.821289, 66.513260 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.548165 ], [ -169.453125, 34.885931 ], [ -180.000000, 36.509636 ], [ -180.000000, 66.513260 ], [ -146.821289, 66.513260 ] ], [ [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -179.978027, 61.658595 ], [ -179.978027, 45.197522 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "180" }, "geometry": { "type": "LineString", "coordinates": [ [ -180.000000, 9.990491 ], [ -180.000000, 29.993002 ] ] } }
|
||||
,
|
||||
@@ -84,7 +84,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -146.821289, 66.513260 ], [ -180.000000, 66.513260 ], [ -180.000000, 67.516972 ], [ -169.101562, 68.269387 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -146.865234, 66.522016 ], [ -146.821289, 66.522016 ], [ -146.821289, 66.504502 ], [ -146.865234, 66.513260 ], [ -180.000000, 66.513260 ], [ -180.000000, 67.516972 ], [ -169.101562, 68.269387 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -130,7 +130,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 0, "y": 2 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -180.000000, 61.648162 ], [ -180.000000, 66.513260 ], [ -146.810303, 66.513260 ], [ -144.492188, 66.089364 ], [ -135.000000, 62.568045 ], [ -135.000000, 47.650588 ], [ -143.404541, 40.979898 ], [ -180.000000, 40.979898 ], [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.810303, 66.513260 ], [ -144.492188, 66.089364 ], [ -135.000000, 62.568045 ], [ -135.000000, 47.650588 ], [ -143.404541, 40.979898 ], [ -180.000000, 40.979898 ], [ -180.000000, 66.513260 ], [ -146.810303, 66.513260 ] ], [ [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -179.989014, 61.653379 ], [ -179.989014, 45.205263 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -153.281250, 46.558860 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "-180" }, "geometry": { "type": "LineString", "coordinates": [ [ -180.000000, 40.979898 ], [ -180.000000, 50.000678 ] ] } }
|
||||
] }
|
||||
@@ -138,7 +138,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 0, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -146.810303, 66.513260 ], [ -180.000000, 66.513260 ], [ -180.000000, 67.512771 ], [ -169.101562, 68.269387 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -146.832275, 66.517639 ], [ -146.810303, 66.517639 ], [ -146.810303, 66.508882 ], [ -146.832275, 66.513260 ], [ -180.000000, 66.513260 ], [ -180.000000, 67.512771 ], [ -169.101562, 68.269387 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -222,7 +222,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 0, "y": 5 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 45.402307 ], [ -157.500000, 40.979898 ], [ -180.000000, 40.979898 ], [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -157.500000, 45.402307 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 55.776573 ], [ -157.500000, 40.979898 ], [ -180.000000, 40.979898 ], [ -180.000000, 55.776573 ], [ -179.994507, 55.776573 ], [ -179.994507, 45.209134 ], [ -177.539062, 44.339565 ], [ -164.882812, 43.325178 ], [ -157.505493, 45.402307 ], [ -157.505493, 55.776573 ], [ -157.500000, 55.776573 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "-180" }, "geometry": { "type": "LineString", "coordinates": [ [ -180.000000, 40.979898 ], [ -180.000000, 50.000678 ] ] } }
|
||||
] }
|
||||
@@ -230,7 +230,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 0, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 63.595005 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.648162 ], [ -180.000000, 66.513260 ], [ -157.500000, 66.513260 ], [ -157.500000, 63.595005 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 66.513260 ], [ -157.500000, 55.776573 ], [ -157.505493, 55.776573 ], [ -157.505493, 63.597448 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -179.994507, 61.650771 ], [ -179.994507, 55.776573 ], [ -180.000000, 55.776573 ], [ -180.000000, 66.513260 ], [ -157.500000, 66.513260 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -254,13 +254,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 1, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 63.595005 ], [ -157.500000, 66.513260 ], [ -146.810303, 66.513260 ], [ -144.492188, 66.089364 ], [ -135.000000, 62.570575 ], [ -135.000000, 55.776573 ], [ -143.959351, 55.776573 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -157.500000, 63.595005 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.810303, 66.513260 ], [ -144.492188, 66.089364 ], [ -135.000000, 62.570575 ], [ -135.000000, 55.776573 ], [ -157.500000, 55.776573 ], [ -157.500000, 55.779662 ], [ -143.959351, 55.779662 ], [ -143.789062, 57.136239 ], [ -148.007812, 61.100789 ], [ -157.500000, 63.595005 ], [ -157.500000, 66.513260 ], [ -146.810303, 66.513260 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 1, "y": 3 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 68.153165 ], [ -156.093750, 68.138852 ], [ -146.810303, 66.513260 ], [ -157.500000, 66.513260 ], [ -157.500000, 68.153165 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 68.153165 ], [ -156.093750, 68.138852 ], [ -146.821289, 66.515450 ], [ -146.810303, 66.515450 ], [ -146.810303, 66.511071 ], [ -146.821289, 66.513260 ], [ -157.500000, 66.513260 ], [ -157.500000, 68.153165 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -296,13 +296,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 5 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.500000, 55.776573 ], [ 157.500000, 53.719466 ], [ 156.796875, 54.977614 ], [ 157.450562, 55.776573 ], [ 157.500000, 55.776573 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.500000, 55.776573 ], [ 157.500000, 53.729217 ], [ 157.505493, 53.719466 ], [ 157.494507, 53.719466 ], [ 157.494507, 53.729217 ], [ 156.796875, 54.977614 ], [ 157.450562, 55.776573 ], [ 157.500000, 55.776573 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.500000, 55.838314 ], [ 157.500000, 55.776573 ], [ 157.450562, 55.776573 ], [ 157.500000, 55.838314 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.505493, 55.838314 ], [ 157.500000, 55.832144 ], [ 157.500000, 55.776573 ], [ 157.450562, 55.776573 ], [ 157.500000, 55.838314 ], [ 157.505493, 55.838314 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -334,7 +334,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 15, "y": 5 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 180.000000, 45.213004 ], [ 180.000000, 40.979898 ], [ 169.431152, 40.979898 ], [ 161.718750, 45.336702 ], [ 157.500000, 53.719466 ], [ 157.500000, 55.776573 ], [ 172.309570, 55.776573 ], [ 171.562500, 54.367759 ], [ 174.023438, 47.279229 ], [ 180.000000, 45.213004 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 180.000000, 55.776573 ], [ 180.000000, 55.773483 ], [ 172.309570, 55.773483 ], [ 171.562500, 54.367759 ], [ 174.023438, 47.279229 ], [ 180.000000, 45.213004 ], [ 180.000000, 40.979898 ], [ 169.431152, 40.979898 ], [ 161.718750, 45.336702 ], [ 157.500000, 53.719466 ], [ 157.500000, 55.776573 ], [ 180.000000, 55.776573 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "-180" }, "geometry": { "type": "LineString", "coordinates": [ [ 180.000000, 40.979898 ], [ 180.000000, 50.000678 ] ] } }
|
||||
] }
|
||||
@@ -396,7 +396,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 0, "y": 11 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -180.000000, 45.213004 ], [ -177.539062, 44.339565 ], [ -168.750000, 43.636075 ], [ -168.750000, 40.979898 ], [ -180.000000, 40.979898 ], [ -180.000000, 45.213004 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -179.997253, 48.922499 ], [ -179.997253, 45.211069 ], [ -177.539062, 44.339565 ], [ -168.750000, 43.636075 ], [ -168.750000, 40.979898 ], [ -180.000000, 40.979898 ], [ -180.000000, 48.922499 ], [ -179.997253, 48.922499 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "-180" }, "geometry": { "type": "LineString", "coordinates": [ [ -180.000000, 40.979898 ], [ -180.000000, 48.922499 ] ] } }
|
||||
] }
|
||||
@@ -410,7 +410,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 0, "y": 8 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -168.750000, 64.433707 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.649467 ], [ -180.000000, 66.513260 ], [ -168.750000, 66.513260 ], [ -168.750000, 64.433707 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -168.750000, 66.513260 ], [ -168.750000, 61.606396 ], [ -168.752747, 61.606396 ], [ -168.752747, 64.433707 ], [ -169.453125, 64.472794 ], [ -177.890625, 62.593341 ], [ -179.997253, 61.650771 ], [ -179.997253, 61.606396 ], [ -180.000000, 61.606396 ], [ -180.000000, 66.513260 ], [ -168.750000, 66.513260 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -428,13 +428,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 1, "y": 11 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 45.404235 ], [ -157.500000, 40.979898 ], [ -168.750000, 40.979898 ], [ -168.750000, 43.636075 ], [ -164.882812, 43.325178 ], [ -157.500000, 45.404235 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 48.922499 ], [ -157.500000, 40.979898 ], [ -168.750000, 40.979898 ], [ -168.750000, 48.922499 ], [ -168.747253, 48.922499 ], [ -168.747253, 43.636075 ], [ -164.882812, 43.325178 ], [ -157.502747, 45.404235 ], [ -157.502747, 48.922499 ], [ -157.500000, 48.922499 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 1, "y": 8 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -168.750000, 64.433707 ], [ -168.750000, 66.513260 ], [ -157.500000, 66.513260 ], [ -157.500000, 63.595005 ], [ -158.554688, 63.860036 ], [ -168.750000, 64.433707 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 66.513260 ], [ -157.500000, 61.606396 ], [ -157.502747, 61.606396 ], [ -157.502747, 63.596226 ], [ -158.554688, 63.860036 ], [ -168.750000, 64.433707 ], [ -168.750000, 66.513260 ], [ -157.500000, 66.513260 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -458,13 +458,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 2, "y": 10 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.250000, 50.289339 ], [ -146.250000, 48.922499 ], [ -148.886719, 48.922499 ], [ -146.250000, 50.289339 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.250000, 55.776573 ], [ -146.250000, 48.922499 ], [ -148.883972, 48.922499 ], [ -148.886719, 48.920695 ], [ -148.886719, 48.922499 ], [ -157.500000, 48.922499 ], [ -157.500000, 48.924304 ], [ -148.883972, 48.924304 ], [ -146.252747, 50.287584 ], [ -146.252747, 55.776573 ], [ -146.250000, 55.776573 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 2, "y": 9 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.250000, 59.505061 ], [ -148.007812, 61.100789 ], [ -149.869995, 61.606396 ], [ -146.250000, 61.606396 ], [ -146.250000, 59.505061 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -149.869995, 61.607702 ], [ -149.864502, 61.606396 ], [ -146.250000, 61.606396 ], [ -146.250000, 59.507849 ], [ -146.247253, 59.505061 ], [ -146.250000, 59.505061 ], [ -146.250000, 55.776573 ], [ -146.252747, 55.776573 ], [ -146.252747, 59.507849 ], [ -148.007812, 61.100789 ], [ -149.864502, 61.605090 ], [ -157.500000, 61.605090 ], [ -157.500000, 61.606396 ], [ -149.869995, 61.606396 ], [ -149.869995, 61.607702 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -476,7 +476,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 2, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 68.153165 ], [ -156.093750, 68.138852 ], [ -146.813049, 66.513260 ], [ -157.500000, 66.513260 ], [ -157.500000, 68.153165 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -157.500000, 68.153165 ], [ -156.093750, 68.138852 ], [ -146.818542, 66.514355 ], [ -146.813049, 66.514355 ], [ -146.813049, 66.512166 ], [ -146.818542, 66.513260 ], [ -157.500000, 66.513260 ], [ -157.500000, 68.153165 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -500,7 +500,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 3, "y": 9 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -146.250000, 59.505061 ], [ -146.250000, 61.606396 ], [ -135.000000, 61.606396 ], [ -135.000000, 55.776573 ], [ -143.959351, 55.776573 ], [ -143.789062, 57.136239 ], [ -146.250000, 59.505061 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -135.000000, 61.606396 ], [ -135.000000, 55.776573 ], [ -146.250000, 55.776573 ], [ -146.250000, 55.778118 ], [ -143.959351, 55.778118 ], [ -143.789062, 57.136239 ], [ -146.250000, 59.505061 ], [ -146.250000, 61.606396 ], [ -135.000000, 61.606396 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -566,13 +566,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 29, "y": 10 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.500000, 55.776573 ], [ 157.500000, 53.719466 ], [ 156.796875, 54.977614 ], [ 157.447815, 55.776573 ], [ 157.500000, 55.776573 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.500000, 55.776573 ], [ 157.500000, 53.724342 ], [ 157.502747, 53.719466 ], [ 157.497253, 53.719466 ], [ 157.497253, 53.724342 ], [ 156.796875, 54.977614 ], [ 157.447815, 55.776573 ], [ 157.500000, 55.776573 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 29, "y": 9 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.500000, 55.838314 ], [ 157.500000, 55.776573 ], [ 157.447815, 55.776573 ], [ 157.500000, 55.838314 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.502747, 55.838314 ], [ 157.500000, 55.835229 ], [ 157.500000, 55.776573 ], [ 157.447815, 55.776573 ], [ 157.497253, 55.835229 ], [ 157.497253, 55.838314 ], [ 157.502747, 55.838314 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -652,7 +652,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 31, "y": 10 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 172.312317, 55.776573 ], [ 171.562500, 54.367759 ], [ 173.485107, 48.922499 ], [ 168.750000, 48.922499 ], [ 168.750000, 55.776573 ], [ 172.312317, 55.776573 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 180.000000, 55.776573 ], [ 180.000000, 55.775028 ], [ 172.312317, 55.775028 ], [ 171.562500, 54.367759 ], [ 173.485107, 48.924304 ], [ 180.000000, 48.924304 ], [ 180.000000, 48.922499 ], [ 168.750000, 48.922499 ], [ 168.750000, 55.776573 ], [ 180.000000, 55.776573 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "where": "-180" }, "geometry": { "type": "LineString", "coordinates": [ [ 180.000000, 48.922499 ], [ 180.000000, 50.000678 ] ] } }
|
||||
] }
|
||||
@@ -660,7 +660,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 31, "y": 9 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 179.903870, 61.606396 ], [ 174.023438, 58.813742 ], [ 172.312317, 55.776573 ], [ 168.750000, 55.776573 ], [ 168.750000, 61.606396 ], [ 179.903870, 61.606396 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27,27,1.4e+27,{\"foo\":\"bar\"}]", "": "something for nothing", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→🐂🐳", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 179.903870, 61.607702 ], [ 179.903870, 61.606396 ], [ 180.000000, 61.606396 ], [ 180.000000, 61.605090 ], [ 179.901123, 61.605090 ], [ 174.023438, 58.813742 ], [ 172.312317, 55.776573 ], [ 168.750000, 55.776573 ], [ 168.750000, 61.606396 ], [ 179.901123, 61.606396 ], [ 179.903870, 61.607702 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "numeric-properties", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "byte_min": -128, "ubyte_max": 255, "bool_value": true, "short_min": -32768, "ushort_max": 65535, "int_min": -2147483648, "uint_max": 4294967295, "long_min": -9223372036854775808, "ulong_max": 18446744073709551615, "float_value": 1.25, "double_value": 12345.678901234, "guid_value": "123e4567-e89b-12d3-a456-426614174000" }, "geometry": { "type": "Point", "coordinates": [ 0.000000, 0.000000 ] } }
|
||||
] }
|
||||
] }
|
||||
@@ -15,7 +15,7 @@
|
||||
}, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.208008, 9.622414 ], [ 138.208008, 9.535749 ], [ 138.120117, 9.535749 ], [ 138.120117, 9.622414 ], [ 138.208008, 9.622414 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.164062, 9.579084 ], [ 138.251953, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.164062, 9.579084 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -27,7 +27,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 3, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.942871, 7.406048 ], [ 143.942871, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.898926, 7.406048 ], [ 143.942871, 7.406048 ] ] ], [ [ [ 138.164062, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.942871, 7.406048 ], [ 143.942871, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.898926, 7.406048 ], [ 143.942871, 7.406048 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.229980, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.208008, 9.492408 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.120117, 9.535749 ], [ 138.120117, 9.579084 ], [ 138.142090, 9.579084 ], [ 138.186035, 9.579084 ] ], [ [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.557417 ], [ 138.142090, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -39,15 +39,15 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 7, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.353271, 0.274657 ], [ 173.353271, 0.252685 ], [ 173.331299, 0.252685 ], [ 173.331299, 0.274657 ], [ 173.353271, 0.274657 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.353271, 0.274657 ], [ 173.353271, 0.252685 ], [ 173.331299, 0.252685 ], [ 173.331299, 0.274657 ], [ 173.353271, 0.274657 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.924561, 0.307616 ], [ 173.935547, 0.329588 ], [ 173.935547, 0.373533 ], [ 173.924561, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 7, "y": 3 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.353271, 0.274657 ], [ 173.353271, 0.252685 ], [ 173.331299, 0.252685 ], [ 173.331299, 0.274657 ], [ 173.353271, 0.274657 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.353271, 0.274657 ], [ 173.353271, 0.252685 ], [ 173.331299, 0.252685 ], [ 173.331299, 0.274657 ], [ 173.353271, 0.274657 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.924561, 0.307616 ], [ 173.935547, 0.329588 ], [ 173.935547, 0.373533 ], [ 173.924561, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.131104, 9.568251 ], [ 138.131104, 9.579084 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -65,19 +65,19 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.541166 ], [ 138.229980, 9.562834 ], [ 138.229980, 9.552000 ], [ 138.208008, 9.530332 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 15, "y": 8 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.384519 ], [ 173.930054, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 15, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.384519 ], [ 173.930054, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -95,7 +95,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 28, "y": 15 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.538458 ], [ 138.229980, 9.560126 ], [ 138.229980, 9.554709 ], [ 138.208008, 9.533040 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -143,7 +143,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 6, "x": 56, "y": 30 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.537103 ], [ 138.229980, 9.558772 ], [ 138.229980, 9.556063 ], [ 138.208008, 9.534395 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -155,13 +155,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 6, "x": 62, "y": 31 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.392758 ], [ 173.934174, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 1, "y": 65 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -174.550781, -4.653080 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.528809, -4.674980 ], [ -174.550781, -4.653080 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -174.550781, -4.631179 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.550781, -4.696879 ], [ -174.550781, -4.631179 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -173,7 +173,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 8, "y": 66 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -155.939941, -5.594118 ], [ -155.895996, -5.594118 ], [ -155.895996, -5.637853 ], [ -155.939941, -5.637853 ], [ -155.939941, -5.594118 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -155.852051, -5.594118 ], [ -155.852051, -5.637853 ], [ -155.939941, -5.637853 ], [ -155.939941, -5.594118 ], [ -155.852051, -5.594118 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -185,25 +185,25 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 10, "y": 67 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -150.227051, -9.990491 ], [ -150.227051, -10.012130 ], [ -150.249023, -9.990491 ], [ -150.227051, -9.990491 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -150.227051, -9.990491 ], [ -150.227051, -10.012130 ], [ -150.249023, -10.012130 ], [ -150.249023, -9.990491 ], [ -150.227051, -9.990491 ] ] ], [ [ [ -150.183105, -9.947209 ], [ -150.183105, -9.968851 ], [ -150.205078, -9.968851 ], [ -150.205078, -9.947209 ], [ -150.183105, -9.947209 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 113, "y": 60 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 138.164062, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ] ] ], [ [ [ 140.537109, 9.774025 ], [ 140.515137, 9.752370 ], [ 140.515137, 9.774025 ], [ 140.537109, 9.774025 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.229980, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.208008, 9.492408 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.120117, 9.535749 ], [ 138.120117, 9.579084 ], [ 138.142090, 9.579084 ], [ 138.186035, 9.579084 ] ], [ [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.557417 ], [ 138.142090, 9.579084 ] ] ], [ [ [ 140.537109, 9.774025 ], [ 140.515137, 9.752370 ], [ 140.515137, 9.774025 ], [ 140.537109, 9.774025 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 115, "y": 61 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.340675 ], [ 143.898926, 7.340675 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 143.876953, 7.384258 ], [ 143.876953, 7.362467 ], [ 143.811035, 7.362467 ], [ 143.811035, 7.384258 ], [ 143.876953, 7.384258 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 125, "y": 63 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.386230, 0.241699 ], [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.241699 ] ] ], [ [ [ 173.342285, 0.285643 ], [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.241699 ], [ 173.342285, 0.285643 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
}, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.208008, 9.622414 ], [ 138.208008, 9.535749 ], [ 138.120117, 9.535749 ], [ 138.120117, 9.622414 ], [ 138.208008, 9.622414 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.164062, 9.579084 ], [ 138.251953, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.164062, 9.579084 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -27,7 +27,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 3, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.942871, 7.406048 ], [ 143.942871, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.898926, 7.406048 ], [ 143.942871, 7.406048 ] ] ], [ [ [ 138.164062, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.942871, 7.406048 ], [ 143.942871, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.898926, 7.406048 ], [ 143.942871, 7.406048 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.229980, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.208008, 9.492408 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.120117, 9.535749 ], [ 138.120117, 9.579084 ], [ 138.142090, 9.579084 ], [ 138.186035, 9.579084 ] ], [ [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.557417 ], [ 138.142090, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -39,15 +39,15 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 7, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.353271, 0.274657 ], [ 173.353271, 0.252685 ], [ 173.331299, 0.252685 ], [ 173.331299, 0.274657 ], [ 173.353271, 0.274657 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.353271, 0.274657 ], [ 173.353271, 0.252685 ], [ 173.331299, 0.252685 ], [ 173.331299, 0.274657 ], [ 173.353271, 0.274657 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.924561, 0.307616 ], [ 173.935547, 0.329588 ], [ 173.935547, 0.373533 ], [ 173.924561, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 7, "y": 3 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.353271, 0.274657 ], [ 173.353271, 0.252685 ], [ 173.331299, 0.252685 ], [ 173.331299, 0.274657 ], [ 173.353271, 0.274657 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.353271, 0.274657 ], [ 173.353271, 0.252685 ], [ 173.331299, 0.252685 ], [ 173.331299, 0.274657 ], [ 173.353271, 0.274657 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.924561, 0.307616 ], [ 173.935547, 0.329588 ], [ 173.935547, 0.373533 ], [ 173.924561, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.131104, 9.568251 ], [ 138.131104, 9.579084 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -65,19 +65,19 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.541166 ], [ 138.229980, 9.562834 ], [ 138.229980, 9.552000 ], [ 138.208008, 9.530332 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 15, "y": 8 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.384519 ], [ 173.930054, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 15, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.384519 ], [ 173.930054, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -95,7 +95,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 28, "y": 15 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.538458 ], [ 138.229980, 9.560126 ], [ 138.229980, 9.554709 ], [ 138.208008, 9.533040 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -143,7 +143,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 6, "x": 56, "y": 30 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.537103 ], [ 138.229980, 9.558772 ], [ 138.229980, 9.556063 ], [ 138.208008, 9.534395 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -155,13 +155,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 6, "x": 62, "y": 31 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.392758 ], [ 173.934174, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 113, "y": 60 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.164062, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.229980, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.208008, 9.492408 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.120117, 9.535749 ], [ 138.120117, 9.579084 ], [ 138.142090, 9.579084 ], [ 138.186035, 9.579084 ] ], [ [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.557417 ], [ 138.142090, 9.579084 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
|
||||
@@ -14,21 +14,21 @@
|
||||
}, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -174.462891, -4.653080 ], [ -174.462891, -4.740675 ], [ -174.550781, -4.653080 ], [ -174.462891, -4.653080 ] ] ], [ [ [ 185.537109, -4.653080 ], [ 185.537109, -4.740675 ], [ 185.449219, -4.653080 ], [ 185.537109, -4.653080 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -150.117188, -9.968851 ], [ -150.117188, -10.055403 ], [ -150.292969, -10.055403 ], [ -150.292969, -9.968851 ], [ -150.117188, -9.968851 ] ] ], [ [ [ -174.550781, -4.565474 ], [ -174.462891, -4.653080 ], [ -174.462891, -4.740675 ], [ -174.550781, -4.740675 ], [ -174.550781, -4.565474 ] ] ], [ [ [ 185.449219, -4.565474 ], [ 185.537109, -4.653080 ], [ 185.537109, -4.740675 ], [ 185.449219, -4.740675 ], [ 185.449219, -4.565474 ] ] ], [ [ [ 173.583984, 0.263671 ], [ 173.583984, 0.087891 ], [ 173.496094, 0.087891 ], [ 173.496094, 0.263671 ], [ 173.583984, 0.263671 ] ] ], [ [ [ 173.408203, 0.351560 ], [ 173.408203, 0.175781 ], [ 173.320312, 0.175781 ], [ 173.320312, 0.351560 ], [ 173.408203, 0.351560 ] ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.251953, 9.535749 ], [ 138.076172, 9.362353 ], [ 138.164062, 9.535749 ], [ 138.251953, 9.535749 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.964844, 7.362467 ], [ 143.964844, 7.275292 ], [ 143.876953, 7.275292 ], [ 143.876953, 7.362467 ], [ 143.964844, 7.362467 ] ] ], [ [ [ 138.251953, 9.535749 ], [ 138.076172, 9.362353 ], [ 138.164062, 9.535749 ], [ 138.251953, 9.535749 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -165.014648, -5.878332 ], [ -164.970703, -5.878332 ], [ -164.970703, -5.965754 ], [ -165.014648, -5.965754 ], [ -165.014648, -5.878332 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -150.161133, -9.925566 ], [ -150.161133, -9.968851 ], [ -150.205078, -9.968851 ], [ -150.205078, -10.012130 ], [ -150.249023, -10.012130 ], [ -150.249023, -9.925566 ], [ -150.161133, -9.925566 ] ] ], [ [ [ -174.550781, -4.609278 ], [ -174.506836, -4.653080 ], [ -174.506836, -4.740675 ], [ -174.550781, -4.740675 ], [ -174.550781, -4.609278 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -171.079102, -3.118576 ], [ -171.035156, -3.118576 ], [ -171.035156, -3.162456 ], [ -171.079102, -3.162456 ], [ -171.079102, -3.118576 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -171.035156, -3.118576 ], [ -171.035156, -3.162456 ], [ -171.123047, -3.162456 ], [ -171.123047, -3.118576 ], [ -171.035156, -3.118576 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -40,55 +40,55 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 173.935547, 0.395505 ], [ 173.979492, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.263671 ], [ 173.408203, 0.219726 ], [ 173.452148, 0.219726 ], [ 173.452148, 0.175781 ], [ 173.364258, 0.175781 ], [ 173.364258, 0.219726 ], [ 173.320312, 0.219726 ], [ 173.320312, 0.263671 ], [ 173.408203, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.979492, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.164062, 9.579084 ], [ 138.251953, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.164062, 9.579084 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.362467 ], [ 143.920898, 7.318882 ], [ 143.876953, 7.318882 ], [ 143.876953, 7.362467 ], [ 143.920898, 7.362467 ] ] ], [ [ [ 138.164062, 9.579084 ], [ 138.251953, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.164062, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 2 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -150.227051, -9.990491 ], [ -150.227051, -10.012130 ], [ -150.249023, -9.990491 ], [ -150.227051, -9.990491 ] ] ], [ [ [ -174.550781, -4.653080 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.528809, -4.674980 ], [ -174.550781, -4.653080 ] ] ], [ [ [ -171.254883, -4.434044 ], [ -171.232910, -4.455951 ], [ -171.232910, -4.477856 ], [ -171.254883, -4.434044 ] ] ], [ [ [ -171.079102, -3.118576 ], [ -171.079102, -3.140516 ], [ -171.101074, -3.140516 ], [ -171.079102, -3.118576 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -150.227051, -9.990491 ], [ -150.227051, -10.012130 ], [ -150.249023, -10.012130 ], [ -150.249023, -9.990491 ], [ -150.227051, -9.990491 ] ] ], [ [ [ -150.183105, -9.947209 ], [ -150.183105, -9.968851 ], [ -150.205078, -9.968851 ], [ -150.205078, -9.947209 ], [ -150.183105, -9.947209 ] ] ], [ [ [ -174.550781, -4.631179 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.550781, -4.696879 ], [ -174.550781, -4.631179 ] ] ], [ [ [ -171.254883, -4.434044 ], [ -171.232910, -4.455951 ], [ -171.232910, -4.477856 ], [ -171.254883, -4.434044 ] ] ], [ [ [ -171.079102, -3.118576 ], [ -171.079102, -3.140516 ], [ -171.101074, -3.140516 ], [ -171.079102, -3.118576 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 3, "y": 2 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.386230, 0.241699 ], [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.241699 ] ] ], [ [ [ 173.342285, 0.285643 ], [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.241699 ], [ 173.342285, 0.285643 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 3, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.386230, 0.241699 ], [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.241699 ] ] ], [ [ [ 173.342285, 0.285643 ], [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.241699 ], [ 173.342285, 0.285643 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.164062, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.340675 ], [ 143.898926, 7.340675 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 143.876953, 7.384258 ], [ 143.876953, 7.362467 ], [ 143.811035, 7.362467 ], [ 143.811035, 7.384258 ], [ 143.876953, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.229980, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.208008, 9.492408 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.120117, 9.535749 ], [ 138.120117, 9.579084 ], [ 138.142090, 9.579084 ], [ 138.186035, 9.579084 ] ], [ [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.557417 ], [ 138.142090, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 0, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -150.227051, -9.990491 ], [ -150.227051, -10.012130 ], [ -150.249023, -10.012130 ], [ -150.249023, -9.990491 ], [ -150.227051, -9.990491 ] ] ], [ [ [ -155.852051, -5.615986 ], [ -155.874023, -5.637853 ], [ -155.917969, -5.637853 ], [ -155.939941, -5.615986 ], [ -155.852051, -5.615986 ] ] ], [ [ [ -174.517822, -4.674980 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.517822, -4.674980 ] ] ], [ [ [ -171.254883, -4.434044 ], [ -171.232910, -4.455951 ], [ -171.232910, -4.477856 ], [ -171.254883, -4.477856 ], [ -171.254883, -4.434044 ] ] ], [ [ [ -171.079102, -3.118576 ], [ -171.079102, -3.140516 ], [ -171.101074, -3.140516 ], [ -171.079102, -3.118576 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -150.227051, -9.990491 ], [ -150.227051, -10.012130 ], [ -150.249023, -10.012130 ], [ -150.249023, -9.990491 ], [ -150.227051, -9.990491 ] ] ], [ [ [ -155.852051, -5.615986 ], [ -155.874023, -5.637853 ], [ -155.917969, -5.637853 ], [ -155.939941, -5.615986 ], [ -155.852051, -5.615986 ] ] ], [ [ [ -174.517822, -4.653080 ], [ -174.495850, -4.696879 ], [ -174.517822, -4.696879 ], [ -174.517822, -4.685930 ], [ -174.550781, -4.685930 ], [ -174.550781, -4.653080 ], [ -174.528809, -4.664030 ], [ -174.517822, -4.664030 ], [ -174.528809, -4.653080 ], [ -174.517822, -4.653080 ] ] ], [ [ [ -171.254883, -4.434044 ], [ -171.232910, -4.455951 ], [ -171.232910, -4.477856 ], [ -171.254883, -4.477856 ], [ -171.254883, -4.434044 ] ] ], [ [ [ -171.079102, -3.118576 ], [ -171.079102, -3.140516 ], [ -171.101074, -3.140516 ], [ -171.079102, -3.118576 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 7, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.924561, 0.307616 ], [ 173.935547, 0.329588 ], [ 173.935547, 0.373533 ], [ 173.924561, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 7, "y": 3 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.924561, 0.307616 ], [ 173.935547, 0.329588 ], [ 173.935547, 0.373533 ], [ 173.924561, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.340675 ], [ 143.909912, 7.340675 ], [ 143.909912, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.131104, 9.568251 ], [ 138.131104, 9.579084 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 0, "y": 8 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -174.528809, -4.674980 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.528809, -4.674980 ] ] ], [ [ [ -171.254883, -4.434044 ], [ -171.232910, -4.455951 ], [ -171.232910, -4.477856 ], [ -171.254883, -4.477856 ], [ -171.254883, -4.434044 ] ] ], [ [ [ -171.079102, -3.118576 ], [ -171.079102, -3.140516 ], [ -171.101074, -3.140516 ], [ -171.079102, -3.118576 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -174.523315, -4.653080 ], [ -174.523315, -4.674980 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.512329, -4.696879 ], [ -174.512329, -4.691404 ], [ -174.523315, -4.680455 ], [ -174.550781, -4.680455 ], [ -174.550781, -4.669505 ], [ -174.539795, -4.669505 ], [ -174.550781, -4.658555 ], [ -174.550781, -4.653080 ], [ -174.534302, -4.669505 ], [ -174.528809, -4.669505 ], [ -174.528809, -4.653080 ], [ -174.523315, -4.653080 ] ] ], [ [ [ -171.254883, -4.434044 ], [ -171.232910, -4.455951 ], [ -171.232910, -4.477856 ], [ -171.254883, -4.477856 ], [ -171.254883, -4.434044 ] ] ], [ [ [ -171.079102, -3.118576 ], [ -171.079102, -3.140516 ], [ -171.101074, -3.140516 ], [ -171.079102, -3.118576 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -100,25 +100,25 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.541166 ], [ 138.229980, 9.562834 ], [ 138.229980, 9.552000 ], [ 138.208008, 9.530332 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 15, "y": 8 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.384519 ], [ 173.930054, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 15, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.384519 ], [ 173.930054, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 0, "y": 16 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -174.528809, -4.674980 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.528809, -4.674980 ] ] ], [ [ [ -171.254883, -4.434044 ], [ -171.232910, -4.455951 ], [ -171.232910, -4.477856 ], [ -171.254883, -4.477856 ], [ -171.254883, -4.434044 ] ] ], [ [ [ -171.079102, -3.118576 ], [ -171.079102, -3.140516 ], [ -171.101074, -3.140516 ], [ -171.079102, -3.118576 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -174.526062, -4.653080 ], [ -174.526062, -4.674980 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.509583, -4.696879 ], [ -174.509583, -4.694142 ], [ -174.526062, -4.677717 ], [ -174.550781, -4.677717 ], [ -174.550781, -4.672242 ], [ -174.534302, -4.672242 ], [ -174.550781, -4.655817 ], [ -174.550781, -4.653080 ], [ -174.531555, -4.672242 ], [ -174.528809, -4.672242 ], [ -174.528809, -4.653080 ], [ -174.526062, -4.653080 ] ] ], [ [ [ -171.254883, -4.434044 ], [ -171.232910, -4.455951 ], [ -171.232910, -4.477856 ], [ -171.254883, -4.477856 ], [ -171.254883, -4.434044 ] ] ], [ [ [ -171.079102, -3.118576 ], [ -171.079102, -3.140516 ], [ -171.101074, -3.140516 ], [ -171.079102, -3.118576 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -130,7 +130,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 5, "x": 28, "y": 15 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.538458 ], [ 138.229980, 9.560126 ], [ 138.229980, 9.554709 ], [ 138.208008, 9.533040 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -148,7 +148,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 6, "x": 0, "y": 32 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -174.528809, -4.674980 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.528809, -4.674980 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -174.527435, -4.653080 ], [ -174.527435, -4.674980 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.508209, -4.696879 ], [ -174.508209, -4.695510 ], [ -174.527435, -4.676349 ], [ -174.550781, -4.676349 ], [ -174.550781, -4.673611 ], [ -174.531555, -4.673611 ], [ -174.550781, -4.654449 ], [ -174.550781, -4.653080 ], [ -174.530182, -4.673611 ], [ -174.528809, -4.673611 ], [ -174.528809, -4.653080 ], [ -174.527435, -4.653080 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -178,7 +178,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 6, "x": 56, "y": 30 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.208008, 9.535749 ], [ 138.208008, 9.537103 ], [ 138.229980, 9.558772 ], [ 138.229980, 9.556063 ], [ 138.208008, 9.534395 ], [ 138.208008, 9.514079 ], [ 138.186035, 9.514079 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.514079 ], [ 138.164062, 9.535749 ], [ 138.142090, 9.514079 ], [ 138.076172, 9.427387 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.076172, 9.470736 ], [ 138.098145, 9.492408 ], [ 138.098145, 9.514079 ], [ 138.120117, 9.514079 ], [ 138.120117, 9.557417 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.557417 ], [ 138.164062, 9.557417 ], [ 138.164062, 9.579084 ], [ 138.186035, 9.579084 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -190,13 +190,13 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 6, "x": 62, "y": 31 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.957520, 0.329588 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.392758 ], [ 173.934174, 0.395505 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 1, "y": 65 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -174.550781, -4.653080 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.528809, -4.674980 ], [ -174.550781, -4.653080 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -174.550781, -4.631179 ], [ -174.506836, -4.674980 ], [ -174.506836, -4.696879 ], [ -174.550781, -4.696879 ], [ -174.550781, -4.631179 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -208,7 +208,7 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 8, "y": 66 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -155.939941, -5.594118 ], [ -155.895996, -5.594118 ], [ -155.895996, -5.637853 ], [ -155.939941, -5.637853 ], [ -155.939941, -5.594118 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -155.852051, -5.594118 ], [ -155.852051, -5.637853 ], [ -155.939941, -5.637853 ], [ -155.939941, -5.594118 ], [ -155.852051, -5.594118 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
@@ -220,25 +220,25 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 10, "y": 67 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -150.227051, -9.990491 ], [ -150.227051, -10.012130 ], [ -150.249023, -9.990491 ], [ -150.227051, -9.990491 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -150.227051, -9.990491 ], [ -150.227051, -10.012130 ], [ -150.249023, -10.012130 ], [ -150.249023, -9.990491 ], [ -150.227051, -9.990491 ] ] ], [ [ [ -150.183105, -9.947209 ], [ -150.183105, -9.968851 ], [ -150.205078, -9.968851 ], [ -150.205078, -9.947209 ], [ -150.183105, -9.947209 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 113, "y": 60 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 138.164062, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.579084 ] ] ], [ [ [ 140.537109, 9.774025 ], [ 140.515137, 9.752370 ], [ 140.515137, 9.774025 ], [ 140.537109, 9.774025 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 138.186035, 9.579084 ], [ 138.186035, 9.535749 ], [ 138.229980, 9.557417 ], [ 138.229980, 9.535749 ], [ 138.208008, 9.514079 ], [ 138.208008, 9.492408 ], [ 138.186035, 9.492408 ], [ 138.164062, 9.535749 ], [ 138.076172, 9.405710 ], [ 138.054199, 9.405710 ], [ 138.054199, 9.427387 ], [ 138.120117, 9.535749 ], [ 138.120117, 9.579084 ], [ 138.142090, 9.579084 ], [ 138.186035, 9.579084 ] ], [ [ 138.142090, 9.579084 ], [ 138.142090, 9.535749 ], [ 138.164062, 9.557417 ], [ 138.142090, 9.579084 ] ] ], [ [ [ 140.537109, 9.774025 ], [ 140.515137, 9.752370 ], [ 140.515137, 9.774025 ], [ 140.537109, 9.774025 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 115, "y": 61 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.362467 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "FSM-4943", "OBJECTID_1": 6464, "diss_me": 4943, "adm1_cod_1": "FSM-4943", "iso_3166_2": "FM-YAP", "wikipedia": "http://en.wikipedia.org/wiki/Yap_State", "iso_a2": "FM", "adm0_sr": 5, "name": "Yap", "code_hasc": "FM.YA", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 scale rank", "name_len": 3, "mapcolor9": 4, "mapcolor13": 13, "fips": "FM04", "woe_id": 2345343, "woe_label": "Yap, FM, Federated States of Micronesia", "woe_name": "Yap", "latitude": 9.581009, "longitude": 138.114, "sov_a3": "FSM", "adm0_a3": "FSM", "adm0_label": 5, "admin": "Federated States of Micronesia", "geonunit": "Federated States of Micronesia", "gu_a3": "FSM", "gn_id": 2081175, "gn_name": "State of Yap", "gns_id": -3741502, "gns_name": "Yap, State of", "gn_level": 1, "gn_a1_code": "FM.04", "gns_level": 1, "gns_adm1": "FM04" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 143.920898, 7.384258 ], [ 143.920898, 7.340675 ], [ 143.898926, 7.340675 ], [ 143.898926, 7.362467 ], [ 143.920898, 7.384258 ] ] ], [ [ [ 143.876953, 7.384258 ], [ 143.876953, 7.362467 ], [ 143.811035, 7.362467 ], [ 143.811035, 7.384258 ], [ 143.876953, 7.384258 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 125, "y": 63 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 128 }, "features": [
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.219726 ], [ 173.408203, 0.219726 ] ] ], [ [ [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.263671 ], [ 173.364258, 0.263671 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "adm1_code": "KIR+99?", "OBJECTID_1": 3643, "diss_me": 10097, "adm1_cod_1": "KIR+99?", "iso_3166_2": "KI-", "iso_a2": "KI", "adm0_sr": 5, "code_hasc": "-99", "note": "KIR-99 (Kiribati minor island)", "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 11, "datarank": 11, "area_sqkm": 0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 minor island", "name_len": 0, "mapcolor9": 6, "mapcolor13": 12, "woe_id": -99, "latitude": -4.689669, "longitude": -174.511, "sov_a3": "KIR", "adm0_a3": "KIR", "adm0_label": 7, "admin": "Kiribati", "geonunit": "Kiribati", "gu_a3": "KIR", "gn_id": 0, "gns_id": 0, "gn_level": 0, "gn_a1_code": "KI.", "gns_level": 0 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 173.386230, 0.241699 ], [ 173.408203, 0.219726 ], [ 173.408203, 0.197754 ], [ 173.386230, 0.197754 ], [ 173.386230, 0.241699 ] ] ], [ [ [ 173.342285, 0.285643 ], [ 173.364258, 0.263671 ], [ 173.364258, 0.241699 ], [ 173.342285, 0.241699 ], [ 173.342285, 0.285643 ] ] ], [ [ [ 173.935547, 0.395505 ], [ 173.957520, 0.351560 ], [ 173.935547, 0.307616 ], [ 173.935547, 0.395505 ] ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
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 it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@
|
||||
"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}]",
|
||||
"strategies": "[{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":260},{\"tiny_polygons\":258},{\"tiny_polygons\":255},{\"tiny_polygons\":245},{\"tiny_polygons\":150},{\"tiny_polygons\":69},{\"tiny_polygons\":45}]",
|
||||
"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
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,2 @@
|
||||
{"type":"Feature","id":1,"tippecanoe":{"minzoom":10},"properties":{"depth":10},"geometry":{"type":"Point","coordinates":[0.05,0.05]}}
|
||||
{"type":"Feature","id":2,"tippecanoe":{"minzoom":11},"properties":{"depth":11},"geometry":{"type":"Point","coordinates":[0.06,0.06]}}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"antimeridian_adjusted_bounds": "0.050000,0.050000,0.060000,0.060000",
|
||||
"bounds": "0.050000,0.050000,0.060000,0.060000",
|
||||
"center": "0.060000,0.060000,11",
|
||||
"description": "tests/minzoom-variable-depth/out/-Z10_-z11_--generate-variable-depth-tile-pyramid.json.check.mbtiles",
|
||||
"format": "pbf",
|
||||
"generator_options": "./tippecanoe -q -a@ -f -o tests/minzoom-variable-depth/out/-Z10_-z11_--generate-variable-depth-tile-pyramid.json.check.mbtiles -Z10 -z11 --generate-variable-depth-tile-pyramid tests/minzoom-variable-depth/in.json",
|
||||
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":10,\"maxzoom\":11,\"fields\":{\"depth\":\"Number\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":2,\"geometry\":\"Point\",\"attributeCount\":1,\"attributes\":[{\"attribute\":\"depth\",\"count\":2,\"type\":\"number\",\"values\":[10,11],\"min\":10,\"max\":11}]}]}}",
|
||||
"maxzoom": "11",
|
||||
"minzoom": "10",
|
||||
"name": "tests/minzoom-variable-depth/out/-Z10_-z11_--generate-variable-depth-tile-pyramid.json.check.mbtiles",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 10, "x": 512, "y": 511 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "id": 1, "properties": { "depth": 10 }, "geometry": { "type": "Point", "coordinates": [ 0.050039, 0.049953 ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 11, "x": 1024, "y": 1023 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "id": 1, "properties": { "depth": 10 }, "geometry": { "type": "Point", "coordinates": [ 0.049996, 0.049996 ] } }
|
||||
,
|
||||
{ "type": "Feature", "id": 2, "properties": { "depth": 11 }, "geometry": { "type": "Point", "coordinates": [ 0.059996, 0.059996 ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+49
-49
File diff suppressed because one or more lines are too long
@@ -40,11 +40,11 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 5, "sovereignt": "Republic of Serbia", "sov_a3": "SRB", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Republic of Serbia", "adm0_a3": "SRB", "geou_dif": 0, "geounit": "Republic of Serbia", "gu_a3": "SRB", "su_dif": 0, "subunit": "Republic of Serbia", "su_a3": "SRB", "brk_diff": 0, "name": "Serbia", "name_long": "Serbia", "brk_a3": "SRB", "brk_name": "Serbia", "abbrev": "Serb.", "postal": "RS", "formal_en": "Republic of Serbia", "name_sort": "Serbia", "mapcolor7": 3, "mapcolor8": 3, "mapcolor9": 2, "mapcolor13": 10, "pop_est": 7379339, "gdp_md_est": 80340, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "RS", "iso_a3": "SRB", "iso_n3": "688", "un_a3": "688", "wb_a2": "YF", "wb_a3": "SRB", "woe_id": -99, "adm0_a3_is": "SRB", "adm0_a3_us": "SRB", "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": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 19.596863, 46.172223 ], [ 20.220337, 46.126556 ], [ 20.761414, 45.734943 ], [ 20.874023, 45.415804 ], [ 21.483765, 45.182037 ], [ 21.560669, 44.768187 ], [ 22.145691, 44.478871 ], [ 22.458801, 44.701850 ], [ 22.500000, 44.680372 ], [ 22.705994, 44.578730 ], [ 22.500000, 44.425934 ], [ 22.475281, 44.408278 ], [ 22.656555, 44.235360 ], [ 22.500000, 44.091531 ], [ 22.409363, 44.008620 ], [ 22.500000, 43.642038 ], [ 22.719727, 43.446937 ], [ 22.719727, 42.992595 ], [ 22.604370, 42.898101 ], [ 22.500000, 42.700604 ], [ 22.436829, 42.579377 ], [ 22.500000, 42.510577 ], [ 22.543945, 42.461967 ], [ 22.500000, 42.423457 ], [ 22.381897, 42.319970 ], [ 21.917725, 42.303722 ], [ 21.577148, 42.244785 ], [ 21.544189, 42.319970 ], [ 21.662292, 42.439674 ], [ 21.774902, 42.682435 ], [ 21.632080, 42.676378 ], [ 21.439819, 42.861873 ], [ 21.275024, 42.910172 ], [ 21.143188, 43.068888 ], [ 20.956421, 43.131057 ], [ 20.813599, 43.271206 ], [ 20.635071, 43.217187 ], [ 20.497742, 42.884015 ], [ 20.258789, 42.813537 ], [ 20.338440, 42.898101 ], [ 19.959412, 43.106999 ], [ 19.629822, 43.213183 ], [ 19.484253, 43.353144 ], [ 19.217834, 43.524655 ], [ 19.454041, 43.568452 ], [ 19.599609, 44.038244 ], [ 19.118958, 44.423973 ], [ 19.368896, 44.863656 ], [ 19.006348, 44.859763 ], [ 19.390869, 45.236218 ], [ 19.072266, 45.521744 ], [ 18.830566, 45.909122 ], [ 19.596863, 46.172223 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Poland", "sov_a3": "POL", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Poland", "adm0_a3": "POL", "geou_dif": 0, "geounit": "Poland", "gu_a3": "POL", "su_dif": 0, "subunit": "Poland", "su_a3": "POL", "brk_diff": 0, "name": "Poland", "name_long": "Poland", "brk_a3": "POL", "brk_name": "Poland", "abbrev": "Pol.", "postal": "PL", "formal_en": "Republic of Poland", "name_sort": "Poland", "mapcolor7": 3, "mapcolor8": 7, "mapcolor9": 1, "mapcolor13": 2, "pop_est": 38482919, "gdp_md_est": 667900, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "2. Developed region: nonG7", "income_grp": "1. High income: OECD", "wikipedia": -99, "iso_a2": "PL", "iso_a3": "POL", "iso_n3": "616", "un_a3": "616", "wb_a2": "PL", "wb_a3": "POL", "woe_id": -99, "adm0_a3_is": "POL", "adm0_a3_us": "POL", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Eastern Europe", "region_wb": "Europe & Central Asia", "name_len": 6, "long_len": 6, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 22.719727, 49.066668 ], [ 22.719727, 49.043269 ], [ 22.631836, 49.066668 ], [ 22.719727, 49.066668 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Poland", "sov_a3": "POL", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Poland", "adm0_a3": "POL", "geou_dif": 0, "geounit": "Poland", "gu_a3": "POL", "su_dif": 0, "subunit": "Poland", "su_a3": "POL", "brk_diff": 0, "name": "Poland", "name_long": "Poland", "brk_a3": "POL", "brk_name": "Poland", "abbrev": "Pol.", "postal": "PL", "formal_en": "Republic of Poland", "name_sort": "Poland", "mapcolor7": 3, "mapcolor8": 7, "mapcolor9": 1, "mapcolor13": 2, "pop_est": 38482919, "gdp_md_est": 667900, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "2. Developed region: nonG7", "income_grp": "1. High income: OECD", "wikipedia": -99, "iso_a2": "PL", "iso_a3": "POL", "iso_n3": "616", "un_a3": "616", "wb_a2": "PL", "wb_a3": "POL", "woe_id": -99, "adm0_a3_is": "POL", "adm0_a3_us": "POL", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Eastern Europe", "region_wb": "Europe & Central Asia", "name_len": 6, "long_len": 6, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 22.631836, 49.068468 ], [ 22.637329, 49.066668 ], [ 22.719727, 49.066668 ], [ 22.719727, 49.043269 ], [ 22.631836, 49.066668 ], [ 22.631836, 49.068468 ] ] ] } }
|
||||
,
|
||||
{ "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": [ [ [ 22.719727, 47.885039 ], [ 22.719727, 44.144769 ], [ 22.656555, 44.235360 ], [ 22.475281, 44.408278 ], [ 22.500000, 44.425934 ], [ 22.705994, 44.578730 ], [ 22.500000, 44.680372 ], [ 22.458801, 44.701850 ], [ 22.145691, 44.478871 ], [ 21.560669, 44.768187 ], [ 21.483765, 45.182037 ], [ 20.874023, 45.415804 ], [ 20.761414, 45.734943 ], [ 20.220337, 46.126556 ], [ 21.022339, 46.316584 ], [ 21.626587, 46.993368 ], [ 22.098999, 47.672786 ], [ 22.500000, 47.809465 ], [ 22.711487, 47.881355 ], [ 22.719727, 47.885039 ] ] ] } }
|
||||
{ "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": [ [ [ 22.719727, 47.885039 ], [ 22.719727, 44.144769 ], [ 22.716980, 44.144769 ], [ 22.716980, 44.148710 ], [ 22.656555, 44.235360 ], [ 22.475281, 44.408278 ], [ 22.500000, 44.425934 ], [ 22.705994, 44.578730 ], [ 22.500000, 44.680372 ], [ 22.458801, 44.701850 ], [ 22.145691, 44.478871 ], [ 21.560669, 44.768187 ], [ 21.483765, 45.182037 ], [ 20.874023, 45.415804 ], [ 20.761414, 45.734943 ], [ 20.220337, 46.126556 ], [ 21.022339, 46.316584 ], [ 21.626587, 46.993368 ], [ 22.098999, 47.672786 ], [ 22.500000, 47.809465 ], [ 22.711487, 47.881355 ], [ 22.716980, 47.883197 ], [ 22.716980, 47.885039 ], [ 22.719727, 47.885039 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Bulgaria", "sov_a3": "BGR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Bulgaria", "adm0_a3": "BGR", "geou_dif": 0, "geounit": "Bulgaria", "gu_a3": "BGR", "su_dif": 0, "subunit": "Bulgaria", "su_a3": "BGR", "brk_diff": 0, "name": "Bulgaria", "name_long": "Bulgaria", "brk_a3": "BGR", "brk_name": "Bulgaria", "abbrev": "Bulg.", "postal": "BG", "formal_en": "Republic of Bulgaria", "name_sort": "Bulgaria", "mapcolor7": 4, "mapcolor8": 5, "mapcolor9": 1, "mapcolor13": 8, "pop_est": 7204687, "gdp_md_est": 93750, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "2. Developed region: nonG7", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "BG", "iso_a3": "BGR", "iso_n3": "100", "un_a3": "100", "wb_a2": "BG", "wb_a3": "BGR", "woe_id": -99, "adm0_a3_is": "BGR", "adm0_a3_us": "BGR", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Eastern Europe", "region_wb": "Europe & Central Asia", "name_len": 8, "long_len": 8, "abbrev_len": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 22.719727, 42.992595 ], [ 22.719727, 42.102298 ], [ 22.500000, 42.244785 ], [ 22.381897, 42.319970 ], [ 22.500000, 42.423457 ], [ 22.543945, 42.461967 ], [ 22.500000, 42.510577 ], [ 22.436829, 42.579377 ], [ 22.500000, 42.700604 ], [ 22.604370, 42.898101 ], [ 22.719727, 42.992595 ] ] ], [ [ [ 22.719727, 43.446937 ], [ 22.500000, 43.642038 ], [ 22.409363, 44.008620 ], [ 22.500000, 44.091531 ], [ 22.656555, 44.235360 ], [ 22.719727, 44.144769 ], [ 22.719727, 43.446937 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Bulgaria", "sov_a3": "BGR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Bulgaria", "adm0_a3": "BGR", "geou_dif": 0, "geounit": "Bulgaria", "gu_a3": "BGR", "su_dif": 0, "subunit": "Bulgaria", "su_a3": "BGR", "brk_diff": 0, "name": "Bulgaria", "name_long": "Bulgaria", "brk_a3": "BGR", "brk_name": "Bulgaria", "abbrev": "Bulg.", "postal": "BG", "formal_en": "Republic of Bulgaria", "name_sort": "Bulgaria", "mapcolor7": 4, "mapcolor8": 5, "mapcolor9": 1, "mapcolor13": 8, "pop_est": 7204687, "gdp_md_est": 93750, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "2. Developed region: nonG7", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "BG", "iso_a3": "BGR", "iso_n3": "100", "un_a3": "100", "wb_a2": "BG", "wb_a3": "BGR", "woe_id": -99, "adm0_a3_is": "BGR", "adm0_a3_us": "BGR", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Eastern Europe", "region_wb": "Europe & Central Asia", "name_len": 8, "long_len": 8, "abbrev_len": 5, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 22.656555, 44.235360 ], [ 22.719727, 44.144769 ], [ 22.719727, 43.448931 ], [ 22.722473, 43.446937 ], [ 22.719727, 43.446937 ], [ 22.719727, 42.992595 ], [ 22.722473, 42.992595 ], [ 22.719727, 42.990586 ], [ 22.719727, 42.102298 ], [ 22.716980, 42.102298 ], [ 22.716980, 42.104336 ], [ 22.500000, 42.244785 ], [ 22.381897, 42.319970 ], [ 22.500000, 42.423457 ], [ 22.543945, 42.461967 ], [ 22.500000, 42.510577 ], [ 22.436829, 42.579377 ], [ 22.500000, 42.700604 ], [ 22.604370, 42.898101 ], [ 22.716980, 42.990586 ], [ 22.716980, 43.448931 ], [ 22.500000, 43.642038 ], [ 22.409363, 44.008620 ], [ 22.500000, 44.091531 ], [ 22.656555, 44.235360 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Ukraine", "sov_a3": "UKR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Ukraine", "adm0_a3": "UKR", "geou_dif": 0, "geounit": "Ukraine", "gu_a3": "UKR", "su_dif": 0, "subunit": "Ukraine", "su_a3": "UKR", "brk_diff": 0, "name": "Ukraine", "name_long": "Ukraine", "brk_a3": "UKR", "brk_name": "Ukraine", "abbrev": "Ukr.", "postal": "UA", "formal_en": "Ukraine", "name_sort": "Ukraine", "mapcolor7": 5, "mapcolor8": 1, "mapcolor9": 6, "mapcolor13": 3, "pop_est": 45700395, "gdp_md_est": 339800, "pop_year": -99, "lastcensus": 2001, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "UA", "iso_a3": "UKR", "iso_n3": "804", "un_a3": "804", "wb_a2": "UA", "wb_a3": "UKR", "woe_id": -99, "adm0_a3_is": "UKR", "adm0_a3_us": "UKR", "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": [ [ [ 22.631836, 49.066668 ], [ 22.719727, 49.043269 ], [ 22.719727, 47.885039 ], [ 22.711487, 47.881355 ], [ 22.640076, 48.149596 ], [ 22.500000, 48.219183 ], [ 22.085266, 48.421910 ], [ 22.280273, 48.824949 ], [ 22.384644, 48.922499 ], [ 22.535706, 49.066668 ], [ 22.631836, 49.066668 ] ] ] } }
|
||||
,
|
||||
|
||||
+336
-336
File diff suppressed because one or more lines are too long
+291
-291
File diff suppressed because one or more lines are too long
+325
-325
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
File diff suppressed because one or more lines are too long
+12
-10
File diff suppressed because one or more lines are too long
+26
-24
File diff suppressed because one or more lines are too long
+57
-57
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user