mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Only detect longitude wraparound within each ring. (#150)
* Only detect longitude wraparound within each ring. Between rings it's OK to jump around from one side of the world to the other. * Add test * Update changelog
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
# 2.35.0
|
||||||
|
|
||||||
|
* Fix a bug in --detect-longitude-wraparound when there are multiple rings
|
||||||
|
|
||||||
# 2.34.1
|
# 2.34.1
|
||||||
|
|
||||||
* Further improvements to tile-join speed
|
* Further improvements to tile-join speed
|
||||||
|
|||||||
+16
-11
@@ -325,19 +325,24 @@ static long long scale_geometry(struct serialization_state *sst, long long *bbox
|
|||||||
long long y = geom[i].y;
|
long long y = geom[i].y;
|
||||||
|
|
||||||
if (additional[A_DETECT_WRAPAROUND]) {
|
if (additional[A_DETECT_WRAPAROUND]) {
|
||||||
x += offset;
|
if (geom[i].op == VT_LINETO) {
|
||||||
if (has_prev) {
|
x += offset;
|
||||||
if (x - prev > (1LL << 31)) {
|
if (has_prev) {
|
||||||
offset -= 1LL << 32;
|
if (x - prev > (1LL << 31)) {
|
||||||
x -= 1LL << 32;
|
offset -= 1LL << 32;
|
||||||
} else if (prev - x > (1LL << 31)) {
|
x -= 1LL << 32;
|
||||||
offset += 1LL << 32;
|
} else if (prev - x > (1LL << 31)) {
|
||||||
x += 1LL << 32;
|
offset += 1LL << 32;
|
||||||
|
x += 1LL << 32;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
has_prev = true;
|
has_prev = true;
|
||||||
prev = x;
|
prev = x;
|
||||||
|
} else {
|
||||||
|
offset = 0;
|
||||||
|
prev = x;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x < bbox[0]) {
|
if (x < bbox[0]) {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#ifndef VERSION_HPP
|
#ifndef VERSION_HPP
|
||||||
#define VERSION_HPP
|
#define VERSION_HPP
|
||||||
|
|
||||||
#define VERSION "v2.34.1"
|
#define VERSION "v2.35.0"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user