3dcitydb / 3dcitydb-web-map

Cesium-based 3D viewer and JavaScript API for the 3D City Database
Apache License 2.0
377 stars 125 forks source link

CityGML on Cesium ion with terrain #38

Closed kilsedar closed 6 years ago

kilsedar commented 6 years ago

Hello, I want to visualize CityGML on Cesium ion with terrain.

I set in the preferences of 3D City Database Importer/Exporter:

(I actually used all the combinations and neither worked, however this is the one that makes the most sense to me.)

Below is what happens:

terrain

If I remove the terrain from the globe and if I mark in the preferences of 3D City Database Importer/Exporter "move each object to bottom height 0", the buildings are placed on the globe right, as below:

no-terrain

Is there anything I can do to solve this problem?

Thanks.

thomashkolbe commented 6 years ago

Hi,

altitude mode "clamp to ground" can not be used in a sensible way for the KML/COLLADA/glTF export modes "Geometry" or "COLLADA/glTF" (see the documentation for explanations).

When your CityGML objects have proper altitude values, I recommend to use altitude mode "absolute" and altitude offset "no offset". In this case the KML/glTF data is exported with the original CityGML Z values. It depends on the quality of the DEM that is being used within Cesium, if the 3D objects are shown at proper elevations or whether they look "flying" or "drowning" with regard to the DEM.

Only when you want to visualize your 3D models in Google Earth, then you should choose altitude offset "use generic attribute "GE_LoDn_zOffset"", because then the absolute elevation of each 3D object is adjusted individually in a way making sure that it neither sinks into nor floats over the Google Earth terrain model. We do not have a similar function for the Cesium ion DEM.

The general recommendation when using Cesium is to use a local DEM that is fitting to the CityGML objects. There are Open Source as well as commercial tools available to generate Cesium-compatible terrain model representations from e.g. raster grid DEMs. See, for example, here: https://github.com/tum-gis/cesium-terrain-builder-docker

Best regards Thomas Kolbe

Am 06.09.18 um 16:14 schrieb kilsedar:

Hello, I want to visualize CityGML on Cesium ion with terrain.

I set in the preferences of 3D City Database Importer/Exporter:

  • altitude mode: clamp to ground,
  • altitude offset: use generic attribute "GE_LoDn_zOffset", call Google's elevation API when no data available.

(I actually used all the combinations and neither worked, however this is the one that makes the most sense to me.)

Below is what happens:

terrain https://user-images.githubusercontent.com/6500947/45162751-055bc300-b1ef-11e8-8020-440e29e60943.png

If I remove the terrain from the globe and if I mark in the preferences of 3D City Database Importer/Exporter "move each object to bottom height 0", the buildings are placed on the globe right, as below:

no-terrain https://user-images.githubusercontent.com/6500947/45162880-481d9b00-b1ef-11e8-9e3a-487431ebd1cf.png

Is there anything I can do to solve this problem?

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/3dcitydb/3dcitydb-web-map/issues/38, or mute the thread https://github.com/notifications/unsubscribe-auth/AGiF1s8XMlaJfP0EVF2Z1rrm3m8z8rhpks5uYS3CgaJpZM4WdBjj.

--


Prof. Dr. Thomas H. Kolbe Email: thomas.kolbe@tum.de Chair of Geoinformatics WWW : http://www.gis.bv.tum.de Faculty of Civil, Geo and Secretary: +49 89 289-22578 and Environmental Engineering Phone: +49 89 289-23888 Technische Universität München Fax : +49 89 289-22878 Arcisstraße 21
80333 München, Germany

Chairman of the Round Table Geoinformation Systems (Runder Tisch GIS e.V.) http://www.rundertischgis.de/

The Chair of Geoinformatics has won the award "Selected Landmark 2016" in the national contest "Germany - Land of Ideas" http://www.gis.bgu.tum.de/en/projects/sddi/

kilsedar commented 6 years ago

Dear Mr. Kolbe, thanks for your answer. How to solve the problem is clear now.