mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Try limiting the depth of the search for duplicate attributes
This commit is contained in:
@@ -115,11 +115,9 @@ bool mvt_tile::decode(const std::string &message, bool &was_compressed) {
|
|||||||
std::string src;
|
std::string src;
|
||||||
|
|
||||||
if (is_compressed(message)) {
|
if (is_compressed(message)) {
|
||||||
std::string uncompressed;
|
if (decompress(message, src) == 0) {
|
||||||
if (decompress(message, uncompressed) == 0) {
|
|
||||||
exit(EXIT_MVT);
|
exit(EXIT_MVT);
|
||||||
}
|
}
|
||||||
src = uncompressed;
|
|
||||||
was_compressed = true;
|
was_compressed = true;
|
||||||
} else {
|
} else {
|
||||||
src = message;
|
src = message;
|
||||||
@@ -612,7 +610,10 @@ void mvt_layer::tag(mvt_feature &feature, std::string const &key, mvt_value cons
|
|||||||
if (ki == key_map.end()) {
|
if (ki == key_map.end()) {
|
||||||
ko = keys.size();
|
ko = keys.size();
|
||||||
keys.push_back(key);
|
keys.push_back(key);
|
||||||
|
|
||||||
|
if (key_map.size() < 200) {
|
||||||
key_map.emplace(key, ko);
|
key_map.emplace(key, ko);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ko = ki->second;
|
ko = ki->second;
|
||||||
}
|
}
|
||||||
@@ -620,7 +621,10 @@ void mvt_layer::tag(mvt_feature &feature, std::string const &key, mvt_value cons
|
|||||||
if (vi == value_map.end()) {
|
if (vi == value_map.end()) {
|
||||||
vo = values.size();
|
vo = values.size();
|
||||||
values.push_back(value);
|
values.push_back(value);
|
||||||
|
|
||||||
|
if (value_map.size() < 200) {
|
||||||
value_map.emplace(value, vo);
|
value_map.emplace(value, vo);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
vo = vi->second;
|
vo = vi->second;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user