mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Merge pull request #702 from mapbox/minzoom-0
Fix a bug that disallowed a per-feature minzoom of 0
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.32.10
|
||||||
|
|
||||||
|
* Fix a bug that disallowed a per-feature minzoom of 0
|
||||||
|
|
||||||
## 1.32.9
|
## 1.32.9
|
||||||
|
|
||||||
* Limit tile detail to 30 and buffer size to 127 to prevent coordinate
|
* Limit tile detail to 30 and buffer size to 127 to prevent coordinate
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{ "type": "Feature", "properties": {}, "geometry": { "type": "Point", "coordinates": [ 0, 0 ] }, "tippecanoe": { "minzoom": 0, "maxzoom": 0 } }
|
||||||
{ "type": "Feature", "properties": {}, "geometry": { "type": "Point", "coordinates": [ 1, 1 ] }, "tippecanoe": { "minzoom": 1, "maxzoom": 1 } }
|
{ "type": "Feature", "properties": {}, "geometry": { "type": "Point", "coordinates": [ 1, 1 ] }, "tippecanoe": { "minzoom": 1, "maxzoom": 1 } }
|
||||||
{ "type": "Feature", "properties": {}, "geometry": { "type": "Point", "coordinates": [ 2, 2 ] }, "tippecanoe": { "minzoom": 2, "maxzoom": 2 } }
|
{ "type": "Feature", "properties": {}, "geometry": { "type": "Point", "coordinates": [ 2, 2 ] }, "tippecanoe": { "minzoom": 2, "maxzoom": 2 } }
|
||||||
{ "type": "Feature", "properties": {}, "geometry": { "type": "Point", "coordinates": [ 3, 3 ] }, "tippecanoe": { "minzoom": 3, "maxzoom": 3 } }
|
{ "type": "Feature", "properties": {}, "geometry": { "type": "Point", "coordinates": [ 3, 3 ] }, "tippecanoe": { "minzoom": 3, "maxzoom": 3 } }
|
||||||
|
|||||||
@@ -1,15 +1,21 @@
|
|||||||
{ "type": "FeatureCollection", "properties": {
|
{ "type": "FeatureCollection", "properties": {
|
||||||
"bounds": "1.000000,1.000000,6.000000,6.000000",
|
"bounds": "0.000000,0.000000,6.000000,6.000000",
|
||||||
"center": "6.000000,6.000000,6",
|
"center": "6.000000,6.000000,6",
|
||||||
"description": "tests/minzoom/out/-z6.json.check.mbtiles",
|
"description": "tests/minzoom/out/-z6.json.check.mbtiles",
|
||||||
"format": "pbf",
|
"format": "pbf",
|
||||||
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 6, \"fields\": {} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 6,\"geometry\": \"Point\",\"attributeCount\": 0,\"attributes\": []}]}}",
|
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 6, \"fields\": {} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 7,\"geometry\": \"Point\",\"attributeCount\": 0,\"attributes\": []}]}}",
|
||||||
"maxzoom": "6",
|
"maxzoom": "6",
|
||||||
"minzoom": "0",
|
"minzoom": "0",
|
||||||
"name": "tests/minzoom/out/-z6.json.check.mbtiles",
|
"name": "tests/minzoom/out/-z6.json.check.mbtiles",
|
||||||
"type": "overlay",
|
"type": "overlay",
|
||||||
"version": "2"
|
"version": "2"
|
||||||
}, "features": [
|
}, "features": [
|
||||||
|
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
|
||||||
|
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||||
|
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 0.000000, 0.000000 ] } }
|
||||||
|
] }
|
||||||
|
] }
|
||||||
|
,
|
||||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 1 }, "features": [
|
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 1 }, "features": [
|
||||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 0.966797, 1.010690 ] } }
|
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 0.966797, 1.010690 ] } }
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ std::string truncate16(std::string const &s, size_t runes) {
|
|||||||
|
|
||||||
int integer_zoom(std::string where, std::string text) {
|
int integer_zoom(std::string where, std::string text) {
|
||||||
double d = atof(text.c_str());
|
double d = atof(text.c_str());
|
||||||
if (!isnormal(d) || d != floor(d) || d < 0 || d > 32) {
|
if (!isfinite(d) || d != floor(d) || d < 0 || d > 32) {
|
||||||
fprintf(stderr, "%s: Expected integer zoom level in \"tippecanoe\" GeoJSON extension, not %s\n", where.c_str(), text.c_str());
|
fprintf(stderr, "%s: Expected integer zoom level in \"tippecanoe\" GeoJSON extension, not %s\n", where.c_str(), text.c_str());
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#ifndef VERSION_HPP
|
#ifndef VERSION_HPP
|
||||||
#define VERSION_HPP
|
#define VERSION_HPP
|
||||||
|
|
||||||
#define VERSION "v1.32.9"
|
#define VERSION "v1.32.10"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user