-
Notifications
You must be signed in to change notification settings - Fork 3
/
example_pointcloud.html
82 lines (66 loc) · 4.34 KB
/
example_pointcloud.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<title>Point Cloud</title>
<link rel="stylesheet" type="text/css" href="css/x3dom.css" />
<link rel="stylesheet" type="text/css" href="css/earthservergenericclient.css" />
<link rel="stylesheet" type="text/css" href="js-ext/jquery-ui/themes/base/jquery-ui.css">
<script type="text/javascript" src="js-ext/x3dom-full.js"></script>
<script type="text/javascript" src="js-ext/jquery-ui/jquery-1.9.1.js"></script>
<script type="text/javascript" src="js-ext/jquery-ui/ui/jquery-ui.js"></script>
<script type="text/javascript" src="js/EarthServerClient_DailyBuild.js"></script>
<script type="text/javascript">
// basic setup:
EarthServerGenericClient.MainScene.setTimeLog(false);//TimeLogging: outputs time of loading and building the models to the console
EarthServerGenericClient.MainScene.addLightToScene(true);
EarthServerGenericClient.MainScene.setBackground("0.8 0.8 0.95 0.4 0.5 0.85 0.3 0.5 0.85 0.31 0.52 0.85","0.9 1.5 1.57","0.8 0.8 0.95 0.4 0.5 0.85 0.3 0.5 0.85 0.31 0.52 0.85","0.9 1.5 1.57");
// some new features:
EarthServerGenericClient.MainScene.setDrawGrid(0,100,0,60,0,100,10);
EarthServerGenericClient.MainScene.setDrawCompass(true,1.57,"1 1 1","N");
EarthServerGenericClient.MainScene.setCubeBaseLink("http://earthserver.bgs.ac.uk/petascope?query=for%20i%20in%20(bgs_rs)%20return%20encode%20(%20%7B%20red%3A%20scale(trim(i.red%2C%20%7Bx%3A%22http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F27700%22(400000%3A450000)%2C%20y%3A%22http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F27700%22(500000%3A550000)%20%7D)%2C%20%7Bx%3A%22CRS%3A1%22(0%3A500)%2C%20y%3A%22CRS%3A1%22(0%3A500)%7D%2C%20%7B%7D)%3B%20green%3A%20scale(trim(i.green%2C%20%7Bx%3A%22http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F27700%22(400000%3A450000)%2C%20y%3A%22http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F27700%22(500000%3A550000)%20%7D)%2C%20%7Bx%3A%22CRS%3A1%22(0%3A500)%2C%20y%3A%22CRS%3A1%22(0%3A500)%7D%2C%20%7B%7D)%3B%20blue%3A%20scale(trim(i.blue%2C%20%7Bx%3A%22http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F27700%22(400000%3A450000)%2C%20y%3A%22http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F27700%22(500000%3A550000)%20%7D)%2C%20%7Bx%3A%22CRS%3A1%22(0%3A500)%2C%20y%3A%22CRS%3A1%22(0%3A500)%7D%2C%20%7B%7D)%7D%2C%20%22png%22%20)");
// create the models:
$(document).ready(function()
{
var pointcloud = new EarthServerGenericClient.Model_WCSPointCloud();
pointcloud.setName("PointCloud");
pointcloud.setURL("http://kahlua.eecs.jacobs-university.de:8081/petascope/wcs2");
pointcloud.setCoverage("ParkTunnel");
pointcloud.setAreaOfInterest(456376,339864,456378,339870,52,53);
pointcloud.setPointSize(4);
pointcloud.setOffset(0,0.1,0);
pointcloud.setDiffuseColor("1 0.4 0.2");
pointcloud.setTransparency(0.1);
// add model to the scene
EarthServerGenericClient.MainScene.addModel(pointcloud);
// create the scene: Cube has 60% height compared to width and length
EarthServerGenericClient.MainScene.createScene('x3dScene','theScene',1,0.6,1 );
EarthServerGenericClient.MainScene.createAxisLabels("Latitude","Height","Longitude");
});
document.onload = function()
{
// register a progressbar (you can register your own or just delete this lines)
var pb = new EarthServerGenericClient.createProgressBar("progressbar");
EarthServerGenericClient.MainScene.setProgressCallback(pb.updateValue);
// create the UI
EarthServerGenericClient.MainScene.createUI('x3domUI');
// starts loading and creating the models
// here the function starts as soon as the html page is fully loaded
// you can map this function to e.g. a button
EarthServerGenericClient.MainScene.createModels();
};
</script>
</head>
<body id="body">
<div id="x3dom">
<div id="progressbar"></div>
<X3D id="x3d" showlog="false" showstat="false">
<scene id="x3dScene">
<group id="root">
<group id="theScene" DEF='theScene'></group>
</group>
</scene>
</X3D>
<div id='x3domUI'></div>
</div>
</body>
</html>