Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F113255416
merge_dom.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, May 16, 15:41
Size
607 B
Mime Type
text/x-shellscript
Expires
Sun, May 18, 15:41 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26195969
Attached To
R8800 solar_potential
merge_dom.sh
View Options
#!/bin/bash
## -------------------
## $1: directoy file (command line argument to new location)
## $2: new layer name
# read the DOM cells in from a given file
while read DOM_CELL; do
echo $DOM_CELL
base=`basename "$DOM_CELL"`
name="${base%.*}"
r.in.gdal -o input=$DOM_CELL output=TMP_$name
done < $1
# get a list of all DOM cells and set the region spanning all
MAPS=`g.list type=raster sep=',' pattern=TMP_*`
g.region -s raster=$MAPS save=DOM_2m -p
# patch all cells together to one
r.patch input=$MAPS output=$2
# remove the individual parts
g.remove -f type=raster pattern=TMP_*
Event Timeline
Log In to Comment