PHP Class Location\PolygonTest

Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: mjaschen/phpgeo

Méthodes publiques

Méthode Description
testGetReverseWorksAsExpected ( )
testIfAddPointsWorksAsExpected ( )
testIfContainsPointCheckWithLatitudeSignSwitchWorksAsExpected ( )
testIfContainsPointCheckWithLongitudeSignSwitchWorksAsExpected ( )
testIfContainsPointCheckWorksAsExpected ( )
testIfGetLatsWorksAsExpected ( )
testIfGetLngsWorksAsExpected ( )
testIfGetNumberOfPointsWorksAsExpected ( )
testIfGetSegmentsWorksAsExpected ( )
testIfNotContainsPointCheckWithWorksAsExpected ( )
testIfPerimeterCalculationWorksAsExpected ( ) * public function testIfContainsPointCheckWithLongitudesCrossingThe180thMeridianWorksAsExpected() { $polygon = new Polygon(); $polygon->addPoint(new Coordinate(10, 150)); $polygon->addPoint(new Coordinate(10, -150)); $polygon->addPoint(new Coordinate(30, -150)); $polygon->addPoint(new Coordinate(30, 150));
testIfPolygonContainsGeometryWithLineInsideAndOutsideWorksAsExpected ( )
testIfPolygonContainsGeometryWithLineInsideWorksAsExpected ( )
testIfPolygonContainsGeometryWithLineOutsideWorksAsExpected ( )
testIfPolygonContainsGeometryWithPointInsideWorksAsExpected ( )
testIfPolygonContainsGeometryWithPointOutsideWorksAsExpected ( )
testIfPolygonContainsGeometryWithPolygonInsideAndOutsideWorksAsExpected ( )
testIfPolygonContainsGeometryWithPolygonInsideWorksAsExpected ( ) * public function testIfAreaCalculationWorksAsExpected() { $polygon = new Polygon(); $polygon->addPoint(new Coordinate(52, 13)); $polygon->addPoint(new Coordinate(53, 13)); $polygon->addPoint(new Coordinate(53, 12)); $polygon->addPoint(new Coordinate(52, 12));
testIfPolygonContainsGeometryWithPolygonOutsideWorksAsExpected ( )
testIfPolygonContainsGeometryWithPolylineInsideAndOutsideWorksAsExpected ( )
testIfPolygonContainsGeometryWithPolylineInsideWorksAsExpected ( )
testIfPolygonContainsGeometryWithPolylineOutsideWorksAsExpected ( )
testReverseTwiceWorksAsExpected ( )

Method Details

testGetReverseWorksAsExpected() public méthode

testIfAddPointsWorksAsExpected() public méthode

testIfContainsPointCheckWithLatitudeSignSwitchWorksAsExpected() public méthode

testIfContainsPointCheckWithLongitudeSignSwitchWorksAsExpected() public méthode

testIfContainsPointCheckWorksAsExpected() public méthode

testIfGetLatsWorksAsExpected() public méthode

testIfGetLngsWorksAsExpected() public méthode

testIfGetNumberOfPointsWorksAsExpected() public méthode

testIfGetSegmentsWorksAsExpected() public méthode

testIfNotContainsPointCheckWithWorksAsExpected() public méthode

testIfPerimeterCalculationWorksAsExpected() public méthode

$point = new Coordinate(20, 160); $this->assertTrue($polygon->contains($point)); $point = new Coordinate(20, -160); $this->assertTrue($polygon->contains($point)); }

testIfPolygonContainsGeometryWithLineInsideAndOutsideWorksAsExpected() public méthode

testIfPolygonContainsGeometryWithLineInsideWorksAsExpected() public méthode

testIfPolygonContainsGeometryWithLineOutsideWorksAsExpected() public méthode

testIfPolygonContainsGeometryWithPointInsideWorksAsExpected() public méthode

testIfPolygonContainsGeometryWithPointOutsideWorksAsExpected() public méthode

testIfPolygonContainsGeometryWithPolygonInsideAndOutsideWorksAsExpected() public méthode

testIfPolygonContainsGeometryWithPolygonInsideWorksAsExpected() public méthode

http://geographiclib.sourceforge.net/cgi-bin/Planimeter?type=polygon&rhumb=geodesic&input=52.00000000000000000+13.00000000000000000%0D%0A53.00000000000000000+13.00000000000000000%0D%0A53.00000000000000000+12.00000000000000000%0D%0A52.00000000000000000+12.00000000000000000&norm=decdegrees&option=Submit $this->assertEquals(7556565706.2, $polygon->getArea(), 0.01); }

testIfPolygonContainsGeometryWithPolygonOutsideWorksAsExpected() public méthode

testIfPolygonContainsGeometryWithPolylineInsideAndOutsideWorksAsExpected() public méthode

testIfPolygonContainsGeometryWithPolylineInsideWorksAsExpected() public méthode

testIfPolygonContainsGeometryWithPolylineOutsideWorksAsExpected() public méthode

testReverseTwiceWorksAsExpected() public méthode