Cesium Data Visualization - Visualization storage portion scheduling system (with github source)

Cesium Data Visualization - Visualization storage portion dispatch system

purpose

Warehouse scheduling system needs a visual display of live material transport interface and in line with the location information sent by the GPS device, real-time rendering material transport conditions and storage warehouse. Thus, using the data visualization Cesium.

Explanation

This is just a prototype system development process.

Introduction Principles

Point, line, draw a picture not elaborate.

Entity plotted points using dynamic position property can develop some point in time of the appearance position, animation form.

The core code is as follows:

/**
* 计算 property
* @param source
* @returns {SampledPositionProperty|*}
*/
function computeFlight(source) {
// 取样位置 相当于一个集合
var property = new Cesium.SampledPositionProperty();
property.setInterpolationOptions({
interpolationAlgorithm: Cesium.LagrangePolynomialApproximation,
interpolationDegree: 2
});
for (var i = 0; i < source.length; i++) {
var time = Cesium.JulianDate.addSeconds(start, source[i].time, new Cesium.JulianDate);
var position =Cesium.Cartesian3.fromDegrees (Source [I] .longitude, Source [I] .dimension, Source [I] .height);
 // add a location, and the corresponding time 
property.addSample (Time, position); 
} 
return Property; 
} 
// dynamic point 
viewer.entities.add ({ 
position: Property, 
name: "No. Renaissance" , 
Description: "carrying capacity: 100T" , 
path: { 
Show: to true , 
leadtime: 0 , 
trailTime: 10 , 
width: . 5 , 
Resolution: 5 , 
Material: new new Cesium.PolylineOutlineMaterialProperty ({
color: Cesium.Color.fromAlpha(Cesium.Color.RED, 1),
outlineWidth: 1,
outlineColor: Cesium.Color.red
})
},
availability: new Cesium.TimeIntervalCollection([new Cesium.TimeInterval({
start: Cesium.JulianDate.addSeconds(start, data[j][0].time, new Cesium.JulianDate),
stop: Cesium.JulianDate.addSeconds(start, data[j][data[j].length - 1].time, new Cesium.JulianDate),
isStartIncluded: true,
isStopIncluded: false,
data: Cesium.Cartesian3.fromDegrees(110, 39)
})]
)
});

Specific details, you can read the source code

For more details, see the following article in the link :

GIS small column of this article: Cesium Data Visualization - Visualization storage portion scheduling system (with source code download)

Article provides source code, are interested in this column, you can focus on a wave

Guess you like

Origin www.cnblogs.com/giserhome/p/11306109.html