Skip to content

Commit

Permalink
Fix inverse spatial feature order
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-f committed Dec 15, 2023
1 parent fdf230f commit 5978ecd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3359,8 +3359,8 @@ int main(int argc, char **argv) {
order_by.push_back(order_field(ORDER_BY_SIZE, true));
order_by_size = true;
} else if (strcmp(opt, "order-spatial-inverse") == 0) {
order_by.push_back(order_field(ORDER_SPATIAL, false));
order_by.push_back(order_field(ORDER_BY_FEATURE_MINZOOM, false));
order_by.push_back(order_field(ORDER_SPATIAL, false));
} else if (strcmp(opt, "simplification-at-maximum-zoom") == 0) {
maxzoom_simplification = atof_require(optarg, "Mazoom simplification");
if (maxzoom_simplification <= 0) {
Expand Down
5 changes: 4 additions & 1 deletion tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,8 @@ void *partial_feature_worker(void *v) {
to_tile_scale(geom, z, out_detail);
}

(*partials)[i].index = i;
// what was this for?
// (*partials)[i].index = i;

std::vector<drawvec> geoms; // artifact of former polygon-splitting to reduce geometric complexity
geoms.push_back(geom);
Expand Down Expand Up @@ -2336,6 +2337,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
for (size_t i = 0; i < partials.size(); i++) {
partial &p = partials[i];

#if 0
{
std::string layername = (*layer_unmaps)[p.segment][p.layer];

Expand All @@ -2350,6 +2352,7 @@ long long write_tile(decompressor *geoms, std::atomic<long long> *geompos_in, ch
sv2.s = std::to_string(p.feature_minzoom);
p.full_values.push_back(sv2);
}
#endif

if (p.clustered > 0) {
std::string layername = (*layer_unmaps)[p.segment][p.layer];
Expand Down

0 comments on commit 5978ecd

Please sign in to comment.