CrEOF\Spatial\Tests\PHP\Types\Geometry\PointTest::testGoodStringPoints PHP Method

testGoodStringPoints() public method

    public function testGoodStringPoints()
    {
        $point2 = new Point('79:56:55W', '40:26:46N');
        $this->assertEquals(40.446111111111, $point2->getLatitude());
        $this->assertEquals(-79.94861111111101, $point2->getLongitude());
        $point3 = new Point('79°56\'55"W', '40°26\'46"N');
        $this->assertEquals(40.446111111111, $point3->getLatitude());
        $this->assertEquals(-79.94861111111101, $point3->getLongitude());
        $point4 = new Point('79° 56\' 55" W', '40° 26\' 46" N');
        $this->assertEquals(40.446111111111, $point4->getLatitude());
        $this->assertEquals(-79.94861111111101, $point4->getLongitude());
        $point5 = new Point('79°56′55″W', '40°26′46″N');
        $this->assertEquals(40.446111111111, $point5->getLatitude());
        $this->assertEquals(-79.94861111111101, $point5->getLongitude());
        $point6 = new Point('79° 56′ 55″ W', '40° 26′ 46″ N');
        $this->assertEquals(40.446111111111, $point6->getLatitude());
        $this->assertEquals(-79.94861111111101, $point6->getLongitude());
        $point7 = new Point('79:56:55.832W', '40:26:46.543N');
        $this->assertEquals(40.446261944444, $point7->getLatitude());
        $this->assertEquals(-79.948842222222, $point7->getLongitude());
        $point8 = new Point('112:4:0W', '33:27:0N');
        $this->assertEquals(33.45, $point8->getLatitude());
        $this->assertEquals(-112.06666666667, $point8->getLongitude());
    }