I am trying to upload a simple OBJ file using the ION Rest API. The asset ID is 1116332. This is the body of the post request
const postBody = {
name: 'ShortBuilding',
description: 'Description',
type: '3DTILES',
options: {
position: [-0.02, 51.5, 0],
sourceType: '3D_MODEL',
clampToTerrain: true,
baseTerrainId: 1
}
};
The model is uploaded and located correctly (lat and long), but it is below the ground with respect to Cesium World Terrain. It is perfectly on the ground if in Cesium ION dashboard - Location Editor - Globe Settings
I select Mean Sea Level.
Any advice on how to select the correct height so that the model is clamped to the Cesium World Terrain?
Thanks
Hi
Thanks for sharing this use-case. I agree that its something we can add to the Upload REST API.
Right now the position is relative to EPGS:4326, but maybe we can add an option for the height reference as well. I’ll open an issue on our end for this.
I don’t think I have a great solution right now, but we’ll try to make this possible.
Regards
Shehzan
Thanks. Do you suggest using a different format?
Can you please share the link to the documentation you are using? I am referring to this Ion REST API documentation – Cesium and there is no reference to the position
option.
I used it because I saw it in another post.
Cheers
Ruggiero
Hi Ruggiero
I don’t think a different format is necessarily going to solve the issue. I’ve made a feature request to see if it is something we can add.
On Ion REST API documentation – Cesium, if you expand options
, choose 3D Model
, and then look at the position
tag, it shows the documentation I shared a screenshot for above.
Shehzan
1 Like