From a9c154da7b2a6d8e6ce4ccb74b7bda09ac72c006 Mon Sep 17 00:00:00 2001 From: Nikolaus Krismer <nikolaus.krismer@uibk.ac.at> Date: Tue, 11 Oct 2016 13:43:10 +0200 Subject: [PATCH] added support for 3d datamodels --- CHANGELOG.md | 1 + bootstrap/config.sh | 1 + bootstrap/importData.sh | 17 +++++++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e6fcd2..3c4c534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ Upcoming version: ----------------- + - added support for 3d datamodels (Nikolaus Krismer) - changing parameter usage for osmPti2mmds (Nikolaus Krismer) - updating gradle to version 3.1 (Nikolaus Krismer) - fixed minor problems with spaces in deploy directory (Nikolaus Krismer) diff --git a/bootstrap/config.sh b/bootstrap/config.sh index e22b03b..e9a9a01 100755 --- a/bootstrap/config.sh +++ b/bootstrap/config.sh @@ -19,6 +19,7 @@ IMPORT_DATA_SPATIALITE=true #TARGET_SRID="3857,4326" TARGET_SRID="4326" UPDATE_DATA=false +USE_3D=true CACHE_DIR_LOCAL="/tmp/vagrant-cache" CACHE_DIR_REMOTE="https://dbis-owncloud.uibk.ac.at/index.php/s/kgjm3CItQJ6P374/download?path=%2F2016&files=" diff --git a/bootstrap/importData.sh b/bootstrap/importData.sh index 2ecdfdb..7794a8b 100755 --- a/bootstrap/importData.sh +++ b/bootstrap/importData.sh @@ -110,11 +110,14 @@ function fn_import_dataset_neo4j_spatial() { function fn_import_dataset_postgis() { local NAME="$1" local SRID="$2" - - local SQL_EXPORT_FILE="${NAME,,}_export_${SRID}.sql.gz" local CITY=${NAME// /} 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 fn_echo " - downloading SQL export" fn_download_newer $DOWNLOAD_DIR/$SQL_EXPORT_FILE "${CACHE_DIR_REMOTE}${SQL_EXPORT_FILE}" @@ -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) 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 + + 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 if $AVAILABLE_POSTGIS && $AVAILABLE_ISOCHRONE_TOOLS; then -- GitLab