mirror of
https://github.com/felt/tippecanoe.git
synced 2026-11-28 11:21:19 +01:00
Compare commits
30
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3456fa75ed | ||
|
|
5ec93a12b8 | ||
|
|
5e95095284 | ||
|
|
100828f019 | ||
|
|
6f12453100 | ||
|
|
0299706c47 | ||
|
|
e60ca59502 | ||
|
|
d3dfe7f45d | ||
|
|
1f9be23aba | ||
|
|
4ff265912d | ||
|
|
59026112f6 | ||
|
|
21bf44720d | ||
|
|
172f7382b5 | ||
|
|
19c144761b | ||
|
|
aa3ef1fbbf | ||
|
|
060e2ee1c1 | ||
|
|
64b4a820c2 | ||
|
|
9a8c8df007 | ||
|
|
27a4f4ecef | ||
|
|
a2adb60638 | ||
|
|
7a0878da9b | ||
|
|
56655e6ebf | ||
|
|
e2cc71b42f | ||
|
|
9739f342e6 | ||
|
|
50bf0dc3be | ||
|
|
88f8b95f27 | ||
|
|
b234cb9dac | ||
|
|
becfac9da9 | ||
|
|
78b4fc19ec | ||
|
|
3e3e7a5e4d |
@@ -1,9 +1,3 @@
|
||||
# 2.62.3
|
||||
|
||||
* Summary statistics with --accumulate-numeric-attributes make it from tiling through to binning
|
||||
* Prefix can be specified for --accumulate-numeric-attributes
|
||||
* Added --exclude and --exclude-prefix to tippecanoe-overzoom
|
||||
|
||||
# 2.62.2
|
||||
|
||||
* Pass feature ID through with bins
|
||||
|
||||
@@ -159,11 +159,9 @@ void preserve_attribute(attribute_op const &op, std::string const &key, serial_v
|
||||
s.count = 2;
|
||||
attribute_accum_state.insert(std::pair<std::string, accum_state>(key, s));
|
||||
|
||||
full_values[i].type = mvt_double;
|
||||
full_values[i].s = std::to_string(s.count);
|
||||
} else { // already present, incrementing
|
||||
state->second.count += 1;
|
||||
full_values[i].type = mvt_double;
|
||||
full_values[i].s = std::to_string(state->second.count);
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -1186,18 +1186,13 @@ static void preserve_numeric(const std::string &key, const mvt_value &val, /
|
||||
// it is the wrong one.
|
||||
|
||||
std::string outkey = key;
|
||||
bool starting_from_accumulation;
|
||||
|
||||
if (starts_with(outkey, accumulate_numeric + ":")) {
|
||||
std::string prefix = accumulate_numeric + ":" + op.first + ":";
|
||||
if (starts_with(outkey, prefix)) {
|
||||
outkey = outkey.substr(prefix.size());
|
||||
starting_from_accumulation = true; // from a subaccumulation
|
||||
} else {
|
||||
continue; // to next operation
|
||||
}
|
||||
} else {
|
||||
starting_from_accumulation = false; // from a plain value
|
||||
}
|
||||
// and then put it back on for the output field
|
||||
std::string prefixed = accumulate_numeric + ":" + op.first + ":" + outkey;
|
||||
@@ -1213,18 +1208,11 @@ static void preserve_numeric(const std::string &key, const mvt_value &val, /
|
||||
// not present at all, so copy our value to the prefixed output
|
||||
numeric_out_field.emplace(prefixed, full_keys.size());
|
||||
full_keys.push_back(prefixed);
|
||||
|
||||
if (op.second == op_count) {
|
||||
if (starting_from_accumulation) {
|
||||
// copy our count
|
||||
full_values.push_back(mvt_value_to_serial_val(val));
|
||||
} else {
|
||||
// new count of 1
|
||||
serial_val sv;
|
||||
sv.type = mvt_double;
|
||||
sv.s = "1";
|
||||
full_values.push_back(sv);
|
||||
}
|
||||
serial_val sv;
|
||||
sv.type = mvt_double;
|
||||
sv.s = "1";
|
||||
full_values.push_back(sv);
|
||||
} else {
|
||||
full_values.push_back(mvt_value_to_serial_val(val));
|
||||
}
|
||||
@@ -1232,35 +1220,20 @@ static void preserve_numeric(const std::string &key, const mvt_value &val, /
|
||||
// exists unprefixed, so copy it, and then accumulate on our value
|
||||
numeric_out_field.emplace(prefixed, full_keys.size());
|
||||
full_keys.push_back(prefixed);
|
||||
|
||||
if (op.second == op_count) {
|
||||
serial_val sv;
|
||||
sv.type = mvt_double;
|
||||
if (starting_from_accumulation) {
|
||||
// sum our count onto the existing 1
|
||||
sv.s = std::to_string(1 + mvt_value_to_long_long(val));
|
||||
} else {
|
||||
// sum our 1 onto the existing 1
|
||||
sv.s = "2";
|
||||
}
|
||||
sv.s = "1";
|
||||
full_values.push_back(sv);
|
||||
} else {
|
||||
full_values.push_back(full_values[out_attr->second]);
|
||||
preserve_attribute(op.second, prefixed, mvt_value_to_serial_val(val), full_keys, full_values, attribute_accum_state);
|
||||
}
|
||||
|
||||
preserve_attribute(op.second, prefixed, mvt_value_to_serial_val(val), full_keys, full_values, attribute_accum_state);
|
||||
}
|
||||
} else {
|
||||
// exists, so accumulate on our value
|
||||
if (op.second == op_count) {
|
||||
if (starting_from_accumulation) {
|
||||
// sum our count onto the existing count
|
||||
full_values[prefixed_attr->second].s = std::to_string(atoll(full_values[prefixed_attr->second].s.c_str()) + mvt_value_to_long_long(val));
|
||||
} else {
|
||||
full_values[prefixed_attr->second].s = std::to_string(atoll(full_values[prefixed_attr->second].s.c_str()) + 1);
|
||||
}
|
||||
} else {
|
||||
preserve_attribute(op.second, prefixed, mvt_value_to_serial_val(val), full_keys, full_values, attribute_accum_state);
|
||||
}
|
||||
preserve_attribute(op.second, prefixed, mvt_value_to_serial_val(val), full_keys, full_values, attribute_accum_state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#ifndef VERSION_HPP
|
||||
#define VERSION_HPP
|
||||
|
||||
#define VERSION "v2.62.3"
|
||||
#define VERSION "v2.62.2"
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user