In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to simulate building floor data in Cesium development, which is very detailed and has a certain reference value. Interested friends must read it!
Multi-storey building, when the accurate model effect is not needed, use Cesium's Polygon to simulate the floor effect of each floor, set the height of each floor and the total number of floors, generate CZML files, and load the floor data in batches. According to Cesium's api, load a polygon with a high pull-up effect, using the following code:
Var greenPolygon = viewer.entities.add ({
Name: 'Green extruded polygon'
Polygon: {
Hierarchy: Cesium.Cartesian3.fromDegreesArray ([- 108.0, 42.0)
-100.0, 42.0
-104.0])
Height:50000
ExtrudedHeight: 100000.0
Material: Cesium.Color.GREEN
}
});
Height and extrudedHeight are the key parameters, height marks the height of polygon from the ground, extrudedHeight is the pull-up height of polygon, according to the floor height, set the height of each floor, add the floor height, set extrudedHeight to achieve the layered floor effect. The edits of the CZML data node are as follows:
{
"id": "floor_0"
"name": "floors"
, "polygon":
{"positions":
{"cartographicDegrees": [coordinate array]}
"material":
{
"solidColor":
{"color":
{"rgba": [255255255120]}
}
}
/ / ground height setting
"height": 0
/ / pull up height setting
"extrudedHeight": 4.6, "
Outline ": true}
}
Using js or other code, loop through the number of floors and height to generate the final CZML data.
The following is the simple floor display, plus the selection effect when you move the mouse:
These are all the contents of the article "how to simulate Building floor data in Cesium Development". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.