We are uploading 3D models via the Rest API and would like to use the optional position property (long/lat/height) to correctly geo locate the model on the globe. The documentation for this property states;
“this value is ignored if the source data already contains georeferencing information”
Is there any detailed documentation available regarding what sort of file formats and ‘georeferencing’ information is being referred to here?
Thanks for your question. I’d like to ask a couple questions that will help me get you the information you need:
What kinds of 3D data are you uploading? Are there metadata files in addition to the 3D models themselves? If you’ve uploaded some data and don’t mind sharing the ion asset ID, that would be the easiest way to show me what you have.
Are you finding that the optional position property is currently being ignored when you upload via REST API?
Currently we are mostly uploading LAS and OBJ files. For the LAS files it’s my understanding that the georeferencing information is a standard inclusion in the LAS file header. However, some of our LAS files come out as georeferenced 3D Tiles, and others do not. I will send you a message with example ion Asset id’s. I also have uploaded an OBJ with a metadata file, but this seems to be ignored. I’ll also send you an example of this.
I haven’t yet tried supplying the optional position property in the REST API as I wanted to understand what files would (or wouldn’t) require me to do that.
I tried following the KML example in the link by adding a .kml file alongside my OBJ, but again it didn’t seem to do anything. I’ll include a sample of this in the message.
Thanks very much for sending over the data. For the 3D models, how is the 3D data being collected/generated? Is it possible to export as a dae, gltf, or glb file from the software you’re using?
If I understand correctly what you’re looking to achieve, here are some steps that would allow you to use the KML/COLLADA option in ion:
For the 3D model itself, upload it as a COLLADA (.dae) file.
See the example below for how to ensure the KML file is linked to the COLLADA file and provides location information.
In the Cesium ion GUI, under What kind of data is this?, select KML/COLLADA (tile as 3D Tiles).
I took a look at the LAZ files you provided, running pdal info on each of them. It seems that one of them specifies a CRS in its header (EPSG:4326) but the other doesn’t, which is why only one of them gets georeferenced properly.
Do you know the CRS for the data that is missing a CRS in its header? If so, you might be able to set it manually using a tool like pdal or LAStools.
Thanks for this additional information. Are you saying that if I provide a KML file (using the format in the example above) this will feed all this information (including orientation) into the Cesium tiling pipeline? But this will only work when using .dae COLLADA?
Yes, if you upload a KML file in that format alongside COLLADA data, it will feed it into the tiling pipeline and place the data at that location on the globe. Using this approach to manually georeference geometry is somewhat nonstandard, but it will work. Typically, the KML file is generated by whatever software generates the source data itself.
The reason we support KML/COLLADA specifically is because that combination of files can be exported from software like CityEngine, Rhino, 3DCityDB, SketchUp, and others. To my knowledge, we don’t support file types other than COLLADA (dae) for this workflow, but let me check my information on this and get back to you.
I would recommend trying this approach with a minimal example to see if it works for you. Here is an example KML/COLLADA combination:
Below are the ion settings you would use with these. Once they finish tiling, ensure the asset is selected under My Assets and click Open complete code example at the bottom of the panel on the right.
Would you mind sharing the name of the software that generated the data? I’m checking with a colleague on this, and knowing the source of the data would help us understand if there are alternatives we can suggest.
I’m having to revisit this issue. We have found that different software will populate different levels of SRS/CRS information in the VLR’s in the header of a LAS file. We want to make sure these headers are written consistently so they are interpreted correctly by Cesium. To do this we need to understand specifically which of these VLR’s Cesium is using. I’ve added links to an extract of the LAS header from two examples of the same model so you can see what I’m referring to.
Our point cloud tiler first checks for a WKT VLR (record ID = 2112). If a WKT VLR doesn’t exist, the tiler manually checks for GeoTIFF keys (record IDs = 34735, 34736, 34737) to reconstruct the WKT.