Handle multipolygons with empty polygons

This commit is contained in:
Andreas Hocevar
2022-07-20 13:18:41 +02:00
parent 14041e490f
commit c8508bcf97
4 changed files with 58 additions and 7 deletions

View File

@@ -322,6 +322,7 @@ describe('ol/geom/MultiPolygon.js', function () {
[cw, ccw],
[cw2, ccw2],
]);
const withEmptyPolygon = new MultiPolygon([[ccw], []]);
it('returns coordinates as they were constructed', function () {
expect(right.getCoordinates()).to.eql([
@@ -332,6 +333,7 @@ describe('ol/geom/MultiPolygon.js', function () {
[cw, ccw],
[cw2, ccw2],
]);
expect(withEmptyPolygon.getCoordinates()).to.eql([[ccw], []]);
});
it('can return coordinates with right-hand orientation', function () {