Use milo dtoa for consistent string representation of numbers

This commit is contained in:
Eric Fischer 2017-08-29 14:44:34 -07:00
parent 3840176d5c
commit f9a007e8c3
32 changed files with 107 additions and 95 deletions

View File

@ -52,7 +52,7 @@ tippecanoe: geojson.o jsonpull/jsonpull.o tile.o pool.o mbtiles.o geometry.o pro
tippecanoe-enumerate: enumerate.o
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) -lsqlite3
tippecanoe-decode: decode.o projection.o mvt.o write_json.o
tippecanoe-decode: decode.o projection.o mvt.o write_json.o text.o
$(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3
tile-join: tile-join.o projection.o pool.o mbtiles.o mvt.o memfile.o dirtiles.o jsonpull/jsonpull.o text.o
@ -88,6 +88,16 @@ test: tippecanoe tippecanoe-decode $(addsuffix .check,$(TESTS)) raw-tiles-test p
cmp $@.out $(patsubst %.check,%,$@)
rm $@.out $@.mbtiles
geobuf-test: $(addsuffix .checkbuf,$(TESTS))
# XXX Use proper makefile rules instead of a for loop
%.json.checkbuf:
for i in $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json); do ./tests/fc-wrap $$i | json2geobuf > $$i.pbf; done
./tippecanoe -aD -f -o $@.mbtiles $(subst @,:,$(subst %,/,$(subst _, ,$(patsubst %.json.checkbuf,%,$(word 4,$(subst /, ,$@)))))) $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json.pbf) < /dev/null
./tippecanoe-decode $@.mbtiles | sed 's/checkbuf/check/g' > $@.out
cmp $@.out $(patsubst %.checkbuf,%,$@)
rm $@.out $@.mbtiles
parallel-test:
mkdir -p tests/parallel
perl -e 'for ($$i = 0; $$i < 20; $$i++) { $$lon = rand(360) - 180; $$lat = rand(180) - 90; $$k = rand(1); $$v = rand(1); print "{ \"type\": \"Feature\", \"properties\": { \"yes\": \"no\", \"who\": 1, \"$$k\": \"$$v\" }, \"geometry\": { \"type\": \"Point\", \"coordinates\": [ $$lon, $$lat ] } }\n"; }' > tests/parallel/in1.json

View File

@ -8,6 +8,7 @@
#include "protozero/varint.hpp"
#include "protozero/pbf_reader.hpp"
#include "protozero/pbf_writer.hpp"
#include "milo/dtoa_milo.h"
#define POINT 0
#define MULTIPOINT 1
@ -30,7 +31,7 @@ serial_val readValue(protozero::pbf_reader &pbf, std::vector<std::string> &keys)
case 2:
sv.type = mvt_double;
sv.s = std::to_string(pbf.get_double());
sv.s = milo::dtoa_milo(pbf.get_double());
break;
case 3:

View File

@ -14,6 +14,7 @@
#include "mvt.hpp"
#include "mbtiles.hpp"
#include "text.hpp"
#include "milo/dtoa_milo.h"
sqlite3 *mbtiles_open(char *dbname, char **argv, int forcetable) {
sqlite3 *outdb;
@ -275,11 +276,11 @@ std::string tilestats(std::map<std::string, layermap_entry> const &layermap1, si
out.append(",\n");
out.append("\t\t\t\t\t\"min\": ");
out.append(std::to_string(attribute.second.min));
out.append(milo::dtoa_milo(attribute.second.min));
out.append(",\n");
out.append("\t\t\t\t\t\"max\": ");
out.append(std::to_string(attribute.second.max));
out.append(milo::dtoa_milo(attribute.second.max));
}
out.append("\n");

View File

@ -5,16 +5,13 @@
#include <vector>
#include <string>
#include <map>
extern "C" {
#include "jsonpull/jsonpull.h"
}
#include "geometry.hpp"
#include "projection.hpp"
#include "read_json.hpp"
#include "text.hpp"
#include "mvt.hpp"
#include "milo/dtoa_milo.h"
const char *geometry_names[GEOM_TYPES] = {
"Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon",
@ -136,7 +133,7 @@ void stringify_value(json_object *value, int &type, std::string &stringified, co
}
} else if (vt == JSON_NUMBER) {
type = mvt_double;
stringified = val;
stringified = milo::dtoa_milo(value->number);
} else if (vt == JSON_TRUE || vt == JSON_FALSE) {
type = mvt_bool;
stringified = val;

View File

@ -16,6 +16,7 @@
#include "main.hpp"
#include "pool.hpp"
#include "projection.hpp"
#include "milo/dtoa_milo.h"
size_t fwrite_check(const void *ptr, size_t size, size_t nitems, FILE *stream, const char *fname) {
size_t w = fwrite(ptr, size, nitems, stream);
@ -607,7 +608,7 @@ void coerce_value(std::string const &key, int &vt, std::string &val, std::map<st
vt = mvt_string;
} else if (a->second == mvt_float) {
vt = mvt_double;
val = std::to_string(atof(val.c_str()));
val = milo::dtoa_milo(atof(val.c_str()));
} else if (a->second == mvt_int) {
vt = mvt_double;
if (val.size() == 0) {

View File

@ -3,7 +3,7 @@
"center": "0.000000,0.000000,0",
"description": "tests/attribute-type/out/-z0_-Tinttype@int_-Tfloattype@float_-Tbooltype@bool_-Tstringtype@string.json.check.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"booltype\": \"Boolean\", \"expect\": \"Mixed\", \"floattype\": \"Number\", \"inttype\": \"Number\", \"stringtype\": \"String\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 39,\"geometry\": \"Point\",\"attributeCount\": 5,\"attributes\": [{\"attribute\": \"booltype\",\"count\": 2,\"type\": \"boolean\",\"values\": [false,true]},{\"attribute\": \"expect\",\"count\": 14,\"type\": \"mixed\",\"values\": [0,\"2\",\"2.5\",3,5,5.6,6,\"[2,3]\",\"false\",false,\"null\",\"something\",\"true\",true],\"min\": 0.000000,\"max\": 6.000000},{\"attribute\": \"floattype\",\"count\": 4,\"type\": \"number\",\"values\": [0.000000,3.000000,5.000000,5.600000],\"min\": 0.000000,\"max\": 5.600000},{\"attribute\": \"inttype\",\"count\": 5,\"type\": \"number\",\"values\": [0,0.000000,3.000000,5,6.000000],\"min\": 0.000000,\"max\": 6.000000},{\"attribute\": \"stringtype\",\"count\": 7,\"type\": \"string\",\"values\": [\"2\",\"2.5\",\"[2,3]\",\"false\",\"null\",\"something\",\"true\"]}]}]}}",
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"booltype\": \"Boolean\", \"expect\": \"Mixed\", \"floattype\": \"Number\", \"inttype\": \"Number\", \"stringtype\": \"String\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 39,\"geometry\": \"Point\",\"attributeCount\": 5,\"attributes\": [{\"attribute\": \"booltype\",\"count\": 2,\"type\": \"boolean\",\"values\": [false,true]},{\"attribute\": \"expect\",\"count\": 14,\"type\": \"mixed\",\"values\": [0,\"2\",\"2.5\",3,5,5.6,6,\"[2,3]\",\"false\",false,\"null\",\"something\",\"true\",true],\"min\": 0,\"max\": 6},{\"attribute\": \"floattype\",\"count\": 4,\"type\": \"number\",\"values\": [0,3,5,5.6],\"min\": 0,\"max\": 5.6},{\"attribute\": \"inttype\",\"count\": 5,\"type\": \"number\",\"values\": [0,0.000000,3.000000,5,6.000000],\"min\": 0,\"max\": 6},{\"attribute\": \"stringtype\",\"count\": 7,\"type\": \"string\",\"values\": [\"2\",\"2.5\",\"[2,3]\",\"false\",\"null\",\"something\",\"true\"]}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/attribute-type/out/-z0_-Tinttype@int_-Tfloattype@float_-Tbooltype@bool_-Tstringtype@string.json.check.mbtiles",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
"center": "0.000000,0.000000,0",
"description": "tests/longlayer/out/-z0.json.check.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_1\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {} }, { \"id\": \"ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_2\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {} }, { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_1\": \"Number\", \"ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_2\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 2,\"layers\": [{\"layer\": \"ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongN\",\"count\": 2,\"geometry\": \"Point\",\"attributeCount\": 0,\"attributes\": []},{\"layer\": \"in\",\"count\": 2,\"geometry\": \"Point\",\"attributeCount\": 1,\"attributes\": [{\"attribute\": \"ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHas\",\"count\": 2,\"type\": \"number\",\"values\": [12,13],\"min\": 12.000000,\"max\": 13.000000}]}]}}",
"json": "{\"vector_layers\": [ { \"id\": \"ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_1\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {} }, { \"id\": \"ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_2\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {} }, { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 0, \"fields\": {\"ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_1\": \"Number\", \"ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_2\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 2,\"layers\": [{\"layer\": \"ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongName_ThisLayerHasAVeryLongN\",\"count\": 2,\"geometry\": \"Point\",\"attributeCount\": 0,\"attributes\": []},{\"layer\": \"in\",\"count\": 2,\"geometry\": \"Point\",\"attributeCount\": 1,\"attributes\": [{\"attribute\": \"ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHasAVeryLongName_ThisAttributeHas\",\"count\": 2,\"type\": \"number\",\"values\": [12,13],\"min\": 12,\"max\": 13}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/longlayer/out/-z0.json.check.mbtiles",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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\"} }, { \"id\": \"subway\", \"description\": \"\", \"minzoom\": 11, \"maxzoom\": 11, \"fields\": {\"name\": \"String\", \"tippecanoe_feature_density\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 2,\"layers\": [{\"layer\": \"muni\",\"count\": 4592,\"geometry\": \"Point\",\"attributeCount\": 2,\"attributes\": [{\"attribute\": \"name\",\"count\": 1000,\"type\": \"string\",\"values\": [\" 4th St & Brannan St\",\" Conzelman Rd & Mccullough Rd\",\"100 O'Shaughnessy Blvd\",\"101 Dakota St\",\"1095 CONNECTICUT ST\",\"10th Ave & Ortega St\",\"10th Ave & Pacheco St\",\"10th Ave & Quintara St\",\"1100 Lake Merced Blvd\",\"115 TELEGRAPH Hill Blvd\",\"117 Warren Dr\",\"11th St & Bryant St\",\"11th St & Folsom St\",\"11th St & Harrison St\",\"11th St & Howard St\",\"11th St & Market St\",\"11th St & Mission St\",\"11th St/btw Market & Mission\",\"120 Portola Dr\",\"126 Miraloma Dr\",\"13th St & Gateview Ave\",\"14 Dakota St\",\"14th Avenue & Geary Boulevard\",\"14th Ave & Quintara St\",\"14th Ave & Santiago St\",\"14th Ave & Taraval St\",\"14th Ave & Ulloa St\",\"14th St & Alpine Ter\",\"14th St & Castro St\",\"14th St & Church St\",\"14th St & Mission St\",\"14th St & Noe St\",\"14th St & SANCHEZ ST\",\"14th St & Sanchez St\",\"150 Otis St\",\"15th Ave & Noriega St\",\"15th Ave & Ortega St\",\"15th Ave & Pacheco St\",\"15th Ave & Quintara St\",\"15th Ave & Taraval St\",\"15th Ave & Ulloa St\",\"15th Ave & West Portal Ave\",\"15th St & Mission St\",\"16 th St & South Van Ness\",\"164 Addison St\",\"1650 Geneva Ave\",\"1697 7th Ave\",\"16th Ave & Lawton St\",\"16th Ave & Lomita Ave\",\"16th Ave & Moraga St\",\"16th Ave & Noriega St\",\"16th Ave & Ortega St\",\"16th Ave & Pacheco St\",\"16th Avenue at Lawton Street\",\"16th St & 4th St\",\"16th St & Bryant St\",\"16th St & Church St\",\"16th St & Dolores St\",\"16th St & Folsom St\",\"16th St & Guerrero St\",\"16th St & Harrison St\",\"16th St & Kansas St\",\"16th St & Mission St\",\"16th St & Missouri St\",\"16th St & Potrero Ave\",\"16th St & San Bruno Ave\",\"16th St & Shotwell St\",\"16th St & South Van Ness\",\"16th St & Valencia St\",\"16th St & Vermont St\",\"16th St & Wisconsin St\",\"16th St& Rhode Island St\",\"16th Street & 4th Street\",\"16th Street & Missouri St\",\"16th Street & Rhode Islandi St\",\"16th Street & Wisconsin St\",\"170 Buckingham Way\",\"1701 Geneva Ave\",\"1721 Geneva Ave\",\"1725 Sunnydale Ave\",\"1730 3rd St\",\"1731 3RD ST\",\"1750 Geneva Ave\",\"176 Rhode Island St\",\"1798 Laguna Honda Blvd\",\"17TH ST & KANSAS ST\",\"17th Ave & Quintara St\",\"17th Ave & Rivera St\",\"17th Ave & Santiago St\",\"17th St & Belvedere St\",\"17th St & Castro St\",\"17th St & Clayton St\",\"17th St & Cole St\",\"17th St & De Haro St\",\"17th St & Diamond St\",\"17th St & Kansas St\",\"17th St & Noe St\",\"17th St & Wisconsin St\",\"1800 Sunnydale Ave\",\"18th St & 3rd St\"]},{\"attribute\": \"tippecanoe_feature_density\",\"count\": 256,\"type\": \"number\",\"values\": [0,1,10,100,101,102,103,104,105,106,107,108,109,11,110,111,112,113,114,115,116,117,118,119,12,120,121,122,123,124,125,126,127,128,129,13,130,131,132,133,134,135,136,137,138,139,14,140,141,142,143,144,145,146,147,148,149,15,150,151,152,153,154,155,156,157,158,159,16,160,161,162,163,164,165,166,167,168,169,17,170,171,172,173,174,175,176,177,178,179,18,180,181,182,183,184,185,186,187,188],\"min\": 0.000000,\"max\": 255.000000}]},{\"layer\": \"subway\",\"count\": 19,\"geometry\": \"Point\",\"attributeCount\": 2,\"attributes\": [{\"attribute\": \"name\",\"count\": 18,\"type\": \"string\",\"values\": [\"Metro Castro Station/Downtown\",\"Metro Castro Station/Outbound\",\"Metro Church Station/Downtown\",\"Metro Church Station/Outbound\",\"Metro Civic Center Station/Downtn\",\"Metro Civic Center Station/Downtown\",\"Metro Civic Center Station/Outbd\",\"Metro Embarcadero Station\",\"Metro Embarcadero Station/Downtown\",\"Metro Forest Hill Station/Downtown\",\"Metro Montgomery Station/Downtown\",\"Metro Montgomery Station/Outbound\",\"Metro Powell Station/Downtown\",\"Metro Powell Station/Outbound\",\"Metro Van Ness Station\",\"Metro Van Ness Station/Downtown\",\"Metro Van Ness Station/Outbound\",\"Van Ness Station Outbound\"]},{\"attribute\": \"tippecanoe_feature_density\",\"count\": 256,\"type\": \"number\",\"values\": [0,1,10,100,101,102,103,104,105,106,107,108,109,11,110,111,112,113,114,115,116,117,118,119,12,120,121,122,123,124,125,126,127,128,129,13,130,131,132,133,134,135,136,137,138,139,14,140,141,142,143,144,145,146,147,148,149,15,150,151,152,153,154,155,156,157,158,159,16,160,161,162,163,164,165,166,167,168,169,17,170,171,172,173,174,175,176,177,178,179,18,180,181,182,183,184,185,186,187,188],\"min\": 0.000000,\"max\": 255.000000}]}]}}",
"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\": {\"name\": \"String\", \"tippecanoe_feature_density\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 2,\"layers\": [{\"layer\": \"muni\",\"count\": 4592,\"geometry\": \"Point\",\"attributeCount\": 2,\"attributes\": [{\"attribute\": \"name\",\"count\": 1000,\"type\": \"string\",\"values\": [\" 4th St & Brannan St\",\" Conzelman Rd & Mccullough Rd\",\"100 O'Shaughnessy Blvd\",\"101 Dakota St\",\"1095 CONNECTICUT ST\",\"10th Ave & Ortega St\",\"10th Ave & Pacheco St\",\"10th Ave & Quintara St\",\"1100 Lake Merced Blvd\",\"115 TELEGRAPH Hill Blvd\",\"117 Warren Dr\",\"11th St & Bryant St\",\"11th St & Folsom St\",\"11th St & Harrison St\",\"11th St & Howard St\",\"11th St & Market St\",\"11th St & Mission St\",\"11th St/btw Market & Mission\",\"120 Portola Dr\",\"126 Miraloma Dr\",\"13th St & Gateview Ave\",\"14 Dakota St\",\"14th Avenue & Geary Boulevard\",\"14th Ave & Quintara St\",\"14th Ave & Santiago St\",\"14th Ave & Taraval St\",\"14th Ave & Ulloa St\",\"14th St & Alpine Ter\",\"14th St & Castro St\",\"14th St & Church St\",\"14th St & Mission St\",\"14th St & Noe St\",\"14th St & SANCHEZ ST\",\"14th St & Sanchez St\",\"150 Otis St\",\"15th Ave & Noriega St\",\"15th Ave & Ortega St\",\"15th Ave & Pacheco St\",\"15th Ave & Quintara St\",\"15th Ave & Taraval St\",\"15th Ave & Ulloa St\",\"15th Ave & West Portal Ave\",\"15th St & Mission St\",\"16 th St & South Van Ness\",\"164 Addison St\",\"1650 Geneva Ave\",\"1697 7th Ave\",\"16th Ave & Lawton St\",\"16th Ave & Lomita Ave\",\"16th Ave & Moraga St\",\"16th Ave & Noriega St\",\"16th Ave & Ortega St\",\"16th Ave & Pacheco St\",\"16th Avenue at Lawton Street\",\"16th St & 4th St\",\"16th St & Bryant St\",\"16th St & Church St\",\"16th St & Dolores St\",\"16th St & Folsom St\",\"16th St & Guerrero St\",\"16th St & Harrison St\",\"16th St & Kansas St\",\"16th St & Mission St\",\"16th St & Missouri St\",\"16th St & Potrero Ave\",\"16th St & San Bruno Ave\",\"16th St & Shotwell St\",\"16th St & South Van Ness\",\"16th St & Valencia St\",\"16th St & Vermont St\",\"16th St & Wisconsin St\",\"16th St& Rhode Island St\",\"16th Street & 4th Street\",\"16th Street & Missouri St\",\"16th Street & Rhode Islandi St\",\"16th Street & Wisconsin St\",\"170 Buckingham Way\",\"1701 Geneva Ave\",\"1721 Geneva Ave\",\"1725 Sunnydale Ave\",\"1730 3rd St\",\"1731 3RD ST\",\"1750 Geneva Ave\",\"176 Rhode Island St\",\"1798 Laguna Honda Blvd\",\"17TH ST & KANSAS ST\",\"17th Ave & Quintara St\",\"17th Ave & Rivera St\",\"17th Ave & Santiago St\",\"17th St & Belvedere St\",\"17th St & Castro St\",\"17th St & Clayton St\",\"17th St & Cole St\",\"17th St & De Haro St\",\"17th St & Diamond St\",\"17th St & Kansas St\",\"17th St & Noe St\",\"17th St & Wisconsin St\",\"1800 Sunnydale Ave\",\"18th St & 3rd St\"]},{\"attribute\": \"tippecanoe_feature_density\",\"count\": 256,\"type\": \"number\",\"values\": [0,1,10,100,101,102,103,104,105,106,107,108,109,11,110,111,112,113,114,115,116,117,118,119,12,120,121,122,123,124,125,126,127,128,129,13,130,131,132,133,134,135,136,137,138,139,14,140,141,142,143,144,145,146,147,148,149,15,150,151,152,153,154,155,156,157,158,159,16,160,161,162,163,164,165,166,167,168,169,17,170,171,172,173,174,175,176,177,178,179,18,180,181,182,183,184,185,186,187,188],\"min\": 0,\"max\": 255}]},{\"layer\": \"subway\",\"count\": 19,\"geometry\": \"Point\",\"attributeCount\": 2,\"attributes\": [{\"attribute\": \"name\",\"count\": 18,\"type\": \"string\",\"values\": [\"Metro Castro Station/Downtown\",\"Metro Castro Station/Outbound\",\"Metro Church Station/Downtown\",\"Metro Church Station/Outbound\",\"Metro Civic Center Station/Downtn\",\"Metro Civic Center Station/Downtown\",\"Metro Civic Center Station/Outbd\",\"Metro Embarcadero Station\",\"Metro Embarcadero Station/Downtown\",\"Metro Forest Hill Station/Downtown\",\"Metro Montgomery Station/Downtown\",\"Metro Montgomery Station/Outbound\",\"Metro Powell Station/Downtown\",\"Metro Powell Station/Outbound\",\"Metro Van Ness Station\",\"Metro Van Ness Station/Downtown\",\"Metro Van Ness Station/Outbound\",\"Van Ness Station Outbound\"]},{\"attribute\": \"tippecanoe_feature_density\",\"count\": 256,\"type\": \"number\",\"values\": [0,1,10,100,101,102,103,104,105,106,107,108,109,11,110,111,112,113,114,115,116,117,118,119,12,120,121,122,123,124,125,126,127,128,129,13,130,131,132,133,134,135,136,137,138,139,14,140,141,142,143,144,145,146,147,148,149,15,150,151,152,153,154,155,156,157,158,159,16,160,161,162,163,164,165,166,167,168,169,17,170,171,172,173,174,175,176,177,178,179,18,180,181,182,183,184,185,186,187,188],\"min\": 0,\"max\": 255}]}]}}",
"maxzoom": "11",
"minzoom": "11",
"name": "tests/muni/out/-Z11_-z11_--calculate-feature-density.json.check.mbtiles",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
"center": "-82.968750,37.710240,7",
"description": "tests/ne_110m_admin_1_states_provinces_lines/out/-lcountries_-P_-Z1_-z7_-b4_-xfeaturecla_-xscalerank_-acrol_-ps.json.check.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"countries\", \"description\": \"\", \"minzoom\": 1, \"maxzoom\": 7, \"fields\": {\"adm0_a3\": \"String\", \"adm0_name\": \"String\", \"mapcolor13\": \"Number\", \"mapcolor9\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"countries\",\"count\": 110,\"geometry\": \"LineString\",\"attributeCount\": 4,\"attributes\": [{\"attribute\": \"adm0_a3\",\"count\": 1,\"type\": \"string\",\"values\": [\"USA\"]},{\"attribute\": \"adm0_name\",\"count\": 1,\"type\": \"string\",\"values\": [\"United States of America\"]},{\"attribute\": \"mapcolor13\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1.000000,\"max\": 1.000000},{\"attribute\": \"mapcolor9\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1.000000,\"max\": 1.000000}]}]}}",
"json": "{\"vector_layers\": [ { \"id\": \"countries\", \"description\": \"\", \"minzoom\": 1, \"maxzoom\": 7, \"fields\": {\"adm0_a3\": \"String\", \"adm0_name\": \"String\", \"mapcolor13\": \"Number\", \"mapcolor9\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"countries\",\"count\": 110,\"geometry\": \"LineString\",\"attributeCount\": 4,\"attributes\": [{\"attribute\": \"adm0_a3\",\"count\": 1,\"type\": \"string\",\"values\": [\"USA\"]},{\"attribute\": \"adm0_name\",\"count\": 1,\"type\": \"string\",\"values\": [\"United States of America\"]},{\"attribute\": \"mapcolor13\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1,\"max\": 1},{\"attribute\": \"mapcolor9\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1,\"max\": 1}]}]}}",
"maxzoom": "7",
"minzoom": "1",
"name": "tests/ne_110m_admin_1_states_provinces_lines/out/-lcountries_-P_-Z1_-z7_-b4_-xfeaturecla_-xscalerank_-acrol_-ps.json.check.mbtiles",

View File

@ -3,7 +3,7 @@
"center": "-95.625000,44.951199,5",
"description": "tests/ne_110m_admin_1_states_provinces_lines/out/-z5_-M500_--drop-smallest-as-needed.json.check.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 5, \"fields\": {\"adm0_a3\": \"String\", \"adm0_name\": \"String\", \"featurecla\": \"String\", \"mapcolor13\": \"Number\", \"mapcolor9\": \"Number\", \"scalerank\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 110,\"geometry\": \"LineString\",\"attributeCount\": 6,\"attributes\": [{\"attribute\": \"adm0_a3\",\"count\": 1,\"type\": \"string\",\"values\": [\"USA\"]},{\"attribute\": \"adm0_name\",\"count\": 1,\"type\": \"string\",\"values\": [\"United States of America\"]},{\"attribute\": \"featurecla\",\"count\": 1,\"type\": \"string\",\"values\": [\"Admin-1 boundary\"]},{\"attribute\": \"mapcolor13\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1.000000,\"max\": 1.000000},{\"attribute\": \"mapcolor9\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1.000000,\"max\": 1.000000},{\"attribute\": \"scalerank\",\"count\": 1,\"type\": \"number\",\"values\": [2],\"min\": 2.000000,\"max\": 2.000000}]}]}}",
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 5, \"fields\": {\"adm0_a3\": \"String\", \"adm0_name\": \"String\", \"featurecla\": \"String\", \"mapcolor13\": \"Number\", \"mapcolor9\": \"Number\", \"scalerank\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 110,\"geometry\": \"LineString\",\"attributeCount\": 6,\"attributes\": [{\"attribute\": \"adm0_a3\",\"count\": 1,\"type\": \"string\",\"values\": [\"USA\"]},{\"attribute\": \"adm0_name\",\"count\": 1,\"type\": \"string\",\"values\": [\"United States of America\"]},{\"attribute\": \"featurecla\",\"count\": 1,\"type\": \"string\",\"values\": [\"Admin-1 boundary\"]},{\"attribute\": \"mapcolor13\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1,\"max\": 1},{\"attribute\": \"mapcolor9\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1,\"max\": 1},{\"attribute\": \"scalerank\",\"count\": 1,\"type\": \"number\",\"values\": [2],\"min\": 2,\"max\": 2}]}]}}",
"maxzoom": "5",
"minzoom": "0",
"name": "tests/ne_110m_admin_1_states_provinces_lines/out/-z5_-M500_--drop-smallest-as-needed.json.check.mbtiles",

View File

@ -3,7 +3,7 @@
"center": "-84.375000,36.466030,5",
"description": "tests/ne_110m_admin_1_states_provinces_lines/out/-z5_-ymapcolor13_-ymapcolor9_-pSi_-d8_-D16.json.check.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 5, \"fields\": {\"mapcolor13\": \"Number\", \"mapcolor9\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 110,\"geometry\": \"LineString\",\"attributeCount\": 2,\"attributes\": [{\"attribute\": \"mapcolor13\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1.000000,\"max\": 1.000000},{\"attribute\": \"mapcolor9\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1.000000,\"max\": 1.000000}]}]}}",
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 5, \"fields\": {\"mapcolor13\": \"Number\", \"mapcolor9\": \"Number\"} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 110,\"geometry\": \"LineString\",\"attributeCount\": 2,\"attributes\": [{\"attribute\": \"mapcolor13\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1,\"max\": 1},{\"attribute\": \"mapcolor9\",\"count\": 1,\"type\": \"number\",\"values\": [1],\"min\": 1,\"max\": 1}]}]}}",
"maxzoom": "5",
"minzoom": "0",
"name": "tests/ne_110m_admin_1_states_provinces_lines/out/-z5_-ymapcolor13_-ymapcolor9_-pSi_-d8_-D16.json.check.mbtiles",

View File

@ -3,7 +3,7 @@
"center": "-69.609375,45.581133,8",
"description": "tests/tl_2015_us_county/out/-z8.json.check.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"piscataquis\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 8, \"fields\": {\"ALAND\": \"Number\", \"AWATER\": \"Number\", \"CLASSFP\": \"String\", \"COUNTYFP\": \"String\", \"COUNTYNS\": \"String\", \"FUNCSTAT\": \"String\", \"GEOID\": \"String\", \"INTPTLAT\": \"String\", \"INTPTLON\": \"String\", \"LSAD\": \"String\", \"MTFCC\": \"String\", \"NAME\": \"String\", \"NAMELSAD\": \"String\", \"STATEFP\": \"String\"} }, { \"id\": \"somerset\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 8, \"fields\": {\"ALAND\": \"Number\", \"AWATER\": \"Number\", \"CLASSFP\": \"String\", \"COUNTYFP\": \"String\", \"COUNTYNS\": \"String\", \"FUNCSTAT\": \"String\", \"GEOID\": \"String\", \"INTPTLAT\": \"String\", \"INTPTLON\": \"String\", \"LSAD\": \"String\", \"MTFCC\": \"String\", \"NAME\": \"String\", \"NAMELSAD\": \"String\", \"STATEFP\": \"String\"} } ],\"tilestats\": {\"layerCount\": 2,\"layers\": [{\"layer\": \"piscataquis\",\"count\": 1,\"geometry\": \"Polygon\",\"attributeCount\": 14,\"attributes\": [{\"attribute\": \"ALAND\",\"count\": 1,\"type\": \"number\",\"values\": [10258678459.000000],\"min\": 10258678459.000000,\"max\": 10258678459.000000},{\"attribute\": \"AWATER\",\"count\": 1,\"type\": \"number\",\"values\": [1080563045.000000],\"min\": 1080563045.000000,\"max\": 1080563045.000000},{\"attribute\": \"CLASSFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"H1\"]},{\"attribute\": \"COUNTYFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"021\"]},{\"attribute\": \"COUNTYNS\",\"count\": 1,\"type\": \"string\",\"values\": [\"00581296\"]},{\"attribute\": \"FUNCSTAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"A\"]},{\"attribute\": \"GEOID\",\"count\": 1,\"type\": \"string\",\"values\": [\"23021\"]},{\"attribute\": \"INTPTLAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"+45.9176853\"]},{\"attribute\": \"INTPTLON\",\"count\": 1,\"type\": \"string\",\"values\": [\"-069.1045359\"]},{\"attribute\": \"LSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"06\"]},{\"attribute\": \"MTFCC\",\"count\": 1,\"type\": \"string\",\"values\": [\"G4020\"]},{\"attribute\": \"NAME\",\"count\": 1,\"type\": \"string\",\"values\": [\"Piscataquis\"]},{\"attribute\": \"NAMELSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"Piscataquis County\"]},{\"attribute\": \"STATEFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"23\"]}]},{\"layer\": \"somerset\",\"count\": 1,\"geometry\": \"Polygon\",\"attributeCount\": 14,\"attributes\": [{\"attribute\": \"ALAND\",\"count\": 1,\"type\": \"number\",\"values\": [10164314642.000000],\"min\": 10164314642.000000,\"max\": 10164314642.000000},{\"attribute\": \"AWATER\",\"count\": 1,\"type\": \"number\",\"values\": [437895944.000000],\"min\": 437895944.000000,\"max\": 437895944.000000},{\"attribute\": \"CLASSFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"H1\"]},{\"attribute\": \"COUNTYFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"025\"]},{\"attribute\": \"COUNTYNS\",\"count\": 1,\"type\": \"string\",\"values\": [\"00581298\"]},{\"attribute\": \"FUNCSTAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"A\"]},{\"attribute\": \"GEOID\",\"count\": 1,\"type\": \"string\",\"values\": [\"23025\"]},{\"attribute\": \"INTPTLAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"+45.5074824\"]},{\"attribute\": \"INTPTLON\",\"count\": 1,\"type\": \"string\",\"values\": [\"-069.9760395\"]},{\"attribute\": \"LSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"06\"]},{\"attribute\": \"MTFCC\",\"count\": 1,\"type\": \"string\",\"values\": [\"G4020\"]},{\"attribute\": \"NAME\",\"count\": 1,\"type\": \"string\",\"values\": [\"Somerset\"]},{\"attribute\": \"NAMELSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"Somerset County\"]},{\"attribute\": \"STATEFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"23\"]}]}]}}",
"json": "{\"vector_layers\": [ { \"id\": \"piscataquis\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 8, \"fields\": {\"ALAND\": \"Number\", \"AWATER\": \"Number\", \"CLASSFP\": \"String\", \"COUNTYFP\": \"String\", \"COUNTYNS\": \"String\", \"FUNCSTAT\": \"String\", \"GEOID\": \"String\", \"INTPTLAT\": \"String\", \"INTPTLON\": \"String\", \"LSAD\": \"String\", \"MTFCC\": \"String\", \"NAME\": \"String\", \"NAMELSAD\": \"String\", \"STATEFP\": \"String\"} }, { \"id\": \"somerset\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 8, \"fields\": {\"ALAND\": \"Number\", \"AWATER\": \"Number\", \"CLASSFP\": \"String\", \"COUNTYFP\": \"String\", \"COUNTYNS\": \"String\", \"FUNCSTAT\": \"String\", \"GEOID\": \"String\", \"INTPTLAT\": \"String\", \"INTPTLON\": \"String\", \"LSAD\": \"String\", \"MTFCC\": \"String\", \"NAME\": \"String\", \"NAMELSAD\": \"String\", \"STATEFP\": \"String\"} } ],\"tilestats\": {\"layerCount\": 2,\"layers\": [{\"layer\": \"piscataquis\",\"count\": 1,\"geometry\": \"Polygon\",\"attributeCount\": 14,\"attributes\": [{\"attribute\": \"ALAND\",\"count\": 1,\"type\": \"number\",\"values\": [10258678459],\"min\": 10258678459,\"max\": 10258678459},{\"attribute\": \"AWATER\",\"count\": 1,\"type\": \"number\",\"values\": [1080563045],\"min\": 1080563045,\"max\": 1080563045},{\"attribute\": \"CLASSFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"H1\"]},{\"attribute\": \"COUNTYFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"021\"]},{\"attribute\": \"COUNTYNS\",\"count\": 1,\"type\": \"string\",\"values\": [\"00581296\"]},{\"attribute\": \"FUNCSTAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"A\"]},{\"attribute\": \"GEOID\",\"count\": 1,\"type\": \"string\",\"values\": [\"23021\"]},{\"attribute\": \"INTPTLAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"+45.9176853\"]},{\"attribute\": \"INTPTLON\",\"count\": 1,\"type\": \"string\",\"values\": [\"-069.1045359\"]},{\"attribute\": \"LSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"06\"]},{\"attribute\": \"MTFCC\",\"count\": 1,\"type\": \"string\",\"values\": [\"G4020\"]},{\"attribute\": \"NAME\",\"count\": 1,\"type\": \"string\",\"values\": [\"Piscataquis\"]},{\"attribute\": \"NAMELSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"Piscataquis County\"]},{\"attribute\": \"STATEFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"23\"]}]},{\"layer\": \"somerset\",\"count\": 1,\"geometry\": \"Polygon\",\"attributeCount\": 14,\"attributes\": [{\"attribute\": \"ALAND\",\"count\": 1,\"type\": \"number\",\"values\": [10164314642],\"min\": 10164314642,\"max\": 10164314642},{\"attribute\": \"AWATER\",\"count\": 1,\"type\": \"number\",\"values\": [437895944],\"min\": 437895944,\"max\": 437895944},{\"attribute\": \"CLASSFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"H1\"]},{\"attribute\": \"COUNTYFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"025\"]},{\"attribute\": \"COUNTYNS\",\"count\": 1,\"type\": \"string\",\"values\": [\"00581298\"]},{\"attribute\": \"FUNCSTAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"A\"]},{\"attribute\": \"GEOID\",\"count\": 1,\"type\": \"string\",\"values\": [\"23025\"]},{\"attribute\": \"INTPTLAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"+45.5074824\"]},{\"attribute\": \"INTPTLON\",\"count\": 1,\"type\": \"string\",\"values\": [\"-069.9760395\"]},{\"attribute\": \"LSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"06\"]},{\"attribute\": \"MTFCC\",\"count\": 1,\"type\": \"string\",\"values\": [\"G4020\"]},{\"attribute\": \"NAME\",\"count\": 1,\"type\": \"string\",\"values\": [\"Somerset\"]},{\"attribute\": \"NAMELSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"Somerset County\"]},{\"attribute\": \"STATEFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"23\"]}]}]}}",
"maxzoom": "8",
"minzoom": "0",
"name": "tests/tl_2015_us_county/out/-z8.json.check.mbtiles",

View File

@ -3,7 +3,7 @@
"center": "-69.609375,45.581133,8",
"description": "tests/tl_2015_us_county/out/-z8_-pp.json.check.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"piscataquis\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 8, \"fields\": {\"ALAND\": \"Number\", \"AWATER\": \"Number\", \"CLASSFP\": \"String\", \"COUNTYFP\": \"String\", \"COUNTYNS\": \"String\", \"FUNCSTAT\": \"String\", \"GEOID\": \"String\", \"INTPTLAT\": \"String\", \"INTPTLON\": \"String\", \"LSAD\": \"String\", \"MTFCC\": \"String\", \"NAME\": \"String\", \"NAMELSAD\": \"String\", \"STATEFP\": \"String\"} }, { \"id\": \"somerset\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 8, \"fields\": {\"ALAND\": \"Number\", \"AWATER\": \"Number\", \"CLASSFP\": \"String\", \"COUNTYFP\": \"String\", \"COUNTYNS\": \"String\", \"FUNCSTAT\": \"String\", \"GEOID\": \"String\", \"INTPTLAT\": \"String\", \"INTPTLON\": \"String\", \"LSAD\": \"String\", \"MTFCC\": \"String\", \"NAME\": \"String\", \"NAMELSAD\": \"String\", \"STATEFP\": \"String\"} } ],\"tilestats\": {\"layerCount\": 2,\"layers\": [{\"layer\": \"piscataquis\",\"count\": 1,\"geometry\": \"Polygon\",\"attributeCount\": 14,\"attributes\": [{\"attribute\": \"ALAND\",\"count\": 1,\"type\": \"number\",\"values\": [10258678459.000000],\"min\": 10258678459.000000,\"max\": 10258678459.000000},{\"attribute\": \"AWATER\",\"count\": 1,\"type\": \"number\",\"values\": [1080563045.000000],\"min\": 1080563045.000000,\"max\": 1080563045.000000},{\"attribute\": \"CLASSFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"H1\"]},{\"attribute\": \"COUNTYFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"021\"]},{\"attribute\": \"COUNTYNS\",\"count\": 1,\"type\": \"string\",\"values\": [\"00581296\"]},{\"attribute\": \"FUNCSTAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"A\"]},{\"attribute\": \"GEOID\",\"count\": 1,\"type\": \"string\",\"values\": [\"23021\"]},{\"attribute\": \"INTPTLAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"+45.9176853\"]},{\"attribute\": \"INTPTLON\",\"count\": 1,\"type\": \"string\",\"values\": [\"-069.1045359\"]},{\"attribute\": \"LSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"06\"]},{\"attribute\": \"MTFCC\",\"count\": 1,\"type\": \"string\",\"values\": [\"G4020\"]},{\"attribute\": \"NAME\",\"count\": 1,\"type\": \"string\",\"values\": [\"Piscataquis\"]},{\"attribute\": \"NAMELSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"Piscataquis County\"]},{\"attribute\": \"STATEFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"23\"]}]},{\"layer\": \"somerset\",\"count\": 1,\"geometry\": \"Polygon\",\"attributeCount\": 14,\"attributes\": [{\"attribute\": \"ALAND\",\"count\": 1,\"type\": \"number\",\"values\": [10164314642.000000],\"min\": 10164314642.000000,\"max\": 10164314642.000000},{\"attribute\": \"AWATER\",\"count\": 1,\"type\": \"number\",\"values\": [437895944.000000],\"min\": 437895944.000000,\"max\": 437895944.000000},{\"attribute\": \"CLASSFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"H1\"]},{\"attribute\": \"COUNTYFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"025\"]},{\"attribute\": \"COUNTYNS\",\"count\": 1,\"type\": \"string\",\"values\": [\"00581298\"]},{\"attribute\": \"FUNCSTAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"A\"]},{\"attribute\": \"GEOID\",\"count\": 1,\"type\": \"string\",\"values\": [\"23025\"]},{\"attribute\": \"INTPTLAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"+45.5074824\"]},{\"attribute\": \"INTPTLON\",\"count\": 1,\"type\": \"string\",\"values\": [\"-069.9760395\"]},{\"attribute\": \"LSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"06\"]},{\"attribute\": \"MTFCC\",\"count\": 1,\"type\": \"string\",\"values\": [\"G4020\"]},{\"attribute\": \"NAME\",\"count\": 1,\"type\": \"string\",\"values\": [\"Somerset\"]},{\"attribute\": \"NAMELSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"Somerset County\"]},{\"attribute\": \"STATEFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"23\"]}]}]}}",
"json": "{\"vector_layers\": [ { \"id\": \"piscataquis\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 8, \"fields\": {\"ALAND\": \"Number\", \"AWATER\": \"Number\", \"CLASSFP\": \"String\", \"COUNTYFP\": \"String\", \"COUNTYNS\": \"String\", \"FUNCSTAT\": \"String\", \"GEOID\": \"String\", \"INTPTLAT\": \"String\", \"INTPTLON\": \"String\", \"LSAD\": \"String\", \"MTFCC\": \"String\", \"NAME\": \"String\", \"NAMELSAD\": \"String\", \"STATEFP\": \"String\"} }, { \"id\": \"somerset\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 8, \"fields\": {\"ALAND\": \"Number\", \"AWATER\": \"Number\", \"CLASSFP\": \"String\", \"COUNTYFP\": \"String\", \"COUNTYNS\": \"String\", \"FUNCSTAT\": \"String\", \"GEOID\": \"String\", \"INTPTLAT\": \"String\", \"INTPTLON\": \"String\", \"LSAD\": \"String\", \"MTFCC\": \"String\", \"NAME\": \"String\", \"NAMELSAD\": \"String\", \"STATEFP\": \"String\"} } ],\"tilestats\": {\"layerCount\": 2,\"layers\": [{\"layer\": \"piscataquis\",\"count\": 1,\"geometry\": \"Polygon\",\"attributeCount\": 14,\"attributes\": [{\"attribute\": \"ALAND\",\"count\": 1,\"type\": \"number\",\"values\": [10258678459],\"min\": 10258678459,\"max\": 10258678459},{\"attribute\": \"AWATER\",\"count\": 1,\"type\": \"number\",\"values\": [1080563045],\"min\": 1080563045,\"max\": 1080563045},{\"attribute\": \"CLASSFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"H1\"]},{\"attribute\": \"COUNTYFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"021\"]},{\"attribute\": \"COUNTYNS\",\"count\": 1,\"type\": \"string\",\"values\": [\"00581296\"]},{\"attribute\": \"FUNCSTAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"A\"]},{\"attribute\": \"GEOID\",\"count\": 1,\"type\": \"string\",\"values\": [\"23021\"]},{\"attribute\": \"INTPTLAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"+45.9176853\"]},{\"attribute\": \"INTPTLON\",\"count\": 1,\"type\": \"string\",\"values\": [\"-069.1045359\"]},{\"attribute\": \"LSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"06\"]},{\"attribute\": \"MTFCC\",\"count\": 1,\"type\": \"string\",\"values\": [\"G4020\"]},{\"attribute\": \"NAME\",\"count\": 1,\"type\": \"string\",\"values\": [\"Piscataquis\"]},{\"attribute\": \"NAMELSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"Piscataquis County\"]},{\"attribute\": \"STATEFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"23\"]}]},{\"layer\": \"somerset\",\"count\": 1,\"geometry\": \"Polygon\",\"attributeCount\": 14,\"attributes\": [{\"attribute\": \"ALAND\",\"count\": 1,\"type\": \"number\",\"values\": [10164314642],\"min\": 10164314642,\"max\": 10164314642},{\"attribute\": \"AWATER\",\"count\": 1,\"type\": \"number\",\"values\": [437895944],\"min\": 437895944,\"max\": 437895944},{\"attribute\": \"CLASSFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"H1\"]},{\"attribute\": \"COUNTYFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"025\"]},{\"attribute\": \"COUNTYNS\",\"count\": 1,\"type\": \"string\",\"values\": [\"00581298\"]},{\"attribute\": \"FUNCSTAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"A\"]},{\"attribute\": \"GEOID\",\"count\": 1,\"type\": \"string\",\"values\": [\"23025\"]},{\"attribute\": \"INTPTLAT\",\"count\": 1,\"type\": \"string\",\"values\": [\"+45.5074824\"]},{\"attribute\": \"INTPTLON\",\"count\": 1,\"type\": \"string\",\"values\": [\"-069.9760395\"]},{\"attribute\": \"LSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"06\"]},{\"attribute\": \"MTFCC\",\"count\": 1,\"type\": \"string\",\"values\": [\"G4020\"]},{\"attribute\": \"NAME\",\"count\": 1,\"type\": \"string\",\"values\": [\"Somerset\"]},{\"attribute\": \"NAMELSAD\",\"count\": 1,\"type\": \"string\",\"values\": [\"Somerset County\"]},{\"attribute\": \"STATEFP\",\"count\": 1,\"type\": \"string\",\"values\": [\"23\"]}]}]}}",
"maxzoom": "8",
"minzoom": "0",
"name": "tests/tl_2015_us_county/out/-z8_-pp.json.check.mbtiles",

File diff suppressed because one or more lines are too long

View File

@ -27,6 +27,7 @@
#include <algorithm>
#include <functional>
#include "jsonpull/jsonpull.h"
#include "milo/dtoa_milo.h"
std::string dequote(std::string s);
@ -123,10 +124,10 @@ void handle(std::string message, int z, unsigned x, unsigned y, std::map<std::st
aprintf(&value, "%lld", (long long) val.numeric_value.int_value);
type = mvt_double;
} else if (val.type == mvt_double) {
aprintf(&value, "%g", val.numeric_value.double_value);
aprintf(&value, "%s", milo::dtoa_milo(val.numeric_value.double_value).c_str());
type = mvt_double;
} else if (val.type == mvt_float) {
aprintf(&value, "%g", val.numeric_value.float_value);
aprintf(&value, "%s", milo::dtoa_milo(val.numeric_value.float_value).c_str());
type = mvt_double;
} else if (val.type == mvt_bool) {
aprintf(&value, "%s", val.numeric_value.bool_value ? "true" : "false");

View File

@ -7,6 +7,7 @@
#include "geometry.hpp"
#include "mvt.hpp"
#include "write_json.hpp"
#include "milo/dtoa_milo.h"
struct lonlat {
int op;
@ -120,7 +121,7 @@ void layer_to_geojson(FILE *fp, mvt_layer const &layer, unsigned z, unsigned x,
if (v == (long long) v) {
fprintf(fp, ": %lld", (long long) v);
} else {
fprintf(fp, ": %g", v);
fprintf(fp, ": %s", milo::dtoa_milo(v).c_str());
}
} else if (val.type == mvt_float) {
fprintq(fp, key);
@ -128,7 +129,7 @@ void layer_to_geojson(FILE *fp, mvt_layer const &layer, unsigned z, unsigned x,
if (v == (long long) v) {
fprintf(fp, ": %lld", (long long) v);
} else {
fprintf(fp, ": %g", v);
fprintf(fp, ": %s", milo::dtoa_milo(v).c_str());
}
} else if (val.type == mvt_sint) {
fprintq(fp, key);