Skip to content
Snippets Groups Projects
Commit a9c154da authored by User expired's avatar User expired
Browse files

added support for 3d datamodels

parent 302f1042
No related branches found
No related tags found
No related merge requests found
Pipeline #
Upcoming version: Upcoming version:
----------------- -----------------
- added support for 3d datamodels (Nikolaus Krismer)
- changing parameter usage for osmPti2mmds (Nikolaus Krismer) - changing parameter usage for osmPti2mmds (Nikolaus Krismer)
- updating gradle to version 3.1 (Nikolaus Krismer) - updating gradle to version 3.1 (Nikolaus Krismer)
- fixed minor problems with spaces in deploy directory (Nikolaus Krismer) - fixed minor problems with spaces in deploy directory (Nikolaus Krismer)
......
...@@ -19,6 +19,7 @@ IMPORT_DATA_SPATIALITE=true ...@@ -19,6 +19,7 @@ IMPORT_DATA_SPATIALITE=true
#TARGET_SRID="3857,4326" #TARGET_SRID="3857,4326"
TARGET_SRID="4326" TARGET_SRID="4326"
UPDATE_DATA=false UPDATE_DATA=false
USE_3D=true
CACHE_DIR_LOCAL="/tmp/vagrant-cache" CACHE_DIR_LOCAL="/tmp/vagrant-cache"
CACHE_DIR_REMOTE="https://dbis-owncloud.uibk.ac.at/index.php/s/kgjm3CItQJ6P374/download?path=%2F2016&files=" CACHE_DIR_REMOTE="https://dbis-owncloud.uibk.ac.at/index.php/s/kgjm3CItQJ6P374/download?path=%2F2016&files="
......
...@@ -110,11 +110,14 @@ function fn_import_dataset_neo4j_spatial() { ...@@ -110,11 +110,14 @@ function fn_import_dataset_neo4j_spatial() {
function fn_import_dataset_postgis() { function fn_import_dataset_postgis() {
local NAME="$1" local NAME="$1"
local SRID="$2" local SRID="$2"
local SQL_EXPORT_FILE="${NAME,,}_export_${SRID}.sql.gz"
local CITY=${NAME// /} local CITY=${NAME// /}
CITY=${CITY,,} CITY=${CITY,,}
local SQL_EXPORT_FILE="${NAME,,}_export_${SRID}.sql.gz"
if $USE_3D; then
SQL_EXPORT_FILE="${NAME,,}_export_${SRID}_3d.sql.gz"
fi
if ! $UPDATE_DATA; then if ! $UPDATE_DATA; then
fn_echo " - downloading SQL export" fn_echo " - downloading SQL export"
fn_download_newer $DOWNLOAD_DIR/$SQL_EXPORT_FILE "${CACHE_DIR_REMOTE}${SQL_EXPORT_FILE}" fn_download_newer $DOWNLOAD_DIR/$SQL_EXPORT_FILE "${CACHE_DIR_REMOTE}${SQL_EXPORT_FILE}"
...@@ -150,6 +153,16 @@ function fn_import_dataset_postgis() { ...@@ -150,6 +153,16 @@ function fn_import_dataset_postgis() {
# If working with multiple TARGET_SRIDs we have to delete an eventually existing nodes_density table here, so on import later a DROP TABLE ${CITY}_nodes works wihtout CASCADE (${EXEC_PGDUMP} does not use CASCADE) # If working with multiple TARGET_SRIDs we have to delete an eventually existing nodes_density table here, so on import later a DROP TABLE ${CITY}_nodes works wihtout CASCADE (${EXEC_PGDUMP} does not use CASCADE)
PGPASSWORD="$PG_DB_PASSWORD" ${EXEC_PSQL} -qAt -U "$PG_DB_USER" -h localhost -d isochrone -c "DROP TABLE IF EXISTS ${CITY}_nodes_density" >> "$WORKING_DIR/create_datamodel_${CITY}_${SRID}.log" 2>&1 PGPASSWORD="$PG_DB_PASSWORD" ${EXEC_PSQL} -qAt -U "$PG_DB_USER" -h localhost -d isochrone -c "DROP TABLE IF EXISTS ${CITY}_nodes_density" >> "$WORKING_DIR/create_datamodel_${CITY}_${SRID}.log" 2>&1
PGPASSWORD="spatial" ${EXEC_PGDUMP} -U spatial -h localhost -d spatial --clean --if-exists --no-privileges --no-owner -t "transformed.${CITY}_*" | sed -e "s/transformed/public/g" | PGPASSWORD="$PG_DB_PASSWORD" ${EXEC_PSQL} -qAt -U "$PG_DB_USER" -h localhost -d isochrone >> "$WORKING_DIR/create_datamodel_${CITY}_${SRID}.log" 2>&1 PGPASSWORD="spatial" ${EXEC_PGDUMP} -U spatial -h localhost -d spatial --clean --if-exists --no-privileges --no-owner -t "transformed.${CITY}_*" | sed -e "s/transformed/public/g" | PGPASSWORD="$PG_DB_PASSWORD" ${EXEC_PSQL} -qAt -U "$PG_DB_USER" -h localhost -d isochrone >> "$WORKING_DIR/create_datamodel_${CITY}_${SRID}.log" 2>&1
if $USE_3D; then
fn_echo " - adding node elevation for city \"${CITY}\" (using isochrone-tools)"
${EXEC_JAVA} -cp "${DEPLOY_DIR}/isochrone-tools.jar" at.uibk.dbis.isochrone.generator.elevation.SRTMGeneratorNode -ds "${CITY}" >> "$WORKING_DIR/create_elevation_${CITY}_${SRID}.log" 2>&1
fn_check_status
fn_echo " - adding edge elevation for city \"${CITY}\" (using isochrone-tools)"
${EXEC_JAVA} -cp "${DEPLOY_DIR}/isochrone-tools.jar" at.uibk.dbis.isochrone.generator.elevation.SRTMGeneratorEdge -ds "${CITY}" >> "$WORKING_DIR/create_elevation_${CITY}_${SRID}.log" 2>&1
fn_check_status
fi
fi fi
if $AVAILABLE_POSTGIS && $AVAILABLE_ISOCHRONE_TOOLS; then if $AVAILABLE_POSTGIS && $AVAILABLE_ISOCHRONE_TOOLS; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment