-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
199 lines (178 loc) · 7.71 KB
/
index.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="icon" href="favicon.ico" />
<title>Géoportail LiDAR du SITN</title>
<link rel="stylesheet" type="text/css" href="./potree/build/potree/potree.css">
<link rel="stylesheet" type="text/css" href="./potree/libs/jquery-ui/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="./potree/libs/openlayers3/ol.css">
<link rel="stylesheet" type="text/css" href="./potree/libs/spectrum/spectrum.css">
<link rel="stylesheet" type="text/css" href="./potree/libs/jstree/themes/mixed/style.css">
<link rel="stylesheet" href="sitnapp/css/sitn.css" type="text/css">
</head>
<body>
<script>
var isIE = /*@cc_on!@*/false || !!document.documentMode;
if (isIE) {
alert('Internet Explorer n\'est pas supporté pour cette application, vous allez être redirigés vers le Géoportail 2D');
window.location.replace("https://sitn.ne.ch");
}
</script>
<script src="./potree/libs/jquery/jquery-3.1.1.min.js"></script>
<script src="./potree/libs/spectrum/spectrum.js"></script>
<script src="./potree/libs/jquery-ui/jquery-ui.min.js"></script>
<script src="./potree/libs/three.js/build/three.min.js"></script>
<script src="./potree/libs/three.js/extra/lines.js"></script>
<script src="./potree/libs/other/BinaryHeap.js"></script>
<script src="./potree/libs/tween/tween.min.js"></script>
<script src="./potree/libs/d3/d3.js"></script>
<script src="./potree/libs/proj4/proj4.js"></script>
<script src="./potree/libs/openlayers3/ol.js"></script>
<script src="./potree/libs/i18next/i18next.js"></script>
<script src="./potree/libs/jstree/jstree.js"></script>
<script src="./potree/build/potree/potree.js"></script>
<script src="./potree/libs/plasio/js/laslaz.js"></script>
<script src="sitnapp/js/sitn.js"></script>
<script src="sitnapp/js/gmf_search_box.js"></script>
<!-- INCLUDE ADDITIONAL DEPENDENCIES HERE -->
<div class="potree_container" style="position: absolute; width: 100%; height: 100%; left: 0px; top: 0px; ">
<div id="gmf_search_input">
<input id="places" placeholder="Saisir une adresse">
</div>
<div id="potree_render_area"></div>
<div id="potree_sidebar_container"> </div>
</div>
<script>
window.viewer = new Potree.Viewer(document.getElementById("potree_render_area"));
viewer.setEDLEnabled(true);
viewer.setFOV(60);
viewer.setPointBudget(4*1000*1000);
viewer.loadSettingsFromURL();
viewer.setDescription('Géoportail LiDAR du<a target=_blank href="https://sitn.ne.ch/"> SITN</a>');
viewer.loadGUI(() => {
viewer.setLanguage('fr');
$("#menu_scene").next().show();
viewer.toggleSidebar();
let section = $(`
<h3 id="menu_meta" class="accordion-header ui-widget"><span>Aide navigation</span></h3>
<div class="accordion-content ui-widget"></div>
`);
let content = section.last();
content.html(`
<img src="mouse.png" alt="mouse" width="100%">
`);
section.first().click(() => content.slideToggle());
section.insertBefore($('#menu_about'));
});
async function loadDatasets(){
let scene = viewer.scene;
{
let result = await Potree.loadPointCloud("https://sitn.ne.ch/lidar/pointclouds/stereo/2020/virtualcity/metadata.json");
let pointcloud = result.pointcloud;
let material = pointcloud.material;
pointcloud.name = "Virtual City bâti 3D > LiDAR";
material.size = 1.5;
material.pointSizeType = Potree.PointSizeType.FIXED;
material.activeAttributeName = "rgba";
material.shape = Potree.PointShape.CIRCLE;
scene.addPointCloud(pointcloud);
viewer.fitToScreen();
pointcloud.visible = false;
}
{
let result = await Potree.loadPointCloud("https://sitn.ne.ch/lidar/pointclouds/aerial/2018/metadata.json");
let pointcloud = result.pointcloud;
let material = pointcloud.material;
pointcloud.name = "SITN LiDAR 2018-2019";
material.size = 1.5;
material.pointSizeType = Potree.PointSizeType.FIXED;
material.activeAttributeName = "rgba";
material.shape = Potree.PointShape.CIRCLE;
scene.addPointCloud(pointcloud);
viewer.fitToScreen();
pointcloud.visible = true;
}
{
let result = await Potree.loadPointCloud("https://sitn.ne.ch/lidar/pointclouds/aerial/2016/trees2016/metadata.json");
let pointcloud = result.pointcloud;
let material = pointcloud.material;
pointcloud.name = "SITN LiDAR 2016 - arbres";
material.size = 1.5;
material.pointSizeType = Potree.PointSizeType.FIXED;
material.shape = Potree.PointShape.CIRCLE;
scene.addPointCloud(pointcloud);
viewer.fitToScreen();
pointcloud.visible = false;
}
{
let result = await Potree.loadPointCloud("https://sitn.ne.ch/lidar/pointclouds/aerial/2016/lidar2016/metadata.json");
let pointcloud = result.pointcloud;
let material = pointcloud.material;
pointcloud.name = "SITN LiDAR 2016";
material.size = 1.5;
material.pointSizeType = Potree.PointSizeType.FIXED;
material.shape = Potree.PointShape.CIRCLE;
scene.addPointCloud(pointcloud);
viewer.fitToScreen();
pointcloud.visible = false;
}
{
let result = await Potree.loadPointCloud("https://sitn.ne.ch/lidar/pointclouds/aerial/2010/metadata.json");
let pointcloud = result.pointcloud;
let material = pointcloud.material;
pointcloud.name = "SITN LiDAR 2010";
material.size = 1.5;
material.pointSizeType = Potree.PointSizeType.FIXED;
material.activeAttributeName = "rgba";
material.shape = Potree.PointShape.CIRCLE;
scene.addPointCloud(pointcloud);
viewer.fitToScreen();
pointcloud.visible = false;
}
{
let result = await Potree.loadPointCloud("https://sitn.ne.ch/lidar/pointclouds/aerial/2001/metadata.json");
let pointcloud = result.pointcloud;
let material = pointcloud.material;
pointcloud.name = "SITN LiDAR 2001";
material.size = 1.5;
material.pointSizeType = Potree.PointSizeType.FIXED;
material.activeAttributeName = "rgba";
material.shape = Potree.PointShape.CIRCLE;
scene.addPointCloud(pointcloud);
viewer.fitToScreen();
pointcloud.visible = false;
}
{
let result = await Potree.loadPointCloud("https://sitn.ne.ch/lidar/pointclouds/bathymetry/lacs3d/metadata.json");
let pointcloud = result.pointcloud;
let material = pointcloud.material;
pointcloud.name = "Lacs";
material.size = 1.5;
material.pointSizeType = Potree.PointSizeType.FIXED;
material.activeAttributeName = "rgba";
material.shape = Potree.PointShape.CIRCLE;
pointcloud.visible = false;
scene.addPointCloud(pointcloud);
viewer.fitToScreen();
}
{
let result = await Potree.loadPointCloud("https://sitn.ne.ch/lidar/pointclouds/bathymetry/bathy2020/metadata.json");
let pointcloud = result.pointcloud;
let material = pointcloud.material;
pointcloud.name = "Bathymétrie sonar 2012-2016 et lidar 2020";
material.size = 1.5;
material.pointSizeType = Potree.PointSizeType.FIXED;
material.shape = Potree.PointShape.CIRCLE;
material.activeAttributeName = "rgba";
pointcloud.visible = true;
scene.addPointCloud(pointcloud);
}
};
loadDatasets();
</script>
</body>
</html>