How to draw complex shapes in cesium like a radar search fence?

349 views
Skip to first unread message

hins...@gmail.com

unread,
Mar 12, 2019, 4:48:09 PM3/12/19
to cesium-dev
I am trying to draw a shape similar to the blue image in the attached picture. I feel like I have tried every shape possible in cesium. I have tried polylineVolumes, polygons,and many more. I am new to cesium and do not see how to draw complex shapes. Does anyone have any advice on what to try. Here is some code that got me the closest to what I wanted but still will not work.


var orangePolygon = viewer.entities.add({
name: 'Orange polygon with per-position heights and outline',
polygon: {
hierarchy: Cesium.Cartesian3.fromDegreesArrayHeights(
[155.5, 54.37139, 50000,
154.5, 54.37139, 50000,
135.87694, 72.37139, 500000,
175.87694, 72.37139, 500000
]),
extrudedHeight: 0,
perPositionHeight: true,
material: Cesium.Color.ORANGE.withAlpha(0.5),
outline: true,
outlineColor: Cesium.Color.BLACK
}
});

search_fence.jpg

Omar Shehata

unread,
Mar 14, 2019, 5:37:46 AM3/14/19
to cesium-dev
There is sensor viewshed package built on top of CesiumJS that does what you need that's available for commercial use:


It constructs custom geometry to visualize these new types of entities. This tutorial explains a bit about CesiumJS's primitives and geometry:

https://cesiumjs.org/tutorials/Geometry-and-Appearances/

There aren't any tutorials on creating custom geometry right now, but you might find some helpful threads, like this one:

Andrew Hinson

unread,
Mar 14, 2019, 10:34:54 AM3/14/19
to cesiu...@googlegroups.com
Sweet thank you. Do you know if there is an offline version of the ion sdk or an offline or open source version of the viewshed

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/NVDG3bRY5Eo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Omar Shehata

unread,
Mar 15, 2019, 5:51:16 AM3/15/19
to cesium-dev
 The ion sdk for measurements/viewsheds etc. is a fork of CesiumJS with these additional features, so it works offline just fine. It's not open source though.
Reply all
Reply to author
Forward
0 new messages