class GisVisualization (View source)

Handles visualization of GIS data

Methods

array
getSettings()

Returns the settings array

get(string $sql_query, array $options, int $row, int $pos)

Factory

getByData(array $data, array $options)

Get visualization

bool
hasSrid()

Check if data has SRID

void
init()

All the variable initialization, options handling has to be done here.

string
asSVG()

Get the visualization as a SVG.

void
toFileAsSvg(string $file_name)

Saves as a SVG image to a file.

string
asPng()

Get the visualization as a PNG.

void
toFileAsPng(string $file_name)

Saves as a PNG image to a file.

string
asOl()

Get the code for visualization with OpenLayers.

void
toFileAsPdf(string $file_name)

Saves as a PDF to a file.

string
toImage(string $format)

Convert file to image

void
toFile(string $filename, string $format)

Convert file to given format

void
setUserSpecifiedSettings(array $userSpecifiedSettings)

Set user specified settings

Details

array getSettings()

Returns the settings array

Return Value

array

the settings array

static GisVisualization get(string $sql_query, array $options, int $row, int $pos)

Factory

Parameters

string $sql_query

SQL to fetch raw data for visualization

array $options

Users specified options

int $row

number of rows

int $pos

start position

Return Value

GisVisualization

static GisVisualization getByData(array $data, array $options)

Get visualization

Parameters

array $data

Raw data, if set, parameters other than $options will be ignored

array $options

Users specified options

Return Value

GisVisualization

bool hasSrid()

Check if data has SRID

Return Value

bool

protected void init()

All the variable initialization, options handling has to be done here.

Return Value

void

string asSVG()

Get the visualization as a SVG.

Return Value

string

the visualization as a SVG

void toFileAsSvg(string $file_name)

Saves as a SVG image to a file.

Parameters

string $file_name

File name

Return Value

void

string asPng()

Get the visualization as a PNG.

Return Value

string

the visualization as a PNG

void toFileAsPng(string $file_name)

Saves as a PNG image to a file.

Parameters

string $file_name

File name

Return Value

void

string asOl()

Get the code for visualization with OpenLayers.

Should return JSON to avoid eval() in gis_data_editor.js

Return Value

string

the code for visualization with OpenLayers

void toFileAsPdf(string $file_name)

Saves as a PDF to a file.

Parameters

string $file_name

File name

Return Value

void

string toImage(string $format)

Convert file to image

Parameters

string $format

Output format

Return Value

string File

void toFile(string $filename, string $format)

Convert file to given format

Parameters

string $filename Filename
string $format

Output format

Return Value

void

void setUserSpecifiedSettings(array $userSpecifiedSettings)

Set user specified settings

Parameters

array $userSpecifiedSettings

User specified settings

Return Value

void