Configuration¶
PlexMap is configured with an YAML configuration file, the path to which must
be specified in the PLEXGIS_CONFIG
variable in your settings.py
. Its
filename is usually config.yaml
and it should reside in your project
directory, next to settings.py
.
Basic configuration¶
Basically, the configuration file has a top-level node plexgis
with the basic configuration, and an arbitary number of top-level nodes for each component (see Components configuration).
These are the most common configuration settings:
-
title
The title of the PlexMap installation.
Example: Osna3D
-
name
The full name of the area (Stadt, Landkreis, Bundesland) of this installation
Example: Stadt Osnabrück
-
srid
Spatial Reference System Identifier (SRID) for the database and the OpenLayers map. Communication between the various components of PlexMap is done in this SRID. Currently, this needs to be
4326
for a typical PlexMap installation as client-server communication is done in WGS84.
-
src_srid
SRID for the source data.
src_srid
should be a planar coordinates system like UTM because it is used in various calculations within PlexMap.
-
bounds
A 4-tuple describing the bounding box of the area. This also sets the initial zoom/extent. The coordinates must be given in the coordinate system described by
srid
.Hint: You can use the
showbounds
command to estimate the bounding box if you already have imported data. See Befehlsreferenz.
-
url
The full URL (including protocol://) where this PlexMap installation is accessible.
-
center_logo_url
If this is set, the top logo in the middle of the header will link to it.
-
components
A list of all PlexMap components that are active for this installation.
A list of all available options as well as their default values can be found in
the plexgis/default.yaml
file. This file is loaded first and then the
values are recursively updated by the ones in the PLEXGIS_CONFIG
file.
Example configuration¶
This is an example configuration for the Bundesland Rheinland-Pfalz:
plexgis:
title: RLP3D
subtitle: Entwicklungsversion
id: rlp3d
type: bundesland
name: RLP
srid: 4326
src_srid: 25832
bounds: [7.011719, 51.59177, 9.10209, 52.910]
minimize_components: True
minimize_styles: True
url: http://rheinland-pfalz-in-3d.rlp.de/
components:
- globe
- addresses
- layers
- selection
- tooltip
- poi
- overview
- layout
Components configuration¶
Each component listed in plexgis.components
can also be configured in more
detail. This is simply done by creating another top level node with the
component name, as you can see in the following example, which sets the maximum
navigation height in the globe
component to 15 kilometers and switches off
face culling in the globe renderer:
globe:
navigation:
max_height: 15000
renderoptions:
faceculling: false
For more information about the configuration of the individual components, please see Komponenten.
Multiple configuration files¶
Having more than on configuration file is also supported. You can set
PLEXGIS_CONFIG
to a list of files, which will be sequentially merged
together. This can be useful if you use a deployment tool and want to overwrite
certain settings.