Пример #1
0
    /**
     * test getShape method
     *
     * @return void
     */
    public function testGetShape()
    {
        $row_data = array(
            'numparts' => 2,
            'parts'    => array(
                0 => array(
                    'points' => array(
                        0 => array('x' => 5.02, 'y' => 8.45),
                        1 => array('x' => 6.14, 'y' => 0.15),
                    ),
                ),
                1 => array(
                    'points' => array(
                        0 => array('x' => 1.23, 'y' => 4.25),
                        1 => array('x' => 9.15, 'y' => 0.47),
                    ),
                ),
            ),
        );

        $this->assertEquals(
            $this->object->getShape($row_data),
            'MULTILINESTRING((5.02 8.45,6.14 0.15),(1.23 4.25,9.15 0.47))'
        );
    }