mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Merge branch 'master' into inline-meta2
Conflicts: tile.cpp
This commit is contained in:
@@ -62,17 +62,17 @@ int coalindexcmp(const struct coalesce *c1, const struct coalesce *c2);
|
||||
static int is_integer(const char *s, long long *v);
|
||||
|
||||
struct coalesce {
|
||||
int type;
|
||||
drawvec geom;
|
||||
int m;
|
||||
char *meta;
|
||||
char *stringpool;
|
||||
unsigned long long index;
|
||||
unsigned long long index2;
|
||||
bool coalesced;
|
||||
long long original_seq;
|
||||
std::vector<long long> keys;
|
||||
std::vector<long long> values;
|
||||
drawvec geom;
|
||||
unsigned long long index;
|
||||
unsigned long long index2;
|
||||
long long original_seq;
|
||||
int type;
|
||||
int m;
|
||||
bool coalesced;
|
||||
|
||||
bool operator<(const coalesce &o) const {
|
||||
int cmp = coalindexcmp(this, &o);
|
||||
@@ -374,22 +374,22 @@ void rewrite(drawvec &geom, int z, int nextzoom, int maxzoom, long long *bbox, u
|
||||
|
||||
struct partial {
|
||||
std::vector<drawvec> geoms;
|
||||
long long layer;
|
||||
int m;
|
||||
char *meta;
|
||||
signed char t;
|
||||
int segment;
|
||||
long long original_seq;
|
||||
bool reduced;
|
||||
unsigned long long index;
|
||||
unsigned long long index2;
|
||||
int z;
|
||||
int line_detail;
|
||||
int *prevent;
|
||||
int *additional;
|
||||
int maxzoom;
|
||||
std::vector<long long> keys;
|
||||
std::vector<long long> values;
|
||||
char *meta;
|
||||
int *prevent;
|
||||
int *additional;
|
||||
long long layer;
|
||||
long long original_seq;
|
||||
unsigned long long index;
|
||||
unsigned long long index2;
|
||||
int m;
|
||||
int segment;
|
||||
bool reduced;
|
||||
int z;
|
||||
int line_detail;
|
||||
int maxzoom;
|
||||
signed char t;
|
||||
};
|
||||
|
||||
struct partial_arg {
|
||||
@@ -883,8 +883,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < partials.size(); i++) {
|
||||
std::vector<drawvec> pgeoms = partials[i].geoms;
|
||||
partials[i].geoms.clear(); // avoid keeping two copies in memory
|
||||
std::vector<drawvec> &pgeoms = partials[i].geoms;
|
||||
long long layer = partials[i].layer;
|
||||
signed char t = partials[i].t;
|
||||
long long original_seq = partials[i].original_seq;
|
||||
@@ -899,6 +898,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
||||
c.index = partials[i].index;
|
||||
c.index2 = partials[i].index2;
|
||||
c.geom = pgeoms[j];
|
||||
pgeoms[j].clear();
|
||||
c.coalesced = false;
|
||||
c.original_seq = original_seq;
|
||||
c.m = partials[i].m;
|
||||
@@ -912,6 +912,8 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
||||
}
|
||||
}
|
||||
|
||||
partials.clear();
|
||||
|
||||
int j;
|
||||
for (j = 0; j < child_shards; j++) {
|
||||
if (within[j]) {
|
||||
@@ -996,6 +998,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
||||
feature.type = features[k][x].type;
|
||||
feature.geometry = to_feature(features[k][x].geom);
|
||||
count += features[k][x].geom.size();
|
||||
features[k][x].geom.clear();
|
||||
|
||||
decode_meta(features[k][x].m, features[k][x].keys, features[k][x].values, features[k][x].stringpool, layer, feature);
|
||||
layer.features.push_back(feature);
|
||||
|
||||
Reference in New Issue
Block a user