Skip to content

Commit

Permalink
increase timescaled wait
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkianwee committed Jan 14, 2021
1 parent 07500d7 commit b0ba90d
Show file tree
Hide file tree
Showing 37 changed files with 671 additions and 61 deletions.
66 changes: 34 additions & 32 deletions shellscript/setup_masa3db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,42 @@ echo 'Enter DB Container Name'
read -p "(default=spatempdb): " CONTAINERNAME1
CONTAINERNAME1=${CONTAINERNAME1:-spatempdb}
#DB PORT
echo
echo
echo 'Enter Port to listen to for the DB Container.'
read -p "(default=5432): " DBPORT
DBPORT=${DBPORT:-5432}
#DBUSER
echo
echo
echo 'Enter User for Database'
read -p "(default=postgres): " DBUSER
DBUSER=${DBUSER:-postgres}
#DBPASSWORD
echo
echo
echo 'Enter Password for the Database'
read -p "(default=postgres): " DBPASSWORD
DBPASSWORD=${DBPASSWORD:-postgres}
#DBNAME
#DBNAME
echo
echo 'Enter Name for the Database'
read -p "(default=spatempdb): " DBNAME
DBNAME=${DBNAME:-spatempdb}
echo
echo
echo 'Enter FROST-Server Container Name'
read -p "(default=frost): " CONTAINERNAME2
CONTAINERNAME2=${CONTAINERNAME2:-frost}
echo
echo
echo 'Enter HTTP Port for FROST-Server'
read -p "(default=8080): " FSPORT1
FSPORT1=${FSPORT1:-8080}
echo
echo
echo 'Enter MQTT Port for FROST-Server'
read -p "(default=1883): " FSPORT2
FSPORT2=${FSPORT2:-1883}
echo
echo
echo 'Enter Service Root URL'
read -p "(default=http://localhost:8080/FROST-Server): " ROOTURL
ROOTURL=${ROOTURL:-http://localhost:8080/FROST-Server}
echo
echo
echo 'Allow Public to Request for Data with no Password?'
read -p "(default=true): " AUTHREAD
AUTHREAD=${AUTHREAD:-true}
Expand All @@ -67,7 +67,7 @@ echo '--------------------------------'
echo 'Creating the user-defined network masa3db'
docker network create --driver bridge masa3db

# Create Database Container
# Create Database Container
echo '------------------------------------------------------'
echo 'Trying to start db container now ...'
echo '------------------------------------------------------'
Expand All @@ -92,36 +92,37 @@ docker run -d --name "$CONTAINERNAME2"\
-p $FSPORT1:8080\
-p $FSPORT2:1883\
-e "serviceRootUrl=$ROOTURL"\
-e "http_cors_enable=true"\
-e "http_cors_allowed.origins=*"\
-e "persistence_db_driver=org.postgresql.Driver"\
-e "persistence_db_url=jdbc:postgresql://$CONTAINERNAME1:5432/$DBNAME"\
-e "persistence_db_username=$DBUSER"\
-e "persistence_db_password=$DBPASSWORD"\
-e "persistence_autoUpdateDatabase=true"\
-e "auth_provider=de.fraunhofer.iosb.ilt.frostserver.auth.basic.BasicAuthProvider"\
-e "auth_allowAnonymousRead=$AUTHREAD"\
-e "auth_autoUpdateDatabase=true"\
-e "auth_realmName=AuthWin"\
-e "auth_db_jndi_datasource=jdbc/$DBNAME"\
-e "auth_db_driver=org.postgresql.Driver"\
-e "auth_db_url=jdbc:postgresql://$CONTAINERNAME1:5432/$DBNAME"\
-e "auth_db_username=$DBUSER"\
-e "auth_db_password=$DBPASSWORD"\
-e "auth_db_conn_max=20"\
-e "auth_db_conn_idle_max=10"\
-e "auth_db_conn_idle_min=-1"\
-e "maxTop=10000"\
-e "http_cors_enable=true"\
-e "http_cors_allowed.origins=*"\
-e "persistence_db_driver=org.postgresql.Driver"\
-e "persistence_db_url=jdbc:postgresql://$CONTAINERNAME1:5432/$DBNAME"\
-e "persistence_db_username=$DBUSER"\
-e "persistence_db_password=$DBPASSWORD"\
-e "persistence_autoUpdateDatabase=true"\
-e "auth_provider=de.fraunhofer.iosb.ilt.frostserver.auth.basic.BasicAuthProvider"\
-e "auth_allowAnonymousRead=$AUTHREAD"\
-e "auth_autoUpdateDatabase=true"\
-e "auth_realmName=AuthWin"\
-e "auth_db_jndi_datasource=jdbc/$DBNAME"\
-e "auth_db_driver=org.postgresql.Driver"\
-e "auth_db_url=jdbc:postgresql://$CONTAINERNAME1:5432/$DBNAME"\
-e "auth_db_username=$DBUSER"\
-e "auth_db_password=$DBPASSWORD"\
-e "auth_db_conn_max=20"\
-e "auth_db_conn_idle_max=10"\
-e "auth_db_conn_idle_min=-1"\
fraunhoferiosb/frost-server:latest

#wait for abit before reconfiguring the FROST-server
echo '------------------------------------------------------'
echo 'Configuring the database container ... '
echo '------------------------------------------------------'
TOTAL=60
TOTAL=120
TIME=0
while [ $TIME -le 60 ]
while [ $TIME -le 120 ]
do
echo "Configuring database, wait for 60 seconds ... $TIME seconds"
echo "Configuring database, wait for 120 seconds ... $TIME seconds"
TIME=$(($TIME + 10))
sleep 10
done
Expand All @@ -130,3 +131,4 @@ docker exec -it "$CONTAINERNAME1" psql -U "$DBUSER" -d "$DBNAME" -c 'CREATE EXTE
docker exec -it "$CONTAINERNAME1" psql -U "$DBUSER" -d "$DBNAME" -c "ALTER TABLE \"OBSERVATIONS\" DROP CONSTRAINT \"OBSERVATIONS_PKEY\";"
docker exec -it "$CONTAINERNAME1" psql -U "$DBUSER" -d "$DBNAME" -c "SELECT create_hypertable('\"OBSERVATIONS\"','PHENOMENON_TIME_START',chunk_time_interval => interval '14 days');"
docker exec -it "$CONTAINERNAME1" psql -U "$DBUSER" -d "$DBNAME" -c "CREATE INDEX \"OBSERVATIONS_PKEY\" ON \"OBSERVATIONS\" USING btree(\"ID\");"
docker exec -it "$CONTAINERNAME1" psql -U "$DBUSER" -d "$DBNAME" -c "CREATE INDEX \"OBS-DS_ID-PHTIME_SE-O_ID\" on \"OBSERVATIONS\" using btree(\"DATASTREAM_ID\",\"PHENOMENON_TIME_START\" asc, \"PHENOMENON_TIME_END\" asc);"
Binary file modified user_manual/_build/.doctrees/docs/040/040task.doctree
Binary file not shown.
Binary file not shown.
Binary file modified user_manual/_build/.doctrees/environment.pickle
Binary file not shown.
Binary file added user_manual/_build/html/_images/spshg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions user_manual/_build/html/_sources/docs/040/0411expgltf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Export glTF
Install Import/Exporter Tool here: {doc}`045import_citygml`.

1. Go to the tab Preferences. On the left panel go to KML/COLLADA/glTF Export -> General. In the General window:
<br><br/>
a. Tick the 'Create glTF model; Path of the COLLADA2glTF Tool:'

b. Select Export glTF version 2.0

c. Tick 'Write JSON file' -> 'of type JSONP' -> 'with callback method name': handle_3DCityDB_data
<br><br/>
2. At the KML/COLLADA/glTF tab fill in the file to export to with the 'Browse' button.
<br><br/>
a. Specify if you want to export a single object or by bounding box. You can calculate the bounding box of features in the database with the 'Database' tab.

b. Go to the Database tab. Fill in all the necessary connection details to connect to your 3DCityDB. In the section 'Database operation', go to 'Bounding box' tab. Here you can choose the top feature to include in your bounding box calculation. Then calculate the bounding box. Copy the calculated bounding box and use it in 'KML/COLLADA/glTF' tab for your export.

c. For the tiling option, choose automatic to have a tile size of 125mx125m.
<br><br/>
3. Choose the level of detail from the section 'Export from level of detail'. In the Display as you can choose to export either the 'Footprint', 'Extruded', 'Geometry' and 'COLLADA/glTF'.
```
Footprint - export the footprint of the feature. For LOD 0 objects.
Extruded - export the extrusion of the footprint.
Geometry - each surface of the feature is exported.
COLLADA/glTF - geometry and texture of the feature is exported
```
a. For the visible from ____ pixels. When viewed in google earth pro and the web map client, 0 pixels means it will always be rendered, a bigger number means it will only be rendered when you zoom closer, the bigger the number the closer you need to zoom.
b. In the section Feature Types, choose the feature type to export.
<br><br/>
4. Check the exported geometries by viewing them in Google Earth Pro.
5. Next go to the SPSHG tab. Let's export the attributes of the exported feature. In the previous steps, only the geometries are exported, the semantics of the features are not exported with the glTF.
6. In the SPSHG tab allows you to export the attributes of the features into a CSV file, we will first define the columns and content of the CSV to be exported.
```{figure} /_static/0411expgltf/spshg.png
:width: 100%
:name: spshg
Export attributes to csv.
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions user_manual/_build/html/docs/010/010intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
Install Web Feature Service (WFS)
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/0411expgltf.html">
Export glTF
</a>
</li>
</ul>
<i class="fas fa-chevron-down">
</i>
Expand Down
7 changes: 6 additions & 1 deletion user_manual/_build/html/docs/020/020installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/047cesium3d.html">
Visualisation with CesiumJS
Install 3DcityDB Web Map Client
</a>
</li>
<li class="toctree-l2">
Expand All @@ -190,6 +190,11 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
Install Web Feature Service (WFS)
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/0411expgltf.html">
Export glTF
</a>
</li>
</ul>
<i class="fas fa-chevron-down">
</i>
Expand Down
7 changes: 6 additions & 1 deletion user_manual/_build/html/docs/020/021docker.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/047cesium3d.html">
Visualisation with CesiumJS
Install 3DcityDB Web Map Client
</a>
</li>
<li class="toctree-l2">
Expand All @@ -190,6 +190,11 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
Install Web Feature Service (WFS)
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/0411expgltf.html">
Export glTF
</a>
</li>
</ul>
<i class="fas fa-chevron-down">
</i>
Expand Down
7 changes: 6 additions & 1 deletion user_manual/_build/html/docs/020/022setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/047cesium3d.html">
Visualisation with CesiumJS
Install 3DcityDB Web Map Client
</a>
</li>
<li class="toctree-l2">
Expand All @@ -190,6 +190,11 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
Install Web Feature Service (WFS)
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/0411expgltf.html">
Export glTF
</a>
</li>
</ul>
<i class="fas fa-chevron-down">
</i>
Expand Down
7 changes: 6 additions & 1 deletion user_manual/_build/html/docs/020/023maintain.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/047cesium3d.html">
Visualisation with CesiumJS
Install 3DcityDB Web Map Client
</a>
</li>
<li class="toctree-l2">
Expand All @@ -190,6 +190,11 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
Install Web Feature Service (WFS)
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/0411expgltf.html">
Export glTF
</a>
</li>
</ul>
<i class="fas fa-chevron-down">
</i>
Expand Down
7 changes: 6 additions & 1 deletion user_manual/_build/html/docs/020/024man_setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/047cesium3d.html">
Visualisation with CesiumJS
Install 3DcityDB Web Map Client
</a>
</li>
<li class="toctree-l2">
Expand All @@ -190,6 +190,11 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
Install Web Feature Service (WFS)
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/0411expgltf.html">
Export glTF
</a>
</li>
</ul>
<i class="fas fa-chevron-down">
</i>
Expand Down
7 changes: 6 additions & 1 deletion user_manual/_build/html/docs/030/030work.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/047cesium3d.html">
Visualisation with CesiumJS
Install 3DcityDB Web Map Client
</a>
</li>
<li class="toctree-l2">
Expand All @@ -190,6 +190,11 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
Install Web Feature Service (WFS)
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/0411expgltf.html">
Export glTF
</a>
</li>
</ul>
<i class="fas fa-chevron-down">
</i>
Expand Down
7 changes: 6 additions & 1 deletion user_manual/_build/html/docs/030/031work1.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/047cesium3d.html">
Visualisation with CesiumJS
Install 3DcityDB Web Map Client
</a>
</li>
<li class="toctree-l2">
Expand All @@ -190,6 +190,11 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
Install Web Feature Service (WFS)
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../040/0411expgltf.html">
Export glTF
</a>
</li>
</ul>
<i class="fas fa-chevron-down">
</i>
Expand Down
5 changes: 5 additions & 0 deletions user_manual/_build/html/docs/040/040task.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
Install Web Feature Service (WFS)
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="0411expgltf.html">
Export glTF
</a>
</li>
</ul>
<i class="fas fa-chevron-down">
</i>
Expand Down
11 changes: 8 additions & 3 deletions user_manual/_build/html/docs/040/0410wfs.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<script async="async" src="../../_static/sphinx-thebe.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Integration" href="../050/050integration.html" />
<link rel="next" title="Export glTF" href="0411expgltf.html" />
<link rel="prev" title="Get SSL Certificate for you FROST-Server and Grafana Server" href="049ssl_cert.html" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand Down Expand Up @@ -172,7 +172,7 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
</li>
<li class="toctree-l2">
<a class="reference internal" href="047cesium3d.html">
Visualisation with CesiumJS
Install 3DcityDB Web Map Client
</a>
</li>
<li class="toctree-l2">
Expand All @@ -190,6 +190,11 @@ <h1 class="site-logo" id="site-title">Masa3DB User Manual</h1>
Install Web Feature Service (WFS)
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="0411expgltf.html">
Export glTF
</a>
</li>
</ul>
<i class="fas fa-chevron-down">
</i>
Expand Down Expand Up @@ -355,7 +360,7 @@ <h1>Install Web Feature Service (WFS)<a class="headerlink" href="#install-web-fe
<div class='prev-next-bottom'>

<a class='left-prev' id="prev-link" href="049ssl_cert.html" title="previous page">Get SSL Certificate for you FROST-Server and Grafana Server</a>
<a class='right-next' id="next-link" href="../050/050integration.html" title="next page">Integration</a>
<a class='right-next' id="next-link" href="0411expgltf.html" title="next page">Export glTF</a>

</div>
<footer class="footer mt-5 mt-md-0">
Expand Down
Loading

0 comments on commit b0ba90d

Please sign in to comment.