mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 10:25:41 +02:00
Add --no-tile-compression option to tippecanoe-overzoom
This commit is contained in:
@@ -291,8 +291,8 @@ overzoom-test: tippecanoe-overzoom
|
|||||||
./tippecanoe-decode tests/pbf/13-1310-3166.pbf 13 1310 3166 > tests/pbf/13-1310-3166.pbf.json.check
|
./tippecanoe-decode tests/pbf/13-1310-3166.pbf 13 1310 3166 > tests/pbf/13-1310-3166.pbf.json.check
|
||||||
cmp tests/pbf/13-1310-3166.pbf.json.check tests/pbf/13-1310-3166.pbf.json
|
cmp tests/pbf/13-1310-3166.pbf.json.check tests/pbf/13-1310-3166.pbf.json
|
||||||
rm tests/pbf/13-1310-3166.pbf tests/pbf/13-1310-3166.pbf.json.check
|
rm tests/pbf/13-1310-3166.pbf tests/pbf/13-1310-3166.pbf.json.check
|
||||||
# Multiple inputs
|
# Multiple inputs, no compression
|
||||||
./tippecanoe-overzoom -o tests/pbf/13-1310-3166-ne.pbf -t 13/1310/3166 tests/pbf/11-327-791.pbf 11/327/791 tests/pbf/0-0-0.pbf 0/0/0
|
./tippecanoe-overzoom --no-tile-compression -o tests/pbf/13-1310-3166-ne.pbf -t 13/1310/3166 tests/pbf/11-327-791.pbf 11/327/791 tests/pbf/0-0-0.pbf 0/0/0
|
||||||
./tippecanoe-decode tests/pbf/13-1310-3166-ne.pbf 13 1310 3166 > tests/pbf/13-1310-3166-ne.pbf.json.check
|
./tippecanoe-decode tests/pbf/13-1310-3166-ne.pbf 13 1310 3166 > tests/pbf/13-1310-3166-ne.pbf.json.check
|
||||||
cmp tests/pbf/13-1310-3166-ne.pbf.json.check tests/pbf/13-1310-3166-ne.pbf.json
|
cmp tests/pbf/13-1310-3166-ne.pbf.json.check tests/pbf/13-1310-3166-ne.pbf.json
|
||||||
rm tests/pbf/13-1310-3166-ne.pbf tests/pbf/13-1310-3166-ne.pbf.json.check
|
rm tests/pbf/13-1310-3166-ne.pbf tests/pbf/13-1310-3166-ne.pbf.json.check
|
||||||
|
|||||||
+8
-1
@@ -17,6 +17,8 @@ extern int optind;
|
|||||||
int detail = 12; // tippecanoe-style: mvt extent == 1 << detail
|
int detail = 12; // tippecanoe-style: mvt extent == 1 << detail
|
||||||
int buffer = 5; // tippecanoe-style: mvt buffer == extent * buffer / 256;
|
int buffer = 5; // tippecanoe-style: mvt buffer == extent * buffer / 256;
|
||||||
bool demultiply = false;
|
bool demultiply = false;
|
||||||
|
bool do_compress = true;
|
||||||
|
|
||||||
std::string filter;
|
std::string filter;
|
||||||
bool preserve_input_order = false;
|
bool preserve_input_order = false;
|
||||||
std::unordered_map<std::string, attribute_op> attribute_accum;
|
std::unordered_map<std::string, attribute_op> attribute_accum;
|
||||||
@@ -65,6 +67,7 @@ int main(int argc, char **argv) {
|
|||||||
{"assign-to-bins", required_argument, 0, 'b' & 0x1F},
|
{"assign-to-bins", required_argument, 0, 'b' & 0x1F},
|
||||||
{"bin-by-id-list", required_argument, 0, 'c' & 0x1F},
|
{"bin-by-id-list", required_argument, 0, 'c' & 0x1F},
|
||||||
{"accumulate-numeric-attributes", required_argument, 0, 'a' & 0x1F},
|
{"accumulate-numeric-attributes", required_argument, 0, 'a' & 0x1F},
|
||||||
|
{"no-tile-compression", no_argument, 0, 'd' & 0x1F},
|
||||||
|
|
||||||
{0, 0, 0, 0},
|
{0, 0, 0, 0},
|
||||||
};
|
};
|
||||||
@@ -151,6 +154,10 @@ int main(int argc, char **argv) {
|
|||||||
accumulate_numeric = optarg;
|
accumulate_numeric = optarg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'd' & 0x1F:
|
||||||
|
do_compress = false;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Unrecognized flag -%c\n", i);
|
fprintf(stderr, "Unrecognized flag -%c\n", i);
|
||||||
usage(argv);
|
usage(argv);
|
||||||
@@ -255,7 +262,7 @@ int main(int argc, char **argv) {
|
|||||||
its.push_back(std::move(t));
|
its.push_back(std::move(t));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string out = overzoom(its, nz, nx, ny, detail, buffer, keep, exclude, exclude_prefix, true, NULL, demultiply, json_filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins, bin_by_id_list, accumulate_numeric, SIZE_MAX);
|
std::string out = overzoom(its, nz, nx, ny, detail, buffer, keep, exclude, exclude_prefix, do_compress, NULL, demultiply, json_filter, preserve_input_order, attribute_accum, unidecode_data, simplification, tiny_polygon_size, bins, bin_by_id_list, accumulate_numeric, SIZE_MAX);
|
||||||
|
|
||||||
FILE *f = fopen(outfile, "wb");
|
FILE *f = fopen(outfile, "wb");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1310, "y": 3166 }, "features": [
|
{ "type": "FeatureCollection", "properties": { "zoom": 13, "x": 1310, "y": 3166, "compressed": false }, "features": [
|
||||||
{ "type": "FeatureCollection", "properties": { "layer": "ne_10m_land", "version": 2, "extent": 4096 }, "features": [
|
{ "type": "FeatureCollection", "properties": { "layer": "ne_10m_land", "version": 2, "extent": 4096 }, "features": [
|
||||||
{ "type": "Feature", "properties": { "featurecla": "Land", "scalerank": 0, "min_zoom": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.387760, 37.788760 ], [ -122.387094, 37.778754 ], [ -122.386837, 37.778517 ], [ -122.386837, 37.752665 ], [ -122.432499, 37.752665 ], [ -122.432499, 37.788760 ], [ -122.387760, 37.788760 ] ] ] } }
|
{ "type": "Feature", "properties": { "featurecla": "Land", "scalerank": 0, "min_zoom": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -122.387760, 37.788760 ], [ -122.387094, 37.778754 ], [ -122.386837, 37.778517 ], [ -122.386837, 37.752665 ], [ -122.432499, 37.752665 ], [ -122.432499, 37.788760 ], [ -122.387760, 37.788760 ] ] ] } }
|
||||||
] }
|
] }
|
||||||
|
|||||||
Reference in New Issue
Block a user