Containers
In this chapter we will describe the database storage of features. In general, there are four main tables for each feature type for storing semantic, graphic, security and system information in the database.
-
Semantic table – Contains all semantic attributes defined for a group of feature types.
-
Feature table – Contains all system attributes (Feature Identifier, Semantic Identifier, Update Date, Updated By,...) and a collection of security attributes.
-
Graphic table – Contains all required columns for storing graphics.
-
Graphic tag table – Contains all required columns for storing graphic tags for features.
For more information about database structure see LIDS Database Guide.
Feature Types with Geometry and Semantics
If a feature type has both semantic attributes and geometry defined, its features are stored in semantic, feature and graphic tables.
Semantic Feature Types without Geometry
If a feature type has a set of semantic attributes and does not have geometry defined (or defined as none), its features are stored in semantic and feature tables.
Geometric Feature Types without Semantics
If a feature type does not contain any attribute – that means that no semantic or security attributes are defined for the feature type and all his parents, the feature type must have geometry. These feature types are usually used as some kind of graphic marks. Features of this feature type is stored in feature and graphic tables.
Defining Feature Containers
In a LIDS project there are all containers defined in the metamodel. Each feature container definition includes name, description, dbName and spatialInfo. Feature containers are defined within a containerArray.
Example: Feature container for Water main features.
<ber:model>
<ber:containerArray>
...
<ber:container id="ct_5040000" name="Water mains"
dbName="W_MAINS">
<ber:description>Water mains</ber:description>
<ber:spatialInfo srs="EPSG:31467" baseUnit="meter">
<ber:range>
<ber:x min="3449000" max="3464400"/>
<ber:y min="5476300" max="5490500"/>
<ber:z min="-150" max="1625"/>
</ber:range>
</ber:spatialInfo>
</ber:container>
...
</ber:containerArray>
</ber:model>
Example: Container with a reference to a group container.
<ber:container id="ct_geo_railway" name="Geo Railway" dbName="GEO_RAILWAY">
<ber:description>Railway container</ber:description>
<ber:groupContainer refId="gc_geography"/>
</ber:container>
Attributes
-
id – Unique identifier of a feature container.
-
name – Name of a feature container.
-
dbName – Name of a feature container database table.
-
versioned – Optional parameter. Possible values:
-
false – default. No versioning is activated
-
history - changes are recorded for keeping history
-
longTransaction - changes are done in long transaction mode
-
-
measure – Boolean. If true, graphical table stores also m-coordinate of individual vertexes.
Inner elements
-
description – Description of a feature container.
-
spatialInfo – Optional definition. If not defined, project spatialInfo is applied – see spatialInfo chapter. Individual containers can define different tolerance and range. baseUnit and srs should be the same for all containers and for the project. The range has to cover all geometries in a container. It’s not possible to store a geometry which exceeds the range. Still, the range value should be set reasonably according to project data. If set too large, many spatial operations don’t work correct. If z range is defined, also z coordinates are stored for features in this container, enabling 3D functionality
-
groupContainer – Reference to a group container.
Referring Feature Containers
Each non-abstract feature type must refer a feature container itself or it must have such ancestor. Then the subordinate feature type inherits the feature container from its ancestor.
Example: The feature container is usually referred as follows.
<ber:model>
<ber:featureTypeArray>
...
<ber:featureType id="ft_5040000" name="Water mains"
parentId="ft_5000002" abstract="false">
<ber:description>Water mains</ber:description>
<ber:container refId="ct_5040000"/>
...
</ber:featureType>
...
</ber:featureTypeArray>
</ber:model>
In the previous example, there is Water mains feature type defined with features stored in W_MAINS feature container. In the database there are four container tables:
-
W_MAINS – semantic table
-
W_MAINS_F – feature table
-
W_MAINS_GR – graphic table
-
W_MAINS_GT – table for graphic tags
Group Containers
In LIDS there is a possibility to group feature containers. It is possible to group feature and graphic tables into one bigger table – group container. One big container table is usually faster for querying than querying many smaller tables.
Which feature types will be grouped into which group containers is really the project designer choice. Any feature types can be grouped together, but usually there is a good practice to group together feature types that will be often displayed together. Good idea is to group features for a LIDS 6 category.
The definition of group containers precedes the definition of containers in a project model.
Example: Water group container defined. Several feature containers are grouped into this Water group container.
<ber:model>
<ber:groupContainerArray>
<ber:groupContainer id="gc_5010000" name="Water"
dbName="W__GROUP" versioned="true">
<ber:description>Water group container</ber:description>
<ber:spatialInfo srs="EPSG:31467" baseUnit="meter">
<ber:range>
<ber:x min="3449000" max="3464400"/>
<ber:y min="5476300" max="5490500"/>
<ber:z min="-11034" max="8848"/>
</ber:range>
</ber:spatialInfo>
</ber:groupContainer>
...
</ber:groupContainerArray>
<ber:containerArray>
<ber:container id="ct_5010001" name="Pumping station"
dbName="W_PUMPSTAT">
<ber:description>Pumping station</ber:description>
<ber:groupContainer refId="gc_5010000"/>
</ber:container>
<ber:container id="ct_5010002" name="Extraction point"
dbName="W_EXTRPOINT">
<ber:description>Extraction point</ber:description>
<ber:groupContainer refId="gc_5010000"/>
</ber:container>
<ber:container id="ct_5010003" name="Pipeline"
dbName="W_PIPELINE">
<ber:description>Pipeline</ber:description>
<ber:groupContainer refId="gc_5010000"/>
</ber:container>
<ber:container id="ct_5010005" name="Hydrant" dbName="W_HYDRANT">
<ber:description>Hydrant</ber:description>
<ber:groupContainer refId="gc_5010000"/>
</ber:container>
<ber:container id="ct_5010004" name="Protection pipeline"
dbName="W_PROTPIPE">
<ber:description>Protection pipeline</ber:description>
<ber:groupContainer refId="gc_5010000"/>
</ber:container>
</ber:containerArray>
...
<ber:featureTypeArray>
<ber:featureType id="ft_5010100" name="Pumping station"
parentId="ft_5010000" abstract="false">
<ber:description>Pumping station</ber:description>
<ber:container refId="ct_5010001"/>
...
</ber:featureType>
...
<ber:featureType id="ft_5010200" name="Extraction point"
parentId="ft_5010000" abstract="false">
<ber:description>Extraction point</ber:description>
<ber:container refId="ct_5010002"/>
...
</ber:featureType>
...
</ber:featureTypeArray>
</ber:model>
Attributes
-
id – Unique identifier of a group container.
-
name – Name of a group container.
-
dbName – Name of a group container database table.
-
versioned – Optional parameter. Possible values:
-
false – default. No versioning is activated
-
history – changes are recorded for keeping history. Value true can still be used because of backwards compatibility and has same meaning
-
longTransaction - changes are done in long transaction mode
-
-
measure – Boolean. If true, graphical table stores also m-coordinate of individual vertexes.
Inner Elements
-
description – Contains a detailed description of the group container.
-
spatialInfo – Definition of reference system and units – see description in chapter describing containers definition.