Tag Archives: GML

Reading Inspire XML with FME

@SafeSoftware asked, if there’s any chance I’ll write this blog post also in English: http://gissiajapaikkatietoa.wordpress.com/2011/11/16/mmln-kuntarajat-fmella/. There’s a very good chance you can read it in English, since I’m now writing it in English. Finnish doesn’t seem to be the universal language yet, thus I understand @SafeSoftware’s question.

To begin with, according to Safe Software, FME 2012 can read XML documents in Inspire schemas out of the box, since FME 2012 contains Inspire schema files (from Annex I). This would mean that reading XML documents in Inspire schemas and writing to different formats is easier than before. This needs testing!

Downloading data

I’m testing the new functionality with open data from the National Land Survey of Finland.

I download municipality boundaries in XML from http://www.maanmittauslaitos.fi/ilmaisetaineistot.

Reading data

I choose INSPIRE GML as the format and municipality boundaries as the dataset with a scale of 1:100 000.

Inspire GML-luku
Next thing to do is to check parameters. I choose Dataset Only as the setting for Show Feature Types from:

As a result, I get two feature types, AdministrativeBoundary ja AdministrativeUnit. Complex properties are mapped now as nested attributes. For example following XML fragment

<inspireId>

<Identifier>

<localId>au13572990</localId>

<namespace>FI.NLS.AU100</namespace>

</Identifier>

</inspireId>

will form two attributes inspireId.Identifier.localId and inspireId.Identifier.namespace.

AdministravieBoundary ja AdministrativeUnit

Writing data

Let’s continue the test by writing administrative units and boundaries to different formats, e.g. MapInfo TAB, ESRI Shape, KML, PDF, DWG. I built the workspace and defined three parameters, with which I can direct the transformation of the data. The parameters are: Source file(s), Destination folder and Destination data format. The end-user doesn’t need to do anything else than define the values for the parameters and click OK.

Inspecting results

After running the workspace, we can inspect the results in FME Data Inspector or Viewer. For the first run, I chose MapInfo TAB as the destination data format, and the result has correct geometries and attributes:

Kuntarajat MapInfo TAB:ina.

Other formats that I tested were KML, PDF ja DWG, which worked without problems.

Reading XML data in Inspire schemas is now very handy with FME.

Advertisements

Leave a comment

Filed under Inspire