mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-22 02:06:38 +00:00
Fix reading of MultiLineStrings in Geobuf input
This commit is contained in:
parent
907ddeb7ba
commit
1bc475b789
@ -1,3 +1,7 @@
|
||||
## 1.33.0
|
||||
|
||||
* MultiLineStrings were previously ignored in Geobuf input
|
||||
|
||||
## 1.32.12
|
||||
|
||||
* Accept .mvt as well as .pbf in directories of tiles
|
||||
|
@ -254,6 +254,8 @@ std::vector<drawvec_type> readGeometry(protozero::pbf_reader &pbf, size_t dim, d
|
||||
dv.dv = readLine(coords, dim, e, false);
|
||||
} else if (type == POLYGON) {
|
||||
dv.dv = readMultiLine(coords, lengths, dim, e, true);
|
||||
} else if (type == MULTILINESTRING) {
|
||||
dv.dv = readMultiLine(coords, lengths, dim, e, false);
|
||||
} else if (type == MULTIPOLYGON) {
|
||||
dv.dv = readMultiPolygon(coords, lengths, dim, e);
|
||||
} else {
|
||||
|
35
tests/multilinestring/in.json
Normal file
35
tests/multilinestring/in.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {},
|
||||
"geometry": {
|
||||
"type": "MultiLineString",
|
||||
"coordinates": [ [
|
||||
[
|
||||
33.046,
|
||||
70.728
|
||||
],
|
||||
[
|
||||
-1.0546,
|
||||
18.9790
|
||||
],
|
||||
[
|
||||
1.7578,
|
||||
-16.2990
|
||||
]
|
||||
], [
|
||||
[
|
||||
-17.2265,
|
||||
60.5869
|
||||
],
|
||||
[
|
||||
-34.1015,
|
||||
17.644
|
||||
]
|
||||
] ]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
42
tests/multilinestring/out/-z1.json
Normal file
42
tests/multilinestring/out/-z1.json
Normal file
@ -0,0 +1,42 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"bounds": "-34.101500,-16.299000,33.046000,70.728000",
|
||||
"center": "-34.101500,42.525564,1",
|
||||
"description": "tests/multilinestring/out/-z1.json.check.mbtiles",
|
||||
"format": "pbf",
|
||||
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 1, \"fields\": {} } ],\"tilestats\": {\"layerCount\": 1,\"layers\": [{\"layer\": \"in\",\"count\": 1,\"geometry\": \"LineString\",\"attributeCount\": 0,\"attributes\": []}]}}",
|
||||
"maxzoom": "1",
|
||||
"minzoom": "0",
|
||||
"name": "tests/multilinestring/out/-z1.json.check.mbtiles",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "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": "MultiLineString", "coordinates": [ [ [ 32.958984, 70.728979 ], [ -1.054688, 18.979026 ], [ 1.669922, -16.214675 ] ], [ [ -17.226562, 60.586967 ], [ -34.101562, 17.644022 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "LineString", "coordinates": [ [ 0.131836, 3.513421 ], [ 1.713867, -16.256867 ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 3.515625, 29.075375 ], [ 0.000000, 21.371244 ], [ -1.054688, 18.979026 ], [ 0.000000, 5.703448 ], [ 0.703125, -3.513421 ] ], [ [ -17.226562, 60.586967 ], [ -34.101562, 17.644022 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "LineString", "coordinates": [ [ 0.131836, 3.513421 ], [ 0.439453, 0.000000 ], [ 1.713867, -16.256867 ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 0 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "LineString", "coordinates": [ [ 33.002930, 70.728979 ], [ 0.000000, 21.371244 ], [ -1.054688, 18.979026 ], [ 0.000000, 5.703448 ], [ 0.439453, 0.000000 ], [ 0.703125, -3.513421 ] ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
@ -1,6 +1,6 @@
|
||||
#ifndef VERSION_HPP
|
||||
#define VERSION_HPP
|
||||
|
||||
#define VERSION "v1.32.12"
|
||||
#define VERSION "v1.33.0"
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user