mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Work in progress on binning features in overzoom (#258)
* Factoring out tilestats management from GeoJSON file reading * Move code around so overzoom can link against parse_layers * Read the file of bins * Plumb the bins through to overzoom() * Some zip code bins to test with * (Currently non-functional) test of binning * Starting to spell out the bin matching loop * Can't flatten points, so don't flatten bins either * More fleshing out bin traversal * Bounding box of tile-relative mvt geometry * Smallest enclosing tile from bbox * Most of the bin scan * Add point in polygon check. It crashes. * Find the matching bins * GDAL-style bounding boxes have eaten my brain * Make some features to bin into * Increment a count as features are found to be within the bins * Fix longitude wraparound in overzoom bins * Fix the tests * Push off attribute copying until after bin assignment * Carry sum of numeric attributes into the bins * Also add mean, min, and max * Add --calculate-feature-index since I keep needing it for testing * Add an option to accumulate sum/mean/max/min/count of all numeric attrs * Don't bake in tippecanoe:mean, since we redo it from sum and count * Forgot to update this test fixture after removing tiled mean * Update version and changelog
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
# 2.61.0
|
||||||
|
|
||||||
|
* Added --calculate-feature-index option
|
||||||
|
* Added "count" accumulation type to --accumulate-attribute
|
||||||
|
* Work in progress on binning of point features in overzoom. Not ready for use yet.
|
||||||
|
|
||||||
# 2.60.0
|
# 2.60.0
|
||||||
|
|
||||||
* Fix bad interaction between --retain-points-multiplier and stopping early when the tile feature limit is reached
|
* Fix bad interaction between --retain-points-multiplier and stopping early when the tile feature limit is reached
|
||||||
|
|||||||
@@ -74,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
|
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
|
$(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
|
$(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
|
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread
|
||||||
|
|
||||||
-include $(wildcard *.d)
|
-include $(wildcard *.d)
|
||||||
@@ -361,6 +361,16 @@ 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
|
./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
|
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
|
rm tests/pbf/countries-0-0-0.pbf.out tests/pbf/countries-0-0-0.pbf.out.json.check
|
||||||
|
# Binning
|
||||||
|
./tippecanoe-overzoom -o tests/pbf/bin-11-327-791.pbf.out --assign-to-bins tests/pbf/sf-zips.json tests/pbf/muni-11-327-791.pbf 11/327/791 11/327/791
|
||||||
|
./tippecanoe-decode tests/pbf/bin-11-327-791.pbf.out 11 327 791 > tests/pbf/bin-11-327-791.pbf.out.json.check
|
||||||
|
cmp tests/pbf/bin-11-327-791.pbf.out.json.check tests/pbf/bin-11-327-791.pbf.out.json
|
||||||
|
rm tests/pbf/bin-11-327-791.pbf.out.json.check tests/pbf/bin-11-327-791.pbf.out
|
||||||
|
# Binning with longitude wraparound problems
|
||||||
|
./tippecanoe-overzoom -o tests/pbf/0-0-0-pop-2-0-1.pbf.out --assign-to-bins tests/pbf/h3-2-0-1.geojson tests/pbf/0-0-0.pbf 2/0/1 2/0/1
|
||||||
|
./tippecanoe-decode tests/pbf/0-0-0-pop-2-0-1.pbf.out 2 0 1 > tests/pbf/0-0-0-pop-2-0-1.pbf.out.json.check
|
||||||
|
cmp tests/pbf/0-0-0-pop-2-0-1.pbf.out.json.check tests/pbf/0-0-0-pop-2-0-1.pbf.out.json
|
||||||
|
rm tests/pbf/0-0-0-pop-2-0-1.pbf.out tests/pbf/0-0-0-pop-2-0-1.pbf.out.json.check
|
||||||
|
|
||||||
join-test: tippecanoe tippecanoe-decode tile-join
|
join-test: tippecanoe tippecanoe-decode tile-join
|
||||||
./tippecanoe -q -f -z12 -o tests/join-population/tabblock_06001420.mbtiles -YALAND10:'Land area' -L'{"file": "tests/join-population/tabblock_06001420.json", "description": "population"}'
|
./tippecanoe -q -f -z12 -o tests/join-population/tabblock_06001420.mbtiles -YALAND10:'Land area' -L'{"file": "tests/join-population/tabblock_06001420.json", "description": "population"}'
|
||||||
|
|||||||
@@ -533,6 +533,7 @@ the same layer, enclose them in an `all` expression so they will all be evaluate
|
|||||||
|
|
||||||
* `-ag` or `--calculate-feature-density`: Add a new attribute, `tippecanoe_feature_density`, to each feature, to record how densely features are spaced in that area of the tile. You can use this attribute in the style to produce a glowing effect where points are densely packed. It can range from 0 in the sparsest areas to 255 in the densest.
|
* `-ag` or `--calculate-feature-density`: Add a new attribute, `tippecanoe_feature_density`, to each feature, to record how densely features are spaced in that area of the tile. You can use this attribute in the style to produce a glowing effect where points are densely packed. It can range from 0 in the sparsest areas to 255 in the densest.
|
||||||
* `-ai` or `--generate-ids`: Add an `id` (a feature ID, not an attribute named `id`) to each feature that does not already have one. There is currently no guarantee that the `id` added will be stable between runs or that it will not conflict with manually-assigned feature IDs. Future versions of Tippecanoe may change the mechanism for allocating IDs.
|
* `-ai` or `--generate-ids`: Add an `id` (a feature ID, not an attribute named `id`) to each feature that does not already have one. There is currently no guarantee that the `id` added will be stable between runs or that it will not conflict with manually-assigned feature IDs. Future versions of Tippecanoe may change the mechanism for allocating IDs.
|
||||||
|
* `-aX` or `--calculate-feature-index`: Add a `tippecanoe:index` field to each feature, giving its index in the quadkey or hilbert sequence.
|
||||||
|
|
||||||
### Trying to correct bad source geometry
|
### Trying to correct bad source geometry
|
||||||
|
|
||||||
|
|||||||
+18
-1
@@ -23,8 +23,10 @@ void set_attribute_accum(std::unordered_map<std::string, attribute_op> &attribut
|
|||||||
t = op_concat;
|
t = op_concat;
|
||||||
} else if (type == "comma") {
|
} else if (type == "comma") {
|
||||||
t = op_comma;
|
t = op_comma;
|
||||||
|
} else if (type == "count") {
|
||||||
|
t = op_count;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Attribute method (%s) must be sum, product, mean, max, min, concat, or comma\n", type.c_str());
|
fprintf(stderr, "Attribute method (%s) must be sum, product, mean, max, min, concat, comma, or count\n", type.c_str());
|
||||||
exit(EXIT_ARGS);
|
exit(EXIT_ARGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,6 +142,21 @@ void preserve_attribute(attribute_op const &op, std::string const &key, serial_v
|
|||||||
full_values[i].s += std::string(",") + val.s;
|
full_values[i].s += std::string(",") + val.s;
|
||||||
full_values[i].type = mvt_string;
|
full_values[i].type = mvt_string;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case op_count: {
|
||||||
|
auto state = attribute_accum_state.find(key);
|
||||||
|
if (state == attribute_accum_state.end()) { // not already present
|
||||||
|
accum_state s;
|
||||||
|
s.count = 2;
|
||||||
|
attribute_accum_state.insert(std::pair<std::string, accum_state>(key, s));
|
||||||
|
|
||||||
|
full_values[i].s = std::to_string(s.count);
|
||||||
|
} else { // already present, incrementing
|
||||||
|
state->second.count += 1;
|
||||||
|
full_values[i].s = std::to_string(state->second.count);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ enum attribute_op {
|
|||||||
op_comma,
|
op_comma,
|
||||||
op_max,
|
op_max,
|
||||||
op_min,
|
op_min,
|
||||||
|
op_count,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct accum_state {
|
struct accum_state {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include <stack>
|
#include <stack>
|
||||||
|
#include <set>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <mapbox/geometry/point.hpp>
|
#include <mapbox/geometry/point.hpp>
|
||||||
#include <mapbox/geometry/multi_polygon.hpp>
|
#include <mapbox/geometry/multi_polygon.hpp>
|
||||||
@@ -11,6 +12,7 @@
|
|||||||
#include "evaluator.hpp"
|
#include "evaluator.hpp"
|
||||||
#include "serial.hpp"
|
#include "serial.hpp"
|
||||||
#include "attribute.hpp"
|
#include "attribute.hpp"
|
||||||
|
#include "projection.hpp"
|
||||||
|
|
||||||
static std::vector<std::pair<double, double>> clip_poly1(std::vector<std::pair<double, double>> &geom,
|
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,
|
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;
|
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,
|
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,
|
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
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,
|
bool demultiply, json_object *filter, bool preserve_input_order,
|
||||||
double tiny_polygon_size) {
|
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;
|
std::vector<source_tile> decoded;
|
||||||
|
|
||||||
for (auto const &t : tiles) {
|
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);
|
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 {
|
struct tile_feature {
|
||||||
@@ -1147,11 +1205,284 @@ static struct preservecmp {
|
|||||||
}
|
}
|
||||||
} preservecmp;
|
} preservecmp;
|
||||||
|
|
||||||
|
struct index_event {
|
||||||
|
unsigned long long where;
|
||||||
|
enum index_event_kind {
|
||||||
|
ENTER = 0, // new bin in is now active
|
||||||
|
CHECK, // point needs to be checked against active bins
|
||||||
|
EXIT // bin has ceased to be active
|
||||||
|
} kind;
|
||||||
|
size_t layer;
|
||||||
|
size_t feature;
|
||||||
|
|
||||||
|
index_event(unsigned long long where_, index_event_kind kind_, size_t layer_, size_t feature_)
|
||||||
|
: where(where_), kind(kind_), layer(layer_), feature(feature_) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator<(const index_event &ie) const {
|
||||||
|
if (where < ie.where) {
|
||||||
|
return true;
|
||||||
|
} else if (where == ie.where) {
|
||||||
|
if (kind < ie.kind) {
|
||||||
|
return true;
|
||||||
|
} else if (kind == ie.kind) {
|
||||||
|
if (layer < ie.layer) {
|
||||||
|
return true;
|
||||||
|
} else if (layer == ie.layer) {
|
||||||
|
if (feature < ie.feature) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct active_bin {
|
||||||
|
size_t layer;
|
||||||
|
size_t feature;
|
||||||
|
|
||||||
|
active_bin(size_t layer_, size_t feature_)
|
||||||
|
: layer(layer_), feature(feature_) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator<(const active_bin &o) const {
|
||||||
|
if (layer < o.layer) {
|
||||||
|
return true;
|
||||||
|
} else if (layer == o.layer) {
|
||||||
|
if (feature < o.feature) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t outfeature;
|
||||||
|
long long xmin, ymin, xmax, ymax;
|
||||||
|
size_t counter = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
void get_quadkey_bounds(long long xmin, long long ymin, long long xmax, long long ymax,
|
||||||
|
unsigned long long *start, unsigned long long *end) {
|
||||||
|
if (xmin < 0 || ymin < 0 || xmax >= 1LL << 32 || ymax >= 1LL << 32) {
|
||||||
|
*start = 0;
|
||||||
|
*end = ULLONG_MAX;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
*start = encode_quadkey(xmin, ymin);
|
||||||
|
*end = encode_quadkey(xmax, ymax);
|
||||||
|
|
||||||
|
for (ssize_t i = 62; i >= 0; i -= 2) {
|
||||||
|
if ((*start & (3LL << i)) != (*end & (3LL << i))) {
|
||||||
|
for (; i >= 0; i -= 2) {
|
||||||
|
*start &= ~(3LL << i);
|
||||||
|
*end |= 3LL << i;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mvt_tile assign_to_bins(mvt_tile const &features, std::vector<mvt_layer> const &bins, int z, int x, int y, int detail) {
|
||||||
|
std::vector<index_event> events;
|
||||||
|
|
||||||
|
// Index bins
|
||||||
|
for (size_t i = 0; i < bins.size(); i++) {
|
||||||
|
for (size_t j = 0; j < bins[i].features.size(); j++) {
|
||||||
|
long long xmin, ymin, xmax, ymax;
|
||||||
|
unsigned long long start, end;
|
||||||
|
|
||||||
|
get_bbox(bins[i].features[j].geometry, &xmin, &ymin, &xmax, &ymax, z, x, y, detail);
|
||||||
|
get_quadkey_bounds(xmin, ymin, xmax, ymax, &start, &end);
|
||||||
|
events.emplace_back(start, index_event::ENTER, i, j);
|
||||||
|
events.emplace_back(end, index_event::EXIT, i, j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Index points
|
||||||
|
for (size_t i = 0; i < features.layers.size(); i++) {
|
||||||
|
for (size_t j = 0; j < features.layers[i].features.size(); j++) {
|
||||||
|
long long xmin, ymin, xmax, ymax;
|
||||||
|
unsigned long long start, end;
|
||||||
|
|
||||||
|
if (features.layers[i].features[j].geometry.size() > 0) {
|
||||||
|
get_bbox(features.layers[i].features[j].geometry, &xmin, &ymin, &xmax, &ymax, z, x, y, detail);
|
||||||
|
get_quadkey_bounds(xmin, ymin, xmax, ymax, &start, &end);
|
||||||
|
events.emplace_back(start, index_event::CHECK, i, j);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::sort(events.begin(), events.end());
|
||||||
|
std::set<active_bin> active;
|
||||||
|
std::vector<size_t> counters; // separate because set items can't be mutated from an iterator
|
||||||
|
std::vector<std::map<std::string, double>> sums; // separate because set items can't be mutated from an iterator
|
||||||
|
std::vector<std::map<std::string, double>> maxes; // separate because set items can't be mutated from an iterator
|
||||||
|
std::vector<std::map<std::string, double>> mins; // separate because set items can't be mutated from an iterator
|
||||||
|
std::vector<std::map<std::string, double>> counts; // separate because set items can't be mutated from an iterator
|
||||||
|
|
||||||
|
mvt_layer outlayer;
|
||||||
|
outlayer.extent = 1 << detail;
|
||||||
|
outlayer.version = 2;
|
||||||
|
outlayer.name = features.layers[0].name;
|
||||||
|
|
||||||
|
for (auto &e : events) {
|
||||||
|
if (e.kind == index_event::ENTER) {
|
||||||
|
active_bin a(e.layer, e.feature);
|
||||||
|
|
||||||
|
const mvt_feature &bin = bins[e.layer].features[e.feature];
|
||||||
|
mvt_feature outfeature;
|
||||||
|
outfeature.geometry = bin.geometry;
|
||||||
|
outfeature.type = bin.type;
|
||||||
|
a.outfeature = outlayer.features.size();
|
||||||
|
|
||||||
|
a.counter = counters.size();
|
||||||
|
counters.push_back(0);
|
||||||
|
sums.emplace_back();
|
||||||
|
maxes.emplace_back();
|
||||||
|
mins.emplace_back();
|
||||||
|
counts.emplace_back();
|
||||||
|
|
||||||
|
outlayer.features.push_back(std::move(outfeature));
|
||||||
|
active.insert(std::move(a));
|
||||||
|
} else if (e.kind == index_event::CHECK) {
|
||||||
|
auto const &feature = features.layers[e.layer].features[e.feature];
|
||||||
|
#if 0
|
||||||
|
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
|
||||||
|
printf("%s ", features.layers[e.layer].values[feature.tags[i + 1]].toString().c_str());
|
||||||
|
}
|
||||||
|
printf(": ");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (auto const &a : active) {
|
||||||
|
auto const &bin = bins[a.layer].features[a.feature];
|
||||||
|
|
||||||
|
// XXX do bounding box check first
|
||||||
|
if (pnpoly_mp(bin.geometry, feature.geometry[0].x, feature.geometry[0].y)) {
|
||||||
|
#if 0
|
||||||
|
printf("found: ");
|
||||||
|
|
||||||
|
for (size_t i = 0; i + 1 < bin.tags.size(); i += 2) {
|
||||||
|
printf("%s ", bins[a.first].values[bin.tags[i + 1]].toString().c_str());
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
#endif
|
||||||
|
counters[a.counter]++;
|
||||||
|
|
||||||
|
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
|
||||||
|
const mvt_value &val = features.layers[e.layer].values[feature.tags[i + 1]];
|
||||||
|
const std::string &key = features.layers[e.layer].keys[feature.tags[i]];
|
||||||
|
|
||||||
|
if (val.is_numeric()) {
|
||||||
|
auto sum_attr = sums[a.counter].find(key);
|
||||||
|
if (sum_attr == sums[a.counter].end()) {
|
||||||
|
sums[a.counter].emplace(key, 0);
|
||||||
|
mins[a.counter].emplace(key, std::numeric_limits<double>::infinity());
|
||||||
|
maxes[a.counter].emplace(key, -std::numeric_limits<double>::infinity());
|
||||||
|
counts[a.counter].emplace(key, 0);
|
||||||
|
|
||||||
|
sum_attr = sums[a.counter].find(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
auto min_attr = mins[a.counter].find(key);
|
||||||
|
auto max_attr = maxes[a.counter].find(key);
|
||||||
|
auto count_attr = counts[a.counter].find(key);
|
||||||
|
double v = mvt_value_to_double(val);
|
||||||
|
|
||||||
|
sum_attr->second += v;
|
||||||
|
count_attr->second += 1;
|
||||||
|
min_attr->second = std::min(min_attr->second, v);
|
||||||
|
max_attr->second = std::max(max_attr->second, v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else /* EXIT */ {
|
||||||
|
auto const &found = active.find({e.layer, e.feature});
|
||||||
|
if (found != active.end()) {
|
||||||
|
mvt_feature &outfeature = outlayer.features[found->outfeature];
|
||||||
|
|
||||||
|
if (counters[found->counter] >= 0) {
|
||||||
|
const mvt_feature &bin = bins[e.layer].features[e.feature];
|
||||||
|
|
||||||
|
// copy attributes from the original bin feature
|
||||||
|
for (size_t i = 0; i + 1 < bin.tags.size(); i += 2) {
|
||||||
|
outlayer.tag(outfeature, bins[e.layer].keys[bin.tags[i]], bins[e.layer].values[bin.tags[i + 1]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// new attribute for number of features assigned to the bin
|
||||||
|
mvt_value v;
|
||||||
|
v.type = mvt_uint;
|
||||||
|
v.numeric_value.uint_value = counters[found->counter];
|
||||||
|
outlayer.tag(outfeature, "tippecanoe:count", v);
|
||||||
|
|
||||||
|
for (auto const &kv : sums[found->counter]) {
|
||||||
|
mvt_value v_sum;
|
||||||
|
v_sum.type = mvt_double;
|
||||||
|
v_sum.numeric_value.double_value = kv.second;
|
||||||
|
outlayer.tag(outfeature, "tippecanoe:sum:" + kv.first, v_sum);
|
||||||
|
|
||||||
|
mvt_value v_count;
|
||||||
|
v_count.type = mvt_double;
|
||||||
|
v_count.numeric_value.double_value = counts[found->counter][kv.first];
|
||||||
|
outlayer.tag(outfeature, "tippecanoe:count:" + kv.first, v_count);
|
||||||
|
|
||||||
|
mvt_value v_mean;
|
||||||
|
v_mean.type = mvt_double;
|
||||||
|
v_mean.numeric_value.double_value = kv.second / counters[found->counter];
|
||||||
|
outlayer.tag(outfeature, "tippecanoe:mean:" + kv.first, v_mean);
|
||||||
|
|
||||||
|
mvt_value v_min;
|
||||||
|
v_min.type = mvt_double;
|
||||||
|
v_min.numeric_value.double_value = mins[found->counter][kv.first];
|
||||||
|
outlayer.tag(outfeature, "tippecanoe:min:" + kv.first, v_min);
|
||||||
|
|
||||||
|
mvt_value v_max;
|
||||||
|
v_max.type = mvt_double;
|
||||||
|
v_max.numeric_value.double_value = maxes[found->counter][kv.first];
|
||||||
|
outlayer.tag(outfeature, "tippecanoe:max:" + kv.first, v_max);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
outfeature.geometry.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
active.erase(found);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "event mismatch: can't happen\n");
|
||||||
|
exit(EXIT_IMPOSSIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// crunch out bin features whose geometry we cleared along the way
|
||||||
|
size_t out = 0;
|
||||||
|
for (size_t i = 0; i < outlayer.features.size(); i++) {
|
||||||
|
if (outlayer.features[i].geometry.size() > 0) {
|
||||||
|
outlayer.features[out++] = outlayer.features[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
outlayer.features.resize(out);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
mvt_tile ret;
|
||||||
|
ret.layers.push_back(outlayer);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int ny,
|
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,
|
int detail, int buffer, std::set<std::string> const &keep, bool do_compress,
|
||||||
std::vector<std::pair<unsigned, unsigned>> *next_overzoomed_tiles,
|
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,
|
bool demultiply, json_object *filter, bool preserve_input_order,
|
||||||
double tiny_polygon_size) {
|
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;
|
mvt_tile outtile;
|
||||||
std::shared_ptr<std::string> tile_stringpool = std::make_shared<std::string>();
|
std::shared_ptr<std::string> tile_stringpool = std::make_shared<std::string>();
|
||||||
|
|
||||||
@@ -1367,7 +1698,7 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
|||||||
std::string child = overzoom(sts,
|
std::string child = overzoom(sts,
|
||||||
nz + 1, nx * 2 + x, ny * 2 + y,
|
nz + 1, nx * 2 + x, ny * 2 + y,
|
||||||
detail, buffer, keep, false, NULL,
|
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) {
|
if (child.size() > 0) {
|
||||||
next_overzoomed_tiles->emplace_back(nx * 2 + x, ny * 2 + y);
|
next_overzoomed_tiles->emplace_back(nx * 2 + x, ny * 2 + y);
|
||||||
}
|
}
|
||||||
@@ -1376,6 +1707,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--) {
|
for (ssize_t i = outtile.layers.size() - 1; i >= 0; i--) {
|
||||||
if (outtile.layers[i].features.size() == 0) {
|
if (outtile.layers[i].features.size() == 0) {
|
||||||
outtile.layers.erase(outtile.layers.begin() + i);
|
outtile.layers.erase(outtile.layers.begin() + i);
|
||||||
@@ -1397,3 +1732,151 @@ std::string overzoom(std::vector<source_tile> const &tiles, int nz, int nx, int
|
|||||||
return "";
|
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
@@ -70,28 +70,6 @@ drawvec decode_geometry(const char **meta, int z, unsigned tx, unsigned ty, long
|
|||||||
return out;
|
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) {
|
void check_polygon(drawvec &geom) {
|
||||||
geom = remove_noop(geom, VT_POLYGON, 0);
|
geom = remove_noop(geom, VT_POLYGON, 0);
|
||||||
|
|
||||||
@@ -381,154 +359,6 @@ drawvec reorder_lines(const drawvec &geom) {
|
|||||||
return 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
|
#if 0
|
||||||
std::vector<drawvec> chop_polygon(std::vector<drawvec> &geoms) {
|
std::vector<drawvec> chop_polygon(std::vector<drawvec> &geoms) {
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|||||||
+6
-3
@@ -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);
|
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 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 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);
|
std::vector<drawvec> chop_polygon(std::vector<drawvec> &geoms);
|
||||||
void check_polygon(drawvec &geom);
|
void check_polygon(drawvec &geom);
|
||||||
double get_area(const drawvec &geom, size_t i, size_t j);
|
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,
|
bool demultiply, json_object *filter, bool preserve_input_order,
|
||||||
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
||||||
std::vector<std::string> const &unidecode_data, double simplification,
|
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,
|
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,
|
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,
|
bool demultiply, json_object *filter, bool preserve_input_order,
|
||||||
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
std::unordered_map<std::string, attribute_op> const &attribute_accum,
|
||||||
std::vector<std::string> const &unidecode_data, double simplification,
|
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);
|
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
|
#endif
|
||||||
|
|||||||
@@ -3084,6 +3084,7 @@ int main(int argc, char **argv) {
|
|||||||
{"attribute-type", required_argument, 0, 'T'},
|
{"attribute-type", required_argument, 0, 'T'},
|
||||||
{"attribute-description", required_argument, 0, 'Y'},
|
{"attribute-description", required_argument, 0, 'Y'},
|
||||||
{"accumulate-attribute", required_argument, 0, 'E'},
|
{"accumulate-attribute", required_argument, 0, 'E'},
|
||||||
|
{"accumulate-numeric-attributes", no_argument, &additional[A_ACCUMULATE_NUMERIC], 1},
|
||||||
{"empty-csv-columns-are-null", no_argument, &prevent[P_EMPTY_CSV_COLUMNS], 1},
|
{"empty-csv-columns-are-null", no_argument, &prevent[P_EMPTY_CSV_COLUMNS], 1},
|
||||||
{"convert-stringified-ids-to-numbers", no_argument, &additional[A_CONVERT_NUMERIC_IDS], 1},
|
{"convert-stringified-ids-to-numbers", no_argument, &additional[A_CONVERT_NUMERIC_IDS], 1},
|
||||||
{"use-attribute-for-id", required_argument, 0, '~'},
|
{"use-attribute-for-id", required_argument, 0, '~'},
|
||||||
@@ -3156,6 +3157,7 @@ int main(int argc, char **argv) {
|
|||||||
{"Adding calculated attributes", 0, 0, 0},
|
{"Adding calculated attributes", 0, 0, 0},
|
||||||
{"calculate-feature-density", no_argument, &additional[A_CALCULATE_FEATURE_DENSITY], 1},
|
{"calculate-feature-density", no_argument, &additional[A_CALCULATE_FEATURE_DENSITY], 1},
|
||||||
{"generate-ids", no_argument, &additional[A_GENERATE_IDS], 1},
|
{"generate-ids", no_argument, &additional[A_GENERATE_IDS], 1},
|
||||||
|
{"calculate-feature-index", no_argument, &additional[A_CALCULATE_INDEX], 1},
|
||||||
|
|
||||||
{"Trying to correct bad source geometry", 0, 0, 0},
|
{"Trying to correct bad source geometry", 0, 0, 0},
|
||||||
{"detect-longitude-wraparound", no_argument, &additional[A_DETECT_WRAPAROUND], 1},
|
{"detect-longitude-wraparound", no_argument, &additional[A_DETECT_WRAPAROUND], 1},
|
||||||
|
|||||||
+3
-1
@@ -694,6 +694,8 @@ the line or polygon within one tile unit of its proper location. You can probabl
|
|||||||
\fB\fC\-ag\fR or \fB\fC\-\-calculate\-feature\-density\fR: Add a new attribute, \fB\fCtippecanoe_feature_density\fR, to each feature, to record how densely features are spaced in that area of the tile. You can use this attribute in the style to produce a glowing effect where points are densely packed. It can range from 0 in the sparsest areas to 255 in the densest.
|
\fB\fC\-ag\fR or \fB\fC\-\-calculate\-feature\-density\fR: Add a new attribute, \fB\fCtippecanoe_feature_density\fR, to each feature, to record how densely features are spaced in that area of the tile. You can use this attribute in the style to produce a glowing effect where points are densely packed. It can range from 0 in the sparsest areas to 255 in the densest.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-ai\fR or \fB\fC\-\-generate\-ids\fR: Add an \fB\fCid\fR (a feature ID, not an attribute named \fB\fCid\fR) to each feature that does not already have one. There is currently no guarantee that the \fB\fCid\fR added will be stable between runs or that it will not conflict with manually\-assigned feature IDs. Future versions of Tippecanoe may change the mechanism for allocating IDs.
|
\fB\fC\-ai\fR or \fB\fC\-\-generate\-ids\fR: Add an \fB\fCid\fR (a feature ID, not an attribute named \fB\fCid\fR) to each feature that does not already have one. There is currently no guarantee that the \fB\fCid\fR added will be stable between runs or that it will not conflict with manually\-assigned feature IDs. Future versions of Tippecanoe may change the mechanism for allocating IDs.
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fC\-aX\fR or \fB\fC\-\-calculate\-feature\-index\fR: Add a \fB\fCtippecanoe:index\fR field to each feature, giving its index in the quadkey or hilbert sequence.
|
||||||
.RE
|
.RE
|
||||||
.SS Trying to correct bad source geometry
|
.SS Trying to correct bad source geometry
|
||||||
.RS
|
.RS
|
||||||
@@ -904,7 +906,7 @@ Linux:
|
|||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
.nf
|
.nf
|
||||||
sudo apt\-get install build\-essential libsqlite3\-dev zlib1g\-dev
|
sudo apt\-get install gcc g++ make libsqlite3\-dev zlib1g\-dev
|
||||||
.fi
|
.fi
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
|||||||
@@ -835,3 +835,59 @@ long long mvt_value_to_long_long(mvt_value const &v) {
|
|||||||
exit(EXIT_IMPOSSIBLE);
|
exit(EXIT_IMPOSSIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This extracts a double value from an mvt_value
|
||||||
|
double mvt_value_to_double(mvt_value const &v) {
|
||||||
|
switch (v.type) {
|
||||||
|
case mvt_string:
|
||||||
|
return atof(v.c_str());
|
||||||
|
case mvt_float:
|
||||||
|
return v.numeric_value.float_value;
|
||||||
|
case mvt_double:
|
||||||
|
return v.numeric_value.double_value;
|
||||||
|
case mvt_int:
|
||||||
|
return v.numeric_value.int_value;
|
||||||
|
case mvt_uint:
|
||||||
|
return v.numeric_value.uint_value;
|
||||||
|
case mvt_sint:
|
||||||
|
return v.numeric_value.sint_value;
|
||||||
|
case mvt_bool:
|
||||||
|
return v.numeric_value.bool_value;
|
||||||
|
case mvt_null:
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
fprintf(stderr, "unhandled mvt_type %d\n", v.type);
|
||||||
|
exit(EXIT_IMPOSSIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void get_bbox(std::vector<mvt_geometry> const &geom,
|
||||||
|
long long *xmin, long long *ymin, long long *xmax, long long *ymax,
|
||||||
|
int z, int tx, int ty, int detail) {
|
||||||
|
*xmin = LLONG_MAX;
|
||||||
|
*ymin = LLONG_MAX;
|
||||||
|
*xmax = 0;
|
||||||
|
*ymax = 0;
|
||||||
|
|
||||||
|
for (auto const &g : geom) {
|
||||||
|
if (g.op == mvt_moveto || g.op == mvt_lineto) {
|
||||||
|
long long x = g.x;
|
||||||
|
long long y = g.y;
|
||||||
|
|
||||||
|
// to world scale
|
||||||
|
x = x * (1LL << (32 - z - detail));
|
||||||
|
y = y * (1LL << (32 - z - detail));
|
||||||
|
|
||||||
|
// to world origin
|
||||||
|
if (z > 0) {
|
||||||
|
x += (1LL << (32 - z)) * tx;
|
||||||
|
y += (1LL << (32 - z)) * ty;
|
||||||
|
}
|
||||||
|
|
||||||
|
*xmin = std::min(*xmin, x);
|
||||||
|
*ymin = std::min(*ymin, y);
|
||||||
|
*xmax = std::max(*xmax, x);
|
||||||
|
*ymax = std::max(*ymax, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -118,6 +118,14 @@ struct mvt_value {
|
|||||||
s->push_back('\0');
|
s->push_back('\0');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool is_numeric() const {
|
||||||
|
return type == mvt_float ||
|
||||||
|
type == mvt_double ||
|
||||||
|
type == mvt_int ||
|
||||||
|
type == mvt_uint ||
|
||||||
|
type == mvt_sint;
|
||||||
|
}
|
||||||
|
|
||||||
bool operator<(const mvt_value &o) const;
|
bool operator<(const mvt_value &o) const;
|
||||||
bool operator==(const mvt_value &o) const;
|
bool operator==(const mvt_value &o) const;
|
||||||
std::string toString() const;
|
std::string toString() const;
|
||||||
@@ -193,10 +201,15 @@ int dezig(unsigned n);
|
|||||||
|
|
||||||
mvt_value stringified_to_mvt_value(int type, const char *s, std::shared_ptr<std::string> const &tile_stringpool);
|
mvt_value stringified_to_mvt_value(int type, const char *s, std::shared_ptr<std::string> const &tile_stringpool);
|
||||||
long long mvt_value_to_long_long(mvt_value const &v);
|
long long mvt_value_to_long_long(mvt_value const &v);
|
||||||
|
double mvt_value_to_double(mvt_value const &v);
|
||||||
|
|
||||||
bool is_integer(const char *s, long long *v);
|
bool is_integer(const char *s, long long *v);
|
||||||
bool is_unsigned_integer(const char *s, unsigned long long *v);
|
bool is_unsigned_integer(const char *s, unsigned long long *v);
|
||||||
|
|
||||||
struct serial_val;
|
struct serial_val;
|
||||||
serial_val mvt_value_to_serial_val(mvt_value const &v);
|
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
|
#endif
|
||||||
|
|||||||
+39
-37
@@ -1,52 +1,54 @@
|
|||||||
#ifndef OPTIONS_HPP
|
#ifndef OPTIONS_HPP
|
||||||
#define OPTIONS_HPP
|
#define OPTIONS_HPP
|
||||||
|
|
||||||
#define A_COALESCE ((int) 'c')
|
|
||||||
#define A_REVERSE ((int) 'r')
|
|
||||||
#define A_REORDER ((int) 'o')
|
|
||||||
#define A_LINE_DROP ((int) 'l')
|
|
||||||
#define A_DEBUG_POLYGON ((int) '@')
|
#define A_DEBUG_POLYGON ((int) '@')
|
||||||
#define A_POLYGON_DROP ((int) 'p')
|
|
||||||
#define A_DETECT_SHARED_BORDERS ((int) 'b')
|
|
||||||
#define A_PREFER_RADIX_SORT ((int) 'R')
|
|
||||||
#define A_CALCULATE_FEATURE_DENSITY ((int) 'g')
|
|
||||||
#define A_INCREASE_GAMMA_AS_NEEDED ((int) 'G')
|
|
||||||
#define A_DROP_DENSEST_AS_NEEDED ((int) 's')
|
|
||||||
#define A_DROP_FRACTION_AS_NEEDED ((int) 'd')
|
|
||||||
#define A_DROP_SMALLEST_AS_NEEDED ((int) 'n')
|
|
||||||
#define A_COALESCE_DENSEST_AS_NEEDED ((int) 'S')
|
|
||||||
#define A_COALESCE_SMALLEST_AS_NEEDED ((int) 'N')
|
|
||||||
#define A_COALESCE_FRACTION_AS_NEEDED ((int) 'D')
|
|
||||||
#define A_GRID_LOW_ZOOMS ((int) 'L')
|
|
||||||
#define A_DETECT_WRAPAROUND ((int) 'w')
|
|
||||||
#define A_EXTEND_ZOOMS ((int) 'e')
|
|
||||||
#define A_CLUSTER_DENSEST_AS_NEEDED ((int) 'C')
|
#define A_CLUSTER_DENSEST_AS_NEEDED ((int) 'C')
|
||||||
#define A_GENERATE_IDS ((int) 'i')
|
#define A_COALESCE_FRACTION_AS_NEEDED ((int) 'D')
|
||||||
|
#define A_INCREASE_GAMMA_AS_NEEDED ((int) 'G')
|
||||||
#define A_CONVERT_NUMERIC_IDS ((int) 'I')
|
#define A_CONVERT_NUMERIC_IDS ((int) 'I')
|
||||||
#define A_HILBERT ((int) 'h')
|
#define A_GRID_LOW_ZOOMS ((int) 'L')
|
||||||
#define A_VISVALINGAM ((int) 'v')
|
#define A_COALESCE_SMALLEST_AS_NEEDED ((int) 'N')
|
||||||
#define A_GENERATE_POLYGON_LABEL_POINTS ((int) 'P')
|
#define A_GENERATE_POLYGON_LABEL_POINTS ((int) 'P')
|
||||||
|
#define A_PREFER_RADIX_SORT ((int) 'R')
|
||||||
|
#define A_COALESCE_DENSEST_AS_NEEDED ((int) 'S')
|
||||||
|
#define A_CALCULATE_INDEX ((int) 'X')
|
||||||
|
#define A_ACCUMULATE_NUMERIC ((int) 'a')
|
||||||
|
#define A_DETECT_SHARED_BORDERS ((int) 'b')
|
||||||
|
#define A_COALESCE ((int) 'c')
|
||||||
|
#define A_DROP_FRACTION_AS_NEEDED ((int) 'd')
|
||||||
|
#define A_EXTEND_ZOOMS ((int) 'e')
|
||||||
|
#define A_CALCULATE_FEATURE_DENSITY ((int) 'g')
|
||||||
|
#define A_HILBERT ((int) 'h')
|
||||||
|
#define A_GENERATE_IDS ((int) 'i')
|
||||||
|
#define A_LINE_DROP ((int) 'l')
|
||||||
|
#define A_DROP_SMALLEST_AS_NEEDED ((int) 'n')
|
||||||
|
#define A_REORDER ((int) 'o')
|
||||||
|
#define A_POLYGON_DROP ((int) 'p')
|
||||||
|
#define A_REVERSE ((int) 'r')
|
||||||
|
#define A_DROP_DENSEST_AS_NEEDED ((int) 's')
|
||||||
#define A_VARIABLE_DEPTH_PYRAMID ((int) 't')
|
#define A_VARIABLE_DEPTH_PYRAMID ((int) 't')
|
||||||
|
#define A_VISVALINGAM ((int) 'v')
|
||||||
|
#define A_DETECT_WRAPAROUND ((int) 'w')
|
||||||
|
|
||||||
#define P_SIMPLIFY ((int) 's')
|
|
||||||
#define P_SIMPLIFY_LOW ((int) 'S')
|
|
||||||
#define P_SIMPLIFY_SHARED_NODES ((int) 'n')
|
|
||||||
#define P_SINGLE_PRECISION ((int) 'N')
|
|
||||||
#define P_FEATURE_LIMIT ((int) 'f')
|
|
||||||
#define P_KILOBYTE_LIMIT ((int) 'k')
|
|
||||||
#define P_DYNAMIC_DROP ((int) 'd')
|
|
||||||
#define P_INPUT_ORDER ((int) 'i')
|
|
||||||
#define P_POLYGON_SPLIT ((int) 'p')
|
|
||||||
#define P_CLIPPING ((int) 'c')
|
|
||||||
#define P_DUPLICATION ((int) 'D')
|
|
||||||
#define P_TINY_POLYGON_REDUCTION ((int) 't')
|
|
||||||
#define P_TINY_POLYGON_REDUCTION_AT_MAXZOOM ((int) 'T')
|
|
||||||
#define P_TILE_COMPRESSION ((int) 'C')
|
#define P_TILE_COMPRESSION ((int) 'C')
|
||||||
#define P_TILE_STATS ((int) 'g')
|
#define P_DUPLICATION ((int) 'D')
|
||||||
#define P_USE_SOURCE_POLYGON_WINDING ((int) 'w')
|
#define P_SINGLE_PRECISION ((int) 'N')
|
||||||
|
#define P_SIMPLIFY_LOW ((int) 'S')
|
||||||
|
#define P_TINY_POLYGON_REDUCTION_AT_MAXZOOM ((int) 'T')
|
||||||
#define P_REVERSE_SOURCE_POLYGON_WINDING ((int) 'W')
|
#define P_REVERSE_SOURCE_POLYGON_WINDING ((int) 'W')
|
||||||
#define P_EMPTY_CSV_COLUMNS ((int) 'e')
|
|
||||||
#define P_BASEZOOM_ABOVE_MAXZOOM ((int) 'b')
|
#define P_BASEZOOM_ABOVE_MAXZOOM ((int) 'b')
|
||||||
|
#define P_CLIPPING ((int) 'c')
|
||||||
|
#define P_DYNAMIC_DROP ((int) 'd')
|
||||||
|
#define P_EMPTY_CSV_COLUMNS ((int) 'e')
|
||||||
|
#define P_FEATURE_LIMIT ((int) 'f')
|
||||||
|
#define P_TILE_STATS ((int) 'g')
|
||||||
|
#define P_INPUT_ORDER ((int) 'i')
|
||||||
|
#define P_KILOBYTE_LIMIT ((int) 'k')
|
||||||
|
#define P_SIMPLIFY_SHARED_NODES ((int) 'n')
|
||||||
|
#define P_POLYGON_SPLIT ((int) 'p')
|
||||||
|
#define P_SIMPLIFY ((int) 's')
|
||||||
|
#define P_TINY_POLYGON_REDUCTION ((int) 't')
|
||||||
|
#define P_USE_SOURCE_POLYGON_WINDING ((int) 'w')
|
||||||
|
|
||||||
extern int prevent[256];
|
extern int prevent[256];
|
||||||
extern int additional[256];
|
extern int additional[256];
|
||||||
|
|||||||
+20
-1
@@ -9,6 +9,7 @@
|
|||||||
#include "evaluator.hpp"
|
#include "evaluator.hpp"
|
||||||
#include "attribute.hpp"
|
#include "attribute.hpp"
|
||||||
#include "text.hpp"
|
#include "text.hpp"
|
||||||
|
#include "read_json.hpp"
|
||||||
|
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
extern int optind;
|
extern int optind;
|
||||||
@@ -20,6 +21,7 @@ std::string filter;
|
|||||||
bool preserve_input_order = false;
|
bool preserve_input_order = false;
|
||||||
std::unordered_map<std::string, attribute_op> attribute_accum;
|
std::unordered_map<std::string, attribute_op> attribute_accum;
|
||||||
std::vector<std::string> unidecode_data;
|
std::vector<std::string> unidecode_data;
|
||||||
|
std::vector<mvt_layer> bins;
|
||||||
|
|
||||||
std::set<std::string> keep;
|
std::set<std::string> keep;
|
||||||
|
|
||||||
@@ -37,6 +39,7 @@ int main(int argc, char **argv) {
|
|||||||
const char *outfile = NULL;
|
const char *outfile = NULL;
|
||||||
double simplification = 0;
|
double simplification = 0;
|
||||||
double tiny_polygon_size = 0;
|
double tiny_polygon_size = 0;
|
||||||
|
std::string assign_to_bins;
|
||||||
|
|
||||||
std::vector<input_tile> sources;
|
std::vector<input_tile> sources;
|
||||||
|
|
||||||
@@ -53,6 +56,7 @@ int main(int argc, char **argv) {
|
|||||||
{"line-simplification", required_argument, 0, 'S'},
|
{"line-simplification", required_argument, 0, 'S'},
|
||||||
{"tiny-polygon-size", required_argument, 0, 's' & 0x1F},
|
{"tiny-polygon-size", required_argument, 0, 's' & 0x1F},
|
||||||
{"source-tile", required_argument, 0, 't'},
|
{"source-tile", required_argument, 0, 't'},
|
||||||
|
{"assign-to-bins", required_argument, 0, 'b' & 0x1F},
|
||||||
|
|
||||||
{0, 0, 0, 0},
|
{0, 0, 0, 0},
|
||||||
};
|
};
|
||||||
@@ -119,6 +123,10 @@ int main(int argc, char **argv) {
|
|||||||
simplification = atof(optarg);
|
simplification = atof(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'b' & 0x1F:
|
||||||
|
assign_to_bins = optarg;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Unrecognized flag -%c\n", i);
|
fprintf(stderr, "Unrecognized flag -%c\n", i);
|
||||||
usage(argv);
|
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;
|
json_object *json_filter = NULL;
|
||||||
if (filter.size() > 0) {
|
if (filter.size() > 0) {
|
||||||
json_filter = parse_filter(filter.c_str());
|
json_filter = parse_filter(filter.c_str());
|
||||||
@@ -208,7 +227,7 @@ int main(int argc, char **argv) {
|
|||||||
its.push_back(std::move(t));
|
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");
|
FILE *f = fopen(outfile, "wb");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
|
|||||||
+33
-185
@@ -74,187 +74,51 @@ void *run_writer(void *a) {
|
|||||||
return NULL;
|
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
|
// 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::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");
|
FILE *f = fdopen(fd, "r");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
perror("fdopen filter output");
|
perror("fdopen filter output");
|
||||||
exit(EXIT_OPEN);
|
exit(EXIT_OPEN);
|
||||||
}
|
}
|
||||||
json_pull *jp = json_begin_file(f);
|
|
||||||
|
|
||||||
while (1) {
|
std::vector<mvt_layer> out = parse_layers(f, z, x, y, extent);
|
||||||
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);
|
if (fclose(f) != 0) {
|
||||||
break;
|
perror("fclose postfilter output");
|
||||||
}
|
exit(EXIT_CLOSE);
|
||||||
|
}
|
||||||
|
|
||||||
json_object *type = json_hash_get(j, "type");
|
for (auto const &layer : out) {
|
||||||
if (type == NULL || type->type != JSON_STRING) {
|
std::string layername = layer.name;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (strcmp(type->value.string.string, "Feature") != 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
json_object *geometry = json_hash_get(j, "geometry");
|
std::map<std::string, layermap_entry> &layermap = (*layermaps)[tiling_seg];
|
||||||
if (geometry == NULL) {
|
if (layermap.count(layername) == 0) {
|
||||||
fprintf(stderr, "Filter output:%d: filtered feature with no geometry: ", jp->line);
|
layermap_entry lme = layermap_entry(layermap.size());
|
||||||
json_context(j);
|
lme.minzoom = z;
|
||||||
json_free(j);
|
lme.maxzoom = z;
|
||||||
exit(EXIT_JSON);
|
|
||||||
}
|
|
||||||
|
|
||||||
json_object *properties = json_hash_get(j, "properties");
|
layermap.insert(std::pair<std::string, layermap_entry>(layername, lme));
|
||||||
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 (lme.id >= (*layer_unmaps)[tiling_seg].size()) {
|
||||||
if (geometry_type == NULL) {
|
(*layer_unmaps)[tiling_seg].resize(lme.id + 1);
|
||||||
fprintf(stderr, "Filter output:%d: null geometry (additional not reported): ", jp->line);
|
(*layer_unmaps)[tiling_seg][lme.id] = layername;
|
||||||
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) {
|
auto ts = layermap.find(layername);
|
||||||
mvt_layer l;
|
if (ts == layermap.end()) {
|
||||||
l.name = layername;
|
fprintf(stderr, "Internal error: layer %s not found\n", layername.c_str());
|
||||||
l.version = 2;
|
exit(EXIT_IMPOSSIBLE);
|
||||||
l.extent = extent;
|
|
||||||
|
|
||||||
ret.insert(std::pair<std::string, mvt_layer>(layername, l));
|
|
||||||
}
|
}
|
||||||
auto l = ret.find(layername);
|
if (z < ts->second.minzoom) {
|
||||||
|
ts->second.minzoom = z;
|
||||||
drawvec dv;
|
}
|
||||||
parse_geometry(t, coordinates, dv, VT_MOVETO, "Filter output", jp->line, j);
|
if (z > ts->second.maxzoom) {
|
||||||
if (mb_geometry[t] == VT_POLYGON) {
|
ts->second.maxzoom = z;
|
||||||
dv = fix_polygon(dv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scale and offset geometry from global to tile
|
for (auto const &feature : layer.features) {
|
||||||
for (size_t i = 0; i < dv.size(); i++) {
|
|
||||||
long long scale = 1LL << (32 - z);
|
|
||||||
dv[i].x = std::round((dv[i].x - scale * x) * extent / (double) scale);
|
|
||||||
dv[i].y = std::round((dv[i].y - scale * y) * extent / (double) scale);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mb_geometry[t] == VT_POLYGON) {
|
|
||||||
// we can try scaling up because these are tile coordinates
|
|
||||||
dv = clean_or_clip_poly(dv, 0, 0, false, true);
|
|
||||||
if (dv.size() < 3) {
|
|
||||||
dv.clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dv = remove_noop(dv, mb_geometry[t], 0);
|
|
||||||
if (mb_geometry[t] == VT_POLYGON) {
|
|
||||||
dv = close_poly(dv);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dv.size() > 0) {
|
|
||||||
mvt_feature feature;
|
|
||||||
feature.type = mb_geometry[t];
|
|
||||||
feature.geometry = to_feature(dv);
|
|
||||||
|
|
||||||
json_object *id = json_hash_get(j, "id");
|
|
||||||
if (id != NULL && id->type == JSON_NUMBER) {
|
|
||||||
feature.id = id->value.number.number;
|
|
||||||
if (id->value.number.large_unsigned > 0) {
|
|
||||||
feature.id = id->value.number.large_unsigned;
|
|
||||||
}
|
|
||||||
feature.has_id = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::map<std::string, layermap_entry> &layermap = (*layermaps)[tiling_seg];
|
|
||||||
if (layermap.count(layername) == 0) {
|
|
||||||
layermap_entry lme = layermap_entry(layermap.size());
|
|
||||||
lme.minzoom = z;
|
|
||||||
lme.maxzoom = z;
|
|
||||||
|
|
||||||
layermap.insert(std::pair<std::string, layermap_entry>(layername, lme));
|
|
||||||
|
|
||||||
if (lme.id >= (*layer_unmaps)[tiling_seg].size()) {
|
|
||||||
(*layer_unmaps)[tiling_seg].resize(lme.id + 1);
|
|
||||||
(*layer_unmaps)[tiling_seg][lme.id] = layername;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto ts = layermap.find(layername);
|
|
||||||
if (ts == layermap.end()) {
|
|
||||||
fprintf(stderr, "Internal error: layer %s not found\n", layername.c_str());
|
|
||||||
exit(EXIT_IMPOSSIBLE);
|
|
||||||
}
|
|
||||||
if (z < ts->second.minzoom) {
|
|
||||||
ts->second.minzoom = z;
|
|
||||||
}
|
|
||||||
if (z > ts->second.maxzoom) {
|
|
||||||
ts->second.maxzoom = z;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (feature.type == mvt_point) {
|
if (feature.type == mvt_point) {
|
||||||
ts->second.points++;
|
ts->second.points++;
|
||||||
} else if (feature.type == mvt_linestring) {
|
} 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++;
|
ts->second.polygons++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < properties->value.object.length; i++) {
|
for (size_t i = 0; i + 1 < feature.tags.size(); i += 2) {
|
||||||
serial_val sv = stringify_value(properties->value.object.values[i], "Filter output", jp->line, j);
|
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
|
// Nulls can be excluded here because this is the postfilter
|
||||||
// and it is nearly time to create the vector representation
|
// and it is nearly time to create the vector representation
|
||||||
|
|
||||||
if (sv.type != mvt_null) {
|
if (val.type != mvt_null) {
|
||||||
mvt_value v = stringified_to_mvt_value(sv.type, sv.s.c_str(), tile_stringpool);
|
add_to_tilestats(ts->second.tilestats, key, mvt_value_to_serial_val(val));
|
||||||
l->second.tag(feature, std::string(properties->value.object.keys[i]->value.string.string), v);
|
|
||||||
|
|
||||||
add_to_tilestats(ts->second.tilestats, std::string(properties->value.object.keys[i]->value.string.string), sv);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
l->second.features.push_back(feature);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
json_free(j);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
json_end(jp);
|
return out;
|
||||||
if (fclose(f) != 0) {
|
|
||||||
perror("fclose postfilter output");
|
|
||||||
exit(EXIT_CLOSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<mvt_layer> final;
|
|
||||||
for (auto a : ret) {
|
|
||||||
final.push_back(a.second);
|
|
||||||
}
|
|
||||||
return final;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reads from the prefilter
|
// Reads from the prefilter
|
||||||
@@ -377,7 +225,7 @@ serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::
|
|||||||
drawvec dv;
|
drawvec dv;
|
||||||
parse_geometry(t, coordinates, dv, VT_MOVETO, "Filter output", jp->line, j);
|
parse_geometry(t, coordinates, dv, VT_MOVETO, "Filter output", jp->line, j);
|
||||||
if (mb_geometry[t] == VT_POLYGON) {
|
if (mb_geometry[t] == VT_POLYGON) {
|
||||||
dv = fix_polygon(dv);
|
dv = fix_polygon(dv, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scale and offset geometry from global to tile
|
// Scale and offset geometry from global to tile
|
||||||
|
|||||||
+190
@@ -166,3 +166,193 @@ serial_val stringify_value(json_object *value, const char *reading, int line, js
|
|||||||
|
|
||||||
return sv;
|
return sv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX deduplicate
|
||||||
|
static std::vector<mvt_geometry> to_feature(drawvec &geom) {
|
||||||
|
std::vector<mvt_geometry> out;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < geom.size(); i++) {
|
||||||
|
out.push_back(mvt_geometry(geom[i].op, geom[i].x, geom[i].y));
|
||||||
|
}
|
||||||
|
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<mvt_layer> parse_layers(FILE *fp, int z, unsigned x, unsigned y, int extent) {
|
||||||
|
std::map<std::string, mvt_layer> ret;
|
||||||
|
std::shared_ptr<std::string> tile_stringpool = std::make_shared<std::string>();
|
||||||
|
|
||||||
|
json_pull *jp = json_begin_file(fp);
|
||||||
|
while (1) {
|
||||||
|
json_object *j = json_read(jp);
|
||||||
|
if (j == NULL) {
|
||||||
|
if (jp->error != NULL) {
|
||||||
|
fprintf(stderr, "Filter output:%d: %s: ", jp->line, jp->error);
|
||||||
|
if (jp->root != NULL) {
|
||||||
|
json_context(jp->root);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "\n");
|
||||||
|
}
|
||||||
|
exit(EXIT_JSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
json_free(jp->root);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
json_object *type = json_hash_get(j, "type");
|
||||||
|
if (type == NULL || type->type != JSON_STRING) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (strcmp(type->value.string.string, "Feature") != 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
json_object *geometry = json_hash_get(j, "geometry");
|
||||||
|
if (geometry == NULL) {
|
||||||
|
fprintf(stderr, "Filter output:%d: filtered feature with no geometry: ", jp->line);
|
||||||
|
json_context(j);
|
||||||
|
json_free(j);
|
||||||
|
exit(EXIT_JSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
json_object *properties = json_hash_get(j, "properties");
|
||||||
|
if (properties == NULL || (properties->type != JSON_HASH && properties->type != JSON_NULL)) {
|
||||||
|
fprintf(stderr, "Filter output:%d: feature without properties hash: ", jp->line);
|
||||||
|
json_context(j);
|
||||||
|
json_free(j);
|
||||||
|
exit(EXIT_JSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
json_object *geometry_type = json_hash_get(geometry, "type");
|
||||||
|
if (geometry_type == NULL) {
|
||||||
|
fprintf(stderr, "Filter output:%d: null geometry (additional not reported): ", jp->line);
|
||||||
|
json_context(j);
|
||||||
|
exit(EXIT_JSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (geometry_type->type != JSON_STRING) {
|
||||||
|
fprintf(stderr, "Filter output:%d: geometry type is not a string: ", jp->line);
|
||||||
|
json_context(j);
|
||||||
|
exit(EXIT_JSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
json_object *coordinates = json_hash_get(geometry, "coordinates");
|
||||||
|
if (coordinates == NULL || coordinates->type != JSON_ARRAY) {
|
||||||
|
fprintf(stderr, "Filter output:%d: feature without coordinates array: ", jp->line);
|
||||||
|
json_context(j);
|
||||||
|
exit(EXIT_JSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
int t;
|
||||||
|
for (t = 0; t < GEOM_TYPES; t++) {
|
||||||
|
if (strcmp(geometry_type->value.string.string, geometry_names[t]) == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (t >= GEOM_TYPES) {
|
||||||
|
fprintf(stderr, "Filter output:%d: Can't handle geometry type %s: ", jp->line, geometry_type->value.string.string);
|
||||||
|
json_context(j);
|
||||||
|
exit(EXIT_JSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string layername = "unknown";
|
||||||
|
json_object *tippecanoe = json_hash_get(j, "tippecanoe");
|
||||||
|
json_object *layer = NULL;
|
||||||
|
if (tippecanoe != NULL) {
|
||||||
|
layer = json_hash_get(tippecanoe, "layer");
|
||||||
|
if (layer != NULL && layer->type == JSON_STRING) {
|
||||||
|
layername = std::string(layer->value.string.string);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ret.count(layername) == 0) {
|
||||||
|
mvt_layer l;
|
||||||
|
l.name = layername;
|
||||||
|
l.version = 2;
|
||||||
|
l.extent = extent;
|
||||||
|
|
||||||
|
ret.insert(std::pair<std::string, mvt_layer>(layername, l));
|
||||||
|
}
|
||||||
|
auto l = ret.find(layername);
|
||||||
|
|
||||||
|
drawvec dv;
|
||||||
|
parse_geometry(t, coordinates, dv, VT_MOVETO, "Filter output", jp->line, j);
|
||||||
|
if (mb_geometry[t] == VT_POLYGON) {
|
||||||
|
dv = fix_polygon(dv, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Offset and scale geometry from global to tile
|
||||||
|
for (size_t i = 0; i < dv.size(); i++) {
|
||||||
|
long long scale = 1LL << (32 - z);
|
||||||
|
|
||||||
|
// offset
|
||||||
|
dv[i].x -= scale * x;
|
||||||
|
dv[i].y -= scale * y;
|
||||||
|
|
||||||
|
// handle longitude wraparound
|
||||||
|
if (dv[i].x > 2 * scale && dv[i].x - (1LL << 32) > -3 * scale) {
|
||||||
|
dv[i].x -= 1LL << 32;
|
||||||
|
}
|
||||||
|
if (dv[i].x < -3 * scale && dv[i].x + (1LL << 32) < 2 * scale) {
|
||||||
|
dv[i].x += 1LL << 32;
|
||||||
|
}
|
||||||
|
|
||||||
|
// scale
|
||||||
|
dv[i].x = std::round(dv[i].x * extent / (double) scale);
|
||||||
|
dv[i].y = std::round(dv[i].y * extent / (double) scale);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mb_geometry[t] == VT_POLYGON) {
|
||||||
|
// we can try scaling up because these are tile coordinates
|
||||||
|
dv = clean_or_clip_poly(dv, 0, 0, false, true);
|
||||||
|
if (dv.size() < 3) {
|
||||||
|
dv.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dv = remove_noop(dv, mb_geometry[t], 0);
|
||||||
|
if (mb_geometry[t] == VT_POLYGON) {
|
||||||
|
dv = close_poly(dv);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dv.size() > 0) {
|
||||||
|
mvt_feature feature;
|
||||||
|
feature.type = mb_geometry[t];
|
||||||
|
feature.geometry = to_feature(dv);
|
||||||
|
|
||||||
|
json_object *id = json_hash_get(j, "id");
|
||||||
|
if (id != NULL && id->type == JSON_NUMBER) {
|
||||||
|
feature.id = id->value.number.number;
|
||||||
|
if (id->value.number.large_unsigned > 0) {
|
||||||
|
feature.id = id->value.number.large_unsigned;
|
||||||
|
}
|
||||||
|
feature.has_id = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < properties->value.object.length; i++) {
|
||||||
|
serial_val sv = stringify_value(properties->value.object.values[i], "Filter output", jp->line, j);
|
||||||
|
|
||||||
|
// Nulls can be excluded here because this is the postfilter
|
||||||
|
// and it is nearly time to create the vector representation
|
||||||
|
|
||||||
|
if (sv.type != mvt_null) {
|
||||||
|
mvt_value v = stringified_to_mvt_value(sv.type, sv.s.c_str(), tile_stringpool);
|
||||||
|
l->second.tag(feature, std::string(properties->value.object.keys[i]->value.string.string), v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
l->second.features.push_back(feature);
|
||||||
|
}
|
||||||
|
|
||||||
|
json_free(j);
|
||||||
|
}
|
||||||
|
|
||||||
|
json_end(jp);
|
||||||
|
|
||||||
|
std::vector<mvt_layer> final;
|
||||||
|
for (auto a : ret) {
|
||||||
|
final.push_back(a.second);
|
||||||
|
}
|
||||||
|
|
||||||
|
return final;
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,5 +12,6 @@ extern int mb_geometry[GEOM_TYPES];
|
|||||||
|
|
||||||
void json_context(json_object *j);
|
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);
|
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);
|
serial_val stringify_value(json_object *value, const char *reading, int line, json_object *feature);
|
||||||
|
|||||||
+9
-1
@@ -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.
|
// 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.
|
// Otherwise the inner/outer calculation will be confused by bad geometries.
|
||||||
if (sf.t == VT_POLYGON) {
|
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) {
|
for (auto &c : clipbboxes) {
|
||||||
@@ -713,6 +713,14 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
|
|||||||
}
|
}
|
||||||
|
|
||||||
bbox_index = encode_index(midx, midy);
|
bbox_index = encode_index(midx, midy);
|
||||||
|
if (additional[A_CALCULATE_INDEX]) {
|
||||||
|
sf.full_keys.push_back("tippecanoe:index");
|
||||||
|
|
||||||
|
serial_val sv;
|
||||||
|
sv.type = mvt_double;
|
||||||
|
sv.s = std::to_string(bbox_index);
|
||||||
|
sf.full_values.push_back(sv);
|
||||||
|
}
|
||||||
|
|
||||||
if (sf.t == VT_POLYGON && additional[A_GENERATE_POLYGON_LABEL_POINTS]) {
|
if (sf.t == VT_POLYGON && additional[A_GENERATE_POLYGON_LABEL_POINTS]) {
|
||||||
drawvec dv = polygon_to_anchor(scaled_geometry);
|
drawvec dv = polygon_to_anchor(scaled_geometry);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -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", "tippecanoe:count": 163 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.490005, 37.738006 ], [ -122.488461, 37.737055 ], [ -122.486229, 37.736784 ], [ -122.483311, 37.737463 ], [ -122.482452, 37.737463 ], [ -122.481766, 37.737191 ], [ -122.475414, 37.737463 ], [ -122.475243, 37.734612 ], [ -122.475071, 37.734747 ], [ -122.471638, 37.734747 ], [ -122.471981, 37.731082 ], [ -122.472153, 37.731082 ], [ -122.472496, 37.721578 ], [ -122.464428, 37.721713 ], [ -122.463913, 37.722392 ], [ -122.462196, 37.723071 ], [ -122.462196, 37.721713 ], [ -122.462711, 37.721713 ], [ -122.462711, 37.718590 ], [ -122.462540, 37.711257 ], [ -122.460823, 37.710578 ], [ -122.464256, 37.710578 ], [ -122.465973, 37.710171 ], [ -122.467690, 37.709220 ], [ -122.468891, 37.708270 ], [ -122.497730, 37.708134 ], [ -122.498245, 37.708134 ], [ -122.498245, 37.710714 ], [ -122.498417, 37.714924 ], [ -122.498760, 37.715875 ], [ -122.499962, 37.717504 ], [ -122.500305, 37.718590 ], [ -122.500477, 37.720627 ], [ -122.502708, 37.723343 ], [ -122.503052, 37.724022 ], [ -122.503052, 37.725244 ], [ -122.503567, 37.725379 ], [ -122.505283, 37.726330 ], [ -122.506313, 37.727416 ], [ -122.507172, 37.732575 ], [ -122.506828, 37.735426 ], [ -122.505283, 37.735426 ], [ -122.505283, 37.735562 ], [ -122.502022, 37.735562 ], [ -122.500477, 37.735155 ], [ -122.498589, 37.734204 ], [ -122.496872, 37.733933 ], [ -122.491379, 37.734069 ], [ -122.491379, 37.737327 ], [ -122.490349, 37.737870 ], [ -122.490005, 37.738006 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94112", "GEOID10": "94112", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 8720166, "AWATER10": 0, "INTPTLAT10": "+37.7203669", "INTPTLON10": "-122.4429361", "tippecanoe:count": 259 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.426662, 37.736376 ], [ -122.426491, 37.736241 ], [ -122.427349, 37.735698 ], [ -122.424946, 37.735562 ], [ -122.423916, 37.734612 ], [ -122.422886, 37.734340 ], [ -122.422199, 37.735155 ], [ -122.421856, 37.735155 ], [ -122.421856, 37.734612 ], [ -122.420139, 37.732983 ], [ -122.418251, 37.732983 ], [ -122.418938, 37.732847 ], [ -122.418938, 37.732168 ], [ -122.415161, 37.732168 ], [ -122.421684, 37.731761 ], [ -122.421684, 37.731082 ], [ -122.420139, 37.731489 ], [ -122.420483, 37.728910 ], [ -122.423744, 37.728774 ], [ -122.423058, 37.727280 ], [ -122.424088, 37.725923 ], [ -122.423573, 37.725651 ], [ -122.422886, 37.723886 ], [ -122.423744, 37.723750 ], [ -122.424774, 37.722121 ], [ -122.424603, 37.721713 ], [ -122.426319, 37.718590 ], [ -122.427349, 37.715060 ], [ -122.425632, 37.714517 ], [ -122.426662, 37.711257 ], [ -122.427177, 37.711257 ], [ -122.426147, 37.710986 ], [ -122.426662, 37.710171 ], [ -122.429924, 37.711529 ], [ -122.430096, 37.710850 ], [ -122.429237, 37.709628 ], [ -122.428379, 37.709220 ], [ -122.428379, 37.708405 ], [ -122.434044, 37.708134 ], [ -122.440395, 37.708405 ], [ -122.452240, 37.708134 ], [ -122.468891, 37.708270 ], [ -122.467690, 37.709220 ], [ -122.465973, 37.710171 ], [ -122.464256, 37.710578 ], [ -122.460823, 37.710578 ], [ -122.462540, 37.711257 ], [ -122.462711, 37.718590 ], [ -122.462711, 37.721713 ], [ -122.462196, 37.721713 ], [ -122.462196, 37.725244 ], [ -122.462711, 37.725515 ], [ -122.462540, 37.727145 ], [ -122.462025, 37.727416 ], [ -122.460823, 37.727552 ], [ -122.460995, 37.728638 ], [ -122.459965, 37.728774 ], [ -122.459965, 37.729860 ], [ -122.459278, 37.730810 ], [ -122.457390, 37.730675 ], [ -122.457561, 37.731082 ], [ -122.453442, 37.731625 ], [ -122.453442, 37.730675 ], [ -122.444344, 37.730675 ], [ -122.444344, 37.728231 ], [ -122.443657, 37.728366 ], [ -122.439537, 37.730131 ], [ -122.435932, 37.731625 ], [ -122.435074, 37.731489 ], [ -122.432156, 37.732983 ], [ -122.431984, 37.732983 ], [ -122.432327, 37.733254 ], [ -122.428551, 37.735019 ], [ -122.426662, 37.736376 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94134", "GEOID10": "94134", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6210550, "AWATER10": 90877, "INTPTLAT10": "+37.7210461", "INTPTLON10": "-122.4135554", "tippecanoe:count": 124 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.406921, 37.738006 ], [ -122.406578, 37.735698 ], [ -122.405033, 37.733661 ], [ -122.402802, 37.729317 ], [ -122.398853, 37.718590 ], [ -122.397995, 37.715467 ], [ -122.398510, 37.715467 ], [ -122.396450, 37.712887 ], [ -122.395763, 37.710850 ], [ -122.394047, 37.711257 ], [ -122.390785, 37.711122 ], [ -122.390957, 37.710307 ], [ -122.393703, 37.708270 ], [ -122.423744, 37.708270 ], [ -122.428379, 37.708405 ], [ -122.428379, 37.709220 ], [ -122.429237, 37.709628 ], [ -122.430096, 37.710850 ], [ -122.429924, 37.711529 ], [ -122.426662, 37.710171 ], [ -122.426147, 37.710986 ], [ -122.427177, 37.711257 ], [ -122.426662, 37.711257 ], [ -122.425632, 37.714517 ], [ -122.427349, 37.715060 ], [ -122.426319, 37.718590 ], [ -122.424603, 37.721713 ], [ -122.424774, 37.722121 ], [ -122.423744, 37.723750 ], [ -122.422886, 37.723886 ], [ -122.423573, 37.725651 ], [ -122.424088, 37.725923 ], [ -122.423058, 37.727280 ], [ -122.423744, 37.728774 ], [ -122.420483, 37.728910 ], [ -122.420139, 37.731489 ], [ -122.421684, 37.731082 ], [ -122.421684, 37.731761 ], [ -122.419453, 37.732032 ], [ -122.416019, 37.732032 ], [ -122.414474, 37.732439 ], [ -122.409496, 37.735019 ], [ -122.408466, 37.736241 ], [ -122.408295, 37.737598 ], [ -122.406921, 37.738006 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94124", "GEOID10": "94124", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 12765980, "AWATER10": 2804039, "INTPTLAT10": "+37.7288947", "INTPTLON10": "-122.3827787", "tippecanoe:count": 314 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.377911, 37.753615 ], [ -122.376022, 37.752530 ], [ -122.373104, 37.746015 ], [ -122.367611, 37.740178 ], [ -122.368298, 37.739770 ], [ -122.373447, 37.739635 ], [ -122.373962, 37.739499 ], [ -122.373447, 37.738684 ], [ -122.372761, 37.738277 ], [ -122.367439, 37.738277 ], [ -122.370701, 37.737327 ], [ -122.371216, 37.737055 ], [ -122.372932, 37.737055 ], [ -122.373619, 37.737191 ], [ -122.375679, 37.738413 ], [ -122.376366, 37.738413 ], [ -122.376537, 37.738277 ], [ -122.376022, 37.738006 ], [ -122.375164, 37.737870 ], [ -122.374821, 37.737327 ], [ -122.375164, 37.736241 ], [ -122.376022, 37.735833 ], [ -122.375851, 37.735019 ], [ -122.375336, 37.735426 ], [ -122.374821, 37.734883 ], [ -122.375164, 37.734612 ], [ -122.374821, 37.734476 ], [ -122.374992, 37.733933 ], [ -122.375679, 37.732711 ], [ -122.375164, 37.732983 ], [ -122.374992, 37.732711 ], [ -122.374649, 37.732847 ], [ -122.374821, 37.732575 ], [ -122.374134, 37.732575 ], [ -122.373447, 37.732983 ], [ -122.372589, 37.733933 ], [ -122.371902, 37.734204 ], [ -122.369671, 37.732304 ], [ -122.367096, 37.735426 ], [ -122.367439, 37.735426 ], [ -122.367096, 37.735562 ], [ -122.366753, 37.735426 ], [ -122.366924, 37.734883 ], [ -122.369499, 37.732439 ], [ -122.369499, 37.732168 ], [ -122.368813, 37.731896 ], [ -122.368641, 37.732304 ], [ -122.368298, 37.732304 ], [ -122.367439, 37.731896 ], [ -122.366753, 37.732168 ], [ -122.365208, 37.733797 ], [ -122.366581, 37.732168 ], [ -122.365379, 37.732983 ], [ -122.366238, 37.731896 ], [ -122.366066, 37.731896 ], [ -122.365036, 37.732847 ], [ -122.365723, 37.731761 ], [ -122.365723, 37.731625 ], [ -122.364864, 37.732575 ], [ -122.365036, 37.732032 ], [ -122.363663, 37.731218 ], [ -122.362804, 37.732168 ], [ -122.362633, 37.732032 ], [ -122.363319, 37.731082 ], [ -122.362804, 37.730810 ], [ -122.362118, 37.731625 ], [ -122.361774, 37.731489 ], [ -122.362633, 37.730675 ], [ -122.361946, 37.730131 ], [ -122.360916, 37.729860 ], [ -122.360744, 37.730267 ], [ -122.359886, 37.730267 ], [ -122.358856, 37.729724 ], [ -122.359028, 37.729453 ], [ -122.361946, 37.728774 ], [ -122.362289, 37.728502 ], [ -122.361431, 37.728502 ], [ -122.357655, 37.729453 ], [ -122.357483, 37.729181 ], [ -122.357826, 37.728910 ], [ -122.360401, 37.728231 ], [ -122.359886, 37.728095 ], [ -122.357140, 37.728774 ], [ -122.356968, 37.728774 ], [ -122.357140, 37.727959 ], [ -122.356796, 37.727959 ], [ -122.358170, 37.718590 ], [ -122.358513, 37.715875 ], [ -122.360401, 37.708270 ], [ -122.381001, 37.708405 ], [ -122.393703, 37.708270 ], [ -122.390957, 37.710307 ], [ -122.390785, 37.711122 ], [ -122.394047, 37.711257 ], [ -122.395763, 37.710850 ], [ -122.396450, 37.712887 ], [ -122.398510, 37.715467 ], [ -122.397995, 37.715467 ], [ -122.398853, 37.718590 ], [ -122.402802, 37.729317 ], [ -122.405033, 37.733661 ], [ -122.406578, 37.735698 ], [ -122.406921, 37.738006 ], [ -122.407780, 37.737734 ], [ -122.407951, 37.737870 ], [ -122.407951, 37.739227 ], [ -122.407436, 37.741399 ], [ -122.405891, 37.743435 ], [ -122.406235, 37.743571 ], [ -122.405376, 37.744521 ], [ -122.405205, 37.744386 ], [ -122.404003, 37.748322 ], [ -122.405033, 37.749136 ], [ -122.402973, 37.749544 ], [ -122.402115, 37.749408 ], [ -122.395248, 37.749815 ], [ -122.395248, 37.751308 ], [ -122.393188, 37.751444 ], [ -122.393188, 37.749951 ], [ -122.386494, 37.750358 ], [ -122.386837, 37.752937 ], [ -122.381001, 37.753208 ], [ -122.377911, 37.753615 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94129", "GEOID10": "94129", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 5968455, "AWATER10": 14697, "INTPTLAT10": "+37.7973402", "INTPTLON10": "-122.4644664", "tippecanoe:count": 70 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.477818, 37.811005 ], [ -122.476444, 37.810869 ], [ -122.476101, 37.809648 ], [ -122.474728, 37.809241 ], [ -122.472668, 37.808970 ], [ -122.470608, 37.808563 ], [ -122.469234, 37.807750 ], [ -122.468719, 37.807071 ], [ -122.468376, 37.806800 ], [ -122.468204, 37.806936 ], [ -122.468204, 37.806665 ], [ -122.466660, 37.805851 ], [ -122.463570, 37.804901 ], [ -122.461681, 37.804901 ], [ -122.458420, 37.805444 ], [ -122.454472, 37.806529 ], [ -122.452412, 37.806258 ], [ -122.448120, 37.806936 ], [ -122.448120, 37.806393 ], [ -122.448463, 37.806122 ], [ -122.448292, 37.804766 ], [ -122.451553, 37.803409 ], [ -122.450180, 37.802867 ], [ -122.450008, 37.802460 ], [ -122.447605, 37.800697 ], [ -122.447262, 37.798527 ], [ -122.448120, 37.798255 ], [ -122.448292, 37.797848 ], [ -122.447948, 37.797441 ], [ -122.448635, 37.797441 ], [ -122.448635, 37.797034 ], [ -122.447948, 37.796899 ], [ -122.447948, 37.796492 ], [ -122.448978, 37.796356 ], [ -122.447433, 37.795814 ], [ -122.447433, 37.795542 ], [ -122.447777, 37.795407 ], [ -122.448635, 37.795542 ], [ -122.448978, 37.795000 ], [ -122.448635, 37.794728 ], [ -122.447948, 37.793101 ], [ -122.448463, 37.792829 ], [ -122.448635, 37.791880 ], [ -122.470951, 37.787267 ], [ -122.473354, 37.787132 ], [ -122.475586, 37.786725 ], [ -122.479877, 37.786860 ], [ -122.483826, 37.787674 ], [ -122.484512, 37.789167 ], [ -122.483997, 37.789709 ], [ -122.484341, 37.790116 ], [ -122.484341, 37.789709 ], [ -122.485027, 37.789574 ], [ -122.485886, 37.790795 ], [ -122.483654, 37.794050 ], [ -122.482109, 37.798527 ], [ -122.481766, 37.798527 ], [ -122.481937, 37.798798 ], [ -122.481594, 37.798798 ], [ -122.481766, 37.798933 ], [ -122.480221, 37.801375 ], [ -122.479877, 37.802867 ], [ -122.478676, 37.805444 ], [ -122.478333, 37.808156 ], [ -122.477818, 37.808428 ], [ -122.477989, 37.810598 ], [ -122.477646, 37.810598 ], [ -122.477818, 37.811005 ] ], [ [ -122.452583, 37.803274 ], [ -122.452412, 37.803138 ], [ -122.450008, 37.802460 ], [ -122.451210, 37.803138 ], [ -122.452583, 37.803274 ] ] ], [ [ [ -122.466145, 37.806393 ], [ -122.465973, 37.806258 ], [ -122.466660, 37.805851 ], [ -122.466145, 37.806393 ] ] ], [ [ [ -122.469921, 37.809377 ], [ -122.469406, 37.809106 ], [ -122.470093, 37.809241 ], [ -122.469921, 37.809377 ] ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94123", "GEOID10": "94123", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 2646572, "AWATER10": 218721, "INTPTLAT10": "+37.8009336", "INTPTLON10": "-122.4383664", "tippecanoe:count": 108 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.443142, 37.809784 ], [ -122.439537, 37.808835 ], [ -122.440910, 37.806936 ], [ -122.435760, 37.807614 ], [ -122.435589, 37.807207 ], [ -122.435589, 37.806936 ], [ -122.433014, 37.807343 ], [ -122.433014, 37.807071 ], [ -122.434387, 37.806936 ], [ -122.434044, 37.806800 ], [ -122.433014, 37.806936 ], [ -122.432842, 37.806800 ], [ -122.434044, 37.806665 ], [ -122.434044, 37.806393 ], [ -122.433872, 37.806122 ], [ -122.433872, 37.805851 ], [ -122.433701, 37.805580 ], [ -122.432671, 37.805715 ], [ -122.432327, 37.805986 ], [ -122.431641, 37.803274 ], [ -122.425289, 37.804088 ], [ -122.424946, 37.803138 ], [ -122.426491, 37.803003 ], [ -122.426319, 37.802053 ], [ -122.424774, 37.802324 ], [ -122.424603, 37.801239 ], [ -122.426147, 37.801104 ], [ -122.425976, 37.800154 ], [ -122.424431, 37.800426 ], [ -122.423744, 37.796628 ], [ -122.433529, 37.795407 ], [ -122.433357, 37.794457 ], [ -122.434902, 37.794322 ], [ -122.435074, 37.795271 ], [ -122.436790, 37.795000 ], [ -122.436619, 37.794050 ], [ -122.440739, 37.793508 ], [ -122.440910, 37.794457 ], [ -122.441769, 37.794322 ], [ -122.441597, 37.793372 ], [ -122.446404, 37.792829 ], [ -122.446232, 37.791880 ], [ -122.447605, 37.791744 ], [ -122.448635, 37.794728 ], [ -122.448978, 37.795000 ], [ -122.448635, 37.795542 ], [ -122.447777, 37.795407 ], [ -122.447433, 37.795542 ], [ -122.447433, 37.795814 ], [ -122.448978, 37.796356 ], [ -122.447948, 37.796492 ], [ -122.447948, 37.796899 ], [ -122.448635, 37.797034 ], [ -122.448635, 37.797441 ], [ -122.447948, 37.797441 ], [ -122.448292, 37.797848 ], [ -122.448120, 37.798255 ], [ -122.447262, 37.798527 ], [ -122.447605, 37.800697 ], [ -122.450008, 37.802460 ], [ -122.450180, 37.802867 ], [ -122.451553, 37.803409 ], [ -122.448292, 37.804766 ], [ -122.448463, 37.806122 ], [ -122.448120, 37.806393 ], [ -122.448120, 37.806936 ], [ -122.448635, 37.808563 ], [ -122.443142, 37.809784 ] ] ], [ [ [ -122.432842, 37.805986 ], [ -122.432842, 37.805851 ], [ -122.433872, 37.805851 ], [ -122.432842, 37.805986 ] ] ], [ [ [ -122.433529, 37.807614 ], [ -122.433529, 37.807478 ], [ -122.435589, 37.807207 ], [ -122.433529, 37.807614 ] ] ], [ [ [ -122.452583, 37.803274 ], [ -122.451210, 37.803138 ], [ -122.450008, 37.802460 ], [ -122.452583, 37.803274 ] ] ], [ [ [ -122.432842, 37.806393 ], [ -122.432842, 37.806122 ], [ -122.433872, 37.806122 ], [ -122.432842, 37.806393 ] ] ], [ [ [ -122.432842, 37.806665 ], [ -122.432842, 37.806529 ], [ -122.434044, 37.806393 ], [ -122.432842, 37.806665 ] ] ], [ [ [ -122.433701, 37.808156 ], [ -122.433701, 37.807885 ], [ -122.433872, 37.807885 ], [ -122.433701, 37.808156 ] ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94121", "GEOID10": "94121", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 7980073, "AWATER10": 61283, "INTPTLAT10": "+37.7767691", "INTPTLON10": "-122.4947073", "tippecanoe:count": 196 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.485886, 37.790795 ], [ -122.485027, 37.789574 ], [ -122.484341, 37.789709 ], [ -122.484341, 37.790116 ], [ -122.483997, 37.789709 ], [ -122.484512, 37.789167 ], [ -122.483826, 37.787674 ], [ -122.479877, 37.786860 ], [ -122.476616, 37.786860 ], [ -122.475586, 37.773021 ], [ -122.471638, 37.773157 ], [ -122.471809, 37.772750 ], [ -122.472496, 37.772343 ], [ -122.474899, 37.772479 ], [ -122.478676, 37.772207 ], [ -122.479191, 37.771936 ], [ -122.479362, 37.771258 ], [ -122.478333, 37.769358 ], [ -122.478161, 37.767729 ], [ -122.477303, 37.766237 ], [ -122.477303, 37.765423 ], [ -122.510262, 37.763930 ], [ -122.510433, 37.767322 ], [ -122.511120, 37.771258 ], [ -122.513180, 37.770715 ], [ -122.513180, 37.776007 ], [ -122.513351, 37.777363 ], [ -122.514553, 37.778449 ], [ -122.514553, 37.779263 ], [ -122.514896, 37.779670 ], [ -122.514553, 37.779941 ], [ -122.514553, 37.780484 ], [ -122.514725, 37.781162 ], [ -122.514210, 37.781434 ], [ -122.513695, 37.781434 ], [ -122.513523, 37.782655 ], [ -122.513180, 37.782790 ], [ -122.513008, 37.783197 ], [ -122.512493, 37.783740 ], [ -122.512665, 37.784147 ], [ -122.512150, 37.783740 ], [ -122.511978, 37.784283 ], [ -122.511292, 37.784283 ], [ -122.511292, 37.784554 ], [ -122.509747, 37.784825 ], [ -122.509060, 37.785639 ], [ -122.508030, 37.786182 ], [ -122.507000, 37.787403 ], [ -122.506485, 37.787539 ], [ -122.506142, 37.787810 ], [ -122.505970, 37.788217 ], [ -122.502708, 37.788081 ], [ -122.500477, 37.788353 ], [ -122.500134, 37.788624 ], [ -122.499962, 37.788488 ], [ -122.499619, 37.788760 ], [ -122.499447, 37.788488 ], [ -122.498589, 37.788353 ], [ -122.498074, 37.787946 ], [ -122.497559, 37.787946 ], [ -122.497387, 37.787539 ], [ -122.496529, 37.787267 ], [ -122.494812, 37.787810 ], [ -122.494640, 37.788081 ], [ -122.493954, 37.787539 ], [ -122.493439, 37.787674 ], [ -122.492752, 37.787946 ], [ -122.492409, 37.787810 ], [ -122.491207, 37.788217 ], [ -122.489834, 37.789438 ], [ -122.488976, 37.789302 ], [ -122.487946, 37.789574 ], [ -122.487431, 37.789438 ], [ -122.485886, 37.790795 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94118", "GEOID10": "94118", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 5047718, "AWATER10": 59174, "INTPTLAT10": "+37.7800933", "INTPTLON10": "-122.4626054", "tippecanoe:count": 186 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.447948, 37.793101 ], [ -122.446575, 37.786318 ], [ -122.447605, 37.785097 ], [ -122.446404, 37.785368 ], [ -122.445889, 37.782519 ], [ -122.444515, 37.782519 ], [ -122.443829, 37.781841 ], [ -122.445545, 37.781298 ], [ -122.445374, 37.780077 ], [ -122.446232, 37.779941 ], [ -122.446060, 37.778720 ], [ -122.445374, 37.778856 ], [ -122.444859, 37.776007 ], [ -122.446404, 37.775871 ], [ -122.446918, 37.777635 ], [ -122.453270, 37.776821 ], [ -122.452755, 37.775057 ], [ -122.463741, 37.773564 ], [ -122.464600, 37.772479 ], [ -122.459106, 37.771258 ], [ -122.459621, 37.770579 ], [ -122.464428, 37.769629 ], [ -122.467003, 37.768001 ], [ -122.469063, 37.769086 ], [ -122.471294, 37.769086 ], [ -122.472324, 37.768544 ], [ -122.472668, 37.767594 ], [ -122.473183, 37.767051 ], [ -122.477303, 37.766101 ], [ -122.478161, 37.767729 ], [ -122.478333, 37.769358 ], [ -122.479362, 37.771258 ], [ -122.479191, 37.771936 ], [ -122.478676, 37.772207 ], [ -122.474899, 37.772479 ], [ -122.472496, 37.772343 ], [ -122.471981, 37.772479 ], [ -122.471638, 37.773021 ], [ -122.471638, 37.773157 ], [ -122.475586, 37.773021 ], [ -122.476616, 37.786860 ], [ -122.475586, 37.786725 ], [ -122.473354, 37.787132 ], [ -122.470951, 37.787267 ], [ -122.459450, 37.789709 ], [ -122.448978, 37.791744 ], [ -122.448635, 37.792015 ], [ -122.448292, 37.792965 ], [ -122.447948, 37.793101 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94117", "GEOID10": "94117", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 4373050, "AWATER10": 1625, "INTPTLAT10": "+37.7694362", "INTPTLON10": "-122.4476618", "tippecanoe:count": 200 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.430096, 37.778856 ], [ -122.428379, 37.770443 ], [ -122.429237, 37.770308 ], [ -122.429066, 37.769493 ], [ -122.435760, 37.769086 ], [ -122.435589, 37.767322 ], [ -122.438164, 37.767187 ], [ -122.438507, 37.766237 ], [ -122.439537, 37.766644 ], [ -122.441254, 37.765287 ], [ -122.443314, 37.765287 ], [ -122.442970, 37.763523 ], [ -122.443829, 37.763251 ], [ -122.445374, 37.761894 ], [ -122.446747, 37.761758 ], [ -122.446404, 37.760944 ], [ -122.447090, 37.759723 ], [ -122.447605, 37.759180 ], [ -122.448463, 37.759044 ], [ -122.448635, 37.759587 ], [ -122.451553, 37.759451 ], [ -122.453270, 37.759180 ], [ -122.453957, 37.758773 ], [ -122.454987, 37.758773 ], [ -122.455330, 37.759044 ], [ -122.456532, 37.759180 ], [ -122.456875, 37.759859 ], [ -122.456017, 37.760266 ], [ -122.455845, 37.760808 ], [ -122.456703, 37.761080 ], [ -122.457905, 37.760944 ], [ -122.459106, 37.761894 ], [ -122.457047, 37.761894 ], [ -122.456360, 37.762573 ], [ -122.456017, 37.763794 ], [ -122.456017, 37.764065 ], [ -122.457561, 37.763523 ], [ -122.457733, 37.765965 ], [ -122.458420, 37.766101 ], [ -122.461166, 37.766237 ], [ -122.477303, 37.765423 ], [ -122.477474, 37.766101 ], [ -122.475243, 37.766508 ], [ -122.472839, 37.767322 ], [ -122.472324, 37.768544 ], [ -122.471294, 37.769086 ], [ -122.469063, 37.769086 ], [ -122.467003, 37.768001 ], [ -122.464428, 37.769629 ], [ -122.461853, 37.770308 ], [ -122.459965, 37.770443 ], [ -122.459106, 37.771258 ], [ -122.464600, 37.772479 ], [ -122.463741, 37.773564 ], [ -122.452755, 37.775057 ], [ -122.453270, 37.776821 ], [ -122.446918, 37.777635 ], [ -122.446404, 37.775871 ], [ -122.444859, 37.776007 ], [ -122.445030, 37.776956 ], [ -122.441597, 37.777363 ], [ -122.441425, 37.776414 ], [ -122.440395, 37.776549 ], [ -122.439880, 37.776685 ], [ -122.440052, 37.777635 ], [ -122.430096, 37.778856 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94115", "GEOID10": "94115", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 2889809, "AWATER10": 0, "INTPTLAT10": "+37.7859692", "INTPTLON10": "-122.4372531", "tippecanoe:count": 131 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.430267, 37.795814 ], [ -122.426834, 37.779263 ], [ -122.428207, 37.779127 ], [ -122.428036, 37.778177 ], [ -122.429237, 37.778042 ], [ -122.429924, 37.777906 ], [ -122.430096, 37.778856 ], [ -122.440052, 37.777635 ], [ -122.439880, 37.776685 ], [ -122.440395, 37.776549 ], [ -122.441425, 37.776414 ], [ -122.441597, 37.777363 ], [ -122.445030, 37.776956 ], [ -122.445374, 37.778856 ], [ -122.446060, 37.778720 ], [ -122.446232, 37.779941 ], [ -122.445374, 37.780077 ], [ -122.445545, 37.781298 ], [ -122.443829, 37.781841 ], [ -122.444515, 37.782519 ], [ -122.445889, 37.782519 ], [ -122.446404, 37.785368 ], [ -122.447605, 37.785097 ], [ -122.446575, 37.786318 ], [ -122.447605, 37.791744 ], [ -122.446232, 37.791880 ], [ -122.446404, 37.792829 ], [ -122.441597, 37.793372 ], [ -122.441769, 37.794322 ], [ -122.440910, 37.794457 ], [ -122.440739, 37.793508 ], [ -122.436619, 37.794050 ], [ -122.436790, 37.795000 ], [ -122.435074, 37.795271 ], [ -122.434902, 37.794322 ], [ -122.433357, 37.794457 ], [ -122.433529, 37.795407 ], [ -122.430267, 37.795814 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94131", "GEOID10": "94131", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 5379947, "AWATER10": 50540, "INTPTLAT10": "+37.7459165", "INTPTLON10": "-122.4414731", "tippecanoe:count": 181 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.456017, 37.764065 ], [ -122.456360, 37.762573 ], [ -122.457047, 37.761894 ], [ -122.459106, 37.761894 ], [ -122.457905, 37.760944 ], [ -122.456703, 37.761080 ], [ -122.455845, 37.760808 ], [ -122.456017, 37.760266 ], [ -122.456875, 37.759859 ], [ -122.456875, 37.759451 ], [ -122.455845, 37.759044 ], [ -122.455330, 37.759044 ], [ -122.454987, 37.758773 ], [ -122.453785, 37.758773 ], [ -122.452927, 37.758094 ], [ -122.453785, 37.757416 ], [ -122.453270, 37.756737 ], [ -122.452412, 37.757008 ], [ -122.452068, 37.756601 ], [ -122.451038, 37.756737 ], [ -122.450352, 37.757416 ], [ -122.447948, 37.757551 ], [ -122.446918, 37.756601 ], [ -122.445889, 37.756466 ], [ -122.445030, 37.756601 ], [ -122.444515, 37.756466 ], [ -122.444172, 37.755923 ], [ -122.444000, 37.754158 ], [ -122.442970, 37.754023 ], [ -122.442455, 37.754430 ], [ -122.442284, 37.755108 ], [ -122.442970, 37.755516 ], [ -122.441254, 37.756194 ], [ -122.441082, 37.755923 ], [ -122.441082, 37.756194 ], [ -122.440052, 37.756330 ], [ -122.440052, 37.755787 ], [ -122.440395, 37.755108 ], [ -122.442455, 37.752394 ], [ -122.442799, 37.752394 ], [ -122.443485, 37.749408 ], [ -122.444344, 37.748322 ], [ -122.444172, 37.747508 ], [ -122.444859, 37.746965 ], [ -122.444515, 37.746693 ], [ -122.444000, 37.746829 ], [ -122.442455, 37.748186 ], [ -122.441425, 37.748593 ], [ -122.438164, 37.748729 ], [ -122.438164, 37.747779 ], [ -122.424946, 37.748593 ], [ -122.423916, 37.740856 ], [ -122.425117, 37.737870 ], [ -122.427864, 37.735562 ], [ -122.432327, 37.733254 ], [ -122.431984, 37.732983 ], [ -122.432156, 37.732983 ], [ -122.435074, 37.731489 ], [ -122.435932, 37.731625 ], [ -122.439537, 37.730131 ], [ -122.443657, 37.728366 ], [ -122.444344, 37.728231 ], [ -122.444344, 37.734612 ], [ -122.445374, 37.734612 ], [ -122.446232, 37.735155 ], [ -122.446404, 37.735562 ], [ -122.446060, 37.735562 ], [ -122.444687, 37.737598 ], [ -122.442455, 37.737598 ], [ -122.442627, 37.739499 ], [ -122.444000, 37.740042 ], [ -122.444687, 37.740856 ], [ -122.446060, 37.741128 ], [ -122.446232, 37.742078 ], [ -122.446575, 37.742485 ], [ -122.449150, 37.742892 ], [ -122.450180, 37.743571 ], [ -122.451725, 37.745607 ], [ -122.449493, 37.746693 ], [ -122.450867, 37.746965 ], [ -122.452068, 37.748322 ], [ -122.452068, 37.751172 ], [ -122.452927, 37.751172 ], [ -122.453098, 37.749001 ], [ -122.454128, 37.749001 ], [ -122.453957, 37.750629 ], [ -122.454472, 37.751308 ], [ -122.454643, 37.751308 ], [ -122.454643, 37.747100 ], [ -122.455502, 37.747100 ], [ -122.455845, 37.746422 ], [ -122.458763, 37.746829 ], [ -122.459106, 37.747236 ], [ -122.458763, 37.747643 ], [ -122.458591, 37.748051 ], [ -122.460308, 37.749815 ], [ -122.461338, 37.751308 ], [ -122.463398, 37.753073 ], [ -122.463741, 37.753615 ], [ -122.463570, 37.756330 ], [ -122.462540, 37.756737 ], [ -122.463226, 37.758773 ], [ -122.459965, 37.759316 ], [ -122.460651, 37.760537 ], [ -122.460823, 37.762573 ], [ -122.456017, 37.764065 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94109", "GEOID10": "94109", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 3077724, "AWATER10": 295382, "INTPTLAT10": "+37.7953881", "INTPTLON10": "-122.4224441", "tippecanoe:count": 229 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.420998, 37.812903 ], [ -122.419968, 37.808835 ], [ -122.419281, 37.808428 ], [ -122.419109, 37.807750 ], [ -122.420826, 37.807614 ], [ -122.420483, 37.806665 ], [ -122.418938, 37.806800 ], [ -122.418251, 37.803681 ], [ -122.418079, 37.803138 ], [ -122.419796, 37.802867 ], [ -122.419624, 37.802053 ], [ -122.417908, 37.802189 ], [ -122.417221, 37.798527 ], [ -122.415504, 37.798662 ], [ -122.413960, 37.790523 ], [ -122.412243, 37.790659 ], [ -122.411728, 37.788217 ], [ -122.412415, 37.788081 ], [ -122.412415, 37.787810 ], [ -122.413273, 37.787674 ], [ -122.413101, 37.786725 ], [ -122.414818, 37.786453 ], [ -122.414303, 37.783740 ], [ -122.419109, 37.783062 ], [ -122.418938, 37.782112 ], [ -122.420483, 37.781976 ], [ -122.420826, 37.782926 ], [ -122.422543, 37.782655 ], [ -122.422371, 37.781705 ], [ -122.423916, 37.781569 ], [ -122.424088, 37.782519 ], [ -122.427349, 37.782112 ], [ -122.430267, 37.795814 ], [ -122.423744, 37.796628 ], [ -122.424431, 37.800426 ], [ -122.425976, 37.800154 ], [ -122.426147, 37.801104 ], [ -122.424603, 37.801239 ], [ -122.424774, 37.802324 ], [ -122.426319, 37.802053 ], [ -122.426491, 37.803003 ], [ -122.424946, 37.803138 ], [ -122.425289, 37.804088 ], [ -122.431641, 37.803274 ], [ -122.432327, 37.805986 ], [ -122.432156, 37.806122 ], [ -122.432671, 37.808428 ], [ -122.432327, 37.808563 ], [ -122.431984, 37.807207 ], [ -122.431469, 37.807343 ], [ -122.431812, 37.808970 ], [ -122.431297, 37.809106 ], [ -122.430954, 37.807343 ], [ -122.430267, 37.807478 ], [ -122.430611, 37.809106 ], [ -122.430096, 37.809241 ], [ -122.429752, 37.807885 ], [ -122.428207, 37.808428 ], [ -122.427006, 37.808156 ], [ -122.427521, 37.808699 ], [ -122.428036, 37.808563 ], [ -122.427521, 37.808835 ], [ -122.426834, 37.808156 ], [ -122.426491, 37.809920 ], [ -122.425804, 37.810462 ], [ -122.424946, 37.810733 ], [ -122.425976, 37.812089 ], [ -122.425117, 37.812632 ], [ -122.420998, 37.812903 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94108", "GEOID10": "94108", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 698151, "AWATER10": 0, "INTPTLAT10": "+37.7920162", "INTPTLON10": "-122.4085835", "tippecanoe:count": 67 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.404346, 37.796356 ], [ -122.403316, 37.795542 ], [ -122.405033, 37.795271 ], [ -122.403488, 37.787810 ], [ -122.404690, 37.786725 ], [ -122.406406, 37.786589 ], [ -122.406750, 37.788488 ], [ -122.408466, 37.788353 ], [ -122.408638, 37.789167 ], [ -122.411900, 37.788760 ], [ -122.412243, 37.790659 ], [ -122.413960, 37.790523 ], [ -122.414818, 37.795000 ], [ -122.404346, 37.796356 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94104", "GEOID10": "94104", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 200857, "AWATER10": 0, "INTPTLAT10": "+37.7914115", "INTPTLON10": "-122.4021291", "tippecanoe:count": 25 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.401257, 37.794050 ], [ -122.401257, 37.793508 ], [ -122.400055, 37.793643 ], [ -122.399540, 37.791337 ], [ -122.399197, 37.791066 ], [ -122.403488, 37.787810 ], [ -122.404690, 37.793508 ], [ -122.401257, 37.794050 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94114", "GEOID10": "94114", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 3692567, "AWATER10": 0, "INTPTLAT10": "+37.7580586", "INTPTLON10": "-122.4354080", "tippecanoe:count": 206 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.428379, 37.770443 ], [ -122.428207, 37.769493 ], [ -122.426319, 37.769629 ], [ -122.427006, 37.769222 ], [ -122.426662, 37.768951 ], [ -122.426491, 37.765830 ], [ -122.427692, 37.765694 ], [ -122.427521, 37.764608 ], [ -122.426319, 37.764608 ], [ -122.426319, 37.763930 ], [ -122.427177, 37.763794 ], [ -122.427177, 37.762980 ], [ -122.426319, 37.762980 ], [ -122.426147, 37.762166 ], [ -122.424774, 37.748593 ], [ -122.438164, 37.747779 ], [ -122.438164, 37.748729 ], [ -122.441425, 37.748593 ], [ -122.442455, 37.748186 ], [ -122.444000, 37.746829 ], [ -122.444515, 37.746693 ], [ -122.444859, 37.746965 ], [ -122.444172, 37.747508 ], [ -122.444344, 37.748322 ], [ -122.443485, 37.749408 ], [ -122.442799, 37.752394 ], [ -122.442455, 37.752394 ], [ -122.440395, 37.755108 ], [ -122.440052, 37.755787 ], [ -122.440052, 37.756330 ], [ -122.441082, 37.756194 ], [ -122.441082, 37.756058 ], [ -122.441254, 37.756194 ], [ -122.442970, 37.755516 ], [ -122.442284, 37.755108 ], [ -122.442455, 37.754430 ], [ -122.442970, 37.754023 ], [ -122.444000, 37.754158 ], [ -122.444172, 37.755923 ], [ -122.444687, 37.756601 ], [ -122.445889, 37.756466 ], [ -122.446918, 37.756601 ], [ -122.447948, 37.757551 ], [ -122.450352, 37.757416 ], [ -122.451038, 37.756737 ], [ -122.452068, 37.756601 ], [ -122.452412, 37.757008 ], [ -122.453270, 37.756737 ], [ -122.453785, 37.757416 ], [ -122.452927, 37.758094 ], [ -122.453957, 37.758773 ], [ -122.453270, 37.759180 ], [ -122.451553, 37.759451 ], [ -122.448635, 37.759587 ], [ -122.448463, 37.759044 ], [ -122.447605, 37.759180 ], [ -122.447090, 37.759723 ], [ -122.446404, 37.760944 ], [ -122.446747, 37.761758 ], [ -122.445374, 37.761894 ], [ -122.443829, 37.763251 ], [ -122.442970, 37.763523 ], [ -122.443314, 37.765287 ], [ -122.441254, 37.765287 ], [ -122.439537, 37.766644 ], [ -122.438507, 37.766237 ], [ -122.438164, 37.767187 ], [ -122.435589, 37.767322 ], [ -122.435760, 37.769086 ], [ -122.429066, 37.769493 ], [ -122.429237, 37.770308 ], [ -122.428379, 37.770443 ] ] ], [ [ [ -122.441597, 37.755108 ], [ -122.442799, 37.752530 ], [ -122.442455, 37.753751 ], [ -122.441597, 37.755108 ] ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94102", "GEOID10": "94102", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 1732577, "AWATER10": 0, "INTPTLAT10": "+37.7795835", "INTPTLON10": "-122.4193398", "tippecanoe:count": 134 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.408638, 37.789167 ], [ -122.408466, 37.788353 ], [ -122.406750, 37.788488 ], [ -122.406406, 37.786589 ], [ -122.404690, 37.786725 ], [ -122.408638, 37.783604 ], [ -122.408638, 37.783469 ], [ -122.409153, 37.783197 ], [ -122.426319, 37.769629 ], [ -122.428207, 37.769493 ], [ -122.429924, 37.777906 ], [ -122.428036, 37.778177 ], [ -122.428207, 37.779127 ], [ -122.426834, 37.779263 ], [ -122.427349, 37.782112 ], [ -122.424088, 37.782519 ], [ -122.423916, 37.781569 ], [ -122.422371, 37.781705 ], [ -122.422543, 37.782655 ], [ -122.420826, 37.782926 ], [ -122.420654, 37.781976 ], [ -122.418938, 37.782112 ], [ -122.419109, 37.783062 ], [ -122.414303, 37.783740 ], [ -122.414818, 37.786453 ], [ -122.413101, 37.786725 ], [ -122.413273, 37.787674 ], [ -122.412415, 37.787810 ], [ -122.412415, 37.788081 ], [ -122.411728, 37.788217 ], [ -122.411900, 37.788760 ], [ -122.408638, 37.789167 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94105", "GEOID10": "94105", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 942025, "AWATER10": 223684, "INTPTLAT10": "+37.7896493", "INTPTLON10": "-122.3930670", "tippecanoe:count": 127 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.388897, 37.796628 ], [ -122.385120, 37.791337 ], [ -122.385635, 37.790930 ], [ -122.385464, 37.790523 ], [ -122.386322, 37.790252 ], [ -122.387867, 37.788760 ], [ -122.387695, 37.787132 ], [ -122.388554, 37.786996 ], [ -122.392159, 37.784147 ], [ -122.392330, 37.784283 ], [ -122.391472, 37.785097 ], [ -122.391472, 37.785639 ], [ -122.390099, 37.786725 ], [ -122.391815, 37.785504 ], [ -122.393360, 37.784961 ], [ -122.394218, 37.785097 ], [ -122.394047, 37.785232 ], [ -122.395592, 37.786318 ], [ -122.397823, 37.784690 ], [ -122.399368, 37.785911 ], [ -122.400398, 37.785097 ], [ -122.402630, 37.786725 ], [ -122.401772, 37.787267 ], [ -122.402802, 37.788081 ], [ -122.403488, 37.787810 ], [ -122.396278, 37.793372 ], [ -122.396622, 37.794593 ], [ -122.394390, 37.795000 ], [ -122.392502, 37.793643 ], [ -122.392159, 37.793915 ], [ -122.391472, 37.793915 ], [ -122.388897, 37.796628 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94107", "GEOID10": "94107", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 4647665, "AWATER10": 227634, "INTPTLAT10": "+37.7604596", "INTPTLON10": "-122.3997237", "tippecanoe:count": 236 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.385120, 37.791337 ], [ -122.381687, 37.783469 ], [ -122.384777, 37.782790 ], [ -122.384777, 37.782519 ], [ -122.387867, 37.782248 ], [ -122.387695, 37.781841 ], [ -122.385635, 37.781976 ], [ -122.385464, 37.781841 ], [ -122.384777, 37.781841 ], [ -122.385464, 37.781705 ], [ -122.385464, 37.781569 ], [ -122.387695, 37.781434 ], [ -122.387524, 37.781027 ], [ -122.384777, 37.781298 ], [ -122.384777, 37.781027 ], [ -122.387524, 37.780891 ], [ -122.387524, 37.780484 ], [ -122.387524, 37.780077 ], [ -122.387524, 37.779670 ], [ -122.387352, 37.779263 ], [ -122.387352, 37.778992 ], [ -122.384777, 37.779127 ], [ -122.384777, 37.778992 ], [ -122.387352, 37.778856 ], [ -122.387352, 37.778585 ], [ -122.387352, 37.778313 ], [ -122.387695, 37.778313 ], [ -122.387695, 37.778177 ], [ -122.390442, 37.777092 ], [ -122.390442, 37.776956 ], [ -122.390270, 37.776685 ], [ -122.392502, 37.775192 ], [ -122.394218, 37.776414 ], [ -122.396450, 37.774650 ], [ -122.396107, 37.774514 ], [ -122.397480, 37.773429 ], [ -122.397823, 37.772343 ], [ -122.398510, 37.772886 ], [ -122.400742, 37.771122 ], [ -122.396622, 37.767865 ], [ -122.393875, 37.766101 ], [ -122.393703, 37.764065 ], [ -122.387867, 37.764337 ], [ -122.387524, 37.760537 ], [ -122.386665, 37.760673 ], [ -122.386322, 37.758094 ], [ -122.385464, 37.758094 ], [ -122.384777, 37.757687 ], [ -122.381344, 37.757959 ], [ -122.381344, 37.756466 ], [ -122.381172, 37.755923 ], [ -122.380829, 37.755516 ], [ -122.380829, 37.755244 ], [ -122.384090, 37.754973 ], [ -122.384090, 37.754701 ], [ -122.383404, 37.754701 ], [ -122.382889, 37.754430 ], [ -122.381516, 37.754566 ], [ -122.380142, 37.754566 ], [ -122.379971, 37.753344 ], [ -122.386837, 37.752937 ], [ -122.386494, 37.750358 ], [ -122.393188, 37.749951 ], [ -122.393188, 37.751444 ], [ -122.395248, 37.751308 ], [ -122.395248, 37.749815 ], [ -122.403831, 37.749408 ], [ -122.402973, 37.752801 ], [ -122.403316, 37.756194 ], [ -122.403831, 37.757144 ], [ -122.406063, 37.759180 ], [ -122.406578, 37.760673 ], [ -122.405376, 37.763116 ], [ -122.405033, 37.764608 ], [ -122.401600, 37.764880 ], [ -122.401428, 37.763523 ], [ -122.400570, 37.763658 ], [ -122.400742, 37.766237 ], [ -122.399712, 37.766237 ], [ -122.399712, 37.766644 ], [ -122.400742, 37.767458 ], [ -122.401772, 37.767458 ], [ -122.402115, 37.769901 ], [ -122.403488, 37.769765 ], [ -122.403831, 37.770036 ], [ -122.399368, 37.773564 ], [ -122.402458, 37.776007 ], [ -122.401943, 37.776414 ], [ -122.403145, 37.777363 ], [ -122.403660, 37.776956 ], [ -122.405548, 37.778449 ], [ -122.395592, 37.786318 ], [ -122.394047, 37.785232 ], [ -122.394218, 37.785097 ], [ -122.393360, 37.784961 ], [ -122.391815, 37.785504 ], [ -122.391472, 37.785639 ], [ -122.391472, 37.785097 ], [ -122.392330, 37.784283 ], [ -122.392159, 37.784147 ], [ -122.388554, 37.786996 ], [ -122.387695, 37.787132 ], [ -122.387867, 37.788760 ], [ -122.386322, 37.790252 ], [ -122.385464, 37.790523 ], [ -122.385635, 37.790930 ], [ -122.385120, 37.791337 ] ] ], [ [ [ -122.384777, 37.779941 ], [ -122.384777, 37.779670 ], [ -122.387524, 37.779670 ], [ -122.384777, 37.779941 ] ] ], [ [ [ -122.384777, 37.780348 ], [ -122.384777, 37.780077 ], [ -122.387524, 37.780077 ], [ -122.384777, 37.780348 ] ] ], [ [ [ -122.384777, 37.780755 ], [ -122.384777, 37.780484 ], [ -122.387524, 37.780484 ], [ -122.384777, 37.780755 ] ] ], [ [ [ -122.384777, 37.779534 ], [ -122.384777, 37.779263 ], [ -122.387352, 37.779263 ], [ -122.384777, 37.779534 ] ] ], [ [ [ -122.385120, 37.778856 ], [ -122.385120, 37.778585 ], [ -122.387352, 37.778585 ], [ -122.385120, 37.778856 ] ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94116", "GEOID10": "94116", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6699058, "AWATER10": 97204, "INTPTLAT10": "+37.7453994", "INTPTLON10": "-122.4860655", "tippecanoe:count": 193 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.510433, 37.764065 ], [ -122.509918, 37.763930 ], [ -122.508202, 37.751037 ], [ -122.470951, 37.752665 ], [ -122.471123, 37.753480 ], [ -122.470951, 37.754837 ], [ -122.470093, 37.754701 ], [ -122.470264, 37.753887 ], [ -122.469578, 37.753615 ], [ -122.469063, 37.752937 ], [ -122.468376, 37.753208 ], [ -122.467861, 37.752665 ], [ -122.463398, 37.753073 ], [ -122.461338, 37.751308 ], [ -122.460308, 37.749815 ], [ -122.458591, 37.748051 ], [ -122.458763, 37.747643 ], [ -122.459450, 37.747100 ], [ -122.459106, 37.746829 ], [ -122.460823, 37.745336 ], [ -122.461338, 37.745607 ], [ -122.463741, 37.743707 ], [ -122.467690, 37.743435 ], [ -122.468548, 37.741535 ], [ -122.471294, 37.741399 ], [ -122.470951, 37.737598 ], [ -122.470608, 37.736648 ], [ -122.471638, 37.734747 ], [ -122.475071, 37.734747 ], [ -122.475243, 37.734612 ], [ -122.475414, 37.737463 ], [ -122.481766, 37.737191 ], [ -122.482452, 37.737463 ], [ -122.483311, 37.737463 ], [ -122.486229, 37.736784 ], [ -122.488461, 37.737055 ], [ -122.490005, 37.738006 ], [ -122.491379, 37.737327 ], [ -122.491379, 37.734069 ], [ -122.496872, 37.733933 ], [ -122.498589, 37.734204 ], [ -122.500477, 37.735155 ], [ -122.502022, 37.735562 ], [ -122.505283, 37.735562 ], [ -122.505283, 37.735426 ], [ -122.506828, 37.735426 ], [ -122.506657, 37.736241 ], [ -122.510433, 37.764065 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94122", "GEOID10": "94122", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6124844, "AWATER10": 0, "INTPTLAT10": "+37.7587992", "INTPTLON10": "-122.4851269", "tippecanoe:count": 226 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.458763, 37.766237 ], [ -122.457733, 37.765965 ], [ -122.457561, 37.763523 ], [ -122.460823, 37.762573 ], [ -122.460651, 37.760537 ], [ -122.459965, 37.759316 ], [ -122.463226, 37.758773 ], [ -122.462540, 37.756737 ], [ -122.463570, 37.756330 ], [ -122.463741, 37.753751 ], [ -122.463398, 37.753073 ], [ -122.467861, 37.752665 ], [ -122.468376, 37.753208 ], [ -122.469063, 37.752937 ], [ -122.469578, 37.753615 ], [ -122.470264, 37.753887 ], [ -122.470093, 37.754701 ], [ -122.470951, 37.754837 ], [ -122.471123, 37.753480 ], [ -122.470951, 37.752665 ], [ -122.508202, 37.751037 ], [ -122.509918, 37.764065 ], [ -122.461166, 37.766237 ], [ -122.458763, 37.766237 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94127", "GEOID10": "94127", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 4585709, "AWATER10": 9359, "INTPTLAT10": "+37.7360266", "INTPTLON10": "-122.4572070", "tippecanoe:count": 169 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.454472, 37.751308 ], [ -122.453957, 37.750629 ], [ -122.454128, 37.749001 ], [ -122.453098, 37.749001 ], [ -122.452927, 37.751172 ], [ -122.452068, 37.751172 ], [ -122.452068, 37.748322 ], [ -122.450867, 37.746965 ], [ -122.449493, 37.746693 ], [ -122.451725, 37.745607 ], [ -122.450180, 37.743571 ], [ -122.449150, 37.742892 ], [ -122.446575, 37.742485 ], [ -122.446232, 37.742078 ], [ -122.446060, 37.741128 ], [ -122.444687, 37.740856 ], [ -122.444000, 37.740042 ], [ -122.442799, 37.739770 ], [ -122.442455, 37.739499 ], [ -122.442627, 37.738277 ], [ -122.442455, 37.737598 ], [ -122.444687, 37.737598 ], [ -122.446060, 37.735562 ], [ -122.446404, 37.735562 ], [ -122.446232, 37.735155 ], [ -122.445374, 37.734612 ], [ -122.444344, 37.734612 ], [ -122.444344, 37.730675 ], [ -122.453442, 37.730675 ], [ -122.453442, 37.731625 ], [ -122.457561, 37.731082 ], [ -122.457390, 37.730675 ], [ -122.459278, 37.730810 ], [ -122.459965, 37.729860 ], [ -122.459965, 37.728774 ], [ -122.460995, 37.728638 ], [ -122.460823, 37.727552 ], [ -122.462025, 37.727416 ], [ -122.462540, 37.727145 ], [ -122.462711, 37.725515 ], [ -122.462196, 37.725244 ], [ -122.462196, 37.723071 ], [ -122.463913, 37.722392 ], [ -122.464428, 37.721713 ], [ -122.472496, 37.721578 ], [ -122.471981, 37.728774 ], [ -122.472324, 37.728774 ], [ -122.471809, 37.734204 ], [ -122.470608, 37.736648 ], [ -122.470951, 37.737598 ], [ -122.471294, 37.741399 ], [ -122.468548, 37.741535 ], [ -122.467690, 37.743435 ], [ -122.463741, 37.743707 ], [ -122.461338, 37.745607 ], [ -122.460823, 37.745336 ], [ -122.459106, 37.746829 ], [ -122.459450, 37.747100 ], [ -122.459106, 37.747236 ], [ -122.458763, 37.746829 ], [ -122.455845, 37.746422 ], [ -122.455502, 37.747100 ], [ -122.454643, 37.747100 ], [ -122.454643, 37.751308 ], [ -122.454472, 37.751308 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94130", "GEOID10": "94130", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 2281270, "AWATER10": 0, "INTPTLAT10": "+37.8206879", "INTPTLON10": "-122.3695372", "tippecanoe:count": 43 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.373276, 37.832294 ], [ -122.368641, 37.831209 ], [ -122.362804, 37.822667 ], [ -122.363491, 37.820904 ], [ -122.360573, 37.820090 ], [ -122.360573, 37.819819 ], [ -122.363663, 37.820497 ], [ -122.364349, 37.818734 ], [ -122.364864, 37.818463 ], [ -122.365036, 37.818463 ], [ -122.371044, 37.816022 ], [ -122.370358, 37.814259 ], [ -122.369671, 37.813310 ], [ -122.368984, 37.812768 ], [ -122.367268, 37.812361 ], [ -122.366066, 37.812768 ], [ -122.364178, 37.813988 ], [ -122.362289, 37.814124 ], [ -122.361603, 37.814531 ], [ -122.359200, 37.815073 ], [ -122.359028, 37.814802 ], [ -122.358856, 37.814259 ], [ -122.359200, 37.813446 ], [ -122.361088, 37.812496 ], [ -122.361259, 37.810733 ], [ -122.360916, 37.808156 ], [ -122.361603, 37.808021 ], [ -122.362118, 37.807071 ], [ -122.362804, 37.807207 ], [ -122.367268, 37.807750 ], [ -122.368641, 37.808156 ], [ -122.371559, 37.809377 ], [ -122.372761, 37.810869 ], [ -122.372761, 37.811276 ], [ -122.372246, 37.811276 ], [ -122.371731, 37.812361 ], [ -122.371559, 37.813039 ], [ -122.371731, 37.813446 ], [ -122.371387, 37.813581 ], [ -122.371216, 37.814531 ], [ -122.371387, 37.815209 ], [ -122.379112, 37.826870 ], [ -122.377567, 37.830531 ], [ -122.373276, 37.832294 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94133", "GEOID10": "94133", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 1955594, "AWATER10": 646917, "INTPTLAT10": "+37.8045315", "INTPTLON10": "-122.4108520", "tippecanoe:count": 138 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.420998, 37.812903 ], [ -122.407436, 37.812768 ], [ -122.398510, 37.807207 ], [ -122.402287, 37.805173 ], [ -122.403488, 37.805037 ], [ -122.403488, 37.805308 ], [ -122.404518, 37.806122 ], [ -122.405720, 37.806665 ], [ -122.405891, 37.806529 ], [ -122.405376, 37.805715 ], [ -122.405205, 37.804766 ], [ -122.405891, 37.804630 ], [ -122.405720, 37.803816 ], [ -122.405033, 37.803816 ], [ -122.404861, 37.802867 ], [ -122.403145, 37.803138 ], [ -122.401943, 37.796899 ], [ -122.403488, 37.796628 ], [ -122.403488, 37.796356 ], [ -122.414818, 37.795000 ], [ -122.415504, 37.798662 ], [ -122.417221, 37.798527 ], [ -122.417908, 37.802189 ], [ -122.419624, 37.802053 ], [ -122.419796, 37.802867 ], [ -122.418079, 37.803138 ], [ -122.418251, 37.803681 ], [ -122.418938, 37.806800 ], [ -122.420483, 37.806665 ], [ -122.420826, 37.807614 ], [ -122.419109, 37.807750 ], [ -122.419281, 37.808428 ], [ -122.419968, 37.808835 ], [ -122.420998, 37.812903 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94111", "GEOID10": "94111", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 891134, "AWATER10": 494314, "INTPTLAT10": "+37.7993699", "INTPTLON10": "-122.3984087", "tippecanoe:count": 63 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.398510, 37.807207 ], [ -122.393360, 37.801918 ], [ -122.388897, 37.796628 ], [ -122.391472, 37.793915 ], [ -122.392159, 37.793915 ], [ -122.392502, 37.793643 ], [ -122.394390, 37.795000 ], [ -122.396622, 37.794593 ], [ -122.396278, 37.793372 ], [ -122.399197, 37.791066 ], [ -122.399540, 37.791337 ], [ -122.400055, 37.793643 ], [ -122.401257, 37.793508 ], [ -122.401257, 37.794050 ], [ -122.404690, 37.793508 ], [ -122.405033, 37.795271 ], [ -122.403316, 37.795542 ], [ -122.404346, 37.796356 ], [ -122.403488, 37.796356 ], [ -122.403488, 37.796628 ], [ -122.401943, 37.796899 ], [ -122.403145, 37.803138 ], [ -122.404861, 37.802867 ], [ -122.405033, 37.803816 ], [ -122.405548, 37.803681 ], [ -122.405720, 37.803816 ], [ -122.405891, 37.804630 ], [ -122.405205, 37.804766 ], [ -122.405376, 37.805715 ], [ -122.405891, 37.806529 ], [ -122.405720, 37.806665 ], [ -122.404346, 37.805986 ], [ -122.403488, 37.805308 ], [ -122.403488, 37.805037 ], [ -122.402287, 37.805173 ], [ -122.398510, 37.807207 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94103", "GEOID10": "94103", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 3518047, "AWATER10": 0, "INTPTLAT10": "+37.7731516", "INTPTLON10": "-122.4111634", "tippecanoe:count": 205 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.402802, 37.788081 ], [ -122.401772, 37.787267 ], [ -122.402630, 37.786725 ], [ -122.400398, 37.785097 ], [ -122.399368, 37.785911 ], [ -122.397823, 37.784690 ], [ -122.405548, 37.778449 ], [ -122.403660, 37.776956 ], [ -122.403145, 37.777363 ], [ -122.401943, 37.776414 ], [ -122.402458, 37.776007 ], [ -122.399368, 37.773564 ], [ -122.403831, 37.770036 ], [ -122.403488, 37.769765 ], [ -122.402115, 37.769901 ], [ -122.401772, 37.767458 ], [ -122.400742, 37.767458 ], [ -122.399712, 37.766644 ], [ -122.399712, 37.766237 ], [ -122.400742, 37.766237 ], [ -122.400570, 37.763658 ], [ -122.401428, 37.763523 ], [ -122.401600, 37.764880 ], [ -122.410355, 37.764337 ], [ -122.410526, 37.765558 ], [ -122.427521, 37.764608 ], [ -122.427692, 37.765694 ], [ -122.426491, 37.765830 ], [ -122.426662, 37.768951 ], [ -122.427006, 37.769222 ], [ -122.409153, 37.783197 ], [ -122.408638, 37.783469 ], [ -122.408638, 37.783604 ], [ -122.403488, 37.787810 ], [ -122.402802, 37.788081 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94110", "GEOID10": "94110", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 6019827, "AWATER10": 12207, "INTPTLAT10": "+37.7500215", "INTPTLON10": "-122.4152015", "tippecanoe:count": 263 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.410526, 37.765558 ], [ -122.410355, 37.764337 ], [ -122.405033, 37.764608 ], [ -122.405205, 37.763523 ], [ -122.406235, 37.761351 ], [ -122.406578, 37.760266 ], [ -122.405891, 37.758909 ], [ -122.403488, 37.756873 ], [ -122.402973, 37.752801 ], [ -122.403831, 37.749408 ], [ -122.405033, 37.749136 ], [ -122.404003, 37.748322 ], [ -122.404861, 37.745336 ], [ -122.405205, 37.744386 ], [ -122.405376, 37.744521 ], [ -122.406235, 37.743571 ], [ -122.405891, 37.743435 ], [ -122.407436, 37.741399 ], [ -122.407951, 37.739227 ], [ -122.407780, 37.737734 ], [ -122.408295, 37.737598 ], [ -122.408295, 37.736648 ], [ -122.408810, 37.735833 ], [ -122.410011, 37.734747 ], [ -122.414474, 37.732439 ], [ -122.415161, 37.732168 ], [ -122.418938, 37.732168 ], [ -122.418938, 37.732847 ], [ -122.418251, 37.732983 ], [ -122.420139, 37.732983 ], [ -122.421856, 37.734612 ], [ -122.421856, 37.735155 ], [ -122.422199, 37.735155 ], [ -122.422886, 37.734340 ], [ -122.423916, 37.734612 ], [ -122.424946, 37.735562 ], [ -122.427349, 37.735698 ], [ -122.425117, 37.737870 ], [ -122.423916, 37.740856 ], [ -122.424603, 37.744657 ], [ -122.426147, 37.762166 ], [ -122.426319, 37.762980 ], [ -122.427177, 37.762980 ], [ -122.427177, 37.763794 ], [ -122.426319, 37.763930 ], [ -122.426319, 37.764608 ], [ -122.410526, 37.765558 ] ] ] } }
|
||||||
|
,
|
||||||
|
{ "type": "Feature", "properties": { "ZCTA5CE10": "94158", "GEOID10": "94158", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 1800349, "AWATER10": 1246229, "INTPTLAT10": "+37.7698930", "INTPTLON10": "-122.3870114", "tippecanoe:count": 28 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.381687, 37.783469 ], [ -122.377911, 37.753615 ], [ -122.379971, 37.753344 ], [ -122.380142, 37.754566 ], [ -122.381516, 37.754566 ], [ -122.382889, 37.754430 ], [ -122.383404, 37.754701 ], [ -122.384090, 37.754701 ], [ -122.384090, 37.754973 ], [ -122.380829, 37.755244 ], [ -122.380829, 37.755516 ], [ -122.381172, 37.755923 ], [ -122.381344, 37.756466 ], [ -122.381344, 37.757959 ], [ -122.384777, 37.757687 ], [ -122.385464, 37.758094 ], [ -122.386322, 37.758094 ], [ -122.386665, 37.760673 ], [ -122.387524, 37.760537 ], [ -122.387867, 37.764337 ], [ -122.393703, 37.764065 ], [ -122.393875, 37.766101 ], [ -122.396622, 37.767865 ], [ -122.400742, 37.771122 ], [ -122.398510, 37.772886 ], [ -122.397823, 37.772343 ], [ -122.397480, 37.773429 ], [ -122.396107, 37.774514 ], [ -122.396450, 37.774650 ], [ -122.394218, 37.776414 ], [ -122.392502, 37.775192 ], [ -122.390270, 37.776685 ], [ -122.390442, 37.776956 ], [ -122.390442, 37.777092 ], [ -122.387695, 37.778177 ], [ -122.387695, 37.778313 ], [ -122.387352, 37.778313 ], [ -122.387352, 37.778585 ], [ -122.387352, 37.778856 ], [ -122.384777, 37.778992 ], [ -122.384777, 37.779127 ], [ -122.387352, 37.778992 ], [ -122.387352, 37.779263 ], [ -122.387524, 37.779670 ], [ -122.387524, 37.780077 ], [ -122.387524, 37.780484 ], [ -122.387524, 37.780891 ], [ -122.384777, 37.781027 ], [ -122.384777, 37.781298 ], [ -122.387524, 37.781027 ], [ -122.387695, 37.781434 ], [ -122.385464, 37.781569 ], [ -122.385464, 37.781705 ], [ -122.384777, 37.781841 ], [ -122.385464, 37.781841 ], [ -122.385635, 37.781976 ], [ -122.387695, 37.781841 ], [ -122.387867, 37.782248 ], [ -122.384777, 37.782519 ], [ -122.384777, 37.782790 ], [ -122.381687, 37.783469 ] ], [ [ -122.384777, 37.779941 ], [ -122.387524, 37.779670 ], [ -122.384777, 37.779670 ], [ -122.384777, 37.779941 ] ], [ [ -122.384777, 37.780348 ], [ -122.387524, 37.780077 ], [ -122.384777, 37.780077 ], [ -122.384777, 37.780348 ] ], [ [ -122.385120, 37.778856 ], [ -122.387352, 37.778585 ], [ -122.385120, 37.778585 ], [ -122.385120, 37.778856 ] ], [ [ -122.384777, 37.779534 ], [ -122.387352, 37.779263 ], [ -122.384777, 37.779263 ], [ -122.384777, 37.779534 ] ], [ [ -122.384777, 37.780755 ], [ -122.387524, 37.780484 ], [ -122.384777, 37.780484 ], [ -122.384777, 37.780755 ] ] ] } }
|
||||||
|
] }
|
||||||
|
] }
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -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 ] ] ] } }
|
||||||
+1
-1
@@ -712,7 +712,7 @@ struct tileset_reader {
|
|||||||
t.y = parent_tile.y;
|
t.y = parent_tile.y;
|
||||||
tv.push_back(std::move(t));
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1398,10 +1398,76 @@ void promote_attribute(std::string const &key, serial_feature &p) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void promote_attribute_prefix(std::string const &key, std::string const &prefixed_key, serial_feature &p) {
|
||||||
|
if (p.need_tilestats.count(prefixed_key) == 0) {
|
||||||
|
p.need_tilestats.insert(prefixed_key);
|
||||||
|
}
|
||||||
|
|
||||||
|
// does the prefixed attribute already exist as a full key?
|
||||||
|
ssize_t found_as = -1;
|
||||||
|
for (size_t i = 0; i < p.full_keys.size(); i++) {
|
||||||
|
if (prefixed_key == p.full_keys[i]) {
|
||||||
|
// yes, so we're done
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (key == p.full_keys[i]) {
|
||||||
|
found_as = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// or did we find the source as a full key? then copy it
|
||||||
|
if (found_as >= 0) {
|
||||||
|
p.full_keys.push_back(prefixed_key);
|
||||||
|
p.full_values.push_back(p.full_values[found_as]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// does the prefix attribute exist as a reference key?
|
||||||
|
found_as = -1;
|
||||||
|
for (size_t i = 0; i < p.keys.size(); i++) {
|
||||||
|
if (strcmp(prefixed_key.c_str(), p.stringpool + p.keys[i] + 1) == 0) {
|
||||||
|
// yes, so promote it to a full key
|
||||||
|
serial_val sv;
|
||||||
|
sv.s = p.stringpool + p.values[i] + 1;
|
||||||
|
sv.type = p.stringpool[p.values[i]];
|
||||||
|
|
||||||
|
p.full_keys.push_back(prefixed_key);
|
||||||
|
p.full_values.push_back(std::move(sv));
|
||||||
|
|
||||||
|
p.keys.erase(p.keys.begin() + i);
|
||||||
|
p.values.erase(p.values.begin() + i);
|
||||||
|
|
||||||
|
return;
|
||||||
|
} else if (strcmp(key.c_str(), p.stringpool + p.keys[i] + 1) == 0) {
|
||||||
|
found_as = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// or did we find the source as a reference key? then copy it
|
||||||
|
if (found_as >= 0) {
|
||||||
|
serial_val sv;
|
||||||
|
sv.s = p.stringpool + p.values[found_as] + 1;
|
||||||
|
sv.type = p.stringpool[p.values[found_as]];
|
||||||
|
|
||||||
|
p.full_keys.push_back(prefixed_key);
|
||||||
|
p.full_values.push_back(std::move(sv));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map<std::string, attribute_op> numeric_operations = {
|
||||||
|
{"sum", op_sum},
|
||||||
|
{"min", op_min},
|
||||||
|
{"max", op_max},
|
||||||
|
{"count", op_count},
|
||||||
|
};
|
||||||
|
|
||||||
// accumulate attribute values from sf onto p
|
// accumulate attribute values from sf onto p
|
||||||
void preserve_attributes(std::unordered_map<std::string, attribute_op> const *attribute_accum, const serial_feature &sf, serial_feature &p) {
|
void preserve_attributes(std::unordered_map<std::string, attribute_op> const *attribute_accum, const serial_feature &sf, serial_feature &p) {
|
||||||
for (size_t i = 0; i < sf.keys.size(); i++) {
|
for (size_t i = 0; i < sf.keys.size(); i++) {
|
||||||
std::string key = sf.stringpool + sf.keys[i] + 1;
|
std::string key = sf.stringpool + sf.keys[i] + 1;
|
||||||
|
int type = sf.stringpool[sf.values[i]];
|
||||||
|
|
||||||
auto f = attribute_accum->find(key);
|
auto f = attribute_accum->find(key);
|
||||||
if (f != attribute_accum->end()) {
|
if (f != attribute_accum->end()) {
|
||||||
@@ -1411,17 +1477,34 @@ void preserve_attributes(std::unordered_map<std::string, attribute_op> const *at
|
|||||||
|
|
||||||
promote_attribute(key, p);
|
promote_attribute(key, p);
|
||||||
preserve_attribute(f->second, key, sv, p.full_keys, p.full_values, p.attribute_accum_state);
|
preserve_attribute(f->second, key, sv, p.full_keys, p.full_values, p.attribute_accum_state);
|
||||||
|
} else if (type == mvt_double && additional[A_ACCUMULATE_NUMERIC]) {
|
||||||
|
for (auto const &operation : numeric_operations) {
|
||||||
|
serial_val sv;
|
||||||
|
sv.type = sf.stringpool[sf.values[i]];
|
||||||
|
sv.s = sf.stringpool + sf.values[i] + 1;
|
||||||
|
|
||||||
|
std::string prefixed_key = "tippecanoe:" + operation.first + ":" + key;
|
||||||
|
promote_attribute_prefix(key, prefixed_key, p);
|
||||||
|
preserve_attribute(operation.second, prefixed_key, sv, p.full_keys, p.full_values, p.attribute_accum_state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (size_t i = 0; i < sf.full_keys.size(); i++) {
|
for (size_t i = 0; i < sf.full_keys.size(); i++) {
|
||||||
const std::string &key = sf.full_keys[i];
|
const std::string &key = sf.full_keys[i];
|
||||||
|
int type = sf.full_values[i].type;
|
||||||
|
|
||||||
auto f = attribute_accum->find(key);
|
auto f = attribute_accum->find(key);
|
||||||
if (f != attribute_accum->end()) {
|
if (f != attribute_accum->end()) {
|
||||||
const serial_val &sv = sf.full_values[i];
|
const serial_val &sv = sf.full_values[i];
|
||||||
|
|
||||||
promote_attribute(key, p);
|
promote_attribute(key, p); // promotes it in the target feature
|
||||||
preserve_attribute(f->second, key, sv, p.full_keys, p.full_values, p.attribute_accum_state);
|
preserve_attribute(f->second, key, sv, p.full_keys, p.full_values, p.attribute_accum_state);
|
||||||
|
} else if (type == mvt_double && additional[A_ACCUMULATE_NUMERIC]) {
|
||||||
|
for (auto const &operation : numeric_operations) {
|
||||||
|
std::string prefixed_key = "tippecanoe:" + operation.first + ":" + key;
|
||||||
|
promote_attribute_prefix(key, prefixed_key, p);
|
||||||
|
preserve_attribute(operation.second, prefixed_key, sf.full_values[i], p.full_keys, p.full_values, p.attribute_accum_state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
#include "text.hpp"
|
#include "text.hpp"
|
||||||
#include "sort.hpp"
|
#include "sort.hpp"
|
||||||
#include "tile-cache.hpp"
|
#include "tile-cache.hpp"
|
||||||
|
#include "mvt.hpp"
|
||||||
|
#include "projection.hpp"
|
||||||
|
#include "geometry.hpp"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
@@ -124,3 +127,28 @@ TEST_CASE("Bit reversal", "bit reversal") {
|
|||||||
REQUIRE(bit_reverse(0x1234567812489BCF) == 0xF3D912481E6A2C48);
|
REQUIRE(bit_reverse(0x1234567812489BCF) == 0xF3D912481E6A2C48);
|
||||||
REQUIRE(bit_reverse(0xF3D912481E6A2C48) == 0x1234567812489BCF);
|
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
@@ -1,6 +1,6 @@
|
|||||||
#ifndef VERSION_HPP
|
#ifndef VERSION_HPP
|
||||||
#define VERSION_HPP
|
#define VERSION_HPP
|
||||||
|
|
||||||
#define VERSION "v2.60.0"
|
#define VERSION "v2.61.0"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user