@@ -462,10 +462,11 @@ - (void)testExternalHole {
462
462
463
463
- (void )testLargeSimple {
464
464
465
- double increment = .01 ;
466
- double radius = 1250 ;
465
+ double increment = .07 ;
466
+ double radius = 127 ;
467
467
double x = -radius + increment;
468
468
double y = 0 ;
469
+ int expectedPoints = 7256 ;
469
470
470
471
NSMutableArray <SFPoint *> *points = [NSMutableArray array ];
471
472
@@ -495,17 +496,18 @@ - (void)testLargeSimple {
495
496
[SFTestUtils assertTrue: [SFShamosHoey simplePolygon: [SFPolygon polygonWithRing: [SFLineString lineStringWithPoints: points]]]];
496
497
[SFTestUtils assertTrue: [[SFLineString lineStringWithPoints: points] isSimple ]];
497
498
[SFTestUtils assertTrue: [[SFPolygon polygonWithRing: [SFLineString lineStringWithPoints: points]] isSimple ]];
498
- [SFTestUtils assertEqualIntWithValue: ( int ) (radius / increment * 4 ) andValue2: (int )points.count];
499
+ [SFTestUtils assertEqualIntWithValue: expectedPoints andValue2: (int )points.count];
499
500
500
501
}
501
502
502
503
- (void )testLargeNonSimple {
503
504
504
- double increment = .01 ;
505
- double radius = 1250 ;
505
+ double increment = .07 ;
506
+ double radius = 127 ;
506
507
double x = -radius + increment;
507
508
double y = 0 ;
508
-
509
+ int expectedPoints = 7257 ;
510
+
509
511
NSMutableArray <SFPoint *> *points = [NSMutableArray array ];
510
512
511
513
while (x <= radius) {
@@ -538,7 +540,7 @@ - (void)testLargeNonSimple {
538
540
[SFTestUtils assertFalse: [SFShamosHoey simplePolygon: [SFPolygon polygonWithRing: [SFLineString lineStringWithPoints: points]]]];
539
541
[SFTestUtils assertFalse: [[SFLineString lineStringWithPoints: points] isSimple ]];
540
542
[SFTestUtils assertFalse: [[SFPolygon polygonWithRing: [SFLineString lineStringWithPoints: points]] isSimple ]];
541
- [SFTestUtils assertEqualIntWithValue: 1 + ( int ) (radius / increment * 4 ) andValue2: (int )points.count];
543
+ [SFTestUtils assertEqualIntWithValue: expectedPoints andValue2: (int )points.count];
542
544
543
545
[points removeObjectAtIndex: invalidIndex];
544
546
previousPoint = [points objectAtIndex: points.count - 3 ];
@@ -549,7 +551,7 @@ - (void)testLargeNonSimple {
549
551
[SFTestUtils assertFalse: [SFShamosHoey simplePolygon: [SFPolygon polygonWithRing: [SFLineString lineStringWithPoints: points]]]];
550
552
[SFTestUtils assertFalse: [[SFLineString lineStringWithPoints: points] isSimple ]];
551
553
[SFTestUtils assertFalse: [[SFPolygon polygonWithRing: [SFLineString lineStringWithPoints: points]] isSimple ]];
552
- [SFTestUtils assertEqualIntWithValue: 1 + ( int ) (radius / increment * 4 ) andValue2: (int )points.count];
554
+ [SFTestUtils assertEqualIntWithValue: expectedPoints andValue2: (int )points.count];
553
555
554
556
}
555
557
0 commit comments