diff --git a/CHANGELOG.md b/CHANGELOG.md index ccdcdbf..c8656d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.12.2 + +* Add ability to specify a projection to tippecanoe-decode + ## 1.12.1 * Fix incorrect tile layer version numbers in tile-join output diff --git a/decode.cpp b/decode.cpp index 38ff736..3b90100 100644 --- a/decode.cpp +++ b/decode.cpp @@ -64,6 +64,12 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe) { if (describe) { printf(", \"properties\": { \"zoom\": %d, \"x\": %d, \"y\": %d }", z, x, y); + + if (projection != projections) { + printf(", \"crs\": { \"type\": \"name\", \"properties\": { \"name\": "); + printq(projection->alias); + printf(" } }"); + } } printf(", \"features\": [\n"); diff --git a/tests/pbf/11-328-791.3857.json b/tests/pbf/11-328-791.3857.json index df75227..71863d5 100644 --- a/tests/pbf/11-328-791.3857.json +++ b/tests/pbf/11-328-791.3857.json @@ -1,4 +1,4 @@ -{ "type": "FeatureCollection", "properties": { "zoom": 11, "x": 328, "y": 791 }, "features": [ +{ "type": "FeatureCollection", "properties": { "zoom": 11, "x": 328, "y": 791 }, "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::3857" } }, "features": [ { "type": "FeatureCollection", "properties": { "layer": "macarthur", "version": 1, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { "LINEARID": "1104485645649", "FULLNAME": "W Macarthur Blvd", "RTTYP": "M", "MTFCC": "S1400" }, "geometry": { "type": "LineString", "coordinates": [ [ -13612111.421538, 4555240.804753 ], [ -13612183.081252, 4555231.250125 ], [ -13612426.724279, 4555159.590410 ], [ -13612522.270565, 4555145.258468 ], [ -13612646.480736, 4555111.817268 ], [ -13612665.589993, 4555130.926525 ] ] } } , diff --git a/version.hpp b/version.hpp index c88c995..e9ceef8 100644 --- a/version.hpp +++ b/version.hpp @@ -1 +1 @@ -#define VERSION "tippecanoe v1.12.1\n" +#define VERSION "tippecanoe v1.12.2\n"