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

added support for chaging srid and fixed problem with exported datasets (did not contain density)

parent 8b629f99
No related branches found
No related tags found
No related merge requests found
Upcoming version: Upcoming version:
----------------- -----------------
- added support for chaging srid and fixed problem with exported datasets (did not contain density) (Nikolaus Krismer)
- always installing phpliteadmin when using spatialite now (Nikolaus Krismer) - always installing phpliteadmin when using spatialite now (Nikolaus Krismer)
- fixed problems with filenames in config (Nikolaus Krismer) - fixed problems with filenames in config (Nikolaus Krismer)
- merged (Nikolaus Krismer) - merged (Nikolaus Krismer)
......
...@@ -57,6 +57,7 @@ OSM_FILE_SALZBURG_FILTERED="salzburg-140301-filtered.osm" ...@@ -57,6 +57,7 @@ OSM_FILE_SALZBURG_FILTERED="salzburg-140301-filtered.osm"
OSM_FILE_SANFRANCISCO_FILTERED="sanfrancisco-140301-filtered.osm" OSM_FILE_SANFRANCISCO_FILTERED="sanfrancisco-140301-filtered.osm"
OSM_FILE_TRENTOALTOADIGE_FILTERED="southtyrol-140301-filtered.osm" OSM_FILE_TRENTOALTOADIGE_FILTERED="southtyrol-140301-filtered.osm"
OSM_KEYS="aerialway,highway,public_transport,railway,route" OSM_KEYS="aerialway,highway,public_transport,railway,route"
TARGET_SRID="3857"
############################ ############################
# Function definitions # # Function definitions #
...@@ -122,19 +123,21 @@ function fn_import_dataset_postgis() { ...@@ -122,19 +123,21 @@ function fn_import_dataset_postgis() {
if $AVAILABLE_ISOCHRONE_DATAMODEL && [ ! -f "$DATA_DIR/$SQL_EXPORT_FILE" ]; then if $AVAILABLE_ISOCHRONE_DATAMODEL && [ ! -f "$DATA_DIR/$SQL_EXPORT_FILE" ]; then
echo " - creating datamodel using isochrone-datamodel" echo " - creating datamodel using isochrone-datamodel"
# Create datamodel using isochrone-datamodel project # Create datamodel using isochrone-datamodel project
DB_USERNAME="$PG_DB_USER" DB_PASSWORD="$PG_DB_PASSWORD" "$DEPLOY_DIR/isochrone-datamodel/builder.sh" -d -s -b -l -t -c${CITY} >> "$WORKING_DIR/create_datamodel_$CITY.log" 2>&1 DB_USERNAME="$PG_DB_USER" DB_PASSWORD="$PG_DB_PASSWORD" "$DEPLOY_DIR/isochrone-datamodel/builder.sh" -d -s -b -l -t${TARGET_SRID} -c${CITY} >> "$WORKING_DIR/create_datamodel_$CITY.log" 2>&1
echo " - copying tables to isochrone database" echo " - copying tables to isochrone database"
PGPASSWORD="spatial" pg_dump -U spatial -h localhost -p 5432 -x -O -d spatial -t "transformed.${CITY}_*" | sed -e "s/transformed/public/g" | PGPASSWORD="$PG_DB_PASSWORD" psql -h localhost -U "$PG_DB_USER" -p 5432 -d isochrone >> "$WORKING_DIR/create_datamodel_$CITY.log" 2>&1 PGPASSWORD="spatial" pg_dump -U spatial -h localhost -p 5432 -x -O -d spatial -t "transformed.${CITY}_*" | sed -e "s/transformed/public/g" | PGPASSWORD="$PG_DB_PASSWORD" psql -h localhost -U "$PG_DB_USER" -p 5432 -d isochrone >> "$WORKING_DIR/create_datamodel_$CITY.log" 2>&1
# Exporting resulting database to $DATA_DIR
echo " - exporting database dump for ${CITY}"
PGPASSWORD="$PG_DB_PASSWORD" pg_dump -U "$PG_DB_USER" -h localhost -p 5432 -d isochrone --clean --compress=5 --if-exists -t "${CITY}_*" --file="$DATA_DIR/$SQL_EXPORT_FILE" >> "$WORKING_DIR/create_datamodel_$CITY.log" 2>&1
fi fi
if $AVAILABLE_POSTGIS && $AVAILABLE_ISOCHRONE_TOOLS; then if $AVAILABLE_POSTGIS && $AVAILABLE_ISOCHRONE_TOOLS; then
java -cp $DOWNLOAD_DIR/isochrone-tools.jar at.uibk.dbis.isochrone.generator.density.DensityGenerator -t "$CITY" -d 60,120,180,240,300 >> "$WORKING_DIR/create_datamodel_$CITY.log" 2>&1 java -cp $DOWNLOAD_DIR/isochrone-tools.jar at.uibk.dbis.isochrone.generator.density.DensityGenerator -t "$CITY" -d 60,120,180,240,300 >> "$WORKING_DIR/create_datamodel_$CITY.log" 2>&1
fi fi
if $AVAILABLE_ISOCHRONE_DATAMODEL; then
# Exporting resulting database to $DATA_DIR
echo " - exporting database dump for ${CITY}"
PGPASSWORD="$PG_DB_PASSWORD" pg_dump -U "$PG_DB_USER" -h localhost -p 5432 -d isochrone --clean --compress=5 --if-exists -t "${CITY}_*" --file="$DATA_DIR/$SQL_EXPORT_FILE" >> "$WORKING_DIR/create_datamodel_$CITY.log" 2>&1
fi
} }
function fn_init_geoserver() { function fn_init_geoserver() {
......
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