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;
|
||||
|
||||
if (is_compressed(message)) {
|
||||
std::string uncompressed;
|
||||
if (decompress(message, uncompressed) == 0) {
|
||||
if (decompress(message, src) == 0) {
|
||||
exit(EXIT_MVT);
|
||||
}
|
||||
src = uncompressed;
|
||||
was_compressed = true;
|
||||
} else {
|
||||
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()) {
|
||||
ko = keys.size();
|
||||
keys.push_back(key);
|
||||
key_map.emplace(key, ko);
|
||||
|
||||
if (key_map.size() < 200) {
|
||||
key_map.emplace(key, ko);
|
||||
}
|
||||
} else {
|
||||
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()) {
|
||||
vo = values.size();
|
||||
values.push_back(value);
|
||||
value_map.emplace(value, vo);
|
||||
|
||||
if (value_map.size() < 200) {
|
||||
value_map.emplace(value, vo);
|
||||
}
|
||||
} else {
|
||||
vo = vi->second;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user