Commit 51ffc700 authored by JOE XMG's avatar JOE XMG
Browse files

update

parent bd9d5903
Pipeline #6194 passed with stage
in 6 seconds
......@@ -40,21 +40,38 @@
<hr>
<h5>Select Building Classification Style </h5>
<h5>Building</h5>
<select class="form-select" id="BuildingStyleSelector">
<option value="AllWhite" selected>Default</option>
<option value="transparent">Transparent</option>
<option value="PVPotential">PV Potential</option>
<option value="PVSpecificYield">PV Specific Yield</option>
</select>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="shadow_check">
<label class="form-check-label" for="shadow_check">
Building Shadow
</label>
</div>
<div id="chart"></div> <hr>
<h5>Building Shadow</h5>
<h5>Utility Network</h5>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="shadow_check">
<label class="form-check-label" for="shadow_check">
On/Off
<input class="form-check-input" type="checkbox" value="" id="util_nw_line">
<label class="form-check-label" for="util_nw_line">
Utility Network Lines
<div class="spinner-border spinner-border-sm" role="status" id="util_nw_line_loading" style="display: none;">
<span class="visually-hidden">Loading...</span>
</div>
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="util_nw_point">
<label class="form-check-label" for="util_nw_point">
Utility Network Point
</label>
</div>
<hr>
......@@ -89,6 +106,8 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous">
</script>
<script src="./js/utility_point_data.js"></script>
<script src="./js/cesium_00_Main.js"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
......
......@@ -79,12 +79,123 @@ var tileset = viewer.scene.primitives.add(
})
);
viewer.camera.setView({"destination":{"x":4123560.966179314,"y":707228.713304919,"z":4798899.985567952},"orientation":{"direction":{"x":-0.9622773420432754,"y":0.19744630073107838,"z":0.18718246530522495},"up":{"x":0.23048908682520655,"y":0.22606307618215207,"z":0.946451407332434}}})
viewer.camera.setView({
"destination": {
"x": 4123560.966179314,
"y": 707228.713304919,
"z": 4798899.985567952
},
"orientation": {
"direction": {
"x": -0.9622773420432754,
"y": 0.19744630073107838,
"z": 0.18718246530522495
},
"up": {
"x": 0.23048908682520655,
"y": 0.22606307618215207,
"z": 0.946451407332434
}
}
})
// binding full screen button
$("#full-screen-button").click(function () {
Cesium.Fullscreen.requestFullscreen(document.body)
})
Cesium.GeoJsonDataSource.clampToGround = true;
// Adding the Utility Line to the Cesium Viewer
var utility_line;
var load_utility_line_already = false;
var utiltiy_line_entity;
var load_utility_line = function () {
$("#util_nw_line_loading").show()
if (!load_utility_line_already) {
GeoJSONpromise = Cesium.GeoJsonDataSource.load(
"../utility_data/Katharinenvorst.geojson"
);
GeoJSONpromise.then(function (dataSource) {
utiltiy_line_entity = dataSource.entities;
viewer.dataSources.add(dataSource);
//Get the array of entities
utility_line = dataSource.entities.values;
load_utility_line_already = true;
for (let i = 0; i < utility_line.length; i++) {
const entity = utility_line[i];
entity.polyline.clampToGround = true
entity.polyline.classificationType = Cesium.ClassificationType.TERRAIN;
entity.polyline.material = Cesium.Color.HOTPINK;
}
$("#util_nw_line_loading").hide()
})
} else {
utiltiy_line_entity.show = true;
}
}
var hide_utiltiy_line = function () {
try {
utiltiy_line_entity.show = false;
load_utility_line_already = false;
} catch (error) {
console.log("error on hiding utiltiy_line_entity")
}
}
// Adding the Utility Point to the Cesium Viewer
var pinBuilder = new Cesium.PinBuilder();
var utility_Point_Entities = [];
for (let i = 0; i < utility_point.length; i++) {
var nameub = utility_point[i][0];
var latub = utility_point[i][1];
var lonub = utility_point[i][2];
utility_Point_Entities[i] = viewer.entities.add({
name: nameub,
position: Cesium.Cartesian3.fromDegrees(lonub, latub),
description: "Handle: " + nameub,
point : {
pixelSize : 5,
color : Cesium.Color.RED,
outlineColor : Cesium.Color.WHITE,
outlineWidth : 2,
heightReference: "CLAMP_TO_GROUND",
show: false,
},
label : {
text : "Handle: " + nameub,
font : '14pt monospace',
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
outlineWidth : 2,
verticalOrigin : Cesium.VerticalOrigin.BOTTOM,
heightReference: "CLAMP_TO_GROUND",
show: false,
pixelOffset : new Cesium.Cartesian2(0, -9)
},
// billboard: {
// image: pinBuilder.fromMakiIconId('bus', Cesium.Color.ORANGE.withAlpha(0.7), 60),
// verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
// heightReference: "CLAMP_TO_GROUND",
// show: false,
// disableDepthTestDistance: 999999
// }
});
}
// Cesium.GeoJsonDataSource.clampToGround = true;
// var geojson_utility_line = viewer.dataSources.add(
// Cesium.GeoJsonDataSource.load(
// "../utility_data/Katharinenvorst.geojson",{
// stroke: Cesium.Color.HOTPINK,
// fill: Cesium.Color.PINK.withAlpha(0.5),
// strokeWidth: 3,
// }
// )
// );
var building_style = []
var addBuilding = function () {
try {
......@@ -108,7 +219,21 @@ var addBuilding = function () {
building_style["AllWhite"] = new Cesium.Cesium3DTileStyle({
pointSize: '3.0',
show: true,
color: "color('#ffffff')"
// color: "color('#ffffff')"
"color": {
"conditions": [
["true", "color('#ffffff')"]
]
}
});
building_style["transparent"] = new Cesium.Cesium3DTileStyle({
show: true,
// color: "color('#ffffff',0.25)"
"color": {
"conditions": [
["true", "color('#ffffff', 0.5)"]
]
}
});
building_style["PVPotential"] = new Cesium.Cesium3DTileStyle({
show: true,
......@@ -144,7 +269,7 @@ var addBuilding = function () {
pointSize: '3.0',
show: true,
color: {
"conditions" : [
"conditions": [
["${Electric_Demand} === 0", "color('#ffffff')"],
["${Electric_Demand} < 3229", "color('#feedde')"],
["${Electric_Demand} < 4229", "color('#fdd0a2')"],
......@@ -268,3 +393,24 @@ $("#shadow_check").change(function () {
}
});
$("#util_nw_line").change(function () {
if (this.checked) {
load_utility_line()
} else {
hide_utiltiy_line()
}
});
$("#util_nw_point").change(function () {
if (this.checked) {
for (let i = 0; i < utility_point.length; i++) {
utility_Point_Entities[i].point.show = true;
utility_Point_Entities[i].label.show = true;
}
} else {
for (let i = 0; i < utility_point.length; i++) {
utility_Point_Entities[i].point.show = false;
utility_Point_Entities[i].label.show = false;
}
}
});
\ No newline at end of file
var utility_point =
[
["2A945",49.11105,9.732404],
["2A948",49.10966,9.732498],
["2A94A",49.10998,9.734303],
["2A94D",49.10999,9.734307],
["2A950",49.10968,9.734892],
["2A952",49.10969,9.734889],
["2A954",49.11238,9.732279],
["2A956",49.11226,9.732234],
["2A958",49.11222,9.732319],
["2A95A",49.11221,9.732248],
["2A95C",49.11218,9.732322],
["2A95E",49.11208,9.732258],
["2A960",49.11211,9.732258],
["2A962",49.11206,9.732459],
["2A966",49.11258,9.732203],
["2A968",49.11259,9.732208],
["2A96A",49.11263,9.732191],
["2A96D",49.11004,9.733771],
["2A970",49.1096,9.734685],
["2A973",49.1111,9.732369],
["2A976",49.11107,9.732215],
["2A979",49.11254,9.731168],
["2A97C",49.11108,9.732213],
["2A97F",49.1111,9.732371],
["2A982",49.11137,9.732398],
["2A985",49.11128,9.731825],
["2A988",49.11242,9.732227],
["2A98B",49.11137,9.732402],
["2A98E",49.1106,9.732347],
["2A991",49.1096,9.734691],
["2A994",49.11255,9.731172],
["2A997",49.11128,9.731839],
["2A99A",49.11003,9.733779],
["2A99D",49.11012,9.734203],
["2A9A0",49.11263,9.732195],
["2A9A3",49.11243,9.732232],
["2A9A6",49.11012,9.734199],
["2A9A9",49.1106,9.73234],
["2A9B1",49.11232,9.730621],
["2A9B3",49.11236,9.730775],
["2A9B5",49.11237,9.730766],
["2A9B8",49.11237,9.730771],
["2A9BB",49.11272,9.73238],
["2A9BD",49.1125,9.731475],
["2A9BF",49.11218,9.73256],
["2A9C1",49.11217,9.732689],
["2A9C3",49.11139,9.732158],
["2A9C5",49.11125,9.732358],
["2A9C7",49.11045,9.732387],
["2A9C9",49.11034,9.732394],
["2A9CB",49.11025,9.732404],
["2A9CD",49.11018,9.732408],
["2A9CF",49.11001,9.732513],
["2A9D1",49.10981,9.732633],
["2A9D3",49.10964,9.732561],
["2A9D5",49.10954,9.733154],
["2A9D7",49.10992,9.733487],
["2A9D9",49.10977,9.733816],
["2A9DB",49.1106,9.734144],
["2A9DD",49.11065,9.734313],
["2A9E0",49.10944,9.73479],
["2A9E2",49.10902,9.734793],
["2A9E4",49.10894,9.735069],
["2A9E6",49.10862,9.734961],
["2A9E8",49.10877,9.736851],
["2A9EA",49.10895,9.735962],
["2A9EC",49.10978,9.73511],
["2A9F2",49.11012,9.733818],
["2A9F5",49.11111,9.732417],
["2A9F9",49.11256,9.73117],
["2A9FD",49.112,9.73231],
["2AA01",49.11226,9.732597],
["2AA05",49.11255,9.731166],
["2AA09",49.11111,9.732413],
["2AA0D",49.11137,9.732409],
["2AA11",49.11259,9.732206],
["2AA15",49.11201,9.732315],
["2AA19",49.11226,9.732593],
["2AA1D",49.11259,9.732203],
["2AA21",49.11137,9.732413],
["2AA25",49.10873,9.735461],
["2AA27",49.10873,9.735456],
["2AA2B",49.10889,9.736614],
["2AA2D",49.10888,9.736617],
["2AA32",49.10866,9.735079],
["2AA35",49.10867,9.735082],
["2AA38",49.1087,9.735401],
["2AA3B",49.1087,9.735402],
["2AA50",49.11285,9.732918],
["2AA54",49.11284,9.732924],
["2AA5A",49.1127,9.732066],
["2AA5E",49.11105,9.732402],
["2AA62",49.11105,9.732401],
["2AA66",49.11105,9.732407],
["2AA6A",49.11105,9.732407],
["2AA6E",49.11105,9.732402],
["2AA71",49.11105,9.732407],
["2AA76",49.11095,9.732458],
["2AA78",49.11094,9.732458],
["2AA7D",49.11105,9.732777],
["2AA82",49.11105,9.732724],
["2AA85",49.11105,9.732719],
["2AA89",49.11103,9.732656],
["2AA8D",49.11103,9.732657],
["2AAA4",49.11138,9.731814],
["2AAA8",49.11139,9.731811],
["2AAAD",49.1113,9.731859],
["2AAB0",49.1113,9.731854],
["2AAB5",49.11233,9.731238],
["2AAB7",49.11233,9.731236],
["2AABB",49.11233,9.731236],
["2AABF",49.11233,9.731236],
["2AAC2",49.11233,9.731241],
["2AAC5",49.11233,9.731242],
["2AAC9",49.11233,9.73124],
["2AACF",49.11155,9.731709],
["2AAD1",49.11169,9.731587],
["2AAD3",49.11161,9.731429],
["2AAD5",49.11181,9.73129],
["2AAD8",49.1121,9.731597],
["2AADA",49.11214,9.731741],
["2AADC",49.10966,9.732495],
["2AADF",49.10966,9.732501],
["2AAE2",49.10966,9.732501],
["2AAE6",49.10965,9.732501],
["2AAEA",49.10966,9.732495],
["2AAEE",49.10965,9.732495],
["2AAF2",49.11008,9.734241],
["2AAF5",49.11008,9.734238],
["2AAF9",49.11007,9.734241],
["2AAFD",49.11008,9.73424],
["2AB00",49.11008,9.73424],
["2AB04",49.11008,9.734242],
["2AB08",49.11013,9.734281],
["2AB0A",49.11014,9.734285],
["2AB0C",49.11027,9.734258],
["2AB0F",49.11027,9.734253],
["2AB12",49.11028,9.734257],
["2AB15",49.11027,9.734251],
["2AB25",49.10835,9.731818],
["2AB27",49.10833,9.73174],
["2AB2A",49.10832,9.731737],
["2AB2D",49.10835,9.731757],
["2AB30",49.10835,9.731754],
["2AB33",49.10834,9.731733],
["2AB37",49.10833,9.731731],
["2AB3B",49.10951,9.732473],
["2AB3F",49.1095,9.732476],
["2AB6B",49.11545,9.733203],
["2AB6D",49.11546,9.733203],
["2AB71",49.11512,9.733327],
["2AB73",49.11512,9.733321],
["2AB75",49.11407,9.732445],
["2AB77",49.11408,9.732442],
["2AB79",49.11374,9.732198],
["2AB7B",49.11372,9.732246],
["2AB7E",49.11372,9.73224],
["2AB81",49.11407,9.732442],
["2AB84",49.11407,9.732433],
["2AB87",49.11534,9.733193],
["2AB89",49.1137,9.731645],
["2AB8B",49.11369,9.731969],
["2AB8D",49.11348,9.732494],
["2AB8F",49.11334,9.733015],
["2AB91",49.11317,9.732867],
["2AB93",49.11354,9.732508],
["2AB95",49.11371,9.732227],
["2AB99",49.11372,9.732233],
["2AB9D",49.11377,9.732272],
["2ABA1",49.11376,9.732267],
["2ABA6",49.11296,9.732912],
["2ABA9",49.11296,9.732906],
["2ABAC",49.11314,9.732972],
["2ABAF",49.11314,9.732961],
["2ABB2",49.11312,9.732988],
["2ABB6",49.11312,9.732978],
["2ABBA",49.11316,9.732965],
["2ABBE",49.11316,9.732973],
["2ABC7",49.11482,9.733088],
["2ABCD",49.11472,9.732886],
["2ABCF",49.11473,9.73319],
["2ABD2",49.11474,9.733182],
["2ABD5",49.11546,9.733215],
["2ABD9",49.11545,9.733217],
["2ABE6",49.114,9.732304],
["2ABE8",49.11399,9.732305],
["2ABEA",49.11382,9.732812],
["2AC25",49.10953,9.732494],
["2AC28",49.10954,9.732494],
["2AC2C",49.1098,9.732467],
["2AC2F",49.10979,9.732477],
["2AC33",49.10976,9.733239],
["2AC36",49.10976,9.733233],
["2AC39",49.10946,9.734597],
["2AC3C",49.10947,9.734599],
["2AC3F",49.11005,9.734282],
["2AC42",49.11005,9.734289],
["2AC46",49.11375,9.732319],
["2AC49",49.1139,9.732218],
["2AC4B",49.1138,9.731725],
["2AC4D",49.11376,9.731937],
["2AC4F",49.11375,9.732003],
["2AC51",49.11366,9.732175],
["2AC53",49.11367,9.732378],
["2AC55",49.11357,9.732466],
["2AC57",49.11354,9.732366],
["2AC59",49.11332,9.732373],
["2AC5B",49.11341,9.7327],
["2AC5D",49.11334,9.732802],
["2AC5F",49.11292,9.732698],
["2AC61",49.11279,9.73227],
["2AC63",49.11258,9.732067],
["2AC65",49.11258,9.731898],
["2AC67",49.11263,9.731783],
["2AC69",49.11262,9.731701],
["2AC6B",49.11254,9.731717],
["2AC6D",49.11259,9.731516],
["2AC6F",49.11255,9.731321],
["2AC71",49.11114,9.731516],
["2AC73",49.1113,9.731711],
["2AC75",49.11116,9.73183],
["2AC77",49.11211,9.732784],
["2AC79",49.11213,9.732855],
["2AC7B",49.11197,9.732269],
["2AC7D",49.11193,9.73236],
["2AC7F",49.11185,9.732275],
["2AC81",49.11186,9.732367],
["2AC83",49.11175,9.732285],
["2AC85",49.11174,9.7324],
["2AC87",49.11173,9.732293],
["2AC89",49.11169,9.732291],
["2AC8B",49.11163,9.7323],
["2AC8D",49.1116,9.732409],
["2AC8F",49.11156,9.732301],
["2AC91",49.11153,9.732414],
["2AC93",49.11142,9.732224],
["2AC95",49.11142,9.732532],
["2AC97",49.11144,9.732602],
["2AC99",49.11145,9.732693],
["2AC9B",49.11152,9.732757],
["2AC9D",49.11156,9.732973],
["2AC9F",49.11132,9.73247],
["2ACA1",49.11122,9.732472],
["2ACA3",49.11127,9.732833],
["2ACA5",49.11109,9.733039],
["2ACA7",49.11088,9.732084],
["2ACA9",49.11076,9.73254],
["2ACAB",49.1106,9.732657],
["2ACAD",49.11055,9.732213],
["2ACAF",49.11053,9.73212],
["2ACB1",49.1104,9.73256],
["2ACB3",49.11036,9.732541],
["2ACB5",49.11034,9.732541],
["2ACB7",49.11019,9.732547],
["2ACB9",49.10979,9.732432],
["2ACBB",49.10966,9.732827],
["2ACBD",49.10967,9.732851],
["2ACBF",49.10972,9.732973],
["2ACC1",49.10971,9.733151],
["2ACC3",49.10946,9.733109],
["2ACC5",49.10978,9.733544],
["2ACC7",49.10988,9.733626],
["2ACC9",49.10998,9.733621],
["2ACCB",49.10999,9.733876],
["2ACCD",49.11014,9.733681],
["2ACCF",49.11007,9.733801],
["2ACD1",49.11052,9.734225],
["2ACD3",49.11039,9.734268],
["2ACD5",49.11018,9.734142],
["2ACD7",49.11012,9.73407],
["2ACD9",49.11028,9.734189],
["2ACDB",49.11026,9.734279],
["2ACDD",49.11,9.734192],
["2ACDF",49.10996,9.734248],
["2ACE1",49.10999,9.734375],
["2ACE3",49.1099,9.734311],
["2ACE5",49.10972,9.734241],
["2ACE7",49.1096,9.734382],
["2ACE9",49.10972,9.735107],
["2ACEB",49.10974,9.7354],
["2ACED",49.10925,9.734911],
["2ACEF",49.10887,9.734848],
["2ACF1",49.10866,9.736234],
["2ACF3",49.10876,9.736326],
["2ACF5",49.10884,9.73615],
["2ACF7",49.10884,9.736576],
["2ACF9",49.10899,9.736613],
["2ACFB",49.1097,9.734877],
["2ACFD",49.11242,9.732195],
["2ACFF",49.11235,9.732215],
["2AD01",49.1086,9.735916],
["2AD03",49.10985,9.733357],
["2AD05",49.11271,9.732102],
["2AD07",49.11086,9.733057],
["2AD09",49.11101,9.732959],
["2AD0B",49.11104,9.732638],
["2AD0D",49.11148,9.731576],
["2AD0F",49.11195,9.731462],
["2AD11",49.11207,9.731259],
["2AD13",49.11288,9.732592],
["2AD15",49.1137,9.731771],
["2AD17",49.11379,9.731822],
["2AD19",49.10899,9.734054],
["2AD1B",49.10916,9.734175],
["2AD1F",49.11546,9.733182],
["2B0B6",49.11149,9.73298],
["2B0C2",49.10878,9.736871],
["2B0CE",49.10876,9.736745],
["2B0E4",49.10897,9.736538],
["2B0ED",49.109,9.736618],
["2B105",49.10889,9.736319],
["2B10E",49.10879,9.736206],
["2B117",49.10876,9.736139],
["2B128",49.10893,9.73605],
["2B134",49.10874,9.735765],
["2B14A",49.10874,9.735354],
["2B154",49.1087,9.735146],
["2B163",49.10864,9.735044],
["2B176",49.10881,9.734982],
["2B19A",49.10913,9.734847],
["2B1A3",49.10885,9.734907],
["2B1AB",49.10886,9.734851],
["2B1B3",49.10893,9.735078],
["2B1BB",49.10862,9.734939],
["2B1C4",49.10902,9.734775],
["2B1CC",49.10925,9.734922],
["2B1EC",49.10953,9.734597],
["2B1F4",49.10945,9.734804],
["2B204",49.10946,9.734546],
["2B209",49.10946,9.734553],
["2B212",49.10938,9.734483],
["2B21B",49.10901,9.734042],
["2B22A",49.10905,9.734093],
["2B232",49.10917,9.734165],
["2B236",49.10915,9.734149],
["2B23E",49.10973,9.734227],