PHP 클래스 Location\PolygonTest

상속: extends PHPUnit_Framework_TestCase
파일 보기 프로젝트 열기: mjaschen/phpgeo

공개 메소드들

메소드 설명
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 ( )

메소드 상세

testGetReverseWorksAsExpected() 공개 메소드

testIfAddPointsWorksAsExpected() 공개 메소드

testIfContainsPointCheckWithLatitudeSignSwitchWorksAsExpected() 공개 메소드

testIfContainsPointCheckWithLongitudeSignSwitchWorksAsExpected() 공개 메소드

testIfContainsPointCheckWorksAsExpected() 공개 메소드

testIfGetLatsWorksAsExpected() 공개 메소드

testIfGetLngsWorksAsExpected() 공개 메소드

testIfGetNumberOfPointsWorksAsExpected() 공개 메소드

testIfGetSegmentsWorksAsExpected() 공개 메소드

testIfNotContainsPointCheckWithWorksAsExpected() 공개 메소드

testIfPerimeterCalculationWorksAsExpected() 공개 메소드

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

testIfPolygonContainsGeometryWithLineInsideAndOutsideWorksAsExpected() 공개 메소드

testIfPolygonContainsGeometryWithLineInsideWorksAsExpected() 공개 메소드

testIfPolygonContainsGeometryWithLineOutsideWorksAsExpected() 공개 메소드

testIfPolygonContainsGeometryWithPointInsideWorksAsExpected() 공개 메소드

testIfPolygonContainsGeometryWithPointOutsideWorksAsExpected() 공개 메소드

testIfPolygonContainsGeometryWithPolygonInsideAndOutsideWorksAsExpected() 공개 메소드

testIfPolygonContainsGeometryWithPolygonInsideWorksAsExpected() 공개 메소드

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() 공개 메소드

testIfPolygonContainsGeometryWithPolylineInsideAndOutsideWorksAsExpected() 공개 메소드

testIfPolygonContainsGeometryWithPolylineInsideWorksAsExpected() 공개 메소드

testIfPolygonContainsGeometryWithPolylineOutsideWorksAsExpected() 공개 메소드

testReverseTwiceWorksAsExpected() 공개 메소드