Code Monkey home page Code Monkey logo

Comments (6)

yaozhihang avatar yaozhihang commented on August 18, 2024

Unfortunately, no.
In Google Earth, we can use the "relative to ground" altitude mode to ensure that the 3D models can always be perfectly placed on the Earth surface regardless of whether the terrain is enabled or not. However, the current version of Cesium doesn't support this feature yet.

from importer-exporter.

walterogrady avatar walterogrady commented on August 18, 2024

Is there a work around (hack :-) )?

from importer-exporter.

yaozhihang avatar yaozhihang commented on August 18, 2024

In my opinion, one possible solution could be to use the FME software to adjust the z-coordinates of the CityGML objects according to the DEM data from which the Cesium Terrain model has been derived.
The source of the worldwide DEM data is available via:
https://cesiumjs.org/stk-world-terrain.html

The newly created/processed CityGML data should be imported into a 3DCityDB instance again. Then, by choosing the option "Use original z-coordinates without transofrmation" combined with the "absolute" altitude model with "no offset", the exported KML/glTF models should be able to be properly visualized on the Cesium terrain.

from importer-exporter.

walterogrady avatar walterogrady commented on August 18, 2024

Thank you for the tip.

I now create CityGML files that use the GPS Ellipsoidal Height for the altitudes. Cesium seems to use this for altitude. I use the export options you suggested and it works so far.

For anyone who is interested here is a calculator that lets you calculate the GPS Ellipsoidal Height:
https://www.unavco.org/software/geodetic-utilities/geoid-height-calculator/geoid-height-calculator.html
GPS Ellipsoidal Height = Orthometric Height + Geoid Height
Orthometric Height is height above sea level and is used by Google Earth. The difference between Cesium altitude and Google Earth altitude is the Geoid Height and that varies with location.

from importer-exporter.

yaozhihang avatar yaozhihang commented on August 18, 2024

Excellent! thanks very much for sharing your great work with us.

from importer-exporter.

clausnagel avatar clausnagel commented on August 18, 2024

Closing, since a solution was found. Should your problem persist, feel free to re-open this discussion any time.

from importer-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.