span8
span4
span8
span4
The demo shows how FME can be used to write INSPIRE* compliant Annex I Protected Sites** GML.This involves reading from various data sources having different data models and transforming their model to conform to the common INSPIRE protected sites schema.The resulting GML validates against the INSPIRE schema.
Note that for a more basic example of using FME to write INSPIRE compliant data, please see theINSPIRE Cadastral Parcels Writing Demo.
The demo uses data from three sources:
1.Read in source dataThe three sources of protected sites data, Natura2000 (N2K.N2000), Swedish NVR (NV_GEOREG_SW00) and Helcom (BSPA) are each read with a FME Feature Store Reader.2.NVR only data transformationsFeatures are aggregated based on DIDs.The dates of the features are sorted in ascending order and any duplicate DIDs are removed from the NVR Decision table.The three sources of NVR data are combined using the FeatureMerger transformer.3.剪辑Natura2000 porti南部和极数据on of the datasetAs the datasets of Natura2000 and NVR are very large, the data is clipped to reduce the size, which is acceptable for the purposes of this demo.The transformers, Clipper and Creator (which creates a bounding box), can be removed if one would like all data written out.
4.Generate IDsIDs are generated as per INSPIRE requirements.GML IDs are prefixes with the namespace attribute value.The INSPIRE namespace convention includes the two letter country code, followed by the three letter acronym for the national mapping agency, and ending with the two letter code for the INSPIRE theme.For Natura2000 data, Object ID is used in the GML ID generation.Unique IDs are created using the UUIDGenerator for NVR and Helcom data, as no other unique ID values exist when the three datasets are combined.
Attribute Creator parameters demonstrating how the gml_id is populated for NVR data:
5.Attribute creationINSPIRE specified attributes are created using AttributeCreator, SchemaMapper, AttributeExposer, and AttributeCopier transformers.Date Formatting
Natura2000 wh和Helcom数据不包含日期ich can be formatted to match the INSPIRE requirements, therefore the date values are defined in a CSV table, and are mapped with a SchemaMapper transformer.NVR data does contain dates which can be formatted into the INSPIRE specified format, using the DateFormatter.
Date Formatter parameters:
6.Schema mapping
Simple Schema Mapping Transformers
AttributeValueMapperAn AttributeValueMapper is used to populate namespace fields for Helcom data.Helcom data covers the Baltic region, so the namespace fields cannot be hardcoded as for Natura2000 and NVR datasets, which only contain data from Sweden.Namespace fields are populated for Helcom data based on country name and national mapping agency.
AttributeCopierThe AttributeCopier transformer maps the source attributes to the correct destination attributes.Attributes with the same name in the source and destination do not need to be mapped, as the Writer will automatically map these features.
Attribute Value Mapperwhich is used to populate Helcom's namespace attribute:
SchemaMapper
TheSchemaMappertransformer maps and creates various INSPIRE required attributes based on a CSV table.Note that new attributes created by the schema mapper must be “exposed” to be used further on in the workspace.Helcom data CSV File Preview and SchemaMapper Parameters:
7.ReprojectionThe coordinate systems are reprojected to the official coordinate system, ETRS89, also known as EPSG:4258.8.Geometry transformationThe geometry is named to match the name of the xml_geometry type in the Writer’s feature type properties.In this example, only the ‘geometry’ xml_geometry name is used.
INSPIRE Protected Sites feature type properties:
9.Write INSPIRE GMLAfter the above processing steps, the data has been formatted for INSPIRE.The workspace writes the three data sources as ProtectedSite INSPIRE GML using the INSPIRE Writer and built-in ProtectedSites application schema.
Once data has been written using the INSPIRE GML Writer, it is important to validate against XML syntax and an INSPIRE XML Schema Document (XSD).Validation is done in a validation workspace, using an XMLValidator transformer.It is also possible to validate the XML output with the INSPIRE Writer using the writer parameter “Validate Output File” found under the INSPIRE writer parameters in the Navigator.In both instances, when the workspace is run, any errors with the XML will be recorded by a Logger.
To view the protected sites in Data Inspector, use the INSPIRE GML Reader.For quicker display times, under reader parameters, select feature types by themes, with no INSPIRE themes selected, or only the ProtectedSites theme selected.
Viewing the INSPIRE GML in the Data Inspector:
Note: This example is for demonstration purposes only.The resulting data is not to be used for any operational purposes.
A special thanks to Metria, one of our Swedish partners, for their central role and participation in this project.Also, thanks to Lantmäteriet, the Swedish mapping, cadastral and land registration authority for the demo source data.
*INSPIREis a European Union (EU) directive that requires member states and agencies to share spatial data in order to better support environmental decision making.The key approach to enable this data exchange is the use of a common data model accessed using open standards, such as OGC (Open Geospatial Consortium) web services.** The terms protected site and protected area will be used interchangeably in the demo.For more information on INSPIRE Protected Sites, please see the Data Specifications on Protected Sites available on theINSPIRE website.
INSPIRE GML Basic Writing and Validation Example
INSPIRE GML Reading Writing and Validation Basics
INSPIRE Natural Risk Zones Demo (Annex III)
AIXM Airports to INSPIRE Air Transport Networks
Create INSPIRE ATOM Download Service
Converting CityGML to INSPIRE 3D Buildings (Annex III)
© 2020 Safe Software Inc |Legal