qgisProject
in package
Table of Contents
Properties
- $allProj4 : array<string|int, mixed>
- $cachedProperties : array<string|int, mixed>
- $canvasColor : string
- $data : array<string|int, mixed>
- $layers : array<string|int, array<string|int, mixed>>
- $path : string
- $qgisProjectVersion : int
- Version of QGIS which wrote the project.
- $relations : array<string|int, mixed>
- $themes : array<string|int, mixed>
- $useLayerIDs : bool
- $WMSInformation : array<string|int, mixed>
- $xml : SimpleXMLElement
Methods
- __construct() : mixed
- constructor.
- clearCache() : mixed
- Clear the project cache.
- findLayersByKeyword() : array<string|int, qgisMapLayer>|array<string|int, qgisVectorLayer>
- getAllProj4() : array<string|int, mixed>
- Get All Proj4 definition from QGIS Project.
- getCanvasColor() : string
- Get QGIS project Canvas color.
- getData() : null|mixed
- getLayer() : null|qgisMapLayer|qgisVectorLayer
- getLayerByKeyword() : null|qgisMapLayer|qgisVectorLayer
- getLayerDefinition() : null|array<string|int, mixed>
- getPath() : string
- Get QGIS project path.
- getProj4() : null|string
- Get Proj4 definition from QGIS Project.
- getQgisProjectVersion() : int
- Get version of QGIS which wrote the project.
- getRelations() : array<string|int, mixed>
- Get relations information.
- getThemes() : array<string|int, mixed>
- Get list of themes.
- getWMSInformation() : array<string|int, mixed>
- Get WMS info.
- getXmlLayer() : array<string|int, SimpleXMLElement>
- getXmlLayerByKeyword() : array<string|int, SimpleXMLElement>
- getXmlLayers() : array<string|int, SimpleXMLElement>
- getXmlRelation() : array<string|int, SimpleXMLElement>
- getXml() : SimpleXMLElement
- temporary function to read xml for some methods that relies on xml data that are not yet stored in the cache.
- readAllProj4() : array<string|int, mixed>
- readCanvasColor() : string
- readLayers() : array<string|int, array<string|int, mixed>>
- readRelations() : null|array<string|int, array<string|int, mixed>>
- readThemes() : null|array<string|int, array<string|int, mixed>>
- readUseLayerIDs() : bool
- readWMSInformation() : array<string|int, mixed>
- readXmlProject() : mixed
- Read the qgis files.
Properties
$allProj4
protected
array<string|int, mixed>
$allProj4
= array()
authid => proj4
$cachedProperties
protected
array<string|int, mixed>
$cachedProperties
= array('WMSInformation', 'canvasColor', 'allProj4', 'relations', 'themes', 'useLayerIDs', 'layers', 'data', 'qgisProjectVersion')
List of cached properties
$canvasColor
protected
string
$canvasColor
= ''
$data
protected
array<string|int, mixed>
$data
= array()
QGIS project data
$layers
protected
array<string|int, array<string|int, mixed>>
$layers
= array()
list of layers. Each item is a list of layer properties
$path
protected
string
$path
QGIS project path
$qgisProjectVersion
Version of QGIS which wrote the project.
protected
int
$qgisProjectVersion
$relations
protected
array<string|int, mixed>
$relations
= array()
for each referenced layer, there is an item with referencingLayer, referencedField, referencingField keys. There is also a 'pivot' key
$themes
protected
array<string|int, mixed>
$themes
= array()
list of themes
$useLayerIDs
protected
bool
$useLayerIDs
= \false
$WMSInformation
protected
array<string|int, mixed>
$WMSInformation
contains WMS info
$xml
protected
SimpleXMLElement
$xml
QGIS project XML
Methods
__construct()
constructor.
public
__construct(string $file) : mixed
Parameters
- $file : string
-
: the QGIS project path
clearCache()
Clear the project cache.
public
clearCache() : mixed
findLayersByKeyword()
public
findLayersByKeyword(string $key) : array<string|int, qgisMapLayer>|array<string|int, qgisVectorLayer>
Parameters
- $key : string
Return values
array<string|int, qgisMapLayer>|array<string|int, qgisVectorLayer>getAllProj4()
Get All Proj4 definition from QGIS Project.
public
getAllProj4() : array<string|int, mixed>
Return values
array<string|int, mixed>getCanvasColor()
Get QGIS project Canvas color.
public
getCanvasColor() : string
Return values
stringgetData()
public
getData(string $key) : null|mixed
Parameters
- $key : string
Return values
null|mixedgetLayer()
public
getLayer(string $layerId) : null|qgisMapLayer|qgisVectorLayer
Parameters
- $layerId : string
Return values
null|qgisMapLayer|qgisVectorLayergetLayerByKeyword()
public
getLayerByKeyword(string $key) : null|qgisMapLayer|qgisVectorLayer
Parameters
- $key : string
Return values
null|qgisMapLayer|qgisVectorLayergetLayerDefinition()
public
getLayerDefinition(string $layerId) : null|array<string|int, mixed>
Parameters
- $layerId : string
Return values
null|array<string|int, mixed>getPath()
Get QGIS project path.
public
getPath() : string
Return values
stringgetProj4()
Get Proj4 definition from QGIS Project.
public
getProj4(mixed $authId) : null|string
Parameters
- $authId : mixed
Return values
null|stringgetQgisProjectVersion()
Get version of QGIS which wrote the project.
public
getQgisProjectVersion() : int
Return values
intgetRelations()
Get relations information.
public
getRelations() : array<string|int, mixed>
For each referenced layer, there is an item with referencingLayer, referencedField, referencingField keys. There is also a 'pivot' key.
Return values
array<string|int, mixed>getThemes()
Get list of themes.
public
getThemes() : array<string|int, mixed>
Return values
array<string|int, mixed>getWMSInformation()
Get WMS info.
public
getWMSInformation() : array<string|int, mixed>
Return values
array<string|int, mixed>getXmlLayer()
public
getXmlLayer(mixed $layerId) : array<string|int, SimpleXMLElement>
Parameters
- $layerId : mixed
Tags
Return values
array<string|int, SimpleXMLElement>getXmlLayerByKeyword()
public
getXmlLayerByKeyword(mixed $key) : array<string|int, SimpleXMLElement>
Parameters
- $key : mixed
Tags
Return values
array<string|int, SimpleXMLElement>getXmlLayers()
public
getXmlLayers() : array<string|int, SimpleXMLElement>
Tags
Return values
array<string|int, SimpleXMLElement>getXmlRelation()
public
getXmlRelation(mixed $relationId) : array<string|int, SimpleXMLElement>
Parameters
- $relationId : mixed
Tags
Return values
array<string|int, SimpleXMLElement>getXml()
temporary function to read xml for some methods that relies on xml data that are not yet stored in the cache.
protected
getXml() : SimpleXMLElement
Return values
SimpleXMLElementreadAllProj4()
protected
readAllProj4(SimpleXMLElement $xml) : array<string|int, mixed>
Parameters
- $xml : SimpleXMLElement
Return values
array<string|int, mixed>readCanvasColor()
protected
readCanvasColor(SimpleXMLElement $xml) : string
Parameters
- $xml : SimpleXMLElement
Return values
stringreadLayers()
protected
readLayers(SimpleXMLElement $xml) : array<string|int, array<string|int, mixed>>
Parameters
- $xml : SimpleXMLElement
Tags
Return values
array<string|int, array<string|int, mixed>> —list of layers. Each item is a list of layer properties
readRelations()
protected
readRelations(SimpleXMLElement $xml) : null|array<string|int, array<string|int, mixed>>
Parameters
- $xml : SimpleXMLElement
Return values
null|array<string|int, array<string|int, mixed>>readThemes()
protected
readThemes(SimpleXMLElement $xml) : null|array<string|int, array<string|int, mixed>>
Parameters
- $xml : SimpleXMLElement
Return values
null|array<string|int, array<string|int, mixed>>readUseLayerIDs()
protected
readUseLayerIDs(SimpleXMLElement $xml) : bool
Parameters
- $xml : SimpleXMLElement
Return values
boolreadWMSInformation()
protected
readWMSInformation(SimpleXMLElement $qgsLoad) : array<string|int, mixed>
Parameters
- $qgsLoad : SimpleXMLElement
Return values
array<string|int, mixed>readXmlProject()
Read the qgis files.
protected
readXmlProject(mixed $qgs_path) : mixed
Parameters
- $qgs_path : mixed