Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IQG4iCity
Schwabisch_Hall
Commits
5d0b0145
Commit
5d0b0145
authored
Oct 26, 2022
by
JOE XMG
Browse files
update
parent
d10371dc
Pipeline
#6971
passed with stage
in 11 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/application/js/cesium_00_Main.js
View file @
5d0b0145
...
...
@@ -127,7 +127,7 @@ var load_utility_line = function () {
entity
.
polyline
.
classificationType
=
Cesium
.
ClassificationType
.
TERRAIN
;
entity
.
polyline
.
material
=
Cesium
.
Color
.
HOTPINK
;
}
$
(
"
#util_nw_line_loading
"
).
hide
()
$
(
"
#util_nw_line_loading
"
).
hide
()
})
}
else
{
...
...
@@ -156,23 +156,23 @@ for (let i = 0; i < utility_point.length; i++) {
name
:
nameub
,
position
:
Cesium
.
Cartesian3
.
fromDegrees
(
lonub
,
latub
),
description
:
"
Handle:
"
+
nameub
,
point
:
{
pixelSize
:
5
,
color
:
Cesium
.
Color
.
RED
,
outlineColor
:
Cesium
.
Color
.
WHITE
,
outlineWidth
:
2
,
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
'
,
label
:
{
text
:
"
Handle:
"
+
nameub
,
font
:
'
14pt monospace
'
,
style
:
Cesium
.
LabelStyle
.
FILL_AND_OUTLINE
,
outlineWidth
:
2
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
outlineWidth
:
2
,
verticalOrigin
:
Cesium
.
VerticalOrigin
.
BOTTOM
,
heightReference
:
"
CLAMP_TO_GROUND
"
,
show
:
false
,
pixelOffset
:
new
Cesium
.
Cartesian2
(
0
,
-
9
)
pixelOffset
:
new
Cesium
.
Cartesian2
(
0
,
-
9
)
},
// billboard: {
// image: pinBuilder.fromMakiIconId('bus', Cesium.Color.ORANGE.withAlpha(0.7), 60),
...
...
@@ -197,23 +197,39 @@ for (let i = 0; i < utility_point.length; i++) {
// );
var
building_style
=
[]
var
load_building_part_simstadt
=
false
var
addBuilding
=
function
()
{
try
{
tileset_3Dbuildings
=
viewer
.
scene
.
primitives
.
add
(
new
Cesium
.
Cesium3DTileset
({
url
:
'
https://steinbeis-3dps.eu/3DGeoVolumes/collections/schwabisch_hall_city/tileset.json
'
,
maximumScreenSpaceError
:
8
// default value
if
(
load_building_part_simstadt
)
{
tileset_3Dbuildings
=
viewer
.
scene
.
primitives
.
add
(
new
Cesium
.
Cesium3DTileset
({
url
:
'
https://steinbeis-3dps.eu/3DGeoVolumes/collections/schwabisch_hall_city/tileset.json
'
,
maximumScreenSpaceError
:
8
// default value
}));
tileset_3Dbuildings
.
readyPromise
.
then
(
function
()
{
var
boundingSphere
=
tileset_3Dbuildings
.
boundingSphere
;
var
cartographic
=
Cesium
.
Cartographic
.
fromCartesian
(
boundingSphere
.
center
);
var
surface
=
Cesium
.
Cartesian3
.
fromRadians
(
cartographic
.
longitude
,
cartographic
.
latitude
,
0.0
);
var
offset
=
Cesium
.
Cartesian3
.
fromRadians
(
cartographic
.
longitude
,
cartographic
.
latitude
,
50
);
var
translation
=
Cesium
.
Cartesian3
.
subtract
(
offset
,
surface
,
new
Cesium
.
Cartesian3
());
tileset_3Dbuildings
.
modelMatrix
=
Cesium
.
Matrix4
.
fromTranslation
(
translation
);
});
}
tileset_3Dbuildings_full
=
viewer
.
scene
.
primitives
.
add
(
new
Cesium
.
Cesium3DTileset
({
url
:
'
https://steinbeis-3dps.eu/3DGeoVolumes/collections/schwabisch_hall_city_function/tileset.json
'
,
maximumScreenSpaceError
:
8
,
}));
}
catch
(
err
)
{
console
.
log
(
'
-> add 3DTiles failed!
\n
'
+
err
);
}
tileset_3Dbuildings
.
readyPromise
.
then
(
function
()
{
var
boundingSphere
=
tileset_3Dbuildings
.
boundingSphere
;
tileset_3Dbuildings_full
.
readyPromise
.
then
(
function
()
{
var
boundingSphere
=
tileset_3Dbuildings_full
.
boundingSphere
;
var
cartographic
=
Cesium
.
Cartographic
.
fromCartesian
(
boundingSphere
.
center
);
var
surface
=
Cesium
.
Cartesian3
.
fromRadians
(
cartographic
.
longitude
,
cartographic
.
latitude
,
0.0
);
var
offset
=
Cesium
.
Cartesian3
.
fromRadians
(
cartographic
.
longitude
,
cartographic
.
latitude
,
50
);
var
translation
=
Cesium
.
Cartesian3
.
subtract
(
offset
,
surface
,
new
Cesium
.
Cartesian3
());
tileset_3Dbuildings
.
modelMatrix
=
Cesium
.
Matrix4
.
fromTranslation
(
translation
);
tileset_3Dbuildings
_full
.
modelMatrix
=
Cesium
.
Matrix4
.
fromTranslation
(
translation
);
});
// Styling the 3d model
building_style
[
"
AllWhite
"
]
=
new
Cesium
.
Cesium3DTileStyle
({
...
...
@@ -231,7 +247,7 @@ var addBuilding = function () {
// color: "color('#ffffff',0.25)"
"
color
"
:
{
"
conditions
"
:
[
[
"
true
"
,
"
color('#ffffff', 0.5)
"
]
[
"
true
"
,
"
color('#ffffff', 0.
7
5)
"
]
]
}
});
...
...
@@ -280,7 +296,7 @@ var addBuilding = function () {
]
}
});
tileset_3Dbuildings
.
style
=
building_style
[
"
AllWhite
"
];
tileset_3Dbuildings
_full
.
style
=
building_style
[
"
AllWhite
"
];
};
addBuilding
();
...
...
@@ -383,6 +399,25 @@ $('#BuildingStyleSelector').on('change', function () {
console
.
log
(
`No
${
this
.
value
}
Style in the html`
)
}
});
$
(
'
#BuildingFunctionStyleSelector
'
).
on
(
'
change
'
,
function
()
{
// alert(this.value);
tileset_3Dbuildings_full
.
style
=
new
Cesium
.
Cesium3DTileStyle
({
color
:
{
conditions
:
[
[
"
${citygml_function} === '
"
+
this
.
value
+
"
'
"
,
"
color('red')
"
],
[
"
true
"
,
"
color('white')
"
],
],
},
});
// $('.cesiumLegend').hide()
// try {
// $(`#${this.value}-legend`).show()
// // draw Chart
// activateChart(this.value);
// } catch (error) {
// console.log(`No ${this.value} Style in the html`)
// }
});
$
(
"
#shadow_check
"
).
change
(
function
()
{
if
(
this
.
checked
)
{
...
...
@@ -413,6 +448,4 @@ $("#util_nw_point").change(function () {
utility_Point_Entities
[
i
].
label
.
show
=
false
;
}
}
});
});
\ No newline at end of file
public/application/js/cesium_mouse_handling.js
View file @
5d0b0145
...
...
@@ -78,7 +78,8 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(
selected
.
feature
=
undefined
;
$
(
"
#attribute-table-area
"
).
html
(
""
)
// refresh the attribute table area
$
(
"
#chart_intro
"
).
hide
()
// hide chart title
$
(
"
#chart_area
"
).
hide
()
// hide chart title
$
(
"
#sensor-hint
"
).
show
()
}
// Pick a new feature
const
pickedFeature
=
viewer
.
scene
.
pick
(
movement
.
position
);
...
...
@@ -120,7 +121,7 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(
}
}
table_attribute_html
=
`
<h5>Attribute Table</h5>
<h5>
<i class="bi bi-card-list"></i>
Attribute Table</h5>
<table class="table">
<tbody>
${
attribute_text
}
...
...
@@ -197,6 +198,8 @@ viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(
}
]
$
(
"
#chart_intro
"
).
show
()
$
(
"
#chart_area
"
).
show
()
$
(
"
#sensor-hint
"
).
hide
()
drawChart
(
inputx
,
inputy_vor_vs_rueck
,
"
line
"
,
"
#chart_area
"
,
""
,
"
Temperature
"
)
}
...
...
public/dashboard/index.html
View file @
5d0b0145
...
...
@@ -112,7 +112,7 @@
</div>
</div>
</div>
</div>
<div
class=
"col-12 col-lg-3"
>
<div
class=
"card"
>
...
...
@@ -140,19 +140,112 @@
</label>
</div>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
value=
""
id=
"util_nw_Enisyst"
checked
>
<input
class=
"form-check-input"
type=
"checkbox"
value=
""
id=
"util_nw_Enisyst"
checked
>
<label
class=
"form-check-label"
for=
"util_nw_Enisyst"
>
Utility Network Stations (Enisyst)
</label>
</div>
<hr>
<h6>
Building Style
</h6>
<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>
<div
style=
"display: none;"
>
<h6>
Building Style
</h6>
<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>
<h6>
Building Function
</h6>
<select
class=
"form-select"
id=
"BuildingFunctionStyleSelector"
>
<option
value=
"AllWhite"
selected
>
Select One
</option>
<option
value=
'31001_1010'
>
Wohnhaus | Residential building
</option>
<option
value=
'31001_1020'
>
Wohnheim | Residential home
</option>
<option
value=
'31001_1022'
>
Seniorenheim | Retirement home
</option>
<option
value=
'31001_1121'
>
Wohn- und Verwaltungsgebäude | Residential and
administrative building
</option>
<option
value=
'31001_1122'
>
Wohn- und Bürogebäude | Residential and office
buildings
</option>
<option
value=
'31001_1123'
>
Wohn- und Geschäftsgebäude | Residential and
commercial buildings
</option>
<option
value=
'31001_1131'
>
Wohn- und Betriebsgebäude | Residential and farm
buildings
</option>
<option
value=
'31001_1222'
>
Wohn- und Wirtschaftsgebäude | Residential and farm
building
</option>
<option
value=
'31001_1312'
>
Wochenendhaus | Weekend house
</option>
<option
value=
'31001_1313'
>
Gartenhaus | Garden house
</option>
<option
value=
'31001_2020'
>
Bürogebäude | Office building
</option>
<option
value=
'31001_2050'
>
Geschäftsgebäude | Business building
</option>
<option
value=
'31001_2055'
>
Kiosk | Kiosk
</option>
<option
value=
'31001_2071'
>
Hotel, Motel, Pension | hotel, motel, boarding house
</option>
<option
value=
'31001_2072'
>
Jugendherberge | Youth hostel
</option>
<option
value=
'31001_2074'
>
Campingplatzgebäude | Campsite building
</option>
<option
value=
'31001_2081'
>
Gaststätte, Restaurant | pub, restaurant
</option>
<option
value=
'31001_2090'
>
Freizeit- und Vergnügungsstätte | Recreation and
amusement center
</option>
<option
value=
'31001_2111'
>
Fabrik | Factory
</option>
<option
value=
'31001_2112'
>
Betriebsgebäude | Factory building
</option>
<option
value=
'31001_2120'
>
Werkstatt | Workshop
</option>
<option
value=
'31001_2130'
>
Tankstelle | Gas station
</option>
<option
value=
'31001_2140'
>
Gebäude für Vorratshaltung | building for storage
</option>
<option
value=
'31001_2461'
>
Parkhaus | Parking garage
</option>
<option
value=
'31001_2463'
>
Garage | Garage
</option>
<option
value=
'31001_2501'
>
Gebäude zur Energieversorgung | Energy supply
building
</option>
<option
value=
'31001_2513'
>
Wasserbehälter | Water tank
</option>
<option
value=
'31001_2523'
>
Umformer | Converter
</option>
<option
value=
'31001_2611'
>
Gebäude der Kläranlage | Building for sewage
treatment plant
</option>
<option
value=
'31001_2612'
>
Toilette | Toilet
</option>
<option
value=
'31001_2721'
>
Scheune | Barn
</option>
<option
value=
'31001_2723'
>
Schuppen | Shed
</option>
<option
value=
'31001_2724'
>
Stall | Stable
</option>
<option
value=
'31001_2726'
>
Scheune und Stall | Barn and stable
</option>
<option
value=
'31001_2729'
>
Wirtschaftsgebäude | Farm building
</option>
<option
value=
'31001_2740'
>
Treibhaus, Gewächshaus | Greenhouse, greenhouse
</option>
<option
value=
'31001_3010'
>
Verwaltungsgebäude | Administration building
</option>
<option
value=
'31001_3012'
>
Rathaus | City hall
</option>
<option
value=
'31001_3013'
>
Post | Post office
</option>
<option
value=
'31001_3015'
>
Gericht | Court
</option>
<option
value=
'31001_3021'
>
Allgemein bildende Schule | General education school
</option>
<option
value=
'31001_3023'
>
Hochschulgebäude (Fachhochschule, Universität) |
University building (technical college, university)
</option>
<option
value=
'31001_3034'
>
Museum | Museum
</option>
<option
value=
'31001_3036'
>
Veranstaltungsgebäude | Event building
</option>
<option
value=
'31001_3041'
>
Kirche | Church
</option>
<option
value=
'31001_3043'
>
Kapelle | Chapel
</option>
<option
value=
'31001_3044'
>
Gemeindehaus | Community center
</option>
<option
value=
'31001_3051'
>
Krankenhaus | Hospital
</option>
<option
value=
'31001_3062'
>
Freizeit-, Vereinsheim, Dorfgemeinschafts-,
Bürgerhaus | recreation center, clubhouse, village hall, community center
</option>
<option
value=
'31001_3065'
>
Kinderkrippe, Kindergarten, Kindertagesstätte | Day
nursery, kindergarten, day care center
</option>
<option
value=
'31001_3071'
>
Polizei | Police
</option>
<option
value=
'31001_3072'
>
Feuerwehr | Fire department
</option>
<option
value=
'31001_3075'
>
Justizvollzugsanstalt | Correctional facility
</option>
<option
value=
'31001_3080'
>
Friedhofsgebäude | Cemetery building
</option>
<option
value=
'31001_3090'
>
Empfangsgebäude | Reception building
</option>
<option
value=
'31001_3210'
>
Gebäude für Sportzwecke | Building for sports
purposes
</option>
<option
value=
'31001_3211'
>
Sport-, Turnhalle | Sports hall, gymnasium
</option>
<option
value=
'31001_3220'
>
Badegebäude | Building for bathing
</option>
<option
value=
'31001_3221'
>
Hallenbad | Indoor swimming pool
</option>
<option
value=
'31001_3281'
>
Schutzhütte | Shelter
</option>
<option
value=
'51001_1002'
>
Kirchturm | Church tower
</option>
<option
value=
'51001_1008'
>
Sende-,Funkturm | broadcasting tower, radio tower
</option>
<option
value=
'51003_1201'
>
Silo | Silo
</option>
<option
value=
'51003_1205'
>
Tank | Tank
</option>
<option
value=
'51007_1400'
>
Befestigung (Burgruine) | Fortification (castle
ruins)
</option>
<option
value=
'51007_1510'
>
Stadtmauer | City wall
</option>
<option
value=
'51009_1610'
>
Überdachung | Roofing
</option>
</select>
<div
class=
"form-check pt-2"
>
<input
class=
"form-check-input"
type=
"checkbox"
value=
""
id=
"shadow_check"
>
...
...
@@ -160,32 +253,33 @@
Building Shadow
</label>
</div>
<hr>
</div>
</div>
</div>
</div>
</section>
<section
class=
"row"
>
<div
class=
"col-12"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
<h4><i
class=
"bi bi-graph-up"
></i>
Sensor
</h4>
</div>
<div
class=
"card-body"
>
<div
id=
"attribute-table-area"
>
<p>
Click on the utility network station (Enisyst) on the 3D Map to see sensor data.
</p>
</div>
<div
id=
"chart_area"
></div>
<div
class=
"col-12"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
<h4><i
class=
"bi bi-graph-up"
></i>
Sensor
</h4>
<p
id=
"sensor-hint"
>
Click on the utility network station (Enisyst) on the 3D Map to see
sensor data.
</p>
</div>
<div
class=
"card-body"
>
<div
id=
"attribute-table-area"
>
</div>
<div
id=
"chart_area"
></div>
</div>
</div>
</div>
</section>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment