Remove lint

This commit is contained in:
Andreas Hocevar
2021-06-28 18:10:51 +02:00
parent b5bb9382e2
commit 79f5f46d27
135 changed files with 1040 additions and 2374 deletions

View File

@@ -106,14 +106,7 @@ describe('ol/geom/MultiLineString.js', function () {
it('has the expected flat coordinates', function () {
expect(multiLineString.getFlatCoordinates()).to.eql([
1,
2,
3,
4,
5,
6,
7,
8,
1, 2, 3, 4, 5, 6, 7, 8,
]);
});
@@ -176,18 +169,7 @@ describe('ol/geom/MultiLineString.js', function () {
it('has the expected flat coordinates', function () {
expect(multiLineString.getFlatCoordinates()).to.eql([
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
]);
});
@@ -237,18 +219,7 @@ describe('ol/geom/MultiLineString.js', function () {
it('has the expected flat coordinates', function () {
expect(multiLineString.getFlatCoordinates()).to.eql([
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
]);
});
@@ -277,49 +248,31 @@ describe('ol/geom/MultiLineString.js', function () {
describe('with extrapolation and interpolation', function () {
it('returns the expected value', function () {
expect(multiLineString.getCoordinateAtM(0, true, true)).to.eql([
1,
2,
0,
1, 2, 0,
]);
expect(multiLineString.getCoordinateAtM(3, true, true)).to.eql([
1,
2,
3,
1, 2, 3,
]);
expect(multiLineString.getCoordinateAtM(4.5, true, true)).to.eql([
2.5,
3.5,
4.5,
2.5, 3.5, 4.5,
]);
expect(multiLineString.getCoordinateAtM(6, true, true)).to.eql([
4,
5,
6,
4, 5, 6,
]);
expect(multiLineString.getCoordinateAtM(7.5, true, true)).to.eql([
5.5,
6.5,
7.5,
5.5, 6.5, 7.5,
]);
expect(multiLineString.getCoordinateAtM(9, true, true)).to.eql([
7,
8,
9,
7, 8, 9,
]);
expect(multiLineString.getCoordinateAtM(10.5, true, true)).to.eql([
8.5,
9.5,
10.5,
8.5, 9.5, 10.5,
]);
expect(multiLineString.getCoordinateAtM(12, true, true)).to.eql([
10,
11,
12,
10, 11, 12,
]);
expect(multiLineString.getCoordinateAtM(15, true, true)).to.eql([
10,
11,
15,
10, 11, 15,
]);
});
});
@@ -327,47 +280,31 @@ describe('ol/geom/MultiLineString.js', function () {
describe('with extrapolation and no interpolation', function () {
it('returns the expected value', function () {
expect(multiLineString.getCoordinateAtM(0, true, false)).to.eql([
1,
2,
0,
1, 2, 0,
]);
expect(multiLineString.getCoordinateAtM(3, true, false)).to.eql([
1,
2,
3,
1, 2, 3,
]);
expect(multiLineString.getCoordinateAtM(4.5, true, false)).to.eql([
2.5,
3.5,
4.5,
2.5, 3.5, 4.5,
]);
expect(multiLineString.getCoordinateAtM(6, true, false)).to.eql([
4,
5,
6,
4, 5, 6,
]);
expect(multiLineString.getCoordinateAtM(7.5, true, false)).to.be(
null
);
expect(multiLineString.getCoordinateAtM(9, true, false)).to.eql([
7,
8,
9,
7, 8, 9,
]);
expect(multiLineString.getCoordinateAtM(10.5, true, false)).to.eql([
8.5,
9.5,
10.5,
8.5, 9.5, 10.5,
]);
expect(multiLineString.getCoordinateAtM(12, true, false)).to.eql([
10,
11,
12,
10, 11, 12,
]);
expect(multiLineString.getCoordinateAtM(15, true, false)).to.eql([
10,
11,
15,
10, 11, 15,
]);
});
});
@@ -376,39 +313,25 @@ describe('ol/geom/MultiLineString.js', function () {
it('returns the expected value', function () {
expect(multiLineString.getCoordinateAtM(0, false, true)).to.eql(null);
expect(multiLineString.getCoordinateAtM(3, false, true)).to.eql([
1,
2,
3,
1, 2, 3,
]);
expect(multiLineString.getCoordinateAtM(4.5, false, true)).to.eql([
2.5,
3.5,
4.5,
2.5, 3.5, 4.5,
]);
expect(multiLineString.getCoordinateAtM(6, false, true)).to.eql([
4,
5,
6,
4, 5, 6,
]);
expect(multiLineString.getCoordinateAtM(7.5, false, true)).to.eql([
5.5,
6.5,
7.5,
5.5, 6.5, 7.5,
]);
expect(multiLineString.getCoordinateAtM(9, false, true)).to.eql([
7,
8,
9,
7, 8, 9,
]);
expect(multiLineString.getCoordinateAtM(10.5, false, true)).to.eql([
8.5,
9.5,
10.5,
8.5, 9.5, 10.5,
]);
expect(multiLineString.getCoordinateAtM(12, false, true)).to.eql([
10,
11,
12,
10, 11, 12,
]);
expect(multiLineString.getCoordinateAtM(15, false, true)).to.eql(
null
@@ -422,37 +345,25 @@ describe('ol/geom/MultiLineString.js', function () {
null
);
expect(multiLineString.getCoordinateAtM(3, false, false)).to.eql([
1,
2,
3,
1, 2, 3,
]);
expect(multiLineString.getCoordinateAtM(4.5, false, false)).to.eql([
2.5,
3.5,
4.5,
2.5, 3.5, 4.5,
]);
expect(multiLineString.getCoordinateAtM(6, false, false)).to.eql([
4,
5,
6,
4, 5, 6,
]);
expect(multiLineString.getCoordinateAtM(7.5, false, false)).to.eql(
null
);
expect(multiLineString.getCoordinateAtM(9, false, false)).to.eql([
7,
8,
9,
7, 8, 9,
]);
expect(multiLineString.getCoordinateAtM(10.5, false, false)).to.eql([
8.5,
9.5,
10.5,
8.5, 9.5, 10.5,
]);
expect(multiLineString.getCoordinateAtM(12, false, false)).to.eql([
10,
11,
12,
10, 11, 12,
]);
expect(multiLineString.getCoordinateAtM(15, false, false)).to.eql(
null
@@ -500,22 +411,7 @@ describe('ol/geom/MultiLineString.js', function () {
it('has the expected flat coordinates', function () {
expect(multiLineString.getFlatCoordinates()).to.eql([
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
]);
});
@@ -613,14 +509,7 @@ describe('ol/geom/MultiLineString.js', function () {
]);
const multiLineString = new MultiLineString([lineString1, lineString2]);
expect(multiLineString.getFlatCoordinates()).to.eql([
1,
2,
3,
4,
5,
6,
7,
8,
1, 2, 3, 4, 5, 6, 7, 8,
]);
expect(multiLineString.getEnds()).to.eql([4, 8]);
const coordinates = multiLineString.getCoordinates();

View File

@@ -438,46 +438,8 @@ describe('ol/geom/Polygon.js', function () {
];
polygon = new Polygon([outerRing, innerRing1, innerRing2]);
flatCoordinates = [
0,
6,
1,
2,
6,
6,
3,
4,
3,
0,
5,
6,
2,
4,
7,
8,
4,
4,
9,
10,
4,
5,
11,
12,
2,
5,
13,
14,
3,
2,
15,
16,
4,
3,
17,
18,
2,
3,
19,
20,
0, 6, 1, 2, 6, 6, 3, 4, 3, 0, 5, 6, 2, 4, 7, 8, 4, 4, 9, 10, 4, 5, 11,
12, 2, 5, 13, 14, 3, 2, 15, 16, 4, 3, 17, 18, 2, 3, 19, 20,
];
outsideOuter = [1, 1];
inside = [3, 1];

View File

@@ -89,206 +89,29 @@ describe('ol/geom/flat/closest.js', function () {
describe('with real data', function () {
const flatCoordinates = [
224.55,
250.15,
226.91,
244.19,
233.31,
241.45,
234.98,
236.06,
244.21,
232.76,
262.59,
215.31,
267.76,
213.81,
273.57,
201.84,
273.12,
192.16,
277.62,
189.03,
280.36,
181.41,
286.51,
177.74,
292.41,
159.37,
296.91,
155.64,
314.95,
151.37,
319.75,
145.16,
330.33,
137.57,
341.48,
139.96,
369.98,
137.89,
387.39,
142.51,
391.28,
139.39,
409.52,
141.14,
414.82,
139.75,
427.72,
127.3,
439.6,
119.74,
474.93,
107.87,
486.51,
106.75,
489.2,
109.45,
493.79,
108.63,
504.74,
119.66,
512.96,
122.35,
518.63,
120.89,
524.09,
126.88,
529.57,
127.86,
534.21,
140.93,
539.27,
147.24,
567.69,
148.91,
575.25,
157.26,
580.62,
158.15,
601.53,
156.85,
617.74,
159.86,
622.0,
167.04,
629.55,
194.6,
638.9,
195.61,
641.26,
200.81,
651.77,
204.56,
671.55,
222.55,
683.68,
217.45,
695.25,
219.15,
700.64,
217.98,
703.12,
214.36,
712.26,
215.87,
721.49,
212.81,
727.81,
213.36,
729.98,
208.73,
735.32,
208.2,
739.94,
204.77,
769.98,
208.42,
779.6,
216.87,
784.2,
218.16,
800.24,
214.62,
810.53,
219.73,
817.19,
226.82,
820.77,
236.17,
827.23,
236.16,
829.89,
239.89,
851.0,
248.94,
859.88,
255.49,
865.21,
268.53,
857.95,
280.3,
865.48,
291.45,
866.81,
298.66,
864.68,
302.71,
867.79,
306.17,
859.87,
311.37,
860.08,
314.35,
858.29,
314.94,
858.1,
327.6,
854.54,
335.4,
860.92,
343.0,
856.43,
350.15,
851.42,
352.96,
849.84,
359.59,
854.56,
365.53,
849.74,
370.38,
844.09,
371.89,
844.75,
380.44,
841.52,
383.67,
839.57,
390.4,
845.59,
399.05,
848.4,
407.55,
843.71,
411.3,
844.09,
419.88,
839.51,
432.76,
841.33,
441.04,
847.62,
449.22,
847.16,
458.44,
851.38,
462.79,
853.97,
471.15,
866.36,
480.77,
224.55, 250.15, 226.91, 244.19, 233.31, 241.45, 234.98, 236.06, 244.21,
232.76, 262.59, 215.31, 267.76, 213.81, 273.57, 201.84, 273.12, 192.16,
277.62, 189.03, 280.36, 181.41, 286.51, 177.74, 292.41, 159.37, 296.91,
155.64, 314.95, 151.37, 319.75, 145.16, 330.33, 137.57, 341.48, 139.96,
369.98, 137.89, 387.39, 142.51, 391.28, 139.39, 409.52, 141.14, 414.82,
139.75, 427.72, 127.3, 439.6, 119.74, 474.93, 107.87, 486.51, 106.75,
489.2, 109.45, 493.79, 108.63, 504.74, 119.66, 512.96, 122.35, 518.63,
120.89, 524.09, 126.88, 529.57, 127.86, 534.21, 140.93, 539.27, 147.24,
567.69, 148.91, 575.25, 157.26, 580.62, 158.15, 601.53, 156.85, 617.74,
159.86, 622.0, 167.04, 629.55, 194.6, 638.9, 195.61, 641.26, 200.81,
651.77, 204.56, 671.55, 222.55, 683.68, 217.45, 695.25, 219.15, 700.64,
217.98, 703.12, 214.36, 712.26, 215.87, 721.49, 212.81, 727.81, 213.36,
729.98, 208.73, 735.32, 208.2, 739.94, 204.77, 769.98, 208.42, 779.6,
216.87, 784.2, 218.16, 800.24, 214.62, 810.53, 219.73, 817.19, 226.82,
820.77, 236.17, 827.23, 236.16, 829.89, 239.89, 851.0, 248.94, 859.88,
255.49, 865.21, 268.53, 857.95, 280.3, 865.48, 291.45, 866.81, 298.66,
864.68, 302.71, 867.79, 306.17, 859.87, 311.37, 860.08, 314.35, 858.29,
314.94, 858.1, 327.6, 854.54, 335.4, 860.92, 343.0, 856.43, 350.15,
851.42, 352.96, 849.84, 359.59, 854.56, 365.53, 849.74, 370.38, 844.09,
371.89, 844.75, 380.44, 841.52, 383.67, 839.57, 390.4, 845.59, 399.05,
848.4, 407.55, 843.71, 411.3, 844.09, 419.88, 839.51, 432.76, 841.33,
441.04, 847.62, 449.22, 847.16, 458.44, 851.38, 462.79, 853.97, 471.15,
866.36, 480.77,
];
describe('maxSquaredDelta', function () {

View File

@@ -5,26 +5,7 @@ describe('ol/geom/flat/contains.js', function () {
describe('with simple data', function () {
const flatCoordinatesSimple = [0, 0, 1, 0, 1, 1, 0, 1];
const flatCoordinatesNonSimple = [
0,
0,
4,
0,
4,
3,
1,
3,
1,
2,
3,
2,
3,
1,
2,
1,
2,
4,
0,
4,
0, 0, 4, 0, 4, 3, 1, 3, 1, 2, 3, 2, 3, 1, 2, 1, 2, 4, 0, 4,
];
describe('linearRingContainsXY', function () {

View File

@@ -144,32 +144,8 @@ describe('ol/geom/flat/intersectsextent.js', function () {
let ends;
beforeEach(function () {
flatCoordinates = [
0,
0,
0,
10,
10,
10,
10,
0,
0,
0,
/*hole*/ 2,
2,
8,
2,
8,
4,
5,
5,
8,
6,
8,
8,
2,
8,
2,
2,
0, 0, 0, 10, 10, 10, 10, 0, 0, 0, /*hole*/ 2, 2, 8, 2, 8, 4, 5, 5, 8, 6,
8, 8, 2, 8, 2, 2,
];
ends = [10, flatCoordinates.length];
});

View File

@@ -91,49 +91,13 @@ describe('ol/geom/flat/orient.js', function () {
const oriented = linearRingsAreOriented;
const rightCoords = [
-180,
-90,
180,
-90,
180,
90,
-180,
90,
-180,
-90,
-100,
-45,
-100,
45,
100,
45,
100,
-45,
-100,
-45,
-180, -90, 180, -90, 180, 90, -180, 90, -180, -90, -100, -45, -100, 45,
100, 45, 100, -45, -100, -45,
];
const leftCoords = [
-180,
-90,
-180,
90,
180,
90,
180,
-90,
-180,
-90,
-100,
-45,
100,
-45,
100,
45,
-100,
45,
-100,
-45,
-180, -90, -180, 90, 180, 90, 180, -90, -180, -90, -100, -45, 100, -45,
100, 45, -100, 45, -100, -45,
];
const ends = [10, 20];
@@ -153,89 +117,15 @@ describe('ol/geom/flat/orient.js', function () {
const oriented = linearRingssAreOriented;
const rightCoords = [
-180,
-90,
180,
-90,
180,
90,
-180,
90,
-180,
-90,
-100,
-45,
-100,
45,
100,
45,
100,
-45,
-100,
-45,
-180,
-90,
180,
-90,
180,
90,
-180,
90,
-180,
-90,
-100,
-45,
-100,
45,
100,
45,
100,
-45,
-100,
-45,
-180, -90, 180, -90, 180, 90, -180, 90, -180, -90, -100, -45, -100, 45,
100, 45, 100, -45, -100, -45, -180, -90, 180, -90, 180, 90, -180, 90,
-180, -90, -100, -45, -100, 45, 100, 45, 100, -45, -100, -45,
];
const leftCoords = [
-180,
-90,
-180,
90,
180,
90,
180,
-90,
-180,
-90,
-100,
-45,
100,
-45,
100,
45,
-100,
45,
-100,
-45,
-180,
-90,
-180,
90,
180,
90,
180,
-90,
-180,
-90,
-100,
-45,
100,
-45,
100,
45,
-100,
45,
-100,
-45,
-180, -90, -180, 90, 180, 90, 180, -90, -180, -90, -100, -45, 100, -45,
100, 45, -100, 45, -100, -45, -180, -90, -180, 90, 180, 90, 180, -90,
-180, -90, -100, -45, 100, -45, 100, 45, -100, 45, -100, -45,
];
const ends = [
@@ -258,49 +148,13 @@ describe('ol/geom/flat/orient.js', function () {
const orient = orientLinearRings;
const rightCoords = [
-180,
-90,
180,
-90,
180,
90,
-180,
90,
-180,
-90,
-100,
-45,
-100,
45,
100,
45,
100,
-45,
-100,
-45,
-180, -90, 180, -90, 180, 90, -180, 90, -180, -90, -100, -45, -100, 45,
100, 45, 100, -45, -100, -45,
];
const leftCoords = [
-180,
-90,
-180,
90,
180,
90,
180,
-90,
-180,
-90,
-100,
-45,
100,
-45,
100,
45,
-100,
45,
-100,
-45,
-180, -90, -180, 90, 180, 90, 180, -90, -180, -90, -100, -45, 100, -45,
100, 45, -100, 45, -100, -45,
];
const ends = [10, 20];
@@ -330,89 +184,15 @@ describe('ol/geom/flat/orient.js', function () {
const orient = orientLinearRingsArray;
const rightCoords = [
-180,
-90,
180,
-90,
180,
90,
-180,
90,
-180,
-90,
-100,
-45,
-100,
45,
100,
45,
100,
-45,
-100,
-45,
-180,
-90,
180,
-90,
180,
90,
-180,
90,
-180,
-90,
-100,
-45,
-100,
45,
100,
45,
100,
-45,
-100,
-45,
-180, -90, 180, -90, 180, 90, -180, 90, -180, -90, -100, -45, -100, 45,
100, 45, 100, -45, -100, -45, -180, -90, 180, -90, 180, 90, -180, 90,
-180, -90, -100, -45, -100, 45, 100, 45, 100, -45, -100, -45,
];
const leftCoords = [
-180,
-90,
-180,
90,
180,
90,
180,
-90,
-180,
-90,
-100,
-45,
100,
-45,
100,
45,
-100,
45,
-100,
-45,
-180,
-90,
-180,
90,
180,
90,
180,
-90,
-180,
-90,
-100,
-45,
100,
-45,
100,
45,
-100,
45,
-100,
-45,
-180, -90, -180, 90, 180, 90, 180, -90, -180, -90, -100, -45, 100, -45,
100, 45, -100, 45, -100, -45, -180, -90, -180, 90, 180, 90, 180, -90,
-180, -90, -100, -45, 100, -45, 100, 45, -100, 45, -100, -45,
];
const ends = [

View File

@@ -94,41 +94,11 @@ describe('ol/geom/flat/reverse.js', function () {
it('can reverse four flat coordinates', function () {
const flatCoordinates = [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
];
reverseCoordinates(flatCoordinates, 0, flatCoordinates.length, 4);
expect(flatCoordinates).to.eql([
13,
14,
15,
16,
9,
10,
11,
12,
5,
6,
7,
8,
1,
2,
3,
4,
13, 14, 15, 16, 9, 10, 11, 12, 5, 6, 7, 8, 1, 2, 3, 4,
]);
});
});

View File

@@ -8,529 +8,74 @@ import {
describe('ol/geom/flat/simplify.js', function () {
const flatCoordinates = [
224.55,
250.15,
226.91,
244.19,
233.31,
241.45,
234.98,
236.06,
244.21,
232.76,
262.59,
215.31,
267.76,
213.81,
273.57,
201.84,
273.12,
192.16,
277.62,
189.03,
280.36,
181.41,
286.51,
177.74,
292.41,
159.37,
296.91,
155.64,
314.95,
151.37,
319.75,
145.16,
330.33,
137.57,
341.48,
139.96,
369.98,
137.89,
387.39,
142.51,
391.28,
139.39,
409.52,
141.14,
414.82,
139.75,
427.72,
127.3,
439.6,
119.74,
474.93,
107.87,
486.51,
106.75,
489.2,
109.45,
493.79,
108.63,
504.74,
119.66,
512.96,
122.35,
518.63,
120.89,
524.09,
126.88,
529.57,
127.86,
534.21,
140.93,
539.27,
147.24,
567.69,
148.91,
575.25,
157.26,
580.62,
158.15,
601.53,
156.85,
617.74,
159.86,
622.0,
167.04,
629.55,
194.6,
638.9,
195.61,
641.26,
200.81,
651.77,
204.56,
671.55,
222.55,
683.68,
217.45,
695.25,
219.15,
700.64,
217.98,
703.12,
214.36,
712.26,
215.87,
721.49,
212.81,
727.81,
213.36,
729.98,
208.73,
735.32,
208.2,
739.94,
204.77,
769.98,
208.42,
779.6,
216.87,
784.2,
218.16,
800.24,
214.62,
810.53,
219.73,
817.19,
226.82,
820.77,
236.17,
827.23,
236.16,
829.89,
239.89,
851.0,
248.94,
859.88,
255.49,
865.21,
268.53,
857.95,
280.3,
865.48,
291.45,
866.81,
298.66,
864.68,
302.71,
867.79,
306.17,
859.87,
311.37,
860.08,
314.35,
858.29,
314.94,
858.1,
327.6,
854.54,
335.4,
860.92,
343.0,
856.43,
350.15,
851.42,
352.96,
849.84,
359.59,
854.56,
365.53,
849.74,
370.38,
844.09,
371.89,
844.75,
380.44,
841.52,
383.67,
839.57,
390.4,
845.59,
399.05,
848.4,
407.55,
843.71,
411.3,
844.09,
419.88,
839.51,
432.76,
841.33,
441.04,
847.62,
449.22,
847.16,
458.44,
851.38,
462.79,
853.97,
471.15,
866.36,
480.77,
224.55, 250.15, 226.91, 244.19, 233.31, 241.45, 234.98, 236.06, 244.21,
232.76, 262.59, 215.31, 267.76, 213.81, 273.57, 201.84, 273.12, 192.16,
277.62, 189.03, 280.36, 181.41, 286.51, 177.74, 292.41, 159.37, 296.91,
155.64, 314.95, 151.37, 319.75, 145.16, 330.33, 137.57, 341.48, 139.96,
369.98, 137.89, 387.39, 142.51, 391.28, 139.39, 409.52, 141.14, 414.82,
139.75, 427.72, 127.3, 439.6, 119.74, 474.93, 107.87, 486.51, 106.75, 489.2,
109.45, 493.79, 108.63, 504.74, 119.66, 512.96, 122.35, 518.63, 120.89,
524.09, 126.88, 529.57, 127.86, 534.21, 140.93, 539.27, 147.24, 567.69,
148.91, 575.25, 157.26, 580.62, 158.15, 601.53, 156.85, 617.74, 159.86,
622.0, 167.04, 629.55, 194.6, 638.9, 195.61, 641.26, 200.81, 651.77, 204.56,
671.55, 222.55, 683.68, 217.45, 695.25, 219.15, 700.64, 217.98, 703.12,
214.36, 712.26, 215.87, 721.49, 212.81, 727.81, 213.36, 729.98, 208.73,
735.32, 208.2, 739.94, 204.77, 769.98, 208.42, 779.6, 216.87, 784.2, 218.16,
800.24, 214.62, 810.53, 219.73, 817.19, 226.82, 820.77, 236.17, 827.23,
236.16, 829.89, 239.89, 851.0, 248.94, 859.88, 255.49, 865.21, 268.53,
857.95, 280.3, 865.48, 291.45, 866.81, 298.66, 864.68, 302.71, 867.79,
306.17, 859.87, 311.37, 860.08, 314.35, 858.29, 314.94, 858.1, 327.6,
854.54, 335.4, 860.92, 343.0, 856.43, 350.15, 851.42, 352.96, 849.84,
359.59, 854.56, 365.53, 849.74, 370.38, 844.09, 371.89, 844.75, 380.44,
841.52, 383.67, 839.57, 390.4, 845.59, 399.05, 848.4, 407.55, 843.71, 411.3,
844.09, 419.88, 839.51, 432.76, 841.33, 441.04, 847.62, 449.22, 847.16,
458.44, 851.38, 462.79, 853.97, 471.15, 866.36, 480.77,
];
const simplifiedRadiallyFlatCoordinates = [
224.55,
250.15,
226.91,
244.19,
233.31,
241.45,
234.98,
236.06,
244.21,
232.76,
262.59,
215.31,
267.76,
213.81,
273.57,
201.84,
273.12,
192.16,
277.62,
189.03,
280.36,
181.41,
286.51,
177.74,
292.41,
159.37,
296.91,
155.64,
314.95,
151.37,
319.75,
145.16,
330.33,
137.57,
341.48,
139.96,
369.98,
137.89,
387.39,
142.51,
409.52,
141.14,
414.82,
139.75,
427.72,
127.3,
439.6,
119.74,
474.93,
107.87,
486.51,
106.75,
493.79,
108.63,
504.74,
119.66,
512.96,
122.35,
518.63,
120.89,
524.09,
126.88,
529.57,
127.86,
534.21,
140.93,
539.27,
147.24,
567.69,
148.91,
575.25,
157.26,
580.62,
158.15,
601.53,
156.85,
617.74,
159.86,
622.0,
167.04,
629.55,
194.6,
638.9,
195.61,
641.26,
200.81,
651.77,
204.56,
671.55,
222.55,
683.68,
217.45,
695.25,
219.15,
700.64,
217.98,
712.26,
215.87,
721.49,
212.81,
727.81,
213.36,
729.98,
208.73,
735.32,
208.2,
739.94,
204.77,
769.98,
208.42,
779.6,
216.87,
800.24,
214.62,
810.53,
219.73,
817.19,
226.82,
820.77,
236.17,
827.23,
236.16,
851.0,
248.94,
859.88,
255.49,
865.21,
268.53,
857.95,
280.3,
865.48,
291.45,
866.81,
298.66,
867.79,
306.17,
859.87,
311.37,
858.1,
327.6,
854.54,
335.4,
860.92,
343.0,
856.43,
350.15,
851.42,
352.96,
849.84,
359.59,
854.56,
365.53,
849.74,
370.38,
844.09,
371.89,
844.75,
380.44,
839.57,
390.4,
845.59,
399.05,
848.4,
407.55,
843.71,
411.3,
844.09,
419.88,
839.51,
432.76,
841.33,
441.04,
847.62,
449.22,
847.16,
458.44,
851.38,
462.79,
853.97,
471.15,
866.36,
224.55, 250.15, 226.91, 244.19, 233.31, 241.45, 234.98, 236.06, 244.21,
232.76, 262.59, 215.31, 267.76, 213.81, 273.57, 201.84, 273.12, 192.16,
277.62, 189.03, 280.36, 181.41, 286.51, 177.74, 292.41, 159.37, 296.91,
155.64, 314.95, 151.37, 319.75, 145.16, 330.33, 137.57, 341.48, 139.96,
369.98, 137.89, 387.39, 142.51, 409.52, 141.14, 414.82, 139.75, 427.72,
127.3, 439.6, 119.74, 474.93, 107.87, 486.51, 106.75, 493.79, 108.63,
504.74, 119.66, 512.96, 122.35, 518.63, 120.89, 524.09, 126.88, 529.57,
127.86, 534.21, 140.93, 539.27, 147.24, 567.69, 148.91, 575.25, 157.26,
580.62, 158.15, 601.53, 156.85, 617.74, 159.86, 622.0, 167.04, 629.55,
194.6, 638.9, 195.61, 641.26, 200.81, 651.77, 204.56, 671.55, 222.55,
683.68, 217.45, 695.25, 219.15, 700.64, 217.98, 712.26, 215.87, 721.49,
212.81, 727.81, 213.36, 729.98, 208.73, 735.32, 208.2, 739.94, 204.77,
769.98, 208.42, 779.6, 216.87, 800.24, 214.62, 810.53, 219.73, 817.19,
226.82, 820.77, 236.17, 827.23, 236.16, 851.0, 248.94, 859.88, 255.49,
865.21, 268.53, 857.95, 280.3, 865.48, 291.45, 866.81, 298.66, 867.79,
306.17, 859.87, 311.37, 858.1, 327.6, 854.54, 335.4, 860.92, 343.0, 856.43,
350.15, 851.42, 352.96, 849.84, 359.59, 854.56, 365.53, 849.74, 370.38,
844.09, 371.89, 844.75, 380.44, 839.57, 390.4, 845.59, 399.05, 848.4,
407.55, 843.71, 411.3, 844.09, 419.88, 839.51, 432.76, 841.33, 441.04,
847.62, 449.22, 847.16, 458.44, 851.38, 462.79, 853.97, 471.15, 866.36,
480.77,
];
const simplifiedFlatCoordinates = [
224.55,
250.15,
267.76,
213.81,
296.91,
155.64,
330.33,
137.57,
409.52,
141.14,
439.6,
119.74,
486.51,
106.75,
529.57,
127.86,
539.27,
147.24,
617.74,
159.86,
629.55,
194.6,
671.55,
222.55,
727.81,
213.36,
739.94,
204.77,
769.98,
208.42,
779.6,
216.87,
800.24,
214.62,
820.77,
236.17,
859.88,
255.49,
865.21,
268.53,
857.95,
280.3,
867.79,
306.17,
859.87,
311.37,
854.54,
335.4,
860.92,
343.0,
849.84,
359.59,
854.56,
365.53,
844.09,
371.89,
839.57,
390.4,
848.4,
407.55,
839.51,
432.76,
853.97,
471.15,
866.36,
480.77,
224.55, 250.15, 267.76, 213.81, 296.91, 155.64, 330.33, 137.57, 409.52,
141.14, 439.6, 119.74, 486.51, 106.75, 529.57, 127.86, 539.27, 147.24,
617.74, 159.86, 629.55, 194.6, 671.55, 222.55, 727.81, 213.36, 739.94,
204.77, 769.98, 208.42, 779.6, 216.87, 800.24, 214.62, 820.77, 236.17,
859.88, 255.49, 865.21, 268.53, 857.95, 280.3, 867.79, 306.17, 859.87,
311.37, 854.54, 335.4, 860.92, 343.0, 849.84, 359.59, 854.56, 365.53,
844.09, 371.89, 839.57, 390.4, 848.4, 407.55, 839.51, 432.76, 853.97,
471.15, 866.36, 480.77,
];
const simplifiedHighQualityFlatCoordinates = [
224.55,
250.15,
267.76,
213.81,
296.91,
155.64,
330.33,
137.57,
409.52,
141.14,
439.6,
119.74,
486.51,
106.75,
529.57,
127.86,
539.27,
147.24,
617.74,
159.86,
629.55,
194.6,
671.55,
222.55,
727.81,
213.36,
739.94,
204.77,
769.98,
208.42,
784.2,
218.16,
800.24,
214.62,
820.77,
236.17,
859.88,
255.49,
865.21,
268.53,
857.95,
280.3,
867.79,
306.17,
858.29,
314.94,
854.54,
335.4,
860.92,
343.0,
849.84,
359.59,
854.56,
365.53,
844.09,
371.89,
839.57,
390.4,
848.4,
407.55,
839.51,
432.76,
853.97,
471.15,
866.36,
480.77,
224.55, 250.15, 267.76, 213.81, 296.91, 155.64, 330.33, 137.57, 409.52,
141.14, 439.6, 119.74, 486.51, 106.75, 529.57, 127.86, 539.27, 147.24,
617.74, 159.86, 629.55, 194.6, 671.55, 222.55, 727.81, 213.36, 739.94,
204.77, 769.98, 208.42, 784.2, 218.16, 800.24, 214.62, 820.77, 236.17,
859.88, 255.49, 865.21, 268.53, 857.95, 280.3, 867.79, 306.17, 858.29,
314.94, 854.54, 335.4, 860.92, 343.0, 849.84, 359.59, 854.56, 365.53,
844.09, 371.89, 839.57, 390.4, 848.4, 407.55, 839.51, 432.76, 853.97,
471.15, 866.36, 480.77,
];
describe('simplifyLineString', function () {

View File

@@ -35,24 +35,7 @@ describe('ol/geom/flat/straightchunk.js', function () {
describe('longer line string', function () {
const flatCoords = [
0,
0,
1,
0,
1,
1,
0,
1,
0,
-1,
-1,
-1,
-1,
0,
-1,
2,
-2,
4,
0, 0, 1, 0, 1, 1, 0, 1, 0, -1, -1, -1, -1, 0, -1, 2, -2, 4,
];
const stride = 2;

View File

@@ -32,11 +32,7 @@ describe('ol/geom/flat/transform.js', function () {
],
]).transform('EPSG:4326', 'EPSG:3857');
const transform = [
0.0004088332670837288,
0,
0,
-0.0004088332670837288,
4480.991370439071,
0.0004088332670837288, 0, 0, -0.0004088332670837288, 4480.991370439071,
1529.5752568707105,
];
const pixelCoordinates = transformGeom2D(
@@ -112,36 +108,8 @@ describe('ol/geom/flat/transform.js', function () {
flatCoordinates
);
expect(flatCoordinates).to.eql([
1,
2,
2,
1,
3,
2,
2,
3,
2,
2,
2,
2,
1,
2,
2,
3,
4,
3,
3,
5,
3,
4,
5,
3,
4,
4,
3,
3,
4,
3,
1, 2, 2, 1, 3, 2, 2, 3, 2, 2, 2, 2, 1, 2, 2, 3, 4, 3, 3, 5, 3, 4, 5, 3,
4, 4, 3, 3, 4, 3,
]);
});
});