Compare commits

..
1 Commits
Author SHA1 Message Date
Erica Fischer 459aef1120 Try adding --drop-sparsest-as-needed 2024-08-09 16:49:28 -07:00
40 changed files with 8445 additions and 10831 deletions
-18
View File
@@ -1,21 +1,3 @@
# 2.62.0
* Fix another bad interaction, this time between dropping-as-needed and --limit-tile-feature-count
# 2.61.0
* Added --calculate-feature-index option
* Added "count" accumulation type to --accumulate-attribute
* Work in progress on binning of point features in overzoom. Not ready for use yet.
# 2.60.0
* Fix bad interaction between --retain-points-multiplier and stopping early when the tile feature limit is reached
* Fix another bad interaction between --retain-points-multiplier, dropping-as-needed, and variable depth tile pyramids
* Add optional BUILD_INFO string to version
* Reorder overzoom logic to clip before dealing with multiplier and filters
* When --generate-variable-depth-tile-pyramid is in use, report the actual highest zoom generated as tileset maxzoom
# 2.59.0
* Correct `antimeridian_adjusted_bounds` latitude calculation when vertices extend beyond the edge of the Mercator plane
+2 -2
View File
@@ -1,7 +1,7 @@
FROM ubuntu:22.04 AS tippecanoe-builder
RUN apt-get update \
&& apt-get -y install make gcc g++ libsqlite3-dev zlib1g-dev
&& apt-get -y install build-essential libsqlite3-dev zlib1g-dev
COPY . /tmp/tippecanoe-src
WORKDIR /tmp/tippecanoe-src
@@ -13,7 +13,7 @@ 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 \
&& apt-get -y install libsqlite3-dev zlib1g-dev \
&& 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/
+4 -15
View File
@@ -1,15 +1,14 @@
PREFIX ?= /usr/local
MANDIR ?= $(PREFIX)/share/man/man1/
BUILDTYPE ?= Release
BUILD_INFO ?=
SHELL = /bin/sh
# inherit from env if set
CC := $(CC)
CXX := $(CXX)
CFLAGS := $(CFLAGS) -fPIE -DBUILD_INFO=$(BUILD_INFO)
CXXFLAGS := $(CXXFLAGS) -std=c++17 -fPIE -DBUILD_INFO=$(BUILD_INFO)
CFLAGS := $(CFLAGS) -fPIE
CXXFLAGS := $(CXXFLAGS) -std=c++17 -fPIE
LDFLAGS := $(LDFLAGS)
WARNING_FLAGS := -Wall -Wshadow -Wsign-compare -Wextra -Wunreachable-code -Wuninitialized -Wshadow
RELEASE_FLAGS := -O3 -DNDEBUG
@@ -74,10 +73,10 @@ tile-join: tile-join.o projection.o mbtiles.o mvt.o memfile.o dirtiles.o jsonpul
tippecanoe-json-tool: jsontool.o jsonpull/jsonpull.o csv.o text.o geojson-loop.o
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
unit: unit.o text.o sort.o mvt.o projection.o clip.o attribute.o jsonpull/jsonpull.o evaluator.o
unit: unit.o text.o sort.o mvt.o
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
tippecanoe-overzoom: overzoom.o mvt.o clip.o evaluator.o jsonpull/jsonpull.o text.o attribute.o read_json.o projection.o
tippecanoe-overzoom: overzoom.o mvt.o clip.o evaluator.o jsonpull/jsonpull.o text.o attribute.o
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
-include $(wildcard *.d)
@@ -361,16 +360,6 @@ overzoom-test: tippecanoe-overzoom
./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
# 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 with longitude wraparound problems
./tippecanoe-overzoom -o tests/pbf/0-0-0-pop-2-0-1.pbf.out --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
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"}'
+1 -2
View File
@@ -533,7 +533,6 @@ the same layer, enclose them in an `all` expression so they will all be evaluate
* `-ag` or `--calculate-feature-density`: Add a new attribute, `tippecanoe_feature_density`, to each feature, to record how densely features are spaced in that area of the tile. You can use this attribute in the style to produce a glowing effect where points are densely packed. It can range from 0 in the sparsest areas to 255 in the densest.
* `-ai` or `--generate-ids`: Add an `id` (a feature ID, not an attribute named `id`) to each feature that does not already have one. There is currently no guarantee that the `id` added will be stable between runs or that it will not conflict with manually-assigned feature IDs. Future versions of Tippecanoe may change the mechanism for allocating IDs.
* `-aX` or `--calculate-feature-index`: Add a `tippecanoe:index` field to each feature, giving its index in the quadkey or hilbert sequence.
### Trying to correct bad source geometry
@@ -708,7 +707,7 @@ uses md2man (`gem install md2man`).
Linux:
sudo apt-get install gcc g++ make libsqlite3-dev zlib1g-dev
sudo apt-get install build-essential libsqlite3-dev zlib1g-dev
Then build:
+1 -18
View File
@@ -23,10 +23,8 @@ void set_attribute_accum(std::unordered_map<std::string, attribute_op> &attribut
t = op_concat;
} else if (type == "comma") {
t = op_comma;
} else if (type == "count") {
t = op_count;
} else {
fprintf(stderr, "Attribute method (%s) must be sum, product, mean, max, min, concat, comma, or count\n", type.c_str());
fprintf(stderr, "Attribute method (%s) must be sum, product, mean, max, min, concat, or comma\n", type.c_str());
exit(EXIT_ARGS);
}
@@ -142,21 +140,6 @@ void preserve_attribute(attribute_op const &op, std::string const &key, serial_v
full_values[i].s += std::string(",") + val.s;
full_values[i].type = mvt_string;
break;
case op_count: {
auto state = attribute_accum_state.find(key);
if (state == attribute_accum_state.end()) { // not already present
accum_state s;
s.count = 2;
attribute_accum_state.insert(std::pair<std::string, accum_state>(key, s));
full_values[i].s = std::to_string(s.count);
} else { // already present, incrementing
state->second.count += 1;
full_values[i].s = std::to_string(state->second.count);
}
break;
}
}
}
}
-1
View File
@@ -12,7 +12,6 @@ enum attribute_op {
op_comma,
op_max,
op_min,
op_count,
};
struct accum_state {
+37 -526
View File
@@ -1,5 +1,4 @@
#include <stack>
#include <set>
#include <stdlib.h>
#include <mapbox/geometry/point.hpp>
#include <mapbox/geometry/multi_polygon.hpp>
@@ -12,7 +11,6 @@
#include "evaluator.hpp"
#include "serial.hpp"
#include "attribute.hpp"
#include "projection.hpp"
static std::vector<std::pair<double, double>> clip_poly1(std::vector<std::pair<double, double>> &geom,
long long minx, long long miny, long long maxx, long long maxy,
@@ -1021,67 +1019,11 @@ drawvec reduce_tiny_poly(drawvec const &geom, int z, int detail, bool *still_nee
return out;
}
/* pnpoly:
Copyright (c) 1970-2003, Wm. Randolph Franklin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
Redistributions in binary form must reproduce the above copyright notice in the documentation and/or other materials provided with the distribution.
The name of W. Randolph Franklin may not be used to endorse or promote products derived from this Software without specific prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
int pnpoly(const drawvec &vert, size_t start, size_t nvert, long long testx, long long testy) {
size_t i, j;
bool c = false;
for (i = 0, j = nvert - 1; i < nvert; j = i++) {
if (((vert[i + start].y > testy) != (vert[j + start].y > testy)) &&
(testx < (vert[j + start].x - vert[i + start].x) * (testy - vert[i + start].y) / (double) (vert[j + start].y - vert[i + start].y) + vert[i + start].x))
c = !c;
}
return c;
}
bool pnpoly(const std::vector<mvt_geometry> &vert, size_t start, size_t nvert, long long testx, long long testy) {
size_t i, j;
bool c = false;
for (i = 0, j = nvert - 1; i < nvert; j = i++) {
if (((vert[i + start].y > testy) != (vert[j + start].y > testy)) &&
(testx < (vert[j + start].x - vert[i + start].x) * (testy - vert[i + start].y) / (double) (vert[j + start].y - vert[i + start].y) + vert[i + start].x))
c = !c;
}
return c;
}
bool pnpoly_mp(std::vector<mvt_geometry> const &geom, long long x, long long y) {
// assumes rings are properly nested, so inside a hole matches twice
bool found = false;
for (size_t i = 0; i < geom.size(); i++) {
if (geom[i].op == mvt_moveto) {
size_t j;
for (j = i + 1; j < geom.size(); j++) {
if (geom[j].op != mvt_lineto) {
break;
}
}
found ^= pnpoly(geom, i, j - i, x, y);
i = j - 1;
}
}
return found;
}
std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int ny,
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
bool demultiply, json_object *filter, bool preserve_input_order,
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) {
bool demultiply, json_object *filter, bool preserve_input_order, 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<source_tile> decoded;
for (auto const &t : tiles) {
@@ -1107,7 +1049,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, buffer, keep, do_compress, next_overzoomed_tiles, demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins);
return overzoom(decoded, nz, nx, ny, detail, buffer, keep, do_compress, next_overzoomed_tiles, demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size);
}
struct tile_feature {
@@ -1205,284 +1147,11 @@ 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;
index_event(unsigned long long where_, index_event_kind kind_, size_t layer_, size_t feature_)
: where(where_), kind(kind_), layer(layer_), feature(feature_) {
}
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;
}
}
}
mvt_tile assign_to_bins(mvt_tile const &features, std::vector<mvt_layer> const &bins, int z, int x, int y, int detail) {
std::vector<index_event> events;
// 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, detail);
get_quadkey_bounds(xmin, ymin, xmax, ymax, &start, &end);
events.emplace_back(start, index_event::ENTER, i, j);
events.emplace_back(end, index_event::EXIT, i, j);
}
}
// 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) {
get_bbox(features.layers[i].features[j].geometry, &xmin, &ymin, &xmax, &ymax, z, x, y, detail);
get_quadkey_bounds(xmin, ymin, xmax, ymax, &start, &end);
events.emplace_back(start, index_event::CHECK, i, j);
}
}
}
std::sort(events.begin(), events.end());
std::set<active_bin> active;
std::vector<size_t> counters; // separate because set items can't be mutated from an iterator
std::vector<std::map<std::string, double>> sums; // separate because set items can't be mutated from an iterator
std::vector<std::map<std::string, double>> maxes; // separate because set items can't be mutated from an iterator
std::vector<std::map<std::string, double>> mins; // separate because set items can't be mutated from an iterator
std::vector<std::map<std::string, double>> counts; // separate because set items can't be mutated from an iterator
mvt_layer outlayer;
outlayer.extent = 1 << detail;
outlayer.version = 2;
outlayer.name = features.layers[0].name;
for (auto &e : events) {
if (e.kind == index_event::ENTER) {
active_bin a(e.layer, e.feature);
const mvt_feature &bin = bins[e.layer].features[e.feature];
mvt_feature outfeature;
outfeature.geometry = bin.geometry;
outfeature.type = bin.type;
a.outfeature = outlayer.features.size();
a.counter = counters.size();
counters.push_back(0);
sums.emplace_back();
maxes.emplace_back();
mins.emplace_back();
counts.emplace_back();
outlayer.features.push_back(std::move(outfeature));
active.insert(std::move(a));
} else if (e.kind == index_event::CHECK) {
auto const &feature = features.layers[e.layer].features[e.feature];
#if 0
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
printf("%s ", features.layers[e.layer].values[feature.tags[i + 1]].toString().c_str());
}
printf(": ");
#endif
for (auto const &a : active) {
auto const &bin = bins[a.layer].features[a.feature];
// XXX do bounding box check first
if (pnpoly_mp(bin.geometry, feature.geometry[0].x, feature.geometry[0].y)) {
#if 0
printf("found: ");
for (size_t i = 0; i + 1 < bin.tags.size(); i += 2) {
printf("%s ", bins[a.first].values[bin.tags[i + 1]].toString().c_str());
}
printf("\n");
#endif
counters[a.counter]++;
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
const mvt_value &val = features.layers[e.layer].values[feature.tags[i + 1]];
const std::string &key = features.layers[e.layer].keys[feature.tags[i]];
if (val.is_numeric()) {
auto sum_attr = sums[a.counter].find(key);
if (sum_attr == sums[a.counter].end()) {
sums[a.counter].emplace(key, 0);
mins[a.counter].emplace(key, std::numeric_limits<double>::infinity());
maxes[a.counter].emplace(key, -std::numeric_limits<double>::infinity());
counts[a.counter].emplace(key, 0);
sum_attr = sums[a.counter].find(key);
}
auto min_attr = mins[a.counter].find(key);
auto max_attr = maxes[a.counter].find(key);
auto count_attr = counts[a.counter].find(key);
double v = mvt_value_to_double(val);
sum_attr->second += v;
count_attr->second += 1;
min_attr->second = std::min(min_attr->second, v);
max_attr->second = std::max(max_attr->second, v);
}
}
break;
}
}
} else /* EXIT */ {
auto const &found = active.find({e.layer, e.feature});
if (found != active.end()) {
mvt_feature &outfeature = outlayer.features[found->outfeature];
if (counters[found->counter] >= 0) {
const mvt_feature &bin = bins[e.layer].features[e.feature];
// copy attributes from the original bin feature
for (size_t i = 0; i + 1 < bin.tags.size(); i += 2) {
outlayer.tag(outfeature, bins[e.layer].keys[bin.tags[i]], bins[e.layer].values[bin.tags[i + 1]]);
}
// new attribute for number of features assigned to the bin
mvt_value v;
v.type = mvt_uint;
v.numeric_value.uint_value = counters[found->counter];
outlayer.tag(outfeature, "tippecanoe:count", v);
for (auto const &kv : sums[found->counter]) {
mvt_value v_sum;
v_sum.type = mvt_double;
v_sum.numeric_value.double_value = kv.second;
outlayer.tag(outfeature, "tippecanoe:sum:" + kv.first, v_sum);
mvt_value v_count;
v_count.type = mvt_double;
v_count.numeric_value.double_value = counts[found->counter][kv.first];
outlayer.tag(outfeature, "tippecanoe:count:" + kv.first, v_count);
mvt_value v_mean;
v_mean.type = mvt_double;
v_mean.numeric_value.double_value = kv.second / counters[found->counter];
outlayer.tag(outfeature, "tippecanoe:mean:" + kv.first, v_mean);
mvt_value v_min;
v_min.type = mvt_double;
v_min.numeric_value.double_value = mins[found->counter][kv.first];
outlayer.tag(outfeature, "tippecanoe:min:" + kv.first, v_min);
mvt_value v_max;
v_max.type = mvt_double;
v_max.numeric_value.double_value = maxes[found->counter][kv.first];
outlayer.tag(outfeature, "tippecanoe:max:" + kv.first, v_max);
}
} else {
outfeature.geometry.clear();
}
active.erase(found);
} else {
fprintf(stderr, "event mismatch: can't happen\n");
exit(EXIT_IMPOSSIBLE);
}
}
}
#if 0
// crunch out bin features whose geometry we cleared along the way
size_t out = 0;
for (size_t i = 0; i < outlayer.features.size(); i++) {
if (outlayer.features[i].geometry.size() > 0) {
outlayer.features[out++] = outlayer.features[i];
}
}
outlayer.features.resize(out);
#endif
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, int buffer, std::set<std::string> const &keep, bool do_compress,
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
bool demultiply, json_object *filter, bool preserve_input_order,
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) {
bool demultiply, json_object *filter, bool preserve_input_order, std::unordered_map<std::string, attribute_op> const &attribute_accum, std::vector<std::string> const &unidecode_data, double simplification,
double tiny_polygon_size) {
mvt_tile outtile;
std::shared_ptr<std::string> tile_stringpool = std::make_shared<std::string>();
@@ -1519,6 +1188,37 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
static const std::string retain_points_multiplier_sequence = "tippecanoe:retain_points_multiplier_sequence";
for (auto feature : layer.features) {
bool flush_multiplier_cluster = false;
if (demultiply) {
for (ssize_t i = feature.tags.size() - 2; i >= 0; i -= 2) {
if (layer.keys[feature.tags[i]] == retain_points_multiplier_first) {
mvt_value v = layer.values[feature.tags[i + 1]];
if (v.type == mvt_bool && v.numeric_value.bool_value) {
flush_multiplier_cluster = true;
feature.tags.erase(feature.tags.begin() + i, feature.tags.begin() + i + 2);
}
} else if (i < (ssize_t) feature.tags.size() && layer.keys[feature.tags[i]] == retain_points_multiplier_sequence) {
mvt_value v = layer.values[feature.tags[i + 1]];
feature.seq = mvt_value_to_long_long(v);
feature.tags.erase(feature.tags.begin() + i, feature.tags.begin() + i + 2);
}
}
} else {
flush_multiplier_cluster = true;
}
if (flush_multiplier_cluster) {
if (pending_tile_features.size() > 0) {
feature_out(pending_tile_features, *outlayer, keep, attribute_accum, tile_stringpool);
pending_tile_features.clear();
}
}
std::set<std::string> exclude_attributes;
if (filter != NULL && !evaluate(feature, layer, filter, exclude_attributes, nz, unidecode_data)) {
continue;
}
drawvec geom;
int t = feature.type;
@@ -1568,7 +1268,6 @@ 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
continue;
}
@@ -1582,42 +1281,6 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
}
}
if (geom.size() == 0) {
// clipped away
continue;
}
bool flush_multiplier_cluster = false;
if (demultiply) {
for (ssize_t i = feature.tags.size() - 2; i >= 0; i -= 2) {
if (layer.keys[feature.tags[i]] == retain_points_multiplier_first) {
mvt_value v = layer.values[feature.tags[i + 1]];
if (v.type == mvt_bool && v.numeric_value.bool_value) {
flush_multiplier_cluster = true;
feature.tags.erase(feature.tags.begin() + i, feature.tags.begin() + i + 2);
}
} else if (i < (ssize_t) feature.tags.size() && layer.keys[feature.tags[i]] == retain_points_multiplier_sequence) {
mvt_value v = layer.values[feature.tags[i + 1]];
feature.seq = mvt_value_to_long_long(v);
feature.tags.erase(feature.tags.begin() + i, feature.tags.begin() + i + 2);
}
}
} else {
flush_multiplier_cluster = true;
}
if (flush_multiplier_cluster) {
if (pending_tile_features.size() > 0) {
feature_out(pending_tile_features, *outlayer, keep, attribute_accum, tile_stringpool);
pending_tile_features.clear();
}
}
std::set<std::string> exclude_attributes;
if (filter != NULL && !evaluate(feature, layer, filter, exclude_attributes, nz, unidecode_data)) {
continue;
}
bool still_need_simplification_after_reduction = false;
if (t == VT_POLYGON && tiny_polygon_size > 0) {
bool simplified_away_by_reduction = false;
@@ -1698,7 +1361,7 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
std::string child = overzoom(sts,
nz + 1, nx * 2 + x, ny * 2 + y,
detail, buffer, keep, false, NULL,
demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins);
demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size);
if (child.size() > 0) {
next_overzoomed_tiles->emplace_back(nx * 2 + x, ny * 2 + y);
}
@@ -1707,10 +1370,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, nz, nx, ny, detail);
}
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);
@@ -1732,151 +1391,3 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
return "";
}
}
drawvec fix_polygon(const drawvec &geom, bool use_winding, bool reverse_winding) {
int outer = 1;
drawvec out;
for (size_t i = 0; i < geom.size(); i++) {
if (geom[i].op == VT_CLOSEPATH) {
outer = 1;
} else if (geom[i].op == VT_MOVETO) {
// Find the end of the ring
size_t j;
for (j = i + 1; j < geom.size(); j++) {
if (geom[j].op != VT_LINETO) {
break;
}
}
// A polygon ring must contain at least three points
// (and really should contain four). If this one does
// not have any, avoid a division by zero trying to
// calculate the centroid below.
if (j - i < 1) {
i = j - 1;
outer = 0;
continue;
}
// Make a temporary copy of the ring.
// Close it if it isn't closed.
drawvec ring;
for (size_t a = i; a < j; a++) {
ring.push_back(geom[a]);
}
if (j - i != 0 && (ring[0].x != ring[j - i - 1].x || ring[0].y != ring[j - i - 1].y)) {
ring.push_back(ring[0]);
}
// A polygon ring at this point should contain at least four points.
// Flesh it out with some vertex copies if it doesn't.
while (ring.size() < 4) {
ring.push_back(ring[0]);
}
// Reverse ring if winding order doesn't match
// inner/outer expectation
bool reverse_ring = false;
if (use_winding) {
// GeoJSON winding is reversed from vector winding
reverse_ring = true;
} else if (reverse_winding) {
// GeoJSON winding is reversed from vector winding
reverse_ring = false;
} else {
double area = get_area(ring, 0, ring.size());
if ((area > 0) != outer) {
reverse_ring = true;
}
}
if (reverse_ring) {
drawvec tmp;
for (int a = ring.size() - 1; a >= 0; a--) {
tmp.push_back(ring[a]);
}
ring = tmp;
}
// Now we are rotating the ring to make the first/last point
// one that would be unlikely to be simplified away.
// calculate centroid
// a + 1 < size() because point 0 is duplicated at the end
long long xtotal = 0;
long long ytotal = 0;
long long count = 0;
for (size_t a = 0; a + 1 < ring.size(); a++) {
xtotal += ring[a].x;
ytotal += ring[a].y;
count++;
}
xtotal /= count;
ytotal /= count;
// figure out which point is furthest from the centroid
long long dist2 = 0;
long long furthest = 0;
for (size_t a = 0; a + 1 < ring.size(); a++) {
// division by 16 because these are z0 coordinates and we need to avoid overflow
long long xd = (ring[a].x - xtotal) / 16;
long long yd = (ring[a].y - ytotal) / 16;
long long d2 = xd * xd + yd * yd;
if (d2 > dist2 || (d2 == dist2 && ring[a] < ring[furthest])) {
dist2 = d2;
furthest = a;
}
}
// then figure out which point is furthest from *that*,
// which will hopefully be a good origin point since it should be
// at a far edge of the shape.
long long dist2b = 0;
long long furthestb = 0;
for (size_t a = 0; a + 1 < ring.size(); a++) {
// division by 16 because these are z0 coordinates and we need to avoid overflow
long long xd = (ring[a].x - ring[furthest].x) / 16;
long long yd = (ring[a].y - ring[furthest].y) / 16;
long long d2 = xd * xd + yd * yd;
if (d2 > dist2b || (d2 == dist2b && ring[a] < ring[furthestb])) {
dist2b = d2;
furthestb = a;
}
}
// rotate ring so the furthest point is the duplicated one.
// the idea is that simplification will then be more efficient,
// never wasting the start and end points, which are always retained,
// on a point that has little impact on the shape.
// Copy ring into output, fixing the moveto/lineto ops if necessary because of
// reversal or closing
for (size_t a = 0; a < ring.size(); a++) {
size_t a2 = (a + furthestb) % (ring.size() - 1);
if (a == 0) {
out.push_back(draw(VT_MOVETO, ring[a2].x, ring[a2].y));
} else {
out.push_back(draw(VT_LINETO, ring[a2].x, ring[a2].y));
}
}
// Next ring or polygon begins on the non-lineto that ended this one
// and is not an outer ring unless there is a terminator first
i = j - 1;
outer = 0;
} else {
fprintf(stderr, "Internal error: polygon ring begins with %d, not moveto\n", geom[i].op);
exit(EXIT_IMPOSSIBLE);
}
}
return out;
}
+4 -4
View File
@@ -76,13 +76,13 @@ drawvec readGeometry(const FlatGeobuf::Geometry *geometry, FlatGeobuf::GeometryT
if (geometry_type == FlatGeobuf::GeometryType_Point) {
return readPoints(geometry);
} else if (geometry_type == FlatGeobuf::GeometryType_MultiPoint) {
} if (geometry_type == FlatGeobuf::GeometryType_MultiPoint) {
return readPoints(geometry);
} else if (geometry_type == FlatGeobuf::GeometryType_LineString) {
} if (geometry_type == FlatGeobuf::GeometryType_LineString) {
return readLinePart(geometry);
} else if (geometry_type == FlatGeobuf::GeometryType_MultiLineString) {
} else if (h_geometry_type == FlatGeobuf::GeometryType_MultiLineString) {
return readLinePart(geometry);
} else if (geometry_type == FlatGeobuf::GeometryType_Polygon) {
} if (geometry_type == FlatGeobuf::GeometryType_Polygon) {
return readLinePart(geometry);
} else if (geometry_type == FlatGeobuf::GeometryType_MultiPolygon) {
// if it is a GeometryCollection, parse Parts, ignore XY
+170
View File
@@ -70,6 +70,28 @@ drawvec decode_geometry(const char **meta, int z, unsigned tx, unsigned ty, long
return out;
}
/* pnpoly:
Copyright (c) 1970-2003, Wm. Randolph Franklin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
Redistributions in binary form must reproduce the above copyright notice in the documentation and/or other materials provided with the distribution.
The name of W. Randolph Franklin may not be used to endorse or promote products derived from this Software without specific prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
int pnpoly(const drawvec &vert, size_t start, size_t nvert, long long testx, long long testy) {
size_t i, j;
bool c = false;
for (i = 0, j = nvert - 1; i < nvert; j = i++) {
if (((vert[i + start].y > testy) != (vert[j + start].y > testy)) &&
(testx < (vert[j + start].x - vert[i + start].x) * (testy - vert[i + start].y) / (double) (vert[j + start].y - vert[i + start].y) + vert[i + start].x))
c = !c;
}
return c;
}
void check_polygon(drawvec &geom) {
geom = remove_noop(geom, VT_POLYGON, 0);
@@ -359,6 +381,154 @@ drawvec reorder_lines(const drawvec &geom) {
return geom;
}
drawvec fix_polygon(const drawvec &geom) {
int outer = 1;
drawvec out;
for (size_t i = 0; i < geom.size(); i++) {
if (geom[i].op == VT_CLOSEPATH) {
outer = 1;
} else if (geom[i].op == VT_MOVETO) {
// Find the end of the ring
size_t j;
for (j = i + 1; j < geom.size(); j++) {
if (geom[j].op != VT_LINETO) {
break;
}
}
// A polygon ring must contain at least three points
// (and really should contain four). If this one does
// not have any, avoid a division by zero trying to
// calculate the centroid below.
if (j - i < 1) {
i = j - 1;
outer = 0;
continue;
}
// Make a temporary copy of the ring.
// Close it if it isn't closed.
drawvec ring;
for (size_t a = i; a < j; a++) {
ring.push_back(geom[a]);
}
if (j - i != 0 && (ring[0].x != ring[j - i - 1].x || ring[0].y != ring[j - i - 1].y)) {
ring.push_back(ring[0]);
}
// A polygon ring at this point should contain at least four points.
// Flesh it out with some vertex copies if it doesn't.
while (ring.size() < 4) {
ring.push_back(ring[0]);
}
// Reverse ring if winding order doesn't match
// inner/outer expectation
bool reverse_ring = false;
if (prevent[P_USE_SOURCE_POLYGON_WINDING]) {
// GeoJSON winding is reversed from vector winding
reverse_ring = true;
} else if (prevent[P_REVERSE_SOURCE_POLYGON_WINDING]) {
// GeoJSON winding is reversed from vector winding
reverse_ring = false;
} else {
double area = get_area(ring, 0, ring.size());
if ((area > 0) != outer) {
reverse_ring = true;
}
}
if (reverse_ring) {
drawvec tmp;
for (int a = ring.size() - 1; a >= 0; a--) {
tmp.push_back(ring[a]);
}
ring = tmp;
}
// Now we are rotating the ring to make the first/last point
// one that would be unlikely to be simplified away.
// calculate centroid
// a + 1 < size() because point 0 is duplicated at the end
long long xtotal = 0;
long long ytotal = 0;
long long count = 0;
for (size_t a = 0; a + 1 < ring.size(); a++) {
xtotal += ring[a].x;
ytotal += ring[a].y;
count++;
}
xtotal /= count;
ytotal /= count;
// figure out which point is furthest from the centroid
long long dist2 = 0;
long long furthest = 0;
for (size_t a = 0; a + 1 < ring.size(); a++) {
// division by 16 because these are z0 coordinates and we need to avoid overflow
long long xd = (ring[a].x - xtotal) / 16;
long long yd = (ring[a].y - ytotal) / 16;
long long d2 = xd * xd + yd * yd;
if (d2 > dist2 || (d2 == dist2 && ring[a] < ring[furthest])) {
dist2 = d2;
furthest = a;
}
}
// then figure out which point is furthest from *that*,
// which will hopefully be a good origin point since it should be
// at a far edge of the shape.
long long dist2b = 0;
long long furthestb = 0;
for (size_t a = 0; a + 1 < ring.size(); a++) {
// division by 16 because these are z0 coordinates and we need to avoid overflow
long long xd = (ring[a].x - ring[furthest].x) / 16;
long long yd = (ring[a].y - ring[furthest].y) / 16;
long long d2 = xd * xd + yd * yd;
if (d2 > dist2b || (d2 == dist2b && ring[a] < ring[furthestb])) {
dist2b = d2;
furthestb = a;
}
}
// rotate ring so the furthest point is the duplicated one.
// the idea is that simplification will then be more efficient,
// never wasting the start and end points, which are always retained,
// on a point that has little impact on the shape.
// Copy ring into output, fixing the moveto/lineto ops if necessary because of
// reversal or closing
for (size_t a = 0; a < ring.size(); a++) {
size_t a2 = (a + furthestb) % (ring.size() - 1);
if (a == 0) {
out.push_back(draw(VT_MOVETO, ring[a2].x, ring[a2].y));
} else {
out.push_back(draw(VT_LINETO, ring[a2].x, ring[a2].y));
}
}
// Next ring or polygon begins on the non-lineto that ended this one
// and is not an outer ring unless there is a terminator first
i = j - 1;
outer = 0;
} else {
fprintf(stderr, "Internal error: polygon ring begins with %d, not moveto\n", geom[i].op);
exit(EXIT_IMPOSSIBLE);
}
}
return out;
}
#if 0
std::vector<drawvec> chop_polygon(std::vector<drawvec> &geoms) {
while (1) {
+3 -6
View File
@@ -83,7 +83,7 @@ int quick_check(const long long *bbox, int z, long long buffer);
void douglas_peucker(drawvec &geom, int start, int n, double e, size_t kept, size_t retain, bool prevent_simplify_shared_nodes);
drawvec simplify_lines(drawvec &geom, int z, int tx, int ty, int detail, bool mark_tile_bounds, double simplification, size_t retain, drawvec const &shared_nodes, struct node *shared_nodes_map, size_t nodepos, std::string const &shared_nodes_bloom);
drawvec reorder_lines(const drawvec &geom);
drawvec fix_polygon(const drawvec &geom, bool use_winding, bool reverse_winding);
drawvec fix_polygon(const drawvec &geom);
std::vector<drawvec> chop_polygon(std::vector<drawvec> &geoms);
void check_polygon(drawvec &geom);
double get_area(const drawvec &geom, size_t i, size_t j);
@@ -121,7 +121,7 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
bool demultiply, json_object *filter, bool preserve_input_order,
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);
double tiny_polygon_size);
std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int ny,
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
@@ -129,11 +129,8 @@ std::string overzoom(std::vector<input_tile> const &tiles, int nz, int nx, int n
bool demultiply, json_object *filter, bool preserve_input_order,
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);
double tiny_polygon_size);
draw center_of_mass_mp(const drawvec &dv);
void get_quadkey_bounds(long long xmin, long long ymin, long long xmax, long long ymax,
unsigned long long *start, unsigned long long *end);
#endif
+4 -3
View File
@@ -49,6 +49,7 @@
#include "tile.hpp"
#include "pool.hpp"
#include "projection.hpp"
#include "version.hpp"
#include "memfile.hpp"
#include "main.hpp"
#include "geojson.hpp"
@@ -3084,7 +3085,6 @@ int main(int argc, char **argv) {
{"attribute-type", required_argument, 0, 'T'},
{"attribute-description", required_argument, 0, 'Y'},
{"accumulate-attribute", required_argument, 0, 'E'},
{"accumulate-numeric-attributes", no_argument, &additional[A_ACCUMULATE_NUMERIC], 1},
{"empty-csv-columns-are-null", no_argument, &prevent[P_EMPTY_CSV_COLUMNS], 1},
{"convert-stringified-ids-to-numbers", no_argument, &additional[A_CONVERT_NUMERIC_IDS], 1},
{"use-attribute-for-id", required_argument, 0, '~'},
@@ -3113,9 +3113,11 @@ int main(int argc, char **argv) {
{"drop-densest-as-needed", no_argument, &additional[A_DROP_DENSEST_AS_NEEDED], 1},
{"drop-fraction-as-needed", no_argument, &additional[A_DROP_FRACTION_AS_NEEDED], 1},
{"drop-smallest-as-needed", no_argument, &additional[A_DROP_SMALLEST_AS_NEEDED], 1},
{"drop-sparsest-as-needed", no_argument, &additional[A_DROP_SPARSEST_AS_NEEDED], 1},
{"coalesce-densest-as-needed", no_argument, &additional[A_COALESCE_DENSEST_AS_NEEDED], 1},
{"coalesce-fraction-as-needed", no_argument, &additional[A_COALESCE_FRACTION_AS_NEEDED], 1},
{"coalesce-smallest-as-needed", no_argument, &additional[A_COALESCE_SMALLEST_AS_NEEDED], 1},
{"coalesce-sparsest-as-needed", no_argument, &additional[A_COALESCE_SPARSEST_AS_NEEDED], 1},
{"force-feature-limit", no_argument, &prevent[P_DYNAMIC_DROP], 1},
{"cluster-densest-as-needed", no_argument, &additional[A_CLUSTER_DENSEST_AS_NEEDED], 1},
@@ -3157,7 +3159,6 @@ int main(int argc, char **argv) {
{"Adding calculated attributes", 0, 0, 0},
{"calculate-feature-density", no_argument, &additional[A_CALCULATE_FEATURE_DENSITY], 1},
{"generate-ids", no_argument, &additional[A_GENERATE_IDS], 1},
{"calculate-feature-index", no_argument, &additional[A_CALCULATE_INDEX], 1},
{"Trying to correct bad source geometry", 0, 0, 0},
{"detect-longitude-wraparound", no_argument, &additional[A_DETECT_WRAPAROUND], 1},
@@ -3609,7 +3610,7 @@ int main(int argc, char **argv) {
}
case 'v':
fprintf(stderr, "tippecanoe %s\n", version_str().c_str());
fprintf(stderr, "tippecanoe %s\n", VERSION);
exit(EXIT_SUCCESS);
case 'P':
+1 -3
View File
@@ -694,8 +694,6 @@ the line or polygon within one tile unit of its proper location. You can probabl
\fB\fC\-ag\fR or \fB\fC\-\-calculate\-feature\-density\fR: Add a new attribute, \fB\fCtippecanoe_feature_density\fR, to each feature, to record how densely features are spaced in that area of the tile. You can use this attribute in the style to produce a glowing effect where points are densely packed. It can range from 0 in the sparsest areas to 255 in the densest.
.IP \(bu 2
\fB\fC\-ai\fR or \fB\fC\-\-generate\-ids\fR: Add an \fB\fCid\fR (a feature ID, not an attribute named \fB\fCid\fR) to each feature that does not already have one. There is currently no guarantee that the \fB\fCid\fR added will be stable between runs or that it will not conflict with manually\-assigned feature IDs. Future versions of Tippecanoe may change the mechanism for allocating IDs.
.IP \(bu 2
\fB\fC\-aX\fR or \fB\fC\-\-calculate\-feature\-index\fR: Add a \fB\fCtippecanoe:index\fR field to each feature, giving its index in the quadkey or hilbert sequence.
.RE
.SS Trying to correct bad source geometry
.RS
@@ -906,7 +904,7 @@ Linux:
.PP
.RS
.nf
sudo apt\-get install gcc g++ make libsqlite3\-dev zlib1g\-dev
sudo apt\-get install build\-essential libsqlite3\-dev zlib1g\-dev
.fi
.RE
.PP
+1 -12
View File
@@ -654,17 +654,6 @@ static double sixdig(double val) {
return std::round(val * 1e6) / 1e6;
}
#define str(x) #x
#define xstr(x) str(x)
std::string version_str() {
std::string s = VERSION;
std::string build_info = xstr(BUILD_INFO);
if (build_info.size() > 0) {
s += " " + build_info;
}
return s;
}
metadata make_metadata(const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double minlat2, double minlon2, double maxlat2, double maxlon2, double midlat, double midlon, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats, std::map<std::string, std::string> const &attribute_descriptions, std::string const &program, std::string const &commandline, std::vector<strategy> const &strategies, int basezoom, double droprate, int retain_points_multiplier) {
metadata m;
@@ -695,7 +684,7 @@ metadata make_metadata(const char *fname, int minzoom, int maxzoom, double minla
m.attribution = attribution;
}
m.generator = program + " " + version_str();
m.generator = program + " " + VERSION;
m.generator_options = commandline;
m.strategies_json = stringify_strategies(strategies);
-1
View File
@@ -77,6 +77,5 @@ std::map<std::string, layermap_entry> merge_layermaps(std::vector<std::map<std::
std::map<std::string, layermap_entry> merge_layermaps(std::vector<std::map<std::string, layermap_entry> > const &maps, bool trunc);
void add_to_tilestats(std::map<std::string, tilestat> &tilestats, std::string const &layername, serial_val const &val);
std::string version_str();
#endif
-56
View File
@@ -835,59 +835,3 @@ long long mvt_value_to_long_long(mvt_value const &v) {
exit(EXIT_IMPOSSIBLE);
}
}
// This extracts a double value from an mvt_value
double mvt_value_to_double(mvt_value const &v) {
switch (v.type) {
case mvt_string:
return atof(v.c_str());
case mvt_float:
return v.numeric_value.float_value;
case mvt_double:
return v.numeric_value.double_value;
case mvt_int:
return v.numeric_value.int_value;
case mvt_uint:
return v.numeric_value.uint_value;
case mvt_sint:
return v.numeric_value.sint_value;
case mvt_bool:
return v.numeric_value.bool_value;
case mvt_null:
return 0;
default:
fprintf(stderr, "unhandled mvt_type %d\n", v.type);
exit(EXIT_IMPOSSIBLE);
}
}
void get_bbox(std::vector<mvt_geometry> const &geom,
long long *xmin, long long *ymin, long long *xmax, long long *ymax,
int z, int tx, int ty, int detail) {
*xmin = LLONG_MAX;
*ymin = LLONG_MAX;
*xmax = 0;
*ymax = 0;
for (auto const &g : geom) {
if (g.op == mvt_moveto || g.op == mvt_lineto) {
long long x = g.x;
long long y = g.y;
// to world scale
x = x * (1LL << (32 - z - detail));
y = y * (1LL << (32 - z - detail));
// to world origin
if (z > 0) {
x += (1LL << (32 - z)) * tx;
y += (1LL << (32 - z)) * ty;
}
*xmin = std::min(*xmin, x);
*ymin = std::min(*ymin, y);
*xmax = std::max(*xmax, x);
*ymax = std::max(*ymax, y);
}
}
}
-13
View File
@@ -118,14 +118,6 @@ struct mvt_value {
s->push_back('\0');
}
bool is_numeric() const {
return type == mvt_float ||
type == mvt_double ||
type == mvt_int ||
type == mvt_uint ||
type == mvt_sint;
}
bool operator<(const mvt_value &o) const;
bool operator==(const mvt_value &o) const;
std::string toString() const;
@@ -201,15 +193,10 @@ int dezig(unsigned n);
mvt_value stringified_to_mvt_value(int type, const char *s, std::shared_ptr<std::string> const &tile_stringpool);
long long mvt_value_to_long_long(mvt_value const &v);
double mvt_value_to_double(mvt_value const &v);
bool is_integer(const char *s, long long *v);
bool is_unsigned_integer(const char *s, unsigned long long *v);
struct serial_val;
serial_val mvt_value_to_serial_val(mvt_value const &v);
void get_bbox(std::vector<mvt_geometry> const &geom,
long long *xmin, long long *ymin, long long *xmax, long long *ymax,
int z, int tx, int ty, int detail);
#endif
+40 -40
View File
@@ -1,54 +1,54 @@
#ifndef OPTIONS_HPP
#define OPTIONS_HPP
#define A_DEBUG_POLYGON ((int) '@')
#define A_CLUSTER_DENSEST_AS_NEEDED ((int) 'C')
#define A_COALESCE_FRACTION_AS_NEEDED ((int) 'D')
#define A_INCREASE_GAMMA_AS_NEEDED ((int) 'G')
#define A_CONVERT_NUMERIC_IDS ((int) 'I')
#define A_GRID_LOW_ZOOMS ((int) 'L')
#define A_COALESCE_SMALLEST_AS_NEEDED ((int) 'N')
#define A_GENERATE_POLYGON_LABEL_POINTS ((int) 'P')
#define A_PREFER_RADIX_SORT ((int) 'R')
#define A_COALESCE_DENSEST_AS_NEEDED ((int) 'S')
#define A_CALCULATE_INDEX ((int) 'X')
#define A_ACCUMULATE_NUMERIC ((int) 'a')
#define A_DETECT_SHARED_BORDERS ((int) 'b')
#define A_COALESCE ((int) 'c')
#define A_DROP_FRACTION_AS_NEEDED ((int) 'd')
#define A_EXTEND_ZOOMS ((int) 'e')
#define A_CALCULATE_FEATURE_DENSITY ((int) 'g')
#define A_HILBERT ((int) 'h')
#define A_GENERATE_IDS ((int) 'i')
#define A_LINE_DROP ((int) 'l')
#define A_DROP_SMALLEST_AS_NEEDED ((int) 'n')
#define A_REORDER ((int) 'o')
#define A_POLYGON_DROP ((int) 'p')
#define A_REVERSE ((int) 'r')
#define A_REORDER ((int) 'o')
#define A_LINE_DROP ((int) 'l')
#define A_DEBUG_POLYGON ((int) '@')
#define A_POLYGON_DROP ((int) 'p')
#define A_DETECT_SHARED_BORDERS ((int) 'b')
#define A_PREFER_RADIX_SORT ((int) 'R')
#define A_CALCULATE_FEATURE_DENSITY ((int) 'g')
#define A_INCREASE_GAMMA_AS_NEEDED ((int) 'G')
#define A_DROP_DENSEST_AS_NEEDED ((int) 's')
#define A_VARIABLE_DEPTH_PYRAMID ((int) 't')
#define A_VISVALINGAM ((int) 'v')
#define A_DROP_FRACTION_AS_NEEDED ((int) 'd')
#define A_DROP_SMALLEST_AS_NEEDED ((int) 'n')
#define A_DROP_SPARSEST_AS_NEEDED ((int) 's' & 0x1F)
#define A_COALESCE_DENSEST_AS_NEEDED ((int) 'S')
#define A_COALESCE_SMALLEST_AS_NEEDED ((int) 'N')
#define A_COALESCE_FRACTION_AS_NEEDED ((int) 'D')
#define A_COALESCE_SPARSEST_AS_NEEDED ((int) 't' & 0x1F)
#define A_GRID_LOW_ZOOMS ((int) 'L')
#define A_DETECT_WRAPAROUND ((int) 'w')
#define A_EXTEND_ZOOMS ((int) 'e')
#define A_CLUSTER_DENSEST_AS_NEEDED ((int) 'C')
#define A_GENERATE_IDS ((int) 'i')
#define A_CONVERT_NUMERIC_IDS ((int) 'I')
#define A_HILBERT ((int) 'h')
#define A_VISVALINGAM ((int) 'v')
#define A_GENERATE_POLYGON_LABEL_POINTS ((int) 'P')
#define A_VARIABLE_DEPTH_PYRAMID ((int) 't')
#define P_TILE_COMPRESSION ((int) 'C')
#define P_DUPLICATION ((int) 'D')
#define P_SINGLE_PRECISION ((int) 'N')
#define P_SIMPLIFY_LOW ((int) 'S')
#define P_TINY_POLYGON_REDUCTION_AT_MAXZOOM ((int) 'T')
#define P_REVERSE_SOURCE_POLYGON_WINDING ((int) 'W')
#define P_BASEZOOM_ABOVE_MAXZOOM ((int) 'b')
#define P_CLIPPING ((int) 'c')
#define P_DYNAMIC_DROP ((int) 'd')
#define P_EMPTY_CSV_COLUMNS ((int) 'e')
#define P_FEATURE_LIMIT ((int) 'f')
#define P_TILE_STATS ((int) 'g')
#define P_INPUT_ORDER ((int) 'i')
#define P_KILOBYTE_LIMIT ((int) 'k')
#define P_SIMPLIFY_SHARED_NODES ((int) 'n')
#define P_POLYGON_SPLIT ((int) 'p')
#define P_SIMPLIFY ((int) 's')
#define P_SIMPLIFY_LOW ((int) 'S')
#define P_SIMPLIFY_SHARED_NODES ((int) 'n')
#define P_SINGLE_PRECISION ((int) 'N')
#define P_FEATURE_LIMIT ((int) 'f')
#define P_KILOBYTE_LIMIT ((int) 'k')
#define P_DYNAMIC_DROP ((int) 'd')
#define P_INPUT_ORDER ((int) 'i')
#define P_POLYGON_SPLIT ((int) 'p')
#define P_CLIPPING ((int) 'c')
#define P_DUPLICATION ((int) 'D')
#define P_TINY_POLYGON_REDUCTION ((int) 't')
#define P_TINY_POLYGON_REDUCTION_AT_MAXZOOM ((int) 'T')
#define P_TILE_COMPRESSION ((int) 'C')
#define P_TILE_STATS ((int) 'g')
#define P_USE_SOURCE_POLYGON_WINDING ((int) 'w')
#define P_REVERSE_SOURCE_POLYGON_WINDING ((int) 'W')
#define P_EMPTY_CSV_COLUMNS ((int) 'e')
#define P_BASEZOOM_ABOVE_MAXZOOM ((int) 'b')
extern int prevent[256];
extern int additional[256];
+1 -20
View File
@@ -9,7 +9,6 @@
#include "evaluator.hpp"
#include "attribute.hpp"
#include "text.hpp"
#include "read_json.hpp"
extern char *optarg;
extern int optind;
@@ -21,7 +20,6 @@ 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::set<std::string> keep;
@@ -39,7 +37,6 @@ int main(int argc, char **argv) {
const char *outfile = NULL;
double simplification = 0;
double tiny_polygon_size = 0;
std::string assign_to_bins;
std::vector<input_tile> sources;
@@ -56,7 +53,6 @@ int main(int argc, char **argv) {
{"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},
{0, 0, 0, 0},
};
@@ -123,10 +119,6 @@ int main(int argc, char **argv) {
simplification = atof(optarg);
break;
case 'b' & 0x1F:
assign_to_bins = optarg;
break;
default:
fprintf(stderr, "Unrecognized flag -%c\n", i);
usage(argv);
@@ -190,17 +182,6 @@ 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);
}
bins = parse_layers(f, nz, nx, ny, 1LL << detail);
fclose(f);
}
json_object *json_filter = NULL;
if (filter.size() > 0) {
json_filter = parse_filter(filter.c_str());
@@ -227,7 +208,7 @@ int main(int argc, char **argv) {
its.push_back(std::move(t));
}
std::string out = overzoom(its, nz, nx, ny, detail, buffer, keep, true, NULL, demultiply, json_filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins);
std::string out = overzoom(its, nz, nx, ny, detail, buffer, keep, true, NULL, demultiply, json_filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size);
FILE *f = fopen(outfile, "wb");
if (f == NULL) {
+185 -33
View File
@@ -74,51 +74,187 @@ void *run_writer(void *a) {
return NULL;
}
// XXX deduplicate
static std::vector<mvt_geometry> to_feature(drawvec &geom) {
std::vector<mvt_geometry> out;
for (size_t i = 0; i < geom.size(); i++) {
out.push_back(mvt_geometry(geom[i].op, geom[i].x, geom[i].y));
}
return out;
}
// Reads from the postfilter
std::vector<mvt_layer> parse_layers(int fd, 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, int extent) {
std::map<std::string, mvt_layer> ret;
std::shared_ptr<std::string> tile_stringpool = std::make_shared<std::string>();
FILE *f = fdopen(fd, "r");
if (f == NULL) {
perror("fdopen filter output");
exit(EXIT_OPEN);
}
json_pull *jp = json_begin_file(f);
std::vector<mvt_layer> out = parse_layers(f, z, x, y, extent);
while (1) {
json_object *j = json_read(jp);
if (j == NULL) {
if (jp->error != NULL) {
fprintf(stderr, "Filter output:%d: %s: ", jp->line, jp->error);
if (jp->root != NULL) {
json_context(jp->root);
} else {
fprintf(stderr, "\n");
}
exit(EXIT_JSON);
}
if (fclose(f) != 0) {
perror("fclose postfilter output");
exit(EXIT_CLOSE);
}
json_free(jp->root);
break;
}
for (auto const &layer : out) {
std::string layername = layer.name;
json_object *type = json_hash_get(j, "type");
if (type == NULL || type->type != JSON_STRING) {
continue;
}
if (strcmp(type->value.string.string, "Feature") != 0) {
continue;
}
std::map<std::string, layermap_entry> &layermap = (*layermaps)[tiling_seg];
if (layermap.count(layername) == 0) {
layermap_entry lme = layermap_entry(layermap.size());
lme.minzoom = z;
lme.maxzoom = z;
json_object *geometry = json_hash_get(j, "geometry");
if (geometry == NULL) {
fprintf(stderr, "Filter output:%d: filtered feature with no geometry: ", jp->line);
json_context(j);
json_free(j);
exit(EXIT_JSON);
}
layermap.insert(std::pair<std::string, layermap_entry>(layername, lme));
json_object *properties = json_hash_get(j, "properties");
if (properties == NULL || (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);
}
if (lme.id >= (*layer_unmaps)[tiling_seg].size()) {
(*layer_unmaps)[tiling_seg].resize(lme.id + 1);
(*layer_unmaps)[tiling_seg][lme.id] = layername;
json_object *geometry_type = json_hash_get(geometry, "type");
if (geometry_type == NULL) {
fprintf(stderr, "Filter output:%d: null geometry (additional not reported): ", jp->line);
json_context(j);
exit(EXIT_JSON);
}
if (geometry_type->type != JSON_STRING) {
fprintf(stderr, "Filter output:%d: geometry type is not a string: ", jp->line);
json_context(j);
exit(EXIT_JSON);
}
json_object *coordinates = json_hash_get(geometry, "coordinates");
if (coordinates == NULL || coordinates->type != JSON_ARRAY) {
fprintf(stderr, "Filter output:%d: feature without coordinates array: ", jp->line);
json_context(j);
exit(EXIT_JSON);
}
int t;
for (t = 0; t < GEOM_TYPES; t++) {
if (strcmp(geometry_type->value.string.string, geometry_names[t]) == 0) {
break;
}
}
if (t >= GEOM_TYPES) {
fprintf(stderr, "Filter output:%d: Can't handle geometry type %s: ", jp->line, geometry_type->value.string.string);
json_context(j);
exit(EXIT_JSON);
}
std::string layername = "unknown";
json_object *tippecanoe = json_hash_get(j, "tippecanoe");
json_object *layer = NULL;
if (tippecanoe != NULL) {
layer = json_hash_get(tippecanoe, "layer");
if (layer != NULL && layer->type == JSON_STRING) {
layername = std::string(layer->value.string.string);
}
}
auto ts = layermap.find(layername);
if (ts == layermap.end()) {
fprintf(stderr, "Internal error: layer %s not found\n", layername.c_str());
exit(EXIT_IMPOSSIBLE);
if (ret.count(layername) == 0) {
mvt_layer l;
l.name = layername;
l.version = 2;
l.extent = extent;
ret.insert(std::pair<std::string, mvt_layer>(layername, l));
}
if (z < ts->second.minzoom) {
ts->second.minzoom = z;
}
if (z > ts->second.maxzoom) {
ts->second.maxzoom = z;
auto l = ret.find(layername);
drawvec dv;
parse_geometry(t, coordinates, dv, VT_MOVETO, "Filter output", jp->line, j);
if (mb_geometry[t] == VT_POLYGON) {
dv = fix_polygon(dv);
}
for (auto const &feature : layer.features) {
// Scale and offset geometry from global to tile
for (size_t i = 0; i < dv.size(); i++) {
long long scale = 1LL << (32 - z);
dv[i].x = std::round((dv[i].x - scale * x) * extent / (double) scale);
dv[i].y = std::round((dv[i].y - scale * y) * extent / (double) scale);
}
if (mb_geometry[t] == VT_POLYGON) {
// we can try scaling up because these are tile coordinates
dv = clean_or_clip_poly(dv, 0, 0, false, true);
if (dv.size() < 3) {
dv.clear();
}
}
dv = remove_noop(dv, mb_geometry[t], 0);
if (mb_geometry[t] == VT_POLYGON) {
dv = close_poly(dv);
}
if (dv.size() > 0) {
mvt_feature feature;
feature.type = mb_geometry[t];
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;
}
feature.has_id = true;
}
std::map<std::string, layermap_entry> &layermap = (*layermaps)[tiling_seg];
if (layermap.count(layername) == 0) {
layermap_entry lme = layermap_entry(layermap.size());
lme.minzoom = z;
lme.maxzoom = z;
layermap.insert(std::pair<std::string, layermap_entry>(layername, lme));
if (lme.id >= (*layer_unmaps)[tiling_seg].size()) {
(*layer_unmaps)[tiling_seg].resize(lme.id + 1);
(*layer_unmaps)[tiling_seg][lme.id] = layername;
}
}
auto ts = layermap.find(layername);
if (ts == layermap.end()) {
fprintf(stderr, "Internal error: layer %s not found\n", layername.c_str());
exit(EXIT_IMPOSSIBLE);
}
if (z < ts->second.minzoom) {
ts->second.minzoom = z;
}
if (z > ts->second.maxzoom) {
ts->second.maxzoom = z;
}
if (feature.type == mvt_point) {
ts->second.points++;
} else if (feature.type == mvt_linestring) {
@@ -127,21 +263,37 @@ std::vector<mvt_layer> parse_layers(int fd, int z, unsigned x, unsigned y, std::
ts->second.polygons++;
}
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
const std::string &key = layer.keys[feature.tags[i]];
const mvt_value &val = layer.values[feature.tags[i + 1]];
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);
// Nulls can be excluded here because this is the postfilter
// and it is nearly time to create the vector representation
if (val.type != mvt_null) {
add_to_tilestats(ts->second.tilestats, key, mvt_value_to_serial_val(val));
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);
add_to_tilestats(ts->second.tilestats, std::string(properties->value.object.keys[i]->value.string.string), sv);
}
}
l->second.features.push_back(feature);
}
json_free(j);
}
return out;
json_end(jp);
if (fclose(f) != 0) {
perror("fclose postfilter output");
exit(EXIT_CLOSE);
}
std::vector<mvt_layer> final;
for (auto a : ret) {
final.push_back(a.second);
}
return final;
}
// Reads from the prefilter
@@ -225,7 +377,7 @@ serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::
drawvec dv;
parse_geometry(t, coordinates, dv, VT_MOVETO, "Filter output", jp->line, j);
if (mb_geometry[t] == VT_POLYGON) {
dv = fix_polygon(dv, false, false);
dv = fix_polygon(dv);
}
// Scale and offset geometry from global to tile
-190
View File
@@ -166,193 +166,3 @@ serial_val stringify_value(json_object *value, const char *reading, int line, js
return sv;
}
// XXX deduplicate
static std::vector<mvt_geometry> to_feature(drawvec &geom) {
std::vector<mvt_geometry> out;
for (size_t i = 0; i < geom.size(); i++) {
out.push_back(mvt_geometry(geom[i].op, geom[i].x, geom[i].y));
}
return out;
}
std::vector<mvt_layer> parse_layers(FILE *fp, int z, unsigned x, unsigned y, int extent) {
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);
while (1) {
json_object *j = json_read(jp);
if (j == NULL) {
if (jp->error != NULL) {
fprintf(stderr, "Filter output:%d: %s: ", jp->line, jp->error);
if (jp->root != NULL) {
json_context(jp->root);
} else {
fprintf(stderr, "\n");
}
exit(EXIT_JSON);
}
json_free(jp->root);
break;
}
json_object *type = json_hash_get(j, "type");
if (type == NULL || type->type != JSON_STRING) {
continue;
}
if (strcmp(type->value.string.string, "Feature") != 0) {
continue;
}
json_object *geometry = json_hash_get(j, "geometry");
if (geometry == NULL) {
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)) {
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) {
fprintf(stderr, "Filter output:%d: null geometry (additional not reported): ", jp->line);
json_context(j);
exit(EXIT_JSON);
}
if (geometry_type->type != JSON_STRING) {
fprintf(stderr, "Filter output:%d: geometry type is not a string: ", jp->line);
json_context(j);
exit(EXIT_JSON);
}
json_object *coordinates = json_hash_get(geometry, "coordinates");
if (coordinates == NULL || coordinates->type != JSON_ARRAY) {
fprintf(stderr, "Filter output:%d: feature without coordinates array: ", jp->line);
json_context(j);
exit(EXIT_JSON);
}
int t;
for (t = 0; t < GEOM_TYPES; t++) {
if (strcmp(geometry_type->value.string.string, geometry_names[t]) == 0) {
break;
}
}
if (t >= GEOM_TYPES) {
fprintf(stderr, "Filter output:%d: Can't handle geometry type %s: ", jp->line, geometry_type->value.string.string);
json_context(j);
exit(EXIT_JSON);
}
std::string layername = "unknown";
json_object *tippecanoe = json_hash_get(j, "tippecanoe");
json_object *layer = NULL;
if (tippecanoe != NULL) {
layer = json_hash_get(tippecanoe, "layer");
if (layer != NULL && layer->type == JSON_STRING) {
layername = std::string(layer->value.string.string);
}
}
if (ret.count(layername) == 0) {
mvt_layer l;
l.name = layername;
l.version = 2;
l.extent = extent;
ret.insert(std::pair<std::string, mvt_layer>(layername, l));
}
auto l = ret.find(layername);
drawvec dv;
parse_geometry(t, coordinates, dv, VT_MOVETO, "Filter output", jp->line, j);
if (mb_geometry[t] == VT_POLYGON) {
dv = fix_polygon(dv, false, false);
}
// Offset and scale geometry from global to tile
for (size_t i = 0; i < dv.size(); i++) {
long long scale = 1LL << (32 - z);
// offset
dv[i].x -= scale * x;
dv[i].y -= scale * y;
// handle longitude wraparound
if (dv[i].x > 2 * scale && dv[i].x - (1LL << 32) > -3 * scale) {
dv[i].x -= 1LL << 32;
}
if (dv[i].x < -3 * scale && dv[i].x + (1LL << 32) < 2 * scale) {
dv[i].x += 1LL << 32;
}
// scale
dv[i].x = std::round(dv[i].x * extent / (double) scale);
dv[i].y = std::round(dv[i].y * extent / (double) scale);
}
if (mb_geometry[t] == VT_POLYGON) {
// we can try scaling up because these are tile coordinates
dv = clean_or_clip_poly(dv, 0, 0, false, true);
if (dv.size() < 3) {
dv.clear();
}
}
dv = remove_noop(dv, mb_geometry[t], 0);
if (mb_geometry[t] == VT_POLYGON) {
dv = close_poly(dv);
}
if (dv.size() > 0) {
mvt_feature feature;
feature.type = mb_geometry[t];
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;
}
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);
// 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);
}
}
l->second.features.push_back(feature);
}
json_free(j);
}
json_end(jp);
std::vector<mvt_layer> final;
for (auto a : ret) {
final.push_back(a.second);
}
return final;
}
-1
View File
@@ -12,6 +12,5 @@ extern int mb_geometry[GEOM_TYPES];
void json_context(json_object *j);
void parse_geometry(int t, json_object *j, drawvec &out, int op, const char *fname, int line, json_object *feature);
std::vector<mvt_layer> parse_layers(FILE *fp, int z, unsigned x, unsigned y, int extent);
serial_val stringify_value(json_object *value, const char *reading, int line, json_object *feature);
+4 -10
View File
@@ -460,7 +460,7 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
// This has to happen after scaling so that the wraparound detection has happened first.
// Otherwise the inner/outer calculation will be confused by bad geometries.
if (sf.t == VT_POLYGON) {
scaled_geometry = fix_polygon(scaled_geometry, prevent[P_USE_SOURCE_POLYGON_WINDING], prevent[P_REVERSE_SOURCE_POLYGON_WINDING]);
scaled_geometry = fix_polygon(scaled_geometry);
}
for (auto &c : clipbboxes) {
@@ -681,7 +681,7 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
// keep old behavior, which loses one bit of precision at the bottom
midx = (sf.bbox[0] / 2 + sf.bbox[2] / 2) & ((1LL << 32) - 1);
midy = (sf.bbox[1] / 2 + sf.bbox[3] / 2) & ((1LL << 32) - 1);
} else if ((additional[A_DROP_DENSEST_AS_NEEDED] || additional[A_COALESCE_DENSEST_AS_NEEDED]) && sf.t == VT_POLYGON) {
} else if ((additional[A_DROP_DENSEST_AS_NEEDED] || additional[A_COALESCE_DENSEST_AS_NEEDED] || additional[A_DROP_SPARSEST_AS_NEEDED] || additional[A_COALESCE_SPARSEST_AS_NEEDED]) && sf.t == VT_POLYGON) {
// This probably should really apply to all polygons,
// but I hate to change the feature sequence in all the
// test fixtures again
@@ -713,14 +713,6 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
}
bbox_index = encode_index(midx, midy);
if (additional[A_CALCULATE_INDEX]) {
sf.full_keys.push_back("tippecanoe:index");
serial_val sv;
sv.type = mvt_double;
sv.s = std::to_string(bbox_index);
sf.full_values.push_back(sv);
}
if (sf.t == VT_POLYGON && additional[A_GENERATE_POLYGON_LABEL_POINTS]) {
drawvec dv = polygon_to_anchor(scaled_geometry);
@@ -733,6 +725,8 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
if (additional[A_DROP_DENSEST_AS_NEEDED] ||
additional[A_COALESCE_DENSEST_AS_NEEDED] ||
additional[A_DROP_SPARSEST_AS_NEEDED] ||
additional[A_COALESCE_SPARSEST_AS_NEEDED] ||
additional[A_CLUSTER_DENSEST_AS_NEEDED] ||
additional[A_CALCULATE_FEATURE_DENSITY] ||
additional[A_DROP_SMALLEST_AS_NEEDED] ||
@@ -9,7 +9,7 @@
"maxzoom": "0",
"minzoom": "0",
"name": "tests/loop/out/-z0_-O200_--cluster-densest-as-needed.json.check.mbtiles",
"strategies": "[{\"coalesced_as_needed\":999,\"feature_count_desired\":1000}]",
"strategies": "[{\"coalesced_as_needed\":999,\"feature_count_desired\":201}]",
"type": "overlay",
"version": "2"
}, "features": [
@@ -9,7 +9,7 @@
"maxzoom": "0",
"minzoom": "0",
"name": "tests/loop/out/-z0_-O200_--drop-densest-as-needed.json.check.mbtiles",
"strategies": "[{\"dropped_as_needed\":999,\"feature_count_desired\":1000}]",
"strategies": "[{\"dropped_as_needed\":999,\"feature_count_desired\":201}]",
"type": "overlay",
"version": "2"
}, "features": [
@@ -9,7 +9,7 @@
"maxzoom": "0",
"minzoom": "0",
"name": "tests/loop/out/-z0_-O200_--drop-fraction-as-needed.json.check.mbtiles",
"strategies": "[{\"dropped_as_needed\":999,\"feature_count_desired\":1000}]",
"strategies": "[{\"dropped_as_needed\":999,\"feature_count_desired\":201}]",
"type": "overlay",
"version": "2"
}, "features": [
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
-57
View File
@@ -1,57 +0,0 @@
{ "type": "FeatureCollection", "properties": { "zoom": 11, "x": 327, "y": 791 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "muni", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { "ZCTA5CE10": "94132", "GEOID10": "94132", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 8078894, "AWATER10": 1299131, "INTPTLAT10": "+37.7222142", "INTPTLON10": "-122.4840831", "tippecanoe:count": 163 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.490005, 37.738006 ], [ -122.488461, 37.737055 ], [ -122.486229, 37.736784 ], [ -122.483311, 37.737463 ], [ -122.482452, 37.737463 ], [ -122.481766, 37.737191 ], [ -122.475414, 37.737463 ], [ -122.475243, 37.734612 ], [ -122.475071, 37.734747 ], [ -122.471638, 37.734747 ], [ -122.471981, 37.731082 ], [ -122.472153, 37.731082 ], [ -122.472496, 37.721578 ], [ -122.464428, 37.721713 ], [ -122.463913, 37.722392 ], [ -122.462196, 37.723071 ], [ -122.462196, 37.721713 ], [ -122.462711, 37.721713 ], [ -122.462711, 37.718590 ], [ -122.462540, 37.711257 ], [ -122.460823, 37.710578 ], [ -122.464256, 37.710578 ], [ -122.465973, 37.710171 ], [ -122.467690, 37.709220 ], [ -122.468891, 37.708270 ], [ -122.497730, 37.708134 ], [ -122.498245, 37.708134 ], [ -122.498245, 37.710714 ], [ -122.498417, 37.714924 ], [ -122.498760, 37.715875 ], [ -122.499962, 37.717504 ], [ -122.500305, 37.718590 ], [ -122.500477, 37.720627 ], [ -122.502708, 37.723343 ], [ -122.503052, 37.724022 ], [ -122.503052, 37.725244 ], [ -122.503567, 37.725379 ], [ -122.505283, 37.726330 ], [ -122.506313, 37.727416 ], [ -122.507172, 37.732575 ], [ -122.506828, 37.735426 ], [ -122.505283, 37.735426 ], [ -122.505283, 37.735562 ], [ -122.502022, 37.735562 ], [ -122.500477, 37.735155 ], [ -122.498589, 37.734204 ], [ -122.496872, 37.733933 ], [ -122.491379, 37.734069 ], [ -122.491379, 37.737327 ], [ -122.490349, 37.737870 ], [ -122.490005, 37.738006 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94112", "GEOID10": "94112", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 8720166, "AWATER10": 0, "INTPTLAT10": "+37.7203669", "INTPTLON10": "-122.4429361", "tippecanoe:count": 259 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.426662, 37.736376 ], [ -122.426491, 37.736241 ], [ -122.427349, 37.735698 ], [ -122.424946, 37.735562 ], [ -122.423916, 37.734612 ], [ -122.422886, 37.734340 ], [ -122.422199, 37.735155 ], [ -122.421856, 37.735155 ], [ -122.421856, 37.734612 ], [ -122.420139, 37.732983 ], [ -122.418251, 37.732983 ], [ -122.418938, 37.732847 ], [ -122.418938, 37.732168 ], [ -122.415161, 37.732168 ], [ -122.421684, 37.731761 ], [ -122.421684, 37.731082 ], [ -122.420139, 37.731489 ], [ -122.420483, 37.728910 ], [ -122.423744, 37.728774 ], [ -122.423058, 37.727280 ], [ -122.424088, 37.725923 ], [ -122.423573, 37.725651 ], [ -122.422886, 37.723886 ], [ -122.423744, 37.723750 ], [ -122.424774, 37.722121 ], [ -122.424603, 37.721713 ], [ -122.426319, 37.718590 ], [ -122.427349, 37.715060 ], [ -122.425632, 37.714517 ], [ -122.426662, 37.711257 ], [ -122.427177, 37.711257 ], [ -122.426147, 37.710986 ], [ -122.426662, 37.710171 ], [ -122.429924, 37.711529 ], [ -122.430096, 37.710850 ], [ -122.429237, 37.709628 ], [ -122.428379, 37.709220 ], [ -122.428379, 37.708405 ], [ -122.434044, 37.708134 ], [ -122.440395, 37.708405 ], [ -122.452240, 37.708134 ], [ -122.468891, 37.708270 ], [ -122.467690, 37.709220 ], [ -122.465973, 37.710171 ], [ -122.464256, 37.710578 ], [ -122.460823, 37.710578 ], [ -122.462540, 37.711257 ], [ -122.462711, 37.718590 ], [ -122.462711, 37.721713 ], [ -122.462196, 37.721713 ], [ -122.462196, 37.725244 ], [ -122.462711, 37.725515 ], [ -122.462540, 37.727145 ], [ -122.462025, 37.727416 ], [ -122.460823, 37.727552 ], [ -122.460995, 37.728638 ], [ -122.459965, 37.728774 ], [ -122.459965, 37.729860 ], [ -122.459278, 37.730810 ], [ -122.457390, 37.730675 ], [ -122.457561, 37.731082 ], [ -122.453442, 37.731625 ], [ -122.453442, 37.730675 ], [ -122.444344, 37.730675 ], [ -122.444344, 37.728231 ], [ -122.443657, 37.728366 ], [ -122.439537, 37.730131 ], [ -122.435932, 37.731625 ], [ -122.435074, 37.731489 ], [ -122.432156, 37.732983 ], [ -122.431984, 37.732983 ], [ -122.432327, 37.733254 ], [ -122.428551, 37.735019 ], [ -122.426662, 37.736376 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94134", "GEOID10": "94134", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6210550, "AWATER10": 90877, "INTPTLAT10": "+37.7210461", "INTPTLON10": "-122.4135554", "tippecanoe:count": 124 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.406921, 37.738006 ], [ -122.406578, 37.735698 ], [ -122.405033, 37.733661 ], [ -122.402802, 37.729317 ], [ -122.398853, 37.718590 ], [ -122.397995, 37.715467 ], [ -122.398510, 37.715467 ], [ -122.396450, 37.712887 ], [ -122.395763, 37.710850 ], [ -122.394047, 37.711257 ], [ -122.390785, 37.711122 ], [ -122.390957, 37.710307 ], [ -122.393703, 37.708270 ], [ -122.423744, 37.708270 ], [ -122.428379, 37.708405 ], [ -122.428379, 37.709220 ], [ -122.429237, 37.709628 ], [ -122.430096, 37.710850 ], [ -122.429924, 37.711529 ], [ -122.426662, 37.710171 ], [ -122.426147, 37.710986 ], [ -122.427177, 37.711257 ], [ -122.426662, 37.711257 ], [ -122.425632, 37.714517 ], [ -122.427349, 37.715060 ], [ -122.426319, 37.718590 ], [ -122.424603, 37.721713 ], [ -122.424774, 37.722121 ], [ -122.423744, 37.723750 ], [ -122.422886, 37.723886 ], [ -122.423573, 37.725651 ], [ -122.424088, 37.725923 ], [ -122.423058, 37.727280 ], [ -122.423744, 37.728774 ], [ -122.420483, 37.728910 ], [ -122.420139, 37.731489 ], [ -122.421684, 37.731082 ], [ -122.421684, 37.731761 ], [ -122.419453, 37.732032 ], [ -122.416019, 37.732032 ], [ -122.414474, 37.732439 ], [ -122.409496, 37.735019 ], [ -122.408466, 37.736241 ], [ -122.408295, 37.737598 ], [ -122.406921, 37.738006 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94124", "GEOID10": "94124", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 12765980, "AWATER10": 2804039, "INTPTLAT10": "+37.7288947", "INTPTLON10": "-122.3827787", "tippecanoe:count": 314 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.377911, 37.753615 ], [ -122.376022, 37.752530 ], [ -122.373104, 37.746015 ], [ -122.367611, 37.740178 ], [ -122.368298, 37.739770 ], [ -122.373447, 37.739635 ], [ -122.373962, 37.739499 ], [ -122.373447, 37.738684 ], [ -122.372761, 37.738277 ], [ -122.367439, 37.738277 ], [ -122.370701, 37.737327 ], [ -122.371216, 37.737055 ], [ -122.372932, 37.737055 ], [ -122.373619, 37.737191 ], [ -122.375679, 37.738413 ], [ -122.376366, 37.738413 ], [ -122.376537, 37.738277 ], [ -122.376022, 37.738006 ], [ -122.375164, 37.737870 ], [ -122.374821, 37.737327 ], [ -122.375164, 37.736241 ], [ -122.376022, 37.735833 ], [ -122.375851, 37.735019 ], [ -122.375336, 37.735426 ], [ -122.374821, 37.734883 ], [ -122.375164, 37.734612 ], [ -122.374821, 37.734476 ], [ -122.374992, 37.733933 ], [ -122.375679, 37.732711 ], [ -122.375164, 37.732983 ], [ -122.374992, 37.732711 ], [ -122.374649, 37.732847 ], [ -122.374821, 37.732575 ], [ -122.374134, 37.732575 ], [ -122.373447, 37.732983 ], [ -122.372589, 37.733933 ], [ -122.371902, 37.734204 ], [ -122.369671, 37.732304 ], [ -122.367096, 37.735426 ], [ -122.367439, 37.735426 ], [ -122.367096, 37.735562 ], [ -122.366753, 37.735426 ], [ -122.366924, 37.734883 ], [ -122.369499, 37.732439 ], [ -122.369499, 37.732168 ], [ -122.368813, 37.731896 ], [ -122.368641, 37.732304 ], [ -122.368298, 37.732304 ], [ -122.367439, 37.731896 ], [ -122.366753, 37.732168 ], [ -122.365208, 37.733797 ], [ -122.366581, 37.732168 ], [ -122.365379, 37.732983 ], [ -122.366238, 37.731896 ], [ -122.366066, 37.731896 ], [ -122.365036, 37.732847 ], [ -122.365723, 37.731761 ], [ -122.365723, 37.731625 ], [ -122.364864, 37.732575 ], [ -122.365036, 37.732032 ], [ -122.363663, 37.731218 ], [ -122.362804, 37.732168 ], [ -122.362633, 37.732032 ], [ -122.363319, 37.731082 ], [ -122.362804, 37.730810 ], [ -122.362118, 37.731625 ], [ -122.361774, 37.731489 ], [ -122.362633, 37.730675 ], [ -122.361946, 37.730131 ], [ -122.360916, 37.729860 ], [ -122.360744, 37.730267 ], [ -122.359886, 37.730267 ], [ -122.358856, 37.729724 ], [ -122.359028, 37.729453 ], [ -122.361946, 37.728774 ], [ -122.362289, 37.728502 ], [ -122.361431, 37.728502 ], [ -122.357655, 37.729453 ], [ -122.357483, 37.729181 ], [ -122.357826, 37.728910 ], [ -122.360401, 37.728231 ], [ -122.359886, 37.728095 ], [ -122.357140, 37.728774 ], [ -122.356968, 37.728774 ], [ -122.357140, 37.727959 ], [ -122.356796, 37.727959 ], [ -122.358170, 37.718590 ], [ -122.358513, 37.715875 ], [ -122.360401, 37.708270 ], [ -122.381001, 37.708405 ], [ -122.393703, 37.708270 ], [ -122.390957, 37.710307 ], [ -122.390785, 37.711122 ], [ -122.394047, 37.711257 ], [ -122.395763, 37.710850 ], [ -122.396450, 37.712887 ], [ -122.398510, 37.715467 ], [ -122.397995, 37.715467 ], [ -122.398853, 37.718590 ], [ -122.402802, 37.729317 ], [ -122.405033, 37.733661 ], [ -122.406578, 37.735698 ], [ -122.406921, 37.738006 ], [ -122.407780, 37.737734 ], [ -122.407951, 37.737870 ], [ -122.407951, 37.739227 ], [ -122.407436, 37.741399 ], [ -122.405891, 37.743435 ], [ -122.406235, 37.743571 ], [ -122.405376, 37.744521 ], [ -122.405205, 37.744386 ], [ -122.404003, 37.748322 ], [ -122.405033, 37.749136 ], [ -122.402973, 37.749544 ], [ -122.402115, 37.749408 ], [ -122.395248, 37.749815 ], [ -122.395248, 37.751308 ], [ -122.393188, 37.751444 ], [ -122.393188, 37.749951 ], [ -122.386494, 37.750358 ], [ -122.386837, 37.752937 ], [ -122.381001, 37.753208 ], [ -122.377911, 37.753615 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94129", "GEOID10": "94129", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 5968455, "AWATER10": 14697, "INTPTLAT10": "+37.7973402", "INTPTLON10": "-122.4644664", "tippecanoe:count": 70 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.477818, 37.811005 ], [ -122.476444, 37.810869 ], [ -122.476101, 37.809648 ], [ -122.474728, 37.809241 ], [ -122.472668, 37.808970 ], [ -122.470608, 37.808563 ], [ -122.469234, 37.807750 ], [ -122.468719, 37.807071 ], [ -122.468376, 37.806800 ], [ -122.468204, 37.806936 ], [ -122.468204, 37.806665 ], [ -122.466660, 37.805851 ], [ -122.463570, 37.804901 ], [ -122.461681, 37.804901 ], [ -122.458420, 37.805444 ], [ -122.454472, 37.806529 ], [ -122.452412, 37.806258 ], [ -122.448120, 37.806936 ], [ -122.448120, 37.806393 ], [ -122.448463, 37.806122 ], [ -122.448292, 37.804766 ], [ -122.451553, 37.803409 ], [ -122.450180, 37.802867 ], [ -122.450008, 37.802460 ], [ -122.447605, 37.800697 ], [ -122.447262, 37.798527 ], [ -122.448120, 37.798255 ], [ -122.448292, 37.797848 ], [ -122.447948, 37.797441 ], [ -122.448635, 37.797441 ], [ -122.448635, 37.797034 ], [ -122.447948, 37.796899 ], [ -122.447948, 37.796492 ], [ -122.448978, 37.796356 ], [ -122.447433, 37.795814 ], [ -122.447433, 37.795542 ], [ -122.447777, 37.795407 ], [ -122.448635, 37.795542 ], [ -122.448978, 37.795000 ], [ -122.448635, 37.794728 ], [ -122.447948, 37.793101 ], [ -122.448463, 37.792829 ], [ -122.448635, 37.791880 ], [ -122.470951, 37.787267 ], [ -122.473354, 37.787132 ], [ -122.475586, 37.786725 ], [ -122.479877, 37.786860 ], [ -122.483826, 37.787674 ], [ -122.484512, 37.789167 ], [ -122.483997, 37.789709 ], [ -122.484341, 37.790116 ], [ -122.484341, 37.789709 ], [ -122.485027, 37.789574 ], [ -122.485886, 37.790795 ], [ -122.483654, 37.794050 ], [ -122.482109, 37.798527 ], [ -122.481766, 37.798527 ], [ -122.481937, 37.798798 ], [ -122.481594, 37.798798 ], [ -122.481766, 37.798933 ], [ -122.480221, 37.801375 ], [ -122.479877, 37.802867 ], [ -122.478676, 37.805444 ], [ -122.478333, 37.808156 ], [ -122.477818, 37.808428 ], [ -122.477989, 37.810598 ], [ -122.477646, 37.810598 ], [ -122.477818, 37.811005 ] ], [ [ -122.452583, 37.803274 ], [ -122.452412, 37.803138 ], [ -122.450008, 37.802460 ], [ -122.451210, 37.803138 ], [ -122.452583, 37.803274 ] ] ], [ [ [ -122.466145, 37.806393 ], [ -122.465973, 37.806258 ], [ -122.466660, 37.805851 ], [ -122.466145, 37.806393 ] ] ], [ [ [ -122.469921, 37.809377 ], [ -122.469406, 37.809106 ], [ -122.470093, 37.809241 ], [ -122.469921, 37.809377 ] ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94123", "GEOID10": "94123", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 2646572, "AWATER10": 218721, "INTPTLAT10": "+37.8009336", "INTPTLON10": "-122.4383664", "tippecanoe:count": 108 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.443142, 37.809784 ], [ -122.439537, 37.808835 ], [ -122.440910, 37.806936 ], [ -122.435760, 37.807614 ], [ -122.435589, 37.807207 ], [ -122.435589, 37.806936 ], [ -122.433014, 37.807343 ], [ -122.433014, 37.807071 ], [ -122.434387, 37.806936 ], [ -122.434044, 37.806800 ], [ -122.433014, 37.806936 ], [ -122.432842, 37.806800 ], [ -122.434044, 37.806665 ], [ -122.434044, 37.806393 ], [ -122.433872, 37.806122 ], [ -122.433872, 37.805851 ], [ -122.433701, 37.805580 ], [ -122.432671, 37.805715 ], [ -122.432327, 37.805986 ], [ -122.431641, 37.803274 ], [ -122.425289, 37.804088 ], [ -122.424946, 37.803138 ], [ -122.426491, 37.803003 ], [ -122.426319, 37.802053 ], [ -122.424774, 37.802324 ], [ -122.424603, 37.801239 ], [ -122.426147, 37.801104 ], [ -122.425976, 37.800154 ], [ -122.424431, 37.800426 ], [ -122.423744, 37.796628 ], [ -122.433529, 37.795407 ], [ -122.433357, 37.794457 ], [ -122.434902, 37.794322 ], [ -122.435074, 37.795271 ], [ -122.436790, 37.795000 ], [ -122.436619, 37.794050 ], [ -122.440739, 37.793508 ], [ -122.440910, 37.794457 ], [ -122.441769, 37.794322 ], [ -122.441597, 37.793372 ], [ -122.446404, 37.792829 ], [ -122.446232, 37.791880 ], [ -122.447605, 37.791744 ], [ -122.448635, 37.794728 ], [ -122.448978, 37.795000 ], [ -122.448635, 37.795542 ], [ -122.447777, 37.795407 ], [ -122.447433, 37.795542 ], [ -122.447433, 37.795814 ], [ -122.448978, 37.796356 ], [ -122.447948, 37.796492 ], [ -122.447948, 37.796899 ], [ -122.448635, 37.797034 ], [ -122.448635, 37.797441 ], [ -122.447948, 37.797441 ], [ -122.448292, 37.797848 ], [ -122.448120, 37.798255 ], [ -122.447262, 37.798527 ], [ -122.447605, 37.800697 ], [ -122.450008, 37.802460 ], [ -122.450180, 37.802867 ], [ -122.451553, 37.803409 ], [ -122.448292, 37.804766 ], [ -122.448463, 37.806122 ], [ -122.448120, 37.806393 ], [ -122.448120, 37.806936 ], [ -122.448635, 37.808563 ], [ -122.443142, 37.809784 ] ] ], [ [ [ -122.432842, 37.805986 ], [ -122.432842, 37.805851 ], [ -122.433872, 37.805851 ], [ -122.432842, 37.805986 ] ] ], [ [ [ -122.433529, 37.807614 ], [ -122.433529, 37.807478 ], [ -122.435589, 37.807207 ], [ -122.433529, 37.807614 ] ] ], [ [ [ -122.452583, 37.803274 ], [ -122.451210, 37.803138 ], [ -122.450008, 37.802460 ], [ -122.452583, 37.803274 ] ] ], [ [ [ -122.432842, 37.806393 ], [ -122.432842, 37.806122 ], [ -122.433872, 37.806122 ], [ -122.432842, 37.806393 ] ] ], [ [ [ -122.432842, 37.806665 ], [ -122.432842, 37.806529 ], [ -122.434044, 37.806393 ], [ -122.432842, 37.806665 ] ] ], [ [ [ -122.433701, 37.808156 ], [ -122.433701, 37.807885 ], [ -122.433872, 37.807885 ], [ -122.433701, 37.808156 ] ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94121", "GEOID10": "94121", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 7980073, "AWATER10": 61283, "INTPTLAT10": "+37.7767691", "INTPTLON10": "-122.4947073", "tippecanoe:count": 196 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.485886, 37.790795 ], [ -122.485027, 37.789574 ], [ -122.484341, 37.789709 ], [ -122.484341, 37.790116 ], [ -122.483997, 37.789709 ], [ -122.484512, 37.789167 ], [ -122.483826, 37.787674 ], [ -122.479877, 37.786860 ], [ -122.476616, 37.786860 ], [ -122.475586, 37.773021 ], [ -122.471638, 37.773157 ], [ -122.471809, 37.772750 ], [ -122.472496, 37.772343 ], [ -122.474899, 37.772479 ], [ -122.478676, 37.772207 ], [ -122.479191, 37.771936 ], [ -122.479362, 37.771258 ], [ -122.478333, 37.769358 ], [ -122.478161, 37.767729 ], [ -122.477303, 37.766237 ], [ -122.477303, 37.765423 ], [ -122.510262, 37.763930 ], [ -122.510433, 37.767322 ], [ -122.511120, 37.771258 ], [ -122.513180, 37.770715 ], [ -122.513180, 37.776007 ], [ -122.513351, 37.777363 ], [ -122.514553, 37.778449 ], [ -122.514553, 37.779263 ], [ -122.514896, 37.779670 ], [ -122.514553, 37.779941 ], [ -122.514553, 37.780484 ], [ -122.514725, 37.781162 ], [ -122.514210, 37.781434 ], [ -122.513695, 37.781434 ], [ -122.513523, 37.782655 ], [ -122.513180, 37.782790 ], [ -122.513008, 37.783197 ], [ -122.512493, 37.783740 ], [ -122.512665, 37.784147 ], [ -122.512150, 37.783740 ], [ -122.511978, 37.784283 ], [ -122.511292, 37.784283 ], [ -122.511292, 37.784554 ], [ -122.509747, 37.784825 ], [ -122.509060, 37.785639 ], [ -122.508030, 37.786182 ], [ -122.507000, 37.787403 ], [ -122.506485, 37.787539 ], [ -122.506142, 37.787810 ], [ -122.505970, 37.788217 ], [ -122.502708, 37.788081 ], [ -122.500477, 37.788353 ], [ -122.500134, 37.788624 ], [ -122.499962, 37.788488 ], [ -122.499619, 37.788760 ], [ -122.499447, 37.788488 ], [ -122.498589, 37.788353 ], [ -122.498074, 37.787946 ], [ -122.497559, 37.787946 ], [ -122.497387, 37.787539 ], [ -122.496529, 37.787267 ], [ -122.494812, 37.787810 ], [ -122.494640, 37.788081 ], [ -122.493954, 37.787539 ], [ -122.493439, 37.787674 ], [ -122.492752, 37.787946 ], [ -122.492409, 37.787810 ], [ -122.491207, 37.788217 ], [ -122.489834, 37.789438 ], [ -122.488976, 37.789302 ], [ -122.487946, 37.789574 ], [ -122.487431, 37.789438 ], [ -122.485886, 37.790795 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94118", "GEOID10": "94118", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 5047718, "AWATER10": 59174, "INTPTLAT10": "+37.7800933", "INTPTLON10": "-122.4626054", "tippecanoe:count": 186 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.447948, 37.793101 ], [ -122.446575, 37.786318 ], [ -122.447605, 37.785097 ], [ -122.446404, 37.785368 ], [ -122.445889, 37.782519 ], [ -122.444515, 37.782519 ], [ -122.443829, 37.781841 ], [ -122.445545, 37.781298 ], [ -122.445374, 37.780077 ], [ -122.446232, 37.779941 ], [ -122.446060, 37.778720 ], [ -122.445374, 37.778856 ], [ -122.444859, 37.776007 ], [ -122.446404, 37.775871 ], [ -122.446918, 37.777635 ], [ -122.453270, 37.776821 ], [ -122.452755, 37.775057 ], [ -122.463741, 37.773564 ], [ -122.464600, 37.772479 ], [ -122.459106, 37.771258 ], [ -122.459621, 37.770579 ], [ -122.464428, 37.769629 ], [ -122.467003, 37.768001 ], [ -122.469063, 37.769086 ], [ -122.471294, 37.769086 ], [ -122.472324, 37.768544 ], [ -122.472668, 37.767594 ], [ -122.473183, 37.767051 ], [ -122.477303, 37.766101 ], [ -122.478161, 37.767729 ], [ -122.478333, 37.769358 ], [ -122.479362, 37.771258 ], [ -122.479191, 37.771936 ], [ -122.478676, 37.772207 ], [ -122.474899, 37.772479 ], [ -122.472496, 37.772343 ], [ -122.471981, 37.772479 ], [ -122.471638, 37.773021 ], [ -122.471638, 37.773157 ], [ -122.475586, 37.773021 ], [ -122.476616, 37.786860 ], [ -122.475586, 37.786725 ], [ -122.473354, 37.787132 ], [ -122.470951, 37.787267 ], [ -122.459450, 37.789709 ], [ -122.448978, 37.791744 ], [ -122.448635, 37.792015 ], [ -122.448292, 37.792965 ], [ -122.447948, 37.793101 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94117", "GEOID10": "94117", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 4373050, "AWATER10": 1625, "INTPTLAT10": "+37.7694362", "INTPTLON10": "-122.4476618", "tippecanoe:count": 200 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.430096, 37.778856 ], [ -122.428379, 37.770443 ], [ -122.429237, 37.770308 ], [ -122.429066, 37.769493 ], [ -122.435760, 37.769086 ], [ -122.435589, 37.767322 ], [ -122.438164, 37.767187 ], [ -122.438507, 37.766237 ], [ -122.439537, 37.766644 ], [ -122.441254, 37.765287 ], [ -122.443314, 37.765287 ], [ -122.442970, 37.763523 ], [ -122.443829, 37.763251 ], [ -122.445374, 37.761894 ], [ -122.446747, 37.761758 ], [ -122.446404, 37.760944 ], [ -122.447090, 37.759723 ], [ -122.447605, 37.759180 ], [ -122.448463, 37.759044 ], [ -122.448635, 37.759587 ], [ -122.451553, 37.759451 ], [ -122.453270, 37.759180 ], [ -122.453957, 37.758773 ], [ -122.454987, 37.758773 ], [ -122.455330, 37.759044 ], [ -122.456532, 37.759180 ], [ -122.456875, 37.759859 ], [ -122.456017, 37.760266 ], [ -122.455845, 37.760808 ], [ -122.456703, 37.761080 ], [ -122.457905, 37.760944 ], [ -122.459106, 37.761894 ], [ -122.457047, 37.761894 ], [ -122.456360, 37.762573 ], [ -122.456017, 37.763794 ], [ -122.456017, 37.764065 ], [ -122.457561, 37.763523 ], [ -122.457733, 37.765965 ], [ -122.458420, 37.766101 ], [ -122.461166, 37.766237 ], [ -122.477303, 37.765423 ], [ -122.477474, 37.766101 ], [ -122.475243, 37.766508 ], [ -122.472839, 37.767322 ], [ -122.472324, 37.768544 ], [ -122.471294, 37.769086 ], [ -122.469063, 37.769086 ], [ -122.467003, 37.768001 ], [ -122.464428, 37.769629 ], [ -122.461853, 37.770308 ], [ -122.459965, 37.770443 ], [ -122.459106, 37.771258 ], [ -122.464600, 37.772479 ], [ -122.463741, 37.773564 ], [ -122.452755, 37.775057 ], [ -122.453270, 37.776821 ], [ -122.446918, 37.777635 ], [ -122.446404, 37.775871 ], [ -122.444859, 37.776007 ], [ -122.445030, 37.776956 ], [ -122.441597, 37.777363 ], [ -122.441425, 37.776414 ], [ -122.440395, 37.776549 ], [ -122.439880, 37.776685 ], [ -122.440052, 37.777635 ], [ -122.430096, 37.778856 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94115", "GEOID10": "94115", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 2889809, "AWATER10": 0, "INTPTLAT10": "+37.7859692", "INTPTLON10": "-122.4372531", "tippecanoe:count": 131 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.430267, 37.795814 ], [ -122.426834, 37.779263 ], [ -122.428207, 37.779127 ], [ -122.428036, 37.778177 ], [ -122.429237, 37.778042 ], [ -122.429924, 37.777906 ], [ -122.430096, 37.778856 ], [ -122.440052, 37.777635 ], [ -122.439880, 37.776685 ], [ -122.440395, 37.776549 ], [ -122.441425, 37.776414 ], [ -122.441597, 37.777363 ], [ -122.445030, 37.776956 ], [ -122.445374, 37.778856 ], [ -122.446060, 37.778720 ], [ -122.446232, 37.779941 ], [ -122.445374, 37.780077 ], [ -122.445545, 37.781298 ], [ -122.443829, 37.781841 ], [ -122.444515, 37.782519 ], [ -122.445889, 37.782519 ], [ -122.446404, 37.785368 ], [ -122.447605, 37.785097 ], [ -122.446575, 37.786318 ], [ -122.447605, 37.791744 ], [ -122.446232, 37.791880 ], [ -122.446404, 37.792829 ], [ -122.441597, 37.793372 ], [ -122.441769, 37.794322 ], [ -122.440910, 37.794457 ], [ -122.440739, 37.793508 ], [ -122.436619, 37.794050 ], [ -122.436790, 37.795000 ], [ -122.435074, 37.795271 ], [ -122.434902, 37.794322 ], [ -122.433357, 37.794457 ], [ -122.433529, 37.795407 ], [ -122.430267, 37.795814 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94131", "GEOID10": "94131", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 5379947, "AWATER10": 50540, "INTPTLAT10": "+37.7459165", "INTPTLON10": "-122.4414731", "tippecanoe:count": 181 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.456017, 37.764065 ], [ -122.456360, 37.762573 ], [ -122.457047, 37.761894 ], [ -122.459106, 37.761894 ], [ -122.457905, 37.760944 ], [ -122.456703, 37.761080 ], [ -122.455845, 37.760808 ], [ -122.456017, 37.760266 ], [ -122.456875, 37.759859 ], [ -122.456875, 37.759451 ], [ -122.455845, 37.759044 ], [ -122.455330, 37.759044 ], [ -122.454987, 37.758773 ], [ -122.453785, 37.758773 ], [ -122.452927, 37.758094 ], [ -122.453785, 37.757416 ], [ -122.453270, 37.756737 ], [ -122.452412, 37.757008 ], [ -122.452068, 37.756601 ], [ -122.451038, 37.756737 ], [ -122.450352, 37.757416 ], [ -122.447948, 37.757551 ], [ -122.446918, 37.756601 ], [ -122.445889, 37.756466 ], [ -122.445030, 37.756601 ], [ -122.444515, 37.756466 ], [ -122.444172, 37.755923 ], [ -122.444000, 37.754158 ], [ -122.442970, 37.754023 ], [ -122.442455, 37.754430 ], [ -122.442284, 37.755108 ], [ -122.442970, 37.755516 ], [ -122.441254, 37.756194 ], [ -122.441082, 37.755923 ], [ -122.441082, 37.756194 ], [ -122.440052, 37.756330 ], [ -122.440052, 37.755787 ], [ -122.440395, 37.755108 ], [ -122.442455, 37.752394 ], [ -122.442799, 37.752394 ], [ -122.443485, 37.749408 ], [ -122.444344, 37.748322 ], [ -122.444172, 37.747508 ], [ -122.444859, 37.746965 ], [ -122.444515, 37.746693 ], [ -122.444000, 37.746829 ], [ -122.442455, 37.748186 ], [ -122.441425, 37.748593 ], [ -122.438164, 37.748729 ], [ -122.438164, 37.747779 ], [ -122.424946, 37.748593 ], [ -122.423916, 37.740856 ], [ -122.425117, 37.737870 ], [ -122.427864, 37.735562 ], [ -122.432327, 37.733254 ], [ -122.431984, 37.732983 ], [ -122.432156, 37.732983 ], [ -122.435074, 37.731489 ], [ -122.435932, 37.731625 ], [ -122.439537, 37.730131 ], [ -122.443657, 37.728366 ], [ -122.444344, 37.728231 ], [ -122.444344, 37.734612 ], [ -122.445374, 37.734612 ], [ -122.446232, 37.735155 ], [ -122.446404, 37.735562 ], [ -122.446060, 37.735562 ], [ -122.444687, 37.737598 ], [ -122.442455, 37.737598 ], [ -122.442627, 37.739499 ], [ -122.444000, 37.740042 ], [ -122.444687, 37.740856 ], [ -122.446060, 37.741128 ], [ -122.446232, 37.742078 ], [ -122.446575, 37.742485 ], [ -122.449150, 37.742892 ], [ -122.450180, 37.743571 ], [ -122.451725, 37.745607 ], [ -122.449493, 37.746693 ], [ -122.450867, 37.746965 ], [ -122.452068, 37.748322 ], [ -122.452068, 37.751172 ], [ -122.452927, 37.751172 ], [ -122.453098, 37.749001 ], [ -122.454128, 37.749001 ], [ -122.453957, 37.750629 ], [ -122.454472, 37.751308 ], [ -122.454643, 37.751308 ], [ -122.454643, 37.747100 ], [ -122.455502, 37.747100 ], [ -122.455845, 37.746422 ], [ -122.458763, 37.746829 ], [ -122.459106, 37.747236 ], [ -122.458763, 37.747643 ], [ -122.458591, 37.748051 ], [ -122.460308, 37.749815 ], [ -122.461338, 37.751308 ], [ -122.463398, 37.753073 ], [ -122.463741, 37.753615 ], [ -122.463570, 37.756330 ], [ -122.462540, 37.756737 ], [ -122.463226, 37.758773 ], [ -122.459965, 37.759316 ], [ -122.460651, 37.760537 ], [ -122.460823, 37.762573 ], [ -122.456017, 37.764065 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94109", "GEOID10": "94109", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 3077724, "AWATER10": 295382, "INTPTLAT10": "+37.7953881", "INTPTLON10": "-122.4224441", "tippecanoe:count": 229 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.420998, 37.812903 ], [ -122.419968, 37.808835 ], [ -122.419281, 37.808428 ], [ -122.419109, 37.807750 ], [ -122.420826, 37.807614 ], [ -122.420483, 37.806665 ], [ -122.418938, 37.806800 ], [ -122.418251, 37.803681 ], [ -122.418079, 37.803138 ], [ -122.419796, 37.802867 ], [ -122.419624, 37.802053 ], [ -122.417908, 37.802189 ], [ -122.417221, 37.798527 ], [ -122.415504, 37.798662 ], [ -122.413960, 37.790523 ], [ -122.412243, 37.790659 ], [ -122.411728, 37.788217 ], [ -122.412415, 37.788081 ], [ -122.412415, 37.787810 ], [ -122.413273, 37.787674 ], [ -122.413101, 37.786725 ], [ -122.414818, 37.786453 ], [ -122.414303, 37.783740 ], [ -122.419109, 37.783062 ], [ -122.418938, 37.782112 ], [ -122.420483, 37.781976 ], [ -122.420826, 37.782926 ], [ -122.422543, 37.782655 ], [ -122.422371, 37.781705 ], [ -122.423916, 37.781569 ], [ -122.424088, 37.782519 ], [ -122.427349, 37.782112 ], [ -122.430267, 37.795814 ], [ -122.423744, 37.796628 ], [ -122.424431, 37.800426 ], [ -122.425976, 37.800154 ], [ -122.426147, 37.801104 ], [ -122.424603, 37.801239 ], [ -122.424774, 37.802324 ], [ -122.426319, 37.802053 ], [ -122.426491, 37.803003 ], [ -122.424946, 37.803138 ], [ -122.425289, 37.804088 ], [ -122.431641, 37.803274 ], [ -122.432327, 37.805986 ], [ -122.432156, 37.806122 ], [ -122.432671, 37.808428 ], [ -122.432327, 37.808563 ], [ -122.431984, 37.807207 ], [ -122.431469, 37.807343 ], [ -122.431812, 37.808970 ], [ -122.431297, 37.809106 ], [ -122.430954, 37.807343 ], [ -122.430267, 37.807478 ], [ -122.430611, 37.809106 ], [ -122.430096, 37.809241 ], [ -122.429752, 37.807885 ], [ -122.428207, 37.808428 ], [ -122.427006, 37.808156 ], [ -122.427521, 37.808699 ], [ -122.428036, 37.808563 ], [ -122.427521, 37.808835 ], [ -122.426834, 37.808156 ], [ -122.426491, 37.809920 ], [ -122.425804, 37.810462 ], [ -122.424946, 37.810733 ], [ -122.425976, 37.812089 ], [ -122.425117, 37.812632 ], [ -122.420998, 37.812903 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94108", "GEOID10": "94108", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 698151, "AWATER10": 0, "INTPTLAT10": "+37.7920162", "INTPTLON10": "-122.4085835", "tippecanoe:count": 67 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.404346, 37.796356 ], [ -122.403316, 37.795542 ], [ -122.405033, 37.795271 ], [ -122.403488, 37.787810 ], [ -122.404690, 37.786725 ], [ -122.406406, 37.786589 ], [ -122.406750, 37.788488 ], [ -122.408466, 37.788353 ], [ -122.408638, 37.789167 ], [ -122.411900, 37.788760 ], [ -122.412243, 37.790659 ], [ -122.413960, 37.790523 ], [ -122.414818, 37.795000 ], [ -122.404346, 37.796356 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94104", "GEOID10": "94104", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 200857, "AWATER10": 0, "INTPTLAT10": "+37.7914115", "INTPTLON10": "-122.4021291", "tippecanoe:count": 25 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.401257, 37.794050 ], [ -122.401257, 37.793508 ], [ -122.400055, 37.793643 ], [ -122.399540, 37.791337 ], [ -122.399197, 37.791066 ], [ -122.403488, 37.787810 ], [ -122.404690, 37.793508 ], [ -122.401257, 37.794050 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94114", "GEOID10": "94114", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 3692567, "AWATER10": 0, "INTPTLAT10": "+37.7580586", "INTPTLON10": "-122.4354080", "tippecanoe:count": 206 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.428379, 37.770443 ], [ -122.428207, 37.769493 ], [ -122.426319, 37.769629 ], [ -122.427006, 37.769222 ], [ -122.426662, 37.768951 ], [ -122.426491, 37.765830 ], [ -122.427692, 37.765694 ], [ -122.427521, 37.764608 ], [ -122.426319, 37.764608 ], [ -122.426319, 37.763930 ], [ -122.427177, 37.763794 ], [ -122.427177, 37.762980 ], [ -122.426319, 37.762980 ], [ -122.426147, 37.762166 ], [ -122.424774, 37.748593 ], [ -122.438164, 37.747779 ], [ -122.438164, 37.748729 ], [ -122.441425, 37.748593 ], [ -122.442455, 37.748186 ], [ -122.444000, 37.746829 ], [ -122.444515, 37.746693 ], [ -122.444859, 37.746965 ], [ -122.444172, 37.747508 ], [ -122.444344, 37.748322 ], [ -122.443485, 37.749408 ], [ -122.442799, 37.752394 ], [ -122.442455, 37.752394 ], [ -122.440395, 37.755108 ], [ -122.440052, 37.755787 ], [ -122.440052, 37.756330 ], [ -122.441082, 37.756194 ], [ -122.441082, 37.756058 ], [ -122.441254, 37.756194 ], [ -122.442970, 37.755516 ], [ -122.442284, 37.755108 ], [ -122.442455, 37.754430 ], [ -122.442970, 37.754023 ], [ -122.444000, 37.754158 ], [ -122.444172, 37.755923 ], [ -122.444687, 37.756601 ], [ -122.445889, 37.756466 ], [ -122.446918, 37.756601 ], [ -122.447948, 37.757551 ], [ -122.450352, 37.757416 ], [ -122.451038, 37.756737 ], [ -122.452068, 37.756601 ], [ -122.452412, 37.757008 ], [ -122.453270, 37.756737 ], [ -122.453785, 37.757416 ], [ -122.452927, 37.758094 ], [ -122.453957, 37.758773 ], [ -122.453270, 37.759180 ], [ -122.451553, 37.759451 ], [ -122.448635, 37.759587 ], [ -122.448463, 37.759044 ], [ -122.447605, 37.759180 ], [ -122.447090, 37.759723 ], [ -122.446404, 37.760944 ], [ -122.446747, 37.761758 ], [ -122.445374, 37.761894 ], [ -122.443829, 37.763251 ], [ -122.442970, 37.763523 ], [ -122.443314, 37.765287 ], [ -122.441254, 37.765287 ], [ -122.439537, 37.766644 ], [ -122.438507, 37.766237 ], [ -122.438164, 37.767187 ], [ -122.435589, 37.767322 ], [ -122.435760, 37.769086 ], [ -122.429066, 37.769493 ], [ -122.429237, 37.770308 ], [ -122.428379, 37.770443 ] ] ], [ [ [ -122.441597, 37.755108 ], [ -122.442799, 37.752530 ], [ -122.442455, 37.753751 ], [ -122.441597, 37.755108 ] ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94102", "GEOID10": "94102", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 1732577, "AWATER10": 0, "INTPTLAT10": "+37.7795835", "INTPTLON10": "-122.4193398", "tippecanoe:count": 134 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.408638, 37.789167 ], [ -122.408466, 37.788353 ], [ -122.406750, 37.788488 ], [ -122.406406, 37.786589 ], [ -122.404690, 37.786725 ], [ -122.408638, 37.783604 ], [ -122.408638, 37.783469 ], [ -122.409153, 37.783197 ], [ -122.426319, 37.769629 ], [ -122.428207, 37.769493 ], [ -122.429924, 37.777906 ], [ -122.428036, 37.778177 ], [ -122.428207, 37.779127 ], [ -122.426834, 37.779263 ], [ -122.427349, 37.782112 ], [ -122.424088, 37.782519 ], [ -122.423916, 37.781569 ], [ -122.422371, 37.781705 ], [ -122.422543, 37.782655 ], [ -122.420826, 37.782926 ], [ -122.420654, 37.781976 ], [ -122.418938, 37.782112 ], [ -122.419109, 37.783062 ], [ -122.414303, 37.783740 ], [ -122.414818, 37.786453 ], [ -122.413101, 37.786725 ], [ -122.413273, 37.787674 ], [ -122.412415, 37.787810 ], [ -122.412415, 37.788081 ], [ -122.411728, 37.788217 ], [ -122.411900, 37.788760 ], [ -122.408638, 37.789167 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94105", "GEOID10": "94105", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 942025, "AWATER10": 223684, "INTPTLAT10": "+37.7896493", "INTPTLON10": "-122.3930670", "tippecanoe:count": 127 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.388897, 37.796628 ], [ -122.385120, 37.791337 ], [ -122.385635, 37.790930 ], [ -122.385464, 37.790523 ], [ -122.386322, 37.790252 ], [ -122.387867, 37.788760 ], [ -122.387695, 37.787132 ], [ -122.388554, 37.786996 ], [ -122.392159, 37.784147 ], [ -122.392330, 37.784283 ], [ -122.391472, 37.785097 ], [ -122.391472, 37.785639 ], [ -122.390099, 37.786725 ], [ -122.391815, 37.785504 ], [ -122.393360, 37.784961 ], [ -122.394218, 37.785097 ], [ -122.394047, 37.785232 ], [ -122.395592, 37.786318 ], [ -122.397823, 37.784690 ], [ -122.399368, 37.785911 ], [ -122.400398, 37.785097 ], [ -122.402630, 37.786725 ], [ -122.401772, 37.787267 ], [ -122.402802, 37.788081 ], [ -122.403488, 37.787810 ], [ -122.396278, 37.793372 ], [ -122.396622, 37.794593 ], [ -122.394390, 37.795000 ], [ -122.392502, 37.793643 ], [ -122.392159, 37.793915 ], [ -122.391472, 37.793915 ], [ -122.388897, 37.796628 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94107", "GEOID10": "94107", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 4647665, "AWATER10": 227634, "INTPTLAT10": "+37.7604596", "INTPTLON10": "-122.3997237", "tippecanoe:count": 236 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.385120, 37.791337 ], [ -122.381687, 37.783469 ], [ -122.384777, 37.782790 ], [ -122.384777, 37.782519 ], [ -122.387867, 37.782248 ], [ -122.387695, 37.781841 ], [ -122.385635, 37.781976 ], [ -122.385464, 37.781841 ], [ -122.384777, 37.781841 ], [ -122.385464, 37.781705 ], [ -122.385464, 37.781569 ], [ -122.387695, 37.781434 ], [ -122.387524, 37.781027 ], [ -122.384777, 37.781298 ], [ -122.384777, 37.781027 ], [ -122.387524, 37.780891 ], [ -122.387524, 37.780484 ], [ -122.387524, 37.780077 ], [ -122.387524, 37.779670 ], [ -122.387352, 37.779263 ], [ -122.387352, 37.778992 ], [ -122.384777, 37.779127 ], [ -122.384777, 37.778992 ], [ -122.387352, 37.778856 ], [ -122.387352, 37.778585 ], [ -122.387352, 37.778313 ], [ -122.387695, 37.778313 ], [ -122.387695, 37.778177 ], [ -122.390442, 37.777092 ], [ -122.390442, 37.776956 ], [ -122.390270, 37.776685 ], [ -122.392502, 37.775192 ], [ -122.394218, 37.776414 ], [ -122.396450, 37.774650 ], [ -122.396107, 37.774514 ], [ -122.397480, 37.773429 ], [ -122.397823, 37.772343 ], [ -122.398510, 37.772886 ], [ -122.400742, 37.771122 ], [ -122.396622, 37.767865 ], [ -122.393875, 37.766101 ], [ -122.393703, 37.764065 ], [ -122.387867, 37.764337 ], [ -122.387524, 37.760537 ], [ -122.386665, 37.760673 ], [ -122.386322, 37.758094 ], [ -122.385464, 37.758094 ], [ -122.384777, 37.757687 ], [ -122.381344, 37.757959 ], [ -122.381344, 37.756466 ], [ -122.381172, 37.755923 ], [ -122.380829, 37.755516 ], [ -122.380829, 37.755244 ], [ -122.384090, 37.754973 ], [ -122.384090, 37.754701 ], [ -122.383404, 37.754701 ], [ -122.382889, 37.754430 ], [ -122.381516, 37.754566 ], [ -122.380142, 37.754566 ], [ -122.379971, 37.753344 ], [ -122.386837, 37.752937 ], [ -122.386494, 37.750358 ], [ -122.393188, 37.749951 ], [ -122.393188, 37.751444 ], [ -122.395248, 37.751308 ], [ -122.395248, 37.749815 ], [ -122.403831, 37.749408 ], [ -122.402973, 37.752801 ], [ -122.403316, 37.756194 ], [ -122.403831, 37.757144 ], [ -122.406063, 37.759180 ], [ -122.406578, 37.760673 ], [ -122.405376, 37.763116 ], [ -122.405033, 37.764608 ], [ -122.401600, 37.764880 ], [ -122.401428, 37.763523 ], [ -122.400570, 37.763658 ], [ -122.400742, 37.766237 ], [ -122.399712, 37.766237 ], [ -122.399712, 37.766644 ], [ -122.400742, 37.767458 ], [ -122.401772, 37.767458 ], [ -122.402115, 37.769901 ], [ -122.403488, 37.769765 ], [ -122.403831, 37.770036 ], [ -122.399368, 37.773564 ], [ -122.402458, 37.776007 ], [ -122.401943, 37.776414 ], [ -122.403145, 37.777363 ], [ -122.403660, 37.776956 ], [ -122.405548, 37.778449 ], [ -122.395592, 37.786318 ], [ -122.394047, 37.785232 ], [ -122.394218, 37.785097 ], [ -122.393360, 37.784961 ], [ -122.391815, 37.785504 ], [ -122.391472, 37.785639 ], [ -122.391472, 37.785097 ], [ -122.392330, 37.784283 ], [ -122.392159, 37.784147 ], [ -122.388554, 37.786996 ], [ -122.387695, 37.787132 ], [ -122.387867, 37.788760 ], [ -122.386322, 37.790252 ], [ -122.385464, 37.790523 ], [ -122.385635, 37.790930 ], [ -122.385120, 37.791337 ] ] ], [ [ [ -122.384777, 37.779941 ], [ -122.384777, 37.779670 ], [ -122.387524, 37.779670 ], [ -122.384777, 37.779941 ] ] ], [ [ [ -122.384777, 37.780348 ], [ -122.384777, 37.780077 ], [ -122.387524, 37.780077 ], [ -122.384777, 37.780348 ] ] ], [ [ [ -122.384777, 37.780755 ], [ -122.384777, 37.780484 ], [ -122.387524, 37.780484 ], [ -122.384777, 37.780755 ] ] ], [ [ [ -122.384777, 37.779534 ], [ -122.384777, 37.779263 ], [ -122.387352, 37.779263 ], [ -122.384777, 37.779534 ] ] ], [ [ [ -122.385120, 37.778856 ], [ -122.385120, 37.778585 ], [ -122.387352, 37.778585 ], [ -122.385120, 37.778856 ] ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94116", "GEOID10": "94116", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6699058, "AWATER10": 97204, "INTPTLAT10": "+37.7453994", "INTPTLON10": "-122.4860655", "tippecanoe:count": 193 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.510433, 37.764065 ], [ -122.509918, 37.763930 ], [ -122.508202, 37.751037 ], [ -122.470951, 37.752665 ], [ -122.471123, 37.753480 ], [ -122.470951, 37.754837 ], [ -122.470093, 37.754701 ], [ -122.470264, 37.753887 ], [ -122.469578, 37.753615 ], [ -122.469063, 37.752937 ], [ -122.468376, 37.753208 ], [ -122.467861, 37.752665 ], [ -122.463398, 37.753073 ], [ -122.461338, 37.751308 ], [ -122.460308, 37.749815 ], [ -122.458591, 37.748051 ], [ -122.458763, 37.747643 ], [ -122.459450, 37.747100 ], [ -122.459106, 37.746829 ], [ -122.460823, 37.745336 ], [ -122.461338, 37.745607 ], [ -122.463741, 37.743707 ], [ -122.467690, 37.743435 ], [ -122.468548, 37.741535 ], [ -122.471294, 37.741399 ], [ -122.470951, 37.737598 ], [ -122.470608, 37.736648 ], [ -122.471638, 37.734747 ], [ -122.475071, 37.734747 ], [ -122.475243, 37.734612 ], [ -122.475414, 37.737463 ], [ -122.481766, 37.737191 ], [ -122.482452, 37.737463 ], [ -122.483311, 37.737463 ], [ -122.486229, 37.736784 ], [ -122.488461, 37.737055 ], [ -122.490005, 37.738006 ], [ -122.491379, 37.737327 ], [ -122.491379, 37.734069 ], [ -122.496872, 37.733933 ], [ -122.498589, 37.734204 ], [ -122.500477, 37.735155 ], [ -122.502022, 37.735562 ], [ -122.505283, 37.735562 ], [ -122.505283, 37.735426 ], [ -122.506828, 37.735426 ], [ -122.506657, 37.736241 ], [ -122.510433, 37.764065 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94122", "GEOID10": "94122", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6124844, "AWATER10": 0, "INTPTLAT10": "+37.7587992", "INTPTLON10": "-122.4851269", "tippecanoe:count": 226 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.458763, 37.766237 ], [ -122.457733, 37.765965 ], [ -122.457561, 37.763523 ], [ -122.460823, 37.762573 ], [ -122.460651, 37.760537 ], [ -122.459965, 37.759316 ], [ -122.463226, 37.758773 ], [ -122.462540, 37.756737 ], [ -122.463570, 37.756330 ], [ -122.463741, 37.753751 ], [ -122.463398, 37.753073 ], [ -122.467861, 37.752665 ], [ -122.468376, 37.753208 ], [ -122.469063, 37.752937 ], [ -122.469578, 37.753615 ], [ -122.470264, 37.753887 ], [ -122.470093, 37.754701 ], [ -122.470951, 37.754837 ], [ -122.471123, 37.753480 ], [ -122.470951, 37.752665 ], [ -122.508202, 37.751037 ], [ -122.509918, 37.764065 ], [ -122.461166, 37.766237 ], [ -122.458763, 37.766237 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94127", "GEOID10": "94127", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 4585709, "AWATER10": 9359, "INTPTLAT10": "+37.7360266", "INTPTLON10": "-122.4572070", "tippecanoe:count": 169 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.454472, 37.751308 ], [ -122.453957, 37.750629 ], [ -122.454128, 37.749001 ], [ -122.453098, 37.749001 ], [ -122.452927, 37.751172 ], [ -122.452068, 37.751172 ], [ -122.452068, 37.748322 ], [ -122.450867, 37.746965 ], [ -122.449493, 37.746693 ], [ -122.451725, 37.745607 ], [ -122.450180, 37.743571 ], [ -122.449150, 37.742892 ], [ -122.446575, 37.742485 ], [ -122.446232, 37.742078 ], [ -122.446060, 37.741128 ], [ -122.444687, 37.740856 ], [ -122.444000, 37.740042 ], [ -122.442799, 37.739770 ], [ -122.442455, 37.739499 ], [ -122.442627, 37.738277 ], [ -122.442455, 37.737598 ], [ -122.444687, 37.737598 ], [ -122.446060, 37.735562 ], [ -122.446404, 37.735562 ], [ -122.446232, 37.735155 ], [ -122.445374, 37.734612 ], [ -122.444344, 37.734612 ], [ -122.444344, 37.730675 ], [ -122.453442, 37.730675 ], [ -122.453442, 37.731625 ], [ -122.457561, 37.731082 ], [ -122.457390, 37.730675 ], [ -122.459278, 37.730810 ], [ -122.459965, 37.729860 ], [ -122.459965, 37.728774 ], [ -122.460995, 37.728638 ], [ -122.460823, 37.727552 ], [ -122.462025, 37.727416 ], [ -122.462540, 37.727145 ], [ -122.462711, 37.725515 ], [ -122.462196, 37.725244 ], [ -122.462196, 37.723071 ], [ -122.463913, 37.722392 ], [ -122.464428, 37.721713 ], [ -122.472496, 37.721578 ], [ -122.471981, 37.728774 ], [ -122.472324, 37.728774 ], [ -122.471809, 37.734204 ], [ -122.470608, 37.736648 ], [ -122.470951, 37.737598 ], [ -122.471294, 37.741399 ], [ -122.468548, 37.741535 ], [ -122.467690, 37.743435 ], [ -122.463741, 37.743707 ], [ -122.461338, 37.745607 ], [ -122.460823, 37.745336 ], [ -122.459106, 37.746829 ], [ -122.459450, 37.747100 ], [ -122.459106, 37.747236 ], [ -122.458763, 37.746829 ], [ -122.455845, 37.746422 ], [ -122.455502, 37.747100 ], [ -122.454643, 37.747100 ], [ -122.454643, 37.751308 ], [ -122.454472, 37.751308 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94130", "GEOID10": "94130", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 2281270, "AWATER10": 0, "INTPTLAT10": "+37.8206879", "INTPTLON10": "-122.3695372", "tippecanoe:count": 43 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.373276, 37.832294 ], [ -122.368641, 37.831209 ], [ -122.362804, 37.822667 ], [ -122.363491, 37.820904 ], [ -122.360573, 37.820090 ], [ -122.360573, 37.819819 ], [ -122.363663, 37.820497 ], [ -122.364349, 37.818734 ], [ -122.364864, 37.818463 ], [ -122.365036, 37.818463 ], [ -122.371044, 37.816022 ], [ -122.370358, 37.814259 ], [ -122.369671, 37.813310 ], [ -122.368984, 37.812768 ], [ -122.367268, 37.812361 ], [ -122.366066, 37.812768 ], [ -122.364178, 37.813988 ], [ -122.362289, 37.814124 ], [ -122.361603, 37.814531 ], [ -122.359200, 37.815073 ], [ -122.359028, 37.814802 ], [ -122.358856, 37.814259 ], [ -122.359200, 37.813446 ], [ -122.361088, 37.812496 ], [ -122.361259, 37.810733 ], [ -122.360916, 37.808156 ], [ -122.361603, 37.808021 ], [ -122.362118, 37.807071 ], [ -122.362804, 37.807207 ], [ -122.367268, 37.807750 ], [ -122.368641, 37.808156 ], [ -122.371559, 37.809377 ], [ -122.372761, 37.810869 ], [ -122.372761, 37.811276 ], [ -122.372246, 37.811276 ], [ -122.371731, 37.812361 ], [ -122.371559, 37.813039 ], [ -122.371731, 37.813446 ], [ -122.371387, 37.813581 ], [ -122.371216, 37.814531 ], [ -122.371387, 37.815209 ], [ -122.379112, 37.826870 ], [ -122.377567, 37.830531 ], [ -122.373276, 37.832294 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94133", "GEOID10": "94133", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 1955594, "AWATER10": 646917, "INTPTLAT10": "+37.8045315", "INTPTLON10": "-122.4108520", "tippecanoe:count": 138 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.420998, 37.812903 ], [ -122.407436, 37.812768 ], [ -122.398510, 37.807207 ], [ -122.402287, 37.805173 ], [ -122.403488, 37.805037 ], [ -122.403488, 37.805308 ], [ -122.404518, 37.806122 ], [ -122.405720, 37.806665 ], [ -122.405891, 37.806529 ], [ -122.405376, 37.805715 ], [ -122.405205, 37.804766 ], [ -122.405891, 37.804630 ], [ -122.405720, 37.803816 ], [ -122.405033, 37.803816 ], [ -122.404861, 37.802867 ], [ -122.403145, 37.803138 ], [ -122.401943, 37.796899 ], [ -122.403488, 37.796628 ], [ -122.403488, 37.796356 ], [ -122.414818, 37.795000 ], [ -122.415504, 37.798662 ], [ -122.417221, 37.798527 ], [ -122.417908, 37.802189 ], [ -122.419624, 37.802053 ], [ -122.419796, 37.802867 ], [ -122.418079, 37.803138 ], [ -122.418251, 37.803681 ], [ -122.418938, 37.806800 ], [ -122.420483, 37.806665 ], [ -122.420826, 37.807614 ], [ -122.419109, 37.807750 ], [ -122.419281, 37.808428 ], [ -122.419968, 37.808835 ], [ -122.420998, 37.812903 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94111", "GEOID10": "94111", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 891134, "AWATER10": 494314, "INTPTLAT10": "+37.7993699", "INTPTLON10": "-122.3984087", "tippecanoe:count": 63 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.398510, 37.807207 ], [ -122.393360, 37.801918 ], [ -122.388897, 37.796628 ], [ -122.391472, 37.793915 ], [ -122.392159, 37.793915 ], [ -122.392502, 37.793643 ], [ -122.394390, 37.795000 ], [ -122.396622, 37.794593 ], [ -122.396278, 37.793372 ], [ -122.399197, 37.791066 ], [ -122.399540, 37.791337 ], [ -122.400055, 37.793643 ], [ -122.401257, 37.793508 ], [ -122.401257, 37.794050 ], [ -122.404690, 37.793508 ], [ -122.405033, 37.795271 ], [ -122.403316, 37.795542 ], [ -122.404346, 37.796356 ], [ -122.403488, 37.796356 ], [ -122.403488, 37.796628 ], [ -122.401943, 37.796899 ], [ -122.403145, 37.803138 ], [ -122.404861, 37.802867 ], [ -122.405033, 37.803816 ], [ -122.405548, 37.803681 ], [ -122.405720, 37.803816 ], [ -122.405891, 37.804630 ], [ -122.405205, 37.804766 ], [ -122.405376, 37.805715 ], [ -122.405891, 37.806529 ], [ -122.405720, 37.806665 ], [ -122.404346, 37.805986 ], [ -122.403488, 37.805308 ], [ -122.403488, 37.805037 ], [ -122.402287, 37.805173 ], [ -122.398510, 37.807207 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94103", "GEOID10": "94103", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 3518047, "AWATER10": 0, "INTPTLAT10": "+37.7731516", "INTPTLON10": "-122.4111634", "tippecanoe:count": 205 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.402802, 37.788081 ], [ -122.401772, 37.787267 ], [ -122.402630, 37.786725 ], [ -122.400398, 37.785097 ], [ -122.399368, 37.785911 ], [ -122.397823, 37.784690 ], [ -122.405548, 37.778449 ], [ -122.403660, 37.776956 ], [ -122.403145, 37.777363 ], [ -122.401943, 37.776414 ], [ -122.402458, 37.776007 ], [ -122.399368, 37.773564 ], [ -122.403831, 37.770036 ], [ -122.403488, 37.769765 ], [ -122.402115, 37.769901 ], [ -122.401772, 37.767458 ], [ -122.400742, 37.767458 ], [ -122.399712, 37.766644 ], [ -122.399712, 37.766237 ], [ -122.400742, 37.766237 ], [ -122.400570, 37.763658 ], [ -122.401428, 37.763523 ], [ -122.401600, 37.764880 ], [ -122.410355, 37.764337 ], [ -122.410526, 37.765558 ], [ -122.427521, 37.764608 ], [ -122.427692, 37.765694 ], [ -122.426491, 37.765830 ], [ -122.426662, 37.768951 ], [ -122.427006, 37.769222 ], [ -122.409153, 37.783197 ], [ -122.408638, 37.783469 ], [ -122.408638, 37.783604 ], [ -122.403488, 37.787810 ], [ -122.402802, 37.788081 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94110", "GEOID10": "94110", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6019827, "AWATER10": 12207, "INTPTLAT10": "+37.7500215", "INTPTLON10": "-122.4152015", "tippecanoe:count": 263 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.410526, 37.765558 ], [ -122.410355, 37.764337 ], [ -122.405033, 37.764608 ], [ -122.405205, 37.763523 ], [ -122.406235, 37.761351 ], [ -122.406578, 37.760266 ], [ -122.405891, 37.758909 ], [ -122.403488, 37.756873 ], [ -122.402973, 37.752801 ], [ -122.403831, 37.749408 ], [ -122.405033, 37.749136 ], [ -122.404003, 37.748322 ], [ -122.404861, 37.745336 ], [ -122.405205, 37.744386 ], [ -122.405376, 37.744521 ], [ -122.406235, 37.743571 ], [ -122.405891, 37.743435 ], [ -122.407436, 37.741399 ], [ -122.407951, 37.739227 ], [ -122.407780, 37.737734 ], [ -122.408295, 37.737598 ], [ -122.408295, 37.736648 ], [ -122.408810, 37.735833 ], [ -122.410011, 37.734747 ], [ -122.414474, 37.732439 ], [ -122.415161, 37.732168 ], [ -122.418938, 37.732168 ], [ -122.418938, 37.732847 ], [ -122.418251, 37.732983 ], [ -122.420139, 37.732983 ], [ -122.421856, 37.734612 ], [ -122.421856, 37.735155 ], [ -122.422199, 37.735155 ], [ -122.422886, 37.734340 ], [ -122.423916, 37.734612 ], [ -122.424946, 37.735562 ], [ -122.427349, 37.735698 ], [ -122.425117, 37.737870 ], [ -122.423916, 37.740856 ], [ -122.424603, 37.744657 ], [ -122.426147, 37.762166 ], [ -122.426319, 37.762980 ], [ -122.427177, 37.762980 ], [ -122.427177, 37.763794 ], [ -122.426319, 37.763930 ], [ -122.426319, 37.764608 ], [ -122.410526, 37.765558 ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94158", "GEOID10": "94158", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 1800349, "AWATER10": 1246229, "INTPTLAT10": "+37.7698930", "INTPTLON10": "-122.3870114", "tippecanoe:count": 28 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.381687, 37.783469 ], [ -122.377911, 37.753615 ], [ -122.379971, 37.753344 ], [ -122.380142, 37.754566 ], [ -122.381516, 37.754566 ], [ -122.382889, 37.754430 ], [ -122.383404, 37.754701 ], [ -122.384090, 37.754701 ], [ -122.384090, 37.754973 ], [ -122.380829, 37.755244 ], [ -122.380829, 37.755516 ], [ -122.381172, 37.755923 ], [ -122.381344, 37.756466 ], [ -122.381344, 37.757959 ], [ -122.384777, 37.757687 ], [ -122.385464, 37.758094 ], [ -122.386322, 37.758094 ], [ -122.386665, 37.760673 ], [ -122.387524, 37.760537 ], [ -122.387867, 37.764337 ], [ -122.393703, 37.764065 ], [ -122.393875, 37.766101 ], [ -122.396622, 37.767865 ], [ -122.400742, 37.771122 ], [ -122.398510, 37.772886 ], [ -122.397823, 37.772343 ], [ -122.397480, 37.773429 ], [ -122.396107, 37.774514 ], [ -122.396450, 37.774650 ], [ -122.394218, 37.776414 ], [ -122.392502, 37.775192 ], [ -122.390270, 37.776685 ], [ -122.390442, 37.776956 ], [ -122.390442, 37.777092 ], [ -122.387695, 37.778177 ], [ -122.387695, 37.778313 ], [ -122.387352, 37.778313 ], [ -122.387352, 37.778585 ], [ -122.387352, 37.778856 ], [ -122.384777, 37.778992 ], [ -122.384777, 37.779127 ], [ -122.387352, 37.778992 ], [ -122.387352, 37.779263 ], [ -122.387524, 37.779670 ], [ -122.387524, 37.780077 ], [ -122.387524, 37.780484 ], [ -122.387524, 37.780891 ], [ -122.384777, 37.781027 ], [ -122.384777, 37.781298 ], [ -122.387524, 37.781027 ], [ -122.387695, 37.781434 ], [ -122.385464, 37.781569 ], [ -122.385464, 37.781705 ], [ -122.384777, 37.781841 ], [ -122.385464, 37.781841 ], [ -122.385635, 37.781976 ], [ -122.387695, 37.781841 ], [ -122.387867, 37.782248 ], [ -122.384777, 37.782519 ], [ -122.384777, 37.782790 ], [ -122.381687, 37.783469 ] ], [ [ -122.384777, 37.779941 ], [ -122.387524, 37.779670 ], [ -122.384777, 37.779670 ], [ -122.384777, 37.779941 ] ], [ [ -122.384777, 37.780348 ], [ -122.387524, 37.780077 ], [ -122.384777, 37.780077 ], [ -122.384777, 37.780348 ] ], [ [ -122.385120, 37.778856 ], [ -122.387352, 37.778585 ], [ -122.385120, 37.778585 ], [ -122.385120, 37.778856 ] ], [ [ -122.384777, 37.779534 ], [ -122.387352, 37.779263 ], [ -122.384777, 37.779263 ], [ -122.384777, 37.779534 ] ], [ [ -122.384777, 37.780755 ], [ -122.387524, 37.780484 ], [ -122.384777, 37.780484 ], [ -122.384777, 37.780755 ] ] ] } }
] }
] }
File diff suppressed because one or more lines are too long
Binary file not shown.
-27
View File
@@ -1,27 +0,0 @@
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94129", "GEOID10": "94129", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 5968455, "AWATER10": 14697, "INTPTLAT10": "+37.7973402", "INTPTLON10": "-122.4644664" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.466660, 37.805851 ], [ -122.463570, 37.804901 ], [ -122.461681, 37.804901 ], [ -122.458420, 37.805444 ], [ -122.454472, 37.806529 ], [ -122.452412, 37.806258 ], [ -122.448120, 37.806936 ], [ -122.448120, 37.806393 ], [ -122.448463, 37.806122 ], [ -122.448292, 37.804766 ], [ -122.451553, 37.803409 ], [ -122.450180, 37.802867 ], [ -122.450008, 37.802460 ], [ -122.447605, 37.800697 ], [ -122.447262, 37.798527 ], [ -122.448120, 37.798255 ], [ -122.448292, 37.797848 ], [ -122.447948, 37.797441 ], [ -122.448635, 37.797441 ], [ -122.448635, 37.797034 ], [ -122.447948, 37.796899 ], [ -122.447948, 37.796492 ], [ -122.448978, 37.796356 ], [ -122.447433, 37.795814 ], [ -122.447433, 37.795542 ], [ -122.447777, 37.795407 ], [ -122.448635, 37.795542 ], [ -122.448978, 37.795000 ], [ -122.448635, 37.794728 ], [ -122.447948, 37.793101 ], [ -122.448463, 37.792829 ], [ -122.448635, 37.791880 ], [ -122.470951, 37.787267 ], [ -122.473354, 37.787132 ], [ -122.475586, 37.786725 ], [ -122.479877, 37.786860 ], [ -122.483826, 37.787674 ], [ -122.484512, 37.789167 ], [ -122.483997, 37.789709 ], [ -122.484341, 37.790116 ], [ -122.484341, 37.789709 ], [ -122.485027, 37.789574 ], [ -122.485886, 37.790795 ], [ -122.483654, 37.794050 ], [ -122.482109, 37.798527 ], [ -122.481766, 37.798527 ], [ -122.481937, 37.798798 ], [ -122.481594, 37.798798 ], [ -122.481766, 37.798933 ], [ -122.480221, 37.801375 ], [ -122.479877, 37.802867 ], [ -122.478676, 37.805444 ], [ -122.478333, 37.808156 ], [ -122.477818, 37.808428 ], [ -122.477989, 37.810598 ], [ -122.477646, 37.810598 ], [ -122.477818, 37.811005 ], [ -122.476444, 37.810869 ], [ -122.476101, 37.809648 ], [ -122.474728, 37.809241 ], [ -122.472668, 37.808970 ], [ -122.470608, 37.808563 ], [ -122.469234, 37.807750 ], [ -122.468719, 37.807071 ], [ -122.468376, 37.806800 ], [ -122.468204, 37.806936 ], [ -122.468204, 37.806665 ], [ -122.466660, 37.805851 ] ], [ [ -122.452583, 37.803274 ], [ -122.452412, 37.803138 ], [ -122.450008, 37.802460 ], [ -122.451210, 37.803138 ], [ -122.452583, 37.803274 ] ] ], [ [ [ -122.466660, 37.805851 ], [ -122.466145, 37.806393 ], [ -122.465973, 37.806258 ], [ -122.466660, 37.805851 ] ] ], [ [ [ -122.469921, 37.809377 ], [ -122.469406, 37.809106 ], [ -122.470093, 37.809241 ], [ -122.469921, 37.809377 ] ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94123", "GEOID10": "94123", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 2646572, "AWATER10": 218721, "INTPTLAT10": "+37.8009336", "INTPTLON10": "-122.4383664" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.435760, 37.807614 ], [ -122.435589, 37.807207 ], [ -122.435589, 37.806936 ], [ -122.433014, 37.807343 ], [ -122.433014, 37.807071 ], [ -122.434387, 37.806936 ], [ -122.434044, 37.806800 ], [ -122.433014, 37.806936 ], [ -122.432842, 37.806800 ], [ -122.434044, 37.806665 ], [ -122.434044, 37.806393 ], [ -122.433872, 37.806122 ], [ -122.433872, 37.805851 ], [ -122.433701, 37.805580 ], [ -122.432671, 37.805715 ], [ -122.432327, 37.805986 ], [ -122.431641, 37.803274 ], [ -122.425289, 37.804088 ], [ -122.424946, 37.803138 ], [ -122.426491, 37.803003 ], [ -122.426319, 37.802053 ], [ -122.424774, 37.802324 ], [ -122.424603, 37.801239 ], [ -122.426147, 37.801104 ], [ -122.425976, 37.800154 ], [ -122.424431, 37.800426 ], [ -122.423744, 37.796628 ], [ -122.433529, 37.795407 ], [ -122.433357, 37.794457 ], [ -122.434902, 37.794322 ], [ -122.435074, 37.795271 ], [ -122.436790, 37.795000 ], [ -122.436619, 37.794050 ], [ -122.440739, 37.793508 ], [ -122.440910, 37.794457 ], [ -122.441769, 37.794322 ], [ -122.441597, 37.793372 ], [ -122.446404, 37.792829 ], [ -122.446232, 37.791880 ], [ -122.447605, 37.791744 ], [ -122.448635, 37.794728 ], [ -122.448978, 37.795000 ], [ -122.448635, 37.795542 ], [ -122.447777, 37.795407 ], [ -122.447433, 37.795542 ], [ -122.447433, 37.795814 ], [ -122.448978, 37.796356 ], [ -122.447948, 37.796492 ], [ -122.447948, 37.796899 ], [ -122.448635, 37.797034 ], [ -122.448635, 37.797441 ], [ -122.447948, 37.797441 ], [ -122.448292, 37.797848 ], [ -122.448120, 37.798255 ], [ -122.447262, 37.798527 ], [ -122.447605, 37.800697 ], [ -122.450008, 37.802460 ], [ -122.450180, 37.802867 ], [ -122.451553, 37.803409 ], [ -122.448292, 37.804766 ], [ -122.448463, 37.806122 ], [ -122.448120, 37.806393 ], [ -122.448120, 37.806936 ], [ -122.448635, 37.808563 ], [ -122.443142, 37.809784 ], [ -122.439537, 37.808835 ], [ -122.440910, 37.806936 ], [ -122.435760, 37.807614 ] ] ], [ [ [ -122.452583, 37.803274 ], [ -122.451210, 37.803138 ], [ -122.450008, 37.802460 ], [ -122.452583, 37.803274 ] ] ], [ [ [ -122.433872, 37.806122 ], [ -122.432842, 37.806393 ], [ -122.432842, 37.806122 ], [ -122.433872, 37.806122 ] ] ], [ [ [ -122.435589, 37.807207 ], [ -122.433529, 37.807614 ], [ -122.433529, 37.807478 ], [ -122.435589, 37.807207 ] ] ], [ [ [ -122.434044, 37.806393 ], [ -122.432842, 37.806665 ], [ -122.432842, 37.806529 ], [ -122.434044, 37.806393 ] ] ], [ [ [ -122.433872, 37.805851 ], [ -122.432842, 37.805986 ], [ -122.432842, 37.805851 ], [ -122.433872, 37.805851 ] ] ], [ [ [ -122.433872, 37.807885 ], [ -122.433701, 37.808156 ], [ -122.433701, 37.807885 ], [ -122.433872, 37.807885 ] ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94121", "GEOID10": "94121", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 7980073, "AWATER10": 61283, "INTPTLAT10": "+37.7767691", "INTPTLON10": "-122.4947073" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.485886, 37.790795 ], [ -122.485027, 37.789574 ], [ -122.484341, 37.789709 ], [ -122.484341, 37.790116 ], [ -122.483997, 37.789709 ], [ -122.484512, 37.789167 ], [ -122.483826, 37.787674 ], [ -122.479877, 37.786860 ], [ -122.476616, 37.786860 ], [ -122.475586, 37.773021 ], [ -122.471638, 37.773157 ], [ -122.471809, 37.772750 ], [ -122.472496, 37.772343 ], [ -122.474899, 37.772479 ], [ -122.478676, 37.772207 ], [ -122.479191, 37.771936 ], [ -122.479362, 37.771258 ], [ -122.478333, 37.769358 ], [ -122.478161, 37.767729 ], [ -122.477303, 37.766237 ], [ -122.477303, 37.765423 ], [ -122.510262, 37.763930 ], [ -122.510433, 37.767322 ], [ -122.511120, 37.771258 ], [ -122.513180, 37.770715 ], [ -122.513180, 37.776007 ], [ -122.513351, 37.777363 ], [ -122.514553, 37.778449 ], [ -122.514553, 37.779263 ], [ -122.514896, 37.779670 ], [ -122.514553, 37.779941 ], [ -122.514553, 37.780484 ], [ -122.514725, 37.781162 ], [ -122.514210, 37.781434 ], [ -122.513695, 37.781434 ], [ -122.513523, 37.782655 ], [ -122.513180, 37.782790 ], [ -122.513008, 37.783197 ], [ -122.512493, 37.783740 ], [ -122.512665, 37.784147 ], [ -122.512150, 37.783740 ], [ -122.511978, 37.784283 ], [ -122.511292, 37.784283 ], [ -122.511292, 37.784554 ], [ -122.509747, 37.784825 ], [ -122.509060, 37.785639 ], [ -122.508030, 37.786182 ], [ -122.507000, 37.787403 ], [ -122.506485, 37.787539 ], [ -122.506142, 37.787810 ], [ -122.505970, 37.788217 ], [ -122.502708, 37.788081 ], [ -122.500477, 37.788353 ], [ -122.500134, 37.788624 ], [ -122.499962, 37.788488 ], [ -122.499619, 37.788760 ], [ -122.499447, 37.788488 ], [ -122.498589, 37.788353 ], [ -122.498074, 37.787946 ], [ -122.497559, 37.787946 ], [ -122.497387, 37.787539 ], [ -122.496529, 37.787267 ], [ -122.494812, 37.787810 ], [ -122.494640, 37.788081 ], [ -122.493954, 37.787539 ], [ -122.493439, 37.787674 ], [ -122.492752, 37.787946 ], [ -122.492409, 37.787810 ], [ -122.491207, 37.788217 ], [ -122.489834, 37.789438 ], [ -122.488976, 37.789302 ], [ -122.487946, 37.789574 ], [ -122.487431, 37.789438 ], [ -122.485886, 37.790795 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94132", "GEOID10": "94132", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 8078894, "AWATER10": 1299131, "INTPTLAT10": "+37.7222142", "INTPTLON10": "-122.4840831" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.490005, 37.738006 ], [ -122.488461, 37.737055 ], [ -122.486229, 37.736784 ], [ -122.483311, 37.737463 ], [ -122.482452, 37.737463 ], [ -122.481766, 37.737191 ], [ -122.475414, 37.737463 ], [ -122.475243, 37.734612 ], [ -122.475071, 37.734747 ], [ -122.471638, 37.734747 ], [ -122.471981, 37.731082 ], [ -122.472153, 37.731082 ], [ -122.472496, 37.721578 ], [ -122.464428, 37.721713 ], [ -122.463913, 37.722392 ], [ -122.462196, 37.723071 ], [ -122.462196, 37.721713 ], [ -122.462711, 37.721713 ], [ -122.462711, 37.718590 ], [ -122.462540, 37.711257 ], [ -122.460823, 37.710578 ], [ -122.464256, 37.710578 ], [ -122.465973, 37.710171 ], [ -122.467690, 37.709220 ], [ -122.468891, 37.708270 ], [ -122.497730, 37.708134 ], [ -122.498245, 37.708134 ], [ -122.498245, 37.710714 ], [ -122.498417, 37.714924 ], [ -122.498760, 37.715875 ], [ -122.499962, 37.717504 ], [ -122.500305, 37.718590 ], [ -122.500477, 37.720627 ], [ -122.502708, 37.723343 ], [ -122.503052, 37.724022 ], [ -122.503052, 37.725244 ], [ -122.503567, 37.725379 ], [ -122.505283, 37.726330 ], [ -122.506313, 37.727416 ], [ -122.507172, 37.732575 ], [ -122.506828, 37.735426 ], [ -122.505283, 37.735426 ], [ -122.505283, 37.735562 ], [ -122.502022, 37.735562 ], [ -122.500477, 37.735155 ], [ -122.498589, 37.734204 ], [ -122.496872, 37.733933 ], [ -122.491379, 37.734069 ], [ -122.491379, 37.737327 ], [ -122.490349, 37.737870 ], [ -122.490005, 37.738006 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94116", "GEOID10": "94116", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6699058, "AWATER10": 97204, "INTPTLAT10": "+37.7453994", "INTPTLON10": "-122.4860655" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.510433, 37.764065 ], [ -122.509918, 37.763930 ], [ -122.508202, 37.751037 ], [ -122.470951, 37.752665 ], [ -122.471123, 37.753480 ], [ -122.470951, 37.754837 ], [ -122.470093, 37.754701 ], [ -122.470264, 37.753887 ], [ -122.469578, 37.753615 ], [ -122.469063, 37.752937 ], [ -122.468376, 37.753208 ], [ -122.467861, 37.752665 ], [ -122.463398, 37.753073 ], [ -122.461338, 37.751308 ], [ -122.460308, 37.749815 ], [ -122.458591, 37.748051 ], [ -122.458763, 37.747643 ], [ -122.459450, 37.747100 ], [ -122.459106, 37.746829 ], [ -122.460823, 37.745336 ], [ -122.461338, 37.745607 ], [ -122.463741, 37.743707 ], [ -122.467690, 37.743435 ], [ -122.468548, 37.741535 ], [ -122.471294, 37.741399 ], [ -122.470951, 37.737598 ], [ -122.470608, 37.736648 ], [ -122.471638, 37.734747 ], [ -122.475071, 37.734747 ], [ -122.475243, 37.734612 ], [ -122.475414, 37.737463 ], [ -122.481766, 37.737191 ], [ -122.482452, 37.737463 ], [ -122.483311, 37.737463 ], [ -122.486229, 37.736784 ], [ -122.488461, 37.737055 ], [ -122.490005, 37.738006 ], [ -122.491379, 37.737327 ], [ -122.491379, 37.734069 ], [ -122.496872, 37.733933 ], [ -122.498589, 37.734204 ], [ -122.500477, 37.735155 ], [ -122.502022, 37.735562 ], [ -122.505283, 37.735562 ], [ -122.505283, 37.735426 ], [ -122.506828, 37.735426 ], [ -122.506657, 37.736241 ], [ -122.510433, 37.764065 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94118", "GEOID10": "94118", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 5047718, "AWATER10": 59174, "INTPTLAT10": "+37.7800933", "INTPTLON10": "-122.4626054" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.447948, 37.793101 ], [ -122.446575, 37.786318 ], [ -122.447605, 37.785097 ], [ -122.446404, 37.785368 ], [ -122.445889, 37.782519 ], [ -122.444515, 37.782519 ], [ -122.443829, 37.781841 ], [ -122.445545, 37.781298 ], [ -122.445374, 37.780077 ], [ -122.446232, 37.779941 ], [ -122.446060, 37.778720 ], [ -122.445374, 37.778856 ], [ -122.444859, 37.776007 ], [ -122.446404, 37.775871 ], [ -122.446918, 37.777635 ], [ -122.453270, 37.776821 ], [ -122.452755, 37.775057 ], [ -122.463741, 37.773564 ], [ -122.464600, 37.772479 ], [ -122.459106, 37.771258 ], [ -122.459621, 37.770579 ], [ -122.464428, 37.769629 ], [ -122.467003, 37.768001 ], [ -122.469063, 37.769086 ], [ -122.471294, 37.769086 ], [ -122.472324, 37.768544 ], [ -122.472668, 37.767594 ], [ -122.473183, 37.767051 ], [ -122.477303, 37.766101 ], [ -122.478161, 37.767729 ], [ -122.478333, 37.769358 ], [ -122.479362, 37.771258 ], [ -122.479191, 37.771936 ], [ -122.478676, 37.772207 ], [ -122.474899, 37.772479 ], [ -122.472496, 37.772343 ], [ -122.471981, 37.772479 ], [ -122.471638, 37.773021 ], [ -122.471638, 37.773157 ], [ -122.475586, 37.773021 ], [ -122.476616, 37.786860 ], [ -122.475586, 37.786725 ], [ -122.473354, 37.787132 ], [ -122.470951, 37.787267 ], [ -122.459450, 37.789709 ], [ -122.448978, 37.791744 ], [ -122.448635, 37.792015 ], [ -122.448292, 37.792965 ], [ -122.447948, 37.793101 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94117", "GEOID10": "94117", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 4373050, "AWATER10": 1625, "INTPTLAT10": "+37.7694362", "INTPTLON10": "-122.4476618" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.430096, 37.778856 ], [ -122.428379, 37.770443 ], [ -122.429237, 37.770308 ], [ -122.429066, 37.769493 ], [ -122.435760, 37.769086 ], [ -122.435589, 37.767322 ], [ -122.438164, 37.767187 ], [ -122.438507, 37.766237 ], [ -122.439537, 37.766644 ], [ -122.441254, 37.765287 ], [ -122.443314, 37.765287 ], [ -122.442970, 37.763523 ], [ -122.443829, 37.763251 ], [ -122.445374, 37.761894 ], [ -122.446747, 37.761758 ], [ -122.446404, 37.760944 ], [ -122.447090, 37.759723 ], [ -122.447605, 37.759180 ], [ -122.448463, 37.759044 ], [ -122.448635, 37.759587 ], [ -122.451553, 37.759451 ], [ -122.453270, 37.759180 ], [ -122.453957, 37.758773 ], [ -122.454987, 37.758773 ], [ -122.455330, 37.759044 ], [ -122.456532, 37.759180 ], [ -122.456875, 37.759859 ], [ -122.456017, 37.760266 ], [ -122.455845, 37.760808 ], [ -122.456703, 37.761080 ], [ -122.457905, 37.760944 ], [ -122.459106, 37.761894 ], [ -122.457047, 37.761894 ], [ -122.456360, 37.762573 ], [ -122.456017, 37.763794 ], [ -122.456017, 37.764065 ], [ -122.457561, 37.763523 ], [ -122.457733, 37.765965 ], [ -122.458420, 37.766101 ], [ -122.461166, 37.766237 ], [ -122.477303, 37.765423 ], [ -122.477474, 37.766101 ], [ -122.475243, 37.766508 ], [ -122.472839, 37.767322 ], [ -122.472324, 37.768544 ], [ -122.471294, 37.769086 ], [ -122.469063, 37.769086 ], [ -122.467003, 37.768001 ], [ -122.464428, 37.769629 ], [ -122.461853, 37.770308 ], [ -122.459965, 37.770443 ], [ -122.459106, 37.771258 ], [ -122.464600, 37.772479 ], [ -122.463741, 37.773564 ], [ -122.452755, 37.775057 ], [ -122.453270, 37.776821 ], [ -122.446918, 37.777635 ], [ -122.446404, 37.775871 ], [ -122.444859, 37.776007 ], [ -122.445030, 37.776956 ], [ -122.441597, 37.777363 ], [ -122.441425, 37.776414 ], [ -122.440395, 37.776549 ], [ -122.439880, 37.776685 ], [ -122.440052, 37.777635 ], [ -122.430096, 37.778856 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94122", "GEOID10": "94122", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6124844, "AWATER10": 0, "INTPTLAT10": "+37.7587992", "INTPTLON10": "-122.4851269" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.458763, 37.766237 ], [ -122.457733, 37.765965 ], [ -122.457561, 37.763523 ], [ -122.460823, 37.762573 ], [ -122.460651, 37.760537 ], [ -122.459965, 37.759316 ], [ -122.463226, 37.758773 ], [ -122.462540, 37.756737 ], [ -122.463570, 37.756330 ], [ -122.463741, 37.753751 ], [ -122.463398, 37.753073 ], [ -122.467861, 37.752665 ], [ -122.468376, 37.753208 ], [ -122.469063, 37.752937 ], [ -122.469578, 37.753615 ], [ -122.470264, 37.753887 ], [ -122.470093, 37.754701 ], [ -122.470951, 37.754837 ], [ -122.471123, 37.753480 ], [ -122.470951, 37.752665 ], [ -122.508202, 37.751037 ], [ -122.509918, 37.764065 ], [ -122.461166, 37.766237 ], [ -122.458763, 37.766237 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94115", "GEOID10": "94115", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 2889809, "AWATER10": 0, "INTPTLAT10": "+37.7859692", "INTPTLON10": "-122.4372531" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.430267, 37.795814 ], [ -122.426834, 37.779263 ], [ -122.428207, 37.779127 ], [ -122.428036, 37.778177 ], [ -122.429237, 37.778042 ], [ -122.429924, 37.777906 ], [ -122.430096, 37.778856 ], [ -122.440052, 37.777635 ], [ -122.439880, 37.776685 ], [ -122.440395, 37.776549 ], [ -122.441425, 37.776414 ], [ -122.441597, 37.777363 ], [ -122.445030, 37.776956 ], [ -122.445374, 37.778856 ], [ -122.446060, 37.778720 ], [ -122.446232, 37.779941 ], [ -122.445374, 37.780077 ], [ -122.445545, 37.781298 ], [ -122.443829, 37.781841 ], [ -122.444515, 37.782519 ], [ -122.445889, 37.782519 ], [ -122.446404, 37.785368 ], [ -122.447605, 37.785097 ], [ -122.446575, 37.786318 ], [ -122.447605, 37.791744 ], [ -122.446232, 37.791880 ], [ -122.446404, 37.792829 ], [ -122.441597, 37.793372 ], [ -122.441769, 37.794322 ], [ -122.440910, 37.794457 ], [ -122.440739, 37.793508 ], [ -122.436619, 37.794050 ], [ -122.436790, 37.795000 ], [ -122.435074, 37.795271 ], [ -122.434902, 37.794322 ], [ -122.433357, 37.794457 ], [ -122.433529, 37.795407 ], [ -122.430267, 37.795814 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94131", "GEOID10": "94131", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 5379947, "AWATER10": 50540, "INTPTLAT10": "+37.7459165", "INTPTLON10": "-122.4414731" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.456017, 37.764065 ], [ -122.456360, 37.762573 ], [ -122.457047, 37.761894 ], [ -122.459106, 37.761894 ], [ -122.457905, 37.760944 ], [ -122.456703, 37.761080 ], [ -122.455845, 37.760808 ], [ -122.456017, 37.760266 ], [ -122.456875, 37.759859 ], [ -122.456875, 37.759451 ], [ -122.455845, 37.759044 ], [ -122.455330, 37.759044 ], [ -122.454987, 37.758773 ], [ -122.453785, 37.758773 ], [ -122.452927, 37.758094 ], [ -122.453785, 37.757416 ], [ -122.453270, 37.756737 ], [ -122.452412, 37.757008 ], [ -122.452068, 37.756601 ], [ -122.451038, 37.756737 ], [ -122.450352, 37.757416 ], [ -122.447948, 37.757551 ], [ -122.446918, 37.756601 ], [ -122.445889, 37.756466 ], [ -122.445030, 37.756601 ], [ -122.444515, 37.756466 ], [ -122.444172, 37.755923 ], [ -122.444000, 37.754158 ], [ -122.442970, 37.754023 ], [ -122.442455, 37.754430 ], [ -122.442284, 37.755108 ], [ -122.442970, 37.755516 ], [ -122.441254, 37.756194 ], [ -122.441082, 37.755923 ], [ -122.441082, 37.756194 ], [ -122.440052, 37.756330 ], [ -122.440052, 37.755787 ], [ -122.440395, 37.755108 ], [ -122.442455, 37.752394 ], [ -122.442799, 37.752394 ], [ -122.443485, 37.749408 ], [ -122.444344, 37.748322 ], [ -122.444172, 37.747508 ], [ -122.444859, 37.746965 ], [ -122.444515, 37.746693 ], [ -122.444000, 37.746829 ], [ -122.442455, 37.748186 ], [ -122.441425, 37.748593 ], [ -122.438164, 37.748729 ], [ -122.438164, 37.747779 ], [ -122.424946, 37.748593 ], [ -122.423916, 37.740856 ], [ -122.425117, 37.737870 ], [ -122.427864, 37.735562 ], [ -122.432327, 37.733254 ], [ -122.431984, 37.732983 ], [ -122.432156, 37.732983 ], [ -122.435074, 37.731489 ], [ -122.435932, 37.731625 ], [ -122.439537, 37.730131 ], [ -122.443657, 37.728366 ], [ -122.444344, 37.728231 ], [ -122.444344, 37.734612 ], [ -122.445374, 37.734612 ], [ -122.446232, 37.735155 ], [ -122.446404, 37.735562 ], [ -122.446060, 37.735562 ], [ -122.444687, 37.737598 ], [ -122.442455, 37.737598 ], [ -122.442627, 37.739499 ], [ -122.444000, 37.740042 ], [ -122.444687, 37.740856 ], [ -122.446060, 37.741128 ], [ -122.446232, 37.742078 ], [ -122.446575, 37.742485 ], [ -122.449150, 37.742892 ], [ -122.450180, 37.743571 ], [ -122.451725, 37.745607 ], [ -122.449493, 37.746693 ], [ -122.450867, 37.746965 ], [ -122.452068, 37.748322 ], [ -122.452068, 37.751172 ], [ -122.452927, 37.751172 ], [ -122.453098, 37.749001 ], [ -122.454128, 37.749001 ], [ -122.453957, 37.750629 ], [ -122.454472, 37.751308 ], [ -122.454643, 37.751308 ], [ -122.454643, 37.747100 ], [ -122.455502, 37.747100 ], [ -122.455845, 37.746422 ], [ -122.458763, 37.746829 ], [ -122.459106, 37.747236 ], [ -122.458763, 37.747643 ], [ -122.458591, 37.748051 ], [ -122.460308, 37.749815 ], [ -122.461338, 37.751308 ], [ -122.463398, 37.753073 ], [ -122.463741, 37.753615 ], [ -122.463570, 37.756330 ], [ -122.462540, 37.756737 ], [ -122.463226, 37.758773 ], [ -122.459965, 37.759316 ], [ -122.460651, 37.760537 ], [ -122.460823, 37.762573 ], [ -122.456017, 37.764065 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94127", "GEOID10": "94127", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 4585709, "AWATER10": 9359, "INTPTLAT10": "+37.7360266", "INTPTLON10": "-122.4572070" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.454472, 37.751308 ], [ -122.453957, 37.750629 ], [ -122.454128, 37.749001 ], [ -122.453098, 37.749001 ], [ -122.452927, 37.751172 ], [ -122.452068, 37.751172 ], [ -122.452068, 37.748322 ], [ -122.450867, 37.746965 ], [ -122.449493, 37.746693 ], [ -122.451725, 37.745607 ], [ -122.450180, 37.743571 ], [ -122.449150, 37.742892 ], [ -122.446575, 37.742485 ], [ -122.446232, 37.742078 ], [ -122.446060, 37.741128 ], [ -122.444687, 37.740856 ], [ -122.444000, 37.740042 ], [ -122.442799, 37.739770 ], [ -122.442455, 37.739499 ], [ -122.442627, 37.738277 ], [ -122.442455, 37.737598 ], [ -122.444687, 37.737598 ], [ -122.446060, 37.735562 ], [ -122.446404, 37.735562 ], [ -122.446232, 37.735155 ], [ -122.445374, 37.734612 ], [ -122.444344, 37.734612 ], [ -122.444344, 37.730675 ], [ -122.453442, 37.730675 ], [ -122.453442, 37.731625 ], [ -122.457561, 37.731082 ], [ -122.457390, 37.730675 ], [ -122.459278, 37.730810 ], [ -122.459965, 37.729860 ], [ -122.459965, 37.728774 ], [ -122.460995, 37.728638 ], [ -122.460823, 37.727552 ], [ -122.462025, 37.727416 ], [ -122.462540, 37.727145 ], [ -122.462711, 37.725515 ], [ -122.462196, 37.725244 ], [ -122.462196, 37.723071 ], [ -122.463913, 37.722392 ], [ -122.464428, 37.721713 ], [ -122.472496, 37.721578 ], [ -122.471981, 37.728774 ], [ -122.472324, 37.728774 ], [ -122.471809, 37.734204 ], [ -122.470608, 37.736648 ], [ -122.470951, 37.737598 ], [ -122.471294, 37.741399 ], [ -122.468548, 37.741535 ], [ -122.467690, 37.743435 ], [ -122.463741, 37.743707 ], [ -122.461338, 37.745607 ], [ -122.460823, 37.745336 ], [ -122.459106, 37.746829 ], [ -122.459450, 37.747100 ], [ -122.459106, 37.747236 ], [ -122.458763, 37.746829 ], [ -122.455845, 37.746422 ], [ -122.455502, 37.747100 ], [ -122.454643, 37.747100 ], [ -122.454643, 37.751308 ], [ -122.454472, 37.751308 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94109", "GEOID10": "94109", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 3077724, "AWATER10": 295382, "INTPTLAT10": "+37.7953881", "INTPTLON10": "-122.4224441" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.420998, 37.812903 ], [ -122.419968, 37.808835 ], [ -122.419281, 37.808428 ], [ -122.419109, 37.807750 ], [ -122.420826, 37.807614 ], [ -122.420483, 37.806665 ], [ -122.418938, 37.806800 ], [ -122.418251, 37.803681 ], [ -122.418079, 37.803138 ], [ -122.419796, 37.802867 ], [ -122.419624, 37.802053 ], [ -122.417908, 37.802189 ], [ -122.417221, 37.798527 ], [ -122.415504, 37.798662 ], [ -122.413960, 37.790523 ], [ -122.412243, 37.790659 ], [ -122.411728, 37.788217 ], [ -122.412415, 37.788081 ], [ -122.412415, 37.787810 ], [ -122.413273, 37.787674 ], [ -122.413101, 37.786725 ], [ -122.414818, 37.786453 ], [ -122.414303, 37.783740 ], [ -122.419109, 37.783062 ], [ -122.418938, 37.782112 ], [ -122.420483, 37.781976 ], [ -122.420826, 37.782926 ], [ -122.422543, 37.782655 ], [ -122.422371, 37.781705 ], [ -122.423916, 37.781569 ], [ -122.424088, 37.782519 ], [ -122.427349, 37.782112 ], [ -122.430267, 37.795814 ], [ -122.423744, 37.796628 ], [ -122.424431, 37.800426 ], [ -122.425976, 37.800154 ], [ -122.426147, 37.801104 ], [ -122.424603, 37.801239 ], [ -122.424774, 37.802324 ], [ -122.426319, 37.802053 ], [ -122.426491, 37.803003 ], [ -122.424946, 37.803138 ], [ -122.425289, 37.804088 ], [ -122.431641, 37.803274 ], [ -122.432327, 37.805986 ], [ -122.432156, 37.806122 ], [ -122.432671, 37.808428 ], [ -122.432327, 37.808563 ], [ -122.431984, 37.807207 ], [ -122.431469, 37.807343 ], [ -122.431812, 37.808970 ], [ -122.431297, 37.809106 ], [ -122.430954, 37.807343 ], [ -122.430267, 37.807478 ], [ -122.430611, 37.809106 ], [ -122.430096, 37.809241 ], [ -122.429752, 37.807885 ], [ -122.428207, 37.808428 ], [ -122.427006, 37.808156 ], [ -122.427521, 37.808699 ], [ -122.428036, 37.808563 ], [ -122.427521, 37.808835 ], [ -122.426834, 37.808156 ], [ -122.426491, 37.809920 ], [ -122.425804, 37.810462 ], [ -122.424946, 37.810733 ], [ -122.425976, 37.812089 ], [ -122.425117, 37.812632 ], [ -122.420998, 37.812903 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94133", "GEOID10": "94133", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 1955594, "AWATER10": 646917, "INTPTLAT10": "+37.8045315", "INTPTLON10": "-122.4108520" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.420998, 37.812903 ], [ -122.407436, 37.812768 ], [ -122.398510, 37.807207 ], [ -122.402287, 37.805173 ], [ -122.403488, 37.805037 ], [ -122.403488, 37.805308 ], [ -122.404518, 37.806122 ], [ -122.405720, 37.806665 ], [ -122.405891, 37.806529 ], [ -122.405376, 37.805715 ], [ -122.405205, 37.804766 ], [ -122.405891, 37.804630 ], [ -122.405720, 37.803816 ], [ -122.405033, 37.803816 ], [ -122.404861, 37.802867 ], [ -122.403145, 37.803138 ], [ -122.401943, 37.796899 ], [ -122.403488, 37.796628 ], [ -122.403488, 37.796356 ], [ -122.414818, 37.795000 ], [ -122.415504, 37.798662 ], [ -122.417221, 37.798527 ], [ -122.417908, 37.802189 ], [ -122.419624, 37.802053 ], [ -122.419796, 37.802867 ], [ -122.418079, 37.803138 ], [ -122.418251, 37.803681 ], [ -122.418938, 37.806800 ], [ -122.420483, 37.806665 ], [ -122.420826, 37.807614 ], [ -122.419109, 37.807750 ], [ -122.419281, 37.808428 ], [ -122.419968, 37.808835 ], [ -122.420998, 37.812903 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94108", "GEOID10": "94108", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 698151, "AWATER10": 0, "INTPTLAT10": "+37.7920162", "INTPTLON10": "-122.4085835" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.404346, 37.796356 ], [ -122.403316, 37.795542 ], [ -122.405033, 37.795271 ], [ -122.403488, 37.787810 ], [ -122.404690, 37.786725 ], [ -122.406406, 37.786589 ], [ -122.406750, 37.788488 ], [ -122.408466, 37.788353 ], [ -122.408638, 37.789167 ], [ -122.411900, 37.788760 ], [ -122.412243, 37.790659 ], [ -122.413960, 37.790523 ], [ -122.414818, 37.795000 ], [ -122.404346, 37.796356 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94111", "GEOID10": "94111", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 891134, "AWATER10": 494314, "INTPTLAT10": "+37.7993699", "INTPTLON10": "-122.3984087" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.398510, 37.807207 ], [ -122.393360, 37.801918 ], [ -122.388897, 37.796628 ], [ -122.391472, 37.793915 ], [ -122.392159, 37.793915 ], [ -122.392502, 37.793643 ], [ -122.394390, 37.795000 ], [ -122.396622, 37.794593 ], [ -122.396278, 37.793372 ], [ -122.399197, 37.791066 ], [ -122.399540, 37.791337 ], [ -122.400055, 37.793643 ], [ -122.401257, 37.793508 ], [ -122.401257, 37.794050 ], [ -122.404690, 37.793508 ], [ -122.405033, 37.795271 ], [ -122.403316, 37.795542 ], [ -122.404346, 37.796356 ], [ -122.403488, 37.796356 ], [ -122.403488, 37.796628 ], [ -122.401943, 37.796899 ], [ -122.403145, 37.803138 ], [ -122.404861, 37.802867 ], [ -122.405033, 37.803816 ], [ -122.405548, 37.803681 ], [ -122.405720, 37.803816 ], [ -122.405891, 37.804630 ], [ -122.405205, 37.804766 ], [ -122.405376, 37.805715 ], [ -122.405891, 37.806529 ], [ -122.405720, 37.806665 ], [ -122.404346, 37.805986 ], [ -122.403488, 37.805308 ], [ -122.403488, 37.805037 ], [ -122.402287, 37.805173 ], [ -122.398510, 37.807207 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94104", "GEOID10": "94104", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 200857, "AWATER10": 0, "INTPTLAT10": "+37.7914115", "INTPTLON10": "-122.4021291" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.401257, 37.794050 ], [ -122.401257, 37.793508 ], [ -122.400055, 37.793643 ], [ -122.399540, 37.791337 ], [ -122.399197, 37.791066 ], [ -122.403488, 37.787810 ], [ -122.404690, 37.793508 ], [ -122.401257, 37.794050 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94130", "GEOID10": "94130", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 2281270, "AWATER10": 0, "INTPTLAT10": "+37.8206879", "INTPTLON10": "-122.3695372" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.373276, 37.832294 ], [ -122.368641, 37.831209 ], [ -122.362804, 37.822667 ], [ -122.363491, 37.820904 ], [ -122.360573, 37.820090 ], [ -122.360573, 37.819819 ], [ -122.363663, 37.820497 ], [ -122.364349, 37.818734 ], [ -122.364864, 37.818463 ], [ -122.365036, 37.818463 ], [ -122.371044, 37.816022 ], [ -122.370358, 37.814259 ], [ -122.369671, 37.813310 ], [ -122.368984, 37.812768 ], [ -122.367268, 37.812361 ], [ -122.366066, 37.812768 ], [ -122.364178, 37.813988 ], [ -122.362289, 37.814124 ], [ -122.361603, 37.814531 ], [ -122.359200, 37.815073 ], [ -122.359028, 37.814802 ], [ -122.358856, 37.814259 ], [ -122.359200, 37.813446 ], [ -122.361088, 37.812496 ], [ -122.361259, 37.810733 ], [ -122.360916, 37.808156 ], [ -122.361603, 37.808021 ], [ -122.362118, 37.807071 ], [ -122.362804, 37.807207 ], [ -122.367268, 37.807750 ], [ -122.368641, 37.808156 ], [ -122.371559, 37.809377 ], [ -122.372761, 37.810869 ], [ -122.372761, 37.811276 ], [ -122.372246, 37.811276 ], [ -122.371731, 37.812361 ], [ -122.371559, 37.813039 ], [ -122.371731, 37.813446 ], [ -122.371387, 37.813581 ], [ -122.371216, 37.814531 ], [ -122.371387, 37.815209 ], [ -122.379112, 37.826870 ], [ -122.377567, 37.830531 ], [ -122.373276, 37.832294 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94103", "GEOID10": "94103", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 3518047, "AWATER10": 0, "INTPTLAT10": "+37.7731516", "INTPTLON10": "-122.4111634" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.402802, 37.788081 ], [ -122.401772, 37.787267 ], [ -122.402630, 37.786725 ], [ -122.400398, 37.785097 ], [ -122.399368, 37.785911 ], [ -122.397823, 37.784690 ], [ -122.405548, 37.778449 ], [ -122.403660, 37.776956 ], [ -122.403145, 37.777363 ], [ -122.401943, 37.776414 ], [ -122.402458, 37.776007 ], [ -122.399368, 37.773564 ], [ -122.403831, 37.770036 ], [ -122.403488, 37.769765 ], [ -122.402115, 37.769901 ], [ -122.401772, 37.767458 ], [ -122.400742, 37.767458 ], [ -122.399712, 37.766644 ], [ -122.399712, 37.766237 ], [ -122.400742, 37.766237 ], [ -122.400570, 37.763658 ], [ -122.401428, 37.763523 ], [ -122.401600, 37.764880 ], [ -122.410355, 37.764337 ], [ -122.410526, 37.765558 ], [ -122.427521, 37.764608 ], [ -122.427692, 37.765694 ], [ -122.426491, 37.765830 ], [ -122.426662, 37.768951 ], [ -122.427006, 37.769222 ], [ -122.409153, 37.783197 ], [ -122.408638, 37.783469 ], [ -122.408638, 37.783604 ], [ -122.403488, 37.787810 ], [ -122.402802, 37.788081 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94114", "GEOID10": "94114", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 3692567, "AWATER10": 0, "INTPTLAT10": "+37.7580586", "INTPTLON10": "-122.4354080" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.428379, 37.770443 ], [ -122.428207, 37.769493 ], [ -122.426319, 37.769629 ], [ -122.427006, 37.769222 ], [ -122.426662, 37.768951 ], [ -122.426491, 37.765830 ], [ -122.427692, 37.765694 ], [ -122.427521, 37.764608 ], [ -122.426319, 37.764608 ], [ -122.426319, 37.763930 ], [ -122.427177, 37.763794 ], [ -122.427177, 37.762980 ], [ -122.426319, 37.762980 ], [ -122.426147, 37.762166 ], [ -122.424774, 37.748593 ], [ -122.438164, 37.747779 ], [ -122.438164, 37.748729 ], [ -122.441425, 37.748593 ], [ -122.442455, 37.748186 ], [ -122.444000, 37.746829 ], [ -122.444515, 37.746693 ], [ -122.444859, 37.746965 ], [ -122.444172, 37.747508 ], [ -122.444344, 37.748322 ], [ -122.443485, 37.749408 ], [ -122.442799, 37.752394 ], [ -122.442455, 37.752394 ], [ -122.440395, 37.755108 ], [ -122.440052, 37.755787 ], [ -122.440052, 37.756330 ], [ -122.441082, 37.756194 ], [ -122.441082, 37.756058 ], [ -122.441254, 37.756194 ], [ -122.442970, 37.755516 ], [ -122.442284, 37.755108 ], [ -122.442455, 37.754430 ], [ -122.442970, 37.754023 ], [ -122.444000, 37.754158 ], [ -122.444172, 37.755923 ], [ -122.444687, 37.756601 ], [ -122.445889, 37.756466 ], [ -122.446918, 37.756601 ], [ -122.447948, 37.757551 ], [ -122.450352, 37.757416 ], [ -122.451038, 37.756737 ], [ -122.452068, 37.756601 ], [ -122.452412, 37.757008 ], [ -122.453270, 37.756737 ], [ -122.453785, 37.757416 ], [ -122.452927, 37.758094 ], [ -122.453957, 37.758773 ], [ -122.453270, 37.759180 ], [ -122.451553, 37.759451 ], [ -122.448635, 37.759587 ], [ -122.448463, 37.759044 ], [ -122.447605, 37.759180 ], [ -122.447090, 37.759723 ], [ -122.446404, 37.760944 ], [ -122.446747, 37.761758 ], [ -122.445374, 37.761894 ], [ -122.443829, 37.763251 ], [ -122.442970, 37.763523 ], [ -122.443314, 37.765287 ], [ -122.441254, 37.765287 ], [ -122.439537, 37.766644 ], [ -122.438507, 37.766237 ], [ -122.438164, 37.767187 ], [ -122.435589, 37.767322 ], [ -122.435760, 37.769086 ], [ -122.429066, 37.769493 ], [ -122.429237, 37.770308 ], [ -122.428379, 37.770443 ] ] ], [ [ [ -122.441597, 37.755108 ], [ -122.442799, 37.752530 ], [ -122.442455, 37.753751 ], [ -122.441597, 37.755108 ] ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94110", "GEOID10": "94110", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6019827, "AWATER10": 12207, "INTPTLAT10": "+37.7500215", "INTPTLON10": "-122.4152015" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.410526, 37.765558 ], [ -122.410355, 37.764337 ], [ -122.405033, 37.764608 ], [ -122.405205, 37.763523 ], [ -122.406235, 37.761351 ], [ -122.406578, 37.760266 ], [ -122.405891, 37.758909 ], [ -122.403488, 37.756873 ], [ -122.402973, 37.752801 ], [ -122.403831, 37.749408 ], [ -122.405033, 37.749136 ], [ -122.404003, 37.748322 ], [ -122.404861, 37.745336 ], [ -122.405205, 37.744386 ], [ -122.405376, 37.744521 ], [ -122.406235, 37.743571 ], [ -122.405891, 37.743435 ], [ -122.407436, 37.741399 ], [ -122.407951, 37.739227 ], [ -122.407780, 37.737734 ], [ -122.408295, 37.737598 ], [ -122.408295, 37.736648 ], [ -122.408810, 37.735833 ], [ -122.410011, 37.734747 ], [ -122.414474, 37.732439 ], [ -122.415161, 37.732168 ], [ -122.418938, 37.732168 ], [ -122.418938, 37.732847 ], [ -122.418251, 37.732983 ], [ -122.420139, 37.732983 ], [ -122.421856, 37.734612 ], [ -122.421856, 37.735155 ], [ -122.422199, 37.735155 ], [ -122.422886, 37.734340 ], [ -122.423916, 37.734612 ], [ -122.424946, 37.735562 ], [ -122.427349, 37.735698 ], [ -122.425117, 37.737870 ], [ -122.423916, 37.740856 ], [ -122.424603, 37.744657 ], [ -122.426147, 37.762166 ], [ -122.426319, 37.762980 ], [ -122.427177, 37.762980 ], [ -122.427177, 37.763794 ], [ -122.426319, 37.763930 ], [ -122.426319, 37.764608 ], [ -122.410526, 37.765558 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94102", "GEOID10": "94102", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 1732577, "AWATER10": 0, "INTPTLAT10": "+37.7795835", "INTPTLON10": "-122.4193398" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.408638, 37.789167 ], [ -122.408466, 37.788353 ], [ -122.406750, 37.788488 ], [ -122.406406, 37.786589 ], [ -122.404690, 37.786725 ], [ -122.408638, 37.783604 ], [ -122.408638, 37.783469 ], [ -122.409153, 37.783197 ], [ -122.426319, 37.769629 ], [ -122.428207, 37.769493 ], [ -122.429924, 37.777906 ], [ -122.428036, 37.778177 ], [ -122.428207, 37.779127 ], [ -122.426834, 37.779263 ], [ -122.427349, 37.782112 ], [ -122.424088, 37.782519 ], [ -122.423916, 37.781569 ], [ -122.422371, 37.781705 ], [ -122.422543, 37.782655 ], [ -122.420826, 37.782926 ], [ -122.420654, 37.781976 ], [ -122.418938, 37.782112 ], [ -122.419109, 37.783062 ], [ -122.414303, 37.783740 ], [ -122.414818, 37.786453 ], [ -122.413101, 37.786725 ], [ -122.413273, 37.787674 ], [ -122.412415, 37.787810 ], [ -122.412415, 37.788081 ], [ -122.411728, 37.788217 ], [ -122.411900, 37.788760 ], [ -122.408638, 37.789167 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94105", "GEOID10": "94105", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 942025, "AWATER10": 223684, "INTPTLAT10": "+37.7896493", "INTPTLON10": "-122.3930670" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.388897, 37.796628 ], [ -122.385120, 37.791337 ], [ -122.385635, 37.790930 ], [ -122.385464, 37.790523 ], [ -122.386322, 37.790252 ], [ -122.387867, 37.788760 ], [ -122.387695, 37.787132 ], [ -122.388554, 37.786996 ], [ -122.392159, 37.784147 ], [ -122.392330, 37.784283 ], [ -122.391472, 37.785097 ], [ -122.391472, 37.785639 ], [ -122.390099, 37.786725 ], [ -122.391815, 37.785504 ], [ -122.393360, 37.784961 ], [ -122.394218, 37.785097 ], [ -122.394047, 37.785232 ], [ -122.395592, 37.786318 ], [ -122.397823, 37.784690 ], [ -122.399368, 37.785911 ], [ -122.400398, 37.785097 ], [ -122.402630, 37.786725 ], [ -122.401772, 37.787267 ], [ -122.402802, 37.788081 ], [ -122.403488, 37.787810 ], [ -122.396278, 37.793372 ], [ -122.396622, 37.794593 ], [ -122.394390, 37.795000 ], [ -122.392502, 37.793643 ], [ -122.392159, 37.793915 ], [ -122.391472, 37.793915 ], [ -122.388897, 37.796628 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94158", "GEOID10": "94158", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 1800349, "AWATER10": 1246229, "INTPTLAT10": "+37.7698930", "INTPTLON10": "-122.3870114" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.387524, 37.780484 ], [ -122.387524, 37.780891 ], [ -122.384777, 37.781027 ], [ -122.384777, 37.781298 ], [ -122.387524, 37.781027 ], [ -122.387695, 37.781434 ], [ -122.385464, 37.781569 ], [ -122.385464, 37.781705 ], [ -122.384777, 37.781841 ], [ -122.385464, 37.781841 ], [ -122.385635, 37.781976 ], [ -122.387695, 37.781841 ], [ -122.387867, 37.782248 ], [ -122.384777, 37.782519 ], [ -122.384777, 37.782790 ], [ -122.381687, 37.783469 ], [ -122.377911, 37.753615 ], [ -122.379971, 37.753344 ], [ -122.380142, 37.754566 ], [ -122.381516, 37.754566 ], [ -122.382889, 37.754430 ], [ -122.383404, 37.754701 ], [ -122.384090, 37.754701 ], [ -122.384090, 37.754973 ], [ -122.380829, 37.755244 ], [ -122.380829, 37.755516 ], [ -122.381172, 37.755923 ], [ -122.381344, 37.756466 ], [ -122.381344, 37.757959 ], [ -122.384777, 37.757687 ], [ -122.385464, 37.758094 ], [ -122.386322, 37.758094 ], [ -122.386665, 37.760673 ], [ -122.387524, 37.760537 ], [ -122.387867, 37.764337 ], [ -122.393703, 37.764065 ], [ -122.393875, 37.766101 ], [ -122.396622, 37.767865 ], [ -122.400742, 37.771122 ], [ -122.398510, 37.772886 ], [ -122.397823, 37.772343 ], [ -122.397480, 37.773429 ], [ -122.396107, 37.774514 ], [ -122.396450, 37.774650 ], [ -122.394218, 37.776414 ], [ -122.392502, 37.775192 ], [ -122.390270, 37.776685 ], [ -122.390442, 37.776956 ], [ -122.390442, 37.777092 ], [ -122.387695, 37.778177 ], [ -122.387695, 37.778313 ], [ -122.387352, 37.778313 ], [ -122.387352, 37.778585 ], [ -122.387352, 37.778856 ], [ -122.384777, 37.778992 ], [ -122.384777, 37.779127 ], [ -122.387352, 37.778992 ], [ -122.387352, 37.779263 ], [ -122.387524, 37.779670 ], [ -122.387524, 37.780077 ], [ -122.387524, 37.780484 ] ], [ [ -122.387524, 37.779670 ], [ -122.384777, 37.779670 ], [ -122.384777, 37.779941 ], [ -122.387524, 37.779670 ] ], [ [ -122.387524, 37.780077 ], [ -122.384777, 37.780077 ], [ -122.384777, 37.780348 ], [ -122.387524, 37.780077 ] ], [ [ -122.387524, 37.780484 ], [ -122.384777, 37.780484 ], [ -122.384777, 37.780755 ], [ -122.387524, 37.780484 ] ], [ [ -122.387352, 37.779263 ], [ -122.384777, 37.779263 ], [ -122.384777, 37.779534 ], [ -122.387352, 37.779263 ] ], [ [ -122.387352, 37.778585 ], [ -122.385120, 37.778585 ], [ -122.385120, 37.778856 ], [ -122.387352, 37.778585 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94112", "GEOID10": "94112", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 8720166, "AWATER10": 0, "INTPTLAT10": "+37.7203669", "INTPTLON10": "-122.4429361" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.426662, 37.736376 ], [ -122.426491, 37.736241 ], [ -122.427349, 37.735698 ], [ -122.424946, 37.735562 ], [ -122.423916, 37.734612 ], [ -122.422886, 37.734340 ], [ -122.422199, 37.735155 ], [ -122.421856, 37.735155 ], [ -122.421856, 37.734612 ], [ -122.420139, 37.732983 ], [ -122.418251, 37.732983 ], [ -122.418938, 37.732847 ], [ -122.418938, 37.732168 ], [ -122.415161, 37.732168 ], [ -122.421684, 37.731761 ], [ -122.421684, 37.731082 ], [ -122.420139, 37.731489 ], [ -122.420483, 37.728910 ], [ -122.423744, 37.728774 ], [ -122.423058, 37.727280 ], [ -122.424088, 37.725923 ], [ -122.423573, 37.725651 ], [ -122.422886, 37.723886 ], [ -122.423744, 37.723750 ], [ -122.424774, 37.722121 ], [ -122.424603, 37.721713 ], [ -122.426319, 37.718590 ], [ -122.427349, 37.715060 ], [ -122.425632, 37.714517 ], [ -122.426662, 37.711257 ], [ -122.427177, 37.711257 ], [ -122.426147, 37.710986 ], [ -122.426662, 37.710171 ], [ -122.429924, 37.711529 ], [ -122.430096, 37.710850 ], [ -122.429237, 37.709628 ], [ -122.428379, 37.709220 ], [ -122.428379, 37.708405 ], [ -122.434044, 37.708134 ], [ -122.440395, 37.708405 ], [ -122.452240, 37.708134 ], [ -122.468891, 37.708270 ], [ -122.467690, 37.709220 ], [ -122.465973, 37.710171 ], [ -122.464256, 37.710578 ], [ -122.460823, 37.710578 ], [ -122.462540, 37.711257 ], [ -122.462711, 37.718590 ], [ -122.462711, 37.721713 ], [ -122.462196, 37.721713 ], [ -122.462196, 37.725244 ], [ -122.462711, 37.725515 ], [ -122.462540, 37.727145 ], [ -122.462025, 37.727416 ], [ -122.460823, 37.727552 ], [ -122.460995, 37.728638 ], [ -122.459965, 37.728774 ], [ -122.459965, 37.729860 ], [ -122.459278, 37.730810 ], [ -122.457390, 37.730675 ], [ -122.457561, 37.731082 ], [ -122.453442, 37.731625 ], [ -122.453442, 37.730675 ], [ -122.444344, 37.730675 ], [ -122.444344, 37.728231 ], [ -122.443657, 37.728366 ], [ -122.439537, 37.730131 ], [ -122.435932, 37.731625 ], [ -122.435074, 37.731489 ], [ -122.432156, 37.732983 ], [ -122.431984, 37.732983 ], [ -122.432327, 37.733254 ], [ -122.428551, 37.735019 ], [ -122.426662, 37.736376 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94134", "GEOID10": "94134", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6210550, "AWATER10": 90877, "INTPTLAT10": "+37.7210461", "INTPTLON10": "-122.4135554" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.406921, 37.738006 ], [ -122.406578, 37.735698 ], [ -122.405033, 37.733661 ], [ -122.402802, 37.729317 ], [ -122.398853, 37.718590 ], [ -122.397995, 37.715467 ], [ -122.398510, 37.715467 ], [ -122.396450, 37.712887 ], [ -122.395763, 37.710850 ], [ -122.394047, 37.711257 ], [ -122.390785, 37.711122 ], [ -122.390957, 37.710307 ], [ -122.393703, 37.708270 ], [ -122.423744, 37.708270 ], [ -122.428379, 37.708405 ], [ -122.428379, 37.709220 ], [ -122.429237, 37.709628 ], [ -122.430096, 37.710850 ], [ -122.429924, 37.711529 ], [ -122.426662, 37.710171 ], [ -122.426147, 37.710986 ], [ -122.427177, 37.711257 ], [ -122.426662, 37.711257 ], [ -122.425632, 37.714517 ], [ -122.427349, 37.715060 ], [ -122.426319, 37.718590 ], [ -122.424603, 37.721713 ], [ -122.424774, 37.722121 ], [ -122.423744, 37.723750 ], [ -122.422886, 37.723886 ], [ -122.423573, 37.725651 ], [ -122.424088, 37.725923 ], [ -122.423058, 37.727280 ], [ -122.423744, 37.728774 ], [ -122.420483, 37.728910 ], [ -122.420139, 37.731489 ], [ -122.421684, 37.731082 ], [ -122.421684, 37.731761 ], [ -122.419453, 37.732032 ], [ -122.416019, 37.732032 ], [ -122.414474, 37.732439 ], [ -122.409496, 37.735019 ], [ -122.408466, 37.736241 ], [ -122.408295, 37.737598 ], [ -122.406921, 37.738006 ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94107", "GEOID10": "94107", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 4647665, "AWATER10": 227634, "INTPTLAT10": "+37.7604596", "INTPTLON10": "-122.3997237" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.391472, 37.785639 ], [ -122.391472, 37.785097 ], [ -122.392330, 37.784283 ], [ -122.392159, 37.784147 ], [ -122.388554, 37.786996 ], [ -122.387695, 37.787132 ], [ -122.387867, 37.788760 ], [ -122.386322, 37.790252 ], [ -122.385464, 37.790523 ], [ -122.385635, 37.790930 ], [ -122.385120, 37.791337 ], [ -122.381687, 37.783469 ], [ -122.384777, 37.782790 ], [ -122.384777, 37.782519 ], [ -122.387867, 37.782248 ], [ -122.387695, 37.781841 ], [ -122.385635, 37.781976 ], [ -122.385464, 37.781841 ], [ -122.384777, 37.781841 ], [ -122.385464, 37.781705 ], [ -122.385464, 37.781569 ], [ -122.387695, 37.781434 ], [ -122.387524, 37.781027 ], [ -122.384777, 37.781298 ], [ -122.384777, 37.781027 ], [ -122.387524, 37.780891 ], [ -122.387524, 37.780484 ], [ -122.387524, 37.780077 ], [ -122.387524, 37.779670 ], [ -122.387352, 37.779263 ], [ -122.387352, 37.778992 ], [ -122.384777, 37.779127 ], [ -122.384777, 37.778992 ], [ -122.387352, 37.778856 ], [ -122.387352, 37.778585 ], [ -122.387352, 37.778313 ], [ -122.387695, 37.778313 ], [ -122.387695, 37.778177 ], [ -122.390442, 37.777092 ], [ -122.390442, 37.776956 ], [ -122.390270, 37.776685 ], [ -122.392502, 37.775192 ], [ -122.394218, 37.776414 ], [ -122.396450, 37.774650 ], [ -122.396107, 37.774514 ], [ -122.397480, 37.773429 ], [ -122.397823, 37.772343 ], [ -122.398510, 37.772886 ], [ -122.400742, 37.771122 ], [ -122.396622, 37.767865 ], [ -122.393875, 37.766101 ], [ -122.393703, 37.764065 ], [ -122.387867, 37.764337 ], [ -122.387524, 37.760537 ], [ -122.386665, 37.760673 ], [ -122.386322, 37.758094 ], [ -122.385464, 37.758094 ], [ -122.384777, 37.757687 ], [ -122.381344, 37.757959 ], [ -122.381344, 37.756466 ], [ -122.381172, 37.755923 ], [ -122.380829, 37.755516 ], [ -122.380829, 37.755244 ], [ -122.384090, 37.754973 ], [ -122.384090, 37.754701 ], [ -122.383404, 37.754701 ], [ -122.382889, 37.754430 ], [ -122.381516, 37.754566 ], [ -122.380142, 37.754566 ], [ -122.379971, 37.753344 ], [ -122.386837, 37.752937 ], [ -122.386494, 37.750358 ], [ -122.393188, 37.749951 ], [ -122.393188, 37.751444 ], [ -122.395248, 37.751308 ], [ -122.395248, 37.749815 ], [ -122.403831, 37.749408 ], [ -122.402973, 37.752801 ], [ -122.403316, 37.756194 ], [ -122.403831, 37.757144 ], [ -122.406063, 37.759180 ], [ -122.406578, 37.760673 ], [ -122.405376, 37.763116 ], [ -122.405033, 37.764608 ], [ -122.401600, 37.764880 ], [ -122.401428, 37.763523 ], [ -122.400570, 37.763658 ], [ -122.400742, 37.766237 ], [ -122.399712, 37.766237 ], [ -122.399712, 37.766644 ], [ -122.400742, 37.767458 ], [ -122.401772, 37.767458 ], [ -122.402115, 37.769901 ], [ -122.403488, 37.769765 ], [ -122.403831, 37.770036 ], [ -122.399368, 37.773564 ], [ -122.402458, 37.776007 ], [ -122.401943, 37.776414 ], [ -122.403145, 37.777363 ], [ -122.403660, 37.776956 ], [ -122.405548, 37.778449 ], [ -122.395592, 37.786318 ], [ -122.394047, 37.785232 ], [ -122.394218, 37.785097 ], [ -122.393360, 37.784961 ], [ -122.391815, 37.785504 ], [ -122.391472, 37.785639 ] ] ], [ [ [ -122.387524, 37.779670 ], [ -122.384777, 37.779941 ], [ -122.384777, 37.779670 ], [ -122.387524, 37.779670 ] ] ], [ [ [ -122.387524, 37.780077 ], [ -122.384777, 37.780348 ], [ -122.384777, 37.780077 ], [ -122.387524, 37.780077 ] ] ], [ [ [ -122.387524, 37.780484 ], [ -122.384777, 37.780755 ], [ -122.384777, 37.780484 ], [ -122.387524, 37.780484 ] ] ], [ [ [ -122.387352, 37.779263 ], [ -122.384777, 37.779534 ], [ -122.384777, 37.779263 ], [ -122.387352, 37.779263 ] ] ], [ [ [ -122.387352, 37.778585 ], [ -122.385120, 37.778856 ], [ -122.385120, 37.778585 ], [ -122.387352, 37.778585 ] ] ] ] } }
{ "type": "Feature", "tippecanoe": { "layer": "sfzips", "minzoom": 11, "maxzoom": 11 }, "properties": { "ZCTA5CE10": "94124", "GEOID10": "94124", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 12765980, "AWATER10": 2804039, "INTPTLAT10": "+37.7288947", "INTPTLON10": "-122.3827787" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.377911, 37.753615 ], [ -122.376022, 37.752530 ], [ -122.373104, 37.746015 ], [ -122.367611, 37.740178 ], [ -122.368298, 37.739770 ], [ -122.373447, 37.739635 ], [ -122.373962, 37.739499 ], [ -122.373447, 37.738684 ], [ -122.372761, 37.738277 ], [ -122.367439, 37.738277 ], [ -122.370701, 37.737327 ], [ -122.371216, 37.737055 ], [ -122.372932, 37.737055 ], [ -122.373619, 37.737191 ], [ -122.375679, 37.738413 ], [ -122.376366, 37.738413 ], [ -122.376537, 37.738277 ], [ -122.376022, 37.738006 ], [ -122.375164, 37.737870 ], [ -122.374821, 37.737327 ], [ -122.375164, 37.736241 ], [ -122.376022, 37.735833 ], [ -122.375851, 37.735019 ], [ -122.375336, 37.735426 ], [ -122.374821, 37.734883 ], [ -122.375164, 37.734612 ], [ -122.374821, 37.734476 ], [ -122.374992, 37.733933 ], [ -122.375679, 37.732711 ], [ -122.375164, 37.732983 ], [ -122.374992, 37.732711 ], [ -122.374649, 37.732847 ], [ -122.374821, 37.732575 ], [ -122.374134, 37.732575 ], [ -122.373447, 37.732983 ], [ -122.372589, 37.733933 ], [ -122.371902, 37.734204 ], [ -122.369671, 37.732304 ], [ -122.367096, 37.735426 ], [ -122.367439, 37.735426 ], [ -122.367096, 37.735562 ], [ -122.366753, 37.735426 ], [ -122.366924, 37.734883 ], [ -122.369499, 37.732439 ], [ -122.369499, 37.732168 ], [ -122.368813, 37.731896 ], [ -122.368641, 37.732304 ], [ -122.368298, 37.732304 ], [ -122.367439, 37.731896 ], [ -122.366753, 37.732168 ], [ -122.365208, 37.733797 ], [ -122.366581, 37.732168 ], [ -122.365379, 37.732983 ], [ -122.366238, 37.731896 ], [ -122.366066, 37.731896 ], [ -122.365036, 37.732847 ], [ -122.365723, 37.731761 ], [ -122.365723, 37.731625 ], [ -122.364864, 37.732575 ], [ -122.365036, 37.732032 ], [ -122.363663, 37.731218 ], [ -122.362804, 37.732168 ], [ -122.362633, 37.732032 ], [ -122.363319, 37.731082 ], [ -122.362804, 37.730810 ], [ -122.362118, 37.731625 ], [ -122.361774, 37.731489 ], [ -122.362633, 37.730675 ], [ -122.361946, 37.730131 ], [ -122.360916, 37.729860 ], [ -122.360744, 37.730267 ], [ -122.359886, 37.730267 ], [ -122.358856, 37.729724 ], [ -122.359028, 37.729453 ], [ -122.361946, 37.728774 ], [ -122.362289, 37.728502 ], [ -122.361431, 37.728502 ], [ -122.357655, 37.729453 ], [ -122.357483, 37.729181 ], [ -122.357826, 37.728910 ], [ -122.360401, 37.728231 ], [ -122.359886, 37.728095 ], [ -122.357140, 37.728774 ], [ -122.356968, 37.728774 ], [ -122.357140, 37.727959 ], [ -122.356796, 37.727959 ], [ -122.358170, 37.718590 ], [ -122.358513, 37.715875 ], [ -122.360401, 37.708270 ], [ -122.381001, 37.708405 ], [ -122.393703, 37.708270 ], [ -122.390957, 37.710307 ], [ -122.390785, 37.711122 ], [ -122.394047, 37.711257 ], [ -122.395763, 37.710850 ], [ -122.396450, 37.712887 ], [ -122.398510, 37.715467 ], [ -122.397995, 37.715467 ], [ -122.398853, 37.718590 ], [ -122.402802, 37.729317 ], [ -122.405033, 37.733661 ], [ -122.406578, 37.735698 ], [ -122.406921, 37.738006 ], [ -122.407780, 37.737734 ], [ -122.407951, 37.737870 ], [ -122.407951, 37.739227 ], [ -122.407436, 37.741399 ], [ -122.405891, 37.743435 ], [ -122.406235, 37.743571 ], [ -122.405376, 37.744521 ], [ -122.405205, 37.744386 ], [ -122.404003, 37.748322 ], [ -122.405033, 37.749136 ], [ -122.402973, 37.749544 ], [ -122.402115, 37.749408 ], [ -122.395248, 37.749815 ], [ -122.395248, 37.751308 ], [ -122.393188, 37.751444 ], [ -122.393188, 37.749951 ], [ -122.386494, 37.750358 ], [ -122.386837, 37.752937 ], [ -122.381001, 37.753208 ], [ -122.377911, 37.753615 ] ] ] } }
+3 -4
View File
@@ -1,15 +1,14 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.000000,85.051129,0.000000,85.051129",
"bounds": "-180.000000,85.051129,180.000000,85.051129",
"center": "0.000000,85.051129,0",
"center": "-179.989014,85.051129,14",
"description": "tests/raw-tiles/nothing",
"format": "pbf",
"generator_options": "./tippecanoe -q -f -e tests/raw-tiles/nothing tests/raw-tiles/nothing.geojson",
"json": "{\"vector_layers\":[{\"id\":\"nothing\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"nothing\",\"count\":1,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"maxzoom": "0",
"json": "{\"vector_layers\":[{\"id\":\"nothing\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":14,\"fields\":{}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"nothing\",\"count\":1,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"maxzoom": "14",
"minzoom": "0",
"name": "tests/raw-tiles/nothing",
"tippecanoe_decisions": "{\"basezoom\":14,\"droprate\":2.5,\"retain_points_multiplier\":1}",
"type": "overlay",
"version": "2"
}, "features": [
+1 -1
View File
@@ -712,7 +712,7 @@ struct tileset_reader {
t.y = parent_tile.y;
tv.push_back(std::move(t));
std::string ret = overzoom(tv, tile.z, tile.x, tile.y, -1, buffer, std::set<std::string>(), false, &next_overzoomed_tiles, false, NULL, false, std::unordered_map<std::string, attribute_op>(), unidecode_data, 0, 0, std::vector<mvt_layer>());
std::string ret = overzoom(tv, tile.z, tile.x, tile.y, -1, buffer, std::set<std::string>(), false, &next_overzoomed_tiles, false, NULL, false, std::unordered_map<std::string, attribute_op>(), unidecode_data, 0, 0);
return ret;
}
+102 -191
View File
@@ -772,6 +772,17 @@ static unsigned long long choose_mingap(std::vector<unsigned long long> &gaps, d
return gaps[ix];
}
static unsigned long long choose_maxgap(std::vector<unsigned long long> &gaps, double f, unsigned long long existing_gap) {
std::stable_sort(gaps.begin(), gaps.end());
size_t ix = (gaps.size() - 1) * f;
while (ix > 0 && gaps[ix] == existing_gap) {
ix--;
}
return gaps[ix];
}
// This function is called to choose the new "extent" threshold to try when a tile exceeds the
// tile size limit or feature limit and `--drop-smallest-as-needed` or `--coalesce-smallest-as-needed`
// has been set.
@@ -888,6 +899,8 @@ struct write_tile_args {
size_t pass = 0;
unsigned long long mingap = 0;
unsigned long long mingap_out = 0;
unsigned long long maxgap = 0;
unsigned long long maxgap_out = 0;
long long minextent = 0;
long long minextent_out = 0;
unsigned long long mindrop_sequence = 0;
@@ -1398,76 +1411,10 @@ void promote_attribute(std::string const &key, serial_feature &p) {
}
}
void promote_attribute_prefix(std::string const &key, std::string const &prefixed_key, serial_feature &p) {
if (p.need_tilestats.count(prefixed_key) == 0) {
p.need_tilestats.insert(prefixed_key);
}
// does the prefixed attribute already exist as a full key?
ssize_t found_as = -1;
for (size_t i = 0; i < p.full_keys.size(); i++) {
if (prefixed_key == p.full_keys[i]) {
// yes, so we're done
return;
}
if (key == p.full_keys[i]) {
found_as = i;
}
}
// or did we find the source as a full key? then copy it
if (found_as >= 0) {
p.full_keys.push_back(prefixed_key);
p.full_values.push_back(p.full_values[found_as]);
return;
}
// does the prefix attribute exist as a reference key?
found_as = -1;
for (size_t i = 0; i < p.keys.size(); i++) {
if (strcmp(prefixed_key.c_str(), p.stringpool + p.keys[i] + 1) == 0) {
// yes, so promote it to a full key
serial_val sv;
sv.s = p.stringpool + p.values[i] + 1;
sv.type = p.stringpool[p.values[i]];
p.full_keys.push_back(prefixed_key);
p.full_values.push_back(std::move(sv));
p.keys.erase(p.keys.begin() + i);
p.values.erase(p.values.begin() + i);
return;
} else if (strcmp(key.c_str(), p.stringpool + p.keys[i] + 1) == 0) {
found_as = i;
}
}
// or did we find the source as a reference key? then copy it
if (found_as >= 0) {
serial_val sv;
sv.s = p.stringpool + p.values[found_as] + 1;
sv.type = p.stringpool[p.values[found_as]];
p.full_keys.push_back(prefixed_key);
p.full_values.push_back(std::move(sv));
return;
}
}
std::map<std::string, attribute_op> numeric_operations = {
{"sum", op_sum},
{"min", op_min},
{"max", op_max},
{"count", op_count},
};
// accumulate attribute values from sf onto p
void preserve_attributes(std::unordered_map<std::string, attribute_op> const *attribute_accum, const serial_feature &sf, serial_feature &p) {
for (size_t i = 0; i < sf.keys.size(); i++) {
std::string key = sf.stringpool + sf.keys[i] + 1;
int type = sf.stringpool[sf.values[i]];
auto f = attribute_accum->find(key);
if (f != attribute_accum->end()) {
@@ -1477,34 +1424,17 @@ void preserve_attributes(std::unordered_map<std::string, attribute_op> const *at
promote_attribute(key, p);
preserve_attribute(f->second, key, sv, p.full_keys, p.full_values, p.attribute_accum_state);
} else if (type == mvt_double && additional[A_ACCUMULATE_NUMERIC]) {
for (auto const &operation : numeric_operations) {
serial_val sv;
sv.type = sf.stringpool[sf.values[i]];
sv.s = sf.stringpool + sf.values[i] + 1;
std::string prefixed_key = "tippecanoe:" + operation.first + ":" + key;
promote_attribute_prefix(key, prefixed_key, p);
preserve_attribute(operation.second, prefixed_key, sv, p.full_keys, p.full_values, p.attribute_accum_state);
}
}
}
for (size_t i = 0; i < sf.full_keys.size(); i++) {
const std::string &key = sf.full_keys[i];
int type = sf.full_values[i].type;
auto f = attribute_accum->find(key);
if (f != attribute_accum->end()) {
const serial_val &sv = sf.full_values[i];
promote_attribute(key, p); // promotes it in the target feature
promote_attribute(key, p);
preserve_attribute(f->second, key, sv, p.full_keys, p.full_values, p.attribute_accum_state);
} else if (type == mvt_double && additional[A_ACCUMULATE_NUMERIC]) {
for (auto const &operation : numeric_operations) {
std::string prefixed_key = "tippecanoe:" + operation.first + ":" + key;
promote_attribute_prefix(key, prefixed_key, p);
preserve_attribute(operation.second, prefixed_key, sf.full_values[i], p.full_keys, p.full_values, p.attribute_accum_state);
}
}
}
}
@@ -1608,7 +1538,6 @@ bool drop_feature_unless_it_can_be_added_to_a_multiplier_cluster(layer_features
ssize_t which_serial_feature;
if (find_feature_to_accumulate_onto(layer.features, sf, which_serial_feature, layer_unmaps, LLONG_MAX, multiplier_seq)) {
strategy.dropped_as_needed++;
if (layer.multiplier_cluster_size < (size_t) retain_points_multiplier) {
// we have capacity to keep this feature as part of an existing multiplier cluster that isn't full yet
// so do that instead of dropping it
@@ -1616,6 +1545,7 @@ bool drop_feature_unless_it_can_be_added_to_a_multiplier_cluster(layer_features
return false; // converted rather than dropped
} else {
preserve_attributes(attribute_accum, sf, layer.features[which_serial_feature]);
strategy.dropped_as_needed++;
drop_rest = true;
return true; // dropped
}
@@ -1630,9 +1560,10 @@ void skip_tile(decompressor *geoms, std::atomic<long long> *geompos_in, bool com
}
}
long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, char *global_stringpool, int z, const unsigned tx, const unsigned ty, const int detail, int min_detail, sqlite3 *outdb, const char *outdir, int buffer, const char *fname, compressor **geomfile, std::atomic<long long> *geompos, int minzoom, int maxzoom, double todo, std::atomic<long long> *along, long long alongminus, double gamma, int child_shards, long long *pool_off, unsigned *initial_x, unsigned *initial_y, std::atomic<int> *running, double simplification, std::vector<std::map<std::string, layermap_entry>> *layermaps, std::vector<std::vector<std::string>> *layer_unmaps, size_t tiling_seg, size_t pass, unsigned long long mingap, long long minextent, unsigned long long mindrop_sequence, const char *prefilter, const char *postfilter, json_object *filter, write_tile_args *arg, atomic_strategy *strategy_out, bool compressed_input, node *shared_nodes_map, size_t nodepos, std::string const &shared_nodes_bloom, std::vector<std::string> const &unidecode_data, long long estimated_complexity, std::set<zxy> &skip_children_out) {
long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, char *global_stringpool, int z, const unsigned tx, const unsigned ty, const int detail, int min_detail, sqlite3 *outdb, const char *outdir, int buffer, const char *fname, compressor **geomfile, std::atomic<long long> *geompos, int minzoom, int maxzoom, double todo, std::atomic<long long> *along, long long alongminus, double gamma, int child_shards, long long *pool_off, unsigned *initial_x, unsigned *initial_y, std::atomic<int> *running, double simplification, std::vector<std::map<std::string, layermap_entry>> *layermaps, std::vector<std::vector<std::string>> *layer_unmaps, size_t tiling_seg, size_t pass, unsigned long long mingap, unsigned long long maxgap, long long minextent, unsigned long long mindrop_sequence, const char *prefilter, const char *postfilter, json_object *filter, write_tile_args *arg, atomic_strategy *strategy_out, bool compressed_input, node *shared_nodes_map, size_t nodepos, std::string const &shared_nodes_bloom, std::vector<std::string> const &unidecode_data, long long estimated_complexity, std::set<zxy> &skip_children_out) {
double merge_fraction = 1;
double mingap_fraction = 1;
double maxgap_fraction = 1;
double minextent_fraction = 1;
double mindrop_sequence_fraction = 1;
@@ -1672,7 +1603,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
// empirical estimate from ne_10m_admin_0_countries, CPAD units, Cal fires.
// only try to make an overzoomable final tile if it seems like it might work
long long estimated_output_tile_size = 0.6693 * estimated_complexity - 3.36e+04;
if (estimated_output_tile_size < (long long) (0.9 * max_tile_size) && 30 - z > detail) {
if (estimated_output_tile_size < (long long) (0.9 * max_tile_size)) {
first_detail = 30 - z;
second_detail = detail;
trying_to_stop_early = true;
@@ -1722,9 +1654,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
size_t lead_features_count = 0; // of the tile so far
size_t other_multiplier_cluster_features_count = 0; // of the tile so far
bool too_many_features = false;
bool too_many_bytes = false;
std::atomic<bool> within[child_shards];
long long start_geompos[child_shards];
for (size_t i = 0; i < (size_t) child_shards; i++) {
@@ -1949,11 +1878,11 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
can_stop_early = false;
continue;
}
} else if (additional[A_DROP_DENSEST_AS_NEEDED]) {
} else if (additional[A_DROP_DENSEST_AS_NEEDED] || additional[A_DROP_SPARSEST_AS_NEEDED]) {
add_sample_to(gaps, sf.gap, gaps_increment, seq);
if (sf.gap < mingap) {
can_stop_early = false;
if (sf.gap < mingap || sf.gap > maxgap) {
if (drop_feature_unless_it_can_be_added_to_a_multiplier_cluster(layer, sf, layer_unmaps, multiplier_seq, strategy, drop_rest, arg->attribute_accum)) {
can_stop_early = false;
continue;
}
}
@@ -1980,9 +1909,9 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
drop_rest = true;
continue;
}
} else if (additional[A_COALESCE_DENSEST_AS_NEEDED]) {
} else if (additional[A_COALESCE_DENSEST_AS_NEEDED] || additional[A_COALESCE_SPARSEST_AS_NEEDED]) {
add_sample_to(gaps, sf.gap, gaps_increment, seq);
if (sf.gap < mingap && find_feature_to_accumulate_onto(features, sf, which_serial_feature, layer_unmaps, LLONG_MAX, multiplier_seq)) {
if ((sf.gap < mingap || sf.gap > maxgap) && find_feature_to_accumulate_onto(features, sf, which_serial_feature, layer_unmaps, LLONG_MAX, multiplier_seq)) {
coalesce_geometry(features[which_serial_feature], sf);
features[which_serial_feature].coalesced = true;
coalesced_area += sf.extent;
@@ -1997,8 +1926,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
// search here is for LLONG_MAX, not minextent, because we are dropping features, not coalescing them,
// so we shouldn't expect to find anything small that we can related this feature to.
if (minextent != 0 && sf.extent + coalesced_area <= minextent) {
can_stop_early = false;
if (drop_feature_unless_it_can_be_added_to_a_multiplier_cluster(layer, sf, layer_unmaps, multiplier_seq, strategy, drop_rest, arg->attribute_accum)) {
can_stop_early = false;
continue;
}
}
@@ -2016,9 +1945,11 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
}
} else if (additional[A_DROP_FRACTION_AS_NEEDED] || prevent[P_DYNAMIC_DROP]) {
add_sample_to(drop_sequences, drop_sequence, drop_sequences_increment, seq);
// search here is for LLONG_MAX, not minextent, because we are dropping features, not coalescing them,
// so we shouldn't expect to find anything small that we can related this feature to.
if (mindrop_sequence != 0 && drop_sequence <= mindrop_sequence) {
can_stop_early = false;
if (drop_feature_unless_it_can_be_added_to_a_multiplier_cluster(layer, sf, layer_unmaps, multiplier_seq, strategy, drop_rest, arg->attribute_accum)) {
can_stop_early = false;
continue;
}
}
@@ -2078,42 +2009,10 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
unsigned long long sfindex = sf.index;
if (sf.geometry.size() > 0) {
// There are two adjustments that we need to make
// when determining if we have hit the feature count
// or byte size limit:
//
// The max_tile_size and max_tile_features are inflated
// to account for the number of multiplier clusters features
// we are carrying around in addition to their lead features.
size_t adjusted_max_tile_size = max_tile_size;
if (lead_features_count > 0) {
adjusted_max_tile_size = adjusted_max_tile_size * (lead_features_count + other_multiplier_cluster_features_count) / lead_features_count;
}
size_t adjusted_max_tile_features = max_tile_features;
if (lead_features_count > 0) {
adjusted_max_tile_features = adjusted_max_tile_features * (lead_features_count + other_multiplier_cluster_features_count) / lead_features_count;
}
// The number of features in the tile, meanwhile, is inflated
// to account for the number of features that we have skipped over
// because we were already over the limit, in addition to those
// that we have actually added to the layer (as either lead or
// multiplier features).
size_t adjusted_feature_count = lead_features_count + other_multiplier_cluster_features_count;
if (kept > 0) {
adjusted_feature_count = adjusted_feature_count * (skipped + kept) / kept;
}
if (too_many_bytes || (adjusted_feature_count > adjusted_max_tile_size && !prevent[P_KILOBYTE_LIMIT])) {
if (lead_features_count > max_tile_size || (lead_features_count + other_multiplier_cluster_features_count > max_tile_features && !prevent[P_FEATURE_LIMIT])) {
// Even being maximally conservative, each feature is still going to be
// at least one byte in the output tile, so this can't possibly work.
skipped++;
too_many_bytes = true;
} else if (too_many_features || ((adjusted_feature_count > adjusted_max_tile_features) && !prevent[P_FEATURE_LIMIT])) {
skipped++;
too_many_features = true;
} else {
kept++;
@@ -2249,13 +2148,13 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
first_time = false;
// Adjust tile size limit based on the ratio of multiplier cluster features to lead features
size_t adjusted_max_tile_size = max_tile_size;
size_t scaled_max_tile_size = max_tile_size;
if (lead_features_count > 0) {
adjusted_max_tile_size = adjusted_max_tile_size * (lead_features_count + other_multiplier_cluster_features_count) / lead_features_count;
scaled_max_tile_size *= (lead_features_count + other_multiplier_cluster_features_count) / lead_features_count;
}
size_t adjusted_max_tile_features = max_tile_features;
size_t scaled_max_tile_features = max_tile_features;
if (lead_features_count > 0) {
adjusted_max_tile_features = adjusted_max_tile_features * (lead_features_count + other_multiplier_cluster_features_count) / lead_features_count;
scaled_max_tile_features *= (lead_features_count + other_multiplier_cluster_features_count) / lead_features_count;
}
// Operations on the features within each layer:
@@ -2490,27 +2389,23 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
if (z == maxzoom && limit_tile_feature_count_at_maxzoom != 0) {
if (layer_features.size() > limit_tile_feature_count_at_maxzoom) {
// this is maxzoom; ok to stop early still because they said to limit abruptly
can_stop_early = false;
layer_features.resize(limit_tile_feature_count_at_maxzoom);
too_many_features = false; // don't try to drop; we have already truncated
skipped = 0; // doesn't matter that we skipped features; we have truncated
}
} else if (limit_tile_feature_count != 0) {
if (layer_features.size() > limit_tile_feature_count) {
can_stop_early = false;
layer_features.resize(limit_tile_feature_count);
too_many_features = false; // don't try to drop; we have already truncated
skipped = 0; // doesn't matter that we skipped features; we have truncated
}
}
}
mvt_tile tile;
size_t feature_count = 0;
size_t totalsize = 0;
for (auto layer_iterator = layers.begin(); layer_iterator != layers.end(); ++layer_iterator) {
std::vector<serial_feature> &layer_features = layer_iterator->second.features;
feature_count += layer_features.size();
totalsize += layer_features.size();
mvt_layer layer;
layer.name = layer_iterator->first;
@@ -2601,23 +2496,14 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
continue;
}
// Again, adjust the retabulated feature count to estimate
// how many total features there would have been if we hadn't
// hit the limit and started dropping early.
size_t adjusted_feature_count = feature_count;
if (kept > 0) {
adjusted_feature_count = adjusted_feature_count * (skipped + kept) / kept;
}
if (adjusted_feature_count > 0 && tile.layers.size() > 0) {
if (too_many_features || (adjusted_feature_count > adjusted_max_tile_features && !prevent[P_FEATURE_LIMIT])) {
if (adjusted_feature_count > arg->feature_count_out) {
arg->feature_count_out = adjusted_feature_count;
if (totalsize > 0 && tile.layers.size() > 0) {
if (totalsize > scaled_max_tile_features && !prevent[P_FEATURE_LIMIT]) {
if (totalsize > arg->feature_count_out) {
arg->feature_count_out = totalsize;
}
if (!quiet) {
fprintf(stderr, "tile %d/%u/%u has %zu (estimated %zu) features, >%zu \n", z, tx, ty, feature_count, adjusted_feature_count, adjusted_max_tile_features);
fprintf(stderr, "tile %d/%u/%u has %zu features, >%zu \n", z, tx, ty, totalsize, scaled_max_tile_features);
}
if (trying_to_stop_early && line_detail == first_detail) {
@@ -2643,7 +2529,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
line_detail++; // to keep it the same when the loop decrements it
continue;
} else if (mingap < ULONG_MAX && (additional[A_DROP_DENSEST_AS_NEEDED] || additional[A_COALESCE_DENSEST_AS_NEEDED] || additional[A_CLUSTER_DENSEST_AS_NEEDED])) {
mingap_fraction = mingap_fraction * adjusted_max_tile_features / adjusted_feature_count * 0.80;
mingap_fraction = mingap_fraction * scaled_max_tile_features / totalsize * 0.80;
unsigned long long m = choose_mingap(gaps, mingap_fraction, mingap);
if (m != mingap) {
mingap = m;
@@ -2657,8 +2543,23 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
line_detail++;
continue;
}
} else if (maxgap > 0 && (additional[A_DROP_SPARSEST_AS_NEEDED] || additional[A_COALESCE_SPARSEST_AS_NEEDED])) {
maxgap_fraction = maxgap_fraction * scaled_max_tile_features / totalsize * 0.80;
unsigned long long m = choose_maxgap(gaps, maxgap_fraction, maxgap);
if (m != maxgap) {
maxgap = m;
if (maxgap < arg->maxgap_out) {
arg->maxgap_out = maxgap;
arg->still_dropping = true;
}
if (!quiet) {
fprintf(stderr, "Going to try keeping the densest %0.2f%% of the features to make it fit\n", maxgap_fraction * 100.0);
}
line_detail++;
continue;
}
} else if (additional[A_DROP_SMALLEST_AS_NEEDED] || additional[A_COALESCE_SMALLEST_AS_NEEDED]) {
minextent_fraction = minextent_fraction * adjusted_max_tile_features / adjusted_feature_count * 0.75;
minextent_fraction = minextent_fraction * scaled_max_tile_features / totalsize * 0.75;
long long m = choose_minextent(extents, minextent_fraction, minextent);
if (m != minextent) {
minextent = m;
@@ -2672,11 +2573,11 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
line_detail++;
continue;
}
} else if (feature_count > layers.size() && (additional[A_DROP_FRACTION_AS_NEEDED] || additional[A_COALESCE_FRACTION_AS_NEEDED] || prevent[P_DYNAMIC_DROP])) {
} else if (totalsize > layers.size() && (additional[A_DROP_FRACTION_AS_NEEDED] || additional[A_COALESCE_FRACTION_AS_NEEDED] || prevent[P_DYNAMIC_DROP])) {
// The 95% is a guess to avoid too many retries
// and probably actually varies based on how much duplicated metadata there is
mindrop_sequence_fraction = mindrop_sequence_fraction * adjusted_max_tile_features / adjusted_feature_count * 0.95;
mindrop_sequence_fraction = mindrop_sequence_fraction * scaled_max_tile_features / totalsize * 0.95;
unsigned long long m = choose_mindrop_sequence(drop_sequences, mindrop_sequence_fraction, mindrop_sequence);
if (m != mindrop_sequence) {
mindrop_sequence = m;
@@ -2709,24 +2610,26 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
compressed = pbf;
}
// And similarly, adjust the compressed byte size to estimate
// what it would have been if we hadn't stopped dropping features early
size_t adjusted_tile_size = compressed.size();
if (kept > 0) {
adjusted_tile_size = adjusted_tile_size * (kept + skipped) / kept;
if (trying_to_stop_early && line_detail == first_detail) {
// printf("%lld %zu\n", estimated_complexity, compressed.size());
}
if (too_many_bytes || (adjusted_tile_size > adjusted_max_tile_size && !prevent[P_KILOBYTE_LIMIT])) {
if (adjusted_tile_size > arg->tile_size_out) {
arg->tile_size_out = adjusted_tile_size;
if (compressed.size() > scaled_max_tile_size && !prevent[P_KILOBYTE_LIMIT]) {
// Estimate how big it really should have been compressed
// from how many features were kept vs skipped for already being
// over the threshold
double kept_adjust = (skipped + kept) / (double) kept;
if (compressed.size() > arg->tile_size_out) {
arg->tile_size_out = compressed.size() * kept_adjust;
}
if (!quiet) {
if (adjusted_tile_size == compressed.size()) {
fprintf(stderr, "tile %d/%u/%u size is %lld (probably really %zu) with detail %d, >%zu \n", z, tx, ty, (long long) compressed.size(), adjusted_tile_size, line_detail, adjusted_max_tile_size);
if (skipped > 0) {
fprintf(stderr, "tile %d/%u/%u size is %lld (probably really %lld) with detail %d, >%zu \n", z, tx, ty, (long long) compressed.size(), (long long) (compressed.size() * kept_adjust), line_detail, scaled_max_tile_size);
} else {
fprintf(stderr, "tile %d/%u/%u size is %lld with detail %d, >%zu \n", z, tx, ty, (long long) compressed.size(), line_detail, adjusted_max_tile_size);
fprintf(stderr, "tile %d/%u/%u size is %lld with detail %d, >%zu \n", z, tx, ty, (long long) compressed.size(), line_detail, scaled_max_tile_size);
}
}
@@ -2753,7 +2656,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
}
line_detail++; // to keep it the same when the loop decrements it
} else if (mingap < ULONG_MAX && (additional[A_DROP_DENSEST_AS_NEEDED] || additional[A_COALESCE_DENSEST_AS_NEEDED] || additional[A_CLUSTER_DENSEST_AS_NEEDED])) {
mingap_fraction = mingap_fraction * adjusted_max_tile_size / adjusted_tile_size * 0.80;
mingap_fraction = mingap_fraction * scaled_max_tile_size / (kept_adjust * compressed.size()) * 0.80;
unsigned long long m = choose_mingap(gaps, mingap_fraction, mingap);
if (m != mingap) {
mingap = m;
@@ -2767,8 +2670,23 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
line_detail++;
continue;
}
} else if (maxgap > 0 && (additional[A_DROP_SPARSEST_AS_NEEDED] || additional[A_COALESCE_SPARSEST_AS_NEEDED])) {
maxgap_fraction = maxgap_fraction * scaled_max_tile_size / (kept_adjust * compressed.size()) * 0.80;
unsigned long long m = choose_maxgap(gaps, maxgap_fraction, maxgap);
if (m != maxgap) {
maxgap = m;
if (maxgap < arg->maxgap_out) {
arg->maxgap_out = maxgap;
arg->still_dropping = true;
}
if (!quiet) {
fprintf(stderr, "Going to try keeping the densest %0.2f%% of the features to make it fit\n", maxgap_fraction * 100.0);
}
line_detail++;
continue;
}
} else if (additional[A_DROP_SMALLEST_AS_NEEDED] || additional[A_COALESCE_SMALLEST_AS_NEEDED]) {
minextent_fraction = minextent_fraction * adjusted_max_tile_size / adjusted_tile_size * 0.75;
minextent_fraction = minextent_fraction * scaled_max_tile_size / (kept_adjust * compressed.size()) * 0.75;
long long m = choose_minextent(extents, minextent_fraction, minextent);
if (m != minextent) {
minextent = m;
@@ -2782,8 +2700,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
line_detail++;
continue;
}
} else if (feature_count > layers.size() && (additional[A_DROP_FRACTION_AS_NEEDED] || additional[A_COALESCE_FRACTION_AS_NEEDED] || prevent[P_DYNAMIC_DROP])) {
mindrop_sequence_fraction = mindrop_sequence_fraction * adjusted_max_tile_size / adjusted_tile_size * 0.75;
} else if (totalsize > layers.size() && (additional[A_DROP_FRACTION_AS_NEEDED] || additional[A_COALESCE_FRACTION_AS_NEEDED] || prevent[P_DYNAMIC_DROP])) {
mindrop_sequence_fraction = mindrop_sequence_fraction * scaled_max_tile_size / (kept_adjust * compressed.size()) * 0.75;
unsigned long long m = choose_mindrop_sequence(drop_sequences, mindrop_sequence_fraction, mindrop_sequence);
if (m != mindrop_sequence) {
mindrop_sequence = m;
@@ -2808,11 +2726,6 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
exit(EXIT_PTHREAD);
}
if (skipped > 0 || too_many_bytes || too_many_features) {
fprintf(stderr, "Can't happen: writing tile even though we skipped\n");
exit(EXIT_IMPOSSIBLE);
}
if (outdb != NULL) {
mbtiles_write_tile(outdb, z, tx, ty, compressed.data(), compressed.size());
} else if (outdir != NULL) {
@@ -2933,6 +2846,7 @@ exit(EXIT_IMPOSSIBLE);
dc.begin();
}
arg->wrote_zoom = z;
long long len;
struct zxy parent(z - 1, x / 2, y / 2);
@@ -2940,8 +2854,7 @@ exit(EXIT_IMPOSSIBLE);
skip_tile(&dc, &geompos, arg->compressed);
len = 1;
} else {
arg->wrote_zoom = z;
len = write_tile(&dc, &geompos, arg->global_stringpool, z, x, y, z == arg->maxzoom ? arg->full_detail : arg->low_detail, arg->min_detail, arg->outdb, arg->outdir, arg->buffer, arg->fname, arg->geomfile, arg->geompos, arg->minzoom, arg->maxzoom, arg->todo, arg->along, geompos, arg->gamma, arg->child_shards, arg->pool_off, arg->initial_x, arg->initial_y, arg->running, arg->simplification, arg->layermaps, arg->layer_unmaps, arg->tiling_seg, arg->pass, arg->mingap, arg->minextent, arg->mindrop_sequence, arg->prefilter, arg->postfilter, arg->filter, arg, arg->strategy, arg->compressed, arg->shared_nodes_map, arg->nodepos, *(arg->shared_nodes_bloom), (*arg->unidecode_data), estimated_complexity, arg->skip_children_out);
len = write_tile(&dc, &geompos, arg->global_stringpool, z, x, y, z == arg->maxzoom ? arg->full_detail : arg->low_detail, arg->min_detail, arg->outdb, arg->outdir, arg->buffer, arg->fname, arg->geomfile, arg->geompos, arg->minzoom, arg->maxzoom, arg->todo, arg->along, geompos, arg->gamma, arg->child_shards, arg->pool_off, arg->initial_x, arg->initial_y, arg->running, arg->simplification, arg->layermaps, arg->layer_unmaps, arg->tiling_seg, arg->pass, arg->mingap, arg->maxgap, arg->minextent, arg->mindrop_sequence, arg->prefilter, arg->postfilter, arg->filter, arg, arg->strategy, arg->compressed, arg->shared_nodes_map, arg->nodepos, *(arg->shared_nodes_bloom), (*arg->unidecode_data), estimated_complexity, arg->skip_children_out);
}
if (pthread_mutex_lock(&var_lock) != 0) {
@@ -3034,8 +2947,6 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *global_stringpool, std::
std::set<zxy> skip_children;
int z;
int largest_written = -1;
for (z = iz; z <= maxzoom; z++) {
std::atomic<long long> most(0);
@@ -3120,6 +3031,7 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *global_stringpool, std::
double zoom_gamma = gamma;
unsigned long long zoom_mingap = 0;
unsigned long long zoom_maxgap = ULLONG_MAX;
long long zoom_minextent = 0;
unsigned long long zoom_mindrop_sequence = 0;
size_t zoom_tile_size = 0;
@@ -3153,7 +3065,9 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *global_stringpool, std::
args[thread].gamma = zoom_gamma;
args[thread].gamma_out = zoom_gamma;
args[thread].mingap = zoom_mingap;
args[thread].maxgap = zoom_maxgap;
args[thread].mingap_out = zoom_mingap;
args[thread].maxgap_out = zoom_maxgap;
args[thread].minextent = zoom_minextent;
args[thread].minextent_out = zoom_minextent;
args[thread].mindrop_sequence = zoom_mindrop_sequence;
@@ -3236,6 +3150,10 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *global_stringpool, std::
zoom_mingap = args[thread].mingap_out;
again = true;
}
if (args[thread].maxgap_out < zoom_maxgap) {
zoom_maxgap = args[thread].maxgap_out;
again = true;
}
if (args[thread].minextent_out > zoom_minextent) {
zoom_minextent = args[thread].minextent_out;
again = true;
@@ -3255,9 +3173,6 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *global_stringpool, std::
if (args[thread].wrote_zoom > z) {
z = args[thread].wrote_zoom;
}
if (args[thread].wrote_zoom > largest_written) {
largest_written = args[thread].wrote_zoom;
}
if (args[thread].still_dropping) {
extend_zooms = true;
@@ -3320,10 +3235,6 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *global_stringpool, std::
}
}
if (largest_written >= 0 && maxzoom > largest_written) {
maxzoom = largest_written;
}
for (size_t j = 0; j < TEMP_FILES; j++) {
// Can be < 0 if there is only one source file, at z0
if (geomfd[j] >= 0) {
-28
View File
@@ -3,9 +3,6 @@
#include "text.hpp"
#include "sort.hpp"
#include "tile-cache.hpp"
#include "mvt.hpp"
#include "projection.hpp"
#include "geometry.hpp"
#include <unistd.h>
#include <limits.h>
@@ -127,28 +124,3 @@ TEST_CASE("Bit reversal", "bit reversal") {
REQUIRE(bit_reverse(0x1234567812489BCF) == 0xF3D912481E6A2C48);
REQUIRE(bit_reverse(0xF3D912481E6A2C48) == 0x1234567812489BCF);
}
TEST_CASE("mvt_geometry bbox") {
std::vector<mvt_geometry> geom;
geom.emplace_back(mvt_moveto, 128, 128);
geom.emplace_back(mvt_lineto, 256, 256);
long long xmin, ymin, xmax, ymax;
get_bbox(geom, &xmin, &ymin, &xmax, &ymax, 11, 327, 791, 9);
double lon, lat;
tile2lonlat(xmin, ymin, 32, &lon, &lat);
REQUIRE(std::to_string(lon) == "-122.475586");
REQUIRE(std::to_string(lat) == "37.822802");
tile2lonlat(xmax, ymax, 32, &lon, &lat);
REQUIRE(std::to_string(lon) == "-122.431641");
REQUIRE(std::to_string(lat) == "37.788081");
unsigned long long start, end;
get_quadkey_bounds(xmin, ymin, xmax, ymax, &start, &end);
// 22 bits in common, for z11
REQUIRE(start == 0x1c84fc0000000000);
REQUIRE(end == 0x1c84ffffffffffff);
}
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP
#define VERSION "v2.62.0"
#define VERSION "v2.59.0"
#endif