Search code examples
cesiumjs

What are the units (meters/kilometers/feet etc.) for cylinder radius while creating cylinder using Cesium API


What are the units (meters/kilometers/feet etc.) for cylinder radius while creating cylinder using Cesium API.

Refer code below:

What are the units of cylinderRadius and cylinderUpperHeight?

viewer.entities.add({
  name : "",
  position: Cesium.Cartesian3.fromDegrees(longitude, latitude, altitude),
  cylinder : {
     length : cylinderUpperHeight,
     topRadius : cylinderRadius,
     bottomRadius : cylinderRadius,
     material : Cesium.Color.GREEN.withAlpha(0.2),
     outline : true,
     outlineColor : Cesium.Color.GREEN.withAlpha(0.2)
 },
 description: description
});

I have the input for them in nautical miles so I have to convert them to required units.


Solution

  • Cesium uses SI units:

    • meters for distances,
    • radians for angles,
    • seconds for time durations.

    Converstion from Nautical Miles to meter

    1 Nautical Mile = 1852 Meters