Merge branch 'master' into geobuf

This commit is contained in:
Eric Fischer 2017-08-22 16:21:03 -07:00
commit f0b32cf710
16 changed files with 6012 additions and 92 deletions

View File

@ -1,3 +1,13 @@
## 1.22.2
* Add better diagnostics for NaN or Infinity in input JSON
## 1.22.1
* Fix tilestats generation when long string attribute values are elided
* Add option not to produce tilestats
* Add tile-join options to select zoom levels to copy
## 1.22.0
* Add options to filter each tile's contents through a shell pipeline

View File

@ -147,16 +147,23 @@ join-test:
./tippecanoe -f -z12 -o tests/join-population/tabblock_06001420.mbtiles tests/join-population/tabblock_06001420.json
./tippecanoe -f -z12 -o tests/join-population/tabblock_06001420.mbtiles tests/join-population/tabblock_06001420.json
./tippecanoe -f -Z5 -z10 -o tests/join-population/macarthur.mbtiles -l macarthur tests/join-population/macarthur.json
./tile-join -f -Z6 -z9 -o tests/join-population/macarthur-6-9.mbtiles tests/join-population/macarthur.mbtiles
./tippecanoe-decode tests/join-population/macarthur-6-9.mbtiles > tests/join-population/macarthur-6-9.mbtiles.json.check
cmp tests/join-population/macarthur-6-9.mbtiles.json.check tests/join-population/macarthur-6-9.mbtiles.json
rm -f tests/join-population/macarthur-6-9.mbtiles.json.check tests/join-population/macarthur-6-9.mbtiles
./tippecanoe -f -d10 -D10 -Z9 -z11 -o tests/join-population/macarthur2.mbtiles -l macarthur tests/join-population/macarthur2.json
./tile-join --quiet --force -o tests/join-population/joined.mbtiles -x GEOID10 -c tests/join-population/population.csv tests/join-population/tabblock_06001420.mbtiles
./tile-join --quiet --force --no-tile-stats -o tests/join-population/joined-no-tile-stats.mbtiles -x GEOID10 -c tests/join-population/population.csv tests/join-population/tabblock_06001420.mbtiles
./tile-join -f -i -o tests/join-population/joined-i.mbtiles -x GEOID10 -c tests/join-population/population.csv tests/join-population/tabblock_06001420.mbtiles
./tile-join -f -o tests/join-population/merged.mbtiles tests/join-population/tabblock_06001420.mbtiles tests/join-population/macarthur.mbtiles tests/join-population/macarthur2.mbtiles
./tile-join -f -c tests/join-population/windows.csv -o tests/join-population/windows.mbtiles tests/join-population/macarthur.mbtiles
./tippecanoe-decode --maximum-zoom=11 --minimum-zoom=4 tests/join-population/joined.mbtiles > tests/join-population/joined.mbtiles.json.check
./tippecanoe-decode --maximum-zoom=11 --minimum-zoom=4 tests/join-population/joined-no-tile-stats.mbtiles > tests/join-population/joined-no-tile-stats.mbtiles.json.check
./tippecanoe-decode tests/join-population/joined-i.mbtiles > tests/join-population/joined-i.mbtiles.json.check
./tippecanoe-decode tests/join-population/merged.mbtiles > tests/join-population/merged.mbtiles.json.check
./tippecanoe-decode tests/join-population/windows.mbtiles > tests/join-population/windows.mbtiles.json.check
cmp tests/join-population/joined.mbtiles.json.check tests/join-population/joined.mbtiles.json
cmp tests/join-population/joined-no-tile-stats.mbtiles.json.check tests/join-population/joined-no-tile-stats.mbtiles.json
cmp tests/join-population/joined-i.mbtiles.json.check tests/join-population/joined-i.mbtiles.json
cmp tests/join-population/merged.mbtiles.json.check tests/join-population/merged.mbtiles.json
cmp tests/join-population/windows.mbtiles.json.check tests/join-population/windows.mbtiles.json

View File

@ -225,6 +225,7 @@ resolution is obtained than by using a smaller _maxzoom_ or _detail_.
* `-pf` or `--no-feature-limit`: Don't limit tiles to 200,000 features
* `-pk` or `--no-tile-size-limit`: Don't limit tiles to 500K bytes
* `-pC` or `--no-tile-compression`: Don't compress the PBF vector tile data.
* `-pg` or `--no-tile-stats`: Don't generate the `tilestats` row in the tileset metadata. Uploads without [tilestats](https://github.com/mapbox/mapbox-geostats) will take longer to process.
### Temporary storage
@ -440,35 +441,54 @@ The name is [a joking reference](http://en.wikipedia.org/wiki/Tippecanoe_and_Tyl
tile-join
=========
Tile-join is a tool for joining new attributes from a CSV file to features
that have already been tiled with tippecanoe. It reads the tiles from an
Tile-join is a tool for copying and merging vector mbtiles files and for
joining new attributes from a CSV file to existing features in them.
It reads the tiles from an
existing .mbtiles file or a directory of tiles, matches them against the
records of the CSV, and writes out a new tileset.
records of the CSV (if one is specified), and writes out a new tileset.
If you specify multiple source mbtiles files or source directories of tiles,
all the sources are read and their combined contents are written to the new
mbtiles output. If they define the same layers or the same tiles, the layers
or tiles are merged.
You can use the `-e` flag to output a directory of tiles rather than a
.mbtiles file.
The options are:
### Output tileset
* `-o` *out.mbtiles* or `--output=`*out.mbtiles*: Write the new tiles to the specified .mbtiles file.
* `-e` *directory* or `--output-to-directory=`*directory*: Write the new tiles to the specified directory instead of to an mbtiles file.
* `-f` or `--force`: Remove *out.mbtiles* if it already exists.
* `-c` *match*`.csv` or `--csv=`*match*`.csv`: Use *match*`.csv` as the source for new attributes to join to the features. The first line of the file should be the key names; the other lines are values. The first column is the one to match against the existing features; the other columns are the new data to add.
* `-x` *key* or `--exclude=`*key*: Remove attributes of type *key* from the output. You can use this to remove the field you are matching against if you no longer need it after joining, or to remove any other attributes you don't want.
* `-i` or `--if-matched`: Only include features that matched the CSV.
* `-pk` or `--no-tile-size-limit`: Don't skip tiles larger than 500K.
* `-pC` or `--no-tile-compression`: Don't compress the PBF vector tile data.
### Tileset description and attribution
* `-l` *layer* or `--layer=`*layer*: Include the named layer in the output. You can specify multiple `-l` options to keep multiple layers. If you don't specify, they will all be retained.
* `-L` *layer* or `--exclude-layer=`*layer*: Remove the named layer from the output. You can specify multiple `-L` options to remove multiple layers.
* `-A` *attribution* or `--attribution=`*attribution*: Set the attribution string.
* `-n` *name* or `--name=`*name*: Set the tileset name.
* `-N` *description* or `--description=`*description*: Set the tileset description.
### Zoom levels
* `-z` _zoom_ or `--maximum-zoom=`_zoom_: Don't copy tiles from higher zoom levels than the specified zoom
* `-Z` _zoom_ or `--minimum-zoom=`_zoom_: Don't copy tiles from lower zoom levels than the specified zoom
### Merging attributes from a CSV file
* `-c` *match*`.csv` or `--csv=`*match*`.csv`: Use *match*`.csv` as the source for new attributes to join to the features. The first line of the file should be the key names; the other lines are values. The first column is the one to match against the existing features; the other columns are the new data to add.
### Filtering features and feature attributes
* `-x` *key* or `--exclude=`*key*: Remove attributes of type *key* from the output. You can use this to remove the field you are matching against if you no longer need it after joining, or to remove any other attributes you don't want.
* `-i` or `--if-matched`: Only include features that matched the CSV.
### Setting or disabling tile size limits
* `-pk` or `--no-tile-size-limit`: Don't skip tiles larger than 500K.
* `-pC` or `--no-tile-compression`: Don't compress the PBF vector tile data.
* `-pg` or `--no-tile-stats`: Don't generate the `tilestats` row in the tileset metadata. Uploads without [tilestats](https://github.com/mapbox/mapbox-geostats) will take longer to process.
Because tile-join just copies the geometries to the new .mbtiles without processing them
(except to rescale the extents if necessary),
it doesn't have any of tippecanoe's recourses if the new tiles are bigger than the 500K tile limit.

View File

@ -400,6 +400,32 @@ again:
return add_object(j, JSON_NULL);
}
/////////////////////////// NaN
if (c == 'N') {
if (read_wrap(j) != 'a' || read_wrap(j) != 'N') {
j->error = "Found misspelling of NaN";
return NULL;
}
j->error = "JSON does not allow NaN";
return NULL;
}
/////////////////////////// Infinity
if (c == 'I') {
if (read_wrap(j) != 'n' || read_wrap(j) != 'f' || read_wrap(j) != 'i' ||
read_wrap(j) != 'n' || read_wrap(j) != 'i' || read_wrap(j) != 't' ||
read_wrap(j) != 'y') {
j->error = "Found misspelling of Infinity";
return NULL;
}
j->error = "JSON does not allow Infinity";
return NULL;
}
/////////////////////////// True
if (c == 't') {
@ -740,7 +766,7 @@ void json_disconnect(json_object *o) {
static void json_print_one(struct string *val, json_object *o) {
if (o == NULL) {
string_append_string(val, "NULL");
string_append_string(val, "...");
} else if (o->type == JSON_STRING) {
string_append(val, '\"');
@ -779,7 +805,7 @@ static void json_print_one(struct string *val, json_object *o) {
static void json_print(struct string *val, json_object *o) {
if (o == NULL) {
// Hash value in incompletely read hash
string_append_string(val, "NULL");
string_append_string(val, "...");
} else if (o->type == JSON_HASH) {
string_append(val, '{');

View File

@ -2006,7 +2006,7 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
}
}
mbtiles_write_metadata(outdb, outdir, fname, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, midlat, midlon, forcetable, attribution, merged_lm, true, description);
mbtiles_write_metadata(outdb, outdir, fname, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, midlat, midlon, forcetable, attribution, merged_lm, true, description, !prevent[P_TILE_STATS]);
return ret;
}
@ -2182,6 +2182,7 @@ int main(int argc, char **argv) {
{"no-feature-limit", no_argument, &prevent[P_FEATURE_LIMIT], 1},
{"no-tile-size-limit", no_argument, &prevent[P_KILOBYTE_LIMIT], 1},
{"no-tile-compression", no_argument, &prevent[P_TILE_COMPRESSION], 1},
{"no-tile-stats", no_argument, &prevent[P_TILE_STATS], 1},
{"Temporary storage", 0, 0, 0},
{"temporary-directory", required_argument, 0, 't'},

View File

@ -271,6 +271,8 @@ the line or polygon within one tile unit of its proper location. You can probabl
\fB\fC\-pk\fR or \fB\fC\-\-no\-tile\-size\-limit\fR: Don't limit tiles to 500K bytes
.IP \(bu 2
\fB\fC\-pC\fR or \fB\fC\-\-no\-tile\-compression\fR: Don't compress the PBF vector tile data.
.IP \(bu 2
\fB\fC\-pg\fR or \fB\fC\-\-no\-tile\-stats\fR: Don't generate the \fB\fCtilestats\fR row in the tileset metadata. Uploads without tilestats \[la]https://github.com/mapbox/mapbox-geostats\[ra] will take longer to process.
.RE
.SS Temporary storage
.RS
@ -511,20 +513,20 @@ Check out some examples of maps made with tippecanoe \[la]MADE_WITH.md\[ra]
The name is a joking reference \[la]http://en.wikipedia.org/wiki/Tippecanoe_and_Tyler_Too\[ra] to a "tiler" for making map tiles.
.SH tile\-join
.PP
Tile\-join is a tool for joining new attributes from a CSV file to features
that have already been tiled with tippecanoe. It reads the tiles from an
Tile\-join is a tool for copying and merging vector mbtiles files and for
joining new attributes from a CSV file to existing features in them.
.PP
It reads the tiles from an
existing .mbtiles file or a directory of tiles, matches them against the
records of the CSV, and writes out a new tileset.
records of the CSV (if one is specified), and writes out a new tileset.
.PP
If you specify multiple source mbtiles files or source directories of tiles,
all the sources are read and their combined contents are written to the new
mbtiles output. If they define the same layers or the same tiles, the layers
or tiles are merged.
.PP
You can use the \fB\fC\-e\fR flag to output a directory of tiles rather than a
\&.mbtiles file.
.PP
The options are:
.SS Output tileset
.RS
.IP \(bu 2
\fB\fC\-o\fR \fIout.mbtiles\fP or \fB\fC\-\-output=\fR\fIout.mbtiles\fP: Write the new tiles to the specified .mbtiles file.
@ -532,16 +534,9 @@ The options are:
\fB\fC\-e\fR \fIdirectory\fP or \fB\fC\-\-output\-to\-directory=\fR\fIdirectory\fP: Write the new tiles to the specified directory instead of to an mbtiles file.
.IP \(bu 2
\fB\fC\-f\fR or \fB\fC\-\-force\fR: Remove \fIout.mbtiles\fP if it already exists.
.IP \(bu 2
\fB\fC\-c\fR \fImatch\fP\fB\fC\&.csv\fR or \fB\fC\-\-csv=\fR\fImatch\fP\fB\fC\&.csv\fR: Use \fImatch\fP\fB\fC\&.csv\fR as the source for new attributes to join to the features. The first line of the file should be the key names; the other lines are values. The first column is the one to match against the existing features; the other columns are the new data to add.
.IP \(bu 2
\fB\fC\-x\fR \fIkey\fP or \fB\fC\-\-exclude=\fR\fIkey\fP: Remove attributes of type \fIkey\fP from the output. You can use this to remove the field you are matching against if you no longer need it after joining, or to remove any other attributes you don't want.
.IP \(bu 2
\fB\fC\-i\fR or \fB\fC\-\-if\-matched\fR: Only include features that matched the CSV.
.IP \(bu 2
\fB\fC\-pk\fR or \fB\fC\-\-no\-tile\-size\-limit\fR: Don't skip tiles larger than 500K.
.IP \(bu 2
\fB\fC\-pC\fR or \fB\fC\-\-no\-tile\-compression\fR: Don't compress the PBF vector tile data.
.RE
.SS Tileset description and attribution
.RS
.IP \(bu 2
\fB\fC\-l\fR \fIlayer\fP or \fB\fC\-\-layer=\fR\fIlayer\fP: Include the named layer in the output. You can specify multiple \fB\fC\-l\fR options to keep multiple layers. If you don't specify, they will all be retained.
.IP \(bu 2
@ -553,6 +548,34 @@ The options are:
.IP \(bu 2
\fB\fC\-N\fR \fIdescription\fP or \fB\fC\-\-description=\fR\fIdescription\fP: Set the tileset description.
.RE
.SS Zoom levels
.RS
.IP \(bu 2
\fB\fC\-z\fR \fIzoom\fP or \fB\fC\-\-maximum\-zoom=\fR\fIzoom\fP: Don't copy tiles from higher zoom levels than the specified zoom
.IP \(bu 2
\fB\fC\-Z\fR \fIzoom\fP or \fB\fC\-\-minimum\-zoom=\fR\fIzoom\fP: Don't copy tiles from lower zoom levels than the specified zoom
.RE
.SS Merging attributes from a CSV file
.RS
.IP \(bu 2
\fB\fC\-c\fR \fImatch\fP\fB\fC\&.csv\fR or \fB\fC\-\-csv=\fR\fImatch\fP\fB\fC\&.csv\fR: Use \fImatch\fP\fB\fC\&.csv\fR as the source for new attributes to join to the features. The first line of the file should be the key names; the other lines are values. The first column is the one to match against the existing features; the other columns are the new data to add.
.RE
.SS Filtering features and feature attributes
.RS
.IP \(bu 2
\fB\fC\-x\fR \fIkey\fP or \fB\fC\-\-exclude=\fR\fIkey\fP: Remove attributes of type \fIkey\fP from the output. You can use this to remove the field you are matching against if you no longer need it after joining, or to remove any other attributes you don't want.
.IP \(bu 2
\fB\fC\-i\fR or \fB\fC\-\-if\-matched\fR: Only include features that matched the CSV.
.RE
.SS Setting or disabling tile size limits
.RS
.IP \(bu 2
\fB\fC\-pk\fR or \fB\fC\-\-no\-tile\-size\-limit\fR: Don't skip tiles larger than 500K.
.IP \(bu 2
\fB\fC\-pC\fR or \fB\fC\-\-no\-tile\-compression\fR: Don't compress the PBF vector tile data.
.IP \(bu 2
\fB\fC\-pg\fR or \fB\fC\-\-no\-tile\-stats\fR: Don't generate the \fB\fCtilestats\fR row in the tileset metadata. Uploads without tilestats \[la]https://github.com/mapbox/mapbox-geostats\[ra] will take longer to process.
.RE
.PP
Because tile\-join just copies the geometries to the new .mbtiles without processing them
(except to rescale the extents if necessary),

View File

@ -137,7 +137,7 @@ bool type_and_string::operator!=(const type_and_string &o) const {
return false;
}
std::string tilestats(std::map<std::string, layermap_entry> const &layermap1) {
std::string tilestats(std::map<std::string, layermap_entry> const &layermap1, size_t elements) {
// Consolidate layers/attributes whose names are truncated
std::vector<std::map<std::string, layermap_entry>> lmv;
lmv.push_back(layermap1);
@ -192,7 +192,7 @@ std::string tilestats(std::map<std::string, layermap_entry> const &layermap1) {
size_t attrs = 0;
for (auto attribute : layer.second.file_keys) {
if (attrs == 100) {
if (attrs == elements) {
break;
}
if (attrs != 0) {
@ -240,21 +240,27 @@ std::string tilestats(std::map<std::string, layermap_entry> const &layermap1) {
size_t vals = 0;
for (auto value : attribute.second.sample_values) {
if (vals == 100) {
if (vals == elements) {
break;
}
if (vals != 0) {
out.append(",\n");
}
vals++;
if (value.type == mvt_double || value.type == mvt_bool) {
if (vals != 0) {
out.append(",\n");
}
vals++;
out.append("\t\t\t\t\t\t");
out.append(value.string);
} else {
std::string trunc = truncate16(value.string, 256);
if (trunc.size() == value.string.size()) {
if (vals != 0) {
out.append(",\n");
}
vals++;
out.append("\t\t\t\t\t\t\"");
quote(out, value.string.c_str());
out.append("\"");
@ -299,7 +305,7 @@ std::string tilestats(std::map<std::string, layermap_entry> const &layermap1) {
return out2;
}
void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int forcetable, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description) {
void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int forcetable, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats) {
char *sql, *err;
sqlite3 *db = outdb;
@ -407,57 +413,66 @@ void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fnam
sqlite3_free(sql);
if (vector) {
std::string buf("{");
aprintf(&buf, "\"vector_layers\": [ ");
size_t elements = 100;
std::string buf;
std::vector<std::string> lnames;
for (auto ai = layermap.begin(); ai != layermap.end(); ++ai) {
lnames.push_back(ai->first);
}
{
buf = "{";
aprintf(&buf, "\"vector_layers\": [ ");
for (size_t i = 0; i < lnames.size(); i++) {
if (i != 0) {
aprintf(&buf, ", ");
std::vector<std::string> lnames;
for (auto ai = layermap.begin(); ai != layermap.end(); ++ai) {
lnames.push_back(ai->first);
}
auto fk = layermap.find(lnames[i]);
aprintf(&buf, "{ \"id\": \"");
quote(buf, lnames[i]);
aprintf(&buf, "\", \"description\": \"\", \"minzoom\": %d, \"maxzoom\": %d, \"fields\": {", fk->second.minzoom, fk->second.maxzoom);
bool first = true;
for (auto j = fk->second.file_keys.begin(); j != fk->second.file_keys.end(); ++j) {
if (first) {
first = false;
} else {
for (size_t i = 0; i < lnames.size(); i++) {
if (i != 0) {
aprintf(&buf, ", ");
}
aprintf(&buf, "\"");
quote(buf, j->first.c_str());
auto fk = layermap.find(lnames[i]);
aprintf(&buf, "{ \"id\": \"");
quote(buf, lnames[i]);
aprintf(&buf, "\", \"description\": \"\", \"minzoom\": %d, \"maxzoom\": %d, \"fields\": {", fk->second.minzoom, fk->second.maxzoom);
int type = 0;
for (auto s : j->second.sample_values) {
type |= (1 << s.type);
bool first = true;
for (auto j = fk->second.file_keys.begin(); j != fk->second.file_keys.end(); ++j) {
if (first) {
first = false;
} else {
aprintf(&buf, ", ");
}
aprintf(&buf, "\"");
quote(buf, j->first.c_str());
int type = 0;
for (auto s : j->second.sample_values) {
type |= (1 << s.type);
}
if (type == (1 << mvt_double)) {
aprintf(&buf, "\": \"Number\"");
} else if (type == (1 << mvt_bool)) {
aprintf(&buf, "\": \"Boolean\"");
} else if (type == (1 << mvt_string)) {
aprintf(&buf, "\": \"String\"");
} else {
aprintf(&buf, "\": \"Mixed\"");
}
}
if (type == (1 << mvt_double)) {
aprintf(&buf, "\": \"Number\"");
} else if (type == (1 << mvt_bool)) {
aprintf(&buf, "\": \"Boolean\"");
} else if (type == (1 << mvt_string)) {
aprintf(&buf, "\": \"String\"");
} else {
aprintf(&buf, "\": \"Mixed\"");
}
aprintf(&buf, "} }");
}
aprintf(&buf, "} }");
}
aprintf(&buf, " ]");
aprintf(&buf, " ],");
aprintf(&buf, "\"tilestats\": %s", tilestats(layermap).c_str());
aprintf(&buf, "}");
if (do_tilestats && elements > 0) {
aprintf(&buf, ",\"tilestats\": %s", tilestats(layermap, elements).c_str());
}
aprintf(&buf, "}");
}
sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('json', %Q);", buf.c_str());
if (sqlite3_exec(db, sql, NULL, NULL, &err) != SQLITE_OK) {

View File

@ -39,7 +39,7 @@ sqlite3 *mbtiles_open(char *dbname, char **argv, int forcetable);
void mbtiles_write_tile(sqlite3 *outdb, int z, int tx, int ty, const char *data, int size);
void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int forcetable, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description);
void mbtiles_write_metadata(sqlite3 *outdb, const char *outdir, const char *fname, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int forcetable, const char *attribution, std::map<std::string, layermap_entry> const &layermap, bool vector, const char *description, bool do_tilestats);
void mbtiles_close(sqlite3 *outdb, const char *pgm);

View File

@ -30,6 +30,7 @@
#define P_DUPLICATION ((int) 'D')
#define P_TINY_POLYGON_REDUCTION ((int) 't')
#define P_TILE_COMPRESSION ((int) 'C')
#define P_TILE_STATS ((int) 'g')
extern int prevent[256];
extern int additional[256];

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,158 @@
{ "type": "FeatureCollection", "properties": {
"bounds": "-122.343750,37.439974,-121.992188,37.996163",
"center": "-122.167969,37.833010,9",
"description": "tests/join-population/macarthur.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"macarthur\", \"description\": \"\", \"minzoom\": 6, \"maxzoom\": 9, \"fields\": {\"FULLNAME\": \"String\", \"LINEARID\": \"String\", \"MTFCC\": \"String\", \"RTTYP\": \"String\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"macarthur\",\"count\": 61,\"geometry\": \"LineString\",\"attributeCount\": 4,\"attributes\": [{\"attribute\": \"FULLNAME\",\"count\": 3,\"type\": \"string\",\"values\": [\"Macarthur\",\"Macarthur Fwy\",\"W Macarthur\"]},{\"attribute\": \"LINEARID\",\"count\": 16,\"type\": \"string\",\"values\": [\"1102155930810\",\"1102156241736\",\"1102156510290\",\"1102638069562\",\"1102654601627\",\"1102654601663\",\"1102654602215\",\"1102954918511\",\"1103690383700\",\"1103690474249\",\"1103690474250\",\"1103690483026\",\"1103690483032\",\"1104474748623\",\"1104486090991\",\"1104486392881\"]},{\"attribute\": \"MTFCC\",\"count\": 2,\"type\": \"string\",\"values\": [\"S1100\",\"S1400\"]},{\"attribute\": \"RTTYP\",\"count\": 1,\"type\": \"string\",\"values\": [\"M\"]}]}]}}",
"maxzoom": "9",
"minzoom": "6",
"name": "tests/join-population/macarthur.mbtiles",
"type": "overlay",
"version": "2"
}, "features": [
{ "type": "FeatureCollection", "properties": { "zoom": 6, "x": 10, "y": 24 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "macarthur", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { "LINEARID": "1104486392881", "FULLNAME": "W Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.255859, 37.821718 ], [ -122.259979, 37.824972 ], [ -122.272339, 37.828226 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102638069562", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.242126, 37.807614 ], [ -122.238007, 37.806529 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102156241736", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.194061, 37.786996 ], [ -122.195435, 37.786996 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1104486090991", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.295685, 37.833649 ], [ -122.294312, 37.828226 ], [ -122.290192, 37.827141 ], [ -122.281952, 37.828226 ], [ -122.259979, 37.822802 ], [ -122.253113, 37.818463 ], [ -122.248993, 37.810869 ], [ -122.236633, 37.805444 ], [ -122.229767, 37.801104 ], [ -122.211914, 37.796763 ], [ -122.194061, 37.785911 ], [ -122.178955, 37.783740 ], [ -122.158356, 37.773971 ], [ -122.148743, 37.759859 ], [ -122.151489, 37.750087 ], [ -122.141876, 37.737055 ], [ -122.137756, 37.725108 ], [ -122.132263, 37.714245 ], [ -122.110291, 37.701207 ], [ -122.104797, 37.695774 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1104474748623", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.104797, 37.695774 ], [ -122.110291, 37.701207 ], [ -122.132263, 37.715331 ], [ -122.137756, 37.726194 ], [ -122.140503, 37.738141 ], [ -122.151489, 37.751172 ], [ -122.148743, 37.760944 ], [ -122.158356, 37.773971 ], [ -122.178955, 37.783740 ], [ -122.194061, 37.785911 ], [ -122.210541, 37.796763 ], [ -122.229767, 37.801104 ], [ -122.236633, 37.806529 ], [ -122.250366, 37.810869 ], [ -122.254486, 37.819548 ], [ -122.259979, 37.822802 ], [ -122.281952, 37.828226 ], [ -122.290192, 37.827141 ], [ -122.294312, 37.829311 ], [ -122.294312, 37.831480 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690483032", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.184448, 37.777228 ], [ -122.180328, 37.773971 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690483026", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.177582, 37.771800 ], [ -122.176208, 37.771800 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102954918511", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.172089, 37.769629 ], [ -122.163849, 37.762030 ], [ -122.162476, 37.756601 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690383700", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.161102, 37.753344 ], [ -122.159729, 37.750087 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690474249", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.159729, 37.750087 ], [ -122.158356, 37.749001 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690474250", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.143250, 37.739227 ], [ -122.152863, 37.742485 ], [ -122.158356, 37.747915 ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 7, "x": 20, "y": 49 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "macarthur", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { "LINEARID": "1104486392881", "FULLNAME": "W Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.255173, 37.821718 ], [ -122.259293, 37.824430 ], [ -122.272339, 37.827684 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102156510290", "FULLNAME": "W Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.254486, 37.820090 ], [ -122.254486, 37.820633 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102654602215", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.253113, 37.817378 ], [ -122.252426, 37.816836 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102638069562", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.242126, 37.807614 ], [ -122.237320, 37.805986 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102156241736", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.194061, 37.786453 ], [ -122.194748, 37.786996 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1104486090991", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.294998, 37.833107 ], [ -122.293625, 37.828768 ], [ -122.290878, 37.827141 ], [ -122.288132, 37.826599 ], [ -122.281265, 37.827684 ], [ -122.260666, 37.822260 ], [ -122.253113, 37.818463 ], [ -122.250366, 37.811954 ], [ -122.248993, 37.810326 ], [ -122.235947, 37.805444 ], [ -122.229080, 37.801104 ], [ -122.211227, 37.796763 ], [ -122.205734, 37.794593 ], [ -122.200928, 37.789167 ], [ -122.194061, 37.785911 ], [ -122.189255, 37.784283 ], [ -122.178268, 37.783740 ], [ -122.158356, 37.773429 ], [ -122.155609, 37.770715 ], [ -122.148056, 37.759859 ], [ -122.148743, 37.757144 ], [ -122.152176, 37.753887 ], [ -122.151489, 37.750087 ], [ -122.149429, 37.745743 ], [ -122.141190, 37.737055 ], [ -122.138443, 37.725651 ], [ -122.131577, 37.714788 ], [ -122.121277, 37.707183 ], [ -122.109604, 37.700664 ], [ -122.104797, 37.695774 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1104474748623", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.104111, 37.695774 ], [ -122.109604, 37.700664 ], [ -122.121964, 37.707726 ], [ -122.131577, 37.714788 ], [ -122.137756, 37.725651 ], [ -122.140503, 37.737598 ], [ -122.149429, 37.745743 ], [ -122.151489, 37.750629 ], [ -122.151489, 37.753887 ], [ -122.148743, 37.757144 ], [ -122.148056, 37.760401 ], [ -122.155609, 37.771258 ], [ -122.158356, 37.773429 ], [ -122.177582, 37.783740 ], [ -122.193375, 37.785911 ], [ -122.199554, 37.789167 ], [ -122.205734, 37.794050 ], [ -122.210541, 37.796763 ], [ -122.229080, 37.801104 ], [ -122.235947, 37.805986 ], [ -122.249680, 37.810869 ], [ -122.253799, 37.819006 ], [ -122.259979, 37.822802 ], [ -122.281265, 37.827684 ], [ -122.289505, 37.827141 ], [ -122.293625, 37.828768 ], [ -122.293625, 37.830938 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102155930810", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.185822, 37.775600 ], [ -122.185822, 37.776142 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690483032", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.184448, 37.776685 ], [ -122.180328, 37.773971 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690483026", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.176895, 37.771258 ], [ -122.175522, 37.771258 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102954918511", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.172089, 37.769629 ], [ -122.167969, 37.766372 ], [ -122.163849, 37.762030 ], [ -122.161789, 37.756601 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690383700", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.160416, 37.753344 ], [ -122.159042, 37.750087 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690474249", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.159042, 37.750087 ], [ -122.158356, 37.748458 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690474250", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.143250, 37.738684 ], [ -122.152176, 37.742485 ], [ -122.157669, 37.747915 ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 8, "x": 41, "y": 99 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "macarthur", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { "LINEARID": "1104486090991", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.144279, 37.740313 ], [ -122.141533, 37.738141 ], [ -122.140503, 37.736784 ], [ -122.138100, 37.725379 ], [ -122.133636, 37.718590 ], [ -122.131577, 37.714517 ], [ -122.129860, 37.712887 ], [ -122.125397, 37.710443 ], [ -122.121277, 37.707183 ], [ -122.117157, 37.705553 ], [ -122.109604, 37.700664 ], [ -122.104454, 37.695503 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1104474748623", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.104111, 37.695503 ], [ -122.109261, 37.700664 ], [ -122.115784, 37.705010 ], [ -122.121277, 37.707455 ], [ -122.124023, 37.709628 ], [ -122.129860, 37.713159 ], [ -122.131577, 37.715060 ], [ -122.133293, 37.718590 ], [ -122.137413, 37.725108 ], [ -122.140503, 37.737327 ], [ -122.143936, 37.740313 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690474250", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.143250, 37.738413 ], [ -122.147369, 37.740313 ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 8, "x": 41, "y": 98 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "macarthur", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { "LINEARID": "1104486392881", "FULLNAME": "W Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.254829, 37.821446 ], [ -122.258949, 37.824430 ], [ -122.263756, 37.825786 ], [ -122.265816, 37.826599 ], [ -122.271996, 37.827684 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102156510290", "FULLNAME": "W Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.254143, 37.820090 ], [ -122.254486, 37.820362 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102654602215", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.253113, 37.817378 ], [ -122.252426, 37.816565 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102638069562", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.241783, 37.807343 ], [ -122.237320, 37.805715 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102156241736", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.194061, 37.786453 ], [ -122.194405, 37.786996 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1104486090991", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.294655, 37.833107 ], [ -122.293625, 37.828768 ], [ -122.290878, 37.826870 ], [ -122.287788, 37.826599 ], [ -122.281265, 37.827413 ], [ -122.260323, 37.822260 ], [ -122.256203, 37.820362 ], [ -122.253113, 37.817921 ], [ -122.251740, 37.816293 ], [ -122.250366, 37.811954 ], [ -122.249336, 37.810598 ], [ -122.242126, 37.808428 ], [ -122.235603, 37.805444 ], [ -122.229080, 37.801104 ], [ -122.210884, 37.796763 ], [ -122.205391, 37.793779 ], [ -122.199554, 37.788624 ], [ -122.194061, 37.785639 ], [ -122.188911, 37.784283 ], [ -122.178268, 37.783740 ], [ -122.170029, 37.778856 ], [ -122.158356, 37.773429 ], [ -122.155266, 37.770715 ], [ -122.148399, 37.760401 ], [ -122.148056, 37.757959 ], [ -122.151833, 37.753615 ], [ -122.151833, 37.750901 ], [ -122.149429, 37.745743 ], [ -122.145996, 37.742757 ], [ -122.140846, 37.737055 ], [ -122.138100, 37.725379 ], [ -122.133636, 37.718590 ], [ -122.131577, 37.714517 ], [ -122.129860, 37.712887 ], [ -122.125397, 37.710443 ], [ -122.121277, 37.707183 ], [ -122.117157, 37.705553 ], [ -122.109604, 37.700664 ], [ -122.105827, 37.696861 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1104474748623", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.105484, 37.696861 ], [ -122.109261, 37.700664 ], [ -122.115784, 37.705010 ], [ -122.121277, 37.707455 ], [ -122.125053, 37.710443 ], [ -122.129173, 37.712615 ], [ -122.131233, 37.714517 ], [ -122.133293, 37.718590 ], [ -122.137413, 37.725108 ], [ -122.140503, 37.737327 ], [ -122.143936, 37.740313 ], [ -122.145653, 37.742757 ], [ -122.148743, 37.745200 ], [ -122.151146, 37.749544 ], [ -122.151833, 37.751172 ], [ -122.151833, 37.752801 ], [ -122.151146, 37.754430 ], [ -122.148399, 37.757144 ], [ -122.148056, 37.759859 ], [ -122.155266, 37.770986 ], [ -122.158012, 37.773157 ], [ -122.170029, 37.779399 ], [ -122.177238, 37.783469 ], [ -122.179642, 37.784283 ], [ -122.188911, 37.784554 ], [ -122.193031, 37.785639 ], [ -122.199554, 37.788895 ], [ -122.205391, 37.794050 ], [ -122.209167, 37.795949 ], [ -122.214317, 37.797848 ], [ -122.228737, 37.801104 ], [ -122.236977, 37.806258 ], [ -122.241096, 37.808428 ], [ -122.248993, 37.810598 ], [ -122.250366, 37.812225 ], [ -122.252426, 37.817921 ], [ -122.255516, 37.820362 ], [ -122.258949, 37.822260 ], [ -122.281265, 37.827684 ], [ -122.284012, 37.827684 ], [ -122.288132, 37.826870 ], [ -122.289505, 37.827141 ], [ -122.293282, 37.828768 ], [ -122.293625, 37.830938 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102155930810", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.185478, 37.775600 ], [ -122.185478, 37.775871 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690483032", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.184105, 37.776685 ], [ -122.179985, 37.773971 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102654601627", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.181702, 37.775057 ], [ -122.181358, 37.775057 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690483026", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.176552, 37.771258 ], [ -122.175522, 37.770986 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102954918511", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.172089, 37.769358 ], [ -122.167969, 37.766101 ], [ -122.163849, 37.761758 ], [ -122.161789, 37.756601 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690383700", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.160416, 37.753073 ], [ -122.159042, 37.750087 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690474249", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.159042, 37.750087 ], [ -122.158012, 37.748458 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690474250", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.143250, 37.738413 ], [ -122.151833, 37.742485 ], [ -122.156639, 37.746286 ], [ -122.157326, 37.747643 ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 9, "x": 82, "y": 198 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "macarthur", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { "LINEARID": "1104486090991", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.138615, 37.729453 ], [ -122.137928, 37.725379 ], [ -122.137413, 37.724293 ], [ -122.134666, 37.720763 ], [ -122.133465, 37.718590 ], [ -122.131405, 37.714381 ], [ -122.129860, 37.712751 ], [ -122.127972, 37.711665 ], [ -122.125397, 37.710307 ], [ -122.121105, 37.707183 ], [ -122.117157, 37.705418 ], [ -122.109432, 37.700664 ], [ -122.104454, 37.695503 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1104474748623", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.104111, 37.695503 ], [ -122.109089, 37.700664 ], [ -122.115784, 37.704874 ], [ -122.121105, 37.707319 ], [ -122.125053, 37.710307 ], [ -122.129173, 37.712615 ], [ -122.130890, 37.714245 ], [ -122.133121, 37.718590 ], [ -122.137413, 37.724972 ], [ -122.138443, 37.729453 ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 9, "x": 82, "y": 197 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "macarthur", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { "LINEARID": "1104486392881", "FULLNAME": "W Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.254829, 37.821446 ], [ -122.255001, 37.821989 ], [ -122.256203, 37.822802 ], [ -122.258778, 37.824430 ], [ -122.263756, 37.825650 ], [ -122.265644, 37.826599 ], [ -122.271824, 37.827548 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102156510290", "FULLNAME": "W Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.254143, 37.819955 ], [ -122.254314, 37.820362 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102654602215", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.252941, 37.817243 ], [ -122.252426, 37.816429 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102638069562", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.241611, 37.807343 ], [ -122.241268, 37.806936 ], [ -122.239723, 37.806800 ], [ -122.237320, 37.805715 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102156241736", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.194061, 37.786453 ], [ -122.194405, 37.786860 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1104486090991", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.294655, 37.833107 ], [ -122.294140, 37.832158 ], [ -122.293797, 37.828904 ], [ -122.292938, 37.827955 ], [ -122.290707, 37.826735 ], [ -122.289677, 37.826463 ], [ -122.287788, 37.826463 ], [ -122.283325, 37.827277 ], [ -122.281265, 37.827277 ], [ -122.268391, 37.824158 ], [ -122.262383, 37.822938 ], [ -122.259121, 37.821853 ], [ -122.256031, 37.820362 ], [ -122.252941, 37.817921 ], [ -122.251740, 37.816293 ], [ -122.250366, 37.811818 ], [ -122.249165, 37.810598 ], [ -122.241955, 37.808292 ], [ -122.235432, 37.805444 ], [ -122.229767, 37.801375 ], [ -122.228909, 37.800968 ], [ -122.217236, 37.798391 ], [ -122.210884, 37.796628 ], [ -122.205219, 37.793779 ], [ -122.200756, 37.789302 ], [ -122.199554, 37.788488 ], [ -122.193890, 37.785639 ], [ -122.191486, 37.784825 ], [ -122.188740, 37.784283 ], [ -122.179298, 37.783876 ], [ -122.178268, 37.783604 ], [ -122.169857, 37.778856 ], [ -122.164192, 37.776414 ], [ -122.158184, 37.773293 ], [ -122.155266, 37.770715 ], [ -122.152519, 37.766101 ], [ -122.150631, 37.763930 ], [ -122.148399, 37.760401 ], [ -122.148056, 37.758773 ], [ -122.148056, 37.757823 ], [ -122.148743, 37.756601 ], [ -122.151661, 37.753615 ], [ -122.152004, 37.752122 ], [ -122.151833, 37.750765 ], [ -122.149944, 37.746557 ], [ -122.148914, 37.745064 ], [ -122.145824, 37.742621 ], [ -122.144108, 37.740313 ], [ -122.141533, 37.738141 ], [ -122.140675, 37.737055 ], [ -122.138443, 37.728774 ], [ -122.137928, 37.725379 ], [ -122.137070, 37.723750 ], [ -122.134666, 37.720763 ], [ -122.133465, 37.718590 ], [ -122.131405, 37.714381 ], [ -122.129860, 37.712751 ], [ -122.127972, 37.711665 ], [ -122.125397, 37.710307 ], [ -122.121964, 37.707726 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1104474748623", "FULLNAME": "Macarthur Fwy", "RTTYP": "M", "MTFCC": "S1100" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.121620, 37.707726 ], [ -122.125053, 37.710307 ], [ -122.128143, 37.711936 ], [ -122.129688, 37.713159 ], [ -122.131405, 37.715060 ], [ -122.133121, 37.718590 ], [ -122.137413, 37.724972 ], [ -122.138271, 37.729045 ], [ -122.140503, 37.737327 ], [ -122.141361, 37.738413 ], [ -122.143764, 37.740313 ], [ -122.145653, 37.742757 ], [ -122.149086, 37.745472 ], [ -122.151146, 37.749544 ], [ -122.151833, 37.751172 ], [ -122.151661, 37.753073 ], [ -122.150974, 37.754294 ], [ -122.148228, 37.756873 ], [ -122.147884, 37.758094 ], [ -122.147884, 37.759859 ], [ -122.148743, 37.761623 ], [ -122.152348, 37.766237 ], [ -122.155266, 37.770986 ], [ -122.157841, 37.773157 ], [ -122.164192, 37.776549 ], [ -122.170029, 37.779263 ], [ -122.173977, 37.781298 ], [ -122.177067, 37.783333 ], [ -122.179470, 37.784147 ], [ -122.188911, 37.784554 ], [ -122.193031, 37.785639 ], [ -122.199554, 37.788760 ], [ -122.201099, 37.789845 ], [ -122.203846, 37.792829 ], [ -122.205219, 37.794050 ], [ -122.208996, 37.795949 ], [ -122.211399, 37.797034 ], [ -122.214146, 37.797713 ], [ -122.219810, 37.799205 ], [ -122.228565, 37.800968 ], [ -122.229939, 37.801646 ], [ -122.234745, 37.805308 ], [ -122.237320, 37.806529 ], [ -122.241440, 37.808428 ], [ -122.248821, 37.810598 ], [ -122.249508, 37.811140 ], [ -122.250366, 37.812089 ], [ -122.251568, 37.816293 ], [ -122.252426, 37.817785 ], [ -122.253284, 37.818734 ], [ -122.255344, 37.820226 ], [ -122.258949, 37.822124 ], [ -122.262039, 37.823074 ], [ -122.269764, 37.824701 ], [ -122.281094, 37.827548 ], [ -122.283325, 37.827684 ], [ -122.286758, 37.826870 ], [ -122.288132, 37.826735 ], [ -122.289333, 37.827006 ], [ -122.292080, 37.827955 ], [ -122.293110, 37.828768 ], [ -122.293453, 37.829853 ], [ -122.293453, 37.830938 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102155930810", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.185478, 37.775600 ], [ -122.185307, 37.775735 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690483032", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.184105, 37.776685 ], [ -122.179813, 37.773971 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102654601627", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.181530, 37.775057 ], [ -122.181187, 37.774921 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690483026", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.176552, 37.771258 ], [ -122.175522, 37.770850 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102654601663", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.169857, 37.767594 ], [ -122.170029, 37.767729 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1102954918511", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.172089, 37.769222 ], [ -122.168140, 37.766508 ], [ -122.163849, 37.761623 ], [ -122.163162, 37.760808 ], [ -122.161789, 37.756601 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690383700", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.160416, 37.752937 ], [ -122.159901, 37.751444 ], [ -122.158871, 37.750087 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690474249", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.158871, 37.750087 ], [ -122.157841, 37.748322 ] ] } }
,
{ "type": "Feature", "properties": { "LINEARID": "1103690474250", "FULLNAME": "Macarthur", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.143078, 37.738277 ], [ -122.151833, 37.742485 ], [ -122.153721, 37.744250 ], [ -122.156467, 37.746286 ], [ -122.157326, 37.747508 ] ] } }
] }
] }
] }

1236
tests/longjson/out/-z0.json Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -32,8 +32,11 @@ std::string dequote(std::string s);
int pk = false;
int pC = false;
int pg = false;
size_t CPUS;
int quiet = false;
int maxzoom = 32;
int minzoom = 0;
struct stats {
int minzoom;
@ -692,12 +695,14 @@ void decode(struct reader *readers, char *map, std::map<std::string, layermap_en
maxlat = max(lat1, maxlat);
maxlon = max(lon2, maxlon);
zxy tile = zxy(r->zoom, r->x, r->y);
if (tasks.count(tile) == 0) {
tasks.insert(std::pair<zxy, std::vector<std::string>>(tile, std::vector<std::string>()));
if (r->zoom >= minzoom && r->zoom <= maxzoom) {
zxy tile = zxy(r->zoom, r->x, r->y);
if (tasks.count(tile) == 0) {
tasks.insert(std::pair<zxy, std::vector<std::string>>(tile, std::vector<std::string>()));
}
auto f = tasks.find(tile);
f->second.push_back(r->data);
}
auto f = tasks.find(tile);
f->second.push_back(r->data);
if (readers == NULL || readers->zoom != r->zoom || readers->x != r->x || readers->y != r->y) {
if (tasks.size() > 100 * CPUS) {
@ -766,15 +771,15 @@ void decode(struct reader *readers, char *map, std::map<std::string, layermap_en
if (sqlite3_prepare_v2(r->db, "SELECT value from metadata where name = 'minzoom'", -1, &r->stmt, NULL) == SQLITE_OK) {
if (sqlite3_step(r->stmt) == SQLITE_ROW) {
int minzoom = sqlite3_column_int(r->stmt, 0);
st->minzoom = min(st->minzoom, minzoom);
int minz = max(sqlite3_column_int(r->stmt, 0), minzoom);
st->minzoom = min(st->minzoom, minz);
}
sqlite3_finalize(r->stmt);
}
if (sqlite3_prepare_v2(r->db, "SELECT value from metadata where name = 'maxzoom'", -1, &r->stmt, NULL) == SQLITE_OK) {
if (sqlite3_step(r->stmt) == SQLITE_ROW) {
int maxzoom = sqlite3_column_int(r->stmt, 0);
st->maxzoom = max(st->maxzoom, maxzoom);
int maxz = min(sqlite3_column_int(r->stmt, 0), maxzoom);
st->maxzoom = max(st->maxzoom, maxz);
}
sqlite3_finalize(r->stmt);
}
@ -851,14 +856,14 @@ void decode(struct reader *readers, char *map, std::map<std::string, layermap_en
if (j->type == JSON_HASH) {
if ((k = json_hash_get(j, "minzoom")) != NULL) {
const std::string minzoom_tmp = k->string;
int minzoom = std::stoi(minzoom_tmp);
st->minzoom = min(st->minzoom, minzoom);
int minz = max(std::stoi(minzoom_tmp), minzoom);
st->minzoom = min(st->minzoom, minz);
}
if ((k = json_hash_get(j, "maxzoom")) != NULL) {
const std::string maxzoom_tmp = k->string;
int maxzoom = std::stoi(maxzoom_tmp);
st->maxzoom = max(st->maxzoom, maxzoom);
int maxz = min(std::stoi(maxzoom_tmp), maxzoom);
st->maxzoom = max(st->maxzoom, maxz);
}
if ((k = json_hash_get(j, "center")) != NULL) {
@ -1032,9 +1037,12 @@ int main(int argc, char **argv) {
{"layer", required_argument, 0, 'l'},
{"exclude-layer", required_argument, 0, 'L'},
{"quiet", no_argument, 0, 'q'},
{"maximum-zoom", required_argument, 0, 'z'},
{"minimum-zoom", required_argument, 0, 'Z'},
{"no-tile-size-limit", no_argument, &pk, 1},
{"no-tile-compression", no_argument, &pC, 1},
{"no-tile-stats", no_argument, &pg, 1},
{0, 0, 0, 0},
};
@ -1087,11 +1095,21 @@ int main(int argc, char **argv) {
set_description = optarg;
break;
case 'z':
maxzoom = atoi(optarg);
break;
case 'Z':
minzoom = atoi(optarg);
break;
case 'p':
if (strcmp(optarg, "k") == 0) {
pk = true;
} else if (strcmp(optarg, "C") == 0) {
pC = true;
} else if (strcmp(optarg, "g") == 0) {
pg = true;
} else {
fprintf(stderr, "%s: Unknown option for -p%s\n", argv[0], optarg);
exit(EXIT_FAILURE);
@ -1194,7 +1212,7 @@ int main(int argc, char **argv) {
name = set_name;
}
mbtiles_write_metadata(outdb, out_dir, name.c_str(), st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.midlat, st.midlon, 0, attribution.size() != 0 ? attribution.c_str() : NULL, layermap, true, description.c_str());
mbtiles_write_metadata(outdb, out_dir, name.c_str(), st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.midlat, st.midlon, 0, attribution.size() != 0 ? attribution.c_str() : NULL, layermap, true, description.c_str(), !pg);
if (outdb != NULL) {
mbtiles_close(outdb, argv[0]);

View File

@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP
#define VERSION "tippecanoe v1.22.0\n"
#define VERSION "tippecanoe v1.22.2\n"
#endif