From 197c4e42e6247ffbcfd201dbd1875c5dfd82ca69 Mon Sep 17 00:00:00 2001
From: Sven Schneider <icedoggy@gmx.de>
Date: Thu, 6 May 2021 17:57:58 +0200
Subject: [PATCH] first commit using the simplify data method.

---
 favicon.ico                                   | Bin 0 -> 15406 bytes
 index.html                                    |   5 +-
 package-lock.json                             |  71 +++++++--
 package.json                                  |  11 +-
 public/data_3d/3dtiles/1_full/tileset.json    | 120 +++++++++++++++-
 public/data_3d/3dtiles/2_partial/tileset.json | 112 ++++++++++++++-
 public/favicon.ico                            | Bin 0 -> 15406 bytes
 public/js/appCesium.js                        |   2 +-
 public/js/appChart.js                         |  51 ++++++-
 public/js/thirdparty/simplify.js              | 136 ++++++++++++++++++
 10 files changed, 489 insertions(+), 19 deletions(-)
 create mode 100644 favicon.ico
 create mode 100644 public/favicon.ico
 create mode 100644 public/js/thirdparty/simplify.js

diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..751aef3cadc4527fcb892776e3e43125a8a1e1f3
GIT binary patch
literal 15406
zcmeI2`F0yM6vpK(-p0$!cuQ=zra%Z38aI%%O#`Hq7SgBSPo9d$;kCs5-N`i5iCnv`
zV@#3H(b0@7>29CoYke}NU`nRjHB!&apJijtj4`uW@_rN=^Ov;E=hxpK8uNGGm?P;U
zLu5qKE|v3hZ}`Ug^6@?h>i29=pK6)(UwyDoOU0@!mm0QMtk{FzrIcSR^Njny+Oa-M
z-G8aYHGietwza*U-K%tE><ioP{$S(IW38k1cXkjyvr+qz?RCG`l8-s#8C$JHDt{O~
zxBKx=b|m#6Jk#<0?y0o>D9=xB*;g#?sqTsXFW&inI`~cAuda*R*B|S@ygmNi?dQB-
zoSVW2G_udkq+Cj2e_Hg(%k}T8#mD=}`^jVA)5E|>en<Ij&6nxm_ji6f?<)4PPg_?R
zN}h06GPCo#WYabbpKe7y`AVZYlAI~lyoubaQVvx9Wbj(@rZdfThS9m5Nd7X6o@pM2
zf0Ec;T)#inTx~!8Sz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a@y-?+YK9-1B36df#tz
zzX$k#S;_7{seZdsFVmgxz5biSOFr(a<<Hx>dy>~}mG}Sp|Cd#4^nLCQ|K7LWw;lr?
b10Dk&10Dk&10Dmri2?Z^=s(^AYkS}y1yN$Q

literal 0
HcmV?d00001

diff --git a/index.html b/index.html
index 2af58b6..536c1a3 100644
--- a/index.html
+++ b/index.html
@@ -32,9 +32,9 @@
     <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
     <link rel="stylesheet" href="css/styles.css" />
     <!-- Cesium lib -->
-    <script src="https://cesium.com/downloads/cesiumjs/releases/1.48/Build/Cesium/Cesium.js"></script>
+    <script src="https://cesium.com/downloads/cesiumjs/releases/1.69/Build/Cesium/Cesium.js"></script>
     <link
-      href="https://cesium.com/downloads/cesiumjs/releases/1.48/Build/Cesium/Widgets/widgets.css"
+      href="https://cesium.com/downloads/cesiumjs/releases/1.69/Build/Cesium/Widgets/widgets.css"
       rel="stylesheet"
     />
     <!-- Bootstrap dashboard template -->
@@ -49,6 +49,7 @@
       crossorigin="anonymous"
     ></script>
     <script defer src="js/thirdparty/scripts.js"></script>
+    <script defer src="js/thirdparty/simplify.js"></script>
     <!--     
     Custom JS -->
     <script defer src="js/appCesium.js"></script>
diff --git a/package-lock.json b/package-lock.json
index 78f7a1e..1c13067 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,5 +1,5 @@
 {
-  "name": "chart-visualization",
+  "name": "energydashboard",
   "version": "1.0.0",
   "lockfileVersion": 1,
   "requires": true,
@@ -13,11 +13,21 @@
         "negotiator": "0.6.2"
       }
     },
+    "amdefine": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
+      "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
+    },
     "array-flatten": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
       "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
     },
+    "async": {
+      "version": "0.2.10",
+      "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
+      "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E="
+    },
     "axios": {
       "version": "0.21.1",
       "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
@@ -226,16 +236,16 @@
       "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
     },
     "mime-db": {
-      "version": "1.45.0",
-      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
-      "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w=="
+      "version": "1.47.0",
+      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz",
+      "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw=="
     },
     "mime-types": {
-      "version": "2.1.28",
-      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
-      "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
+      "version": "2.1.30",
+      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz",
+      "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==",
       "requires": {
-        "mime-db": "1.45.0"
+        "mime-db": "1.47.0"
       }
     },
     "ms": {
@@ -256,6 +266,14 @@
         "ee-first": "1.1.1"
       }
     },
+    "optimist": {
+      "version": "0.3.7",
+      "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz",
+      "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=",
+      "requires": {
+        "wordwrap": "~0.0.2"
+      }
+    },
     "parseurl": {
       "version": "1.3.3",
       "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@@ -296,6 +314,15 @@
         "unpipe": "1.0.0"
       }
     },
+    "require": {
+      "version": "2.4.20",
+      "resolved": "https://registry.npmjs.org/require/-/require-2.4.20.tgz",
+      "integrity": "sha1-Zstrqqu2XeinHXk/XGX9GE83mLY=",
+      "requires": {
+        "std": "0.1.40",
+        "uglify-js": "2.3.0"
+      }
+    },
     "safe-buffer": {
       "version": "5.1.2",
       "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
@@ -349,11 +376,24 @@
       "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
       "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
     },
+    "source-map": {
+      "version": "0.1.43",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz",
+      "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=",
+      "requires": {
+        "amdefine": ">=0.0.4"
+      }
+    },
     "statuses": {
       "version": "1.5.0",
       "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
       "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
     },
+    "std": {
+      "version": "0.1.40",
+      "resolved": "https://registry.npmjs.org/std/-/std-0.1.40.tgz",
+      "integrity": "sha1-Nnil9lCU2eG2teJu2/wCErg0K3E="
+    },
     "toidentifier": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
@@ -368,6 +408,16 @@
         "mime-types": "~2.1.24"
       }
     },
+    "uglify-js": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.3.0.tgz",
+      "integrity": "sha1-LN7BbTeKiituz7aYl4TPi3rlSR8=",
+      "requires": {
+        "async": "~0.2.6",
+        "optimist": "~0.3.5",
+        "source-map": "~0.1.7"
+      }
+    },
     "unpipe": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@@ -382,6 +432,11 @@
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
       "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
+    },
+    "wordwrap": {
+      "version": "0.0.3",
+      "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
+      "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
     }
   }
 }
diff --git a/package.json b/package.json
index a8ba0bd..ee1f0fb 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
-  "name": "chart-visualization",
+  "name": "energydashboard",
   "version": "1.0.0",
-  "description": "",
+  "description": "Development of dashboard for Bosch Schwieberdingen",
   "main": "index.js",
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"
@@ -10,6 +10,11 @@
   "license": "ISC",
   "dependencies": {
     "axios": "^0.21.1",
-    "express": "^4.17.1"
+    "express": "^4.17.1",
+    "require": "^2.4.20"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://transfer.hft-stuttgart.de/gitlab/icity/energydashboard.git"
   }
 }
diff --git a/public/data_3d/3dtiles/1_full/tileset.json b/public/data_3d/3dtiles/1_full/tileset.json
index 72e0f8e..d3c78ea 100644
--- a/public/data_3d/3dtiles/1_full/tileset.json
+++ b/public/data_3d/3dtiles/1_full/tileset.json
@@ -1 +1,119 @@
-{"asset":{"version":"0.0"},"geometricError":219.28313534945207,"root":{"refine":"add","boundingVolume":{"region":[0.1584738511179245,0.8531339603933314,0.15873528756025984,0.8531878739110335,0.0,45.992999999999995]},"children":[{"boundingVolume":{"region":[0.1584738511179245,0.8531339603933314,0.15859247234863882,0.8531878739110335,0.0,23.899999999999977]},"content":{"url":"/b3dms/R/E.b3dm","boundingVolume":{"region":[0.1584738511179245,0.8531339603933314,0.15859247234863882,0.8531878739110335,0.0,23.899999999999977]}},"geometricError":0.0},{"boundingVolume":{"region":[0.15858287250337338,0.8531425951235618,0.15873528756025984,0.8531873139263567,0.0,18.771000000000015]},"content":{"url":"/b3dms/R/W.b3dm","boundingVolume":{"region":[0.15858287250337338,0.8531425951235618,0.15873528756025984,0.8531873139263567,0.0,18.771000000000015]}},"geometricError":0.0}],"content":{"url":"/b3dms/R.b3dm","boundingVolume":{"region":[0.1584811358859679,0.8531423166682495,0.15872563084804878,0.8531836827163873,0.0,45.992999999999995]}},"geometricError":91.69443154404571},"properties":{"Comment":{},"Modified":{"maximum":0,"minimum":0},"GEMEINDESCHLUESSEL":{"maximum":8118067,"minimum":8118067},"ClassQuality":{"maximum":94.9,"minimum":0},"DATENQUELLELAGE":{"maximum":1000,"minimum":1000},"1-gml_id":{},"CreationUser":{},"DATENQUELLEBODENHOEHE":{"maximum":1100,"minimum":1100},"MeasuredHeight":{"maximum":45.992,"minimum":2.428},"Bodenhoehe":{"maximum":319.699,"minimum":299.44},"Function":{},"FeatureType":{},"gmlID":{},"Dachhoehe":{"maximum":353.502,"minimum":302.4},"DATENQUELLEDACHHOEHE":{"maximum":5000,"minimum":1000},"RoofType":{"maximum":3100,"minimum":1000},"StoreysAboveGround":{"maximum":15,"minimum":1},"Gebaeudehoehe":{"maximum":45.992,"minimum":2.428},"Baujahr":{"maximum":2017,"minimum":-1},"FunctionCode":{"maximum":2700,"minimum":1120},"2-gml_descr":{"maximum":657,"minimum":101},"Dachform":{},"YearOfConstruction":{"maximum":2004,"minimum":1968},"3-yoc":{"maximum":2017,"minimum":-1},"CreationDate":{},"4-func":{},"LocalityName":{},"CountryName":{},"ThoroughfareName":{},"CoreName":{},"Longitude":{"maximum":9.094862036998366,"minimum":9.080012180673906},"Latitude":{"maximum":48.884064306842056,"minimum":48.881024934531204}}}
\ No newline at end of file
+{
+  "asset": { "version": "0.0" },
+  "geometricError": 219.28313534945207,
+  "root": {
+    "refine": "add",
+    "boundingVolume": {
+      "region": [
+        0.1584738511179245,
+        0.8531339603933314,
+        0.15873528756025984,
+        0.8531878739110335,
+        0.0,
+        45.992999999999995
+      ]
+    },
+    "children": [
+      {
+        "boundingVolume": {
+          "region": [
+            0.1584738511179245,
+            0.8531339603933314,
+            0.15859247234863882,
+            0.8531878739110335,
+            0.0,
+            23.899999999999977
+          ]
+        },
+        "content": {
+          "url": "b3dms/R/E.b3dm",
+          "boundingVolume": {
+            "region": [
+              0.1584738511179245,
+              0.8531339603933314,
+              0.15859247234863882,
+              0.8531878739110335,
+              0.0,
+              23.899999999999977
+            ]
+          }
+        },
+        "geometricError": 0.0
+      },
+      {
+        "boundingVolume": {
+          "region": [
+            0.15858287250337338,
+            0.8531425951235618,
+            0.15873528756025984,
+            0.8531873139263567,
+            0.0,
+            18.771000000000015
+          ]
+        },
+        "content": {
+          "url": "b3dms/R/W.b3dm",
+          "boundingVolume": {
+            "region": [
+              0.15858287250337338,
+              0.8531425951235618,
+              0.15873528756025984,
+              0.8531873139263567,
+              0.0,
+              18.771000000000015
+            ]
+          }
+        },
+        "geometricError": 0.0
+      }
+    ],
+    "content": {
+      "url": "b3dms/R.b3dm",
+      "boundingVolume": {
+        "region": [
+          0.1584811358859679,
+          0.8531423166682495,
+          0.15872563084804878,
+          0.8531836827163873,
+          0.0,
+          45.992999999999995
+        ]
+      }
+    },
+    "geometricError": 91.69443154404571
+  },
+  "properties": {
+    "Comment": {},
+    "Modified": { "maximum": 0, "minimum": 0 },
+    "GEMEINDESCHLUESSEL": { "maximum": 8118067, "minimum": 8118067 },
+    "ClassQuality": { "maximum": 94.9, "minimum": 0 },
+    "DATENQUELLELAGE": { "maximum": 1000, "minimum": 1000 },
+    "1-gml_id": {},
+    "CreationUser": {},
+    "DATENQUELLEBODENHOEHE": { "maximum": 1100, "minimum": 1100 },
+    "MeasuredHeight": { "maximum": 45.992, "minimum": 2.428 },
+    "Bodenhoehe": { "maximum": 319.699, "minimum": 299.44 },
+    "Function": {},
+    "FeatureType": {},
+    "gmlID": {},
+    "Dachhoehe": { "maximum": 353.502, "minimum": 302.4 },
+    "DATENQUELLEDACHHOEHE": { "maximum": 5000, "minimum": 1000 },
+    "RoofType": { "maximum": 3100, "minimum": 1000 },
+    "StoreysAboveGround": { "maximum": 15, "minimum": 1 },
+    "Gebaeudehoehe": { "maximum": 45.992, "minimum": 2.428 },
+    "Baujahr": { "maximum": 2017, "minimum": -1 },
+    "FunctionCode": { "maximum": 2700, "minimum": 1120 },
+    "2-gml_descr": { "maximum": 657, "minimum": 101 },
+    "Dachform": {},
+    "YearOfConstruction": { "maximum": 2004, "minimum": 1968 },
+    "3-yoc": { "maximum": 2017, "minimum": -1 },
+    "CreationDate": {},
+    "4-func": {},
+    "LocalityName": {},
+    "CountryName": {},
+    "ThoroughfareName": {},
+    "CoreName": {},
+    "Longitude": { "maximum": 9.094862036998366, "minimum": 9.080012180673906 },
+    "Latitude": { "maximum": 48.884064306842056, "minimum": 48.881024934531204 }
+  }
+}
diff --git a/public/data_3d/3dtiles/2_partial/tileset.json b/public/data_3d/3dtiles/2_partial/tileset.json
index 150273b..242a023 100644
--- a/public/data_3d/3dtiles/2_partial/tileset.json
+++ b/public/data_3d/3dtiles/2_partial/tileset.json
@@ -1 +1,111 @@
-{"asset":{"version":"0.0"},"geometricError":219.28313534945207,"root":{"refine":"add","boundingVolume":{"region":[0.1584738511179245,0.8531339603933314,0.15873528756025984,0.8531878739110335,0.0,45.992999999999995]},"children":[{"boundingVolume":{"region":[0.1584738511179245,0.8531339603933314,0.15858326731329325,0.8531878739110335,0.0,13.600000000000023]},"content":{"url":"/b3dms/R/E.b3dm","boundingVolume":{"region":[0.1584738511179245,0.8531339603933314,0.15858326731329325,0.8531878739110335,0.0,13.600000000000023]}},"geometricError":0.0},{"boundingVolume":{"region":[0.15858287250337338,0.8531425951235618,0.15873528756025984,0.8531871661728766,0.0,18.512999999999977]},"content":{"url":"/b3dms/R/W.b3dm","boundingVolume":{"region":[0.15858287250337338,0.8531425951235618,0.15873528756025984,0.8531871661728766,0.0,18.512999999999977]}},"geometricError":0.0}],"content":{"url":"/b3dms/R.b3dm","boundingVolume":{"region":[0.15848022617436155,0.8531413194464635,0.15872563084804878,0.8531873139263567,0.0,45.992999999999995]}},"geometricError":67.37680475033933},"properties":{"FunctionCode":{"maximum":2700,"minimum":1120},"RoofType":{"maximum":3100,"minimum":1000},"FeatureType":{},"Gebaeudehoehe":{"maximum":45.992,"minimum":2.428},"DATENQUELLEBODENHOEHE":{"maximum":1100,"minimum":1100},"Modified":{"maximum":0,"minimum":0},"StoreysAboveGround":{"maximum":15,"minimum":1},"Bodenhoehe":{"maximum":319.699,"minimum":299.44},"YearOfConstruction":{"maximum":2004,"minimum":1968},"Dachform":{},"DATENQUELLELAGE":{"maximum":1000,"minimum":1000},"DATENQUELLEDACHHOEHE":{"maximum":5000,"minimum":1000},"gmlID":{},"ClassQuality":{"maximum":94.9,"minimum":0},"MeasuredHeight":{"maximum":45.992,"minimum":2.428},"Comment":{},"GEMEINDESCHLUESSEL":{"maximum":8118067,"minimum":8118067},"CreationUser":{},"CreationDate":{},"Dachhoehe":{"maximum":353.502,"minimum":302.4},"Function":{},"CoreName":{},"Longitude":{"maximum":9.094862036998366,"minimum":9.080012180673906},"Latitude":{"maximum":48.884064306842056,"minimum":48.881024934531204}}}
\ No newline at end of file
+{
+  "asset": { "version": "0.0" },
+  "geometricError": 219.28313534945207,
+  "root": {
+    "refine": "add",
+    "boundingVolume": {
+      "region": [
+        0.1584738511179245,
+        0.8531339603933314,
+        0.15873528756025984,
+        0.8531878739110335,
+        0.0,
+        45.992999999999995
+      ]
+    },
+    "children": [
+      {
+        "boundingVolume": {
+          "region": [
+            0.1584738511179245,
+            0.8531339603933314,
+            0.15858326731329325,
+            0.8531878739110335,
+            0.0,
+            13.600000000000023
+          ]
+        },
+        "content": {
+          "url": "b3dms/R/E.b3dm",
+          "boundingVolume": {
+            "region": [
+              0.1584738511179245,
+              0.8531339603933314,
+              0.15858326731329325,
+              0.8531878739110335,
+              0.0,
+              13.600000000000023
+            ]
+          }
+        },
+        "geometricError": 0.0
+      },
+      {
+        "boundingVolume": {
+          "region": [
+            0.15858287250337338,
+            0.8531425951235618,
+            0.15873528756025984,
+            0.8531871661728766,
+            0.0,
+            18.512999999999977
+          ]
+        },
+        "content": {
+          "url": "b3dms/R/W.b3dm",
+          "boundingVolume": {
+            "region": [
+              0.15858287250337338,
+              0.8531425951235618,
+              0.15873528756025984,
+              0.8531871661728766,
+              0.0,
+              18.512999999999977
+            ]
+          }
+        },
+        "geometricError": 0.0
+      }
+    ],
+    "content": {
+      "url": "b3dms/R.b3dm",
+      "boundingVolume": {
+        "region": [
+          0.15848022617436155,
+          0.8531413194464635,
+          0.15872563084804878,
+          0.8531873139263567,
+          0.0,
+          45.992999999999995
+        ]
+      }
+    },
+    "geometricError": 67.37680475033933
+  },
+  "properties": {
+    "FunctionCode": { "maximum": 2700, "minimum": 1120 },
+    "RoofType": { "maximum": 3100, "minimum": 1000 },
+    "FeatureType": {},
+    "Gebaeudehoehe": { "maximum": 45.992, "minimum": 2.428 },
+    "DATENQUELLEBODENHOEHE": { "maximum": 1100, "minimum": 1100 },
+    "Modified": { "maximum": 0, "minimum": 0 },
+    "StoreysAboveGround": { "maximum": 15, "minimum": 1 },
+    "Bodenhoehe": { "maximum": 319.699, "minimum": 299.44 },
+    "YearOfConstruction": { "maximum": 2004, "minimum": 1968 },
+    "Dachform": {},
+    "DATENQUELLELAGE": { "maximum": 1000, "minimum": 1000 },
+    "DATENQUELLEDACHHOEHE": { "maximum": 5000, "minimum": 1000 },
+    "gmlID": {},
+    "ClassQuality": { "maximum": 94.9, "minimum": 0 },
+    "MeasuredHeight": { "maximum": 45.992, "minimum": 2.428 },
+    "Comment": {},
+    "GEMEINDESCHLUESSEL": { "maximum": 8118067, "minimum": 8118067 },
+    "CreationUser": {},
+    "CreationDate": {},
+    "Dachhoehe": { "maximum": 353.502, "minimum": 302.4 },
+    "Function": {},
+    "CoreName": {},
+    "Longitude": { "maximum": 9.094862036998366, "minimum": 9.080012180673906 },
+    "Latitude": { "maximum": 48.884064306842056, "minimum": 48.881024934531204 }
+  }
+}
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..751aef3cadc4527fcb892776e3e43125a8a1e1f3
GIT binary patch
literal 15406
zcmeI2`F0yM6vpK(-p0$!cuQ=zra%Z38aI%%O#`Hq7SgBSPo9d$;kCs5-N`i5iCnv`
zV@#3H(b0@7>29CoYke}NU`nRjHB!&apJijtj4`uW@_rN=^Ov;E=hxpK8uNGGm?P;U
zLu5qKE|v3hZ}`Ug^6@?h>i29=pK6)(UwyDoOU0@!mm0QMtk{FzrIcSR^Njny+Oa-M
z-G8aYHGietwza*U-K%tE><ioP{$S(IW38k1cXkjyvr+qz?RCG`l8-s#8C$JHDt{O~
zxBKx=b|m#6Jk#<0?y0o>D9=xB*;g#?sqTsXFW&inI`~cAuda*R*B|S@ygmNi?dQB-
zoSVW2G_udkq+Cj2e_Hg(%k}T8#mD=}`^jVA)5E|>en<Ij&6nxm_ji6f?<)4PPg_?R
zN}h06GPCo#WYabbpKe7y`AVZYlAI~lyoubaQVvx9Wbj(@rZdfThS9m5Nd7X6o@pM2
zf0Ec;T)#inTx~!8Sz}3V#+a<Fu4im*)+Q>Ox>5=>|4QvAXX|xN-sW#n`&%2eq-gtN
zl|g<Mx93uhHP=htkF}3WX0|PnKNbuWBxjx3s`!EYFO?s6=GS@Px$Oo=+D=~C4GtxL
zJQ4ZNMdsXwt%q8p2Rf3w(w>#&dcKiwY`gh|ZPdoM<WD7MOmf#JIyd<%@>2Q4f;RF}
z<kL=m+irfoqWp=j0rk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js/appCesium.js
@@ -5,7 +5,7 @@ Cesium.Ion.defaultAccessToken =
 
 // Flag to determine models that will be loaded
 // Set to `true` or `false`
-const LOAD_DETAILED_BLDG225 = false;
+const LOAD_DETAILED_BLDG225 = true;
 
 // Global variable
 const viewer = new Cesium.Viewer("myCesiumContainer", {
diff --git a/public/js/appChart.js b/public/js/appChart.js
index 41225ff..da085eb 100644
--- a/public/js/appChart.js
+++ b/public/js/appChart.js
@@ -403,8 +403,44 @@ const followNextLink = function (responsePromise) {
     });
 };
 
+///////////////////////////////////////////////////////////////
+function getDataReadyForSimplifyJS(pts) {
+  var val = [];
+  
+  for (var i = 0, len = pts.length; i < len; i++) 
+    val.push(pts[i][1]);
+  
+  pts = val;
+
+  let newPts = [];
+  for (var i = 0, len = pts.length; i < len; i++) 
+    newPts.push({ x: i, y: pts[i] });  
+  return newPts;
+}
+///////////////////////////////////////////////////////////////
+function getPointIndiciesFromXYjson(pts) {
+  let newPts = [];
+  for (var i = 0, len = pts.length; i < len; i++) 
+    newPts.push(pts[i].x);    
+  return newPts;
+}
+
+///////////////////////////////////////////////////////////////
+function getReducedDataFromSimplifiedData(originalData, simplified_data) {    
+  let red_data = [];
+  let new_start = 0;
+  for (var i = 0; i < originalData.length; i++) 
+    for (var j=new_start; j < simplified_data.length; j++){
+      if (i == simplified_data[j].x){
+        red_data.push([originalData[i][0],originalData[i][1]]);
+        new_start = j+1;
+      }
+    }
+  return red_data;
+}
+
 // Get "ALL" the Observations that satisfy our query
-followNextLink(
+var res = followNextLink(
   axios.get(BASE_URL, {
     params: {
       "$resultFormat": PARAM_RESULT_FORMAT,
@@ -437,6 +473,15 @@ followNextLink(
     console.log(err);
   })
   .then((observationArr) => {
-    updateLineChartAC(chart1LineTitle, observationArr);
-    drawHeatMapAC2(observationArr);
+    // updateLineChartAC(chart1LineTitle, observationArr);
+     
+    let simplified_data = simplify(getDataReadyForSimplifyJS(observationArr),2,true);
+    let reducedData =  getReducedDataFromSimplifiedData(observationArr, simplified_data);
+
+    updateLineChartAC(chart1LineTitle, reducedData);
+    // drawHeatMapAC2(observationArr);
+    drawHeatMapAC2(reducedData);
+    console.log(reducedData.length, observationArr.length);
+    return reducedData;
   });
+
diff --git a/public/js/thirdparty/simplify.js b/public/js/thirdparty/simplify.js
new file mode 100644
index 0000000..3d94097
--- /dev/null
+++ b/public/js/thirdparty/simplify.js
@@ -0,0 +1,136 @@
+/*
+ (c) 2017, Vladimir Agafonkin
+ Simplify.js, a high-performance JS polyline simplification library
+ mourner.github.io/simplify-js
+*/
+
+(function () { 'use strict';
+
+// to suit your point format, run search/replace for '.x' and '.y';
+// for 3D version, see 3d branch (configurability would draw significant performance overhead)
+
+// square distance between 2 points
+function getSqDist(p1, p2) {
+
+    var dx = p1.x - p2.x,
+        dy = p1.y - p2.y;
+
+    return dx * dx + dy * dy;
+}
+
+// square distance from a point to a segment
+function getSqSegDist(p, p1, p2) {
+
+    var x = p1.x,
+        y = p1.y,
+        dx = p2.x - x,
+        dy = p2.y - y;
+
+    if (dx !== 0 || dy !== 0) {
+
+        var t = ((p.x - x) * dx + (p.y - y) * dy) / (dx * dx + dy * dy);
+
+        if (t > 1) {
+            x = p2.x;
+            y = p2.y;
+
+        } else if (t > 0) {
+            x += dx * t;
+            y += dy * t;
+        }
+    }
+
+    dx = p.x - x;
+    dy = p.y - y;
+
+    return dx * dx + dy * dy;
+}
+// rest of the code doesn't care about point format
+
+// basic distance-based simplification
+function simplifyRadialDist(points, sqTolerance) {
+
+    var prevPoint = points[0],
+        newPoints = [prevPoint],
+        point;
+
+    for (var i = 1, len = points.length; i < len; i++) {
+        point = points[i];
+
+        if (getSqDist(point, prevPoint) > sqTolerance) {
+            newPoints.push(point);
+            prevPoint = point;
+        }
+    }
+
+    if (prevPoint !== point) newPoints.push(point);
+
+    return newPoints;
+}
+
+function simplifyDPStep(points, first, last, sqTolerance, simplified) {
+    var maxSqDist = sqTolerance,
+        index;
+
+    for (var i = first + 1; i < last; i++) {
+        var sqDist = getSqSegDist(points[i], points[first], points[last]);
+
+        if (sqDist > maxSqDist) {
+            index = i;
+            maxSqDist = sqDist;
+        }
+    }
+
+    if (maxSqDist > sqTolerance) {
+        if (index - first > 1) {
+            simplifyDPStep(points, first, index, sqTolerance, simplified);
+            // simplifyDPStep(points, first, index, sqTolerance, simplified, simplified_idx);
+        }
+        simplified.push(points[index]);
+        // simplified_idx.push(index);
+
+        if (last - index > 1) {
+            simplifyDPStep(points, index, last, sqTolerance, simplified);
+            // simplifyDPStep(points, index, last, sqTolerance, simplified, simplified_idx);
+        }
+    }
+}
+
+// simplification using Ramer-Douglas-Peucker algorithm
+function simplifyDouglasPeucker(points, sqTolerance) {
+    var last = points.length - 1;
+
+    var simplified = [points[0]];
+    // var simplified_idx = [0];
+    simplifyDPStep(points, 0, last, sqTolerance, simplified);
+    // simplifyDPStep(points, 0, last, sqTolerance, simplified,simplified_idx);
+    simplified.push(points[last]);
+    // simplified_idx.push(last);
+
+    // var simpleObj = {'x':simplified_idx, 'y':simplified};
+    return simplified;
+    // return simpleObj;
+}
+
+// both algorithms combined for awesome performance
+function simplify(points, tolerance, highestQuality) {
+
+    if (points.length <= 2) return points;
+
+    var sqTolerance = tolerance !== undefined ? tolerance * tolerance : 1;
+
+    points = highestQuality ? points : simplifyRadialDist(points, sqTolerance);
+    points = simplifyDouglasPeucker(points, sqTolerance);
+
+    return points;
+}
+
+// export as AMD module / Node module / browser or worker variable
+if (typeof define === 'function' && define.amd) define(function() { return simplify; });
+else if (typeof module !== 'undefined') {
+    module.exports = simplify;
+    module.exports.default = simplify;
+} else if (typeof self !== 'undefined') self.simplify = simplify;
+else window.simplify = simplify;
+
+})();
\ No newline at end of file
-- 
GitLab