mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
* Add an option to extend zooms if still dropping, but with a limit * At least when to overzoom, even if not actually doing it yet * Refactor to give tile-join access to overzoom() * Didn't work, but *might* have worked * OK, it did something now * Ah, there's the bug! * Hook up pmtiles and dirtiles as overzooming sources * Add command line option to enable or disable overzooming * Add (currently broken) test of overzooming in tile-join * Slightly more abstraction for the tile-join readers * Factor out duplicated code * Move construction into a constructor * More changing accessors to methods * Reduce magic * Start tracking a list of the tiles at maxzoom * I think it worked? * Add missing #include * Fix sequence of overzoomed tiles (Y sorts backwards for TMS) * Don't spend memory on overzooming when we aren't going to use it * Diff rather than cmp, in the hope of figuring out this broken test * Keep full coordinate precision if we might extend zooms * Try a slightly different byte limit * Make drop-densest more consistent across tile boundaries * Also affects this test * Does it behave any differently if it can extend forever? * I think the discrepancy is a thread-safety problem here * Revert "Does it behave any differently if it can extend forever?" This reverts commit0dff0a0acc. * Lost this change to the test * This time for sure! * Revert "Also affects this test" This reverts commitcd1f7c2e78. * Revert "Make drop-densest more consistent across tile boundaries" This reverts commit563f7d2bc2. * Revert "Try a slightly different byte limit" This reverts commit2e271213d6. * Add some more explanatory comments * Amend the join-test to detect my current bug * Allow overzooming to complete the zoom if it ever starts * Forgot to correct the test * Update changelog and version * Cleanups from code review * Remove version number from fixture to fix test
89 lines
1.8 KiB
C++
89 lines
1.8 KiB
C++
#ifndef MAIN_HPP
|
|
#define MAIN_HPP
|
|
|
|
#include <stddef.h>
|
|
#include <atomic>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <map>
|
|
|
|
#include "json_logger.hpp"
|
|
#include "serial.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 memsize;
|
|
|
|
extern size_t max_tile_size;
|
|
extern size_t max_tile_features;
|
|
extern int cluster_distance;
|
|
extern int cluster_maxzoom;
|
|
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;
|
|
extern std::map<std::string, serial_val> set_attributes;
|
|
extern long long extend_zooms_max;
|
|
|
|
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
|