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

not creating nodes density table if was imported from db dump

parent 5c9158d8
No related branches found
No related tags found
No related merge requests found
Upcoming version:
-----------------
- not creating nodes density table if was imported from db dump (Nikolaus Krismer)
Version v0.6.0: Version v0.6.0:
--------------- ---------------
- gradle update (to version 2.11) (Nikolaus Krismer) - gradle update (to version 2.11) (Nikolaus Krismer)
......
...@@ -160,10 +160,16 @@ function fn_import_dataset_postgis() { ...@@ -160,10 +160,16 @@ function fn_import_dataset_postgis() {
fi fi
if $AVAILABLE_POSTGIS && $AVAILABLE_ISOCHRONE_TOOLS; then if $AVAILABLE_POSTGIS && $AVAILABLE_ISOCHRONE_TOOLS; then
${EXEC_JAVA} -cp "${DEPLOY_DIR}/isochrone-tools.jar" "at.uibk.dbis.isochrone.generator.density.DensityGenerator" -t "${CITY}" -d "${DENSITY}" >> "$WORKING_DIR/create_datamodel_${CITY}_${SRID}.log" 2>&1 local exists_density=$(PGPASSWORD="$PG_DB_PASSWORD" ${EXEC_PSQL} -qAt -U "$PG_DB_USER" -h localhost -d isochrone -c "SELECT EXISTS (SELECT * FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid=C.relnamespace) WHERE nspname = 'public' AND relname='${CITY}_nodes_density')")
if [ $? -ne 0 ]; then if [ "$exists_density" == "t" ]; then
fn_echo "An error occurred while creating the node_density table for '${CITY}' using isochrone-tools. The process will exit now with status $?" "ERROR" fn_echo " - nodes_density exists... not re-creating table"
exit $? else
fn_echo " - nodes_densities does not exist... creating table"
${EXEC_JAVA} -cp "${DEPLOY_DIR}/isochrone-tools.jar" "at.uibk.dbis.isochrone.generator.density.DensityGenerator" -t "${CITY}" -d "${DENSITY}" >> "$WORKING_DIR/create_datamodel_${CITY}_${SRID}.log" 2>&1
if [ $? -ne 0 ]; then
fn_echo "An error occurred while creating the node_density table for '${CITY}' using isochrone-tools. The process will exit now with status $?" "ERROR"
exit $?
fi
fi fi
fi fi
......
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