Soil layer visualization

I am trying to visualize soil layers that are based on borehole data. The terrain shape should be taken into account too. The borehole data looks like this:

[{
    name: "Borehole 1",
    id: 1,
    longitude: 24.223763049459652,
    latitude: 67.56402915407432,
    layers: [
      { thickness: 12, color: "brown", type: "Topsoil" },
      { thickness: 20, color: "sand", type: "Sand" },
      { thickness: 15, color: "darkgray", type: "Clay" },
    ],
  }]

I have already managed to get an array of interpolated points between the actual boreholes. The interpolated points have the coordinates and the height of the point that I got using sampleTerrainMostDetailed.

Now what would be the best way to render these layers? I have tried multiple solutions with no success.

I am new to CesiumJS, and I am not sure what would be the best approach to do this, so if anyone has any suggestions where to go from here, that would be much appreciated.

Have you had a look at the Cylinder entities? Maybe you can use one cylinder for each borehole layer, and stack those cylinders on top of each other to create a borehole visualization.

You can also use an extruded ellipse:

Hope this helps!

Hey!

Thank you for your reply! Unfortunately that’s not what I am after. I have actually already done the borehole visualizations but now I am trying to visualize the soil layers themselves, as in between the boreholes.

I’m using polygons, (simple rectangles), to visualize NOAA Ionosphere data. Here’s a screen shot.

In my use case the rectangles are shaded based on the value of the maximum frequency radio wave that will reflect off the ionosphere at that location. Could you use the colors shown in your data be used in a similar way?

As far as the mechanics of how to do this, I use a czml template that’s filled in with data and then served from github. The map legends are created on the fly using JavaScript that was initially prototyped using ChatGPT. The code is all open source and can be found in this github repo.

You might be most interested in the czml template for the moment.

Best Regards,
Hamilton Carter

That might actually be a great solution for my purpose, I will explore this further. Thank you so much for your reply!

1 Like