2017-07-14 16:56:23 -07:00
|
|
|
#ifndef MAIN_HPP
|
|
|
|
#define MAIN_HPP
|
|
|
|
|
|
|
|
#include <stddef.h>
|
2018-03-13 15:04:28 -07:00
|
|
|
#include <atomic>
|
2018-11-02 15:21:52 -07:00
|
|
|
#include <string>
|
2017-07-14 16:56:23 -07:00
|
|
|
|
2016-04-27 14:59:20 -07:00
|
|
|
struct index {
|
2017-11-07 15:20:17 -08:00
|
|
|
long long start = 0;
|
|
|
|
long long end = 0;
|
|
|
|
unsigned long long ix = 0;
|
|
|
|
short segment = 0;
|
2016-10-11 17:42:41 -07:00
|
|
|
unsigned short t : 2;
|
2016-10-10 17:15:33 -07:00
|
|
|
unsigned long long seq : (64 - 18); // pack with segment and t to stay in 32 bytes
|
2017-11-07 15:20:17 -08:00
|
|
|
|
|
|
|
index()
|
|
|
|
: t(0),
|
|
|
|
seq(0) {
|
|
|
|
}
|
2016-04-27 14:59:20 -07:00
|
|
|
};
|
|
|
|
|
2018-10-22 16:49:33 -07:00
|
|
|
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;
|
|
|
|
|
2017-11-07 15:20:17 -08:00
|
|
|
void checkdisk(std::vector<struct reader> *r);
|
2016-04-27 15:09:06 -07:00
|
|
|
|
|
|
|
extern int geometry_scale;
|
|
|
|
extern int quiet;
|
2017-11-16 17:08:03 -08:00
|
|
|
extern int quiet_progress;
|
2018-03-13 14:51:41 -07:00
|
|
|
extern double progress_interval;
|
2018-03-13 15:04:28 -07:00
|
|
|
extern std::atomic<double> last_progress;
|
2016-04-27 15:09:06 -07:00
|
|
|
|
2016-10-14 17:11:57 -07:00
|
|
|
extern size_t CPUS;
|
|
|
|
extern size_t TEMP_FILES;
|
2016-10-24 15:33:14 -07:00
|
|
|
|
|
|
|
extern size_t max_tile_size;
|
2017-12-14 14:30:08 -08:00
|
|
|
extern size_t max_tile_features;
|
2017-12-20 17:31:11 -08:00
|
|
|
extern int cluster_distance;
|
2018-11-02 15:21:52 -07:00
|
|
|
extern std::string attribute_for_id;
|
2016-12-07 10:57:56 -08:00
|
|
|
|
|
|
|
int mkstemp_cloexec(char *name);
|
|
|
|
FILE *fopen_oflag(const char *name, const char *mode, int oflag);
|
2018-03-13 14:51:41 -07:00
|
|
|
bool progress_time();
|
2017-07-06 22:28:35 -07:00
|
|
|
|
2017-05-31 10:41:23 -07:00
|
|
|
#define MAX_ZOOM 24
|
2017-07-14 16:56:23 -07:00
|
|
|
|
|
|
|
#endif
|