mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +02:00
More initializers
This commit is contained in:
+9
-9
@@ -22,13 +22,13 @@
|
|||||||
#define MULTIPOLYGON 5
|
#define MULTIPOLYGON 5
|
||||||
|
|
||||||
struct queued_feature {
|
struct queued_feature {
|
||||||
protozero::pbf_reader pbf;
|
protozero::pbf_reader pbf{};
|
||||||
size_t dim;
|
size_t dim = 0;
|
||||||
double e;
|
double e = 0;
|
||||||
std::vector<std::string> *keys;
|
std::vector<std::string> *keys = NULL;
|
||||||
std::vector<struct serialization_state> *sst;
|
std::vector<struct serialization_state> *sst = NULL;
|
||||||
int layer;
|
int layer = 0;
|
||||||
std::string layername;
|
std::string layername = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::vector<queued_feature> feature_queue;
|
static std::vector<queued_feature> feature_queue;
|
||||||
@@ -196,8 +196,8 @@ drawvec readMultiPolygon(std::vector<long long> &coords, std::vector<int> &lengt
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct drawvec_type {
|
struct drawvec_type {
|
||||||
drawvec dv;
|
drawvec dv{};
|
||||||
int type;
|
int type = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<drawvec_type> readGeometry(protozero::pbf_reader &pbf, size_t dim, double e, std::vector<std::string> &keys) {
|
std::vector<drawvec_type> readGeometry(protozero::pbf_reader &pbf, size_t dim, double e, std::vector<std::string> &keys) {
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ int prevent[256];
|
|||||||
int additional[256];
|
int additional[256];
|
||||||
|
|
||||||
struct source {
|
struct source {
|
||||||
std::string layer;
|
std::string layer = "";
|
||||||
std::string file;
|
std::string file = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
size_t CPUS;
|
size_t CPUS;
|
||||||
@@ -437,34 +437,34 @@ void do_read_parallel(char *map, long long len, long long initial_offset, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct read_parallel_arg {
|
struct read_parallel_arg {
|
||||||
int fd;
|
int fd = 0;
|
||||||
FILE *fp;
|
FILE *fp = NULL;
|
||||||
long long offset;
|
long long offset = 0;
|
||||||
long long len;
|
long long len = 0;
|
||||||
volatile int *is_parsing;
|
volatile int *is_parsing = NULL;
|
||||||
int separator;
|
int separator = 0;
|
||||||
|
|
||||||
const char *reading;
|
const char *reading = NULL;
|
||||||
std::vector<struct reader> *readers;
|
std::vector<struct reader> *readers = NULL;
|
||||||
volatile long long *progress_seq;
|
volatile long long *progress_seq = NULL;
|
||||||
std::set<std::string> *exclude;
|
std::set<std::string> *exclude = NULL;
|
||||||
std::set<std::string> *include;
|
std::set<std::string> *include = NULL;
|
||||||
int exclude_all;
|
int exclude_all = 0;
|
||||||
json_object *filter;
|
json_object *filter = NULL;
|
||||||
int maxzoom;
|
int maxzoom = 0;
|
||||||
int basezoom;
|
int basezoom = 0;
|
||||||
int source;
|
int source = 0;
|
||||||
std::vector<std::map<std::string, layermap_entry> > *layermaps;
|
std::vector<std::map<std::string, layermap_entry> > *layermaps = NULL;
|
||||||
int *initialized;
|
int *initialized = NULL;
|
||||||
unsigned *initial_x;
|
unsigned *initial_x = NULL;
|
||||||
unsigned *initial_y;
|
unsigned *initial_y = NULL;
|
||||||
std::string layername;
|
std::string layername = "";
|
||||||
bool uses_gamma;
|
bool uses_gamma = false;
|
||||||
std::map<std::string, int> const *attribute_types;
|
std::map<std::string, int> const *attribute_types = NULL;
|
||||||
double *dist_sum;
|
double *dist_sum = NULL;
|
||||||
size_t *dist_count;
|
size_t *dist_count = NULL;
|
||||||
bool want_dist;
|
bool want_dist = false;
|
||||||
bool filters;
|
bool filters = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
void *run_read_parallel(void *v) {
|
void *run_read_parallel(void *v) {
|
||||||
|
|||||||
+2
-2
@@ -90,8 +90,8 @@ struct reader {
|
|||||||
|
|
||||||
long long file_bbox[4] = {0, 0, 0, 0};
|
long long file_bbox[4] = {0, 0, 0, 0};
|
||||||
|
|
||||||
struct stat geomst;
|
struct stat geomst {};
|
||||||
struct stat metast;
|
struct stat metast {};
|
||||||
|
|
||||||
char *geom_map = NULL;
|
char *geom_map = NULL;
|
||||||
};
|
};
|
||||||
|
|||||||
+26
-26
@@ -322,20 +322,20 @@ double max(double a, double b) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct reader {
|
struct reader {
|
||||||
long long zoom;
|
long long zoom = 0;
|
||||||
long long x;
|
long long x = 0;
|
||||||
long long sorty;
|
long long sorty = 0;
|
||||||
long long y;
|
long long y = 0;
|
||||||
int pbf_count;
|
int pbf_count = 0;
|
||||||
int z_flag;
|
int z_flag = 0;
|
||||||
|
|
||||||
std::string data;
|
std::string data = "";
|
||||||
std::vector<std::string> pbf_path;
|
std::vector<std::string> pbf_path{};
|
||||||
std::vector<std::string> large_zoom;
|
std::vector<std::string> large_zoom{};
|
||||||
|
|
||||||
sqlite3 *db;
|
sqlite3 *db = NULL;
|
||||||
sqlite3_stmt *stmt;
|
sqlite3_stmt *stmt = NULL;
|
||||||
struct reader *next;
|
struct reader *next = NULL;
|
||||||
|
|
||||||
bool operator<(const struct reader &r) const {
|
bool operator<(const struct reader &r) const {
|
||||||
if (zoom < r.zoom) {
|
if (zoom < r.zoom) {
|
||||||
@@ -569,10 +569,10 @@ struct zxy {
|
|||||||
long long x;
|
long long x;
|
||||||
long long y;
|
long long y;
|
||||||
|
|
||||||
zxy(long long _z, long long _x, long long _y) {
|
zxy(long long _z, long long _x, long long _y)
|
||||||
z = _z;
|
: z(_z),
|
||||||
x = _x;
|
x(_x),
|
||||||
y = _y;
|
y(_y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator<(zxy const &other) const {
|
bool operator<(zxy const &other) const {
|
||||||
@@ -599,18 +599,18 @@ struct zxy {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct arg {
|
struct arg {
|
||||||
std::map<zxy, std::vector<std::string>> inputs;
|
std::map<zxy, std::vector<std::string>> inputs{};
|
||||||
std::map<zxy, std::string> outputs;
|
std::map<zxy, std::string> outputs{};
|
||||||
|
|
||||||
std::map<std::string, layermap_entry> *layermap;
|
std::map<std::string, layermap_entry> *layermap = NULL;
|
||||||
|
|
||||||
std::vector<std::string> *header;
|
std::vector<std::string> *header = NULL;
|
||||||
std::map<std::string, std::vector<std::string>> *mapping;
|
std::map<std::string, std::vector<std::string>> *mapping = NULL;
|
||||||
std::set<std::string> *exclude;
|
std::set<std::string> *exclude = NULL;
|
||||||
std::set<std::string> *keep_layers;
|
std::set<std::string> *keep_layers = NULL;
|
||||||
std::set<std::string> *remove_layers;
|
std::set<std::string> *remove_layers = NULL;
|
||||||
int ifmatched;
|
int ifmatched = 0;
|
||||||
json_object *filter;
|
json_object *filter = NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
void *join_worker(void *v) {
|
void *join_worker(void *v) {
|
||||||
|
|||||||
+6
-6
@@ -16,12 +16,12 @@ struct lonlat {
|
|||||||
long long x;
|
long long x;
|
||||||
long long y;
|
long long y;
|
||||||
|
|
||||||
lonlat(int nop, double nlon, double nlat, long long nx, long long ny) {
|
lonlat(int nop, double nlon, double nlat, long long nx, long long ny)
|
||||||
this->op = nop;
|
: op(nop),
|
||||||
this->lon = nlon;
|
lon(nlon),
|
||||||
this->lat = nlat;
|
lat(nlat),
|
||||||
this->x = nx;
|
x(nx),
|
||||||
this->y = ny;
|
y(ny) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user