1
- # Moving Feature On Cesium
1
+ # Moving Feature On Cesium (MFOC)
2
2
3
- ## Visualize Movement
3
+ We are developing API for this project.
4
+
5
+ [ OGC Moving Features Encoding Extension - JSON] ( https://ksookim.github.io/mf-json/ )
6
+
7
+
8
+ #### Visualize Movement
4
9
5
10
* movePolygonArray([ movingfeature_array] , with_height);
6
11
7
12
movingfeature is moving feature json object array.
8
13
14
+ It should be have 'temporalGeometry' key.
15
+
9
16
'with_height' means path of animation with own height.(boolean)
10
17
11
- return czml.
18
+ Returns [ czml] ( https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/CZML-Guide ) object .
12
19
13
20
``` js
14
21
var mf1 = {
@@ -32,25 +39,30 @@ var mf1 = {
32
39
" name" : " Max wind speed" ,
33
40
" uom" : " kt" ,
34
41
" values" : [ 0.0 , 0.0 ,... , 0.0 , 0.0 ],
35
- " datetimes" : [ " 2015-07-30 03:00:00" ,.., " 2015-08-11 03:00:00 " , " 2015-08-11 09:00:00 " , " 2015-08-11 15:00:00 " , " 2015-08-11 21:00:00 " , " 2015-08-12 03:00:00 " , " 2015-08- 12 09:00:00" ],
42
+ " datetimes" : [ " 2015-07-30 03:00:00" ,.., " 2015-08-12 09:00:00" ],
36
43
" interpolations" : " Linear"
37
44
} ]
38
45
}
39
46
var mf_arr = [ mf1, mf2 ]; // mf is movingfeature object.
40
47
var czml = movePolygonArray (mf_arr);
41
48
```
42
49
43
- * movePointArray([ mf_arr] , with_height);
50
+ * movePointArray([ mf_arr] , with_height)
44
51
45
- * moveLineStringArray( [ mf_arr ] , with_height);
52
+ Returns czml object.
46
53
47
- ## Draw Primitive
54
+ * moveLineStringArray([ mf_arr] , with_height)
55
+
56
+ Returns czml object.
57
+
58
+
59
+ #### Draw Primitive
48
60
49
61
* drawPolygons([ mf_arr] , with_height)
50
62
51
- draw multiple Polygon.
63
+ Draw multiple Polygon.
52
64
53
- return Cesium.primitiveCollection
65
+ Return Cesium.primitiveCollection.
54
66
55
67
* drawTyphoons([ mf_arr] , with_height)
56
68
@@ -64,14 +76,43 @@ draw multiple Point.
64
76
65
77
draw multiple LineString.
66
78
67
- ## view Properties graph
79
+ * drawPointsPath([ mf_arr] , with_height)
80
+
81
+ Returns Cesium.PolylineCollection. Draw path for MovingPoint.
82
+
83
+ * drawLinesPath([ mf_arr] , with_height)
84
+
85
+ Returns Cesium.PrimitiveCollection. Draw triangles using each linestring points.
86
+
87
+
88
+ #### Draw IndoorGML Data (With Z-value)
89
+
90
+ * drawPointsWithZvalue([ mf_arr] , with_height);
91
+
92
+ Returns Cesium.PointPrimitiveCollection. z-value apperas in color.
93
+
94
+ ``` js
95
+ $ .getJSON (' json_data/indoor.json' ).then (
96
+ function (data ){
97
+ var mf_arr = [];
98
+ for (var i = 0 ; i < data .features .length ; i++ ){
99
+ mf_arr .push (data .features [i]);
100
+ }
101
+ scene .primitives .add (drawPointsWithZvalue (mf_arr, true ));
102
+ }
103
+ );
104
+ ```
105
+
106
+ #### View Properties graph
68
107
69
108
* showProperty([ obj_arr] , div_id)
70
109
71
- showProperties by d3 graph. (https://github.com/d3/d3/blob/master/API.md )
110
+ Show Property graph by [ d3] ( https://github.com/d3/d3/blob/master/API.md ) .
111
+
112
+ It is recommended that propery objects have same attributes.
72
113
73
114
``` js
74
- < div id= " graph" class = " graph" > < / svg >
115
+ < div id= " graph" class = " graph" > < / div >
75
116
var property1 = {
76
117
" name" : " central pressure" ,
77
118
" uom" : " hPa" ,
@@ -82,3 +123,25 @@ var property1 = {
82
123
var property2 = { ... }
83
124
showProperty ([property1, property2,..], ' graph' );
84
125
```
126
+
127
+ #### View hotspot cube
128
+
129
+ * show3DHotSpotMovingPoint([ mf_arr] , x_deg, y_deg, time_deg, max_height)
130
+
131
+ Show Hotspot cube for MovingPoint Array.
132
+
133
+ 'x_deg' is how much divide longitude.
134
+
135
+ 'y_deg' is latitude.
136
+
137
+ 'time_deg' is seconds.
138
+
139
+ 'max_height' is meters that assume how much maximum height. it can be omitted.(default 15000000)
140
+
141
+ ``` js
142
+ scene .primitives .add (show3DHotSpotMovingPoint (mf_arr, 1 , 1 , 3600 ));
143
+ ```
144
+
145
+ e.g.
146
+
147
+ ![ hotspotPoint] ( http://i.imgur.com/7pN8bDz.png )
0 commit comments