Method | Description | |
---|---|---|
area ( array $ring ) : float | Calculates the area of a closed simple polygon. | |
generateParams ( string $value, integer $index ) : array | Generate parameters for the GIS data editor from the value of the GIS column. | |
generateWkt ( array $gis_data, integer $index, string $empty = '' ) : string | Generate the WKT with the set of parameters passed by the GIS editor. | |
getPointOnSurface ( array $ring ) : array | void | Returns a point that is guaranteed to be on the surface of the ring. | |
isOuterRing ( array $ring ) : boolean | Determines whether a set of points represents an outer ring. | |
isPointInsidePolygon ( array $point, array $polygon ) : boolean | Determines whether a given point is inside a given polygon. | |
prepareRowAsOl ( string $spatial, integer $srid, string $label, string $fill_color, array $scale_data ) : string | Prepares JavaScript related to a row in the GIS dataset to visualize it with OpenLayers. | |
prepareRowAsPdf ( string $spatial, string $label, string $fill_color, array $scale_data, TCPDF $pdf ) : TCPDF | Adds to the TCPDF instance, the data related to a row in the GIS dataset. | |
prepareRowAsPng ( string $spatial, string $label, string $fill_color, array $scale_data, object $image ) : object | Adds to the PNG image object, the data related to a row in the GIS dataset. | |
prepareRowAsSvg ( string $spatial, string $label, string $fill_color, array $scale_data ) : string | Prepares and returns the code related to a row in the GIS dataset as SVG. | |
scaleRow ( string $spatial ) : array | Scales each row. | |
singleton ( ) : |
Returns the singleton. |
Method | Description | |
---|---|---|
__construct ( ) | A private constructor; prevents direct creation of object. | |
_drawPath ( string $polygon, array $scale_data ) : string | Draws a ring of the polygon using SVG path element. |
public static isOuterRing ( array $ring ) : boolean | ||
$ring | array | array of points forming the ring |
return | boolean | whether a set of points represents an outer ring |
public prepareRowAsOl ( string $spatial, integer $srid, string $label, string $fill_color, array $scale_data ) : string | ||
$spatial | string | GIS POLYGON object |
$srid | integer | Spatial reference ID |
$label | string | Label for the GIS POLYGON object |
$fill_color | string | Color for the GIS POLYGON object |
$scale_data | array | Array containing data related to scaling |
return | string | JavaScript related to a row in the GIS dataset |
public prepareRowAsPdf ( string $spatial, string $label, string $fill_color, array $scale_data, TCPDF $pdf ) : TCPDF | ||
$spatial | string | GIS POLYGON object |
$label | string | Label for the GIS POLYGON object |
$fill_color | string | Color for the GIS POLYGON object |
$scale_data | array | Array containing data related to scaling |
TCPDF | TCPDF instance | |
return | TCPDF | the modified TCPDF instance |
public prepareRowAsPng ( string $spatial, string $label, string $fill_color, array $scale_data, object $image ) : object | ||
$spatial | string | GIS POLYGON object |
$label | string | Label for the GIS POLYGON object |
$fill_color | string | Color for the GIS POLYGON object |
$scale_data | array | Array containing data related to scaling |
$image | object | Image object |
return | object | the modified image object |
public prepareRowAsSvg ( string $spatial, string $label, string $fill_color, array $scale_data ) : string | ||
$spatial | string | GIS POLYGON object |
$label | string | Label for the GIS POLYGON object |
$fill_color | string | Color for the GIS POLYGON object |
$scale_data | array | Array containing data related to scaling |
return | string | the code related to a row in the GIS dataset |
public static singleton ( ) : |
||
return | the singleton |