1

I want to display 3D city models, stored in a CityGML file, in a Cesium Virtual Globe. I used the software "3D City Database Importer/Exporter" to store this data in a PostGreSQL/PostGIS database. Then, to display in a Cesium Virtual Globe, I have to export this data as KML tiles. When I exported a single object, form level LoD2 of detail, displayed as Geometry, a SQL error occured. In the console, it is written the input geometry has an unknown SRID (0). I tried to edit the SRID from 0 to 2154 in the tab Database of "3D City Database Importer/Exporter". Nevertheless, I got the same error. Thus, how to fix this error ?enter image description here

2

3 Answers 3

1

When you (or whoever else) initialized the 3DCityDB instance, you didn't specify a spatial reference for it, which means that the data was saved with no SRID (i.e. set to 0). You will have to re-initialize the database with the proper SRID. Either delete the existing database or create a new one, then run the 3DCityDB setup scripts, but pay close attention to the prompts, and when it asks for an SRID, input the SRID that corresponds to the CityGML files you are importing. The message will look something like this:

Please enter a valid SRID (e.g., EPSG code of the CRS to be used).

You mentioned that your data is in 2154, so give this number as input. Once the data is imported into this new database, you should be able to export it to KML.

1

3DTiles is the OGC format CESIUM uses. There is a nodejs package for CityGML to 3Dtiles for bldg. Fme also has transformer/writer

2
  • Thanks for the answer. I find the solution with FME alone.
    – e-Viegas
    Commented Sep 26, 2019 at 12:59
  • "There is a nodejs package for CityGML to 3Dtiles for bldg." Where? Please include a link or at least a name. Commented Jul 28, 2022 at 12:17
0

As I can't comment so that I will write it here. You may have to provide the valid Spatial Reference Identifier SRID and an SRSName which is an OGC GML conformant CRS (coordinate reference system) definition identifier while importing the data to PostgreSQL Database.

Mark also the Extruded checkbox.

Perhaps this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.