mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 10:25:41 +02:00
Can't flatten points, so don't flatten bins either
This commit is contained in:
@@ -1156,7 +1156,8 @@ struct index_event {
|
|||||||
CHECK, // point needs to be checked against active bins
|
CHECK, // point needs to be checked against active bins
|
||||||
EXIT // bin has ceased to be active
|
EXIT // bin has ceased to be active
|
||||||
} kind;
|
} kind;
|
||||||
size_t what;
|
size_t layer;
|
||||||
|
size_t feature;
|
||||||
|
|
||||||
bool operator<(const index_event &ie) const {
|
bool operator<(const index_event &ie) const {
|
||||||
if (where < ie.where) {
|
if (where < ie.where) {
|
||||||
@@ -1164,9 +1165,13 @@ struct index_event {
|
|||||||
} else if (where == ie.where) {
|
} else if (where == ie.where) {
|
||||||
if (kind < ie.kind) {
|
if (kind < ie.kind) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else if (kind == ie.kind) {
|
||||||
if (what < ie.what) {
|
if (layer < ie.layer) {
|
||||||
return true;
|
return true;
|
||||||
|
} else if (layer == ie.layer) {
|
||||||
|
if (feature < ie.feature) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1176,22 +1181,21 @@ struct index_event {
|
|||||||
};
|
};
|
||||||
|
|
||||||
mvt_tile assign_to_bins(mvt_tile const &features, std::vector<mvt_layer> const &bins, int z, int x, int y) {
|
mvt_tile assign_to_bins(mvt_tile const &features, std::vector<mvt_layer> const &bins, int z, int x, int y) {
|
||||||
// Flatten bins, in the unlikely event that there are multiple layers of them
|
std::vector<index_event> events;
|
||||||
std::vector<mvt_feature> bin_features;
|
|
||||||
for (auto const &layer : bins) {
|
// Index bins
|
||||||
for (auto const &feature : layer.features) {
|
for (size_t i = 0; i < bins.size(); i++) {
|
||||||
bin_features.push_back(feature);
|
for (size_t j = 0; j < bins[i].features.size(); j++) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<index_event> events;
|
// Index points
|
||||||
|
for (size_t i = 0; i < features.layers.size(); i++) {
|
||||||
for (size_t i = 0; i < bin_features.size(); i++) {
|
for (size_t j = 0; j < features.layers[i].features.size(); j++) {
|
||||||
index_event ie;
|
index_event ie;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add
|
|
||||||
|
|
||||||
return features;
|
return features;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user