Merge branch 'master' into inline-meta2

Conflicts:
	tile.cpp
This commit is contained in:
Eric Fischer 2016-05-23 15:57:28 -07:00
commit 4638c6f273
17 changed files with 942 additions and 939 deletions

View File

@ -1,3 +1,12 @@
## 1.11.6
* Reduce the size of critical data structures to reduce dynamic memory use
## 1.11.5
* Let zoom level 0 have just as much extent and buffer as any other zoom
* Fix tippecanoe-decode bug that would sometimes show outer rings as inner
## 1.11.4
* Don't let polygons with nonzero area disappear during cleaning

View File

@ -33,11 +33,15 @@ struct lonlat {
int op;
double lon;
double lat;
int x;
int y;
lonlat(int nop, double nlon, double nlat) {
lonlat(int nop, double nlon, double nlat, int nx, int ny) {
this->op = nop;
this->lon = nlon;
this->lat = nlat;
this->x = nx;
this->y = ny;
}
};
@ -156,9 +160,9 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe) {
double lat, lon;
tile2latlon(wx, wy, 32, &lat, &lon);
ops.push_back(lonlat(op, lon, lat));
ops.push_back(lonlat(op, lon, lat, px, py));
} else {
ops.push_back(lonlat(op, 0, 0));
ops.push_back(lonlat(op, 0, 0, 0, 0));
}
}
@ -223,23 +227,27 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe) {
int n = rings.size() - 1;
if (n >= 0) {
rings[n].push_back(ops[i]);
if (ops[i].op == VT_CLOSEPATH) {
rings[n].push_back(rings[n][0]);
} else {
rings[n].push_back(ops[i]);
}
}
}
int outer = 0;
for (size_t i = 0; i < rings.size(); i++) {
double area = 0;
long double area = 0;
for (size_t k = 0; k < rings[i].size(); k++) {
if (rings[i][k].op != VT_CLOSEPATH) {
area += rings[i][k].lon * rings[i][(k + 1) % rings[i].size()].lat;
area -= rings[i][k].lat * rings[i][(k + 1) % rings[i].size()].lon;
area += rings[i][k].x * rings[i][(k + 1) % rings[i].size()].y;
area -= rings[i][k].y * rings[i][(k + 1) % rings[i].size()].x;
}
}
areas[i] = area;
if (areas[i] <= 0 || i == 0) {
if (areas[i] >= 0 || i == 0) {
outer++;
}
@ -254,7 +262,7 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe) {
int state = 0;
for (size_t i = 0; i < rings.size(); i++) {
if (areas[i] <= 0) {
if (areas[i] >= 0) {
if (state != 0) {
// new multipolygon
printf(" ] ], [ [ ");

View File

@ -450,10 +450,7 @@ drawvec clean_or_clip_poly(drawvec &geom, int z, int detail, int buffer, bool cl
}
if (clip) {
long long area = 0xFFFFFFFF;
if (z != 0) {
area = 1LL << (32 - z);
}
long long area = 1LL << (32 - z);
long long clip_buffer = buffer * area / 256;
ClipperLib::Path edge;
@ -770,11 +767,7 @@ drawvec simple_clip_poly(drawvec &geom, long long minx, long long miny, long lon
}
drawvec simple_clip_poly(drawvec &geom, int z, int detail, int buffer) {
long long area = 0xFFFFFFFF;
if (z != 0) {
area = 1LL << (32 - z);
}
long long area = 1LL << (32 - z);
long long clip_buffer = buffer * area / 256;
return simple_clip_poly(geom, -clip_buffer, -clip_buffer, area + clip_buffer, area + clip_buffer);
@ -863,13 +856,10 @@ drawvec clip_point(drawvec &geom, int z, int detail, long long buffer) {
drawvec out;
long long min = 0;
long long area = 0xFFFFFFFF;
if (z != 0) {
area = 1LL << (32 - z);
long long area = 1LL << (32 - z);
min -= buffer * area / 256;
area += buffer * area / 256;
}
min -= buffer * area / 256;
area += buffer * area / 256;
for (size_t i = 0; i < geom.size(); i++) {
if (geom[i].x >= min && geom[i].y >= min && geom[i].x <= area && geom[i].y <= area) {
@ -882,13 +872,10 @@ drawvec clip_point(drawvec &geom, int z, int detail, long long buffer) {
int quick_check(long long *bbox, int z, int detail, long long buffer) {
long long min = 0;
long long area = 0xFFFFFFFF;
if (z != 0) {
area = 1LL << (32 - z);
long long area = 1LL << (32 - z);
min -= buffer * area / 256;
area += buffer * area / 256;
}
min -= buffer * area / 256;
area += buffer * area / 256;
// bbox entirely outside the tile
if (bbox[0] > area || bbox[1] > area) {
@ -920,13 +907,9 @@ drawvec clip_lines(drawvec &geom, int z, int detail, long long buffer) {
drawvec out;
long long min = 0;
long long area = 0xFFFFFFFF;
if (z != 0) {
area = 1LL << (32 - z);
min -= buffer * area / 256;
area += buffer * area / 256;
}
long long area = 1LL << (32 - z);
min -= buffer * area / 256;
area += buffer * area / 256;
for (size_t i = 0; i < geom.size(); i++) {
if (i > 0 && (geom[i - 1].op == VT_MOVETO || geom[i - 1].op == VT_LINETO) && geom[i].op == VT_LINETO) {
@ -1070,10 +1053,7 @@ drawvec impose_tile_boundaries(drawvec &geom, long long extent) {
drawvec simplify_lines(drawvec &geom, int z, int detail, bool mark_tile_bounds) {
int res = 1 << (32 - detail - z);
long long area = 0xFFFFFFFF;
if (z != 0) {
area = 1LL << (32 - z);
}
long long area = 1LL << (32 - z);
for (size_t i = 0; i < geom.size(); i++) {
if (geom[i].op == VT_MOVETO) {

View File

@ -11,11 +11,14 @@
#define VT_NUMBER 2
#define VT_BOOLEAN 7
// The bitfield is to make sizeof(draw) be 16 instead of 24
// at the cost, apparently, of a 0.7% increase in running time
// for packing and unpacking.
struct draw {
long long x : 40;
signed char op;
long long x;
long long y;
int necessary;
long long y : 40;
signed char necessary;
draw(int nop, long long nx, long long ny) {
this->op = nop;

View File

@ -8,9 +8,9 @@ enum mvt_operation {
};
struct mvt_geometry {
int x;
int y;
int /* mvt_operation */ op;
long long x;
long long y;
mvt_geometry(int op, long long x, long long y);
};
@ -23,8 +23,8 @@ enum mvt_geometry_type {
struct mvt_feature {
std::vector<unsigned> tags;
int /* mvt_geometry_type */ type;
std::vector<mvt_geometry> geometry;
int /* mvt_geometry_type */ type;
};
enum mvt_value_type {

View File

@ -12,7 +12,7 @@
}, "features": [
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27.00000000,27,1.4e27,{\"foo\":\"bar\"}]", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→", "prêt": "ready" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -177.539062, 44.339565 ], [ -164.882812, 43.389082 ], [ -153.281250, 46.619261 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.183902 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.510643 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.689872 ], [ -185.976562, 58.859224 ], [ -187.031250, 56.992883 ], [ -187.031250, 65.730626 ], [ -182.460938, 67.339861 ], [ -180.000000, 67.542167 ], [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.616870 ], [ -169.453125, 34.957995 ], [ -180.000000, 36.527295 ], [ -184.218750, 37.160317 ], [ -187.031250, 38.891033 ], [ -187.031250, 50.457504 ], [ -185.976562, 47.279229 ], [ -177.539062, 44.339565 ] ], [ [ 186.943359, 35.460670 ], [ 179.912109, 36.527295 ], [ 175.781250, 37.160317 ], [ 161.718750, 45.336702 ], [ 156.796875, 55.028022 ], [ 163.476562, 62.431074 ], [ 170.507812, 64.811557 ], [ 177.539062, 67.339861 ], [ 179.912109, 67.542167 ], [ 186.943359, 68.007571 ], [ 186.943359, 63.743631 ], [ 182.109375, 62.593341 ], [ 179.912109, 61.689872 ], [ 174.023438, 58.859224 ], [ 171.562500, 54.418930 ], [ 174.023438, 47.279229 ], [ 179.912109, 45.274886 ], [ 182.460938, 44.339565 ], [ 186.943359, 44.024422 ], [ 186.943359, 35.460670 ] ] ] } }
{ "type": "Feature", "properties": { "boolean": true, "otherboolean": false, "stringify": "[\"yes\",27.00000000,27,1.4e27,{\"foo\":\"bar\"}]", "escape": "foo\u0001bar,ü\"\\/\u0008\u000c\u000a\u000d\u0009→", "prêt": "ready" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -177.539062, 44.339565 ], [ -164.882812, 43.389082 ], [ -153.281250, 46.619261 ], [ -144.492188, 51.179343 ], [ -143.789062, 57.183902 ], [ -148.007812, 61.100789 ], [ -158.554688, 63.860036 ], [ -169.453125, 64.510643 ], [ -177.890625, 62.593341 ], [ -180.000000, 61.689872 ], [ -185.976562, 58.859224 ], [ -187.031250, 56.992883 ], [ -187.031250, 65.730626 ], [ -182.460938, 67.339861 ], [ -180.000000, 67.542167 ], [ -169.101562, 68.269387 ], [ -156.093750, 68.138852 ], [ -144.492188, 66.089364 ], [ -134.648438, 62.431074 ], [ -131.835938, 55.379110 ], [ -133.593750, 48.690960 ], [ -146.250000, 38.616870 ], [ -169.453125, 34.957995 ], [ -180.000000, 36.527295 ], [ -184.218750, 37.160317 ], [ -187.031250, 38.891033 ], [ -187.031250, 50.457504 ], [ -185.976562, 47.279229 ], [ -177.539062, 44.339565 ] ] ], [ [ [ 187.031250, 35.460670 ], [ 175.781250, 37.160317 ], [ 161.718750, 45.336702 ], [ 156.796875, 55.028022 ], [ 163.476562, 62.431074 ], [ 170.507812, 64.811557 ], [ 177.539062, 67.339861 ], [ 180.000000, 67.542167 ], [ 187.031250, 68.007571 ], [ 187.031250, 63.743631 ], [ 182.109375, 62.593341 ], [ 180.000000, 61.689872 ], [ 174.023438, 58.859224 ], [ 171.562500, 54.418930 ], [ 174.023438, 47.279229 ], [ 182.460938, 44.339565 ], [ 187.031250, 44.024422 ], [ 187.031250, 35.460670 ] ] ] ] } }
,
{ "type": "Feature", "properties": { "zoom": "z0-2" }, "geometry": { "type": "LineString", "coordinates": [ [ -112.851562, 55.178868 ], [ -117.773438, 44.590467 ], [ -104.414062, 51.179343 ] ] } }
] }

View File

@ -974,7 +974,7 @@
{ "type": "FeatureCollection", "properties": { "layer": "tabblock_06001420" }, "features": [
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420300", "BLOCKCE10": "3008", "NAME10": "Block 3008", "MTFCC10": "G5040", "UR10": "R", "FUNCSTAT10": "S", "ALAND10": 0, "AWATER10": 1111196, "INTPTLAT10": "+37.8928912", "INTPTLON10": "-122.3202957" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.312679, 37.897072 ], [ -122.311649, 37.896937 ], [ -122.311649, 37.896260 ], [ -122.311134, 37.896124 ], [ -122.311306, 37.895853 ], [ -122.310791, 37.895582 ], [ -122.310276, 37.894769 ], [ -122.309246, 37.892331 ], [ -122.309418, 37.889757 ], [ -122.309933, 37.888809 ], [ -122.310963, 37.889757 ], [ -122.311134, 37.890299 ], [ -122.311478, 37.890028 ], [ -122.312851, 37.891247 ], [ -122.313709, 37.891925 ], [ -122.314396, 37.892060 ], [ -122.314739, 37.892466 ], [ -122.314568, 37.891925 ], [ -122.315941, 37.891925 ], [ -122.316113, 37.891247 ], [ -122.317657, 37.890976 ], [ -122.319889, 37.890028 ], [ -122.322807, 37.890028 ], [ -122.324009, 37.892466 ], [ -122.325726, 37.892602 ], [ -122.325897, 37.892331 ], [ -122.325554, 37.892060 ], [ -122.325726, 37.890841 ], [ -122.327442, 37.890841 ], [ -122.327442, 37.891518 ], [ -122.327614, 37.891518 ], [ -122.327614, 37.889757 ], [ -122.334824, 37.889622 ], [ -122.333450, 37.892873 ], [ -122.312508, 37.897479 ], [ -122.312679, 37.897072 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420300", "BLOCKCE10": "3009", "NAME10": "Block 3009", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 265574, "AWATER10": 0, "INTPTLAT10": "+37.8905867", "INTPTLON10": "-122.3181131" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.310104, 37.894769 ], [ -122.309246, 37.893144 ], [ -122.308903, 37.890570 ], [ -122.309074, 37.888809 ], [ -122.309246, 37.887860 ], [ -122.311306, 37.889486 ], [ -122.327614, 37.889757 ], [ -122.327614, 37.891518 ], [ -122.327442, 37.891518 ], [ -122.327442, 37.890841 ], [ -122.325897, 37.890841 ], [ -122.325554, 37.891518 ], [ -122.325897, 37.892602 ], [ -122.324009, 37.892466 ], [ -122.322807, 37.890028 ], [ -122.319889, 37.890028 ], [ -122.317657, 37.890976 ], [ -122.316113, 37.891247 ], [ -122.315941, 37.891925 ], [ -122.314568, 37.891925 ], [ -122.314739, 37.892466 ], [ -122.314396, 37.892060 ], [ -122.313709, 37.891925 ], [ -122.312851, 37.891247 ], [ -122.311478, 37.890028 ], [ -122.311134, 37.890299 ], [ -122.310963, 37.889757 ], [ -122.309933, 37.888809 ], [ -122.309418, 37.889757 ], [ -122.309246, 37.892331 ], [ -122.310276, 37.894769 ], [ -122.310791, 37.895582 ], [ -122.310104, 37.894769 ] ], [ [ -122.311134, 37.896124 ], [ -122.310791, 37.895582 ], [ -122.311306, 37.895853 ], [ -122.311134, 37.896124 ] ], [ [ -122.311649, 37.896801 ], [ -122.311134, 37.896124 ], [ -122.311649, 37.896260 ], [ -122.311649, 37.896801 ] ] ] } }
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420300", "BLOCKCE10": "3009", "NAME10": "Block 3009", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 265574, "AWATER10": 0, "INTPTLAT10": "+37.8905867", "INTPTLON10": "-122.3181131" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.310104, 37.894769 ], [ -122.309246, 37.893144 ], [ -122.308903, 37.890570 ], [ -122.309074, 37.888809 ], [ -122.309246, 37.887860 ], [ -122.311306, 37.889486 ], [ -122.327614, 37.889757 ], [ -122.327614, 37.891518 ], [ -122.327442, 37.891518 ], [ -122.327442, 37.890841 ], [ -122.325897, 37.890841 ], [ -122.325554, 37.891518 ], [ -122.325897, 37.892602 ], [ -122.324009, 37.892466 ], [ -122.322807, 37.890028 ], [ -122.319889, 37.890028 ], [ -122.317657, 37.890976 ], [ -122.316113, 37.891247 ], [ -122.315941, 37.891925 ], [ -122.314568, 37.891925 ], [ -122.314739, 37.892466 ], [ -122.314396, 37.892060 ], [ -122.313709, 37.891925 ], [ -122.312851, 37.891247 ], [ -122.311478, 37.890028 ], [ -122.311134, 37.890299 ], [ -122.310963, 37.889757 ], [ -122.309933, 37.888809 ], [ -122.309418, 37.889757 ], [ -122.309246, 37.892331 ], [ -122.310276, 37.894769 ], [ -122.310791, 37.895582 ], [ -122.310104, 37.894769 ] ] ], [ [ [ -122.311134, 37.896124 ], [ -122.310791, 37.895582 ], [ -122.311306, 37.895853 ], [ -122.311134, 37.896124 ] ] ], [ [ [ -122.311649, 37.896801 ], [ -122.311134, 37.896124 ], [ -122.311649, 37.896260 ], [ -122.311649, 37.896801 ] ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420300", "BLOCKCE10": "3007", "NAME10": "Block 3007", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 3648, "AWATER10": 0, "INTPTLAT10": "+37.8971393", "INTPTLON10": "-122.3121267" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.311649, 37.896937 ], [ -122.312508, 37.896937 ], [ -122.312508, 37.897479 ], [ -122.312164, 37.897479 ], [ -122.311649, 37.896937 ] ] ] } }
,
@ -1458,7 +1458,7 @@
{ "type": "FeatureCollection", "properties": { "layer": "tabblock_06001420" }, "features": [
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420300", "BLOCKCE10": "3008", "NAME10": "Block 3008", "MTFCC10": "G5040", "UR10": "R", "FUNCSTAT10": "S", "ALAND10": 0, "AWATER10": 1111196, "INTPTLAT10": "+37.8928912", "INTPTLON10": "-122.3202957" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.312593, 37.897072 ], [ -122.311649, 37.896869 ], [ -122.311563, 37.896192 ], [ -122.311134, 37.896056 ], [ -122.311306, 37.895785 ], [ -122.311134, 37.895582 ], [ -122.310705, 37.895514 ], [ -122.310619, 37.895108 ], [ -122.310190, 37.894769 ], [ -122.309504, 37.893482 ], [ -122.309160, 37.892263 ], [ -122.309074, 37.891315 ], [ -122.309332, 37.889757 ], [ -122.309504, 37.889147 ], [ -122.309847, 37.888809 ], [ -122.310104, 37.888944 ], [ -122.310190, 37.889147 ], [ -122.310877, 37.889757 ], [ -122.311049, 37.890231 ], [ -122.311134, 37.890299 ], [ -122.311220, 37.889960 ], [ -122.311392, 37.889960 ], [ -122.311735, 37.890434 ], [ -122.312765, 37.891247 ], [ -122.313709, 37.891925 ], [ -122.314310, 37.891992 ], [ -122.314739, 37.892466 ], [ -122.314825, 37.892466 ], [ -122.314568, 37.891925 ], [ -122.315941, 37.891925 ], [ -122.316027, 37.891180 ], [ -122.317657, 37.890976 ], [ -122.319889, 37.889960 ], [ -122.322721, 37.890028 ], [ -122.323151, 37.891044 ], [ -122.324009, 37.892399 ], [ -122.325726, 37.892534 ], [ -122.325897, 37.892331 ], [ -122.325554, 37.892060 ], [ -122.325640, 37.890841 ], [ -122.327356, 37.890841 ], [ -122.327442, 37.891518 ], [ -122.327528, 37.891586 ], [ -122.327614, 37.891450 ], [ -122.327700, 37.890231 ], [ -122.327614, 37.889689 ], [ -122.334738, 37.889622 ], [ -122.333450, 37.892805 ], [ -122.312508, 37.897479 ], [ -122.312593, 37.897072 ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420300", "BLOCKCE10": "3009", "NAME10": "Block 3009", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 265574, "AWATER10": 0, "INTPTLAT10": "+37.8905867", "INTPTLON10": "-122.3181131" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.308903, 37.890502 ], [ -122.308989, 37.888809 ], [ -122.309246, 37.887860 ], [ -122.309847, 37.888131 ], [ -122.311306, 37.889486 ], [ -122.315598, 37.889689 ], [ -122.315855, 37.889554 ], [ -122.327614, 37.889689 ], [ -122.327614, 37.891450 ], [ -122.327528, 37.891586 ], [ -122.327442, 37.891518 ], [ -122.327356, 37.890841 ], [ -122.325811, 37.890841 ], [ -122.325640, 37.890976 ], [ -122.325554, 37.891518 ], [ -122.325554, 37.892060 ], [ -122.325897, 37.892331 ], [ -122.325897, 37.892534 ], [ -122.324009, 37.892399 ], [ -122.323151, 37.891044 ], [ -122.322721, 37.890028 ], [ -122.319889, 37.889960 ], [ -122.317657, 37.890976 ], [ -122.316027, 37.891180 ], [ -122.315941, 37.891925 ], [ -122.314568, 37.891925 ], [ -122.314825, 37.892466 ], [ -122.314739, 37.892466 ], [ -122.314310, 37.891992 ], [ -122.313709, 37.891925 ], [ -122.312765, 37.891247 ], [ -122.311735, 37.890434 ], [ -122.311392, 37.889960 ], [ -122.311220, 37.889960 ], [ -122.311134, 37.890299 ], [ -122.311049, 37.890231 ], [ -122.310877, 37.889757 ], [ -122.310190, 37.889147 ], [ -122.310104, 37.888944 ], [ -122.309847, 37.888809 ], [ -122.309504, 37.889147 ], [ -122.309332, 37.889757 ], [ -122.309074, 37.891315 ], [ -122.309074, 37.891518 ], [ -122.308903, 37.890502 ] ], [ [ -122.310190, 37.894769 ], [ -122.310619, 37.895108 ], [ -122.310705, 37.895514 ], [ -122.311134, 37.895582 ], [ -122.311306, 37.895785 ], [ -122.311134, 37.896056 ], [ -122.311563, 37.896192 ], [ -122.311563, 37.896734 ], [ -122.310705, 37.895785 ], [ -122.310019, 37.894769 ], [ -122.309246, 37.893076 ], [ -122.309160, 37.892399 ], [ -122.309504, 37.893482 ], [ -122.310190, 37.894769 ] ] ] } }
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420300", "BLOCKCE10": "3009", "NAME10": "Block 3009", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 265574, "AWATER10": 0, "INTPTLAT10": "+37.8905867", "INTPTLON10": "-122.3181131" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.308903, 37.890502 ], [ -122.308989, 37.888809 ], [ -122.309246, 37.887860 ], [ -122.309847, 37.888131 ], [ -122.311306, 37.889486 ], [ -122.315598, 37.889689 ], [ -122.315855, 37.889554 ], [ -122.327614, 37.889689 ], [ -122.327614, 37.891450 ], [ -122.327528, 37.891586 ], [ -122.327442, 37.891518 ], [ -122.327356, 37.890841 ], [ -122.325811, 37.890841 ], [ -122.325640, 37.890976 ], [ -122.325554, 37.891518 ], [ -122.325554, 37.892060 ], [ -122.325897, 37.892331 ], [ -122.325897, 37.892534 ], [ -122.324009, 37.892399 ], [ -122.323151, 37.891044 ], [ -122.322721, 37.890028 ], [ -122.319889, 37.889960 ], [ -122.317657, 37.890976 ], [ -122.316027, 37.891180 ], [ -122.315941, 37.891925 ], [ -122.314568, 37.891925 ], [ -122.314825, 37.892466 ], [ -122.314739, 37.892466 ], [ -122.314310, 37.891992 ], [ -122.313709, 37.891925 ], [ -122.312765, 37.891247 ], [ -122.311735, 37.890434 ], [ -122.311392, 37.889960 ], [ -122.311220, 37.889960 ], [ -122.311134, 37.890299 ], [ -122.311049, 37.890231 ], [ -122.310877, 37.889757 ], [ -122.310190, 37.889147 ], [ -122.310104, 37.888944 ], [ -122.309847, 37.888809 ], [ -122.309504, 37.889147 ], [ -122.309332, 37.889757 ], [ -122.309074, 37.891315 ], [ -122.309074, 37.891518 ], [ -122.308903, 37.890502 ] ] ], [ [ [ -122.310190, 37.894769 ], [ -122.310619, 37.895108 ], [ -122.310705, 37.895514 ], [ -122.311134, 37.895582 ], [ -122.311306, 37.895785 ], [ -122.311134, 37.896056 ], [ -122.311563, 37.896192 ], [ -122.311563, 37.896734 ], [ -122.310705, 37.895785 ], [ -122.310019, 37.894769 ], [ -122.309246, 37.893076 ], [ -122.309160, 37.892399 ], [ -122.309504, 37.893482 ], [ -122.310190, 37.894769 ] ] ] ] } }
,
{ "type": "Feature", "properties": { "STATEFP10": "06", "COUNTYFP10": "001", "TRACTCE10": "420300", "BLOCKCE10": "3007", "NAME10": "Block 3007", "MTFCC10": "G5040", "UR10": "U", "UACE10": "78904", "UATYP10": "U", "FUNCSTAT10": "S", "ALAND10": 3648, "AWATER10": 0, "INTPTLAT10": "+37.8971393", "INTPTLON10": "-122.3121267" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.311649, 37.896869 ], [ -122.312508, 37.896937 ], [ -122.312593, 37.897140 ], [ -122.312508, 37.897479 ], [ -122.312078, 37.897479 ], [ -122.311649, 37.896869 ] ] ] } }
,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -62,17 +62,17 @@ int coalindexcmp(const struct coalesce *c1, const struct coalesce *c2);
static int is_integer(const char *s, long long *v);
struct coalesce {
int type;
drawvec geom;
int m;
char *meta;
char *stringpool;
unsigned long long index;
unsigned long long index2;
bool coalesced;
long long original_seq;
std::vector<long long> keys;
std::vector<long long> values;
drawvec geom;
unsigned long long index;
unsigned long long index2;
long long original_seq;
int type;
int m;
bool coalesced;
bool operator<(const coalesce &o) const {
int cmp = coalindexcmp(this, &o);
@ -374,22 +374,22 @@ void rewrite(drawvec &geom, int z, int nextzoom, int maxzoom, long long *bbox, u
struct partial {
std::vector<drawvec> geoms;
long long layer;
int m;
char *meta;
signed char t;
int segment;
long long original_seq;
bool reduced;
unsigned long long index;
unsigned long long index2;
int z;
int line_detail;
int *prevent;
int *additional;
int maxzoom;
std::vector<long long> keys;
std::vector<long long> values;
char *meta;
int *prevent;
int *additional;
long long layer;
long long original_seq;
unsigned long long index;
unsigned long long index2;
int m;
int segment;
bool reduced;
int z;
int line_detail;
int maxzoom;
signed char t;
};
struct partial_arg {
@ -883,8 +883,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
}
for (size_t i = 0; i < partials.size(); i++) {
std::vector<drawvec> pgeoms = partials[i].geoms;
partials[i].geoms.clear(); // avoid keeping two copies in memory
std::vector<drawvec> &pgeoms = partials[i].geoms;
long long layer = partials[i].layer;
signed char t = partials[i].t;
long long original_seq = partials[i].original_seq;
@ -899,6 +898,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
c.index = partials[i].index;
c.index2 = partials[i].index2;
c.geom = pgeoms[j];
pgeoms[j].clear();
c.coalesced = false;
c.original_seq = original_seq;
c.m = partials[i].m;
@ -912,6 +912,8 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
}
}
partials.clear();
int j;
for (j = 0; j < child_shards; j++) {
if (within[j]) {
@ -996,6 +998,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
feature.type = features[k][x].type;
feature.geometry = to_feature(features[k][x].geom);
count += features[k][x].geom.size();
features[k][x].geom.clear();
decode_meta(features[k][x].m, features[k][x].keys, features[k][x].values, features[k][x].stringpool, layer, feature);
layer.features.push_back(feature);

View File

@ -1 +1 @@
#define VERSION "tippecanoe v1.11.4\n"
#define VERSION "tippecanoe v1.11.6\n"