How do I access to polygon properties?

Hello guys,

I’m newbie of cesiumjs.

As the image, I want to access to the polygon added on the cesium.viewer.

how do I access the properties like written at here(height, extrudedHeight etc )?
http://localhost/CesiumIonSDK/Build/Documentation/PolygonGeometry.html?classFilter=polygon

thanks team
Hiroshi

var viewer = new Cesium.Viewer(“cesiumContainer”, {
terrainProvider: Cesium.createWorldTerrain(),
});

var entity = viewer.entities.add({
polygon: {
hierarchy: new Cesium.PolygonHierarchy(
Cesium.Cartesian3.fromRadiansArray([
-1.3194369277314022,
0.6988062530900625,
-1.3193955980204217,
0.6988091578771254,
-1.3193931220959367,
0.698743632490865,
-1.3194358224045408,
0.6987471965556998,
])
),
material: Cesium.Color.RED.withAlpha(0.5),
classificationType: Cesium.ClassificationType.BOTH,
},
});

viewer.zoomTo(entity)

console.log(entity.polygon)

1 Like

I guess that you want to get some properties from points of point cloud dropped in the drawn polygon.
am I right?

1 Like

Hello @ZhefengJin . this is Hiroshi. I hope you realize me.

Yes you are right. Thanks for the clarification.

Maybe

1 make sure that your pointcloud has a batch table.
2 get Cesium3DTileFeatures contained in the given polygon.
3 access necessary properties via Cesium3DTileFeature 's API.

1 Like

Hi @ZhefengJin.
Can you give some tips to get Cesium3DTileFeatures contained in the given polygon.?

Thanks for your support.

Best
Moises

1 Like