Compare commits

...
Author SHA1 Message Date
Erica Fischer 29934401a1 Increment a count as features are found to be within the bins 2024-08-23 16:21:45 -07:00
Erica Fischer 1521c376dd Make some features to bin into 2024-08-23 15:59:53 -07:00
Erica Fischer aae1ab9085 GDAL-style bounding boxes have eaten my brain 2024-08-23 15:42:14 -07:00
Erica Fischer bc10e57a81 Find the matching bins 2024-08-23 15:01:25 -07:00
Erica Fischer 2b489cf338 Add point in polygon check. It crashes. 2024-08-23 14:48:24 -07:00
Erica Fischer 419a116168 Most of the bin scan 2024-08-23 14:32:06 -07:00
Erica Fischer 7243ae76c4 Smallest enclosing tile from bbox 2024-08-23 14:10:24 -07:00
Erica Fischer afa6a73a79 Bounding box of tile-relative mvt geometry 2024-08-23 13:12:43 -07:00
Erica Fischer 0514802f66 More fleshing out bin traversal 2024-08-23 12:18:46 -07:00
Erica Fischer ff9b59dacb Can't flatten points, so don't flatten bins either 2024-08-21 16:16:43 -07:00
Erica Fischer 14be3d2505 Starting to spell out the bin matching loop 2024-08-21 15:55:59 -07:00
Erica Fischer 7917d8b132 (Currently non-functional) test of binning 2024-08-21 15:16:44 -07:00
Erica Fischer 513c810c1b Some zip code bins to test with 2024-08-21 14:56:10 -07:00
Erica Fischer f1e5e4f109 Plumb the bins through to overzoom() 2024-08-21 14:30:04 -07:00
Erica Fischer f1112f6a12 Read the file of bins 2024-08-21 14:00:42 -07:00
Erica Fischer 58143b4815 Move code around so overzoom can link against parse_layers 2024-08-21 13:45:38 -07:00
Erica Fischer c91e07aaa6 Factoring out tilestats management from GeoJSON file reading 2024-08-21 12:46:21 -07:00
Erica Fischer 40bb4ff732 Be more careful to retry when the feature count is exceeded (#257)
* Clip before dealing with multiplier or filters in overzoom

* Be more careful to retry when the feature count is exceeded

* Adjust the estimated total feature count for the multiplier too

* Fix the feature count estimates, I think

* Pass build info into the version string

* Report the actual max zoom of any tiles as the metadata maxzoom

* Revert unneeded renaming to make the diff more readable

* Clean up the adjustments to tile sizes and feature counts

* Update version and changelog

* Dropping a feature into a multiplier cluster still effectively drops it

* Update changelog

* Rethink the changelog description

* Don't try to truncate zooms if we are still tiling at z18
2024-08-20 10:54:16 -07:00
30 changed files with 9962 additions and 8332 deletions
+8
View File
@@ -1,3 +1,11 @@
# 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
+10 -4
View File
@@ -1,14 +1,15 @@
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
CXXFLAGS := $(CXXFLAGS) -std=c++17 -fPIE
CFLAGS := $(CFLAGS) -fPIE -DBUILD_INFO=$(BUILD_INFO)
CXXFLAGS := $(CXXFLAGS) -std=c++17 -fPIE -DBUILD_INFO=$(BUILD_INFO)
LDFLAGS := $(LDFLAGS)
WARNING_FLAGS := -Wall -Wshadow -Wsign-compare -Wextra -Wunreachable-code -Wuninitialized -Wshadow
RELEASE_FLAGS := -O3 -DNDEBUG
@@ -73,10 +74,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
unit: unit.o text.o sort.o mvt.o projection.o clip.o attribute.o jsonpull/jsonpull.o evaluator.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
tippecanoe-overzoom: overzoom.o mvt.o clip.o evaluator.o jsonpull/jsonpull.o text.o attribute.o read_json.o projection.o
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
-include $(wildcard *.d)
@@ -360,6 +361,11 @@ 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
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"}'
+441 -37
View File
@@ -1,4 +1,5 @@
#include <stack>
#include <set>
#include <stdlib.h>
#include <mapbox/geometry/point.hpp>
#include <mapbox/geometry/multi_polygon.hpp>
@@ -11,6 +12,7 @@
#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,
@@ -1019,11 +1021,67 @@ 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) {
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) {
std::vector<source_tile> decoded;
for (auto const &t : tiles) {
@@ -1049,7 +1107,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);
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);
}
struct tile_feature {
@@ -1147,11 +1205,199 @@ 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
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;
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]]);
}
a.outfeature = outlayer.features.size();
a.counter = counters.size();
outlayer.features.push_back(std::move(outfeature));
counters.push_back(0);
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]++;
break;
}
}
} else /* EXIT */ {
auto const &found = active.find({e.layer, e.feature});
if (found != active.end()) {
mvt_value v;
v.type = mvt_uint;
v.numeric_value.uint_value = counters[found->counter];
outlayer.tag(outlayer.features[found->outfeature], "bin-count", v);
active.erase(found);
} else {
fprintf(stderr, "event mismatch: can't happen\n");
exit(EXIT_IMPOSSIBLE);
}
}
}
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) {
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) {
mvt_tile outtile;
std::shared_ptr<std::string> tile_stringpool = std::make_shared<std::string>();
@@ -1188,37 +1434,6 @@ 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;
@@ -1268,6 +1483,7 @@ 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;
}
@@ -1281,6 +1497,42 @@ 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;
@@ -1361,7 +1613,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);
demultiply, filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins);
if (child.size() > 0) {
next_overzoomed_tiles->emplace_back(nx * 2 + x, ny * 2 + y);
}
@@ -1370,6 +1622,10 @@ 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);
@@ -1391,3 +1647,151 @@ 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;
}
-170
View File
@@ -70,28 +70,6 @@ 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);
@@ -381,154 +359,6 @@ 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) {
+6 -3
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);
drawvec fix_polygon(const drawvec &geom, bool use_winding, bool reverse_winding);
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);
double tiny_polygon_size, std::vector<mvt_layer> const &bins);
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,8 +129,11 @@ 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);
double tiny_polygon_size, std::vector<mvt_layer> const &bins);
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
+1 -2
View File
@@ -49,7 +49,6 @@
#include "tile.hpp"
#include "pool.hpp"
#include "projection.hpp"
#include "version.hpp"
#include "memfile.hpp"
#include "main.hpp"
#include "geojson.hpp"
@@ -3608,7 +3607,7 @@ int main(int argc, char **argv) {
}
case 'v':
fprintf(stderr, "tippecanoe %s\n", VERSION);
fprintf(stderr, "tippecanoe %s\n", version_str().c_str());
exit(EXIT_SUCCESS);
case 'P':
+12 -1
View File
@@ -654,6 +654,17 @@ 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;
@@ -684,7 +695,7 @@ metadata make_metadata(const char *fname, int minzoom, int maxzoom, double minla
m.attribution = attribution;
}
m.generator = program + " " + VERSION;
m.generator = program + " " + version_str();
m.generator_options = commandline;
m.strategies_json = stringify_strategies(strategies);
+1
View File
@@ -77,5 +77,6 @@ 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
+31
View File
@@ -835,3 +835,34 @@ long long mvt_value_to_long_long(mvt_value const &v) {
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);
}
}
}
+4
View File
@@ -199,4 +199,8 @@ 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
+20 -1
View File
@@ -9,6 +9,7 @@
#include "evaluator.hpp"
#include "attribute.hpp"
#include "text.hpp"
#include "read_json.hpp"
extern char *optarg;
extern int optind;
@@ -20,6 +21,7 @@ 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;
@@ -37,6 +39,7 @@ 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;
@@ -53,6 +56,7 @@ 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},
};
@@ -119,6 +123,10 @@ 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);
@@ -182,6 +190,17 @@ 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());
@@ -208,7 +227,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);
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);
FILE *f = fopen(outfile, "wb");
if (f == NULL) {
+33 -185
View File
@@ -74,187 +74,51 @@ 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);
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);
}
std::vector<mvt_layer> out = parse_layers(f, z, x, y, extent);
json_free(jp->root);
break;
}
if (fclose(f) != 0) {
perror("fclose postfilter output");
exit(EXIT_CLOSE);
}
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;
}
for (auto const &layer : out) {
std::string layername = layer.name;
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);
}
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 *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);
}
layermap.insert(std::pair<std::string, layermap_entry>(layername, lme));
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 (lme.id >= (*layer_unmaps)[tiling_seg].size()) {
(*layer_unmaps)[tiling_seg].resize(lme.id + 1);
(*layer_unmaps)[tiling_seg][lme.id] = layername;
}
}
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 ts = layermap.find(layername);
if (ts == layermap.end()) {
fprintf(stderr, "Internal error: layer %s not found\n", layername.c_str());
exit(EXIT_IMPOSSIBLE);
}
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);
if (z < ts->second.minzoom) {
ts->second.minzoom = z;
}
if (z > ts->second.maxzoom) {
ts->second.maxzoom = z;
}
// 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;
}
for (auto const &feature : layer.features) {
if (feature.type == mvt_point) {
ts->second.points++;
} else if (feature.type == mvt_linestring) {
@@ -263,37 +127,21 @@ std::vector<mvt_layer> parse_layers(int fd, int z, unsigned x, unsigned y, std::
ts->second.polygons++;
}
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);
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]];
// 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);
add_to_tilestats(ts->second.tilestats, std::string(properties->value.object.keys[i]->value.string.string), sv);
if (val.type != mvt_null) {
add_to_tilestats(ts->second.tilestats, key, mvt_value_to_serial_val(val));
}
}
l->second.features.push_back(feature);
}
json_free(j);
}
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;
return out;
}
// Reads from the prefilter
@@ -377,7 +225,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);
dv = fix_polygon(dv, false, false);
}
// Scale and offset geometry from global to tile
+176
View File
@@ -166,3 +166,179 @@ 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);
}
// 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;
}
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,5 +12,6 @@ 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);
+1 -1
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);
scaled_geometry = fix_polygon(scaled_geometry, prevent[P_USE_SOURCE_POLYGON_WINDING], prevent[P_REVERSE_SOURCE_POLYGON_WINDING]);
}
for (auto &c : clipbboxes) {
@@ -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\":201}]",
"strategies": "[{\"coalesced_as_needed\":999,\"feature_count_desired\":1000}]",
"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\":201}]",
"strategies": "[{\"dropped_as_needed\":999,\"feature_count_desired\":1000}]",
"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\":201}]",
"strategies": "[{\"dropped_as_needed\":999,\"feature_count_desired\":1000}]",
"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
+57
View File
@@ -0,0 +1,57 @@
{ "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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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", "bin-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 ] ] ] } }
] }
] }
Binary file not shown.
+27
View File
@@ -0,0 +1,27 @@
{ "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 ] ] ] } }
+4 -3
View File
@@ -1,14 +1,15 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "0.000000,85.051129,0.000000,85.051129",
"bounds": "-180.000000,85.051129,180.000000,85.051129",
"center": "-179.989014,85.051129,14",
"center": "0.000000,85.051129,0",
"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\":14,\"fields\":{}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"nothing\",\"count\":1,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"maxzoom": "14",
"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",
"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::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>());
return ret;
}
+96 -43
View File
@@ -1525,6 +1525,7 @@ 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
@@ -1532,7 +1533,6 @@ 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
}
@@ -1589,8 +1589,7 @@ 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)) {
if (estimated_output_tile_size < (long long) (0.9 * max_tile_size) && 30 - z > detail) {
first_detail = 30 - z;
second_detail = detail;
trying_to_stop_early = true;
@@ -1640,6 +1639,9 @@ 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++) {
@@ -1867,8 +1869,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
} else if (additional[A_DROP_DENSEST_AS_NEEDED]) {
add_sample_to(gaps, sf.gap, gaps_increment, seq);
if (sf.gap < mingap) {
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;
}
}
@@ -1912,8 +1914,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;
}
}
@@ -1931,11 +1933,9 @@ 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;
}
}
@@ -1995,10 +1995,42 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
unsigned long long sfindex = sf.index;
if (sf.geometry.size() > 0) {
if (lead_features_count > max_tile_size || (lead_features_count + other_multiplier_cluster_features_count > max_tile_features && !prevent[P_FEATURE_LIMIT])) {
// 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) {
// 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++;
@@ -2134,13 +2166,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 scaled_max_tile_size = max_tile_size;
size_t adjusted_max_tile_size = max_tile_size;
if (lead_features_count > 0) {
scaled_max_tile_size *= (lead_features_count + other_multiplier_cluster_features_count) / lead_features_count;
adjusted_max_tile_size = adjusted_max_tile_size * (lead_features_count + other_multiplier_cluster_features_count) / lead_features_count;
}
size_t scaled_max_tile_features = max_tile_features;
size_t adjusted_max_tile_features = max_tile_features;
if (lead_features_count > 0) {
scaled_max_tile_features *= (lead_features_count + other_multiplier_cluster_features_count) / lead_features_count;
adjusted_max_tile_features = adjusted_max_tile_features * (lead_features_count + other_multiplier_cluster_features_count) / lead_features_count;
}
// Operations on the features within each layer:
@@ -2387,11 +2419,11 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
}
mvt_tile tile;
size_t totalsize = 0;
size_t feature_count = 0;
for (auto layer_iterator = layers.begin(); layer_iterator != layers.end(); ++layer_iterator) {
std::vector<serial_feature> &layer_features = layer_iterator->second.features;
totalsize += layer_features.size();
feature_count += layer_features.size();
mvt_layer layer;
layer.name = layer_iterator->first;
@@ -2482,14 +2514,23 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
continue;
}
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;
// 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 (!quiet) {
fprintf(stderr, "tile %d/%u/%u has %zu features, >%zu \n", z, tx, ty, totalsize, scaled_max_tile_features);
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);
}
if (trying_to_stop_early && line_detail == first_detail) {
@@ -2515,7 +2556,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 * scaled_max_tile_features / totalsize * 0.80;
mingap_fraction = mingap_fraction * adjusted_max_tile_features / adjusted_feature_count * 0.80;
unsigned long long m = choose_mingap(gaps, mingap_fraction, mingap);
if (m != mingap) {
mingap = m;
@@ -2530,7 +2571,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
continue;
}
} else if (additional[A_DROP_SMALLEST_AS_NEEDED] || additional[A_COALESCE_SMALLEST_AS_NEEDED]) {
minextent_fraction = minextent_fraction * scaled_max_tile_features / totalsize * 0.75;
minextent_fraction = minextent_fraction * adjusted_max_tile_features / adjusted_feature_count * 0.75;
long long m = choose_minextent(extents, minextent_fraction, minextent);
if (m != minextent) {
minextent = m;
@@ -2544,11 +2585,11 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
line_detail++;
continue;
}
} else if (totalsize > layers.size() && (additional[A_DROP_FRACTION_AS_NEEDED] || additional[A_COALESCE_FRACTION_AS_NEEDED] || prevent[P_DYNAMIC_DROP])) {
} else if (feature_count > 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 * scaled_max_tile_features / totalsize * 0.95;
mindrop_sequence_fraction = mindrop_sequence_fraction * adjusted_max_tile_features / adjusted_feature_count * 0.95;
unsigned long long m = choose_mindrop_sequence(drop_sequences, mindrop_sequence_fraction, mindrop_sequence);
if (m != mindrop_sequence) {
mindrop_sequence = m;
@@ -2581,26 +2622,24 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
compressed = pbf;
}
if (trying_to_stop_early && line_detail == first_detail) {
// printf("%lld %zu\n", estimated_complexity, compressed.size());
// 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 (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 (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 (!quiet) {
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);
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);
} else {
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);
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);
}
}
@@ -2627,7 +2666,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 * scaled_max_tile_size / (kept_adjust * compressed.size()) * 0.80;
mingap_fraction = mingap_fraction * adjusted_max_tile_size / adjusted_tile_size * 0.80;
unsigned long long m = choose_mingap(gaps, mingap_fraction, mingap);
if (m != mingap) {
mingap = m;
@@ -2642,7 +2681,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
continue;
}
} else if (additional[A_DROP_SMALLEST_AS_NEEDED] || additional[A_COALESCE_SMALLEST_AS_NEEDED]) {
minextent_fraction = minextent_fraction * scaled_max_tile_size / (kept_adjust * compressed.size()) * 0.75;
minextent_fraction = minextent_fraction * adjusted_max_tile_size / adjusted_tile_size * 0.75;
long long m = choose_minextent(extents, minextent_fraction, minextent);
if (m != minextent) {
minextent = m;
@@ -2656,8 +2695,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
line_detail++;
continue;
}
} 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;
} 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;
unsigned long long m = choose_mindrop_sequence(drop_sequences, mindrop_sequence_fraction, mindrop_sequence);
if (m != mindrop_sequence) {
mindrop_sequence = m;
@@ -2682,6 +2721,11 @@ 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) {
@@ -2802,7 +2846,6 @@ exit(EXIT_IMPOSSIBLE);
dc.begin();
}
arg->wrote_zoom = z;
long long len;
struct zxy parent(z - 1, x / 2, y / 2);
@@ -2810,6 +2853,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);
}
@@ -2903,6 +2947,8 @@ 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);
@@ -3122,6 +3168,9 @@ 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;
@@ -3184,6 +3233,10 @@ 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,6 +3,9 @@
#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>
@@ -124,3 +127,28 @@ 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.59.0"
#define VERSION "v2.60.0"
#endif