TatjanaKutzner / CityGML-UtilityNetwork-ADE

Apache License 2.0
17 stars 10 forks source link

Missing <annotation> for GML ReferenceType #12

Open yaozhihang opened 3 years ago

yaozhihang commented 3 years ago

The property connectedCityObject of the class AbstractNetworkFeature has a type of gml:ReferenceType https://github.com/TatjanaKutzner/CityGML-UtilityNetwork-ADE/blob/master/XSD/CityGML_UtilityNetworkADE.xsd#L119 An annotation element is usually required here which allows applications to know what is the target element. For example:

<element minOccurs="0" name="connectedCityObject" type="gml:ReferenceType">
  <annotation>
    <appinfo>
      <gml:targetElement>core:_CityObject</gml:targetElement>
    </appinfo>
  </annotation>
</element>

Could be a bug in ShapeChange? Or something is missing the shapechange configuration file?

TatjanaKutzner commented 3 years ago

The element gml:targetElement is part of the GML 3.2 encoding rule. It does not exist in GML 3.1.1. Since the ADE is based on CityGML 2.0, which in turn uses GML 3.1.1., ShapeChange behaves correctly in not adding this element.

The GML 3.1.1. standard, however, defines the following encoding for specifying the target element:

<element name="owner" type="gml:ReferenceType" minOccurs=”0”>
  <annotation>
    <appinfo source=”urn:x-gml:targetElement”>_CityObject</appinfo>
  </annotation>
</element>

This kind of annotation does not seem to be supported by ShapeChange.

yaozhihang commented 3 years ago

Thanks, you are right. It seems that adding to CityGML 2.0 ADE is not a correct and valid way. So, maybe the EnergyADE (http://www.citygmlwiki.org/images/a/ac/EnergyADE.xsd) XML schema shall be fixed accordingly.

TatjanaKutzner commented 3 years ago

I posted an issue in the Energy ADE repository to find out why the made use of the element: https://git.rwth-aachen.de/energyade/citygml-energy/-/issues/173