mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-03 00:45:41 +02:00
* Add an option to limit geometry vertex count * Update docs and changelog * Track desired feature count and geometry size in strategies * Remove dead code for a long-forgotten inaccessible option * Fix the option name in changelog * Refine coalesce-smallest to only coalesce onto other small features * Clean polygons before coalescing-as-needed * Don't accumulate tiny polygon holes as negative dust * Add the option not to limit the feature count at maxzoom * Add options to limit feature count more abruptly in each tile * Revert "Add the option not to limit the feature count at maxzoom" This reverts commitace173ab7a. * Revert "Fix the option name in changelog" This reverts commit38dbce8405. * Revert "Add an option to limit geometry vertex count" This reverts commitd379fdf06b. * Remove test for reverted option * Remove more leftovers from geometry size limiting * Update changelog
82 lines
1.6 KiB
C++
82 lines
1.6 KiB
C++
#ifndef MAIN_HPP
|
|
#define MAIN_HPP
|
|
|
|
#include <stddef.h>
|
|
#include <atomic>
|
|
#include <string>
|
|
|
|
#include "json_logger.hpp"
|
|
|
|
struct index {
|
|
long long start = 0;
|
|
long long end = 0;
|
|
unsigned long long ix = 0;
|
|
short segment = 0;
|
|
unsigned short t : 2;
|
|
unsigned long long seq : (64 - 18); // pack with segment and t to stay in 32 bytes
|
|
|
|
index()
|
|
: t(0),
|
|
seq(0) {
|
|
}
|
|
};
|
|
|
|
struct clipbbox {
|
|
double lon1;
|
|
double lat1;
|
|
double lon2;
|
|
double lat2;
|
|
|
|
long long minx;
|
|
long long miny;
|
|
long long maxx;
|
|
long long maxy;
|
|
};
|
|
|
|
extern std::vector<clipbbox> clipbboxes;
|
|
|
|
void checkdisk(std::vector<struct reader> *r);
|
|
|
|
extern int geometry_scale;
|
|
extern int quiet;
|
|
extern int quiet_progress;
|
|
extern json_logger logger;
|
|
extern double progress_interval;
|
|
extern std::atomic<double> last_progress;
|
|
extern int extra_detail;
|
|
|
|
extern size_t CPUS;
|
|
extern size_t TEMP_FILES;
|
|
|
|
extern size_t max_tile_size;
|
|
extern size_t max_tile_features;
|
|
extern int cluster_distance;
|
|
extern std::string attribute_for_id;
|
|
extern int tiny_polygon_size;
|
|
extern size_t limit_tile_feature_count;
|
|
extern size_t limit_tile_feature_count_at_maxzoom;
|
|
|
|
struct order_field {
|
|
std::string name;
|
|
bool descending;
|
|
|
|
order_field(std::string _name, bool _descending)
|
|
: name(_name),
|
|
descending(_descending) {
|
|
}
|
|
};
|
|
|
|
extern std::vector<order_field> order_by;
|
|
|
|
// not legal UTF-8, so can't appear as a real attribute name
|
|
#define ORDER_BY_SIZE "\200size"
|
|
extern bool order_by_size;
|
|
|
|
int mkstemp_cloexec(char *name);
|
|
FILE *fopen_oflag(const char *name, const char *mode, int oflag);
|
|
bool progress_time();
|
|
|
|
#define MAX_ZOOM 24
|
|
|
|
#endif
|