mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-03 00:45:41 +02:00
Preparing to sort by interestingness
This commit is contained in:
@@ -250,6 +250,10 @@ static int metacmp(const std::vector<long long> &keys1, const std::vector<long l
|
||||
}
|
||||
}
|
||||
|
||||
double get_interestingness(const struct coalesce *c1) {
|
||||
return 0; // XXX
|
||||
}
|
||||
|
||||
static mvt_value find_attribute_value(const struct coalesce *c1, std::string key) {
|
||||
if (key == ORDER_BY_SIZE) {
|
||||
mvt_value v;
|
||||
@@ -257,6 +261,12 @@ static mvt_value find_attribute_value(const struct coalesce *c1, std::string key
|
||||
v.numeric_value.double_value = c1->extent;
|
||||
return v;
|
||||
}
|
||||
if (key == ORDER_BY_INTERESTINGNESS) {
|
||||
mvt_value v;
|
||||
v.type = mvt_double;
|
||||
v.numeric_value.double_value = get_interestingness(c1);
|
||||
return v;
|
||||
}
|
||||
|
||||
const std::vector<long long> &keys1 = c1->keys;
|
||||
const std::vector<long long> &values1 = c1->values;
|
||||
@@ -519,6 +529,14 @@ struct partial_arg {
|
||||
drawvec *shared_nodes;
|
||||
};
|
||||
|
||||
double get_interestingness(const serial_feature *c1, const char *stringpool, long long pool_off[]) {
|
||||
return 0; // XXX
|
||||
}
|
||||
|
||||
double get_interestingness(const partial *c1, const char *stringpool, long long pool_off[]) {
|
||||
return 0; // XXX
|
||||
}
|
||||
|
||||
// THIS IS RIDICULOUS to have three almost-identical representations for features. FIX FIX FIX
|
||||
|
||||
static mvt_value find_attribute_value(const serial_feature *c1, std::string key, const char *stringpool, long long pool_off[]) {
|
||||
@@ -528,6 +546,12 @@ static mvt_value find_attribute_value(const serial_feature *c1, std::string key,
|
||||
v.numeric_value.double_value = c1->extent;
|
||||
return v;
|
||||
}
|
||||
if (key == ORDER_BY_INTERESTINGNESS) {
|
||||
mvt_value v;
|
||||
v.type = mvt_double;
|
||||
v.numeric_value.double_value = get_interestingness(c1, stringpool, pool_off);
|
||||
return v;
|
||||
}
|
||||
|
||||
const std::vector<long long> &keys1 = c1->keys;
|
||||
const std::vector<long long> &values1 = c1->values;
|
||||
@@ -559,6 +583,12 @@ static mvt_value find_attribute_value(const partial *c1, std::string key, const
|
||||
v.numeric_value.double_value = c1->extent;
|
||||
return v;
|
||||
}
|
||||
if (key == ORDER_BY_INTERESTINGNESS) {
|
||||
mvt_value v;
|
||||
v.type = mvt_double;
|
||||
v.numeric_value.double_value = get_interestingness(c1, stringpool, pool_off);
|
||||
return v;
|
||||
}
|
||||
|
||||
const std::vector<long long> &keys1 = c1->keys;
|
||||
const std::vector<long long> &values1 = c1->values;
|
||||
|
||||
Reference in New Issue
Block a user