PHP Класс Tdt\Core\Formatters\GEOJSONFormatter

Автор: Jan Vansteenlandt ([email protected])
Наследование: implements Tdt\Core\Formatters\IFormatter
Показать файл Открыть проект

Открытые методы

Метод Описание
boundingBox ( $features ) : array Returns an array of n*2 numbers, where n is the maximum dimension of each coordinate present in the dataset. The first n numbers are the lower bounds of each dimension, the latter n numbers are the upper bounds of each dimension.
convertCoordinateArray ( $str ) : array
convertCoordinateMultiArray ( $str ) : array
convertCoordinateSingleArray ( $str ) : array
createResponse ( $dataObj )
findGeometry ( array $geo, array $dataRow ) : array
getBody ( $dataObj )
getDocumentation ( )
toCoordinateList ( $coordinates_array, &$out ) Converts a coordinate array of a feature of any type to an array containing all used coordinates. Each coordinate is represented by an array of numbers, with one number for each dimension.

Описание методов

boundingBox() публичный статический Метод

Returns an array of n*2 numbers, where n is the maximum dimension of each coordinate present in the dataset. The first n numbers are the lower bounds of each dimension, the latter n numbers are the upper bounds of each dimension.
public static boundingBox ( $features ) : array
$features array features for which to calculate the bounds
Результат array

convertCoordinateArray() публичный статический Метод

public static convertCoordinateArray ( $str ) : array
$str string eg: "1.1,2.2 3.3,4.4"
Результат array eg: ((1.1, 2.2), (3.3, 4.4))

convertCoordinateMultiArray() публичный статический Метод

public static convertCoordinateMultiArray ( $str ) : array
$str string eg: "1.1,2.2 3.3,4.4; 5.5,6.6 7.7,8.8"
Результат array eg: (((1.1, 2.2), (3.3, 4.4)), ((5.5, 6.6), (7.7, 8.8))

convertCoordinateSingleArray() публичный статический Метод

public static convertCoordinateSingleArray ( $str ) : array
$str string eg: "1.1,2.2; 3.3,4.4; 5.5,6.6"
Результат array eg: ((1.1, 2.2), (3.3, 4.4), (5.5, 6.6), (7.7, 8.8))

createResponse() публичный статический Метод

public static createResponse ( $dataObj )

findGeometry() публичный статический Метод

public static findGeometry ( array $geo, array $dataRow ) : array
$geo array an array holding the identifier(s) for the geographical attribute
$dataRow array an array holding data
Результат array an array containing the identifier(s) of the selected attribute and an object representing the extracted geometry

getBody() публичный статический Метод

public static getBody ( $dataObj )

getDocumentation() публичный статический Метод

public static getDocumentation ( )

toCoordinateList() публичный статический Метод

Converts a coordinate array of a feature of any type to an array containing all used coordinates. Each coordinate is represented by an array of numbers, with one number for each dimension.
public static toCoordinateList ( $coordinates_array, &$out )
$coordinates_array
$out array eg for 2D data: ((1, 1), (2, 2), (3, 3))