[FrontPage] [TitleIndex] [WordIndex

Feature store configuration (workspace/datasources/feature)

First ideas on the configuration concept for all types of datasources and datastores are described in the deegree3/DatastoreConfigurationConcepts.

This page describes the configuration of feature stores with deegree version 3.1

0.1. SQL feature stores

A <SQLFeatureStore> is a feature store that is backed by an SQL database.
Current version sql: 3.1.0

(elements marked with "choice": one of these elements may be provided.)

List of supported attributes and elements for <SQLFeatureStore>:

TODO

0.2. SimpleSQL feature stores

A <SimpleSQLFeatureStore> is a feature store for generic spatial databases. Configuration is based on SQL statements.
Current version simplesql: 3.0.0/simplesql.xsd (configuration schema valid since 2010-11-15)

List of supported attributes and elements:

0.2.1. SimpleSQL examples

This example is for PostGIS. Note that the bounding box operator (&&) has been XML-encoded.

<SimpleSQLFeatureStore
  configVersion="3.0.0"
  xmlns="http://www.deegree.org/datasource/feature/simplesql"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.deegree.org/datasource/feature/simplesql http://schemas.deegree.org/datasource/feature/simplesql/3.0.0/simplesql.xsd">

  <!-- [1] CRS for storing geometries -->
  <StorageCRS>EPSG:4326</StorageCRS>

  <!-- [0...1] Local name of the feature type (defaults to 'Feature') -->
  <FeatureTypeName>MyFeature</FeatureTypeName>

  <!-- [0...1] Namespace of the feature type (defaults to NULL namespace) -->
  <FeatureTypeNamespace>http://www.deegree.org/app</FeatureTypeNamespace>

  <!-- [0...1] Prefix of the feature type (defaults to auto-generated prefix) -->
  <FeatureTypePrefix>app</FeatureTypePrefix>

  <!-- [1] database connection -->
  <ConnectionPoolId>connid</ConnectionPoolId>

  <!-- [1] query statement -->
  <SQLStatement>
    SELECT name, title AS "Titel", asbinary(the_geom)
    FROM some_table
    WHERE the_geom &amp;&amp; st_geomfromtext(?, -1)
  </SQLStatement>

  <!-- [1] bounding box statement -->
  <BBoxStatement>
    SELECT astext(ST_Estimated_Extent('some_table', 'the_geom')) as bbox
  </BBoxStatement>

  <!-- [0..n] different statements for specific WMS scale ranges -->
  <LODStatement aboveScale="3000">
    SELECT name, title AS "Titel", asbinary(st_simplifypreservetopology(the_geom, 1))
    FROM some_table
    WHERE the_geom &amp;&amp; st_geomfromtext(?, -1)
  </LODStatement>
  <LODStatement aboveScale="6000">
    SELECT name, title AS "Titel", asbinary(st_simplify(the_geom, 30))
    FROM some_table
    WHERE the_geom &amp;&amp; st_geomfromtext(?, -1) and not st_isempty(st_simplify(the_geom, 30))
  </LODStatement>
</SimpleSQLFeatureStore>

This example is for MySQL. Note that the BBoxStatement is not optimal, as the extent of all polygons is not derived with DB funcitons.

<SimpleSQLFeatureStore
 configVersion="3.0.0"
 xmlns="http://www.deegree.org/datasource/feature/simplesql"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.deegree.org/datasource/feature/simplesql http://schemas.deegree.org/datasource/feature/simplesql/3.0.0/simplesql.xsd">

  <!-- [1] CRS for storing geometries -->
  <StorageCRS>EPSG:26912</StorageCRS>

  <!-- [0...1] Local name of the feature type (defaults to 'Feature') -->
  <FeatureTypeName>LandslideAreas</FeatureTypeName>

  <!-- [0...1] Namespace of the feature type (defaults to NULL namespace) -->
  <FeatureTypeNamespace>http://www.deegree.org/app</FeatureTypeNamespace>

  <!-- [0...1] Prefix of the feature type (defaults to auto-generated prefix) -->
  <FeatureTypePrefix>app</FeatureTypePrefix>

  <!-- [1] database connection -->
  <ConnectionPoolId>mysql</ConnectionPoolId>

  <!-- [1] query statement -->
  <SQLStatement>
    SELECT code, type, status, shape_leng, shape_area, asbinary(SHAPE) AS geom
    FROM landslides
    WHERE MBRIntersects(GeomFromText(?),SHAPE)
  </SQLStatement>

  <!-- [1] bounding box statement -->
  <BBoxStatement>
    SELECT 'POLYGON((199709.85678244993 4088920.4794775285,199709.85678244993 4644250.101781303,736495.959185044 4644250.101781303,736495.959185044 4088920.4794775285,199709.85678244993 4088920.4794775285))' AS bbox
  </BBoxStatement>

</SimpleSQLFeatureStore>

This example is for Oracle Spatial.

<SimpleSQLFeatureStore
 configVersion="3.0.0"
 xmlns="http://www.deegree.org/datasource/feature/simplesql"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.deegree.org/datasource/feature/simplesql http://schemas.deegree.org/datasource/feature/simplesql/3.0.0/simplesql.xsd">

  <!-- [1] CRS for storing geometries -->
  <StorageCRS>EPSG:26912</StorageCRS>

  <!-- [0...1] Local name of the feature type (defaults to 'Feature') -->
  <FeatureTypeName>LandslideAreas</FeatureTypeName>

  <!-- [0...1] Namespace of the feature type (defaults to NULL namespace) -->
  <FeatureTypeNamespace>http://www.deegree.org/app</FeatureTypeNamespace>

  <!-- [0...1] Prefix of the feature type (defaults to auto-generated prefix) -->
  <FeatureTypePrefix>app</FeatureTypePrefix>

  <!-- [1] database connection -->
  <ConnectionPoolId>oracle</ConnectionPoolId>

  <!-- [1] query statement -->
  <SQLStatement>
    SELECT name, title, sdo_util.to_wkbgeometry(GEOMETRY) as geom
    FROM from some_table
    WHERE SDO_RELATE(GEOMETRY,SDO_GEOMETRY(?, 26912),'mask=anyinteract querytype=WINDOW') = 'TRUE'
  </SQLStatement>

  <!-- [1] bounding box statement -->
  <BBoxStatement>
    SELECT sdo_util.to_wktgeometry(sdo_root_mbr) as bbox from USER_SDO_INDEX_METADATA where sdo_index_name = 'YOUR_SPATIAL_INDEX_SPIDX'
  </BBoxStatement>

0.3. Shape feature stores

A <ShapeFeatureStore> is a feature store that is backed by a shape file.
Current Version shape: 3.0.0/shape.xsd (valid since 2010-11-15)

List of supported attributes and elements:

0.3.1. Shape example

<ShapeFeatureStore
  configVersion="3.0.0"
  xmlns="http://www.deegree.org/datasource/feature/shape"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.deegree.org/datasource/feature/shape http://schemas.deegree.org/datasource/feature/shape/3.0.0/shape.xsd">

  <!-- [0...1] CRS for storing geometries -->
  <StorageCRS>EPSG:4326</StorageCRS>

  <!-- [0...1] Local name of the feature type (defaults to base name of shape file) -->
  <FeatureTypeName>Shape</FeatureTypeName>

  <!-- [0...1] Namespace of the feature type (defaults to NULL namespace) -->
  <FeatureTypeNamespace>http://www.deegree.org/app</FeatureTypeNamespace>

  <!-- [0...1] Prefix of the feature type (defaults to auto-generated prefix) -->
  <FeatureTypePrefix>app</FeatureTypePrefix>

  <!-- [1] Name of the shape file -->
  <File>...</File>

  <!-- [0...1] Encoding of the text fields -->
  <Encoding>ISO-8859-1</Encoding>

  <!-- [0...1] Should an index for alphanumeric fields be generated -->
  <GenerateAlphanumericIndexes>false</GenerateAlphanumericIndexes>
</ShapeFeatureStore>

0.4. Memory feature store

A <MemoryFeatureStore> is a feature store that keeps all features in memory.
Current version memory: 3.0.0/memory.xsd (valid since 2010-11-15)

List of supported attributes and elements:

0.4.1. Memory example

<MemoryFeatureStore
  configVersion="3.0.0"
  xmlns="http://www.deegree.org/datasource/feature/memory"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.deegree.org/datasource/feature/memory http://schemas.deegree.org/datasource/feature/memory/3.0.0/memory.xsd">

  <!-- [1] CRS for storing geometries -->
  <StorageCRS>EPSG:4326</StorageCRS>

  <!-- [0...n] Prefixes to use for exporting qualified elements (features / properties) -->
  <NamespaceHint namespaceURI="app" prefix="http://www.deegree.org/app" />

  <!-- [1...n] GML schema file / directory to be used -->
  <GMLSchema version="GML_32">...</GMLSchema>

  <!-- [0...n] GML datasets to load on startup -->
  <GMLFeatureCollection version="GML_32">...</GMLFeatureCollection>
</MemoryFeatureStore>

1. Further information


CategoryDeegree3 CategoryWorkspaceConfiguration


2018-04-20 12:05