mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-03 00:45:41 +02:00
Merge PR #393 (MLT output format) into main
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "serial.hpp"
|
||||
#include "options.hpp"
|
||||
#include "main.hpp"
|
||||
#include "mlt.hpp"
|
||||
#include "write_json.hpp"
|
||||
#include "milo/dtoa_milo.h"
|
||||
#include "evaluator.hpp"
|
||||
@@ -2853,7 +2854,12 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
}
|
||||
|
||||
std::string compressed;
|
||||
std::string pbf = tile.encode();
|
||||
std::string pbf;
|
||||
if (output_format == OUTPUT_MLT) {
|
||||
pbf = encode_as_mlt(tile, mlt_sort_features, mlt_pretessellate);
|
||||
} else {
|
||||
pbf = tile.encode();
|
||||
}
|
||||
|
||||
tile.layers.clear();
|
||||
|
||||
@@ -3028,7 +3034,8 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
|
||||
if (outdb != NULL) {
|
||||
mbtiles_write_tile(outdb, z, tx, ty, compressed.data(), compressed.size());
|
||||
} else if (outdir != NULL) {
|
||||
dir_write_tile(outdir, z, tx, ty, compressed);
|
||||
const char *tile_ext = (output_format == OUTPUT_MLT) ? ".mlt" : ".pbf";
|
||||
dir_write_tile(outdir, z, tx, ty, compressed, tile_ext);
|
||||
}
|
||||
|
||||
if (pthread_mutex_unlock(&db_lock) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user