INSPIRE Natural Risk Zones Demo (Annex III)

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2015.x

Introduction

This example demonstrates how to write INSPIRE compliant Annex III Natural Risk Zones GML. A number of transformers are used to manipulate the source data to obtain INSPIRE compliant Natural Risk Zones GML. The source data is transformed to the INSPIRE schema through reprojection, ID generation, addition of required fields, schema mapping, and geometry transformation. Finally, the workspace writes INSPIRE GML using the INSPIRE GML Writer, with built-in INSPIRE schemas. During writing, the GML is validated against XML syntax and schema.

 

Step-by-step Instructions

1. Read source data

UK flood risk areas data is read using the GML Reader and required XSD. A DonutHoleExtractor separates the multipart London polygon into two single-part polygons, which simplifies the geometry.

 

2. Reprojection

Data is reprojected to the INSPIRE specified coordinate system, ETRS89, also known as EPSG:4258. The CSMapReprojector is used since this provides for the most accurate coordinate transformation and includes control over datum shift method.

 

3. ID generation

Unique IDs are created with the UUIDGenerator transformer. Later, these IDs are used to populate the gml_id and localId fields, as required by the INSPIRE schema.

 

4. Addition of required fields and schema mapping

The Attribute Creator transformer is used to create and populate necessary attributes. Attributes can be concatenated directly within the AttributeCreator. In this example, the output from the UUIDGenerator transformer is concatenated with constants to populate the gml_id and localId fields. This is required to comply with INSPIRE requirements and also because GML IDs cannot begin with a number. Schema mapping is performed using the AttributeCopier transformer, which maps source attribute(s) to the appropriate destination attribute(s). Other attributes which are not available from the source schema are set to default values.

AttributeCreator for mapping and creating attributes
http_download_1444329838814_6032.png

5. Geometry transformation

The geometry name is set to 'geometry'. For the geometry to be written, the name of the geometry must match one of the xml_geometry types in the INSPIRE destination schema.
INSPIRE Writer feature type properties - note the xml_geometry name
http_download_144432983947_6032.png

6. Write INSPIRE GML

The data has now been formatted to be compliant with the INSPIRE Natural Risk Zones Core XSD. The XML schema document (XSD) for the writer is automatically used by selecting the INSPIRE theme, or by specifying the file path for the XSD. The data is written as HazardArea features using the INSPIRE GML Writer. Validation As ‘Yes’ is selected for the Validate Output File parameter of the INSPIRE GML Writer, each time the workspace is run, the GML is checked for XML syntax and schema issues. Any warnings or errors will be reported in the log. After successfully validating the INSPIRE GML, turning off validation can help improve writer performance.

 

Sample Output in Data Inspector

http_download_1444329839252_6032.png


Note: This example is for demonstration purposes only. The resulting data is not to be used for any operational purposes. * INSPIRE or Infrastructure for Spatial Information in Europe, is a European Union directive that aims to create a spatial data infrastructure of EU data, which would be used for policy making. The directive also aims to improve public access to spatial information. For more information please visit the INSPIRE website.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.