Commit 1610abe0 authored by Ludvik Brodl's avatar Ludvik Brodl
Browse files

Makes some changes to fit the log for sodermanlands project

parent f13c8d6d
......@@ -11,15 +11,16 @@ CELLSIZE=2
MIN_VEG_HEIGHT=4
SCAN_ANGLE_DROP=20
BUILDING_CONTOUR_SHAPE="$HOME/LAS/buildings/by_04.shp"
TMP_ROOT_DIR="/nobackup/smhid13/sm_ludbr/tmp"
VRT_TMPLT="${HOME}/LAS/dvlp/points_template.vrt"
rectangle_template="${HOME}/LAS/rectangle_template.geojson"
log="${HOME}/LAS/grid_tile.log"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BUILDING_CONTOUR_SHAPE="$DIR/../buildings/by_04.shp"
TMP_ROOT_DIR="/nobackup/smhid13/sm_ludbr/temp"
VRT_TMPLT="${DIR}/../dvlp/points_template.vrt"
rectangle_template="${DIR}/../rectangle_template.geojson"
log="${DIR}/../grid_tile.log"
DEM_POINTS_OUTSIDE_BUILDINGS_SQL="${HOME}/LAS/dvlp/dem_points_outside_buildings.sql"
UNCLASSIFIED_POINTS_OUTSIDE_BUILDINGS_SQL="${HOME}/LAS/dvlp/unclassified_points_outside_buildings.sql"
UNCLASSIFIED_POINTS_IN_BUILDINGS_SQL="${HOME}/LAS/dvlp/unclassified_points_in_buildings.sql"
DEM_POINTS_OUTSIDE_BUILDINGS_SQL="${DIR}/../dvlp/dem_points_outside_buildings.sql"
UNCLASSIFIED_POINTS_OUTSIDE_BUILDINGS_SQL="${DIR}/../dvlp/unclassified_points_outside_buildings.sql"
UNCLASSIFIED_POINTS_IN_BUILDINGS_SQL="${DIR}/../dvlp/unclassified_points_in_buildings.sql"
function abspath() {
......@@ -170,9 +171,9 @@ echo "drop z above: "$drop_z
# result files
filtered_veg_height="${outdir}/${filename}_canopy_height.tif"
dtm="${outdir}/${filename}_dtm.tif"
dem="${outdir}/${filename}_dem.tif"
filtered_veg_height="${outdir}/canopy_height.tif"
dtm="${outdir}/dtm.tif"
dem="${outdir}/dem.tif"
TMPDIR=${TMP_ROOT_DIR}/${filename}
# temporary files
......@@ -307,7 +308,8 @@ gdalwarp roofs.tif roofs_corr.tif
# interpolate raster from dem points
if [ ! -f dem.tif ]; then
grid_shape $DEM_POINTS_OUTSIDE_BUILDINGS_SHAPE dem.tif $x1 $y1 $x2 $y2 $ncells "invdistnn:radius=500:max_points=2"
grid_shape $DEM_POINTS_OUTSIDE_BUILDINGS_SHAPE dem.tif $x1 $y1 $x2 $y2 $ncells "invdistnn:radius=100:max_points=2"
gdal_fillnodata.py -md 2000 dem.tif
fi
# fix for bug in gdal_grid causing rasters with strange orientation, that cannot be handled by gdal_calc.py
......@@ -322,7 +324,6 @@ fi
gdal_fillnodata.py -md 100 $dtm
# sort unclassified points outside buildings into raster (nodata elsewhere)
# if multiple points in the same cell, the last one is used (maybe change to highest?)
if [ ! -f $veg_height ]; then
......
......@@ -51,12 +51,12 @@ echo $z
module load geos/3.4.2-i1501
module load gcc/6.2.0
. /home/sm_davse/virtualenvs/gdalenv/bin/activate
export PATH=/home/sm_davse/LAS/LAStools/bin:/home/sm_ludbr/LAS/dvlp:$PATH
export PATH=/home/sm_davse/LAS/LAStools/bin:/home/sm_ludbr/dev/sodermanland/LAS/dvlp:$PATH
set -x
while read line
do
echo $line
/home/sm_ludbr/LAS/dvlp/grid_tile.sh $las_root_folder$line $output_folder $z </dev/null &
grid_tile.sh $las_root_folder$line $output_folder $z </dev/null &
done < $las_names
wait
......
#!/bin/bash
sbatch batch.sh -o /home/sm_ludbr/temp/ -i flen.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
sbatch batch.sh -o /home/sm_ludbr/temp/ -i gnesta.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
sbatch batch.sh -o /home/sm_ludbr/temp/ -i katrineholm.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
sbatch batch.sh -o /home/sm_ludbr/temp/ -i nykoping.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
sbatch batch.sh -o /home/sm_ludbr/temp/ -i oxelosund.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
sbatch batch.sh -o /home/sm_ludbr/temp/ -i strangnas.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
sbatch batch.sh -o /home/sm_ludbr/temp/ -i trosa.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
sbatch batch.sh -o /home/sm_ludbr/temp/ -i vingaker.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
\ No newline at end of file
#sbatch batch.sh -o /home/sm_ludbr/temp/ -i flen.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
#sbatch batch.sh -o /home/sm_ludbr/temp/ -i gnesta.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
#sbatch batch.sh -o /home/sm_ludbr/temp/ -i katrineholm.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
#sbatch batch.sh -o /home/sm_ludbr/temp/ -i nykoping.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
#sbatch batch.sh -o /home/sm_ludbr/temp/ -i oxelosund.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
#sbatch batch.sh -o /home/sm_ludbr/temp/ -i strangnas.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
#sbatch batch.sh -o /home/sm_ludbr/temp/ -i trosa.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
#sbatch batch.sh -o /home/sm_ludbr/temp/ -i vingaker.txt -d /nobackup/smhid13/sm_ludbr/las_data/ -z 200
municipals='flen gnesta katrineholm nykoping oxelosund strangnas trosa vingaker'
for d in $municipals; do sbatch batch.sh -o /nobackup/smhid13/sm_ludbr/proj/sodermanland/dsm_original/ -i $d.txt -d /nobackup/smhid13/sm_ludbr/proj/sodermanland/las_data/ -z 50; done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment