Question

How can I add a LoD2 (.gml) dataset into FME Workbench to convert it to .shp?

  • 27 April 2018
  • 3 replies
  • 16 views

Hello,

I’m quite new to FME, so excuse me, if my question is just due to wrong handling of the program. I'm using FME Desktop 2018.0.0.1. So far I wasn't able to find already a similar question that's why I'm trying to ask my question now.

I have some problems with a LoD2 Dataset. My plan is to convert it to a .shp using FME Workbench. But as soon as I’m trying to add the data (.gml) to FME Workbench, I’m always receiving these Errors:

“XML Parser error: 'Error at file:'' line-0 column:0 message:unable to open file 'http://repository.gdi-de.org/schemas/adv/citygml/moduleApp/1.0/appearanceLoD2.xsd'',

“An error occurred while attempting to parse the XML Schema document 'http://repository.gdi-de.org/schemas/adv/citygml/moduleApp/1.0/appearanceLoD2.xsd'”,

“The XML Module halted on error, see the logfile for details”,

“Failed to obtain any schemas from reader 'GML' from 1 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information”,

“Workspace generation failed.”

But If I try to just view it using FME Inspector, the datasets works fine and I can open it without an error.

I already tried LoD1 from this source where I got the LoD2 from (it's some open source data of Germany that is free to download) and this dataset is usable without a problem.

So to my question - did someone already have a similar problem while using this kind of data and what can I do differently to use this data in FME Workbench as well?

Thanks already in advance for your help.

Greetings

Birte


3 replies

Userlevel 5
Badge +30

Hi @birte

The error is about the .xsd file. Could you share us the gml file to test?

Thanks,

Danilo

lod2-369-5703-1-nw.zip

Hi @danilo_fme

thanks for your help and answer. Sure, an example of the data is attached.

Regards,

Birte

Userlevel 5
Badge +25

The .xsd file that's being referred to does not exist in that location (a surprisingly common issue with XML/GML datasets...). The XSD tells FME (or any other parsing software) how the data is structured and thus is necessary if you want to properly process it.

A bit of googling came up with this one instead: http://repository.gdi-de.org/schemas/adv/citygml/appearance/1.0/appearanceLoD2.xsd so I tried to use that. You can specify that in the parameters section of the reader so that it will override the one that's referred to in the document itself.

However, I still get errors... Since those XSD's can refer to eachother as well there's probably a chain of dependencies with one, or more, broken links.

So as a last resort I'm reading it as XML, then use feature paths to find the elements in there that can be mapped to FME feature types.

Then by using a GeometryReplacer, specifying the xml_fragment attribute as the source and GML as the geometry type I can have it form proper geometries (except for 1 feature that gets rejected by the GeometryReplacer).

The downside of this method is that while it works it can only find attributes that are actually in this specific file. If you'd be able to use the XSD you'd be certain you have all attributes.

Hope this helps. For a long-term solution you'd best look for a proper set of those XSD's.

Reply