Per point properties in 3D Tileset point cloud

In the Sandcastle Cesium Sandcastle, a point cloud tileset named “PointCloudWithPerPointProperties” is used, and the style definitions read the different properties (${temperature}, ${length}, ${time}).

How was this tileset made?
Since when I upload a LAS/LAZ file to ion, only Intensity and Classification survive the tiler pipeline.

Also: how to “query” a tileset to get a list of available properties?

1 Like

Hi Wouter, I don’t know which tool is used to create this tileset, but in the pnts file there is information about the properties in the batch table:

{
   "temperature":{
      "byteOffset":0,
      "componentType":"FLOAT",
      "type":"SCALAR"
   },
   "secondaryColor":{
      "byteOffset":4000,
      "componentType":"FLOAT",
      "type":"VEC3"
   },
   "id":{
      "byteOffset":16000,
      "componentType":"UNSIGNED_SHORT",
      "type":"SCALAR"
   }
}

Ciao,

Bert

Thanks :+1: Would you also be able to share how you read that information out of the pnts file?

In the spec (3d-tiles/specification/TileFormats/PointCloud at main · CesiumGS/3d-tiles · GitHub) there is information about the layout of the tiles:

To get the information it requires reading the header, the json metadata is stored in batchTableJson, the actual values in batchTableBytes

There currently are some efforts to revive the 3d-tiles-tools repository, and the updated state should contain a tool that can extract this information. It is not yet final/published, but there will soon be an analyze command (details in this PR) that, when applied to the .pnts file that you referred to, will create files that contain exactly this information, namely the batch table data…

{
  "temperature": {
    "byteOffset": 0,
    "componentType": "FLOAT",
    "type": "SCALAR"
  },
  "secondaryColor": {
    "byteOffset": 4000,
    "componentType": "FLOAT",
    "type": "VEC3"
  },
  "id": {
    "byteOffset": 16000,
    "componentType": "UNSIGNED_SHORT",
    "type": "SCALAR"
  }
}

and the feature table data

{
  "POINTS_LENGTH": 1000,
  "POSITION": {
    "byteOffset": 0
  },
  "RGB": {
    "byteOffset": 12000
  }
}

EDIT: Aaaand yes, @bertt also created something here, at GitHub - bertt/b3dm.tooling

That’s great news!

Also thanks for linking @bertt’s repo.

Ha, I had found that in the spec, and was still wondering how to get that stuff out of the files. I learned now that you know that very well: GitHub - bertt/b3dm.tooling :+1:

I found this tool that looks like just what I need to get points-with-properties. It’s not point cloud per se, but i3dm, which probably is even better. You seem to be familiar with it yourself: GitHub - Geodan/i3dm.export: Export i3dm's from PostGIS table :+1:

yeah, and for point clouds there is also GitHub - bertt/pnts-tile-cs: .NET Standard 2.0 Library for (de)serializing LiDAR tiles, it’s in a basic state for reading point cloud tiles.

1 Like