mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Performance optimizations for binning (#283)
* Add an all-mvt_value attribute accumulation path * Only bin by ID, not geometrically * A little cleanup; changelog and version; test * Remove accidental double-conversion * Replace duplicated code with template * Update changelog
This commit is contained in:
+20
@@ -49,6 +49,26 @@ struct serial_val {
|
||||
serial_val(int t, const std::string &val)
|
||||
: type(t), s(val) {
|
||||
}
|
||||
|
||||
// These functions for interface compatibility with mvt_value:
|
||||
|
||||
serial_val(double val) {
|
||||
type = mvt_double;
|
||||
s = milo::dtoa_milo(val);
|
||||
}
|
||||
|
||||
double to_double() const {
|
||||
return atof(s.c_str());
|
||||
}
|
||||
|
||||
std::string get_string_value() const {
|
||||
return s;
|
||||
}
|
||||
|
||||
void set_string_value(std::string const &val) {
|
||||
type = mvt_string;
|
||||
s = val;
|
||||
}
|
||||
};
|
||||
|
||||
struct serial_feature {
|
||||
|
||||
Reference in New Issue
Block a user