Skip to main content

Dear all,

I am learning how to export my data to GML. My file has many buildings (including roofs and walls), I separated the roofs and walls for each building using FME.

Now, I want to make a CityGML file from this data using FME.

It was pretty good when I used the gml_id (in Building class) based on the building's name. The roofs and walls (with gml_parent_id was set as the name of the building) had attached to the correct building (Figure1).

But when I inserted and validated this CityGML file into the 3D CityDB software, these were some errors (Figure 2).

I tried to ignore gml_id in the Building class (do not change gml_parent_id of the roofs and walls), checking this CityGML file (in the 3D CityDB software) was OK. Unfortunately, the roofs and walls were not attached to the correct buildings (Figure 3).

What did I miss and what should I do to solve it?

Does anyone have a solution to my problems? I am very grateful if anyone can respond (this took me several days). I am a beginner with FME and CityGML.

I am looking forward to hearing from you all. Thank you very much.

 

Best regards.

Hi @vanlam1188​, would it be possible for you to share a small sample of your data and the workspace with us, so we can take a closer look at it?


Hi @vanlam1188​, would it be possible for you to share a small sample of your data and the workspace with us, so we can take a closer look at it?

Dear alyssaatsafe,

 

Yes, definitely. I would like to send you my sample as well as the workspace that I used to convert a SketchUp file into a CityGML file.

There were a few modifications in this version.

I also attached an excel file that contained extra information about buildings (used in my workspace). I can view this GML file in FZKViewer.

But when I imported it into the 3DCity Database, I got some error notifications after I validated this file (please see error1.jpg).

This is error information:

<07:49:38 ERROR] Invalid content at a1887106,22]: cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.opengis.net/citygml/relief/2.0":reliefComponent}'. One of '{"http://www.opengis.net/gml":metaDataProperty, "http://www.opengis.net/gml":description, "http://www.opengis.net/gml":name, "http://www.opengis.net/gml":boundedBy, "http://www.opengis.net/gml":location, "http://www.opengis.net/citygml/2.0":creationDate, "http://www.opengis.net/citygml/2.0":terminationDate, "http://www.opengis.net/citygml/2.0":externalReference, "http://www.opengis.net/citygml/2.0":generalizesTo, "http://www.opengis.net/citygml/2.0":relativeToTerrain, "http://www.opengis.net/citygml/2.0":relativeToWater, "http://www.opengis.net/citygml/2.0":_GenericApplicationPropertyOfCityObject, "http://www.opengis.net/citygml/relief/2.0":lod}' is expected.

In some cases, I could validate the CityGML file successfully, but I got another error when I imported it into the Database using 3DCityDB (please see error2.jpg). I knew that the address in XLink did not exist in the CityGML file, how could I do to solve this problem?

What did I miss?

How can I group all buildings into one in CityGML? How can I create new groups for many different objects (for example, pipe network or manholes)?

I am a beginner with the FME software, so I am so happy if you can help me to eliminate the redundancies in my FME workplace.  

Hopefully, you can take a look at it and give me your advice.

Thank you so much and I am looking forward to hearing from you.

 

Best regards.


Those error you are seeing in the importer-exporter tool are because your gml:Id's contain spaces. A valid gml:Id must start with a letter and contain no spaces and also be unique. Otherwise it sounds like ​you're on the right track.

Also to note, the importer-exporter will probably be able to import these data ok without issue, however, other ​applications might have issues.

Good luck!​


Those error you are seeing in the importer-exporter tool are because your gml:Id's contain spaces. A valid gml:Id must start with a letter and contain no spaces and also be unique. Otherwise it sounds like ​you're on the right track.

Also to note, the importer-exporter will probably be able to import these data ok without issue, however, other ​applications might have issues.

Good luck!​

Also, be sure that you are writing out the data with a UTF-8 encoding, you can set this in the writer parameters. That should get rid if the unrecognised charachters (unless they are already in the data)​


Those error you are seeing in the importer-exporter tool are because your gml:Id's contain spaces. A valid gml:Id must start with a letter and contain no spaces and also be unique. Otherwise it sounds like ​you're on the right track.

Also to note, the importer-exporter will probably be able to import these data ok without issue, however, other ​applications might have issues.

Good luck!​

Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

I'm not sure if this is what you mean, but here is a workspace which creates a building with linked surfaces: ​https://hub.safe.com/publishers/con-terra/templates/citygml-create-building-lod-2-using-xlinks

If you mean to create actual groups of building then I think you want to look into CityobjectGroups. I have to say that I wouldn't recommend this approach as it isn't fully supported by a lot of tools.

Perhaps you could explain the reason you want to group objects and maybe there could be ​another option


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

I thought that there are a lot of similar objects on the earth's surface (buildings or bridges, ...) and grouping them together will lead to organize them easier. Am I wrong? I don't have depth knowledge about the CityGML and FME as well.

 

By the way, I have a sewer network in the city. How should I group and organize them to visualize leakage in the future (using Dynamizers module, for example)?


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

Ah right, yes CityGML lets you model objects in a city differently - With FME you can create Buildings, Bridges, Trees and all of the other features which CityGML supports. For a sewer network I would look into GenericCityObjects as there is no pipe schema - You can have a look at https://www.3drotterdam.nl/#/ as an example. They have modeled cables and pipes as GenericCityObjects. For writing CityGML data in FME you should take a good look at the FME documentation for the writer.

Typically CityGML is used as base city data which can be enriched in a 3D application with other data.

 

I wouldn't recommend Dynamizers, very few software packages really support them. I would look for another open standard to model live data. Check out the SensorThings API and the Frost Server.

 

 


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

Thanks for your reply.

 

Have you ever used Dynamizers before? 

I want to visualize dynamic data (data can come from sensors or tabulated data). Could you suggest me which module/software instead of Dynamizers?

 

Thanks so much.


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

No, not myself - I would recommend the SensorThings API and the Frost Server for storage and querying the data. I think you can set up an MQTT stream from the frost server which is fairly well supported.

As for visualising it really depends on the tool you use for visualising (Cesium, ESRI or other) as to what kind of content is supported. I would start by picking a visualisation platform and the seeing what kind of data is required/supported.

CityGML is an data model and exchange format that is very rarely worked on or visualised directly.


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

Thank you so much for your useful help.

I exported a CityGML file and used 3DCity Database to open it. Validating data was OK. But when I imported it into database, I got some error notifications (please see attached image).

I knew these errors appear because Xlink does not exist in my CityGML file. How can I deal with?

Please help me.

Thanks.


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

I suspect that these errors are related somehow to the textures or appearance. I'm not quite sure whats going on but it looks like you have some extra appearance references. I think it's fairly safe to ignore them though. It's hard to say where the problem is coming from. Were there any warnings in your fme log file?

Have you tired exporting a building to see how it looks?

 

I have a minor suggestion, if you can I would try and write the building data out as lod2solids instead of lod2MultiSurface that is a little better when it comes to best practice but it's not invalid what you have, just not as common.

 

I would also try and create xlinks from the solid surfaces to use the wall, ground and roof surfaces - this is an example showing how it can be done it FME https://hub.safe.com/publishers/con-terra/templates/citygml-create-building-lod-2-using-xlinks

If will safe space and is best practice


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

There was no error notification or any warnings in my fme log file. It reported that exporting was successful.

I tried to ignore these errors and importing into database was correct. But when I exported to kmz file to view on Google Earth Pro, the textures had gone.

Buildings in my CityGML file did not have footprint (ground surface), so I think that writing the buildings as lod2solids maybe getting unsuccessful.


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

Ok fair enough - hmm missing textures is no good! I'm sorry I can't look into this anymore. You could try creating an issue here: https://github.com/3dcitydb/importer-exporter/issues

 

Upload your example file - Perhaps they can explain why.


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

Oh you already have Ha!

https://github.com/3dcitydb/importer-exporter/issues/134


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

Did you check your export settings in the imp-exp to make sure your textures are being exported? Also try and export to CityGML first and have a look in FME


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

Yes. I tried to open my exported CityGML in FME, it was pretty good when texture had been imported successfully. Please see the attachment.


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

Awesome - and this is the output from the importer-exporter tool? Looks great. For the KML/Collada export be sure that you're selecting the correct appearance theme for export.


Dear virtualcitymatt,

Thank you for your reply.

I deal with this problem based on the way that you suggested. Could you tell me how to group many similar objects into one group using the FME (for example, buildings, bridges, etc.,)? 

Thanks in advance.

No. This is my original CityGML file. Maybe I missed something in setting parameters in KML/Collada export.

 

Thank you for your enthusiastic help.


Reply