Skip to content

Commit

Permalink
Bug fix: mismatched features could be coalesced if from a prefilter
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-f committed Oct 10, 2018
1 parent b7fb576 commit 1b75ca3
Show file tree
Hide file tree
Showing 4 changed files with 1,153 additions and 110 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.32.0

* Fix a bug that allowed coalescing of features with mismatched attributes
if they had been passed through a shell prefilter

## 1.31.7

* Create the output tile directory even if there are no valid features
Expand Down
1,244 changes: 1,141 additions & 103 deletions tests/ne_110m_admin_0_countries/out/--coalesce_-z2_-Ccat.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,21 @@ int coalcmp(const void *v1, const void *v2) {
}

for (size_t i = 0; i < c1->full_keys.size(); i++) {
if (c1->full_keys[i] < c1->full_keys[i]) {
if (c1->full_keys[i] < c2->full_keys[i]) {
return -1;
} else if (c1->full_keys[i] > c1->full_keys[i]) {
} else if (c1->full_keys[i] > c2->full_keys[i]) {
return 1;
}

if (c1->full_values[i].type < c1->full_values[i].type) {
if (c1->full_values[i].type < c2->full_values[i].type) {
return -1;
} else if (c1->full_values[i].type > c1->full_values[i].type) {
} else if (c1->full_values[i].type > c2->full_values[i].type) {
return 1;
}

if (c1->full_values[i].s < c1->full_values[i].s) {
if (c1->full_values[i].s < c2->full_values[i].s) {
return -1;
} else if (c1->full_values[i].s > c1->full_values[i].s) {
} else if (c1->full_values[i].s > c2->full_values[i].s) {
return 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion version.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP

#define VERSION "v1.31.7"
#define VERSION "v1.32.0"

#endif

0 comments on commit 1b75ca3

Please sign in to comment.