class GisMultiPoint extends GisGeometry

Handles actions related to GIS MULTIPOINT objects

Methods

string
prepareRowAsSvg(string $spatial, string $label, string $point_color, array $scale_data)

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

resource
prepareRowAsPng(string $spatial, string|null $label, string $point_color, array $scale_data, resource $image)

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

TCPDF
prepareRowAsPdf(string $spatial, string|null $label, string $point_color, array $scale_data, 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, string $point_color, array $scale_data)

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

array
scaleRow(string $spatial)

Scales each row.

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

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

string
getBoundsForOl(string $srid, array $scale_data)

Returns OpenLayers.Bounds object that correspond to the bounds of GIS data.

array
setMinMax(string $point_set, array $min_max)

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

array
generateParams(string $value, integer $index = -1)

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

array
extractPoints(string $point_set, array|null $scale_data, boolean $linear = false)

Extracts points, scales and returns them as an array.

string
getPolygonArrayForOpenLayers(array $polygons, string $srid)

Generates JavaScript for adding an array of polygons to OpenLayers.

string
getPolygonForOpenLayers(array $polygon, string $srid)

Generates JavaScript for adding points for OpenLayers polygon.

string
getLineArrayForOpenLayers(array $lines, string $srid, bool $is_line_string = true)

Generates JavaScript for adding an array of LineString or LineRing to OpenLayers.

string
getLineForOpenLayers(array $points_arr, string $srid, bool $is_line_string = true)

Generates JavaScript for adding a LineString or LineRing to OpenLayers.

string
getPointsArrayForOpenLayers(array $points_arr, string $srid)

Overridden to make sure that only the points having valid values for x and y coordinates are added.

string
getPointForOpenLayers(array $point, string $srid)

Generates JavaScript for adding a point to OpenLayers.

static GisMultiPoint
singleton()

Returns the singleton.

string
getShape(array $row_data)

Generate the WKT for the data from ESRI shape files.

Details

at line 196
string prepareRowAsSvg(string $spatial, string $label, string $point_color, array $scale_data)

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
string $point_color Color for the GIS MULTIPOINT object
array $scale_data data related to scaling

Return Value

string the code related to a row in the GIS dataset

at line 80
resource prepareRowAsPng(string $spatial, string|null $label, string $point_color, array $scale_data, resource $image)

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

Parameters

string $spatial GIS POLYGON object
string|null $label Label for the GIS POLYGON object
string $point_color Color for the GIS POLYGON object
array $scale_data Array containing data related to scaling
resource $image Image object

Return Value

resource the modified image object

at line 138
TCPDF prepareRowAsPdf(string $spatial, string|null $label, string $point_color, array $scale_data, TCPDF $pdf)

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

Parameters

string $spatial GIS data object
string|null $label label for the GIS data object
string $point_color Color for the GIS MULTIPOINT object
array $scale_data array containing data related to scaling
TCPDF $pdf TCPDF instance

Return Value

TCPDF the modified TCPDF instance

at line 244
string prepareRowAsOl(string $spatial, int $srid, string $label, string $point_color, array $scale_data)

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
string $point_color Color for the GIS MULTIPOINT object
array $scale_data array containing data related to scaling

Return Value

string the JavaScript related to a row in the GIS dataset

at line 55
array scaleRow(string $spatial)

Scales each row.

Parameters

string $spatial spatial data of a row

Return Value

array array containing the min, max values for x and y coordinates

at line 292
string generateWkt(array $gis_data, int $index, string $empty = '')

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

Parameters

array $gis_data 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

in GisGeometry at line 126
protected string getBoundsForOl(string $srid, array $scale_data)

Returns OpenLayers.Bounds object that correspond to the bounds of GIS data.

Parameters

string $srid spatial reference ID
array $scale_data data related to scaling

Return Value

string OpenLayers.Bounds object that correspond to the bounds of GIS data

in GisGeometry at line 148
protected array setMinMax(string $point_set, array $min_max)

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

Parameters

string $point_set point set
array $min_max existing min, max values

Return Value

array the updated min, max values

at line 356
array generateParams(string $value, integer $index = -1)

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

Parameters

string $value value of the GIS column
integer $index Index of the geometry

Return Value

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

in GisGeometry at line 217
protected array extractPoints(string $point_set, array|null $scale_data, boolean $linear = false)

Extracts points, scales and returns them as an array.

Parameters

string $point_set string of comma separated points
array|null $scale_data data related to scaling
boolean $linear if true, as a 1D array, else as a 2D array

Return Value

array scaled points

in GisGeometry at line 266
protected string getPolygonArrayForOpenLayers(array $polygons, string $srid)

Generates JavaScript for adding an array of polygons to OpenLayers.

Parameters

array $polygons x and y coordinates for each polygon
string $srid spatial reference id

Return Value

string JavaScript for adding an array of polygons to OpenLayers

in GisGeometry at line 294
protected string getPolygonForOpenLayers(array $polygon, string $srid)

Generates JavaScript for adding points for OpenLayers polygon.

Parameters

array $polygon x and y coordinates for each line
string $srid spatial reference id

Return Value

string JavaScript for adding points for OpenLayers polygon

in GisGeometry at line 313
protected string getLineArrayForOpenLayers(array $lines, string $srid, bool $is_line_string = true)

Generates JavaScript for adding an array of LineString or LineRing to OpenLayers.

Parameters

array $lines x and y coordinates for each line
string $srid spatial reference id
bool $is_line_string whether it's an array of LineString

Return Value

string JavaScript for adding an array of LineString or LineRing to OpenLayers

in GisGeometry at line 350
protected string getLineForOpenLayers(array $points_arr, string $srid, bool $is_line_string = true)

Generates JavaScript for adding a LineString or LineRing to OpenLayers.

Parameters

array $points_arr x and y coordinates for each point
string $srid spatial reference id
bool $is_line_string whether it's a LineString

Return Value

string JavaScript for adding a LineString or LineRing to OpenLayers

at line 398
protected string getPointsArrayForOpenLayers(array $points_arr, string $srid)

Overridden to make sure that only the points having valid values for x and y coordinates are added.

Parameters

array $points_arr x and y coordinates for each point
string $srid spatial reference id

Return Value

string JavaScript for adding an array of points to OpenLayers

in GisGeometry at line 397
protected string getPointForOpenLayers(array $point, string $srid)

Generates JavaScript for adding a point to OpenLayers.

Parameters

array $point array containing the x and y coordinates of the point
string $srid spatial reference id

Return Value

string JavaScript for adding points to OpenLayers

at line 38
static GisMultiPoint singleton()

Returns the singleton.

Return Value

GisMultiPoint the singleton

at line 328
string getShape(array $row_data)

Generate the WKT for the data from ESRI shape files.

Parameters

array $row_data GIS data

Return Value

string the WKT for the data from ESRI shape files