From f7e64dca5f1101674585e977dcbb8450a1a79dc2 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 23 Aug 2016 15:33:53 -0700 Subject: [PATCH 01/13] Work in progress on being able to specify per-feature layer names --- geojson.cpp | 33 +++++++++++--- geojson.hpp | 3 +- main.cpp | 125 +++++++++++++++++++++++++++++----------------------- 3 files changed, 98 insertions(+), 63 deletions(-) diff --git a/geojson.cpp b/geojson.cpp index 3f071e2..aaf0143 100644 --- a/geojson.cpp +++ b/geojson.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include extern "C" { @@ -166,7 +167,7 @@ long long parse_geometry(int t, json_object *j, long long *bbox, drawvec &out, i return g; } -int serialize_geometry(json_object *geometry, json_object *properties, json_object *id, const char *reading, int line, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, const char *fname, int basezoom, int layer, double droprate, long long *file_bbox, json_object *tippecanoe, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, json_object *feature) { +int serialize_geometry(json_object *geometry, json_object *properties, json_object *id, const char *reading, int line, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, const char *fname, int basezoom, int layer, double droprate, long long *file_bbox, json_object *tippecanoe, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, json_object *feature, std::map *layermap) { json_object *geometry_type = json_hash_get(geometry, "type"); if (geometry_type == NULL) { static int warned = 0; @@ -206,6 +207,7 @@ int serialize_geometry(json_object *geometry, json_object *properties, json_obje int tippecanoe_minzoom = -1; int tippecanoe_maxzoom = -1; + std::string tippecanoe_layername; if (tippecanoe != NULL) { json_object *min = json_hash_get(tippecanoe, "minzoom"); @@ -223,6 +225,11 @@ int serialize_geometry(json_object *geometry, json_object *properties, json_obje if (max != NULL && max->type == JSON_STRING) { tippecanoe_maxzoom = atoi(max->string); } + + json_object *ln = json_hash_get(tippecanoe, "layername"); + if (ln != NULL && (max->type == JSON_STRING || max->type == JSON_NUMBER)) { + tippecanoe_layername = std::string(ln->string); + } } bool has_id = false; @@ -364,6 +371,20 @@ int serialize_geometry(json_object *geometry, json_object *properties, json_obje feature_minzoom = basezoom - floor(log(r) / -log(droprate)); } + if (tippecanoe_layername.size() != 0) { + if (layermap->count(tippecanoe_layername) == 0) { + layermap->insert(std::pair(tippecanoe_layername, layermap->size())); + } + + auto ai = layermap->find(tippecanoe_layername); + if (ai != layermap->end()) { + layer = ai->second; + } else { + fprintf(stderr, "Internal error: can't find layer name %s\n", tippecanoe_layername.c_str()); + exit(EXIT_FAILURE); + } + } + long long geomstart = *geompos; serial_feature sf; @@ -450,7 +471,7 @@ void check_crs(json_object *j, const char *reading) { } } -void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom) { +void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap) { long long found_hashes = 0; long long found_features = 0; long long found_geometries = 0; @@ -518,7 +539,7 @@ void parse_json(json_pull *jp, const char *reading, volatile long long *layer_se } found_geometries++; - serialize_geometry(j, NULL, NULL, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, NULL, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j); + serialize_geometry(j, NULL, NULL, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, NULL, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap); json_free(j); continue; } @@ -560,10 +581,10 @@ void parse_json(json_pull *jp, const char *reading, volatile long long *layer_se if (geometries != NULL) { size_t g; for (g = 0; g < geometries->length; g++) { - serialize_geometry(geometries->array[g], properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j); + serialize_geometry(geometries->array[g], properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap); } } else { - serialize_geometry(geometry, properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j); + serialize_geometry(geometry, properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap); } json_free(j); @@ -575,7 +596,7 @@ void parse_json(json_pull *jp, const char *reading, volatile long long *layer_se void *run_parse_json(void *v) { struct parse_json_args *pja = (struct parse_json_args *) v; - parse_json(pja->jp, pja->reading, pja->layer_seq, pja->progress_seq, pja->metapos, pja->geompos, pja->indexpos, pja->exclude, pja->include, pja->exclude_all, pja->metafile, pja->geomfile, pja->indexfile, pja->poolfile, pja->treefile, pja->fname, pja->basezoom, pja->layer, pja->droprate, pja->file_bbox, pja->segment, pja->initialized, pja->initial_x, pja->initial_y, pja->readers, pja->file_keys, pja->maxzoom); + parse_json(pja->jp, pja->reading, pja->layer_seq, pja->progress_seq, pja->metapos, pja->geompos, pja->indexpos, pja->exclude, pja->include, pja->exclude_all, pja->metafile, pja->geomfile, pja->indexfile, pja->poolfile, pja->treefile, pja->fname, pja->basezoom, pja->layer, pja->droprate, pja->file_bbox, pja->segment, pja->initialized, pja->initial_x, pja->initial_y, pja->readers, pja->file_keys, pja->maxzoom, pja->layermap); return NULL; } diff --git a/geojson.hpp b/geojson.hpp index 5c48c23..83ebc47 100644 --- a/geojson.hpp +++ b/geojson.hpp @@ -26,8 +26,9 @@ struct parse_json_args { struct reader *readers; std::set *file_keys; int maxzoom; + std::map *layermap; }; struct json_pull *json_begin_map(char *map, long long len); -void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom); +void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap); void *run_parse_json(void *v); diff --git a/main.cpp b/main.cpp index 402215e..66289b4 100644 --- a/main.cpp +++ b/main.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef __APPLE__ #include @@ -299,7 +300,7 @@ void *run_sort(void *v) { return NULL; } -void do_read_parallel(char *map, long long len, long long initial_offset, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom) { +void do_read_parallel(char *map, long long len, long long initial_offset, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > *layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom) { long long segs[CPUS + 1]; segs[0] = 0; segs[CPUS] = len; @@ -356,6 +357,7 @@ void do_read_parallel(char *map, long long len, long long initial_offset, const pja[i].readers = reader; pja[i].file_keys = &file_subkeys[i]; pja[i].maxzoom = maxzoom; + pja[i].layermap = &(*layermaps)[i]; if (pthread_create(&pthreads[i], NULL, run_parse_json, &pja[i]) != 0) { perror("pthread_create"); @@ -398,6 +400,7 @@ struct read_parallel_arg { int basezoom; int source; int nlayers; + std::vector > *layermaps; double droprate; int *initialized; unsigned *initial_x; @@ -424,7 +427,7 @@ void *run_read_parallel(void *v) { } madvise(map, a->len, MADV_RANDOM); // sequential, but from several pointers at once - do_read_parallel(map, a->len, a->offset, a->reading, a->reader, a->progress_seq, a->exclude, a->include, a->exclude_all, a->fname, a->basezoom, a->source, a->nlayers, a->droprate, a->initialized, a->initial_x, a->initial_y, a->file_keys, a->maxzoom); + do_read_parallel(map, a->len, a->offset, a->reading, a->reader, a->progress_seq, a->exclude, a->include, a->exclude_all, a->fname, a->basezoom, a->source, a->nlayers, a->layermaps, a->droprate, a->initialized, a->initial_x, a->initial_y, a->file_keys, a->maxzoom); madvise(map, a->len, MADV_DONTNEED); if (munmap(map, a->len) != 0) { @@ -441,7 +444,7 @@ void *run_read_parallel(void *v) { return NULL; } -void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile int *is_parsing, pthread_t *parallel_parser, bool &parser_created, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom) { +void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile int *is_parsing, pthread_t *parallel_parser, bool &parser_created, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > &layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom) { // This has to kick off an intermediate thread to start the parser threads, // so the main thread can get back to reading the next input stage while // the intermediate thread waits for the completion of the parser threads. @@ -470,6 +473,7 @@ void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile i rpa->basezoom = basezoom; rpa->source = source; rpa->nlayers = nlayers; + rpa->layermaps = &layermaps; rpa->droprate = droprate; rpa->initialized = initialized; rpa->initial_x = initial_x; @@ -976,6 +980,64 @@ int read_input(std::vector &sources, char *fname, const char *layername, } } + std::vector layernames; + for (size_t l = 0; l < nlayers; l++) { + if (layername != NULL) { + layernames.push_back(std::string(layername)); + } else { + const char *src; + if (sources.size() < 1) { + src = fname; + } else if (sources[l].layer.size() != 0) { + src = sources[l].layer.c_str(); + } else { + src = sources[l].file.c_str(); + } + + // Find the last component of the pathname + const char *ocp, *use = src; + for (ocp = src; *ocp; ocp++) { + if (*ocp == '/' && ocp[1] != '\0') { + use = ocp + 1; + } + } + std::string trunc = std::string(use); + + // Trim .json or .mbtiles from the name + ssize_t cp; + cp = trunc.find(".json"); + if (cp >= 0) { + trunc = trunc.substr(0, cp); + } + cp = trunc.find(".mbtiles"); + if (cp >= 0) { + trunc = trunc.substr(0, cp); + } + + // Trim out characters that can't be part of selector + std::string out; + for (size_t p = 0; p < trunc.size(); p++) { + if (isalpha(trunc[p]) || isdigit(trunc[p]) || trunc[p] == '_') { + out.append(trunc, p, 1); + } + } + layernames.push_back(out); + + if (!quiet) { + fprintf(stderr, "For layer %d, using name \"%s\"\n", (int) l, out.c_str()); + } + } + } + + std::map layermap; + for (size_t l = 0; l < nlayers; l++) { + layermap.insert(std::pair(layernames[l], l)); + } + std::vector > layermaps; + for (size_t l = 0; l < CPUS; l++) { + layermaps.push_back(layermap); + } + size_t nsources = sources.size(); if (nsources == 0) { nsources = 1; @@ -1026,7 +1088,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, } if (map != NULL && map != MAP_FAILED) { - do_read_parallel(map, st.st_size - off, overall_offset, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom); + do_read_parallel(map, st.st_size - off, overall_offset, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, &layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom); overall_offset += st.st_size - off; checkdisk(reader, CPUS); @@ -1094,7 +1156,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, } fflush(readfp); - start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom); + start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom); initial_offset += ahead; overall_offset += ahead; @@ -1131,7 +1193,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, fflush(readfp); if (ahead > 0) { - start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom); + start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom); if (parser_created) { if (pthread_join(parallel_parser, NULL) != 0) { @@ -1148,7 +1210,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, long long layer_seq = overall_offset; json_pull *jp = json_begin_file(fp); - parse_json(jp, reading.c_str(), &layer_seq, &progress_seq, &reader[0].metapos, &reader[0].geompos, &reader[0].indexpos, exclude, include, exclude_all, reader[0].metafile, reader[0].geomfile, reader[0].indexfile, reader[0].poolfile, reader[0].treefile, fname, basezoom, source < nlayers ? source : 0, droprate, reader[0].file_bbox, 0, &initialized[0], &initial_x[0], &initial_y[0], reader, &file_keys[source < nlayers ? source : 0], maxzoom); + parse_json(jp, reading.c_str(), &layer_seq, &progress_seq, &reader[0].metapos, &reader[0].geompos, &reader[0].indexpos, exclude, include, exclude_all, reader[0].metafile, reader[0].geomfile, reader[0].indexfile, reader[0].poolfile, reader[0].treefile, fname, basezoom, source < nlayers ? source : 0, droprate, reader[0].file_bbox, 0, &initialized[0], &initial_x[0], &initial_y[0], reader, &file_keys[source < nlayers ? source : 0], maxzoom, &layermaps[0]); json_end(jp); overall_offset = layer_seq; checkdisk(reader, CPUS); @@ -1191,55 +1253,6 @@ int read_input(std::vector &sources, char *fname, const char *layername, } } - std::vector layernames; - for (size_t l = 0; l < nlayers; l++) { - if (layername != NULL) { - layernames.push_back(std::string(layername)); - } else { - const char *src; - if (sources.size() < 1) { - src = fname; - } else if (sources[l].layer.size() != 0) { - src = sources[l].layer.c_str(); - } else { - src = sources[l].file.c_str(); - } - - // Find the last component of the pathname - const char *ocp, *use = src; - for (ocp = src; *ocp; ocp++) { - if (*ocp == '/' && ocp[1] != '\0') { - use = ocp + 1; - } - } - std::string trunc = std::string(use); - - // Trim .json or .mbtiles from the name - ssize_t cp; - cp = trunc.find(".json"); - if (cp >= 0) { - trunc = trunc.substr(0, cp); - } - cp = trunc.find(".mbtiles"); - if (cp >= 0) { - trunc = trunc.substr(0, cp); - } - - // Trim out characters that can't be part of selector - std::string out; - for (size_t p = 0; p < trunc.size(); p++) { - if (isalpha(trunc[p]) || isdigit(trunc[p]) || trunc[p] == '_') { - out.append(trunc, p, 1); - } - } - layernames.push_back(out); - - if (!quiet) { - fprintf(stderr, "For layer %d, using name \"%s\"\n", (int) l, out.c_str()); - } - } - } - // Create a combined string pool and a combined metadata file // but keep track of the offsets into it since we still need // segment+offset to find the data. From c26fa235647d1334c331eec365c7e6c81edfc627 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Mon, 29 Aug 2016 14:59:28 -0700 Subject: [PATCH 02/13] Per-thread layermap will contain the file keys, not just a layer ID --- geojson.cpp | 8 ++++---- geojson.hpp | 4 ++-- main.cpp | 12 ++++++------ mbtiles.hpp | 9 +++++++++ 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/geojson.cpp b/geojson.cpp index aaf0143..72330de 100644 --- a/geojson.cpp +++ b/geojson.cpp @@ -167,7 +167,7 @@ long long parse_geometry(int t, json_object *j, long long *bbox, drawvec &out, i return g; } -int serialize_geometry(json_object *geometry, json_object *properties, json_object *id, const char *reading, int line, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, const char *fname, int basezoom, int layer, double droprate, long long *file_bbox, json_object *tippecanoe, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, json_object *feature, std::map *layermap) { +int serialize_geometry(json_object *geometry, json_object *properties, json_object *id, const char *reading, int line, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, const char *fname, int basezoom, int layer, double droprate, long long *file_bbox, json_object *tippecanoe, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, json_object *feature, std::map *layermap) { json_object *geometry_type = json_hash_get(geometry, "type"); if (geometry_type == NULL) { static int warned = 0; @@ -373,12 +373,12 @@ int serialize_geometry(json_object *geometry, json_object *properties, json_obje if (tippecanoe_layername.size() != 0) { if (layermap->count(tippecanoe_layername) == 0) { - layermap->insert(std::pair(tippecanoe_layername, layermap->size())); + layermap->insert(std::pair(tippecanoe_layername, layermap_entry(layermap->size()))); } auto ai = layermap->find(tippecanoe_layername); if (ai != layermap->end()) { - layer = ai->second; + layer = ai->second.id; } else { fprintf(stderr, "Internal error: can't find layer name %s\n", tippecanoe_layername.c_str()); exit(EXIT_FAILURE); @@ -471,7 +471,7 @@ void check_crs(json_object *j, const char *reading) { } } -void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap) { +void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap) { long long found_hashes = 0; long long found_features = 0; long long found_geometries = 0; diff --git a/geojson.hpp b/geojson.hpp index 83ebc47..6d4b1fe 100644 --- a/geojson.hpp +++ b/geojson.hpp @@ -26,9 +26,9 @@ struct parse_json_args { struct reader *readers; std::set *file_keys; int maxzoom; - std::map *layermap; + std::map *layermap; }; struct json_pull *json_begin_map(char *map, long long len); -void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap); +void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap); void *run_parse_json(void *v); diff --git a/main.cpp b/main.cpp index 66289b4..849643b 100644 --- a/main.cpp +++ b/main.cpp @@ -300,7 +300,7 @@ void *run_sort(void *v) { return NULL; } -void do_read_parallel(char *map, long long len, long long initial_offset, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > *layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom) { +void do_read_parallel(char *map, long long len, long long initial_offset, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > *layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom) { long long segs[CPUS + 1]; segs[0] = 0; segs[CPUS] = len; @@ -400,7 +400,7 @@ struct read_parallel_arg { int basezoom; int source; int nlayers; - std::vector > *layermaps; + std::vector > *layermaps; double droprate; int *initialized; unsigned *initial_x; @@ -444,7 +444,7 @@ void *run_read_parallel(void *v) { return NULL; } -void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile int *is_parsing, pthread_t *parallel_parser, bool &parser_created, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > &layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom) { +void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile int *is_parsing, pthread_t *parallel_parser, bool &parser_created, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > &layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom) { // This has to kick off an intermediate thread to start the parser threads, // so the main thread can get back to reading the next input stage while // the intermediate thread waits for the completion of the parser threads. @@ -1029,11 +1029,11 @@ int read_input(std::vector &sources, char *fname, const char *layername, } } - std::map layermap; + std::map layermap; for (size_t l = 0; l < nlayers; l++) { - layermap.insert(std::pair(layernames[l], l)); + layermap.insert(std::pair(layernames[l], layermap_entry(l))); } - std::vector > layermaps; + std::vector > layermaps; for (size_t l = 0; l < CPUS; l++) { layermaps.push_back(layermap); } diff --git a/mbtiles.hpp b/mbtiles.hpp index 93d0462..e7ddc23 100644 --- a/mbtiles.hpp +++ b/mbtiles.hpp @@ -5,6 +5,15 @@ struct type_and_string { bool operator<(const type_and_string &o) const; }; +struct layermap_entry { + size_t id; + std::set file_keys; + + layermap_entry(size_t _id) { + id = _id; + } +}; + 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); From 7f49ce5caab5b9cdb7f5fb6dfbaec84022d9a56a Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Mon, 29 Aug 2016 16:38:57 -0700 Subject: [PATCH 03/13] Merge per-thread layer names and file keys --- geojson.cpp | 15 +++--- geojson.hpp | 3 +- main.cpp | 52 ++++++++++++++++--- mbtiles.cpp | 15 ++++-- mbtiles.hpp | 2 +- ...s%named%alg_-Lalbania@tests%named%alb.json | 2 +- tile-join.cpp | 8 ++- 7 files changed, 75 insertions(+), 22 deletions(-) diff --git a/geojson.cpp b/geojson.cpp index 72330de..32f6ddd 100644 --- a/geojson.cpp +++ b/geojson.cpp @@ -167,7 +167,7 @@ long long parse_geometry(int t, json_object *j, long long *bbox, drawvec &out, i return g; } -int serialize_geometry(json_object *geometry, json_object *properties, json_object *id, const char *reading, int line, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, const char *fname, int basezoom, int layer, double droprate, long long *file_bbox, json_object *tippecanoe, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, json_object *feature, std::map *layermap) { +int serialize_geometry(json_object *geometry, json_object *properties, json_object *id, const char *reading, int line, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, const char *fname, int basezoom, int layer, double droprate, long long *file_bbox, json_object *tippecanoe, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, json_object *feature, std::map *layermap, std::string const &layername) { json_object *geometry_type = json_hash_get(geometry, "type"); if (geometry_type == NULL) { static int warned = 0; @@ -310,6 +310,9 @@ int serialize_geometry(json_object *geometry, json_object *properties, json_obje if (tas.type >= 0) { file_keys->insert(tas); + + auto fk = layermap->find(layername); + fk->second.file_keys.insert(tas); } } } @@ -471,7 +474,7 @@ void check_crs(json_object *j, const char *reading) { } } -void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap) { +void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap, std::string layername) { long long found_hashes = 0; long long found_features = 0; long long found_geometries = 0; @@ -539,7 +542,7 @@ void parse_json(json_pull *jp, const char *reading, volatile long long *layer_se } found_geometries++; - serialize_geometry(j, NULL, NULL, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, NULL, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap); + serialize_geometry(j, NULL, NULL, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, NULL, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap, layername); json_free(j); continue; } @@ -581,10 +584,10 @@ void parse_json(json_pull *jp, const char *reading, volatile long long *layer_se if (geometries != NULL) { size_t g; for (g = 0; g < geometries->length; g++) { - serialize_geometry(geometries->array[g], properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap); + serialize_geometry(geometries->array[g], properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap, layername); } } else { - serialize_geometry(geometry, properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap); + serialize_geometry(geometry, properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap, layername); } json_free(j); @@ -596,7 +599,7 @@ void parse_json(json_pull *jp, const char *reading, volatile long long *layer_se void *run_parse_json(void *v) { struct parse_json_args *pja = (struct parse_json_args *) v; - parse_json(pja->jp, pja->reading, pja->layer_seq, pja->progress_seq, pja->metapos, pja->geompos, pja->indexpos, pja->exclude, pja->include, pja->exclude_all, pja->metafile, pja->geomfile, pja->indexfile, pja->poolfile, pja->treefile, pja->fname, pja->basezoom, pja->layer, pja->droprate, pja->file_bbox, pja->segment, pja->initialized, pja->initial_x, pja->initial_y, pja->readers, pja->file_keys, pja->maxzoom, pja->layermap); + parse_json(pja->jp, pja->reading, pja->layer_seq, pja->progress_seq, pja->metapos, pja->geompos, pja->indexpos, pja->exclude, pja->include, pja->exclude_all, pja->metafile, pja->geomfile, pja->indexfile, pja->poolfile, pja->treefile, pja->fname, pja->basezoom, pja->layer, pja->droprate, pja->file_bbox, pja->segment, pja->initialized, pja->initial_x, pja->initial_y, pja->readers, pja->file_keys, pja->maxzoom, pja->layermap, *pja->layername); return NULL; } diff --git a/geojson.hpp b/geojson.hpp index 6d4b1fe..b055bae 100644 --- a/geojson.hpp +++ b/geojson.hpp @@ -27,8 +27,9 @@ struct parse_json_args { std::set *file_keys; int maxzoom; std::map *layermap; + std::string *layername; }; struct json_pull *json_begin_map(char *map, long long len); -void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap); +void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap, std::string layername); void *run_parse_json(void *v); diff --git a/main.cpp b/main.cpp index 849643b..d803518 100644 --- a/main.cpp +++ b/main.cpp @@ -300,7 +300,7 @@ void *run_sort(void *v) { return NULL; } -void do_read_parallel(char *map, long long len, long long initial_offset, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > *layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom) { +void do_read_parallel(char *map, long long len, long long initial_offset, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > *layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom, std::string layername) { long long segs[CPUS + 1]; segs[0] = 0; segs[CPUS] = len; @@ -358,6 +358,7 @@ void do_read_parallel(char *map, long long len, long long initial_offset, const pja[i].file_keys = &file_subkeys[i]; pja[i].maxzoom = maxzoom; pja[i].layermap = &(*layermaps)[i]; + pja[i].layername = &layername; if (pthread_create(&pthreads[i], NULL, run_parse_json, &pja[i]) != 0) { perror("pthread_create"); @@ -406,6 +407,7 @@ struct read_parallel_arg { unsigned *initial_x; unsigned *initial_y; std::set *file_keys; + std::string layername; }; void *run_read_parallel(void *v) { @@ -427,7 +429,7 @@ void *run_read_parallel(void *v) { } madvise(map, a->len, MADV_RANDOM); // sequential, but from several pointers at once - do_read_parallel(map, a->len, a->offset, a->reading, a->reader, a->progress_seq, a->exclude, a->include, a->exclude_all, a->fname, a->basezoom, a->source, a->nlayers, a->layermaps, a->droprate, a->initialized, a->initial_x, a->initial_y, a->file_keys, a->maxzoom); + do_read_parallel(map, a->len, a->offset, a->reading, a->reader, a->progress_seq, a->exclude, a->include, a->exclude_all, a->fname, a->basezoom, a->source, a->nlayers, a->layermaps, a->droprate, a->initialized, a->initial_x, a->initial_y, a->file_keys, a->maxzoom, a->layername); madvise(map, a->len, MADV_DONTNEED); if (munmap(map, a->len) != 0) { @@ -444,7 +446,7 @@ void *run_read_parallel(void *v) { return NULL; } -void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile int *is_parsing, pthread_t *parallel_parser, bool &parser_created, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > &layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom) { +void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile int *is_parsing, pthread_t *parallel_parser, bool &parser_created, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > &layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom, std::string layername) { // This has to kick off an intermediate thread to start the parser threads, // so the main thread can get back to reading the next input stage while // the intermediate thread waits for the completion of the parser threads. @@ -480,6 +482,7 @@ void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile i rpa->initial_y = initial_y; rpa->file_keys = file_keys; rpa->maxzoom = maxzoom; + rpa->layername = layername; if (pthread_create(parallel_parser, NULL, run_read_parallel, rpa) != 0) { perror("pthread_create"); @@ -862,6 +865,37 @@ void radix(struct reader *reader, int nreaders, FILE *geomfile, int geomfd, FILE } } +std::map merge_layermaps(std::vector > const &maps) { + std::map out; + + for (size_t i = 0; i < maps.size(); i++) { + for (auto map = maps[i].begin(); map != maps[i].end(); ++map) { + if (out.count(map->first) == 0) { + out.insert(std::pair(map->first, layermap_entry(out.size()))); + } + + auto out_entry = out.find(map->first); + if (out_entry == out.end()) { + fprintf(stderr, "Internal error merging layers\n"); + exit(EXIT_FAILURE); + } + + for (auto fk = map->second.file_keys.begin(); fk != map->second.file_keys.end(); ++fk) { + out_entry->second.file_keys.insert(*fk); + } + + if (additional[A_CALCULATE_FEATURE_DENSITY]) { + type_and_string tas; + tas.type = VT_NUMBER; + tas.string = "tippecanoe_feature_density"; + out_entry->second.file_keys.insert(tas); + } + } + } + + return out; +} + int read_input(std::vector &sources, char *fname, const char *layername, int maxzoom, int minzoom, int basezoom, double basezoom_marker_width, sqlite3 *outdb, std::set *exclude, std::set *include, int exclude_all, double droprate, int buffer, const char *tmpdir, double gamma, int read_parallel, int forcetable, const char *attribution) { int ret = EXIT_SUCCESS; @@ -1088,7 +1122,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, } if (map != NULL && map != MAP_FAILED) { - do_read_parallel(map, st.st_size - off, overall_offset, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, &layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom); + do_read_parallel(map, st.st_size - off, overall_offset, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, &layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom, layernames[source < nlayers ? source : 0]); overall_offset += st.st_size - off; checkdisk(reader, CPUS); @@ -1156,7 +1190,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, } fflush(readfp); - start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom); + start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom, layernames[source < nlayers ? source : 0]); initial_offset += ahead; overall_offset += ahead; @@ -1193,7 +1227,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, fflush(readfp); if (ahead > 0) { - start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom); + start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom, layernames[source < nlayers ? source : 0]); if (parser_created) { if (pthread_join(parallel_parser, NULL) != 0) { @@ -1210,7 +1244,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, long long layer_seq = overall_offset; json_pull *jp = json_begin_file(fp); - parse_json(jp, reading.c_str(), &layer_seq, &progress_seq, &reader[0].metapos, &reader[0].geompos, &reader[0].indexpos, exclude, include, exclude_all, reader[0].metafile, reader[0].geomfile, reader[0].indexfile, reader[0].poolfile, reader[0].treefile, fname, basezoom, source < nlayers ? source : 0, droprate, reader[0].file_bbox, 0, &initialized[0], &initial_x[0], &initial_y[0], reader, &file_keys[source < nlayers ? source : 0], maxzoom, &layermaps[0]); + parse_json(jp, reading.c_str(), &layer_seq, &progress_seq, &reader[0].metapos, &reader[0].geompos, &reader[0].indexpos, exclude, include, exclude_all, reader[0].metafile, reader[0].geomfile, reader[0].indexfile, reader[0].poolfile, reader[0].treefile, fname, basezoom, source < nlayers ? source : 0, droprate, reader[0].file_bbox, 0, &initialized[0], &initial_x[0], &initial_y[0], reader, &file_keys[source < nlayers ? source : 0], maxzoom, &layermaps[0], layernames[source < nlayers ? source : 0]); json_end(jp); overall_offset = layer_seq; checkdisk(reader, CPUS); @@ -1711,7 +1745,9 @@ int read_input(std::vector &sources, char *fname, const char *layername, midlon = maxlon; } - mbtiles_write_metadata(outdb, fname, layernames, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, midlat, midlon, file_keys, nlayers, forcetable, attribution); + std::map merged_lm = merge_layermaps(layermaps); + + mbtiles_write_metadata(outdb, fname, layernames, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, midlat, midlon, file_keys, nlayers, forcetable, attribution, merged_lm); return ret; } diff --git a/mbtiles.cpp b/mbtiles.cpp index 0884a1e..748e81d 100644 --- a/mbtiles.cpp +++ b/mbtiles.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "main.hpp" #include "pool.hpp" #include "mbtiles.hpp" @@ -132,7 +133,7 @@ bool type_and_string::operator<(const type_and_string &o) const { return false; } -void mbtiles_write_metadata(sqlite3 *outdb, const char *fname, std::vector &layername, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, std::vector > &file_keys, int nlayers, int forcetable, const char *attribution) { +void mbtiles_write_metadata(sqlite3 *outdb, const char *fname, std::vector &layername, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, std::vector > &file_keys, int nlayers, int forcetable, const char *attribution, std::map const &layermap) { char *sql, *err; sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('name', %Q);", fname); @@ -230,19 +231,25 @@ void mbtiles_write_metadata(sqlite3 *outdb, const char *fname, std::vector lnames; + for (auto ai = layermap.begin(); ai != layermap.end(); ++ai) { + lnames.push_back(ai->first); + } + int i; - for (i = 0; i < nlayers; i++) { + for (i = 0; i < lnames.size(); i++) { if (i != 0) { aprintf(&buf, ", "); } aprintf(&buf, "{ \"id\": \""); - quote(&buf, layername[i].c_str()); + quote(&buf, lnames[i].c_str()); aprintf(&buf, "\", \"description\": \"\", \"minzoom\": %d, \"maxzoom\": %d, \"fields\": {", minzoom, maxzoom); + auto fk = layermap.find(lnames[i]); std::set::iterator j; bool first = true; - for (j = file_keys[i].begin(); j != file_keys[i].end(); ++j) { + for (j = fk->second.file_keys.begin(); j != fk->second.file_keys.end(); ++j) { if (first) { first = false; } else { diff --git a/mbtiles.hpp b/mbtiles.hpp index e7ddc23..0f14881 100644 --- a/mbtiles.hpp +++ b/mbtiles.hpp @@ -18,7 +18,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 *fname, std::vector &layername, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, std::vector > &file_keys, int nlayers, int forcetable, const char *attribution); +void mbtiles_write_metadata(sqlite3 *outdb, const char *fname, std::vector &layername, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, std::vector > &file_keys, int nlayers, int forcetable, const char *attribution, std::map const &layermap); void mbtiles_close(sqlite3 *outdb, char **argv); diff --git a/tests/named/out/-z0_-Lalgeria@tests%named%alg_-Lalbania@tests%named%alb.json b/tests/named/out/-z0_-Lalgeria@tests%named%alg_-Lalbania@tests%named%alb.json index 5f8ef5b..5aabfd7 100644 --- a/tests/named/out/-z0_-Lalgeria@tests%named%alg_-Lalbania@tests%named%alb.json +++ b/tests/named/out/-z0_-Lalgeria@tests%named%alg_-Lalbania@tests%named%alb.json @@ -3,7 +3,7 @@ "center": "0.000000,18.975561,0", "description": "tests/named/out/-z0_-Lalgeria@tests%named%alg_-Lalbania@tests%named%alb.json.check.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"algeria\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"abbrev\": \"String\", \"abbrev_len\": \"Number\", \"adm0_a3\": \"String\", \"adm0_a3_is\": \"String\", \"adm0_a3_un\": \"Number\", \"adm0_a3_us\": \"String\", \"adm0_a3_wb\": \"Number\", \"adm0_dif\": \"Number\", \"admin\": \"String\", \"brk_a3\": \"String\", \"brk_diff\": \"Number\", \"brk_name\": \"String\", \"continent\": \"String\", \"economy\": \"String\", \"featurecla\": \"String\", \"formal_en\": \"String\", \"gdp_md_est\": \"Number\", \"gdp_year\": \"Number\", \"geou_dif\": \"Number\", \"geounit\": \"String\", \"gu_a3\": \"String\", \"homepart\": \"Number\", \"income_grp\": \"String\", \"iso_a2\": \"String\", \"iso_a3\": \"String\", \"iso_n3\": \"String\", \"labelrank\": \"Number\", \"lastcensus\": \"Number\", \"level\": \"Number\", \"long_len\": \"Number\", \"mapcolor13\": \"Number\", \"mapcolor7\": \"Number\", \"mapcolor8\": \"Number\", \"mapcolor9\": \"Number\", \"name\": \"String\", \"name_len\": \"Number\", \"name_long\": \"String\", \"name_sort\": \"String\", \"pop_est\": \"Number\", \"pop_year\": \"Number\", \"postal\": \"String\", \"region_un\": \"String\", \"region_wb\": \"String\", \"scalerank\": \"Number\", \"sov_a3\": \"String\", \"sovereignt\": \"String\", \"su_a3\": \"String\", \"su_dif\": \"Number\", \"subregion\": \"String\", \"subunit\": \"String\", \"tiny\": \"Number\", \"type\": \"String\", \"un_a3\": \"String\", \"wb_a2\": \"String\", \"wb_a3\": \"String\", \"wikipedia\": \"Number\", \"woe_id\": \"Number\"} }, { \"id\": \"albania\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"abbrev\": \"String\", \"abbrev_len\": \"Number\", \"adm0_a3\": \"String\", \"adm0_a3_is\": \"String\", \"adm0_a3_un\": \"Number\", \"adm0_a3_us\": \"String\", \"adm0_a3_wb\": \"Number\", \"adm0_dif\": \"Number\", \"admin\": \"String\", \"brk_a3\": \"String\", \"brk_diff\": \"Number\", \"brk_name\": \"String\", \"continent\": \"String\", \"economy\": \"String\", \"featurecla\": \"String\", \"formal_en\": \"String\", \"gdp_md_est\": \"Number\", \"gdp_year\": \"Number\", \"geou_dif\": \"Number\", \"geounit\": \"String\", \"gu_a3\": \"String\", \"homepart\": \"Number\", \"income_grp\": \"String\", \"iso_a2\": \"String\", \"iso_a3\": \"String\", \"iso_n3\": \"String\", \"labelrank\": \"Number\", \"lastcensus\": \"Number\", \"level\": \"Number\", \"long_len\": \"Number\", \"mapcolor13\": \"Number\", \"mapcolor7\": \"Number\", \"mapcolor8\": \"Number\", \"mapcolor9\": \"Number\", \"name\": \"String\", \"name_len\": \"Number\", \"name_long\": \"String\", \"name_sort\": \"String\", \"pop_est\": \"Number\", \"pop_year\": \"Number\", \"postal\": \"String\", \"region_un\": \"String\", \"region_wb\": \"String\", \"scalerank\": \"Number\", \"sov_a3\": \"String\", \"sovereignt\": \"String\", \"su_a3\": \"String\", \"su_dif\": \"Number\", \"subregion\": \"String\", \"subunit\": \"String\", \"tiny\": \"Number\", \"type\": \"String\", \"un_a3\": \"String\", \"wb_a2\": \"String\", \"wb_a3\": \"String\", \"wikipedia\": \"Number\", \"woe_id\": \"Number\"} }, { \"id\": \"sweden\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"abbrev\": \"String\", \"abbrev_len\": \"Number\", \"adm0_a3\": \"String\", \"adm0_a3_is\": \"String\", \"adm0_a3_un\": \"Number\", \"adm0_a3_us\": \"String\", \"adm0_a3_wb\": \"Number\", \"adm0_dif\": \"Number\", \"admin\": \"String\", \"brk_a3\": \"String\", \"brk_diff\": \"Number\", \"brk_name\": \"String\", \"continent\": \"String\", \"economy\": \"String\", \"featurecla\": \"String\", \"formal_en\": \"String\", \"gdp_md_est\": \"Number\", \"gdp_year\": \"Number\", \"geou_dif\": \"Number\", \"geounit\": \"String\", \"gu_a3\": \"String\", \"homepart\": \"Number\", \"income_grp\": \"String\", \"iso_a2\": \"String\", \"iso_a3\": \"String\", \"iso_n3\": \"String\", \"labelrank\": \"Number\", \"lastcensus\": \"Number\", \"level\": \"Number\", \"long_len\": \"Number\", \"mapcolor13\": \"Number\", \"mapcolor7\": \"Number\", \"mapcolor8\": \"Number\", \"mapcolor9\": \"Number\", \"name\": \"String\", \"name_len\": \"Number\", \"name_long\": \"String\", \"name_sort\": \"String\", \"pop_est\": \"Number\", \"pop_year\": \"Number\", \"postal\": \"String\", \"region_un\": \"String\", \"region_wb\": \"String\", \"scalerank\": \"Number\", \"sov_a3\": \"String\", \"sovereignt\": \"String\", \"su_a3\": \"String\", \"su_dif\": \"Number\", \"subregion\": \"String\", \"subunit\": \"String\", \"tiny\": \"Number\", \"type\": \"String\", \"un_a3\": \"String\", \"wb_a2\": \"String\", \"wb_a3\": \"String\", \"wikipedia\": \"Number\", \"woe_id\": \"Number\"} } ] }", +"json": "{\"vector_layers\": [ { \"id\": \"albania\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"abbrev\": \"String\", \"abbrev_len\": \"Number\", \"adm0_a3\": \"String\", \"adm0_a3_is\": \"String\", \"adm0_a3_un\": \"Number\", \"adm0_a3_us\": \"String\", \"adm0_a3_wb\": \"Number\", \"adm0_dif\": \"Number\", \"admin\": \"String\", \"brk_a3\": \"String\", \"brk_diff\": \"Number\", \"brk_name\": \"String\", \"continent\": \"String\", \"economy\": \"String\", \"featurecla\": \"String\", \"formal_en\": \"String\", \"gdp_md_est\": \"Number\", \"gdp_year\": \"Number\", \"geou_dif\": \"Number\", \"geounit\": \"String\", \"gu_a3\": \"String\", \"homepart\": \"Number\", \"income_grp\": \"String\", \"iso_a2\": \"String\", \"iso_a3\": \"String\", \"iso_n3\": \"String\", \"labelrank\": \"Number\", \"lastcensus\": \"Number\", \"level\": \"Number\", \"long_len\": \"Number\", \"mapcolor13\": \"Number\", \"mapcolor7\": \"Number\", \"mapcolor8\": \"Number\", \"mapcolor9\": \"Number\", \"name\": \"String\", \"name_len\": \"Number\", \"name_long\": \"String\", \"name_sort\": \"String\", \"pop_est\": \"Number\", \"pop_year\": \"Number\", \"postal\": \"String\", \"region_un\": \"String\", \"region_wb\": \"String\", \"scalerank\": \"Number\", \"sov_a3\": \"String\", \"sovereignt\": \"String\", \"su_a3\": \"String\", \"su_dif\": \"Number\", \"subregion\": \"String\", \"subunit\": \"String\", \"tiny\": \"Number\", \"type\": \"String\", \"un_a3\": \"String\", \"wb_a2\": \"String\", \"wb_a3\": \"String\", \"wikipedia\": \"Number\", \"woe_id\": \"Number\"} }, { \"id\": \"algeria\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"abbrev\": \"String\", \"abbrev_len\": \"Number\", \"adm0_a3\": \"String\", \"adm0_a3_is\": \"String\", \"adm0_a3_un\": \"Number\", \"adm0_a3_us\": \"String\", \"adm0_a3_wb\": \"Number\", \"adm0_dif\": \"Number\", \"admin\": \"String\", \"brk_a3\": \"String\", \"brk_diff\": \"Number\", \"brk_name\": \"String\", \"continent\": \"String\", \"economy\": \"String\", \"featurecla\": \"String\", \"formal_en\": \"String\", \"gdp_md_est\": \"Number\", \"gdp_year\": \"Number\", \"geou_dif\": \"Number\", \"geounit\": \"String\", \"gu_a3\": \"String\", \"homepart\": \"Number\", \"income_grp\": \"String\", \"iso_a2\": \"String\", \"iso_a3\": \"String\", \"iso_n3\": \"String\", \"labelrank\": \"Number\", \"lastcensus\": \"Number\", \"level\": \"Number\", \"long_len\": \"Number\", \"mapcolor13\": \"Number\", \"mapcolor7\": \"Number\", \"mapcolor8\": \"Number\", \"mapcolor9\": \"Number\", \"name\": \"String\", \"name_len\": \"Number\", \"name_long\": \"String\", \"name_sort\": \"String\", \"pop_est\": \"Number\", \"pop_year\": \"Number\", \"postal\": \"String\", \"region_un\": \"String\", \"region_wb\": \"String\", \"scalerank\": \"Number\", \"sov_a3\": \"String\", \"sovereignt\": \"String\", \"su_a3\": \"String\", \"su_dif\": \"Number\", \"subregion\": \"String\", \"subunit\": \"String\", \"tiny\": \"Number\", \"type\": \"String\", \"un_a3\": \"String\", \"wb_a2\": \"String\", \"wb_a3\": \"String\", \"wikipedia\": \"Number\", \"woe_id\": \"Number\"} }, { \"id\": \"sweden\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"abbrev\": \"String\", \"abbrev_len\": \"Number\", \"adm0_a3\": \"String\", \"adm0_a3_is\": \"String\", \"adm0_a3_un\": \"Number\", \"adm0_a3_us\": \"String\", \"adm0_a3_wb\": \"Number\", \"adm0_dif\": \"Number\", \"admin\": \"String\", \"brk_a3\": \"String\", \"brk_diff\": \"Number\", \"brk_name\": \"String\", \"continent\": \"String\", \"economy\": \"String\", \"featurecla\": \"String\", \"formal_en\": \"String\", \"gdp_md_est\": \"Number\", \"gdp_year\": \"Number\", \"geou_dif\": \"Number\", \"geounit\": \"String\", \"gu_a3\": \"String\", \"homepart\": \"Number\", \"income_grp\": \"String\", \"iso_a2\": \"String\", \"iso_a3\": \"String\", \"iso_n3\": \"String\", \"labelrank\": \"Number\", \"lastcensus\": \"Number\", \"level\": \"Number\", \"long_len\": \"Number\", \"mapcolor13\": \"Number\", \"mapcolor7\": \"Number\", \"mapcolor8\": \"Number\", \"mapcolor9\": \"Number\", \"name\": \"String\", \"name_len\": \"Number\", \"name_long\": \"String\", \"name_sort\": \"String\", \"pop_est\": \"Number\", \"pop_year\": \"Number\", \"postal\": \"String\", \"region_un\": \"String\", \"region_wb\": \"String\", \"scalerank\": \"Number\", \"sov_a3\": \"String\", \"sovereignt\": \"String\", \"su_a3\": \"String\", \"su_dif\": \"Number\", \"subregion\": \"String\", \"subunit\": \"String\", \"tiny\": \"Number\", \"type\": \"String\", \"un_a3\": \"String\", \"wb_a2\": \"String\", \"wb_a3\": \"String\", \"wikipedia\": \"Number\", \"woe_id\": \"Number\"} } ] }", "maxzoom": "0", "minzoom": "0", "name": "tests/named/out/-z0_-Lalgeria@tests%named%alg_-Lalbania@tests%named%alb.json.check.mbtiles", diff --git a/tile-join.cpp b/tile-join.cpp index 046e827..a64e496 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -423,7 +423,13 @@ int main(int argc, char **argv) { decode(argv[i], csv, file_keys, layernames, &nlayers, outdb, &st, header, mapping, exclude, ifmatched, attribution); } - mbtiles_write_metadata(outdb, outfile, layernames, st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.midlat, st.midlon, file_keys, nlayers, 0, attribution.size() != 0 ? attribution.c_str() : NULL); + std::map layermap; + for (i = 0; i < nlayers; i++) { + layermap.insert(std::pair(layernames[i], layermap_entry(layermap.size()))); + layermap.find(layernames[i])->second.file_keys = file_keys[i]; + } + + mbtiles_write_metadata(outdb, outfile, layernames, st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.midlat, st.midlon, file_keys, nlayers, 0, attribution.size() != 0 ? attribution.c_str() : NULL, layermap); mbtiles_close(outdb, argv); return 0; From 531c238c5b39b5027b18dacabe868b280a7da086 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Mon, 29 Aug 2016 17:42:46 -0700 Subject: [PATCH 04/13] Pass the layer maps through into tiling --- main.cpp | 4 ++-- serial.cpp | 3 +++ tile.cpp | 10 ++++++---- tile.hpp | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index d803518..ac620e0 100644 --- a/main.cpp +++ b/main.cpp @@ -38,12 +38,12 @@ extern "C" { #include "jsonpull/jsonpull.h" } +#include "mbtiles.hpp" #include "tile.hpp" #include "pool.hpp" #include "projection.hpp" #include "version.hpp" #include "memfile.hpp" -#include "mbtiles.hpp" #include "main.hpp" #include "geojson.hpp" #include "geometry.hpp" @@ -1661,7 +1661,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, } unsigned midx = 0, midy = 0; - int written = traverse_zooms(fd, size, meta, stringpool, &midx, &midy, layernames, maxzoom, minzoom, basezoom, outdb, droprate, buffer, fname, tmpdir, gamma, nlayers, full_detail, low_detail, min_detail, meta_off, pool_off, initial_x, initial_y, simplification); + int written = traverse_zooms(fd, size, meta, stringpool, &midx, &midy, layernames, maxzoom, minzoom, basezoom, outdb, droprate, buffer, fname, tmpdir, gamma, nlayers, full_detail, low_detail, min_detail, meta_off, pool_off, initial_x, initial_y, simplification, layermaps); if (maxzoom != written) { fprintf(stderr, "\n\n\n*** NOTE TILES ONLY COMPLETE THROUGH ZOOM %d ***\n\n\n", written); diff --git a/serial.cpp b/serial.cpp index fd98343..fa8cc38 100644 --- a/serial.cpp +++ b/serial.cpp @@ -5,8 +5,11 @@ #include #include #include +#include +#include #include "protozero/varint.hpp" #include "geometry.hpp" +#include "mbtiles.hpp" #include "tile.hpp" #include "serial.hpp" diff --git a/tile.cpp b/tile.cpp index 3293da8..0b38900 100644 --- a/tile.cpp +++ b/tile.cpp @@ -20,6 +20,7 @@ #include #include #include "mvt.hpp" +#include "mbtiles.hpp" #include "geometry.hpp" #include "tile.hpp" #include "pool.hpp" @@ -27,7 +28,6 @@ #include "serial.hpp" #include "options.hpp" #include "main.hpp" -#include "mbtiles.hpp" #define CMD_BITS 3 @@ -557,7 +557,7 @@ int manage_gap(unsigned long long index, unsigned long long *previndex, double s return 0; } -long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *stringpool, int z, unsigned tx, unsigned ty, int detail, int min_detail, int basezoom, std::vector *layernames, sqlite3 *outdb, double droprate, int buffer, const char *fname, FILE **geomfile, int minzoom, int maxzoom, double todo, volatile long long *along, long long alongminus, double gamma, int nlayers, int child_shards, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, volatile int *running, double simplification) { +long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *stringpool, int z, unsigned tx, unsigned ty, int detail, int min_detail, int basezoom, std::vector *layernames, sqlite3 *outdb, double droprate, int buffer, const char *fname, FILE **geomfile, int minzoom, int maxzoom, double todo, volatile long long *along, long long alongminus, double gamma, int nlayers, int child_shards, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, volatile int *running, double simplification, std::vector > *layermaps) { int line_detail; double fraction = 1; @@ -1155,6 +1155,7 @@ struct write_tile_args { unsigned *initial_y; volatile int *running; int err; + std::vector > *layermaps; }; void *run_thread(void *vargs) { @@ -1195,7 +1196,7 @@ void *run_thread(void *vargs) { // fprintf(stderr, "%d/%u/%u\n", z, x, y); - long long len = write_tile(geom, &geompos, arg->metabase, arg->stringpool, z, x, y, z == arg->maxzoom ? arg->full_detail : arg->low_detail, arg->min_detail, arg->basezoom, arg->layernames, arg->outdb, arg->droprate, arg->buffer, arg->fname, arg->geomfile, arg->minzoom, arg->maxzoom, arg->todo, arg->along, geompos, arg->gamma, arg->nlayers, arg->child_shards, arg->meta_off, arg->pool_off, arg->initial_x, arg->initial_y, arg->running, arg->simplification); + long long len = write_tile(geom, &geompos, arg->metabase, arg->stringpool, z, x, y, z == arg->maxzoom ? arg->full_detail : arg->low_detail, arg->min_detail, arg->basezoom, arg->layernames, arg->outdb, arg->droprate, arg->buffer, arg->fname, arg->geomfile, arg->minzoom, arg->maxzoom, arg->todo, arg->along, geompos, arg->gamma, arg->nlayers, arg->child_shards, arg->meta_off, arg->pool_off, arg->initial_x, arg->initial_y, arg->running, arg->simplification, arg->layermaps); if (len < 0) { int *err = &arg->err; @@ -1246,7 +1247,7 @@ void *run_thread(void *vargs) { return NULL; } -int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpool, unsigned *midx, unsigned *midy, std::vector &layernames, int maxzoom, int minzoom, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, const char *tmpdir, double gamma, int nlayers, int full_detail, int low_detail, int min_detail, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification) { +int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpool, unsigned *midx, unsigned *midy, std::vector &layernames, int maxzoom, int minzoom, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, const char *tmpdir, double gamma, int nlayers, int full_detail, int low_detail, int min_detail, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, std::vector > &layermaps) { int i; for (i = 0; i <= maxzoom; i++) { long long most = 0; @@ -1382,6 +1383,7 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo args[thread].pool_off = pool_off; args[thread].initial_x = initial_x; args[thread].initial_y = initial_y; + args[thread].layermaps = &layermaps; args[thread].tasks = dispatches[thread].tasks; args[thread].running = &running; diff --git a/tile.hpp b/tile.hpp index 414ba3c..e6c25b5 100644 --- a/tile.hpp +++ b/tile.hpp @@ -1,5 +1,5 @@ long long write_tile(char **geom, char *metabase, char *stringpool, unsigned *file_bbox, int z, unsigned x, unsigned y, int detail, int min_detail, int basezoom, char **layernames, sqlite3 *outdb, double droprate, int buffer, const char *fname, FILE **geomfile, int file_minzoom, int file_maxzoom, double todo, char *geomstart, long long along, double gamma, int nlayers); -int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpool, unsigned *midx, unsigned *midy, std::vector &layernames, int maxzoom, int minzoom, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, const char *tmpdir, double gamma, int nlayers, int full_detail, int low_detail, int min_detail, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification); +int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpool, unsigned *midx, unsigned *midy, std::vector &layernames, int maxzoom, int minzoom, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, const char *tmpdir, double gamma, int nlayers, int full_detail, int low_detail, int min_detail, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, std::vector > &layermap); int manage_gap(unsigned long long index, unsigned long long *previndex, double scale, double gamma, double *gap); From 31d2a3738ac82c9eaeeb887192d87dbcea73cc53 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 30 Aug 2016 13:46:37 -0700 Subject: [PATCH 05/13] Get rid of the old file_keys --- geojson.cpp | 14 ++++++-------- geojson.hpp | 3 +-- main.cpp | 34 +++++++++------------------------- mbtiles.cpp | 2 +- mbtiles.hpp | 2 +- tile-join.cpp | 2 +- tile.cpp | 4 ++-- 7 files changed, 21 insertions(+), 40 deletions(-) diff --git a/geojson.cpp b/geojson.cpp index 32f6ddd..10c1b35 100644 --- a/geojson.cpp +++ b/geojson.cpp @@ -167,7 +167,7 @@ long long parse_geometry(int t, json_object *j, long long *bbox, drawvec &out, i return g; } -int serialize_geometry(json_object *geometry, json_object *properties, json_object *id, const char *reading, int line, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, const char *fname, int basezoom, int layer, double droprate, long long *file_bbox, json_object *tippecanoe, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, json_object *feature, std::map *layermap, std::string const &layername) { +int serialize_geometry(json_object *geometry, json_object *properties, json_object *id, const char *reading, int line, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, const char *fname, int basezoom, int layer, double droprate, long long *file_bbox, json_object *tippecanoe, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, int maxzoom, json_object *feature, std::map *layermap, std::string const &layername) { json_object *geometry_type = json_hash_get(geometry, "type"); if (geometry_type == NULL) { static int warned = 0; @@ -309,8 +309,6 @@ int serialize_geometry(json_object *geometry, json_object *properties, json_obje } if (tas.type >= 0) { - file_keys->insert(tas); - auto fk = layermap->find(layername); fk->second.file_keys.insert(tas); } @@ -474,7 +472,7 @@ void check_crs(json_object *j, const char *reading) { } } -void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap, std::string layername) { +void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, int maxzoom, std::map *layermap, std::string layername) { long long found_hashes = 0; long long found_features = 0; long long found_geometries = 0; @@ -542,7 +540,7 @@ void parse_json(json_pull *jp, const char *reading, volatile long long *layer_se } found_geometries++; - serialize_geometry(j, NULL, NULL, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, NULL, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap, layername); + serialize_geometry(j, NULL, NULL, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, NULL, segment, initialized, initial_x, initial_y, readers, maxzoom, j, layermap, layername); json_free(j); continue; } @@ -584,10 +582,10 @@ void parse_json(json_pull *jp, const char *reading, volatile long long *layer_se if (geometries != NULL) { size_t g; for (g = 0; g < geometries->length; g++) { - serialize_geometry(geometries->array[g], properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap, layername); + serialize_geometry(geometries->array[g], properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, maxzoom, j, layermap, layername); } } else { - serialize_geometry(geometry, properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, file_keys, maxzoom, j, layermap, layername); + serialize_geometry(geometry, properties, id, reading, jp->line, layer_seq, progress_seq, metapos, geompos, indexpos, exclude, include, exclude_all, metafile, geomfile, indexfile, poolfile, treefile, fname, basezoom, layer, droprate, file_bbox, tippecanoe, segment, initialized, initial_x, initial_y, readers, maxzoom, j, layermap, layername); } json_free(j); @@ -599,7 +597,7 @@ void parse_json(json_pull *jp, const char *reading, volatile long long *layer_se void *run_parse_json(void *v) { struct parse_json_args *pja = (struct parse_json_args *) v; - parse_json(pja->jp, pja->reading, pja->layer_seq, pja->progress_seq, pja->metapos, pja->geompos, pja->indexpos, pja->exclude, pja->include, pja->exclude_all, pja->metafile, pja->geomfile, pja->indexfile, pja->poolfile, pja->treefile, pja->fname, pja->basezoom, pja->layer, pja->droprate, pja->file_bbox, pja->segment, pja->initialized, pja->initial_x, pja->initial_y, pja->readers, pja->file_keys, pja->maxzoom, pja->layermap, *pja->layername); + parse_json(pja->jp, pja->reading, pja->layer_seq, pja->progress_seq, pja->metapos, pja->geompos, pja->indexpos, pja->exclude, pja->include, pja->exclude_all, pja->metafile, pja->geomfile, pja->indexfile, pja->poolfile, pja->treefile, pja->fname, pja->basezoom, pja->layer, pja->droprate, pja->file_bbox, pja->segment, pja->initialized, pja->initial_x, pja->initial_y, pja->readers, pja->maxzoom, pja->layermap, *pja->layername); return NULL; } diff --git a/geojson.hpp b/geojson.hpp index b055bae..2ee4bfc 100644 --- a/geojson.hpp +++ b/geojson.hpp @@ -24,12 +24,11 @@ struct parse_json_args { unsigned *initial_x; unsigned *initial_y; struct reader *readers; - std::set *file_keys; int maxzoom; std::map *layermap; std::string *layername; }; struct json_pull *json_begin_map(char *map, long long len); -void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, std::set *file_keys, int maxzoom, std::map *layermap, std::string layername); +void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, int maxzoom, std::map *layermap, std::string layername); void *run_parse_json(void *v); diff --git a/main.cpp b/main.cpp index ac620e0..53bbf0a 100644 --- a/main.cpp +++ b/main.cpp @@ -300,7 +300,7 @@ void *run_sort(void *v) { return NULL; } -void do_read_parallel(char *map, long long len, long long initial_offset, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > *layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom, std::string layername) { +void do_read_parallel(char *map, long long len, long long initial_offset, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > *layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, int maxzoom, std::string layername) { long long segs[CPUS + 1]; segs[0] = 0; segs[CPUS] = len; @@ -355,7 +355,6 @@ void do_read_parallel(char *map, long long len, long long initial_offset, const pja[i].initial_x = &initial_x[i]; pja[i].initial_y = &initial_y[i]; pja[i].readers = reader; - pja[i].file_keys = &file_subkeys[i]; pja[i].maxzoom = maxzoom; pja[i].layermap = &(*layermaps)[i]; pja[i].layername = &layername; @@ -373,11 +372,6 @@ void do_read_parallel(char *map, long long len, long long initial_offset, const perror("pthread_join 370"); } - std::set::iterator j; - for (j = file_subkeys[i].begin(); j != file_subkeys[i].end(); ++j) { - file_keys->insert(*j); - } - free(pja[i].jp->source); json_end(pja[i].jp); } @@ -406,7 +400,6 @@ struct read_parallel_arg { int *initialized; unsigned *initial_x; unsigned *initial_y; - std::set *file_keys; std::string layername; }; @@ -429,7 +422,7 @@ void *run_read_parallel(void *v) { } madvise(map, a->len, MADV_RANDOM); // sequential, but from several pointers at once - do_read_parallel(map, a->len, a->offset, a->reading, a->reader, a->progress_seq, a->exclude, a->include, a->exclude_all, a->fname, a->basezoom, a->source, a->nlayers, a->layermaps, a->droprate, a->initialized, a->initial_x, a->initial_y, a->file_keys, a->maxzoom, a->layername); + do_read_parallel(map, a->len, a->offset, a->reading, a->reader, a->progress_seq, a->exclude, a->include, a->exclude_all, a->fname, a->basezoom, a->source, a->nlayers, a->layermaps, a->droprate, a->initialized, a->initial_x, a->initial_y, a->maxzoom, a->layername); madvise(map, a->len, MADV_DONTNEED); if (munmap(map, a->len) != 0) { @@ -446,7 +439,7 @@ void *run_read_parallel(void *v) { return NULL; } -void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile int *is_parsing, pthread_t *parallel_parser, bool &parser_created, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > &layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, std::set *file_keys, int maxzoom, std::string layername) { +void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile int *is_parsing, pthread_t *parallel_parser, bool &parser_created, const char *reading, struct reader *reader, volatile long long *progress_seq, std::set *exclude, std::set *include, int exclude_all, char *fname, int basezoom, int source, int nlayers, std::vector > &layermaps, double droprate, int *initialized, unsigned *initial_x, unsigned *initial_y, int maxzoom, std::string layername) { // This has to kick off an intermediate thread to start the parser threads, // so the main thread can get back to reading the next input stage while // the intermediate thread waits for the completion of the parser threads. @@ -480,7 +473,6 @@ void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile i rpa->initialized = initialized; rpa->initial_x = initial_x; rpa->initial_y = initial_y; - rpa->file_keys = file_keys; rpa->maxzoom = maxzoom; rpa->layername = layername; @@ -1077,21 +1069,12 @@ int read_input(std::vector &sources, char *fname, const char *layername, nsources = 1; } - std::vector > file_keys; long overall_offset = 0; for (size_t source = 0; source < nsources; source++) { - file_keys.push_back(std::set()); std::string reading; int fd; - if (additional[A_CALCULATE_FEATURE_DENSITY]) { - type_and_string tas; - tas.type = VT_NUMBER; - tas.string = "tippecanoe_feature_density"; - file_keys[source].insert(tas); - } - if (source >= sources.size()) { reading = "standard input"; fd = 0; @@ -1122,7 +1105,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, } if (map != NULL && map != MAP_FAILED) { - do_read_parallel(map, st.st_size - off, overall_offset, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, &layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom, layernames[source < nlayers ? source : 0]); + do_read_parallel(map, st.st_size - off, overall_offset, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, &layermaps, droprate, initialized, initial_x, initial_y, maxzoom, layernames[source < nlayers ? source : 0]); overall_offset += st.st_size - off; checkdisk(reader, CPUS); @@ -1190,7 +1173,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, } fflush(readfp); - start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom, layernames[source < nlayers ? source : 0]); + start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, maxzoom, layernames[source < nlayers ? source : 0]); initial_offset += ahead; overall_offset += ahead; @@ -1227,7 +1210,8 @@ int read_input(std::vector &sources, char *fname, const char *layername, fflush(readfp); if (ahead > 0) { - start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, &file_keys[source < nlayers ? source : 0], maxzoom, layernames[source < nlayers ? source : 0]); + printf("layer name %s\n", layernames[source < nlayers ? source : 0].c_str()); + start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, maxzoom, layernames[source < nlayers ? source : 0]); if (parser_created) { if (pthread_join(parallel_parser, NULL) != 0) { @@ -1244,7 +1228,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, long long layer_seq = overall_offset; json_pull *jp = json_begin_file(fp); - parse_json(jp, reading.c_str(), &layer_seq, &progress_seq, &reader[0].metapos, &reader[0].geompos, &reader[0].indexpos, exclude, include, exclude_all, reader[0].metafile, reader[0].geomfile, reader[0].indexfile, reader[0].poolfile, reader[0].treefile, fname, basezoom, source < nlayers ? source : 0, droprate, reader[0].file_bbox, 0, &initialized[0], &initial_x[0], &initial_y[0], reader, &file_keys[source < nlayers ? source : 0], maxzoom, &layermaps[0], layernames[source < nlayers ? source : 0]); + parse_json(jp, reading.c_str(), &layer_seq, &progress_seq, &reader[0].metapos, &reader[0].geompos, &reader[0].indexpos, exclude, include, exclude_all, reader[0].metafile, reader[0].geomfile, reader[0].indexfile, reader[0].poolfile, reader[0].treefile, fname, basezoom, source < nlayers ? source : 0, droprate, reader[0].file_bbox, 0, &initialized[0], &initial_x[0], &initial_y[0], reader, maxzoom, &layermaps[0], layernames[source < nlayers ? source : 0]); json_end(jp); overall_offset = layer_seq; checkdisk(reader, CPUS); @@ -1747,7 +1731,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, std::map merged_lm = merge_layermaps(layermaps); - mbtiles_write_metadata(outdb, fname, layernames, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, midlat, midlon, file_keys, nlayers, forcetable, attribution, merged_lm); + mbtiles_write_metadata(outdb, fname, layernames, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, midlat, midlon, nlayers, forcetable, attribution, merged_lm); return ret; } diff --git a/mbtiles.cpp b/mbtiles.cpp index 748e81d..4fa0f51 100644 --- a/mbtiles.cpp +++ b/mbtiles.cpp @@ -133,7 +133,7 @@ bool type_and_string::operator<(const type_and_string &o) const { return false; } -void mbtiles_write_metadata(sqlite3 *outdb, const char *fname, std::vector &layername, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, std::vector > &file_keys, int nlayers, int forcetable, const char *attribution, std::map const &layermap) { +void mbtiles_write_metadata(sqlite3 *outdb, const char *fname, std::vector &layername, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int nlayers, int forcetable, const char *attribution, std::map const &layermap) { char *sql, *err; sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('name', %Q);", fname); diff --git a/mbtiles.hpp b/mbtiles.hpp index 0f14881..c5e2e51 100644 --- a/mbtiles.hpp +++ b/mbtiles.hpp @@ -18,7 +18,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 *fname, std::vector &layername, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, std::vector > &file_keys, int nlayers, int forcetable, const char *attribution, std::map const &layermap); +void mbtiles_write_metadata(sqlite3 *outdb, const char *fname, std::vector &layername, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int nlayers, int forcetable, const char *attribution, std::map const &layermap); void mbtiles_close(sqlite3 *outdb, char **argv); diff --git a/tile-join.cpp b/tile-join.cpp index a64e496..8485e3b 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -429,7 +429,7 @@ int main(int argc, char **argv) { layermap.find(layernames[i])->second.file_keys = file_keys[i]; } - mbtiles_write_metadata(outdb, outfile, layernames, st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.midlat, st.midlon, file_keys, nlayers, 0, attribution.size() != 0 ? attribution.c_str() : NULL, layermap); + mbtiles_write_metadata(outdb, outfile, layernames, st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.midlat, st.midlon, nlayers, 0, attribution.size() != 0 ? attribution.c_str() : NULL, layermap); mbtiles_close(outdb, argv); return 0; diff --git a/tile.cpp b/tile.cpp index 0b38900..d96a2b0 100644 --- a/tile.cpp +++ b/tile.cpp @@ -1155,7 +1155,7 @@ struct write_tile_args { unsigned *initial_y; volatile int *running; int err; - std::vector > *layermaps; + std::vector > *layermaps; }; void *run_thread(void *vargs) { @@ -1383,7 +1383,7 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo args[thread].pool_off = pool_off; args[thread].initial_x = initial_x; args[thread].initial_y = initial_y; - args[thread].layermaps = &layermaps; + args[thread].layermaps = &layermaps; args[thread].tasks = dispatches[thread].tasks; args[thread].running = &running; From d4e1ee06279c5b76af710cf6da000583b93ab79b Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 30 Aug 2016 14:02:51 -0700 Subject: [PATCH 06/13] Replace malloc/free with new/delete to fix parallel-reading crash --- geojson.cpp | 13 +++++++++---- geojson.hpp | 2 ++ main.cpp | 32 +++++++++++++++----------------- memfile.cpp | 4 ++-- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/geojson.cpp b/geojson.cpp index 10c1b35..a5b117e 100644 --- a/geojson.cpp +++ b/geojson.cpp @@ -72,7 +72,7 @@ void json_context(json_object *j) { } fprintf(stderr, "In JSON object %s\n", s); - free(s); + free(s); // stringify } long long parse_geometry(int t, json_object *j, long long *bbox, drawvec &out, int op, const char *fname, int line, int *initialized, unsigned *initial_x, unsigned *initial_y, json_object *feature) { @@ -251,7 +251,7 @@ int serialize_geometry(json_object *geometry, json_object *properties, json_obje } else { char *s = json_stringify(id); fprintf(stderr, "Warning: Can't represent non-numeric feature ID %s\n", s); - free(s); + free(s); // stringify } } @@ -304,7 +304,7 @@ int serialize_geometry(json_object *geometry, json_object *properties, json_obje tas.type = metatype[m] = VT_STRING; const char *v = json_stringify(properties->values[i]); metaval[m] = std::string(v); - free((void *) v); + free((void *) v); // stringify m++; } @@ -622,7 +622,7 @@ ssize_t json_map_read(struct json_pull *jp, char *buffer, size_t n) { } struct json_pull *json_begin_map(char *map, long long len) { - struct jsonmap *jm = (struct jsonmap *) malloc(sizeof(struct jsonmap)); + struct jsonmap *jm = new jsonmap; if (jm == NULL) { perror("Out of memory"); exit(EXIT_FAILURE); @@ -634,3 +634,8 @@ struct json_pull *json_begin_map(char *map, long long len) { return json_begin(json_map_read, jm); } + +void json_end_map(struct json_pull *jp) { + delete (struct jsonmap *) jp->source; + json_end(jp); +} diff --git a/geojson.hpp b/geojson.hpp index 2ee4bfc..4065af1 100644 --- a/geojson.hpp +++ b/geojson.hpp @@ -30,5 +30,7 @@ struct parse_json_args { }; struct json_pull *json_begin_map(char *map, long long len); +void json_end_map(struct json_pull *jp); + void parse_json(json_pull *jp, const char *reading, volatile long long *layer_seq, volatile long long *progress_seq, long long *metapos, long long *geompos, long long *indexpos, std::set *exclude, std::set *include, int exclude_all, FILE *metafile, FILE *geomfile, FILE *indexfile, struct memfile *poolfile, struct memfile *treefile, char *fname, int basezoom, int layer, double droprate, long long *file_bbox, int segment, int *initialized, unsigned *initial_x, unsigned *initial_y, struct reader *readers, int maxzoom, std::map *layermap, std::string layername); void *run_parse_json(void *v); diff --git a/main.cpp b/main.cpp index 53bbf0a..6e08704 100644 --- a/main.cpp +++ b/main.cpp @@ -372,8 +372,7 @@ void do_read_parallel(char *map, long long len, long long initial_offset, const perror("pthread_join 370"); } - free(pja[i].jp->source); - json_end(pja[i].jp); + json_end_map(pja[i].jp); } } @@ -404,37 +403,37 @@ struct read_parallel_arg { }; void *run_read_parallel(void *v) { - struct read_parallel_arg *a = (struct read_parallel_arg *) v; + struct read_parallel_arg *rpa = (struct read_parallel_arg *) v; struct stat st; - if (fstat(a->fd, &st) != 0) { + if (fstat(rpa->fd, &st) != 0) { perror("stat read temp"); } - if (a->len != st.st_size) { - fprintf(stderr, "wrong number of bytes in temporary: %lld vs %lld\n", a->len, (long long) st.st_size); + if (rpa->len != st.st_size) { + fprintf(stderr, "wrong number of bytes in temporary: %lld vs %lld\n", rpa->len, (long long) st.st_size); } - a->len = st.st_size; + rpa->len = st.st_size; - char *map = (char *) mmap(NULL, a->len, PROT_READ, MAP_PRIVATE, a->fd, 0); + char *map = (char *) mmap(NULL, rpa->len, PROT_READ, MAP_PRIVATE, rpa->fd, 0); if (map == NULL || map == MAP_FAILED) { perror("map intermediate input"); exit(EXIT_FAILURE); } - madvise(map, a->len, MADV_RANDOM); // sequential, but from several pointers at once + madvise(map, rpa->len, MADV_RANDOM); // sequential, but from several pointers at once - do_read_parallel(map, a->len, a->offset, a->reading, a->reader, a->progress_seq, a->exclude, a->include, a->exclude_all, a->fname, a->basezoom, a->source, a->nlayers, a->layermaps, a->droprate, a->initialized, a->initial_x, a->initial_y, a->maxzoom, a->layername); + do_read_parallel(map, rpa->len, rpa->offset, rpa->reading, rpa->reader, rpa->progress_seq, rpa->exclude, rpa->include, rpa->exclude_all, rpa->fname, rpa->basezoom, rpa->source, rpa->nlayers, rpa->layermaps, rpa->droprate, rpa->initialized, rpa->initial_x, rpa->initial_y, rpa->maxzoom, rpa->layername); - madvise(map, a->len, MADV_DONTNEED); - if (munmap(map, a->len) != 0) { + madvise(map, rpa->len, MADV_DONTNEED); + if (munmap(map, rpa->len) != 0) { perror("munmap source file"); } - if (fclose(a->fp) != 0) { + if (fclose(rpa->fp) != 0) { perror("close source file"); exit(EXIT_FAILURE); } - *(a->is_parsing) = 0; - free(a); + *(rpa->is_parsing) = 0; + delete rpa; return NULL; } @@ -446,7 +445,7 @@ void start_parsing(int fd, FILE *fp, long long offset, long long len, volatile i *is_parsing = 1; - struct read_parallel_arg *rpa = (struct read_parallel_arg *) malloc(sizeof(struct read_parallel_arg)); + struct read_parallel_arg *rpa = new struct read_parallel_arg; if (rpa == NULL) { perror("Out of memory"); exit(EXIT_FAILURE); @@ -1210,7 +1209,6 @@ int read_input(std::vector &sources, char *fname, const char *layername, fflush(readfp); if (ahead > 0) { - printf("layer name %s\n", layernames[source < nlayers ? source : 0].c_str()); start_parsing(readfd, readfp, initial_offset, ahead, &is_parsing, ¶llel_parser, parser_created, reading.c_str(), reader, &progress_seq, exclude, include, exclude_all, fname, basezoom, source, nlayers, layermaps, droprate, initialized, initial_x, initial_y, maxzoom, layernames[source < nlayers ? source : 0]); if (parser_created) { diff --git a/memfile.cpp b/memfile.cpp index a763c71..25c8a0f 100644 --- a/memfile.cpp +++ b/memfile.cpp @@ -16,7 +16,7 @@ struct memfile *memfile_open(int fd) { return NULL; } - struct memfile *mf = (struct memfile *) malloc(sizeof(struct memfile)); + struct memfile *mf = new memfile; if (mf == NULL) { munmap(map, INCREMENT); return NULL; @@ -42,7 +42,7 @@ int memfile_close(struct memfile *file) { } } - free(file); + delete file; return 0; } From d490d8475eb67d1f201573edc128af168514cc0a Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 30 Aug 2016 14:17:28 -0700 Subject: [PATCH 07/13] Remove unused layer count and layer name list --- main.cpp | 2 +- mbtiles.cpp | 2 +- mbtiles.hpp | 2 +- tile-join.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index 6e08704..79ee22c 100644 --- a/main.cpp +++ b/main.cpp @@ -1729,7 +1729,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, std::map merged_lm = merge_layermaps(layermaps); - mbtiles_write_metadata(outdb, fname, layernames, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, midlat, midlon, nlayers, forcetable, attribution, merged_lm); + mbtiles_write_metadata(outdb, fname, minzoom, maxzoom, minlat, minlon, maxlat, maxlon, midlat, midlon, forcetable, attribution, merged_lm); return ret; } diff --git a/mbtiles.cpp b/mbtiles.cpp index 4fa0f51..bf167af 100644 --- a/mbtiles.cpp +++ b/mbtiles.cpp @@ -133,7 +133,7 @@ bool type_and_string::operator<(const type_and_string &o) const { return false; } -void mbtiles_write_metadata(sqlite3 *outdb, const char *fname, std::vector &layername, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int nlayers, int forcetable, const char *attribution, std::map const &layermap) { +void mbtiles_write_metadata(sqlite3 *outdb, 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 const &layermap) { char *sql, *err; sql = sqlite3_mprintf("INSERT INTO metadata (name, value) VALUES ('name', %Q);", fname); diff --git a/mbtiles.hpp b/mbtiles.hpp index c5e2e51..3a8894c 100644 --- a/mbtiles.hpp +++ b/mbtiles.hpp @@ -18,7 +18,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 *fname, std::vector &layername, int minzoom, int maxzoom, double minlat, double minlon, double maxlat, double maxlon, double midlat, double midlon, int nlayers, int forcetable, const char *attribution, std::map const &layermap); +void mbtiles_write_metadata(sqlite3 *outdb, 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 const &layermap); void mbtiles_close(sqlite3 *outdb, char **argv); diff --git a/tile-join.cpp b/tile-join.cpp index 8485e3b..5422482 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -429,7 +429,7 @@ int main(int argc, char **argv) { layermap.find(layernames[i])->second.file_keys = file_keys[i]; } - mbtiles_write_metadata(outdb, outfile, layernames, st.minzoom, st.maxzoom, st.minlat, st.minlon, st.maxlat, st.maxlon, st.midlat, st.midlon, nlayers, 0, attribution.size() != 0 ? attribution.c_str() : NULL, layermap); + mbtiles_write_metadata(outdb, outfile, 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); mbtiles_close(outdb, argv); return 0; From 3e881a428c389e78c099a5ff3adbcca869e61d13 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 30 Aug 2016 14:38:30 -0700 Subject: [PATCH 08/13] Make a reverse-mapping table from layer IDs to names --- tile.cpp | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/tile.cpp b/tile.cpp index d96a2b0..edb49dc 100644 --- a/tile.cpp +++ b/tile.cpp @@ -557,7 +557,7 @@ int manage_gap(unsigned long long index, unsigned long long *previndex, double s return 0; } -long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *stringpool, int z, unsigned tx, unsigned ty, int detail, int min_detail, int basezoom, std::vector *layernames, sqlite3 *outdb, double droprate, int buffer, const char *fname, FILE **geomfile, int minzoom, int maxzoom, double todo, volatile long long *along, long long alongminus, double gamma, int nlayers, int child_shards, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, volatile int *running, double simplification, std::vector > *layermaps) { +long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *stringpool, int z, unsigned tx, unsigned ty, int detail, int min_detail, int basezoom, std::vector *layernames, sqlite3 *outdb, double droprate, int buffer, const char *fname, FILE **geomfile, int minzoom, int maxzoom, double todo, volatile long long *along, long long alongminus, double gamma, int nlayers, int child_shards, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, volatile int *running, double simplification, std::vector> *layermaps, std::vector> *layer_unmaps) { int line_detail; double fraction = 1; @@ -608,7 +608,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s long long unclipped_features = 0; std::vector partials; - std::vector > features; + std::vector> features; for (int i = 0; i < nlayers; i++) { features.push_back(std::vector()); } @@ -927,6 +927,8 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s c.id = partials[i].id; c.has_id = partials[i].has_id; + // printf("segment %d layer %lld is %s\n", partials[i].segment, partials[i].layer, (*layer_unmaps)[partials[i].segment][partials[i].layer].c_str()); + features[layer].push_back(c); } } @@ -1155,7 +1157,8 @@ struct write_tile_args { unsigned *initial_y; volatile int *running; int err; - std::vector > *layermaps; + std::vector> *layermaps; + std::vector> *layer_unmaps; }; void *run_thread(void *vargs) { @@ -1196,7 +1199,7 @@ void *run_thread(void *vargs) { // fprintf(stderr, "%d/%u/%u\n", z, x, y); - long long len = write_tile(geom, &geompos, arg->metabase, arg->stringpool, z, x, y, z == arg->maxzoom ? arg->full_detail : arg->low_detail, arg->min_detail, arg->basezoom, arg->layernames, arg->outdb, arg->droprate, arg->buffer, arg->fname, arg->geomfile, arg->minzoom, arg->maxzoom, arg->todo, arg->along, geompos, arg->gamma, arg->nlayers, arg->child_shards, arg->meta_off, arg->pool_off, arg->initial_x, arg->initial_y, arg->running, arg->simplification, arg->layermaps); + long long len = write_tile(geom, &geompos, arg->metabase, arg->stringpool, z, x, y, z == arg->maxzoom ? arg->full_detail : arg->low_detail, arg->min_detail, arg->basezoom, arg->layernames, arg->outdb, arg->droprate, arg->buffer, arg->fname, arg->geomfile, arg->minzoom, arg->maxzoom, arg->todo, arg->along, geompos, arg->gamma, arg->nlayers, arg->child_shards, arg->meta_off, arg->pool_off, arg->initial_x, arg->initial_y, arg->running, arg->simplification, arg->layermaps, arg->layer_unmaps); if (len < 0) { int *err = &arg->err; @@ -1247,7 +1250,20 @@ void *run_thread(void *vargs) { return NULL; } -int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpool, unsigned *midx, unsigned *midy, std::vector &layernames, int maxzoom, int minzoom, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, const char *tmpdir, double gamma, int nlayers, int full_detail, int low_detail, int min_detail, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, std::vector > &layermaps) { +int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpool, unsigned *midx, unsigned *midy, std::vector &layernames, int maxzoom, int minzoom, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, const char *tmpdir, double gamma, int nlayers, int full_detail, int low_detail, int min_detail, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, std::vector> &layermaps) { + // Table to map segment and layer number back to layer name + std::vector> layer_unmaps; + for (size_t seg = 0; seg < layermaps.size(); seg++) { + layer_unmaps.push_back(std::vector()); + + for (auto a = layermaps[seg].begin(); a != layermaps[seg].end(); ++a) { + if (a->second.id >= layer_unmaps[seg].size()) { + layer_unmaps[seg].resize(a->second.id + 1); + } + layer_unmaps[seg][a->second.id] = a->first; + } + } + int i; for (i = 0; i <= maxzoom; i++) { long long most = 0; @@ -1384,6 +1400,7 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo args[thread].initial_x = initial_x; args[thread].initial_y = initial_y; args[thread].layermaps = &layermaps; + args[thread].layer_unmaps = &layer_unmaps; args[thread].tasks = dispatches[thread].tasks; args[thread].running = &running; From 1f53491009796fc54552e9f282eb0e225034d5fd Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 30 Aug 2016 14:59:53 -0700 Subject: [PATCH 09/13] Tile by layer names instead of by layer numbers --- ...s%named%alg_-Lalbania@tests%named%alb.json | 8 +- tile.cpp | 102 +++++++++--------- 2 files changed, 58 insertions(+), 52 deletions(-) diff --git a/tests/named/out/-z0_-Lalgeria@tests%named%alg_-Lalbania@tests%named%alb.json b/tests/named/out/-z0_-Lalgeria@tests%named%alg_-Lalbania@tests%named%alb.json index 5aabfd7..ba4da8c 100644 --- a/tests/named/out/-z0_-Lalgeria@tests%named%alg_-Lalbania@tests%named%alb.json +++ b/tests/named/out/-z0_-Lalgeria@tests%named%alg_-Lalbania@tests%named%alb.json @@ -11,14 +11,14 @@ "version": "2" }, "features": [ { "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [ -{ "type": "FeatureCollection", "properties": { "layer": "algeria", "version": 2, "extent": 4096 }, "features": [ -{ "type": "Feature", "properties": { "scalerank": 0, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Algeria", "sov_a3": "DZA", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Algeria", "adm0_a3": "DZA", "geou_dif": 0, "geounit": "Algeria", "gu_a3": "DZA", "su_dif": 0, "subunit": "Algeria", "su_a3": "DZA", "brk_diff": 0, "name": "Algeria", "name_long": "Algeria", "brk_a3": "DZA", "brk_name": "Algeria", "abbrev": "Alg.", "postal": "DZ", "formal_en": "People's Democratic Republic of Algeria", "name_sort": "Algeria", "mapcolor7": 5, "mapcolor8": 1, "mapcolor9": 6, "mapcolor13": 3, "pop_est": 34178188, "gdp_md_est": 232900, "pop_year": -99, "lastcensus": 2008, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "DZ", "iso_a3": "DZA", "iso_n3": "012", "un_a3": "012", "wb_a2": "DZ", "wb_a3": "DZA", "woe_id": -99, "adm0_a3_is": "DZA", "adm0_a3_us": "DZA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Northern Africa", "region_wb": "Middle East & North Africa", "name_len": 7, "long_len": 7, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.767578, 36.949892 ], [ 7.119141, 36.949892 ], [ 7.207031, 37.090240 ], [ 7.734375, 37.020098 ], [ 7.734375, 36.879621 ], [ 7.998047, 36.879621 ], [ 8.173828, 37.020098 ], [ 8.525391, 36.949892 ], [ 8.613281, 36.879621 ], [ 8.349609, 36.809285 ], [ 8.437500, 36.738884 ], [ 8.085938, 36.527295 ], [ 8.349609, 36.456636 ], [ 8.173828, 35.960223 ], [ 8.349609, 35.317366 ], [ 8.173828, 34.957995 ], [ 8.261719, 34.813803 ], [ 8.173828, 34.597042 ], [ 7.470703, 34.161818 ], [ 7.470703, 33.724340 ], [ 7.646484, 33.284620 ], [ 8.085938, 33.137551 ], [ 8.261719, 32.546813 ], [ 9.052734, 32.026706 ], [ 9.492188, 30.297018 ], [ 9.228516, 30.145127 ], [ 9.492188, 29.840644 ], [ 9.843750, 28.998532 ], [ 9.755859, 28.226970 ], [ 9.931641, 27.839076 ], [ 9.667969, 27.371767 ], [ 9.843750, 26.588527 ], [ 9.404297, 26.431228 ], [ 9.316406, 26.115986 ], [ 10.019531, 25.324167 ], [ 10.019531, 24.846565 ], [ 10.195312, 24.766785 ], [ 10.195312, 24.607069 ], [ 11.513672, 24.367114 ], [ 11.953125, 23.563987 ], [ 7.734375, 21.125498 ], [ 5.888672, 19.559790 ], [ 3.251953, 18.979026 ], [ 3.076172, 19.145168 ], [ 3.076172, 19.311143 ], [ 3.251953, 19.394068 ], [ 3.164062, 19.890723 ], [ 2.373047, 20.055931 ], [ 2.197266, 20.303418 ], [ 1.757812, 20.303418 ], [ 1.582031, 20.632784 ], [ 1.142578, 20.797201 ], [ 1.142578, 21.125498 ], [ 0.791016, 21.371244 ], [ -4.746094, 25.005973 ], [ -8.701172, 27.293689 ], [ -8.701172, 28.767659 ], [ -7.646484, 29.458731 ], [ -6.855469, 29.458731 ], [ -5.800781, 29.688053 ], [ -5.800781, 29.535230 ], [ -5.625000, 29.535230 ], [ -5.361328, 29.916852 ], [ -4.833984, 30.297018 ], [ -4.658203, 30.297018 ], [ -4.306641, 30.600094 ], [ -3.691406, 30.751278 ], [ -3.603516, 30.977609 ], [ -3.867188, 31.203405 ], [ -3.867188, 31.353637 ], [ -3.691406, 31.428663 ], [ -3.603516, 31.728167 ], [ -2.900391, 31.802893 ], [ -2.988281, 32.101190 ], [ -1.230469, 32.101190 ], [ -1.318359, 32.398516 ], [ -1.054688, 32.546813 ], [ -1.494141, 32.768800 ], [ -1.494141, 33.063924 ], [ -1.757812, 33.284620 ], [ -1.669922, 34.089061 ], [ -1.845703, 34.379713 ], [ -1.757812, 34.524661 ], [ -1.933594, 34.597042 ], [ -1.845703, 34.813803 ], [ -2.285156, 35.101934 ], [ -1.933594, 35.101934 ], [ -1.406250, 35.317366 ], [ -1.054688, 35.746512 ], [ -0.615234, 35.746512 ], [ -0.527344, 35.960223 ], [ -0.087891, 35.817813 ], [ 0.263672, 36.244273 ], [ 0.791016, 36.385913 ], [ 0.878906, 36.527295 ], [ 2.285156, 36.668419 ], [ 2.548828, 36.597889 ], [ 2.900391, 36.879621 ], [ 3.603516, 36.809285 ], [ 3.691406, 36.949892 ], [ 4.746094, 36.949892 ], [ 5.009766, 36.879621 ], [ 5.009766, 36.738884 ], [ 5.449219, 36.668419 ], [ 5.625000, 36.879621 ], [ 6.240234, 36.949892 ], [ 6.328125, 37.160317 ], [ 6.767578, 36.949892 ] ] ] } } -] } -, { "type": "FeatureCollection", "properties": { "layer": "albania", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { "scalerank": 0, "featurecla": "Admin-0 country", "labelrank": 6, "sovereignt": "Albania", "sov_a3": "ALB", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Albania", "adm0_a3": "ALB", "geou_dif": 0, "geounit": "Albania", "gu_a3": "ALB", "su_dif": 0, "subunit": "Albania", "su_a3": "ALB", "brk_diff": 0, "name": "Albania", "name_long": "Albania", "brk_a3": "ALB", "brk_name": "Albania", "abbrev": "Alb.", "postal": "AL", "formal_en": "Republic of Albania", "name_sort": "Albania", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 1, "mapcolor13": 6, "pop_est": 3639453, "gdp_md_est": 21810, "pop_year": -99, "lastcensus": 2001, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "AL", "iso_a3": "ALB", "iso_n3": "008", "un_a3": "008", "wb_a2": "AL", "wb_a3": "ALB", "woe_id": -99, "adm0_a3_is": "ALB", "adm0_a3_us": "ALB", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Southern Europe", "region_wb": "Europe & Central Asia", "name_len": 7, "long_len": 7, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 19.775391, 42.488302 ], [ 20.039062, 42.617791 ], [ 20.126953, 42.423457 ], [ 20.478516, 42.293564 ], [ 20.566406, 41.902277 ], [ 20.390625, 41.376809 ], [ 20.478516, 41.178654 ], [ 20.654297, 41.112469 ], [ 20.654297, 40.913513 ], [ 20.830078, 40.979898 ], [ 21.005859, 40.713956 ], [ 21.005859, 40.580585 ], [ 20.742188, 40.513799 ], [ 20.654297, 40.178873 ], [ 20.214844, 40.044438 ], [ 20.390625, 39.842286 ], [ 20.214844, 39.842286 ], [ 20.126953, 39.639538 ], [ 19.951172, 39.707187 ], [ 19.863281, 40.111689 ], [ 19.511719, 40.178873 ], [ 19.248047, 40.446947 ], [ 19.423828, 40.380028 ], [ 19.423828, 40.580585 ], [ 19.248047, 40.713956 ], [ 19.335938, 40.979898 ], [ 19.511719, 40.979898 ], [ 19.511719, 41.310824 ], [ 19.335938, 41.442726 ], [ 19.511719, 41.574361 ], [ 19.423828, 41.640078 ], [ 19.599609, 41.640078 ], [ 19.599609, 41.836828 ], [ 19.335938, 41.902277 ], [ 19.248047, 42.228517 ], [ 19.511719, 42.617791 ], [ 19.687500, 42.617791 ], [ 19.775391, 42.488302 ] ] ] } } ] } , +{ "type": "FeatureCollection", "properties": { "layer": "algeria", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "scalerank": 0, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Algeria", "sov_a3": "DZA", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Algeria", "adm0_a3": "DZA", "geou_dif": 0, "geounit": "Algeria", "gu_a3": "DZA", "su_dif": 0, "subunit": "Algeria", "su_a3": "DZA", "brk_diff": 0, "name": "Algeria", "name_long": "Algeria", "brk_a3": "DZA", "brk_name": "Algeria", "abbrev": "Alg.", "postal": "DZ", "formal_en": "People's Democratic Republic of Algeria", "name_sort": "Algeria", "mapcolor7": 5, "mapcolor8": 1, "mapcolor9": 6, "mapcolor13": 3, "pop_est": 34178188, "gdp_md_est": 232900, "pop_year": -99, "lastcensus": 2008, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "DZ", "iso_a3": "DZA", "iso_n3": "012", "un_a3": "012", "wb_a2": "DZ", "wb_a3": "DZA", "woe_id": -99, "adm0_a3_is": "DZA", "adm0_a3_us": "DZA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Northern Africa", "region_wb": "Middle East & North Africa", "name_len": 7, "long_len": 7, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.767578, 36.949892 ], [ 7.119141, 36.949892 ], [ 7.207031, 37.090240 ], [ 7.734375, 37.020098 ], [ 7.734375, 36.879621 ], [ 7.998047, 36.879621 ], [ 8.173828, 37.020098 ], [ 8.525391, 36.949892 ], [ 8.613281, 36.879621 ], [ 8.349609, 36.809285 ], [ 8.437500, 36.738884 ], [ 8.085938, 36.527295 ], [ 8.349609, 36.456636 ], [ 8.173828, 35.960223 ], [ 8.349609, 35.317366 ], [ 8.173828, 34.957995 ], [ 8.261719, 34.813803 ], [ 8.173828, 34.597042 ], [ 7.470703, 34.161818 ], [ 7.470703, 33.724340 ], [ 7.646484, 33.284620 ], [ 8.085938, 33.137551 ], [ 8.261719, 32.546813 ], [ 9.052734, 32.026706 ], [ 9.492188, 30.297018 ], [ 9.228516, 30.145127 ], [ 9.492188, 29.840644 ], [ 9.843750, 28.998532 ], [ 9.755859, 28.226970 ], [ 9.931641, 27.839076 ], [ 9.667969, 27.371767 ], [ 9.843750, 26.588527 ], [ 9.404297, 26.431228 ], [ 9.316406, 26.115986 ], [ 10.019531, 25.324167 ], [ 10.019531, 24.846565 ], [ 10.195312, 24.766785 ], [ 10.195312, 24.607069 ], [ 11.513672, 24.367114 ], [ 11.953125, 23.563987 ], [ 7.734375, 21.125498 ], [ 5.888672, 19.559790 ], [ 3.251953, 18.979026 ], [ 3.076172, 19.145168 ], [ 3.076172, 19.311143 ], [ 3.251953, 19.394068 ], [ 3.164062, 19.890723 ], [ 2.373047, 20.055931 ], [ 2.197266, 20.303418 ], [ 1.757812, 20.303418 ], [ 1.582031, 20.632784 ], [ 1.142578, 20.797201 ], [ 1.142578, 21.125498 ], [ 0.791016, 21.371244 ], [ -4.746094, 25.005973 ], [ -8.701172, 27.293689 ], [ -8.701172, 28.767659 ], [ -7.646484, 29.458731 ], [ -6.855469, 29.458731 ], [ -5.800781, 29.688053 ], [ -5.800781, 29.535230 ], [ -5.625000, 29.535230 ], [ -5.361328, 29.916852 ], [ -4.833984, 30.297018 ], [ -4.658203, 30.297018 ], [ -4.306641, 30.600094 ], [ -3.691406, 30.751278 ], [ -3.603516, 30.977609 ], [ -3.867188, 31.203405 ], [ -3.867188, 31.353637 ], [ -3.691406, 31.428663 ], [ -3.603516, 31.728167 ], [ -2.900391, 31.802893 ], [ -2.988281, 32.101190 ], [ -1.230469, 32.101190 ], [ -1.318359, 32.398516 ], [ -1.054688, 32.546813 ], [ -1.494141, 32.768800 ], [ -1.494141, 33.063924 ], [ -1.757812, 33.284620 ], [ -1.669922, 34.089061 ], [ -1.845703, 34.379713 ], [ -1.757812, 34.524661 ], [ -1.933594, 34.597042 ], [ -1.845703, 34.813803 ], [ -2.285156, 35.101934 ], [ -1.933594, 35.101934 ], [ -1.406250, 35.317366 ], [ -1.054688, 35.746512 ], [ -0.615234, 35.746512 ], [ -0.527344, 35.960223 ], [ -0.087891, 35.817813 ], [ 0.263672, 36.244273 ], [ 0.791016, 36.385913 ], [ 0.878906, 36.527295 ], [ 2.285156, 36.668419 ], [ 2.548828, 36.597889 ], [ 2.900391, 36.879621 ], [ 3.603516, 36.809285 ], [ 3.691406, 36.949892 ], [ 4.746094, 36.949892 ], [ 5.009766, 36.879621 ], [ 5.009766, 36.738884 ], [ 5.449219, 36.668419 ], [ 5.625000, 36.879621 ], [ 6.240234, 36.949892 ], [ 6.328125, 37.160317 ], [ 6.767578, 36.949892 ] ] ] } } +] } +, { "type": "FeatureCollection", "properties": { "layer": "sweden", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { "scalerank": 0, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Sweden", "sov_a3": "SWE", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Sweden", "adm0_a3": "SWE", "geou_dif": 0, "geounit": "Sweden", "gu_a3": "SWE", "su_dif": 0, "subunit": "Sweden", "su_a3": "SWE", "brk_diff": 0, "name": "Sweden", "name_long": "Sweden", "brk_a3": "SWE", "brk_name": "Sweden", "abbrev": "Swe.", "postal": "S", "formal_en": "Kingdom of Sweden", "name_sort": "Sweden", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 2, "mapcolor13": 4, "pop_est": 9059651, "gdp_md_est": 344300, "pop_year": -99, "lastcensus": -99, "gdp_year": -99, "economy": "2. Developed region: nonG7", "income_grp": "1. High income: OECD", "wikipedia": -99, "iso_a2": "SE", "iso_a3": "SWE", "iso_n3": "752", "un_a3": "752", "wb_a2": "SE", "wb_a3": "SWE", "woe_id": -99, "adm0_a3_is": "SWE", "adm0_a3_us": "SWE", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Europe", "region_un": "Europe", "subregion": "Northern Europe", "region_wb": "Europe & Central Asia", "name_len": 6, "long_len": 6, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 22.236328, 65.585720 ], [ 22.324219, 65.549367 ], [ 22.324219, 65.512963 ], [ 22.148438, 65.512963 ], [ 22.148438, 65.585720 ], [ 22.236328, 65.585720 ] ] ], [ [ [ 16.523438, 56.316537 ], [ 16.347656, 56.218923 ], [ 16.347656, 56.607885 ], [ 16.699219, 56.897004 ], [ 16.875000, 57.326521 ], [ 17.050781, 57.373938 ], [ 16.523438, 56.316537 ] ] ], [ [ [ 18.720703, 57.751076 ], [ 18.720703, 57.468589 ], [ 18.896484, 57.421294 ], [ 18.632812, 57.373938 ], [ 18.632812, 57.231503 ], [ 18.369141, 57.183902 ], [ 18.281250, 56.944974 ], [ 18.105469, 56.944974 ], [ 18.281250, 57.088515 ], [ 18.017578, 57.279043 ], [ 18.105469, 57.610107 ], [ 18.632812, 57.938183 ], [ 18.720703, 57.844751 ], [ 18.808594, 57.938183 ], [ 18.984375, 57.938183 ], [ 18.984375, 57.984808 ], [ 19.160156, 58.031372 ], [ 19.335938, 57.984808 ], [ 18.984375, 57.891497 ], [ 19.072266, 57.844751 ], [ 18.720703, 57.751076 ] ] ], [ [ [ 11.513672, 57.938183 ], [ 11.425781, 58.077876 ], [ 11.689453, 58.077876 ], [ 11.513672, 57.938183 ] ] ], [ [ [ 18.457031, 59.040555 ], [ 18.281250, 59.040555 ], [ 18.281250, 59.130863 ], [ 18.457031, 59.130863 ], [ 18.457031, 59.040555 ] ] ], [ [ [ 18.720703, 59.534318 ], [ 18.544922, 59.534318 ], [ 18.632812, 59.623325 ], [ 18.720703, 59.623325 ], [ 18.720703, 59.534318 ] ] ], [ [ [ 19.072266, 59.800634 ], [ 18.896484, 59.800634 ], [ 18.896484, 59.888937 ], [ 18.984375, 59.844815 ], [ 18.984375, 59.888937 ], [ 19.072266, 59.888937 ], [ 19.072266, 59.800634 ] ] ], [ [ [ 18.457031, 60.413852 ], [ 18.281250, 60.413852 ], [ 18.281250, 60.500525 ], [ 18.457031, 60.500525 ], [ 18.457031, 60.413852 ] ] ], [ [ [ 20.917969, 63.665760 ], [ 20.742188, 63.665760 ], [ 20.742188, 63.743631 ], [ 20.917969, 63.743631 ], [ 20.917969, 63.665760 ] ] ], [ [ [ 18.632812, 59.355596 ], [ 18.457031, 59.355596 ], [ 18.369141, 59.445075 ], [ 18.632812, 59.355596 ] ] ], [ [ [ 18.193359, 59.445075 ], [ 18.281250, 59.445075 ], [ 18.281250, 59.400365 ], [ 18.193359, 59.445075 ] ] ], [ [ [ 18.193359, 59.445075 ], [ 18.105469, 59.445075 ], [ 18.193359, 59.489726 ], [ 18.193359, 59.445075 ] ] ], [ [ [ 17.402344, 61.773123 ], [ 17.490234, 61.648162 ], [ 17.314453, 61.731526 ], [ 17.402344, 61.773123 ] ] ], [ [ [ 23.027344, 65.730626 ], [ 23.027344, 65.694476 ], [ 22.851562, 65.694476 ], [ 22.851562, 65.766727 ], [ 22.939453, 65.766727 ], [ 23.027344, 65.730626 ] ] ], [ [ [ 20.302734, 63.743631 ], [ 20.302734, 63.665760 ], [ 20.214844, 63.704722 ], [ 20.214844, 63.665760 ], [ 20.039062, 63.704722 ], [ 19.687500, 63.548552 ], [ 19.687500, 63.470145 ], [ 19.423828, 63.587675 ], [ 19.335938, 63.548552 ], [ 19.511719, 63.509375 ], [ 19.511719, 63.430860 ], [ 19.335938, 63.509375 ], [ 18.984375, 63.194018 ], [ 18.896484, 63.233627 ], [ 18.632812, 63.233627 ], [ 18.632812, 63.114638 ], [ 18.544922, 63.154355 ], [ 18.457031, 63.035039 ], [ 18.193359, 63.035039 ], [ 18.544922, 62.995158 ], [ 18.369141, 62.995158 ], [ 18.457031, 62.875188 ], [ 18.193359, 62.915233 ], [ 18.193359, 62.794935 ], [ 17.929688, 62.794935 ], [ 18.105469, 62.835089 ], [ 17.841797, 62.835089 ], [ 17.841797, 62.674143 ], [ 18.017578, 62.593341 ], [ 17.841797, 62.633770 ], [ 17.841797, 62.512318 ], [ 17.578125, 62.512318 ], [ 17.666016, 62.471724 ], [ 17.490234, 62.471724 ], [ 17.402344, 62.552857 ], [ 17.314453, 62.512318 ], [ 17.314453, 62.349609 ], [ 17.578125, 62.267923 ], [ 17.314453, 62.021528 ], [ 17.314453, 61.731526 ], [ 17.226562, 61.731526 ], [ 17.050781, 61.648162 ], [ 17.050781, 61.396719 ], [ 17.226562, 61.312452 ], [ 17.050781, 61.312452 ], [ 17.226562, 61.058285 ], [ 17.138672, 60.930432 ], [ 17.314453, 60.802064 ], [ 17.138672, 60.716198 ], [ 17.314453, 60.630102 ], [ 17.578125, 60.673179 ], [ 17.666016, 60.500525 ], [ 17.929688, 60.630102 ], [ 18.105469, 60.413852 ], [ 18.544922, 60.283408 ], [ 18.281250, 60.326948 ], [ 18.369141, 60.196156 ], [ 18.544922, 60.196156 ], [ 18.544922, 60.108670 ], [ 18.720703, 60.152442 ], [ 18.720703, 60.020952 ], [ 18.808594, 60.108670 ], [ 18.984375, 59.888937 ], [ 18.896484, 59.888937 ], [ 18.720703, 59.800634 ], [ 19.072266, 59.756395 ], [ 18.632812, 59.712097 ], [ 18.720703, 59.667741 ], [ 18.632812, 59.623325 ], [ 18.544922, 59.623325 ], [ 18.544922, 59.534318 ], [ 18.369141, 59.489726 ], [ 18.017578, 59.489726 ], [ 18.017578, 59.400365 ], [ 17.929688, 59.445075 ], [ 18.017578, 59.355596 ], [ 18.105469, 59.355596 ], [ 18.105469, 59.445075 ], [ 18.281250, 59.400365 ], [ 18.281250, 59.355596 ], [ 18.193359, 59.355596 ], [ 18.369141, 59.175928 ], [ 18.281250, 59.130863 ], [ 18.017578, 59.040555 ], [ 17.841797, 58.904646 ], [ 17.753906, 58.950008 ], [ 17.753906, 58.995311 ], [ 17.666016, 58.995311 ], [ 17.666016, 58.950008 ], [ 17.753906, 58.904646 ], [ 17.578125, 58.904646 ], [ 17.578125, 58.859224 ], [ 17.402344, 58.904646 ], [ 17.314453, 58.768200 ], [ 16.962891, 58.768200 ], [ 17.138672, 58.722599 ], [ 16.962891, 58.722599 ], [ 16.875000, 58.631217 ], [ 16.171875, 58.676938 ], [ 16.787109, 58.631217 ], [ 16.699219, 58.585436 ], [ 16.875000, 58.493694 ], [ 16.347656, 58.493694 ], [ 16.699219, 58.447733 ], [ 16.611328, 58.309489 ], [ 16.787109, 58.355630 ], [ 16.787109, 58.170702 ], [ 16.611328, 58.217025 ], [ 16.699219, 57.891497 ], [ 16.435547, 58.031372 ], [ 16.611328, 57.797944 ], [ 16.523438, 57.844751 ], [ 16.699219, 57.704147 ], [ 16.523438, 57.751076 ], [ 16.611328, 57.657158 ], [ 16.435547, 57.657158 ], [ 16.611328, 57.562995 ], [ 16.611328, 57.421294 ], [ 16.435547, 57.326521 ], [ 16.523438, 57.088515 ], [ 16.347656, 57.040730 ], [ 16.435547, 56.800878 ], [ 16.347656, 56.656226 ], [ 16.171875, 56.656226 ], [ 15.820312, 56.121060 ], [ 15.644531, 56.218923 ], [ 14.941406, 56.218923 ], [ 14.677734, 56.170023 ], [ 14.677734, 56.022948 ], [ 14.414062, 56.072035 ], [ 14.150391, 55.875311 ], [ 14.326172, 55.578345 ], [ 14.150391, 55.429013 ], [ 12.919922, 55.429013 ], [ 12.832031, 55.578345 ], [ 13.007812, 55.627996 ], [ 13.007812, 55.776573 ], [ 12.832031, 55.776573 ], [ 12.919922, 55.875311 ], [ 12.744141, 55.924586 ], [ 12.392578, 56.316537 ], [ 12.832031, 56.267761 ], [ 12.568359, 56.462490 ], [ 12.832031, 56.462490 ], [ 12.919922, 56.559482 ], [ 12.304688, 56.944974 ], [ 12.041016, 57.231503 ], [ 12.041016, 57.468589 ], [ 11.865234, 57.373938 ], [ 11.865234, 57.704147 ], [ 11.689453, 57.704147 ], [ 11.777344, 57.797944 ], [ 11.601562, 57.844751 ], [ 11.689453, 58.077876 ], [ 11.777344, 58.124320 ], [ 11.337891, 58.124320 ], [ 11.601562, 58.309489 ], [ 11.425781, 58.263287 ], [ 11.601562, 58.401712 ], [ 11.513672, 58.447733 ], [ 11.425781, 58.355630 ], [ 11.337891, 58.447733 ], [ 11.162109, 58.355630 ], [ 11.250000, 58.676938 ], [ 11.074219, 58.950008 ], [ 11.162109, 59.130863 ], [ 11.337891, 59.130863 ], [ 11.425781, 58.904646 ], [ 11.601562, 58.904646 ], [ 11.689453, 58.995311 ], [ 11.777344, 59.400365 ], [ 11.601562, 59.623325 ], [ 11.865234, 59.712097 ], [ 11.777344, 59.888937 ], [ 12.128906, 59.933000 ], [ 12.480469, 60.108670 ], [ 12.568359, 60.413852 ], [ 12.216797, 61.015725 ], [ 12.656250, 61.058285 ], [ 12.832031, 61.227957 ], [ 12.832031, 61.396719 ], [ 12.128906, 61.731526 ], [ 12.304688, 62.267923 ], [ 12.041016, 62.593341 ], [ 12.041016, 62.955223 ], [ 12.216797, 63.035039 ], [ 11.953125, 63.312683 ], [ 12.216797, 63.509375 ], [ 12.128906, 63.626745 ], [ 12.919922, 64.091408 ], [ 13.886719, 64.014496 ], [ 14.150391, 64.206377 ], [ 14.062500, 64.472794 ], [ 13.623047, 64.586185 ], [ 14.501953, 65.330178 ], [ 14.501953, 66.160511 ], [ 15.029297, 66.160511 ], [ 15.468750, 66.302205 ], [ 15.380859, 66.513260 ], [ 16.083984, 66.964476 ], [ 16.347656, 67.033163 ], [ 16.435547, 67.204032 ], [ 16.083984, 67.441229 ], [ 16.435547, 67.575717 ], [ 16.699219, 67.908619 ], [ 17.226562, 68.106102 ], [ 17.841797, 67.974634 ], [ 17.929688, 68.007571 ], [ 18.105469, 68.171555 ], [ 18.105469, 68.560384 ], [ 18.457031, 68.592487 ], [ 18.632812, 68.496040 ], [ 18.984375, 68.528235 ], [ 19.951172, 68.366801 ], [ 20.214844, 68.496040 ], [ 19.951172, 68.560384 ], [ 20.302734, 68.784144 ], [ 20.302734, 68.911005 ], [ 20.039062, 69.037142 ], [ 20.742188, 69.037142 ], [ 20.917969, 68.974164 ], [ 20.830078, 68.911005 ], [ 21.181641, 68.847665 ], [ 21.445312, 68.688521 ], [ 21.708984, 68.592487 ], [ 21.884766, 68.592487 ], [ 21.972656, 68.496040 ], [ 22.500000, 68.463800 ], [ 23.027344, 68.301905 ], [ 23.115234, 68.138852 ], [ 23.291016, 68.171555 ], [ 23.291016, 68.073305 ], [ 23.642578, 67.974634 ], [ 23.466797, 67.908619 ], [ 23.378906, 67.474922 ], [ 23.730469, 67.441229 ], [ 23.554688, 67.135829 ], [ 23.994141, 66.826520 ], [ 23.818359, 66.757250 ], [ 23.818359, 66.583217 ], [ 23.554688, 66.443107 ], [ 23.642578, 66.231457 ], [ 23.994141, 66.089364 ], [ 24.082031, 65.802776 ], [ 23.994141, 65.838776 ], [ 23.906250, 65.766727 ], [ 23.730469, 65.838776 ], [ 23.378906, 65.838776 ], [ 23.378906, 65.766727 ], [ 23.291016, 65.838776 ], [ 23.115234, 65.838776 ], [ 23.203125, 65.766727 ], [ 23.027344, 65.730626 ], [ 23.027344, 65.766727 ], [ 22.939453, 65.766727 ], [ 22.763672, 65.874725 ], [ 22.587891, 65.910623 ], [ 22.675781, 65.766727 ], [ 22.324219, 65.874725 ], [ 22.324219, 65.766727 ], [ 22.148438, 65.766727 ], [ 22.236328, 65.730626 ], [ 22.148438, 65.658275 ], [ 22.236328, 65.622023 ], [ 22.324219, 65.658275 ], [ 22.412109, 65.549367 ], [ 22.324219, 65.549367 ], [ 22.324219, 65.585720 ], [ 22.236328, 65.585720 ], [ 21.708984, 65.730626 ], [ 22.148438, 65.549367 ], [ 21.796875, 65.549367 ], [ 21.972656, 65.512963 ], [ 21.884766, 65.403445 ], [ 21.445312, 65.403445 ], [ 21.621094, 65.256706 ], [ 21.269531, 65.403445 ], [ 21.181641, 65.366837 ], [ 21.533203, 65.256706 ], [ 21.533203, 65.072130 ], [ 21.357422, 65.035060 ], [ 21.357422, 64.960766 ], [ 21.181641, 64.960766 ], [ 21.093750, 64.848937 ], [ 21.005859, 64.886265 ], [ 21.005859, 64.811557 ], [ 21.269531, 64.811557 ], [ 21.269531, 64.699105 ], [ 21.093750, 64.699105 ], [ 21.269531, 64.586185 ], [ 21.445312, 64.623877 ], [ 21.533203, 64.548440 ], [ 21.445312, 64.548440 ], [ 21.533203, 64.434892 ], [ 21.357422, 64.358931 ], [ 21.269531, 64.396938 ], [ 21.269531, 64.320872 ], [ 21.005859, 64.244595 ], [ 20.654297, 63.821288 ], [ 20.566406, 63.860036 ], [ 20.390625, 63.704722 ], [ 20.302734, 63.743631 ] ], [ [ 17.841797, 62.995158 ], [ 17.666016, 63.035039 ], [ 17.841797, 62.955223 ], [ 17.841797, 62.995158 ] ], [ [ 18.896484, 63.273182 ], [ 18.720703, 63.273182 ], [ 18.896484, 63.233627 ], [ 18.896484, 63.273182 ] ], [ [ 11.865234, 58.355630 ], [ 11.601562, 58.309489 ], [ 11.777344, 58.263287 ], [ 11.865234, 58.355630 ] ], [ [ 17.666016, 58.995311 ], [ 17.753906, 59.130863 ], [ 17.578125, 59.085739 ], [ 17.578125, 58.995311 ], [ 17.666016, 58.995311 ] ] ] ] } } ] } diff --git a/tile.cpp b/tile.cpp index edb49dc..8981a92 100644 --- a/tile.cpp +++ b/tile.cpp @@ -608,10 +608,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s long long unclipped_features = 0; std::vector partials; - std::vector> features; - for (int i = 0; i < nlayers; i++) { - features.push_back(std::vector()); - } + std::map> features; int within[child_shards]; long long geompos[child_shards]; @@ -901,7 +898,6 @@ 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 &pgeoms = partials[i].geoms; - long long layer = partials[i].layer; signed char t = partials[i].t; long long original_seq = partials[i].original_seq; @@ -929,7 +925,13 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s // printf("segment %d layer %lld is %s\n", partials[i].segment, partials[i].layer, (*layer_unmaps)[partials[i].segment][partials[i].layer].c_str()); - features[layer].push_back(c); + std::string layername = (*layer_unmaps)[partials[i].segment][partials[i].layer]; + if (features.count(layername) == 0) { + features.insert(std::pair>(layername, std::vector())); + } + + auto f = features.find(layername); + f->second.push_back(c); } } } @@ -944,97 +946,100 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s } } - for (j = 0; j < nlayers; j++) { + for (auto fj = features.begin(); fj != features.end(); ++fj) { + std::vector &ff = fj->second; + if (additional[A_REORDER]) { - std::sort(features[j].begin(), features[j].end()); + std::sort(ff.begin(), ff.end()); } std::vector out; - if (features[j].size() > 0) { - out.push_back(features[j][0]); + if (ff.size() > 0) { + out.push_back(ff[0]); } - for (size_t x = 1; x < features[j].size(); x++) { + for (size_t x = 1; x < ff.size(); x++) { size_t y = out.size() - 1; #if 0 - if (out.size() > 0 && coalcmp(&features[j][x], &out[y]) < 0) { + if (out.size() > 0 && coalcmp(&ff[x], &out[y]) < 0) { fprintf(stderr, "\nfeature out of order\n"); } #endif - if (additional[A_COALESCE] && out.size() > 0 && out[y].geom.size() + features[j][x].geom.size() < 700 && coalcmp(&features[j][x], &out[y]) == 0 && features[j][x].type != VT_POINT) { - for (size_t g = 0; g < features[j][x].geom.size(); g++) { - out[y].geom.push_back(features[j][x].geom[g]); + if (additional[A_COALESCE] && out.size() > 0 && out[y].geom.size() + ff[x].geom.size() < 700 && coalcmp(&ff[x], &out[y]) == 0 && ff[x].type != VT_POINT) { + for (size_t g = 0; g < ff[x].geom.size(); g++) { + out[y].geom.push_back(ff[x].geom[g]); } out[y].coalesced = true; } else { - out.push_back(features[j][x]); + out.push_back(ff[x]); } } - features[j] = out; + ff = out; out.clear(); - for (size_t x = 0; x < features[j].size(); x++) { - if (features[j][x].coalesced && features[j][x].type == VT_LINE) { - features[j][x].geom = remove_noop(features[j][x].geom, features[j][x].type, 0); - features[j][x].geom = simplify_lines(features[j][x].geom, 32, 0, - !(prevent[P_CLIPPING] || prevent[P_DUPLICATION]), simplification); + for (size_t x = 0; x < ff.size(); x++) { + if (ff[x].coalesced && ff[x].type == VT_LINE) { + ff[x].geom = remove_noop(ff[x].geom, ff[x].type, 0); + ff[x].geom = simplify_lines(ff[x].geom, 32, 0, + !(prevent[P_CLIPPING] || prevent[P_DUPLICATION]), simplification); } - if (features[j][x].type == VT_POLYGON) { - if (features[j][x].coalesced) { - features[j][x].geom = clean_or_clip_poly(features[j][x].geom, 0, 0, 0, false); + if (ff[x].type == VT_POLYGON) { + if (ff[x].coalesced) { + ff[x].geom = clean_or_clip_poly(ff[x].geom, 0, 0, 0, false); } - features[j][x].geom = close_poly(features[j][x].geom); + ff[x].geom = close_poly(ff[x].geom); } - if (features[j][x].geom.size() > 0) { - out.push_back(features[j][x]); + if (ff[x].geom.size() > 0) { + out.push_back(ff[x]); } } - features[j] = out; + ff = out; if (prevent[P_INPUT_ORDER]) { - std::sort(features[j].begin(), features[j].end(), preservecmp); + std::sort(ff.begin(), ff.end(), preservecmp); } } mvt_tile tile; - for (size_t k = 0; k < features.size(); k++) { - mvt_layer layer; + for (auto fj = features.begin(); fj != features.end(); ++fj) { + std::vector &ff = fj->second; - layer.name = (*layernames)[k]; + mvt_layer layer; + layer.name = fj->first; layer.version = 2; layer.extent = 1 << line_detail; - for (size_t x = 0; x < features[k].size(); x++) { + for (size_t x = 0; x < ff.size(); x++) { mvt_feature feature; - if (features[k][x].type == VT_LINE || features[k][x].type == VT_POLYGON) { - features[k][x].geom = remove_noop(features[k][x].geom, features[k][x].type, 0); + if (ff[x].type == VT_LINE || ff[x].type == VT_POLYGON) { + ff[x].geom = remove_noop(ff[x].geom, ff[x].type, 0); } - if (features[k][x].geom.size() == 0) { + if (ff[x].geom.size() == 0) { continue; } - 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(); + feature.type = ff[x].type; + feature.geometry = to_feature(ff[x].geom); + count += ff[x].geom.size(); + ff[x].geom.clear(); - feature.id = features[k][x].id; - feature.has_id = features[k][x].has_id; + feature.id = ff[x].id; + feature.has_id = ff[x].has_id; - decode_meta(features[k][x].m, features[k][x].keys, features[k][x].values, features[k][x].stringpool, layer, feature); + decode_meta(ff[x].m, ff[x].keys, ff[x].values, ff[x].stringpool, layer, feature); if (additional[A_CALCULATE_FEATURE_DENSITY]) { int glow = 255; - if (features[k][x].spacing > 0) { - glow = (1 / features[k][x].spacing); + if (ff[x].spacing > 0) { + glow = (1 / ff[x].spacing); if (glow > 255) { glow = 255; } @@ -1059,8 +1064,9 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s } long long totalsize = 0; - for (j = 0; j < nlayers; j++) { - totalsize += features[j].size(); + for (auto fj = features.begin(); fj != features.end(); ++fj) { + std::vector &ff = fj->second; + totalsize += ff.size(); } double progress = floor((((*geompos_in + *along - alongminus) / (double) todo) + z) / (maxzoom + 1) * 1000) / 10; From 1bed5723505a6bbff6b0bc30edd844a1572e47e5 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 30 Aug 2016 15:05:33 -0700 Subject: [PATCH 10/13] Rename variables for clarity --- tile.cpp | 98 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/tile.cpp b/tile.cpp index 8981a92..b7c7cad 100644 --- a/tile.cpp +++ b/tile.cpp @@ -608,7 +608,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s long long unclipped_features = 0; std::vector partials; - std::map> features; + std::map> layers; int within[child_shards]; long long geompos[child_shards]; @@ -926,12 +926,12 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s // printf("segment %d layer %lld is %s\n", partials[i].segment, partials[i].layer, (*layer_unmaps)[partials[i].segment][partials[i].layer].c_str()); std::string layername = (*layer_unmaps)[partials[i].segment][partials[i].layer]; - if (features.count(layername) == 0) { - features.insert(std::pair>(layername, std::vector())); + if (layers.count(layername) == 0) { + layers.insert(std::pair>(layername, std::vector())); } - auto f = features.find(layername); - f->second.push_back(c); + auto l = layers.find(layername); + l->second.push_back(c); } } } @@ -946,100 +946,100 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s } } - for (auto fj = features.begin(); fj != features.end(); ++fj) { - std::vector &ff = fj->second; + for (auto layer_iterator = layers.begin(); layer_iterator != layers.end(); ++layer_iterator) { + std::vector &layer_features = layer_iterator->second; if (additional[A_REORDER]) { - std::sort(ff.begin(), ff.end()); + std::sort(layer_features.begin(), layer_features.end()); } std::vector out; - if (ff.size() > 0) { - out.push_back(ff[0]); + if (layer_features.size() > 0) { + out.push_back(layer_features[0]); } - for (size_t x = 1; x < ff.size(); x++) { + for (size_t x = 1; x < layer_features.size(); x++) { size_t y = out.size() - 1; #if 0 - if (out.size() > 0 && coalcmp(&ff[x], &out[y]) < 0) { + if (out.size() > 0 && coalcmp(&layer_features[x], &out[y]) < 0) { fprintf(stderr, "\nfeature out of order\n"); } #endif - if (additional[A_COALESCE] && out.size() > 0 && out[y].geom.size() + ff[x].geom.size() < 700 && coalcmp(&ff[x], &out[y]) == 0 && ff[x].type != VT_POINT) { - for (size_t g = 0; g < ff[x].geom.size(); g++) { - out[y].geom.push_back(ff[x].geom[g]); + if (additional[A_COALESCE] && out.size() > 0 && out[y].geom.size() + layer_features[x].geom.size() < 700 && coalcmp(&layer_features[x], &out[y]) == 0 && layer_features[x].type != VT_POINT) { + for (size_t g = 0; g < layer_features[x].geom.size(); g++) { + out[y].geom.push_back(layer_features[x].geom[g]); } out[y].coalesced = true; } else { - out.push_back(ff[x]); + out.push_back(layer_features[x]); } } - ff = out; + layer_features = out; out.clear(); - for (size_t x = 0; x < ff.size(); x++) { - if (ff[x].coalesced && ff[x].type == VT_LINE) { - ff[x].geom = remove_noop(ff[x].geom, ff[x].type, 0); - ff[x].geom = simplify_lines(ff[x].geom, 32, 0, - !(prevent[P_CLIPPING] || prevent[P_DUPLICATION]), simplification); + for (size_t x = 0; x < layer_features.size(); x++) { + if (layer_features[x].coalesced && layer_features[x].type == VT_LINE) { + layer_features[x].geom = remove_noop(layer_features[x].geom, layer_features[x].type, 0); + layer_features[x].geom = simplify_lines(layer_features[x].geom, 32, 0, + !(prevent[P_CLIPPING] || prevent[P_DUPLICATION]), simplification); } - if (ff[x].type == VT_POLYGON) { - if (ff[x].coalesced) { - ff[x].geom = clean_or_clip_poly(ff[x].geom, 0, 0, 0, false); + if (layer_features[x].type == VT_POLYGON) { + if (layer_features[x].coalesced) { + layer_features[x].geom = clean_or_clip_poly(layer_features[x].geom, 0, 0, 0, false); } - ff[x].geom = close_poly(ff[x].geom); + layer_features[x].geom = close_poly(layer_features[x].geom); } - if (ff[x].geom.size() > 0) { - out.push_back(ff[x]); + if (layer_features[x].geom.size() > 0) { + out.push_back(layer_features[x]); } } - ff = out; + layer_features = out; if (prevent[P_INPUT_ORDER]) { - std::sort(ff.begin(), ff.end(), preservecmp); + std::sort(layer_features.begin(), layer_features.end(), preservecmp); } } mvt_tile tile; - for (auto fj = features.begin(); fj != features.end(); ++fj) { - std::vector &ff = fj->second; + for (auto layer_iterator = layers.begin(); layer_iterator != layers.end(); ++layer_iterator) { + std::vector &layer_features = layer_iterator->second; mvt_layer layer; - layer.name = fj->first; + layer.name = layer_iterator->first; layer.version = 2; layer.extent = 1 << line_detail; - for (size_t x = 0; x < ff.size(); x++) { + for (size_t x = 0; x < layer_features.size(); x++) { mvt_feature feature; - if (ff[x].type == VT_LINE || ff[x].type == VT_POLYGON) { - ff[x].geom = remove_noop(ff[x].geom, ff[x].type, 0); + if (layer_features[x].type == VT_LINE || layer_features[x].type == VT_POLYGON) { + layer_features[x].geom = remove_noop(layer_features[x].geom, layer_features[x].type, 0); } - if (ff[x].geom.size() == 0) { + if (layer_features[x].geom.size() == 0) { continue; } - feature.type = ff[x].type; - feature.geometry = to_feature(ff[x].geom); - count += ff[x].geom.size(); - ff[x].geom.clear(); + feature.type = layer_features[x].type; + feature.geometry = to_feature(layer_features[x].geom); + count += layer_features[x].geom.size(); + layer_features[x].geom.clear(); - feature.id = ff[x].id; - feature.has_id = ff[x].has_id; + feature.id = layer_features[x].id; + feature.has_id = layer_features[x].has_id; - decode_meta(ff[x].m, ff[x].keys, ff[x].values, ff[x].stringpool, layer, feature); + decode_meta(layer_features[x].m, layer_features[x].keys, layer_features[x].values, layer_features[x].stringpool, layer, feature); if (additional[A_CALCULATE_FEATURE_DENSITY]) { int glow = 255; - if (ff[x].spacing > 0) { - glow = (1 / ff[x].spacing); + if (layer_features[x].spacing > 0) { + glow = (1 / layer_features[x].spacing); if (glow > 255) { glow = 255; } @@ -1064,9 +1064,9 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s } long long totalsize = 0; - for (auto fj = features.begin(); fj != features.end(); ++fj) { - std::vector &ff = fj->second; - totalsize += ff.size(); + for (auto layer_iterator = layers.begin(); layer_iterator != layers.end(); ++layer_iterator) { + std::vector &layer_features = layer_iterator->second; + totalsize += layer_features.size(); } double progress = floor((((*geompos_in + *along - alongminus) / (double) todo) + z) / (maxzoom + 1) * 1000) / 10; From d8ba9db386f74283d94f7d4ad8d017ffa9b9d74e Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 30 Aug 2016 15:08:54 -0700 Subject: [PATCH 11/13] Remove unused layer count and layer name list --- main.cpp | 2 +- tile.cpp | 10 +++------- tile.hpp | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/main.cpp b/main.cpp index 79ee22c..8c0377e 100644 --- a/main.cpp +++ b/main.cpp @@ -1643,7 +1643,7 @@ int read_input(std::vector &sources, char *fname, const char *layername, } unsigned midx = 0, midy = 0; - int written = traverse_zooms(fd, size, meta, stringpool, &midx, &midy, layernames, maxzoom, minzoom, basezoom, outdb, droprate, buffer, fname, tmpdir, gamma, nlayers, full_detail, low_detail, min_detail, meta_off, pool_off, initial_x, initial_y, simplification, layermaps); + int written = traverse_zooms(fd, size, meta, stringpool, &midx, &midy, maxzoom, minzoom, basezoom, outdb, droprate, buffer, fname, tmpdir, gamma, full_detail, low_detail, min_detail, meta_off, pool_off, initial_x, initial_y, simplification, layermaps); if (maxzoom != written) { fprintf(stderr, "\n\n\n*** NOTE TILES ONLY COMPLETE THROUGH ZOOM %d ***\n\n\n", written); diff --git a/tile.cpp b/tile.cpp index b7c7cad..564e82e 100644 --- a/tile.cpp +++ b/tile.cpp @@ -557,7 +557,7 @@ int manage_gap(unsigned long long index, unsigned long long *previndex, double s return 0; } -long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *stringpool, int z, unsigned tx, unsigned ty, int detail, int min_detail, int basezoom, std::vector *layernames, sqlite3 *outdb, double droprate, int buffer, const char *fname, FILE **geomfile, int minzoom, int maxzoom, double todo, volatile long long *along, long long alongminus, double gamma, int nlayers, int child_shards, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, volatile int *running, double simplification, std::vector> *layermaps, std::vector> *layer_unmaps) { +long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *stringpool, int z, unsigned tx, unsigned ty, int detail, int min_detail, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, FILE **geomfile, int minzoom, int maxzoom, double todo, volatile long long *along, long long alongminus, double gamma, int child_shards, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, volatile int *running, double simplification, std::vector> *layermaps, std::vector> *layer_unmaps) { int line_detail; double fraction = 1; @@ -1136,7 +1136,6 @@ struct write_tile_args { char *stringpool; int min_detail; int basezoom; - std::vector *layernames; sqlite3 *outdb; double droprate; int buffer; @@ -1145,7 +1144,6 @@ struct write_tile_args { double todo; volatile long long *along; double gamma; - int nlayers; int child_shards; int *geomfd; off_t *geom_size; @@ -1205,7 +1203,7 @@ void *run_thread(void *vargs) { // fprintf(stderr, "%d/%u/%u\n", z, x, y); - long long len = write_tile(geom, &geompos, arg->metabase, arg->stringpool, z, x, y, z == arg->maxzoom ? arg->full_detail : arg->low_detail, arg->min_detail, arg->basezoom, arg->layernames, arg->outdb, arg->droprate, arg->buffer, arg->fname, arg->geomfile, arg->minzoom, arg->maxzoom, arg->todo, arg->along, geompos, arg->gamma, arg->nlayers, arg->child_shards, arg->meta_off, arg->pool_off, arg->initial_x, arg->initial_y, arg->running, arg->simplification, arg->layermaps, arg->layer_unmaps); + long long len = write_tile(geom, &geompos, arg->metabase, arg->stringpool, z, x, y, z == arg->maxzoom ? arg->full_detail : arg->low_detail, arg->min_detail, arg->basezoom, arg->outdb, arg->droprate, arg->buffer, arg->fname, arg->geomfile, arg->minzoom, arg->maxzoom, arg->todo, arg->along, geompos, arg->gamma, arg->child_shards, arg->meta_off, arg->pool_off, arg->initial_x, arg->initial_y, arg->running, arg->simplification, arg->layermaps, arg->layer_unmaps); if (len < 0) { int *err = &arg->err; @@ -1256,7 +1254,7 @@ void *run_thread(void *vargs) { return NULL; } -int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpool, unsigned *midx, unsigned *midy, std::vector &layernames, int maxzoom, int minzoom, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, const char *tmpdir, double gamma, int nlayers, int full_detail, int low_detail, int min_detail, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, std::vector> &layermaps) { +int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpool, unsigned *midx, unsigned *midy, int maxzoom, int minzoom, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, const char *tmpdir, double gamma, int full_detail, int low_detail, int min_detail, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, std::vector> &layermaps) { // Table to map segment and layer number back to layer name std::vector> layer_unmaps; for (size_t seg = 0; seg < layermaps.size(); seg++) { @@ -1379,7 +1377,6 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo args[thread].stringpool = stringpool; args[thread].min_detail = min_detail; args[thread].basezoom = basezoom; - args[thread].layernames = &layernames; args[thread].outdb = outdb; // locked with db_lock args[thread].droprate = droprate; args[thread].buffer = buffer; @@ -1388,7 +1385,6 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo args[thread].todo = todo; args[thread].along = &along; // locked with var_lock args[thread].gamma = gamma; - args[thread].nlayers = nlayers; args[thread].child_shards = TEMP_FILES / threads; args[thread].simplification = simplification; diff --git a/tile.hpp b/tile.hpp index e6c25b5..ffbb960 100644 --- a/tile.hpp +++ b/tile.hpp @@ -1,5 +1,5 @@ -long long write_tile(char **geom, char *metabase, char *stringpool, unsigned *file_bbox, int z, unsigned x, unsigned y, int detail, int min_detail, int basezoom, char **layernames, sqlite3 *outdb, double droprate, int buffer, const char *fname, FILE **geomfile, int file_minzoom, int file_maxzoom, double todo, char *geomstart, long long along, double gamma, int nlayers); +long long write_tile(char **geom, char *metabase, char *stringpool, unsigned *file_bbox, int z, unsigned x, unsigned y, int detail, int min_detail, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, FILE **geomfile, int file_minzoom, int file_maxzoom, double todo, char *geomstart, long long along, double gamma, int nlayers); -int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpool, unsigned *midx, unsigned *midy, std::vector &layernames, int maxzoom, int minzoom, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, const char *tmpdir, double gamma, int nlayers, int full_detail, int low_detail, int min_detail, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, std::vector > &layermap); +int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpool, unsigned *midx, unsigned *midy, int maxzoom, int minzoom, int basezoom, sqlite3 *outdb, double droprate, int buffer, const char *fname, const char *tmpdir, double gamma, int full_detail, int low_detail, int min_detail, long long *meta_off, long long *pool_off, unsigned *initial_x, unsigned *initial_y, double simplification, std::vector > &layermap); int manage_gap(unsigned long long index, unsigned long long *previndex, double scale, double gamma, double *gap); From 76739fd27beb38d85e3aaadf748fcd0dea8788d0 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 30 Aug 2016 15:32:09 -0700 Subject: [PATCH 12/13] Fix a typo so it actually works, and add a test and documentation --- README.md | 15 ++ geojson.cpp | 4 +- man/tippecanoe.1 | 17 ++ tests/muni/muni.json | 38 +-- tests/muni/out/-Z11_-z11.json | 80 +++---- ...-Z11_-z11_--calculate-feature-density.json | 80 +++---- .../out/-Z11_-z11_--prefer-radix-sort.json | 80 +++---- tests/muni/out/-Z11_-z11_-g2.json | 36 +-- tests/muni/out/-Z11_-z13_-Bf2000.json | 206 +++++++++-------- tests/muni/out/-Z11_-z13_-rf2000.json | 182 ++++++++------- tests/muni/out/-Z11_-z13_-rf2000_-Bg.json | 218 ++++++++++-------- tests/muni/out/-Z11_-z13_-rf2000_-g2.json | 150 ++++++------ tests/muni/out/-z1_-Z1_-ao_-P.json | 80 +++---- 13 files changed, 646 insertions(+), 540 deletions(-) diff --git a/README.md b/README.md index f11a1f3..112a143 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,21 @@ with a `tippecanoe` object specifiying a `maxzoom` of 9 and a `minzoom` of 4, th will only appear in the vector tiles for zoom levels 4 through 9. Note that the `tippecanoe` object belongs to the Feature, not to its `properties`. +You can also specify a layer name in the `tippecanoe` object, which will take precedence over +the filename or name specified using `--layer`, like this: + +``` +{ + "type" : "Feature", + "tippecanoe" : { "layer" : "streets" }, + "properties" : { "FULLNAME" : "N Vasco Rd" }, + "geometry" : { + "type" : "LineString", + "coordinates" : [ [ -121.733350, 37.767671 ], [ -121.733600, 37.767483 ], [ -121.733131, 37.766952 ] ] + } +} +``` + Point styling ------------- diff --git a/geojson.cpp b/geojson.cpp index a5b117e..60781dc 100644 --- a/geojson.cpp +++ b/geojson.cpp @@ -226,8 +226,8 @@ int serialize_geometry(json_object *geometry, json_object *properties, json_obje tippecanoe_maxzoom = atoi(max->string); } - json_object *ln = json_hash_get(tippecanoe, "layername"); - if (ln != NULL && (max->type == JSON_STRING || max->type == JSON_NUMBER)) { + json_object *ln = json_hash_get(tippecanoe, "layer"); + if (ln != NULL && (ln->type == JSON_STRING || ln->type == JSON_NUMBER)) { tippecanoe_layername = std::string(ln->string); } } diff --git a/man/tippecanoe.1 b/man/tippecanoe.1 index 78dead0..846059f 100644 --- a/man/tippecanoe.1 +++ b/man/tippecanoe.1 @@ -208,6 +208,23 @@ If you have a feature like this: with a \fB\fCtippecanoe\fR object specifiying a \fB\fCmaxzoom\fR of 9 and a \fB\fCminzoom\fR of 4, the feature will only appear in the vector tiles for zoom levels 4 through 9. Note that the \fB\fCtippecanoe\fR object belongs to the Feature, not to its \fB\fCproperties\fR\&. +.PP +You can also specify a layer name in the \fB\fCtippecanoe\fR object, which will take precedence over +the filename or name specified using \fB\fC\-\-layer\fR, like this: +.PP +.RS +.nf +{ + "type" : "Feature", + "tippecanoe" : { "layer" : "streets" }, + "properties" : { "FULLNAME" : "N Vasco Rd" }, + "geometry" : { + "type" : "LineString", + "coordinates" : [ [ \-121.733350, 37.767671 ], [ \-121.733600, 37.767483 ], [ \-121.733131, 37.766952 ] ] + } +} +.fi +.RE .SH Point styling .PP To provide a consistent density gradient as you zoom, the Mapbox Studio style needs to be diff --git a/tests/muni/muni.json b/tests/muni/muni.json index d756370..7e46c4a 100644 --- a/tests/muni/muni.json +++ b/tests/muni/muni.json @@ -2406,9 +2406,9 @@ { "type": "Feature", "properties": { "name": "Macalla St & Nimitz Dr" }, "geometry": { "type": "Point", "coordinates": [ -122.369859,37.812036 ] } } { "type": "Feature", "properties": { "name": "Macalla St & Treasure Island Rd" }, "geometry": { "type": "Point", "coordinates": [ -122.3709,37.81324 ] } } { "type": "Feature", "properties": { "name": "Mccoppin St & Gough St" }, "geometry": { "type": "Point", "coordinates": [ -122.42079,37.77177 ] } } -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407695,37.784199 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407695,37.784199 ] } } { "type": "Feature", "properties": { "name": "Balboa Park BART/Mezzanine Level" }, "geometry": { "type": "Point", "coordinates": [ -122.447127,37.720988 ] } } -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419193,37.775069 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419193,37.775069 ] } } { "type": "Feature", "properties": { "name": "Monterey Blvd & Acadia St" }, "geometry": { "type": "Point", "coordinates": [ -122.437768,37.731668 ] } } { "type": "Feature", "properties": { "name": "Monterey Blvd & Acadia St" }, "geometry": { "type": "Point", "coordinates": [ -122.43726,37.7315 ] } } { "type": "Feature", "properties": { "name": "Monterey Blvd & Baden St" }, "geometry": { "type": "Point", "coordinates": [ -122.439635,37.731668 ] } } @@ -2714,12 +2714,12 @@ { "type": "Feature", "properties": { "name": "Montgomery St (Presidio)/Bldg 102" }, "geometry": { "type": "Point", "coordinates": [ -122.45899,37.8002 ] } } { "type": "Feature", "properties": { "name": "Montgomery St (Presidio)/Bldg 102" }, "geometry": { "type": "Point", "coordinates": [ -122.45913,37.80013 ] } } { "type": "Feature", "properties": { "name": "Montgomery St & Moraga Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.46036,37.79853 ] } } -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429168,37.767194 ] } } -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414813,37.778542 ] } } -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435231,37.76262 ] } } -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396549,37.793003 ] } } -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458623,37.748351 ] } } -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401925,37.788702 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429168,37.767194 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414813,37.778542 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435231,37.76262 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396549,37.793003 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458623,37.748351 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401925,37.788702 ] } } { "type": "Feature", "properties": { "name": "Noe St & 27th St" }, "geometry": { "type": "Point", "coordinates": [ -122.43148,37.74668 ] } } { "type": "Feature", "properties": { "name": "Noe St & 27th St" }, "geometry": { "type": "Point", "coordinates": [ -122.43132,37.74654 ] } } { "type": "Feature", "properties": { "name": "Noe St & 28th St" }, "geometry": { "type": "Point", "coordinates": [ -122.43134,37.74519 ] } } @@ -3977,14 +3977,14 @@ { "type": "Feature", "properties": { "name": "Yerba Buena Ave & Hazelwood Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.459705,37.734389 ] } } { "type": "Feature", "properties": { "name": "Yerba Buena Ave & Ravenwood Dr" }, "geometry": { "type": "Point", "coordinates": [ -122.46055,37.73531 ] } } { "type": "Feature", "properties": { "name": "Yerba Buena Ave & Saint Elmo Way" }, "geometry": { "type": "Point", "coordinates": [ -122.458719,37.732623 ] } } -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435289,37.762683 ] } } -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396396,37.793143 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435289,37.762683 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396396,37.793143 ] } } { "type": "Feature", "properties": { "name": "Forest Hill Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.459192,37.74817 ] } } -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402127,37.788791 ] } } -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407822,37.7843 ] } } -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.41934,37.775234 ] } } -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.414995,37.778675 ] } } -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429321,37.767327 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402127,37.788791 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407822,37.7843 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.41934,37.775234 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.414995,37.778675 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429321,37.767327 ] } } { "type": "Feature", "properties": { "name": "7th St & Bryant St" }, "geometry": { "type": "Point", "coordinates": [ -122.405005,37.774587 ] } } { "type": "Feature", "properties": { "name": "4th St & Townsend St" }, "geometry": { "type": "Point", "coordinates": [ -122.39498,37.77709 ] } } { "type": "Feature", "properties": { "name": "19th Ave & Junipero Serra Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.472813,37.717371 ] } } @@ -4145,7 +4145,7 @@ { "type": "Feature", "properties": { "name": "BAY SHORE BLVD & SUNNYDALE AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.405067,37.708837 ] } } { "type": "Feature", "properties": { "name": "3RD ST & WILLIAMS ST" }, "geometry": { "type": "Point", "coordinates": [ -122.392753,37.72922 ] } } { "type": "Feature", "properties": { "name": "COLUMBUS AVE & CHESTNUT ST" }, "geometry": { "type": "Point", "coordinates": [ -122.413978,37.80283 ] } } -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412521,37.780345 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412521,37.780345 ] } } { "type": "Feature", "properties": { "name": "SPEAR ST & MARKET ST" }, "geometry": { "type": "Point", "coordinates": [ -122.395605,37.793633 ] } } { "type": "Feature", "properties": { "name": "BROADWAY & GRANT AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.407342,37.797849 ] } } { "type": "Feature", "properties": { "name": "Lincoln Way & 19TH AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.477186,37.765384 ] } } @@ -4177,9 +4177,9 @@ { "type": "Feature", "properties": { "name": "CORTLAND AVE & BRONTE ST" }, "geometry": { "type": "Point", "coordinates": [ -122.41017,37.739711 ] } } { "type": "Feature", "properties": { "name": "5TH ST & FOLSOM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.403466,37.78044 ] } } { "type": "Feature", "properties": { "name": "ELLIS ST & MASON ST" }, "geometry": { "type": "Point", "coordinates": [ -122.409367,37.785358 ] } } -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419252,37.775029 ] } } -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396431,37.793152 ] } } -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419263,37.775145 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419252,37.775029 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396431,37.793152 ] } } +{ "type": "Feature", "tippecanoe": { "layer": "subway" }, "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419263,37.775145 ] } } { "type": "Feature", "properties": { "name": "Judah/La Playa/Ocean Beach" }, "geometry": { "type": "Point", "coordinates": [ -122.509201,37.760348 ] } } { "type": "Feature", "properties": { "name": "ASHBURY ST & CLAYTON ST" }, "geometry": { "type": "Point", "coordinates": [ -122.446966,37.763014 ] } } { "type": "Feature", "properties": { "name": "KANSAS ST & 23RD ST" }, "geometry": { "type": "Point", "coordinates": [ -122.402462,37.75443 ] } } diff --git a/tests/muni/out/-Z11_-z11.json b/tests/muni/out/-Z11_-z11.json index ded0e1b..7d7ec2c 100644 --- a/tests/muni/out/-Z11_-z11.json +++ b/tests/muni/out/-Z11_-z11.json @@ -3,7 +3,7 @@ "center": "-122.431641,37.788049,11", "description": "tests/muni/out/-Z11_-z11.json.check.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {\"name\": \"String\"} } ] }", +"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {\"name\": \"String\"} }, { \"id\": \"subway\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {} } ] }", "maxzoom": "11", "minzoom": "11", "name": "tests/muni/out/-Z11_-z11.json.check.mbtiles", @@ -3818,10 +3818,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435417, 37.762641 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435331, 37.762708 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435460, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435417, 37.762471 ] } } @@ -4110,8 +4106,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458978, 37.748186 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "LAGUNA HONDA BLVD & 19TH AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.458763, 37.748220 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458849, 37.747915 ] } } @@ -6070,14 +6064,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402158, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788522 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792049 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792321 ] } } @@ -6162,14 +6152,8 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & BEALE ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396622, 37.793033 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396579, 37.793033 ] } } -, { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793202 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396193, 37.793474 ] } } , { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396150, 37.793508 ] } } @@ -6784,8 +6768,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.412629, 37.780382 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.411942, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409925, 37.783401 ] } } @@ -6818,16 +6800,10 @@ , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419410, 37.775226 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } -, { "type": "Feature", "properties": { "name": "Van Ness Ave & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775328 ] } } , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775260 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775159 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775091 ] } } -, { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419152, 37.775091 ] } } , { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418680, 37.775532 ] } } @@ -6860,8 +6836,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774989 ] } } , { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774955 ] } } @@ -6890,14 +6864,10 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St" }, "geometry": { "type": "Point", "coordinates": [ -122.415161, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415032, 37.778686 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 8th St" }, "geometry": { "type": "Point", "coordinates": [ -122.414861, 37.778618 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778551 ] } } -, { "type": "Feature", "properties": { "name": "8TH St AND MARKET St" }, "geometry": { "type": "Point", "coordinates": [ -122.414775, 37.778585 ] } } , { "type": "Feature", "properties": { "name": "8th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.414603, 37.778517 ] } } @@ -6970,10 +6940,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767696 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767356 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429194, 37.767221 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767288 ] } } , { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429066, 37.767356 ] } } @@ -7314,8 +7280,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB" }, "geometry": { "type": "Point", "coordinates": [ -122.407651, 37.784792 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } -, { "type": "Feature", "properties": { "name": "Powell/Market" }, "geometry": { "type": "Point", "coordinates": [ -122.407651, 37.784486 ] } } , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408209, 37.784181 ] } } @@ -7328,8 +7292,6 @@ , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408080, 37.784011 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.407351, 37.784690 ] } } , { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } @@ -9712,6 +9674,46 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Giants Dr" }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717504 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435331, 37.762708 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402158, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396579, 37.793033 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775159 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775091 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415032, 37.778686 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778551 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429194, 37.767221 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 11, "x": 954, "y": 791 }, "features": [ diff --git a/tests/muni/out/-Z11_-z11_--calculate-feature-density.json b/tests/muni/out/-Z11_-z11_--calculate-feature-density.json index ba62f9d..6476057 100644 --- a/tests/muni/out/-Z11_-z11_--calculate-feature-density.json +++ b/tests/muni/out/-Z11_-z11_--calculate-feature-density.json @@ -3,7 +3,7 @@ "center": "-122.431641,37.788049,11", "description": "tests/muni/out/-Z11_-z11_--calculate-feature-density.json.check.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {\"name\": \"String\", \"tippecanoe_feature_density\": \"Number\"} } ] }", +"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {\"name\": \"String\", \"tippecanoe_feature_density\": \"Number\"} }, { \"id\": \"subway\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {\"tippecanoe_feature_density\": \"Number\"} } ] }", "maxzoom": "11", "minzoom": "11", "name": "tests/muni/out/-Z11_-z11_--calculate-feature-density.json.check.mbtiles", @@ -3818,10 +3818,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.435417, 37.762641 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.435331, 37.762708 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown", "tippecanoe_feature_density": 8 }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St", "tippecanoe_feature_density": 8 }, "geometry": { "type": "Point", "coordinates": [ -122.435460, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Market St & Castro St", "tippecanoe_feature_density": 1 }, "geometry": { "type": "Point", "coordinates": [ -122.435417, 37.762471 ] } } @@ -4110,8 +4106,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta", "tippecanoe_feature_density": 17 }, "geometry": { "type": "Point", "coordinates": [ -122.458978, 37.748186 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown", "tippecanoe_feature_density": 17 }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "LAGUNA HONDA BLVD & 19TH AVE", "tippecanoe_feature_density": 3 }, "geometry": { "type": "Point", "coordinates": [ -122.458763, 37.748220 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.458849, 37.747915 ] } } @@ -6070,14 +6064,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound", "tippecanoe_feature_density": 2 }, "geometry": { "type": "Point", "coordinates": [ -122.402158, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St", "tippecanoe_feature_density": 2 }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788522 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St", "tippecanoe_feature_density": 1 }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown", "tippecanoe_feature_density": 1 }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792049 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792321 ] } } @@ -6162,14 +6152,8 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & BEALE ST", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.396622, 37.793033 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.396579, 37.793033 ] } } -, { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST", "tippecanoe_feature_density": 17 }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793202 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station", "tippecanoe_feature_density": 17 }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station", "tippecanoe_feature_density": 85 }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St", "tippecanoe_feature_density": 85 }, "geometry": { "type": "Point", "coordinates": [ -122.396193, 37.793474 ] } } , { "type": "Feature", "properties": { "name": "Market St & Drumm St", "tippecanoe_feature_density": 7 }, "geometry": { "type": "Point", "coordinates": [ -122.396150, 37.793508 ] } } @@ -6784,8 +6768,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.412629, 37.780382 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.411942, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Turk St & Taylor St", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.409925, 37.783401 ] } } @@ -6818,16 +6800,10 @@ , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.419410, 37.775226 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound", "tippecanoe_feature_density": 2 }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } -, { "type": "Feature", "properties": { "name": "Van Ness Ave & Market St", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775328 ] } } , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775260 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound", "tippecanoe_feature_density": 28 }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775159 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station", "tippecanoe_feature_density": 28 }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775091 ] } } -, { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST", "tippecanoe_feature_density": 18 }, "geometry": { "type": "Point", "coordinates": [ -122.419152, 37.775091 ] } } , { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission", "tippecanoe_feature_density": 18 }, "geometry": { "type": "Point", "coordinates": [ -122.418680, 37.775532 ] } } @@ -6860,8 +6836,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & 12TH ST", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St.", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774989 ] } } , { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St.", "tippecanoe_feature_density": 51 }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774955 ] } } @@ -6890,14 +6864,10 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.415161, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.415032, 37.778686 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 8th St", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.414861, 37.778618 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St", "tippecanoe_feature_density": 2 }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn", "tippecanoe_feature_density": 2 }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778551 ] } } -, { "type": "Feature", "properties": { "name": "8TH St AND MARKET St", "tippecanoe_feature_density": 4 }, "geometry": { "type": "Point", "coordinates": [ -122.414775, 37.778585 ] } } , { "type": "Feature", "properties": { "name": "8th St & Market St", "tippecanoe_feature_density": 4 }, "geometry": { "type": "Point", "coordinates": [ -122.414603, 37.778517 ] } } @@ -6970,10 +6940,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St", "tippecanoe_feature_density": 10 }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767696 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767356 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.429194, 37.767221 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St", "tippecanoe_feature_density": 2 }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767288 ] } } , { "type": "Feature", "properties": { "name": "Market St & Church St", "tippecanoe_feature_density": 2 }, "geometry": { "type": "Point", "coordinates": [ -122.429066, 37.767356 ] } } @@ -7314,8 +7280,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB", "tippecanoe_feature_density": 8 }, "geometry": { "type": "Point", "coordinates": [ -122.407651, 37.784792 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound", "tippecanoe_feature_density": 4 }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } -, { "type": "Feature", "properties": { "name": "Powell/Market", "tippecanoe_feature_density": 4 }, "geometry": { "type": "Point", "coordinates": [ -122.407651, 37.784486 ] } } , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St", "tippecanoe_feature_density": 5 }, "geometry": { "type": "Point", "coordinates": [ -122.408209, 37.784181 ] } } @@ -7328,8 +7292,6 @@ , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St", "tippecanoe_feature_density": 8 }, "geometry": { "type": "Point", "coordinates": [ -122.408080, 37.784011 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown", "tippecanoe_feature_density": 8 }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St", "tippecanoe_feature_density": 1 }, "geometry": { "type": "Point", "coordinates": [ -122.407351, 37.784690 ] } } , { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } @@ -9712,6 +9674,46 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Giants Dr", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717504 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.435331, 37.762708 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown", "tippecanoe_feature_density": 8 }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown", "tippecanoe_feature_density": 17 }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound", "tippecanoe_feature_density": 2 }, "geometry": { "type": "Point", "coordinates": [ -122.402158, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown", "tippecanoe_feature_density": 1 }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.396579, 37.793033 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station", "tippecanoe_feature_density": 17 }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station", "tippecanoe_feature_density": 85 }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound", "tippecanoe_feature_density": 2 }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound", "tippecanoe_feature_density": 28 }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775159 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station", "tippecanoe_feature_density": 28 }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775091 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.415032, 37.778686 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn", "tippecanoe_feature_density": 2 }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778551 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown", "tippecanoe_feature_density": 0 }, "geometry": { "type": "Point", "coordinates": [ -122.429194, 37.767221 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound", "tippecanoe_feature_density": 4 }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown", "tippecanoe_feature_density": 8 }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 11, "x": 954, "y": 791 }, "features": [ diff --git a/tests/muni/out/-Z11_-z11_--prefer-radix-sort.json b/tests/muni/out/-Z11_-z11_--prefer-radix-sort.json index 18c1489..eefe086 100644 --- a/tests/muni/out/-Z11_-z11_--prefer-radix-sort.json +++ b/tests/muni/out/-Z11_-z11_--prefer-radix-sort.json @@ -3,7 +3,7 @@ "center": "-122.431641,37.788049,11", "description": "tests/muni/out/-Z11_-z11_--prefer-radix-sort.json.check.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {\"name\": \"String\"} } ] }", +"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {\"name\": \"String\"} }, { \"id\": \"subway\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {} } ] }", "maxzoom": "11", "minzoom": "11", "name": "tests/muni/out/-Z11_-z11_--prefer-radix-sort.json.check.mbtiles", @@ -3818,10 +3818,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435417, 37.762641 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435331, 37.762708 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435460, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435417, 37.762471 ] } } @@ -4110,8 +4106,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458978, 37.748186 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "LAGUNA HONDA BLVD & 19TH AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.458763, 37.748220 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458849, 37.747915 ] } } @@ -6070,14 +6064,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402158, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788522 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792049 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792321 ] } } @@ -6162,14 +6152,8 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & BEALE ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396622, 37.793033 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396579, 37.793033 ] } } -, { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793202 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396193, 37.793474 ] } } , { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396150, 37.793508 ] } } @@ -6784,8 +6768,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.412629, 37.780382 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.411942, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409925, 37.783401 ] } } @@ -6818,16 +6800,10 @@ , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419410, 37.775226 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } -, { "type": "Feature", "properties": { "name": "Van Ness Ave & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775328 ] } } , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775260 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775159 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775091 ] } } -, { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419152, 37.775091 ] } } , { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418680, 37.775532 ] } } @@ -6860,8 +6836,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774989 ] } } , { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774955 ] } } @@ -6890,14 +6864,10 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St" }, "geometry": { "type": "Point", "coordinates": [ -122.415161, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415032, 37.778686 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 8th St" }, "geometry": { "type": "Point", "coordinates": [ -122.414861, 37.778618 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778551 ] } } -, { "type": "Feature", "properties": { "name": "8TH St AND MARKET St" }, "geometry": { "type": "Point", "coordinates": [ -122.414775, 37.778585 ] } } , { "type": "Feature", "properties": { "name": "8th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.414603, 37.778517 ] } } @@ -6970,10 +6940,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767696 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767356 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429194, 37.767221 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767288 ] } } , { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429066, 37.767356 ] } } @@ -7314,8 +7280,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB" }, "geometry": { "type": "Point", "coordinates": [ -122.407651, 37.784792 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } -, { "type": "Feature", "properties": { "name": "Powell/Market" }, "geometry": { "type": "Point", "coordinates": [ -122.407651, 37.784486 ] } } , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408209, 37.784181 ] } } @@ -7328,8 +7292,6 @@ , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408080, 37.784011 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.407351, 37.784690 ] } } , { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } @@ -9712,6 +9674,46 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Giants Dr" }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717504 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435331, 37.762708 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402158, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396579, 37.793033 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775159 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775091 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415032, 37.778686 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778551 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429194, 37.767221 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 11, "x": 954, "y": 791 }, "features": [ diff --git a/tests/muni/out/-Z11_-z11_-g2.json b/tests/muni/out/-Z11_-z11_-g2.json index 04ffbe1..a88fd11 100644 --- a/tests/muni/out/-Z11_-z11_-g2.json +++ b/tests/muni/out/-Z11_-z11_-g2.json @@ -3,7 +3,7 @@ "center": "-122.431641,37.788049,11", "description": "tests/muni/out/-Z11_-z11_-g2.json.check.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {\"name\": \"String\"} } ] }", +"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {\"name\": \"String\"} }, { \"id\": \"subway\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {} } ] }", "maxzoom": "11", "minzoom": "11", "name": "tests/muni/out/-Z11_-z11_-g2.json.check.mbtiles", @@ -2586,8 +2586,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435417, 37.762641 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435417, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Castro St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435117, 37.762403 ] } } @@ -2766,8 +2764,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/opp Forest Hill" }, "geometry": { "type": "Point", "coordinates": [ -122.458935, 37.748390 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458849, 37.747915 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd & Dewey Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.459064, 37.747270 ] } } @@ -4026,8 +4022,6 @@ , { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788522 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792049 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792321 ] } } @@ -4496,8 +4490,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.413187, 37.779840 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.411942, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409925, 37.783401 ] } } @@ -4558,8 +4550,6 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St" }, "geometry": { "type": "Point", "coordinates": [ -122.415161, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415032, 37.778686 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414389, 37.779127 ] } } @@ -4608,8 +4598,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429109, 37.767797 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767356 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Buchanan St" }, "geometry": { "type": "Point", "coordinates": [ -122.426190, 37.769799 ] } } , { "type": "Feature", "properties": { "name": "Market St & Dolores St" }, "geometry": { "type": "Point", "coordinates": [ -122.427135, 37.768883 ] } } @@ -4828,12 +4816,8 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE OUT OB" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784792 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 5th St" }, "geometry": { "type": "Point", "coordinates": [ -122.407994, 37.784113 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } -, { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } , { "type": "Feature", "properties": { "name": "O'Farrell St & Grant Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.405634, 37.786657 ] } } @@ -6376,6 +6360,24 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Bill Walsh Way" }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717504 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415032, 37.778686 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 11, "x": 954, "y": 791 }, "features": [ diff --git a/tests/muni/out/-Z11_-z13_-Bf2000.json b/tests/muni/out/-Z11_-z13_-Bf2000.json index a56b004..e30360d 100644 --- a/tests/muni/out/-Z11_-z13_-Bf2000.json +++ b/tests/muni/out/-Z11_-z13_-Bf2000.json @@ -3,7 +3,7 @@ "center": "-122.409668,37.770713,13", "description": "tests/muni/out/-Z11_-z13_-Bf2000.json.check.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {\"name\": \"String\"} } ] }", +"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {\"name\": \"String\"} }, { \"id\": \"subway\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {} } ] }", "maxzoom": "13", "minzoom": "11", "name": "tests/muni/out/-Z11_-z13_-Bf2000.json.check.mbtiles", @@ -1542,8 +1542,6 @@ , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435803, 37.762301 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435331, 37.762708 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435460, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Castro St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.435288, 37.762403 ] } } @@ -2480,10 +2478,6 @@ , { "type": "Feature", "properties": { "name": "Market St & Beale St" }, "geometry": { "type": "Point", "coordinates": [ -122.397051, 37.792592 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396579, 37.793033 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396150, 37.793508 ] } } , { "type": "Feature", "properties": { "name": "The Embarcadero & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.394476, 37.795034 ] } } @@ -2742,8 +2736,6 @@ , { "type": "Feature", "properties": { "name": "Van Ness Ave & Oak St" }, "geometry": { "type": "Point", "coordinates": [ -122.419496, 37.775532 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775260 ] } } , { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419152, 37.775091 ] } } @@ -2804,8 +2796,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767696 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429194, 37.767221 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Buchanan St" }, "geometry": { "type": "Point", "coordinates": [ -122.426190, 37.769799 ] } } , { "type": "Feature", "properties": { "name": "Market St & Dolores St" }, "geometry": { "type": "Point", "coordinates": [ -122.427135, 37.768883 ] } } @@ -2946,8 +2936,6 @@ , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408252, 37.784011 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } -, { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } , { "type": "Feature", "properties": { "name": "Market St & Grant Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.405162, 37.786420 ] } } @@ -3898,6 +3886,20 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Griffith St" }, "geometry": { "type": "Point", "coordinates": [ -122.388296, 37.718251 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435331, 37.762708 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396579, 37.793033 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429194, 37.767221 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 11, "x": 954, "y": 791 }, "features": [ @@ -6732,10 +6734,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435310, 37.762691 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762624 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435460, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762471 ] } } @@ -7024,8 +7022,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458956, 37.748169 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "LAGUNA HONDA BLVD & 19TH AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.458742, 37.748203 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458827, 37.747915 ] } } @@ -8216,6 +8212,14 @@ , { "type": "Feature", "properties": { "name": "Russia Ave & Moscow St" }, "geometry": { "type": "Point", "coordinates": [ -122.430139, 37.718183 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435310, 37.762691 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762624 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 654, "y": 1582 }, "features": [ @@ -9286,14 +9290,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788505 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402179, 37.788624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 2nd St" }, "geometry": { "type": "Point", "coordinates": [ -122.401321, 37.789353 ] } } , { "type": "Feature", "properties": { "name": "2ND ST & MARKET ST" }, "geometry": { "type": "Point", "coordinates": [ -122.401235, 37.789268 ] } } @@ -9664,8 +9664,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.412629, 37.780365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.411942, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409904, 37.783401 ] } } @@ -9698,16 +9696,10 @@ , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419388, 37.775226 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419345, 37.775243 ] } } -, { "type": "Feature", "properties": { "name": "Van Ness Ave & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775311 ] } } , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775243 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775159 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } -, { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419152, 37.775091 ] } } , { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418659, 37.775515 ] } } @@ -9740,8 +9732,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775040 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775040 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774972 ] } } , { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774938 ] } } @@ -9770,14 +9760,10 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St" }, "geometry": { "type": "Point", "coordinates": [ -122.415140, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415011, 37.778686 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 8th St" }, "geometry": { "type": "Point", "coordinates": [ -122.414839, 37.778618 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778551 ] } } -, { "type": "Feature", "properties": { "name": "8TH St AND MARKET St" }, "geometry": { "type": "Point", "coordinates": [ -122.414775, 37.778585 ] } } , { "type": "Feature", "properties": { "name": "8th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.414603, 37.778500 ] } } @@ -9850,10 +9836,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429130, 37.767679 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767339 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767204 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767271 ] } } , { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429044, 37.767356 ] } } @@ -10194,8 +10176,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB" }, "geometry": { "type": "Point", "coordinates": [ -122.407629, 37.784792 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } -, { "type": "Feature", "properties": { "name": "Powell/Market" }, "geometry": { "type": "Point", "coordinates": [ -122.407651, 37.784469 ] } } , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408187, 37.784164 ] } } @@ -10208,8 +10188,6 @@ , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408080, 37.783994 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407715, 37.784215 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.407329, 37.784690 ] } } , { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } @@ -12442,6 +12420,34 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Giants Dr" }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717487 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419345, 37.775243 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775159 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775040 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415011, 37.778686 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778551 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767339 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767204 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407715, 37.784215 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 655, "y": 1582 }, "features": [ @@ -13396,14 +13402,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788505 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402179, 37.788624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792032 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792304 ] } } @@ -13488,14 +13490,8 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & BEALE ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396600, 37.793033 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793016 ] } } -, { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396386, 37.793202 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793152 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396193, 37.793474 ] } } , { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396128, 37.793508 ] } } @@ -13852,6 +13848,18 @@ , { "type": "Feature", "properties": { "name": "Harrison St & Main St" }, "geometry": { "type": "Point", "coordinates": [ -122.390614, 37.788014 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793016 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793152 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 1908, "y": 1582 }, "features": [ @@ -15980,8 +15988,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458946, 37.748161 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458624, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "LAGUNA HONDA BLVD & 19TH AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.458731, 37.748203 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458817, 37.747906 ] } } @@ -17074,6 +17080,10 @@ , { "type": "Feature", "properties": { "name": "San Jose Ave & Mt Vernon Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.448603, 37.718285 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458624, 37.748356 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1309, "y": 3166 }, "features": [ @@ -18264,10 +18274,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435385, 37.762624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435299, 37.762691 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435235, 37.762624 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435449, 37.762462 ] } } , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762462 ] } } @@ -18418,6 +18424,12 @@ , { "type": "Feature", "properties": { "name": "Market St & Sanchez St" }, "geometry": { "type": "Point", "coordinates": [ -122.431147, 37.765694 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435299, 37.762691 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435235, 37.762624 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1309, "y": 3165 }, "features": [ @@ -20620,8 +20632,6 @@ , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402169, 37.788616 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "2nd St & Stevenson St" }, "geometry": { "type": "Point", "coordinates": [ -122.400656, 37.788624 ] } } , { "type": "Feature", "properties": { "name": "2nd St & Stevenson St" }, "geometry": { "type": "Point", "coordinates": [ -122.400076, 37.788285 ] } } @@ -20974,8 +20984,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.412618, 37.780365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.411932, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409904, 37.783392 ] } } @@ -21008,16 +21016,10 @@ , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419388, 37.775218 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419345, 37.775235 ] } } -, { "type": "Feature", "properties": { "name": "Van Ness Ave & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775311 ] } } , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419184, 37.775243 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.775150 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } -, { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419142, 37.775082 ] } } , { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418659, 37.775506 ] } } @@ -21050,8 +21052,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775031 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775031 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774972 ] } } , { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.774930 ] } } @@ -21080,14 +21080,10 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St" }, "geometry": { "type": "Point", "coordinates": [ -122.415140, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415000, 37.778678 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 8th St" }, "geometry": { "type": "Point", "coordinates": [ -122.414829, 37.778610 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778542 ] } } -, { "type": "Feature", "properties": { "name": "8TH St AND MARKET St" }, "geometry": { "type": "Point", "coordinates": [ -122.414764, 37.778585 ] } } , { "type": "Feature", "properties": { "name": "8th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.414603, 37.778500 ] } } @@ -21160,10 +21156,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429130, 37.767670 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767331 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767195 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767263 ] } } , { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429044, 37.767356 ] } } @@ -21504,8 +21496,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB" }, "geometry": { "type": "Point", "coordinates": [ -122.407619, 37.784783 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784308 ] } } -, { "type": "Feature", "properties": { "name": "Powell/Market" }, "geometry": { "type": "Point", "coordinates": [ -122.407640, 37.784461 ] } } , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408177, 37.784164 ] } } @@ -21518,8 +21508,6 @@ , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408069, 37.783994 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407705, 37.784206 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.407318, 37.784681 ] } } , { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } @@ -22284,6 +22272,32 @@ , { "type": "Feature", "properties": { "name": "3rd St & 25th St" }, "geometry": { "type": "Point", "coordinates": [ -122.387663, 37.753132 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419345, 37.775235 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.775150 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775031 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415000, 37.778678 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778542 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767331 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767195 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784308 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407705, 37.784206 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1310, "y": 3165 }, "features": [ @@ -23222,14 +23236,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402190, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402490, 37.788497 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402169, 37.788616 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792024 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792295 ] } } @@ -23314,14 +23324,8 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & BEALE ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396600, 37.793033 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793007 ] } } -, { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396386, 37.793194 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396439, 37.793160 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396396, 37.793143 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396182, 37.793474 ] } } , { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396128, 37.793499 ] } } @@ -23560,6 +23564,18 @@ , { "type": "Feature", "properties": { "name": "Harrison St & Main St" }, "geometry": { "type": "Point", "coordinates": [ -122.390614, 37.788014 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793007 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396439, 37.793160 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396396, 37.793143 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1311, "y": 3168 }, "features": [ diff --git a/tests/muni/out/-Z11_-z13_-rf2000.json b/tests/muni/out/-Z11_-z13_-rf2000.json index 2b3b826..de3ff15 100644 --- a/tests/muni/out/-Z11_-z13_-rf2000.json +++ b/tests/muni/out/-Z11_-z13_-rf2000.json @@ -3,7 +3,7 @@ "center": "-122.409668,37.770713,13", "description": "tests/muni/out/-Z11_-z13_-rf2000.json.check.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {\"name\": \"String\"} } ] }", +"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {\"name\": \"String\"} }, { \"id\": \"subway\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {} } ] }", "maxzoom": "13", "minzoom": "11", "name": "tests/muni/out/-Z11_-z13_-rf2000.json.check.mbtiles", @@ -1826,8 +1826,6 @@ , { "type": "Feature", "properties": { "name": "Castro St & 16th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435288, 37.764167 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435417, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Castro St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.435288, 37.762403 ] } } @@ -1964,8 +1962,6 @@ , { "type": "Feature", "properties": { "name": "Forest Hill Station" }, "geometry": { "type": "Point", "coordinates": [ -122.458978, 37.748186 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458849, 37.747915 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd & Dewey Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.459064, 37.747270 ] } } @@ -2898,8 +2894,6 @@ , { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788522 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } -, { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792321 ] } } , { "type": "Feature", "properties": { "name": "Sutter St & Sansome St" }, "geometry": { "type": "Point", "coordinates": [ -122.400699, 37.790320 ] } } @@ -2942,8 +2936,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793202 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } -, { "type": "Feature", "properties": { "name": "The Embarcadero & Washington St" }, "geometry": { "type": "Point", "coordinates": [ -122.395592, 37.796695 ] } } , { "type": "Feature", "properties": { "name": "The Embarcadero & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.394476, 37.795034 ] } } @@ -3234,8 +3226,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.413187, 37.779840 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409925, 37.783401 ] } } , { "type": "Feature", "properties": { "name": "Market St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.410269, 37.782349 ] } } @@ -3250,12 +3240,8 @@ , { "type": "Feature", "properties": { "name": "Van Ness Ave & Oak St" }, "geometry": { "type": "Point", "coordinates": [ -122.419496, 37.775532 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775260 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775091 ] } } -, { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418680, 37.775532 ] } } , { "type": "Feature", "properties": { "name": "11th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.418594, 37.775396 ] } } @@ -3270,8 +3256,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & VAN NESS AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774955 ] } } , { "type": "Feature", "properties": { "name": "South Van Ness Ave & Mission St" }, "geometry": { "type": "Point", "coordinates": [ -122.418637, 37.773327 ] } } @@ -3486,8 +3470,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB" }, "geometry": { "type": "Point", "coordinates": [ -122.407651, 37.784792 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } -, { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408209, 37.784181 ] } } , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408252, 37.784011 ] } } @@ -4624,6 +4606,26 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Giants Dr" }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717504 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775091 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 11, "x": 954, "y": 791 }, "features": [ @@ -6590,10 +6592,6 @@ , { "type": "Feature", "properties": { "name": "Castro St & 16th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435267, 37.764167 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435310, 37.762691 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762624 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435267, 37.762556 ] } } @@ -6792,8 +6790,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458956, 37.748169 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458827, 37.747915 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458806, 37.747847 ] } } @@ -7614,6 +7610,14 @@ , { "type": "Feature", "properties": { "name": "Russia Ave & Moscow St" }, "geometry": { "type": "Point", "coordinates": [ -122.430139, 37.718183 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435310, 37.762691 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762624 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 654, "y": 1582 }, "features": [ @@ -8618,8 +8622,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.412629, 37.780365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409904, 37.783401 ] } } , { "type": "Feature", "properties": { "name": "Market St & 6th St" }, "geometry": { "type": "Point", "coordinates": [ -122.410419, 37.782112 ] } } @@ -8646,8 +8648,6 @@ , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775243 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } -, { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419152, 37.775091 ] } } , { "type": "Feature", "properties": { "name": "11th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.418530, 37.775515 ] } } @@ -8670,8 +8670,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775040 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775040 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774938 ] } } , { "type": "Feature", "properties": { "name": "South Van Ness Ave & Mission St" }, "geometry": { "type": "Point", "coordinates": [ -122.418637, 37.773327 ] } } @@ -8690,8 +8688,6 @@ , { "type": "Feature", "properties": { "name": "11th St & Howard St" }, "geometry": { "type": "Point", "coordinates": [ -122.415397, 37.772835 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415011, 37.778686 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 8th St" }, "geometry": { "type": "Point", "coordinates": [ -122.414839, 37.778618 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } @@ -8746,8 +8742,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429130, 37.767679 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767339 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767271 ] } } , { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429044, 37.767356 ] } } @@ -8992,8 +8986,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 5th St" }, "geometry": { "type": "Point", "coordinates": [ -122.408144, 37.783893 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407715, 37.784215 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.407329, 37.784690 ] } } , { "type": "Feature", "properties": { "name": "Geary Blvd & Stockton St" }, "geometry": { "type": "Point", "coordinates": [ -122.406492, 37.787657 ] } } @@ -10532,6 +10524,20 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Giants Dr" }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717487 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775040 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415011, 37.778686 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767339 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407715, 37.784215 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 655, "y": 1582 }, "features": [ @@ -11192,12 +11198,8 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402179, 37.788624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792304 ] } } , { "type": "Feature", "properties": { "name": "Bush St & Sansome St" }, "geometry": { "type": "Point", "coordinates": [ -122.400956, 37.791083 ] } } @@ -11258,8 +11260,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396386, 37.793202 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396193, 37.793474 ] } } , { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396128, 37.793508 ] } } @@ -11506,6 +11506,14 @@ , { "type": "Feature", "properties": { "name": "Harrison St & Main St" }, "geometry": { "type": "Point", "coordinates": [ -122.390614, 37.788014 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 1908, "y": 1582 }, "features": [ @@ -13628,8 +13636,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458946, 37.748161 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458624, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "LAGUNA HONDA BLVD & 19TH AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.458731, 37.748203 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458817, 37.747906 ] } } @@ -14722,6 +14728,10 @@ , { "type": "Feature", "properties": { "name": "San Jose Ave & Mt Vernon Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.448603, 37.718285 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458624, 37.748356 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1309, "y": 3166 }, "features": [ @@ -15912,10 +15922,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435385, 37.762624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435299, 37.762691 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435235, 37.762624 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435449, 37.762462 ] } } , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762462 ] } } @@ -16066,6 +16072,12 @@ , { "type": "Feature", "properties": { "name": "Market St & Sanchez St" }, "geometry": { "type": "Point", "coordinates": [ -122.431147, 37.765694 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435299, 37.762691 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435235, 37.762624 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1309, "y": 3165 }, "features": [ @@ -18268,8 +18280,6 @@ , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402169, 37.788616 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "2nd St & Stevenson St" }, "geometry": { "type": "Point", "coordinates": [ -122.400656, 37.788624 ] } } , { "type": "Feature", "properties": { "name": "2nd St & Stevenson St" }, "geometry": { "type": "Point", "coordinates": [ -122.400076, 37.788285 ] } } @@ -18622,8 +18632,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.412618, 37.780365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.411932, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409904, 37.783392 ] } } @@ -18656,16 +18664,10 @@ , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419388, 37.775218 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419345, 37.775235 ] } } -, { "type": "Feature", "properties": { "name": "Van Ness Ave & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775311 ] } } , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419184, 37.775243 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.775150 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } -, { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419142, 37.775082 ] } } , { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418659, 37.775506 ] } } @@ -18698,8 +18700,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775031 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775031 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774972 ] } } , { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.774930 ] } } @@ -18728,14 +18728,10 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St" }, "geometry": { "type": "Point", "coordinates": [ -122.415140, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415000, 37.778678 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 8th St" }, "geometry": { "type": "Point", "coordinates": [ -122.414829, 37.778610 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778542 ] } } -, { "type": "Feature", "properties": { "name": "8TH St AND MARKET St" }, "geometry": { "type": "Point", "coordinates": [ -122.414764, 37.778585 ] } } , { "type": "Feature", "properties": { "name": "8th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.414603, 37.778500 ] } } @@ -18808,10 +18804,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429130, 37.767670 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767331 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767195 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767263 ] } } , { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429044, 37.767356 ] } } @@ -19152,8 +19144,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB" }, "geometry": { "type": "Point", "coordinates": [ -122.407619, 37.784783 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784308 ] } } -, { "type": "Feature", "properties": { "name": "Powell/Market" }, "geometry": { "type": "Point", "coordinates": [ -122.407640, 37.784461 ] } } , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408177, 37.784164 ] } } @@ -19166,8 +19156,6 @@ , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408069, 37.783994 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407705, 37.784206 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.407318, 37.784681 ] } } , { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } @@ -19932,6 +19920,32 @@ , { "type": "Feature", "properties": { "name": "3rd St & 25th St" }, "geometry": { "type": "Point", "coordinates": [ -122.387663, 37.753132 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419345, 37.775235 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.775150 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775031 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415000, 37.778678 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778542 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767331 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767195 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784308 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407705, 37.784206 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1310, "y": 3165 }, "features": [ @@ -20870,14 +20884,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402190, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402490, 37.788497 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402169, 37.788616 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792024 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792295 ] } } @@ -20962,14 +20972,8 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & BEALE ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396600, 37.793033 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793007 ] } } -, { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396386, 37.793194 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396439, 37.793160 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396396, 37.793143 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396182, 37.793474 ] } } , { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396128, 37.793499 ] } } @@ -21208,6 +21212,18 @@ , { "type": "Feature", "properties": { "name": "Harrison St & Main St" }, "geometry": { "type": "Point", "coordinates": [ -122.390614, 37.788014 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793007 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396439, 37.793160 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396396, 37.793143 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1311, "y": 3168 }, "features": [ diff --git a/tests/muni/out/-Z11_-z13_-rf2000_-Bg.json b/tests/muni/out/-Z11_-z13_-rf2000_-Bg.json index 539e8d8..d70e5b0 100644 --- a/tests/muni/out/-Z11_-z13_-rf2000_-Bg.json +++ b/tests/muni/out/-Z11_-z13_-rf2000_-Bg.json @@ -3,7 +3,7 @@ "center": "-122.409668,37.770713,13", "description": "tests/muni/out/-Z11_-z13_-rf2000_-Bg.json.check.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {\"name\": \"String\"} } ] }", +"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {\"name\": \"String\"} }, { \"id\": \"subway\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {} } ] }", "maxzoom": "13", "minzoom": "11", "name": "tests/muni/out/-Z11_-z13_-rf2000_-Bg.json.check.mbtiles", @@ -1826,8 +1826,6 @@ , { "type": "Feature", "properties": { "name": "Castro St & 16th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435288, 37.764167 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435417, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Castro St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.435288, 37.762403 ] } } @@ -1964,8 +1962,6 @@ , { "type": "Feature", "properties": { "name": "Forest Hill Station" }, "geometry": { "type": "Point", "coordinates": [ -122.458978, 37.748186 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458849, 37.747915 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd & Dewey Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.459064, 37.747270 ] } } @@ -2898,8 +2894,6 @@ , { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788522 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } -, { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792321 ] } } , { "type": "Feature", "properties": { "name": "Sutter St & Sansome St" }, "geometry": { "type": "Point", "coordinates": [ -122.400699, 37.790320 ] } } @@ -2942,8 +2936,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793202 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } -, { "type": "Feature", "properties": { "name": "The Embarcadero & Washington St" }, "geometry": { "type": "Point", "coordinates": [ -122.395592, 37.796695 ] } } , { "type": "Feature", "properties": { "name": "The Embarcadero & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.394476, 37.795034 ] } } @@ -3234,8 +3226,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.413187, 37.779840 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409925, 37.783401 ] } } , { "type": "Feature", "properties": { "name": "Market St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.410269, 37.782349 ] } } @@ -3250,12 +3240,8 @@ , { "type": "Feature", "properties": { "name": "Van Ness Ave & Oak St" }, "geometry": { "type": "Point", "coordinates": [ -122.419496, 37.775532 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775260 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775091 ] } } -, { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418680, 37.775532 ] } } , { "type": "Feature", "properties": { "name": "11th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.418594, 37.775396 ] } } @@ -3270,8 +3256,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & VAN NESS AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774955 ] } } , { "type": "Feature", "properties": { "name": "South Van Ness Ave & Mission St" }, "geometry": { "type": "Point", "coordinates": [ -122.418637, 37.773327 ] } } @@ -3486,8 +3470,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB" }, "geometry": { "type": "Point", "coordinates": [ -122.407651, 37.784792 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } -, { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408209, 37.784181 ] } } , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408252, 37.784011 ] } } @@ -4624,6 +4606,26 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Giants Dr" }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717504 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762641 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419367, 37.775260 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775091 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775057 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 11, "x": 954, "y": 791 }, "features": [ @@ -7460,10 +7462,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435310, 37.762691 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762624 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435460, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762471 ] } } @@ -7752,8 +7750,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458956, 37.748169 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "LAGUNA HONDA BLVD & 19TH AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.458742, 37.748203 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458827, 37.747915 ] } } @@ -8944,6 +8940,14 @@ , { "type": "Feature", "properties": { "name": "Russia Ave & Moscow St" }, "geometry": { "type": "Point", "coordinates": [ -122.430139, 37.718183 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435310, 37.762691 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762624 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 654, "y": 1582 }, "features": [ @@ -10014,14 +10018,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788505 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402179, 37.788624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 2nd St" }, "geometry": { "type": "Point", "coordinates": [ -122.401321, 37.789353 ] } } , { "type": "Feature", "properties": { "name": "2ND ST & MARKET ST" }, "geometry": { "type": "Point", "coordinates": [ -122.401235, 37.789268 ] } } @@ -10392,8 +10392,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.412629, 37.780365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.411942, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409904, 37.783401 ] } } @@ -10426,16 +10424,10 @@ , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419388, 37.775226 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419345, 37.775243 ] } } -, { "type": "Feature", "properties": { "name": "Van Ness Ave & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775311 ] } } , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775243 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775159 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } -, { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419152, 37.775091 ] } } , { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418659, 37.775515 ] } } @@ -10468,8 +10460,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775040 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775040 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774972 ] } } , { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774938 ] } } @@ -10498,14 +10488,10 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St" }, "geometry": { "type": "Point", "coordinates": [ -122.415140, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415011, 37.778686 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 8th St" }, "geometry": { "type": "Point", "coordinates": [ -122.414839, 37.778618 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778551 ] } } -, { "type": "Feature", "properties": { "name": "8TH St AND MARKET St" }, "geometry": { "type": "Point", "coordinates": [ -122.414775, 37.778585 ] } } , { "type": "Feature", "properties": { "name": "8th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.414603, 37.778500 ] } } @@ -10578,10 +10564,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429130, 37.767679 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767339 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767204 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767271 ] } } , { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429044, 37.767356 ] } } @@ -10922,8 +10904,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB" }, "geometry": { "type": "Point", "coordinates": [ -122.407629, 37.784792 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } -, { "type": "Feature", "properties": { "name": "Powell/Market" }, "geometry": { "type": "Point", "coordinates": [ -122.407651, 37.784469 ] } } , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408187, 37.784164 ] } } @@ -10936,8 +10916,6 @@ , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408080, 37.783994 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407715, 37.784215 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.407329, 37.784690 ] } } , { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } @@ -13170,6 +13148,34 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Giants Dr" }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717487 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419345, 37.775243 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.775159 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775040 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415011, 37.778686 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778551 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767339 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767204 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407715, 37.784215 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 655, "y": 1582 }, "features": [ @@ -14124,14 +14130,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402201, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788505 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402179, 37.788624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792032 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792304 ] } } @@ -14216,14 +14218,8 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & BEALE ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396600, 37.793033 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793016 ] } } -, { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396386, 37.793202 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793152 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396193, 37.793474 ] } } , { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396128, 37.793508 ] } } @@ -14580,6 +14576,18 @@ , { "type": "Feature", "properties": { "name": "Harrison St & Main St" }, "geometry": { "type": "Point", "coordinates": [ -122.390614, 37.788014 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793016 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396450, 37.793168 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396407, 37.793152 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 1908, "y": 1582 }, "features": [ @@ -16708,8 +16716,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458946, 37.748161 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458624, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "LAGUNA HONDA BLVD & 19TH AVE" }, "geometry": { "type": "Point", "coordinates": [ -122.458731, 37.748203 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458817, 37.747906 ] } } @@ -17802,6 +17808,10 @@ , { "type": "Feature", "properties": { "name": "San Jose Ave & Mt Vernon Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.448603, 37.718285 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458624, 37.748356 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1309, "y": 3166 }, "features": [ @@ -18992,10 +19002,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435385, 37.762624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435299, 37.762691 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435235, 37.762624 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435449, 37.762462 ] } } , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762462 ] } } @@ -19146,6 +19152,12 @@ , { "type": "Feature", "properties": { "name": "Market St & Sanchez St" }, "geometry": { "type": "Point", "coordinates": [ -122.431147, 37.765694 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435299, 37.762691 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435235, 37.762624 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1309, "y": 3165 }, "features": [ @@ -21348,8 +21360,6 @@ , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402169, 37.788616 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "2nd St & Stevenson St" }, "geometry": { "type": "Point", "coordinates": [ -122.400656, 37.788624 ] } } , { "type": "Feature", "properties": { "name": "2nd St & Stevenson St" }, "geometry": { "type": "Point", "coordinates": [ -122.400076, 37.788285 ] } } @@ -21702,8 +21712,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.412618, 37.780365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.411932, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409904, 37.783392 ] } } @@ -21736,16 +21744,10 @@ , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419388, 37.775218 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419345, 37.775235 ] } } -, { "type": "Feature", "properties": { "name": "Van Ness Ave & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775311 ] } } , { "type": "Feature", "properties": { "name": "Market St & Van Ness Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.419184, 37.775243 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.775150 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } -, { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419142, 37.775082 ] } } , { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418659, 37.775506 ] } } @@ -21778,8 +21780,6 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775031 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775031 ] } } -, { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419281, 37.774972 ] } } , { "type": "Feature", "properties": { "name": "S. Van Ness Ave. & Market St." }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.774930 ] } } @@ -21808,14 +21808,10 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St" }, "geometry": { "type": "Point", "coordinates": [ -122.415140, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415000, 37.778678 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 8th St" }, "geometry": { "type": "Point", "coordinates": [ -122.414829, 37.778610 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778542 ] } } -, { "type": "Feature", "properties": { "name": "8TH St AND MARKET St" }, "geometry": { "type": "Point", "coordinates": [ -122.414764, 37.778585 ] } } , { "type": "Feature", "properties": { "name": "8th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.414603, 37.778500 ] } } @@ -21888,10 +21884,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429130, 37.767670 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767331 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767195 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429152, 37.767263 ] } } , { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429044, 37.767356 ] } } @@ -22232,8 +22224,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB" }, "geometry": { "type": "Point", "coordinates": [ -122.407619, 37.784783 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784308 ] } } -, { "type": "Feature", "properties": { "name": "Powell/Market" }, "geometry": { "type": "Point", "coordinates": [ -122.407640, 37.784461 ] } } , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408177, 37.784164 ] } } @@ -22246,8 +22236,6 @@ , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408069, 37.783994 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407705, 37.784206 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.407318, 37.784681 ] } } , { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } @@ -23012,6 +23000,32 @@ , { "type": "Feature", "properties": { "name": "3rd St & 25th St" }, "geometry": { "type": "Point", "coordinates": [ -122.387663, 37.753132 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419345, 37.775235 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.775150 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.419260, 37.775031 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415000, 37.778678 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778542 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767331 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767195 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784308 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407705, 37.784206 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1310, "y": 3165 }, "features": [ @@ -23950,14 +23964,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402190, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402490, 37.788497 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402169, 37.788616 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792024 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792295 ] } } @@ -24042,14 +24052,8 @@ , { "type": "Feature", "properties": { "name": "MARKET ST & BEALE ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396600, 37.793033 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793007 ] } } -, { "type": "Feature", "properties": { "name": "MARKET ST & DRUMM ST" }, "geometry": { "type": "Point", "coordinates": [ -122.396386, 37.793194 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396439, 37.793160 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396396, 37.793143 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396182, 37.793474 ] } } , { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396128, 37.793499 ] } } @@ -24288,6 +24292,18 @@ , { "type": "Feature", "properties": { "name": "Harrison St & Main St" }, "geometry": { "type": "Point", "coordinates": [ -122.390614, 37.788014 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793007 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396439, 37.793160 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.396396, 37.793143 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1311, "y": 3168 }, "features": [ diff --git a/tests/muni/out/-Z11_-z13_-rf2000_-g2.json b/tests/muni/out/-Z11_-z13_-rf2000_-g2.json index cbe8ad3..7e50c56 100644 --- a/tests/muni/out/-Z11_-z13_-rf2000_-g2.json +++ b/tests/muni/out/-Z11_-z13_-rf2000_-g2.json @@ -3,7 +3,7 @@ "center": "-122.409668,37.770713,13", "description": "tests/muni/out/-Z11_-z13_-rf2000_-g2.json.check.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {\"name\": \"String\"} } ] }", +"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {\"name\": \"String\"} }, { \"id\": \"subway\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 13, \"fields\": {} } ] }", "maxzoom": "13", "minzoom": "11", "name": "tests/muni/out/-Z11_-z13_-rf2000_-g2.json.check.mbtiles", @@ -2116,8 +2116,6 @@ , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435803, 37.762301 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435331, 37.762708 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435460, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "17th St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.434902, 37.762539 ] } } @@ -2264,8 +2262,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/opp Forest Hill" }, "geometry": { "type": "Point", "coordinates": [ -122.458935, 37.748390 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458849, 37.747915 ] } } , { "type": "Feature", "properties": { "name": "Hospital Entr Rd/Laguna Honda Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.458677, 37.747134 ] } } @@ -3268,8 +3264,6 @@ , { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402501, 37.788522 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792049 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792321 ] } } @@ -3310,8 +3304,6 @@ , { "type": "Feature", "properties": { "name": "Market St & Main St" }, "geometry": { "type": "Point", "coordinates": [ -122.396665, 37.792999 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396579, 37.793033 ] } } -, { "type": "Feature", "properties": { "name": "The Embarcadero & Washington St" }, "geometry": { "type": "Point", "coordinates": [ -122.395592, 37.796695 ] } } , { "type": "Feature", "properties": { "name": "The Embarcadero & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.394476, 37.795034 ] } } @@ -3642,8 +3634,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.413187, 37.779840 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.411942, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Market St & 6th St" }, "geometry": { "type": "Point", "coordinates": [ -122.410440, 37.782112 ] } } @@ -3734,8 +3724,6 @@ , { "type": "Feature", "properties": { "name": "Church St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.429066, 37.767831 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767356 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Buchanan St" }, "geometry": { "type": "Point", "coordinates": [ -122.426190, 37.769799 ] } } , { "type": "Feature", "properties": { "name": "Market St & Dolores St" }, "geometry": { "type": "Point", "coordinates": [ -122.427135, 37.768883 ] } } @@ -3906,12 +3894,8 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE OUT OB" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784792 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 5th St" }, "geometry": { "type": "Point", "coordinates": [ -122.408166, 37.783910 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } -, { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } , { "type": "Feature", "properties": { "name": "Market St & Grant Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.405162, 37.786420 ] } } @@ -5142,6 +5126,24 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Giants Dr" }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717504 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.435331, 37.762708 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788726 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396579, 37.793033 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412543, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767356 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407737, 37.784215 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 11, "x": 954, "y": 791 }, "features": [ @@ -7192,8 +7194,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762624 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762471 ] } } , { "type": "Feature", "properties": { "name": "Castro St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.435267, 37.762403 ] } } @@ -7380,8 +7380,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458956, 37.748186 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458827, 37.747915 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd & Dewey Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.459042, 37.747270 ] } } @@ -8206,6 +8204,12 @@ , { "type": "Feature", "properties": { "name": "Russia Ave & Moscow St" }, "geometry": { "type": "Point", "coordinates": [ -122.430139, 37.718183 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435246, 37.762624 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458634, 37.748356 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 654, "y": 1582 }, "features": [ @@ -8974,12 +8978,8 @@ , { "type": "Feature", "properties": { "name": "Post St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402394, 37.789014 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402179, 37.788624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 2nd St" }, "geometry": { "type": "Point", "coordinates": [ -122.401321, 37.789353 ] } } , { "type": "Feature", "properties": { "name": "TRANS BAY TERMINAL/TERMINAL W" }, "geometry": { "type": "Point", "coordinates": [ -122.400591, 37.788946 ] } } @@ -9296,8 +9296,6 @@ , { "type": "Feature", "properties": { "name": "Van Ness Ave & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775311 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } -, { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418659, 37.775515 ] } } , { "type": "Feature", "properties": { "name": "11th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.418594, 37.775379 ] } } @@ -9334,8 +9332,6 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St" }, "geometry": { "type": "Point", "coordinates": [ -122.415140, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415011, 37.778686 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , { "type": "Feature", "properties": { "name": "8th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.414603, 37.778500 ] } } @@ -9388,10 +9384,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429130, 37.767679 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767339 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767204 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429044, 37.767356 ] } } , { "type": "Feature", "properties": { "name": "Duboce Portal/Not a stop" }, "geometry": { "type": "Point", "coordinates": [ -122.427263, 37.769443 ] } } @@ -9616,14 +9608,10 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE OUT OB" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784775 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } -, { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408187, 37.784164 ] } } , { "type": "Feature", "properties": { "name": "Market St & 5th St" }, "geometry": { "type": "Point", "coordinates": [ -122.408144, 37.783893 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407715, 37.784215 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.407329, 37.784690 ] } } , { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } @@ -11172,6 +11160,24 @@ , { "type": "Feature", "properties": { "name": "Gilman Ave & Bill Walsh Way" }, "geometry": { "type": "Point", "coordinates": [ -122.387009, 37.717504 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775074 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415011, 37.778686 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767339 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767204 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784317 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407715, 37.784215 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 655, "y": 1582 }, "features": [ @@ -11836,8 +11842,6 @@ , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402179, 37.788624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792032 ] } } , { "type": "Feature", "properties": { "name": "Bush St & Sansome St" }, "geometry": { "type": "Point", "coordinates": [ -122.400956, 37.791083 ] } } @@ -11898,8 +11902,6 @@ , { "type": "Feature", "properties": { "name": "Market St & Beale St" }, "geometry": { "type": "Point", "coordinates": [ -122.397029, 37.792575 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793016 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Drumm St" }, "geometry": { "type": "Point", "coordinates": [ -122.396193, 37.793474 ] } } , { "type": "Feature", "properties": { "name": "The Embarcadero & Washington St" }, "geometry": { "type": "Point", "coordinates": [ -122.395184, 37.796356 ] } } @@ -12142,6 +12144,12 @@ , { "type": "Feature", "properties": { "name": "Harrison St & Main St" }, "geometry": { "type": "Point", "coordinates": [ -122.390614, 37.788014 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401943, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.396557, 37.793016 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 1908, "y": 1582 }, "features": [ @@ -14054,8 +14062,6 @@ , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/Forest Hill Sta" }, "geometry": { "type": "Point", "coordinates": [ -122.458956, 37.748178 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458624, 37.748356 ] } } -, { "type": "Feature", "properties": { "name": "Laguna Honda Blvd/FOREST HILL STA" }, "geometry": { "type": "Point", "coordinates": [ -122.458817, 37.747906 ] } } , { "type": "Feature", "properties": { "name": "Laguna Honda Blvd & Dewey Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.459042, 37.747262 ] } } @@ -15036,6 +15042,10 @@ , { "type": "Feature", "properties": { "name": "San Jose Ave & Mt Vernon Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.448603, 37.718285 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.458624, 37.748356 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1309, "y": 3166 }, "features": [ @@ -16132,8 +16142,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.435385, 37.762624 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435235, 37.762624 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435449, 37.762462 ] } } , { "type": "Feature", "properties": { "name": "Market St & Castro St" }, "geometry": { "type": "Point", "coordinates": [ -122.435396, 37.762462 ] } } @@ -16276,6 +16284,10 @@ , { "type": "Feature", "properties": { "name": "Market St & Sanchez St" }, "geometry": { "type": "Point", "coordinates": [ -122.431222, 37.765635 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.435235, 37.762624 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1309, "y": 3165 }, "features": [ @@ -18244,8 +18256,6 @@ , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402169, 37.788616 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "2nd St & Stevenson St" }, "geometry": { "type": "Point", "coordinates": [ -122.400656, 37.788624 ] } } , { "type": "Feature", "properties": { "name": "2nd St & Stevenson St" }, "geometry": { "type": "Point", "coordinates": [ -122.400076, 37.788285 ] } } @@ -18592,8 +18602,6 @@ , { "type": "Feature", "properties": { "name": "Market St & 7th St" }, "geometry": { "type": "Point", "coordinates": [ -122.412618, 37.780365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } -, { "type": "Feature", "properties": { "name": "Golden Gate Ave & Jones St" }, "geometry": { "type": "Point", "coordinates": [ -122.411932, 37.782078 ] } } , { "type": "Feature", "properties": { "name": "Turk St & Taylor St" }, "geometry": { "type": "Point", "coordinates": [ -122.409904, 37.783392 ] } } @@ -18626,8 +18634,6 @@ , { "type": "Feature", "properties": { "name": "Van Ness Ave & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.419195, 37.775311 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.775150 ] } } -, { "type": "Feature", "properties": { "name": "SOUTH VAN NESS AVE & 12TH ST" }, "geometry": { "type": "Point", "coordinates": [ -122.419142, 37.775082 ] } } , { "type": "Feature", "properties": { "name": "11th St/btw Market & Mission" }, "geometry": { "type": "Point", "coordinates": [ -122.418659, 37.775506 ] } } @@ -18672,14 +18678,10 @@ , { "type": "Feature", "properties": { "name": "Hyde St & Fulton St" }, "geometry": { "type": "Point", "coordinates": [ -122.415140, 37.779365 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415000, 37.778678 ] } } -, { "type": "Feature", "properties": { "name": "Market St & 8th St" }, "geometry": { "type": "Point", "coordinates": [ -122.414829, 37.778610 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414732, 37.778788 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778542 ] } } -, { "type": "Feature", "properties": { "name": "8th St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.414603, 37.778500 ] } } , { "type": "Feature", "properties": { "name": "Market St & Hyde St" }, "geometry": { "type": "Point", "coordinates": [ -122.414389, 37.779110 ] } } @@ -18746,10 +18748,6 @@ , { "type": "Feature", "properties": { "name": "14th St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429130, 37.767670 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767331 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767195 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Church St" }, "geometry": { "type": "Point", "coordinates": [ -122.429044, 37.767356 ] } } , { "type": "Feature", "properties": { "name": "Market St & Buchanan St" }, "geometry": { "type": "Point", "coordinates": [ -122.426158, 37.769790 ] } } @@ -19054,8 +19052,6 @@ , { "type": "Feature", "properties": { "name": "POWELL STREET TURNABLE IN IB" }, "geometry": { "type": "Point", "coordinates": [ -122.407619, 37.784783 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784308 ] } } -, { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408177, 37.784164 ] } } , { "type": "Feature", "properties": { "name": "Market St & 5th St" }, "geometry": { "type": "Point", "coordinates": [ -122.407994, 37.784088 ] } } @@ -19064,8 +19060,6 @@ , { "type": "Feature", "properties": { "name": "Cyril Magnin St & Market St" }, "geometry": { "type": "Point", "coordinates": [ -122.408069, 37.783994 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407705, 37.784206 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Powell St" }, "geometry": { "type": "Point", "coordinates": [ -122.407318, 37.784681 ] } } , { "type": "Feature", "properties": { "name": "Stockton St & Geary Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.406707, 37.787742 ] } } @@ -19738,6 +19732,26 @@ , { "type": "Feature", "properties": { "name": "3rd St & 25th St" }, "geometry": { "type": "Point", "coordinates": [ -122.387663, 37.753132 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.412522, 37.780348 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.419270, 37.775150 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.415000, 37.778678 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.414818, 37.778542 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.429323, 37.767331 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.429173, 37.767195 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.407823, 37.784308 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.407705, 37.784206 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1310, "y": 3165 }, "features": [ @@ -20580,14 +20594,10 @@ , { "type": "Feature", "properties": { "name": "POST & MONTGOMERY" }, "geometry": { "type": "Point", "coordinates": [ -122.402190, 37.788997 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } -, { "type": "Feature", "properties": { "name": "Market St & Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402490, 37.788497 ] } } , { "type": "Feature", "properties": { "name": "Market St & New Montgomery St" }, "geometry": { "type": "Point", "coordinates": [ -122.402169, 37.788616 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } -, { "type": "Feature", "properties": { "name": "Sansome St & Pine St" }, "geometry": { "type": "Point", "coordinates": [ -122.400870, 37.792024 ] } } , { "type": "Feature", "properties": { "name": "Pine St & Battery St" }, "geometry": { "type": "Point", "coordinates": [ -122.400098, 37.792295 ] } } @@ -20862,6 +20872,12 @@ , { "type": "Feature", "properties": { "name": "Harrison St & Main St" }, "geometry": { "type": "Point", "coordinates": [ -122.390614, 37.788014 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.402136, 37.788794 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.401932, 37.788709 ] } } +] } ] } , { "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1311, "y": 3168 }, "features": [ diff --git a/tests/muni/out/-z1_-Z1_-ao_-P.json b/tests/muni/out/-z1_-Z1_-ao_-P.json index f2c72e1..4cccbe5 100644 --- a/tests/muni/out/-z1_-Z1_-ao_-P.json +++ b/tests/muni/out/-z1_-Z1_-ao_-P.json @@ -3,7 +3,7 @@ "center": "-90.000000,37.836443,1", "description": "tests/muni/out/-z1_-Z1_-ao_-P.json.check.mbtiles", "format": "pbf", -"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 1, \"maxzoom\": 1, \"fields\": {\"name\": \"String\"} } ] }", +"json": "{\"vector_layers\": [ { \"id\": \"muni\", \"description\": \"\", \"minzoom\": 1, \"maxzoom\": 1, \"fields\": {\"name\": \"String\"} }, { \"id\": \"subway\", \"description\": \"\", \"minzoom\": 1, \"maxzoom\": 1, \"fields\": {} } ] }", "maxzoom": "1", "minzoom": "1", "name": "tests/muni/out/-z1_-Z1_-ao_-P.json.check.mbtiles", @@ -5704,42 +5704,6 @@ , { "type": "Feature", "properties": { "name": "Merchant St & Lincoln Blvd" }, "geometry": { "type": "Point", "coordinates": [ -122.519531, 37.822802 ] } } , -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.475586, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.475586, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.475586, 37.753344 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, -{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, { "type": "Feature", "properties": { "name": "Middle Point & Acacia" }, "geometry": { "type": "Point", "coordinates": [ -122.387695, 37.753344 ] } } , { "type": "Feature", "properties": { "name": "Middle Point Rd & Innes Ave" }, "geometry": { "type": "Point", "coordinates": [ -122.387695, 37.753344 ] } } @@ -8964,8 +8928,6 @@ , { "type": "Feature", "properties": { "name": "Van Ness Ave&North Point St SE-NS/BZ" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } , -{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } -, { "type": "Feature", "properties": { "name": "Vermont St & 17th St" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } , { "type": "Feature", "properties": { "name": "Vermont St & 18th St" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } @@ -9234,5 +9196,45 @@ , { "type": "Feature", "properties": { "name": "Yerba Buena Ave & Saint Elmo Way" }, "geometry": { "type": "Point", "coordinates": [ -122.475586, 37.753344 ] } } ] } +, +{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [ +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.475586, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.475586, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.475586, 37.753344 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.822802 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +, +{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ -122.431641, 37.788081 ] } } +] } ] } ] } From 965f4c225cfe1846eee1cecf5e9d952a56eab030 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 30 Aug 2016 15:36:22 -0700 Subject: [PATCH 13/13] Bump version number --- CHANGELOG.md | 4 ++++ version.hpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6d9327..a8464dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.13.0 + +* Add the ability to specify layer names within the GeoJSON input + ## 1.12.11 * Don't try to revive a placeholder for a degenerate polygon that had negative area diff --git a/version.hpp b/version.hpp index 1377088..46f655d 100644 --- a/version.hpp +++ b/version.hpp @@ -1 +1 @@ -#define VERSION "tippecanoe v1.12.11\n" +#define VERSION "tippecanoe v1.13.0\n"