mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-01-22 04:18:01 +00:00
Carry attribute keys and values through from the prefilter
This commit is contained in:
parent
0e5b513637
commit
5dc773ffae
8
tile.cpp
8
tile.cpp
@ -78,6 +78,7 @@ struct coalesce {
|
||||
char *stringpool;
|
||||
std::vector<long long> keys;
|
||||
std::vector<long long> values;
|
||||
std::map<std::string, serial_val> kv;
|
||||
drawvec geom;
|
||||
unsigned long long index;
|
||||
unsigned long long index2;
|
||||
@ -314,6 +315,7 @@ struct partial {
|
||||
std::vector<drawvec> geoms;
|
||||
std::vector<long long> keys;
|
||||
std::vector<long long> values;
|
||||
std::map<std::string, serial_val> kv;
|
||||
std::vector<ssize_t> arc_polygon;
|
||||
long long layer;
|
||||
long long original_seq;
|
||||
@ -1585,6 +1587,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
||||
p.maxzoom = maxzoom;
|
||||
p.keys = sf.keys;
|
||||
p.values = sf.values;
|
||||
p.kv = sf.kv;
|
||||
p.spacing = spacing;
|
||||
p.simplification = simplification;
|
||||
p.id = sf.id;
|
||||
@ -1682,6 +1685,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
||||
c.stringpool = stringpool + pool_off[partials[i].segment];
|
||||
c.keys = partials[i].keys;
|
||||
c.values = partials[i].values;
|
||||
c.kv = partials[i].kv;
|
||||
c.spacing = partials[i].spacing;
|
||||
c.id = partials[i].id;
|
||||
c.has_id = partials[i].has_id;
|
||||
@ -1798,6 +1802,10 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
||||
feature.has_id = layer_features[x].has_id;
|
||||
|
||||
decode_meta(layer_features[x].m, layer_features[x].keys, layer_features[x].values, layer_features[x].stringpool, layer, feature);
|
||||
for (auto kv : layer_features[x].kv) {
|
||||
mvt_value v = stringified_to_mvt_value(kv.second.type, kv.second.s.c_str());
|
||||
layer.tag(feature, kv.first, v);
|
||||
}
|
||||
|
||||
if (additional[A_CALCULATE_FEATURE_DENSITY]) {
|
||||
int glow = 255;
|
||||
|
Loading…
Reference in New Issue
Block a user