Skip to main content

Hi,

I have a CityGML file where a building has an outerBuildingInstallation. When I read the file with FME Reader the outerBuildingInstallation does not get the gml_parent_id but a generic one from the FME Reader. Without having the gml_parent_id (that is the ID of the building) I cannot merge the building with the outerBuilingInstallation.

Why is that? Do I make mistake? I cant figure out why the gml_parent_id has got a value I cant use.

Here is part of the CityGML file:

<cityObjectMember>
<bldg:Building gml:id="_22631">
<gen:stringAttribute name="citygrid_UnitID">
<gen:value>22631</gen:value>
</gen:stringAttribute>
<bldg:outerBuildingInstallation>
<bldg:BuildingInstallation>
<bldg:boundedBy>
<bldg:RoofSurface>
<gen:doubleAttribute name="Flaeche">
<gen:value>9.403696</gen:value>
</gen:doubleAttribute>
<gen:doubleAttribute name="Neigung">
<gen:value>4.915</gen:value>
</gen:doubleAttribute>
<gen:doubleAttribute name="Ausrichtung">
<gen:value>-165.896</gen:value>
</gen:doubleAttribute>
<bldg:lod3MultiSurface>
...
<bldg:boundedBy>
<bldg:RoofSurface>
<gen:doubleAttribute name="Flaeche">
<gen:value>46.300252</gen:value>
</gen:doubleAttribute>
<gen:doubleAttribute name="Neigung">
<gen:value>35.379</gen:value>
</gen:doubleAttribute>
<gen:doubleAttribute name="Ausrichtung">
<gen:value>-165.902</gen:value>
</gen:doubleAttribute>
<bldg:lod3MultiSurface>
<gml:MultiSurface>
<gml:surfaceMember>
<gml:Polygon gml:id="UUID_3097a998-62bd-42f0-a6a4f76de7e225da">

The outerBuildingInstallation gets as gml_parent_id "fme-gen-2cfc94c4-ddcc-4f4e-af2c-3d3694807079" whereas the RoofSurface gets - as expected - "_22631".

Any suggestions?

Many thanks, Rob

Hi @rob_f,

Could you try to reset it manually with an AttributeCreator to see if it works on that specific model?

 

 

Cheers.

Lyes

 


Hi Lyes,

I tried it but the attribute is still filled with a generic FME ID and not with the gml_id I expected.

Rob


Hi Lyes,

I tried it but the attribute is still filled with a generic FME ID and not with the gml_id I expected.

Rob

Hi Rob,

 

Would you be able to share the data and the workspace? Or at least make a screenshot of the workspace?

 

 

Thanks.

 

 

 


Hi, I have attached a sample file.

The workspace I'm using is this one:

https://github.com/Esri/3d-cities-template/blob/master/Workflows/3DCityMaintenance/CityGML%20Tools/Import%20Building.fmw

What I want to achive is to merge the building with its dormer (outerBuildingInstallation),

Thank you!test-2.zip


Hi Lyes,

I tried it but the attribute is still filled with a generic FME ID and not with the gml_id I expected.

Rob

Hi, I have the same problem. Any progress here? any idea how to keep the gml Ids- in the outerBuildingInstallation shape-file?

 

 


Hi @rob_f,

The BuildingInstallation is getting the gml_parent_id from the parent:

 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Feature Type: `BuildingInstallation_LOGGED'
Attribute(encoded: UTF-16LE): `citygml_feature_role' has value `outerBuildingInstallation'
Attribute(encoded: UTF-16LE): `citygml_target_uri' has value `http://www.opengis.net/citygml/building/2.0'
Attribute(string)           : `fme_feature_type' has value `BuildingInstallation'
Attribute(entangled: string): `fme_type' has value `fme_no_geom'
          entangled to `xml_type]
Attribute(encoded: UTF-16LE): `gml_id' has value `fme-gen-ca447f26-a592-4ee3-a543-5f556dd0cc71'
Attribute(encoded: UTF-16LE): `gml_parent_id' has value `_22631'
Attribute(string)           : `xml_type' has value `xml_no_geom'
Geometry Type: Unknown (0)
===========================================================================

gml_id is generic, generated by the GML reader, because the BuildingInstallation itself is lacking a gml:id, but the gml_parent_id does point back to the "_22631" parent "Building".

Which FME build are you using?

Regards,
 Juan
 


Hi @rob_f,

The BuildingInstallation is getting the gml_parent_id from the parent:

 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Feature Type: `BuildingInstallation_LOGGED'
Attribute(encoded: UTF-16LE): `citygml_feature_role' has value `outerBuildingInstallation'
Attribute(encoded: UTF-16LE): `citygml_target_uri' has value `http://www.opengis.net/citygml/building/2.0'
Attribute(string)           : `fme_feature_type' has value `BuildingInstallation'
Attribute(entangled: string): `fme_type' has value `fme_no_geom'
          entangled to `xml_type]
Attribute(encoded: UTF-16LE): `gml_id' has value `fme-gen-ca447f26-a592-4ee3-a543-5f556dd0cc71'
Attribute(encoded: UTF-16LE): `gml_parent_id' has value `_22631'
Attribute(string)           : `xml_type' has value `xml_no_geom'
Geometry Type: Unknown (0)
===========================================================================

gml_id is generic, generated by the GML reader, because the BuildingInstallation itself is lacking a gml:id, but the gml_parent_id does point back to the "_22631" parent "Building".

Which FME build are you using?

Regards,
 Juan
 

Hi Juan,

 

I do have the same problem. Wehn I convert a Gml file to a shape file, the attribute table in the shape file has only fme- generated Ids and no parents-ids. I need to have the gml ids in the shape file. Since i am very new to Fme, i do not get what yoh mean by " which FME build". Could you please give me some hints? 

 

 

 

thanks,

 

maryam

 

 


Hi thanks fpr your rely - I stopped working on this problem some time ago. I cant remember which version I used - we have two or three installed side by side,

Rob


Hi @rob_f,

The BuildingInstallation is getting the gml_parent_id from the parent:

 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Feature Type: `BuildingInstallation_LOGGED'
Attribute(encoded: UTF-16LE): `citygml_feature_role' has value `outerBuildingInstallation'
Attribute(encoded: UTF-16LE): `citygml_target_uri' has value `http://www.opengis.net/citygml/building/2.0'
Attribute(string)           : `fme_feature_type' has value `BuildingInstallation'
Attribute(entangled: string): `fme_type' has value `fme_no_geom'
          entangled to `xml_type]
Attribute(encoded: UTF-16LE): `gml_id' has value `fme-gen-ca447f26-a592-4ee3-a543-5f556dd0cc71'
Attribute(encoded: UTF-16LE): `gml_parent_id' has value `_22631'
Attribute(string)           : `xml_type' has value `xml_no_geom'
Geometry Type: Unknown (0)
===========================================================================

gml_id is generic, generated by the GML reader, because the BuildingInstallation itself is lacking a gml:id, but the gml_parent_id does point back to the "_22631" parent "Building".

Which FME build are you using?

Regards,
 Juan
 

hi @maryamzirak,

 

Could you elaborate?  The citygml features read should carry both gml_id and gml_parent_id attributes, if the feature does not have a gml:id in the file then the CityGML reader will generate a uuid and set that uuid as the gml_id for the feature.  The gml_parent_id will have the value of the parent's gml_id.

 

Thanks,

 

Juan

 


hi @maryamzirak,

 

Could you elaborate? The citygml features read should carry both gml_id and gml_parent_id attributes, if the feature does not have a gml:id in the file then the CityGML reader will generate a uuid and set that uuid as the gml_id for the feature. The gml_parent_id will have the value of the parent's gml_id.

 

Thanks,

 

Juan

 

Hi @uanchuchow1323. Thanks for your answer. I have both gml Id and gml parent ID, however, I got the FME-generated Ids in the shapefile. One of my colleagues has suggested me using AttributeKeeper and set it to keep the gml-parent-ID. Now I do have the gml Parent Id in the shapefile.

 

Thanks,

 

Maryam

 

 

 

 

 

 


Reply