Skip to content

Commit

Permalink
code and examples corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
amarjeetkapoor1 committed Nov 29, 2016
1 parent a16ae68 commit 4bb57db
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 9 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ also divide the full map into small maps to increase the speed of execution or
for many other purposes by providing more than one north, east, south, west
values for each smaller map. (You can refer example/DM1.txt)
* bash contour.sh \<DATA set for generating map> \<File defining region for each map>
* e.g. `bash contour.sh example/grassData.txt example/DM1.txt`
* e.g. `bash contour.sh example/GrassData.txt example/DM1.txt`

2. This script will generate RL points on given polyline (in form of CSV file in format *X,Y* you can refer to example/road.csv)
* bash road.sh \<Input file of points to generate profile > \<output file name>
Expand Down
Empty file modified TheRoad.py
100644 → 100755
Empty file.
8 changes: 3 additions & 5 deletions contour.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ v.build map=fieldData


#Count numbers of regions to be created
no_lines=$(cat $f2| wc -l)
no_lines=$(cat $2| wc -l)

echo $no_lines

Expand All @@ -28,14 +28,14 @@ echo $no_lines
do

#getting data from input file describing the region.
data=$(awk "NR>=$i&&NR<=$i" $file)
data=$(awk "NR>=$i&&NR<=$i" $2)
var1=$(echo $data | cut -d',' -f1)
var2=$(echo $data | cut -d',' -f2)
var3=$(echo $data | cut -d',' -f3)
var4=$(echo $data | cut -d',' -f4)

echo "next points"
echo "North: " $var1 " South: " $var2 " East: " $var2 " West: " $var2
echo "North: " $var1 " South: " $var2 " East: " $var3 " West: " $var4

#name of new raster MAP
elev_val="DTM$i"
Expand All @@ -50,5 +50,3 @@ echo $no_lines
# Create raster map
r.contour --overwrite input=$elev_val output=$contour_val step=.5 cut=0
done


6 changes: 3 additions & 3 deletions example/DM1.txt
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
3423000,3424500,595250,596250
3421750,3422250,595000,596000
3420500,3422000,594250,595250
3423000,3421500,595250,594250
3421750,3420250,595000,594000
3420500,3419000,594250,593250

Empty file modified example/GrassData.txt
100644 → 100755
Empty file.
Empty file modified example/road.csv
100644 → 100755
Empty file.
Empty file modified plot.sage
100644 → 100755
Empty file.
Empty file modified road.sh
100644 → 100755
Empty file.

0 comments on commit 4bb57db

Please sign in to comment.