Fix offset passed from linearRingssAreOriented to linearRingsAreOriented
The offset needs to be set to the end of the previous Polygon, see `offset = orientLinearRings(...)` in function orientLinearRingsArray Fixes #9189
This commit is contained in:
@@ -77,10 +77,14 @@ export function linearRingsAreOriented(flatCoordinates, offset, ends, stride, op
|
|||||||
*/
|
*/
|
||||||
export function linearRingssAreOriented(flatCoordinates, offset, endss, stride, opt_right) {
|
export function linearRingssAreOriented(flatCoordinates, offset, endss, stride, opt_right) {
|
||||||
for (let i = 0, ii = endss.length; i < ii; ++i) {
|
for (let i = 0, ii = endss.length; i < ii; ++i) {
|
||||||
|
const ends = endss[i];
|
||||||
if (!linearRingsAreOriented(
|
if (!linearRingsAreOriented(
|
||||||
flatCoordinates, offset, endss[i], stride, opt_right)) {
|
flatCoordinates, offset, ends, stride, opt_right)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (ends.length) {
|
||||||
|
offset = ends[ends.length - 1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user