Can we transform cesium cartesian coordinate with different verticle datum?

Hello Team,
I have a list of cartesian coordinate from a third party software which are already projected in cesium cartesian CRS with EPSG:4978.
Is it possible to transform this cesium cartesian coordinates with EPSG:6695 vertical datum ? so that height will get added into these points ?

Thank you.

Depends on what you mean here. If your coordinates are in EPSG:4978 (aka WGS84) as Cartesian (meaning earth centered, earth fixed to the WGS84 model), that means they already have a 3D notion to them, so they could be either aligned to a terrain (to various degrees of accuracy) or just to the ellipsis surface itself.

EPSG:6695 can be used as a transform to a different geoid (local specificity, most of the time), but these would be slight modifications on height (ie its not a geoid model itself, but a transform between ellipsis definitions) and not a way to “create” height. Unless, of course, as this is the part that’s a bit confusing for me, maybe share with us what this EPSG:4978 cartesian coordinate looks like? Maybe it’s more like a cartographic / geographic projected coordinate?

Cesium don’t have coordinate transformations as part of it, but look at the PROJ library (aka PROJ4) which can transform coordinates between systems.



1 Like

Hello @Alexander_Johannesen
Thank you for your reply.
I have an las file with horizontal(EPSG:6677) and vertical datum(EPSG:6695) info in it.
When I upload this file on cesium ion it is getting placed at the correct location because of the added datum information.
But when I try to create the mesh with the point’s from that file, it is not correctly aligned with it.
There is gap between point cloud tileset and the green cesium primitive that I am rendering from point cloud data.
Check out this snap.

I don’t want this gap between them they should be properly aligned.
How can I do that ?

please find the las file and text file. (4.4 KB)

Ok, do you mean automatically, or are you happy to transform it? There’s a sandcastle for 3d model height adjustment you can use to pull down the height down to the surface. You could get fancy and pick from both the entity and your model, find the difference and height adjust that, or just manually if you know the offset.

As to the mesh, what are you using to create it?



Hello @Alexander_Johannesen
Thank you for your reply.
It should happen automatically.

I don’t have the offset with me, I need to calculate the offset, How can I do that ?, without any mouse operation ,it should happen in background.

For mesh creation I am using.

 const geometry = Cesium.GeometryPipeline.computeNormal(new Cesium.Geometry());
 const instance = new Cesium.GeometryInstance();
 viewer.scene.primitives.add(new Cesium.Primitive());

Thank you !!

Hello do you have any examples that I can use to transform coordinates between coordinate system’s using proj4 library ?
Like for example if I have transform from EPSG:6677 (horizontal datum ) to EPSG:6695 (vertical datum).
How can I do that using proj4 ?

Thank you.

Can’t help you with the specifics of those EPSG codes, but they should be easy to find. They look something like this;

'+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees'

The more complex they are, especially if they are projected coordinate systems, the definitions gets longer and more cryptic, of course. Apart from that, all the info you need you’ll find at