Skip to main content

Hello to all, 

I have created with FME 2019 a CityGML file with the UtilityNetwork ADE extension. Some of the ADE feature types I am using are: Cable, ProtectiveElement, ConnectorComponent or PowerTransformer. These features have their own attributes according to the ADE specification but also, I added to them some generic attributes like: 

<gen:stringAttribute name="CableType">
<gen:value>MT</gen:value>
</gen:stringAttribute>

After that, I want to convert this CityGML files to other formats. 

To do this, I am trying to add a reader for this CityGML file (with the ADE extension), but it doesn’t recognize the generic attributes. 

In the CityGML reader, I have specified the parameters like that: 

0684Q00000ArCmdQAF.png

And I I get all the feature types lo load: 

0684Q00000ArCWgQAN.png

But when looking at the attributes of Cable for instance, I don’t see the generic ones on the list. I only see the ones from the ADE Specification: 

0684Q00000ArCqwQAF.png

I also have tried to add a Generic reader, but the problem here is that it only identifies the feature types that are part of the General CityGML without the ADE, because I can’t specify the schema file. There are no Cables, no PowerTransformers…. 

0684Q00000ArBo0QAF.png

But here in this case, I have to say that the Generic Attributes for Building are listed in the FME, so they are correctly identified. 

Any advice on what could I do, or which the problem is? 

Thanks to all in advance! 

Hi @benedito,

This sounds like an issue we should pass on to our development team. Would you mind supplying us with a sample of your data and the UtilityNetwork ADE file? If you do not want to make them public, you can send them to me direct: .


Hi @benedito,

This sounds like an issue we should pass on to our development team. Would you mind supplying us with a sample of your data and the UtilityNetwork ADE file? If you do not want to make them public, you can send them to me direct: .

Thanks @daveatsafe. I'll send you by mail a sample of the files we are using.


Just wondering if you could try the GML (or XML) reader here (ignore application schema set to yes). Maaaybe that might pick up the generic attributes which you could try and merge onto your CityGML features. Certainly not a nice way to do it but could be a (slow) workaround if you are desperate

If GML reader doesn't work it would be interesting to see how the XSD driven reader in FME 2020 handles it.

 


Hi @benedito,

I have created a Problem Report for our development team to address reading generic attributes when using an ADE (FMEENGINE-64663), and will notify you once we have a resolution.

In the meantime, I am attaching a workspace that uses the approach suggested by @virtualcitymatt to read the generic attribute using a GML reader and merges them onto the CityGML features.

 

ReadCityGML_GML.fmw

Hi @benedito,

I have created a Problem Report for our development team to address reading generic attributes when using an ADE (FMEENGINE-64663), and will notify you once we have a resolution.

In the meantime, I am attaching a workspace that uses the approach suggested by @virtualcitymatt to read the generic attribute using a GML reader and merges them onto the CityGML features.

 

ReadCityGML_GML.fmw

Hi @daveatsafe,

 

 

I tested your workspace with the approach suggested by @virtualcitymatt and it's working for me 🙂 so, nothing to add.

Thanks!


Just wondering if you could try the GML (or XML) reader here (ignore application schema set to yes). Maaaybe that might pick up the generic attributes which you could try and merge onto your CityGML features. Certainly not a nice way to do it but could be a (slow) workaround if you are desperate

If GML reader doesn't work it would be interesting to see how the XSD driven reader in FME 2020 handles it.

 

Thanks for your suggestion @virtualcitymatt, your workaround works for me :)


Hi @benedito,

We looked into this issue and found that the reason that the generic attributes are not being read is that the CityGML_UtilityNetworkADE.xsd file does not reference the generics.xsd file.

There are two solutions to this:

  1. modify the CityGML_UtilityNetworkADE.xsd; add an import for the generics schema.

     

     

    <import namespace="http://www.opengis.net/citygml/generics/2.0" schemaLocation="http://schemas.opengis.net/citygml/generics/2.0/generics.xsd"/>

2. Specify both generics.xsd and CityGML_UtilityNetworkADE.xsd files in the CityGML “Additional ADE Schema File(s)” reader parameter.

I updated the UtilitiesNetwork file, and the generic attributes are now being properly read. I am attaching the updated file.

CityGML_UtilityNetworkADE.zip


Hi @benedito,

We looked into this issue and found that the reason that the generic attributes are not being read is that the CityGML_UtilityNetworkADE.xsd file does not reference the generics.xsd file.

There are two solutions to this:

  1. modify the CityGML_UtilityNetworkADE.xsd; add an import for the generics schema.

     

     

    <import namespace="http://www.opengis.net/citygml/generics/2.0" schemaLocation="http://schemas.opengis.net/citygml/generics/2.0/generics.xsd"/>

2. Specify both generics.xsd and CityGML_UtilityNetworkADE.xsd files in the CityGML “Additional ADE Schema File(s)” reader parameter.

I updated the UtilitiesNetwork file, and the generic attributes are now being properly read. I am attaching the updated file.

CityGML_UtilityNetworkADE.zip

Ohhh ok. Both solutions are working for me.

 

I didn't realize that it in fact, it is possible to add more than one references to ADE Schema Files in the reader.

Ohhh ok. Both solutions are working for me.

 

I didn't realize that it in fact, it is possible to add more than one references to ADE Schema Files in the reader.

Hi @benedito,

We have modified the latest FME 2020.1 beta to automatically reference the generics.xsd file, to better read ADE data from XSDs like the one you supplied.


Reply