Matching CityGML Building IDs with IDs in Cesium

Hi everyone,

Note: I have to protect my works so the links won’t lead you anywhere.

I’m working on integrating my backend querying system with a Cesium + React frontend, but I’m running into an issue with CityGML building IDs not matching Cesium’s featureId.

When I query my backend using SPARQL, I get CityGML building IDs like this:
https://github.com/Project/CityGML#cityobject/100

To connect this with Cesium, I fetch the feature’s ID (*featureId/https://github.com/Project/CityGML#cityobject/**${featureId}***) on click and use it to query my backend. However, I noticed that:

  • Most buildings have featureId = 0
  • The IDs don’t match my dataset. Example:

I’m unsure if there’s a different way to retrieve the correct ID for querying. My project relies on accurate ID mapping, but I’m new to all of this.

Has anyone faced this issue before? Is there a way to correctly retrieve the original CityGML IDs in Cesium?

Any guidance would be greatly appreciated!

Thanks!