class GisLineString extends GisGeometry (View source)

Handles actions related to GIS LINESTRING objects

Methods

string
prepareRowAsSvg(string $spatial, string $label, array $color, ScaleData $scaleData)

Prepares and returns the code related to a row in the GIS dataset as SVG.

void
prepareRowAsPng(string $spatial, string $label, array $color, ScaleData $scaleData, ImageWrapper $image)

Adds to the PNG image object, the data related to a row in the GIS dataset.

void
prepareRowAsPdf(string $spatial, string $label, array $color, ScaleData $scaleData, TCPDF $pdf)

Adds to the TCPDF instance, the data related to a row in the GIS dataset.

string
prepareRowAsOl(string $spatial, int $srid, string $label, array $color)

Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.

getExtent(string $wkt)

Get coordinate extent for this wkt.

string
getWktCoord(array|null $point, string $empty)

No description

string
generateWkt(array $gisData, int $index, string $empty = '')

Generate the WKT with the set of parameters passed by the GIS editor.

getCoordinatesExtent(string $pointSet)

Updates the min, max values with the given point set.

array
parseWktAndSrid(string $value)

Parses the wkt and optional srid from a combined string for the GIS data editor

array
getCoordinateParams(string $wkt)

Generate coordinate parameters for the GIS data editor from the value of the GIS column.

string
getType()

Return the uppercase GIS type name

array
generateParams(string $value)

Generate parameters for the GIS data editor from the value of the GIS column.

array
extractPoints1d(string $wktCoords, ScaleData|null $scaleData)

Extracts points, scales and returns them as an array.

array
extractPoints1dLinear(string $wktCoords, ScaleData|null $scaleData)

Extracts points, scales and returns them as an linear array.

array
extractPoints2d(string $wktCoords, ScaleData|null $scaleData)

No description

array
extractPoints3d(string $wktCoords, ScaleData|null $scaleData)

No description

string
toOpenLayersObject(string $constructor, array $coordinates, int $srid)

No description

string
addGeometryToLayer(string $olGeometry, string $style)

No description

int
getRandomId()

No description

static GisLineString
singleton()

Returns the singleton.

Details

string prepareRowAsSvg(string $spatial, string $label, array $color, ScaleData $scaleData)

Prepares and returns the code related to a row in the GIS dataset as SVG.

Parameters

string $spatial

GIS data object

string $label

label for the GIS data object

array $color

color for the GIS data object

ScaleData $scaleData

data related to scaling

Return Value

string

the code related to a row in the GIS dataset

void prepareRowAsPng(string $spatial, string $label, array $color, ScaleData $scaleData, ImageWrapper $image)

Adds to the PNG image object, the data related to a row in the GIS dataset.

Parameters

string $spatial

GIS POLYGON object

string $label

Label for the GIS POLYGON object

array $color

Color for the GIS POLYGON object

ScaleData $scaleData

Array containing data related to scaling

ImageWrapper $image

Return Value

void

void prepareRowAsPdf(string $spatial, string $label, array $color, ScaleData $scaleData, TCPDF $pdf)

Adds to the TCPDF instance, the data related to a row in the GIS dataset.

Parameters

string $spatial

GIS data object

string $label

label for the GIS data object

array $color

color for the GIS data object

ScaleData $scaleData

array containing data related to scaling

TCPDF $pdf

Return Value

void

string prepareRowAsOl(string $spatial, int $srid, string $label, array $color)

Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers.

Parameters

string $spatial

GIS data object

int $srid

spatial reference ID

string $label

label for the GIS data object

array $color

color for the GIS data object

Return Value

string

the JavaScript related to a row in the GIS dataset

Extent getExtent(string $wkt)

Get coordinate extent for this wkt.

Parameters

string $wkt

Well Known Text represenatation of the geometry

Return Value

Extent

min, max values for x and y coordinates

protected string getWktCoord(array|null $point, string $empty)

No description

Parameters

array|null $point

Array with x and y keys

string $empty

value for empty points

Return Value

string

Coordinates string separated by space for use in wkt

string generateWkt(array $gisData, int $index, string $empty = '')

Generate the WKT with the set of parameters passed by the GIS editor.

Parameters

array $gisData

GIS data

int $index

index into the parameter object

string $empty

value for empty points

Return Value

string

WKT with the set of parameters passed by the GIS editor

protected Extent getCoordinatesExtent(string $pointSet)

Updates the min, max values with the given point set.

Parameters

string $pointSet

point set

Return Value

Extent

protected array parseWktAndSrid(string $value)

Parses the wkt and optional srid from a combined string for the GIS data editor

Parameters

string $value

value of the GIS column

Return Value

array

parameters for the GIS editor from the value of the GIS column

protected array getCoordinateParams(string $wkt)

Generate coordinate parameters for the GIS data editor from the value of the GIS column.

Parameters

string $wkt

Value of the GIS column

Return Value

array

Coordinate params for the GIS data editor from the value of the GIS column

protected string getType()

Return the uppercase GIS type name

Return Value

string

array generateParams(string $value)

Generate parameters for the GIS data editor from the value of the GIS column.

Parameters

string $value

Value of the GIS column

Return Value

array

params for the GIS data editor from the value of the GIS column

protected array extractPoints1d(string $wktCoords, ScaleData|null $scaleData)

Extracts points, scales and returns them as an array.

Parameters

string $wktCoords

string of comma separated points

ScaleData|null $scaleData

data related to scaling

Return Value

array

scaled points

protected array extractPoints1dLinear(string $wktCoords, ScaleData|null $scaleData)

Extracts points, scales and returns them as an linear array.

Parameters

string $wktCoords

string of comma separated points

ScaleData|null $scaleData

data related to scaling

Return Value

array

scaled points

protected array extractPoints2d(string $wktCoords, ScaleData|null $scaleData)

No description

Parameters

string $wktCoords

string of ),( separated points

ScaleData|null $scaleData

data related to scaling

Return Value

array

scaled points

protected array extractPoints3d(string $wktCoords, ScaleData|null $scaleData)

No description

Parameters

string $wktCoords

string of )),(( separated points

ScaleData|null $scaleData

data related to scaling

Return Value

array

scaled points

protected string toOpenLayersObject(string $constructor, array $coordinates, int $srid)

No description

Parameters

string $constructor

OpenLayers geometry constructor string

array $coordinates

Array of coordinates 1-4 dimensions

int $srid

Return Value

string

protected string addGeometryToLayer(string $olGeometry, string $style)

No description

Parameters

string $olGeometry
string $style

Return Value

string

protected int getRandomId()

No description

Return Value

int

static GisLineString singleton()

Returns the singleton.

Return Value

GisLineString

the singleton