Skip to content

Instantly share code, notes, and snippets.

@petrasovaa
Last active May 19, 2016 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petrasovaa/9721178d15ad599d2be03d6803b923cc to your computer and use it in GitHub Desktop.
Save petrasovaa/9721178d15ad599d2be03d6803b923cc to your computer and use it in GitHub Desktop.
r.lake elevation=JR_topobathy@JR_2014 water_level=0 lake=sound_water_level_0 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=0.3048 lake=sound_water_level_1 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=0.6096 lake=sound_water_level_2 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=0.9144 lake=sound_water_level_3 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=1.2192 lake=sound_water_level_4 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=1.524 lake=sound_water_level_5 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=1.8288 lake=sound_water_level_6 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=1.8288 lake=sound_water_level_7 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=2.4384 lake=sound_water_level_8 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=2.7432 lake=sound_water_level_9 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=3.048 lake=sound_water_level_10 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=3.3528 lake=sound_water_level_11 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=3.6576 lake=sound_water_level_12 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=3.9624 lake=sound_water_level_13 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=4.2672 lake=sound_water_level_14 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=4.572 lake=sound_water_level_15 coordinates=912401.339286,250065.561224 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=0 lake=water_level_0 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=0.3048 lake=water_level_1 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=0.6096 lake=water_level_2 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=0.9144 lake=water_level_3 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=1.2192 lake=water_level_4 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=1.524 lake=water_level_5 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=1.8288 lake=water_level_6 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=1.8288 lake=water_level_7 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=2.4384 lake=water_level_8 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=2.7432 lake=water_level_9 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=3.048 lake=water_level_10 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=3.3528 lake=water_level_11 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=3.6576 lake=water_level_12 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=3.9624 lake=water_level_13 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=4.2672 lake=water_level_14 coordinates=914380.871671,250843.280872 --o
r.lake elevation=JR_topobathy@JR_2014 water_level=4.572 lake=water_level_15 coordinates=914380.871671,250843.280872 --o
for I in `seq 0 15`
do
r.mapcalc "JR_flooded_sound_${I} = JR_topobathy + sound_water_level_${I}" --o
r.mapcalc "JR_flooded_${I} = JR_topobathy + water_level_${I}" --o
done
r.colors rules='-' map=`g.list ty=raster sep=, patt="*water_level*"` -e << EOF
0% 0:240:255
100% 0:50:170
EOF
for I in `seq 0 15`
do
m.nviz.image -a elevation_map=JR_topobathy@JR_2014,JR_flooded_sound_${I}@JR_2014,JR_flooded_${I}@JR_2014 mode=fine resolution_fine=2 resolution_coarse=9 shading=gouraud style=surface wire_color=136:136:136 color_map=JR_ortho@JR_2014,sound_water_level_${I}@JR_2014,water_level_${I}@JR_2014 \
position=0.50,1.00 height=2043 perspective=8 twist=0 zexag=3.000000 focus=1181,795,-4 \
light_position=0.77,-0.76,0.80 light_brightness=60 light_ambient=20 light_color=255:255:255 \
output=JR_ortho_flood_${I} format=ppm size=1222,644 --o
done
mogrify -format png JR_ortho_flood*.ppm
pngnq JR_ortho_flood_*.png
convert -delay 1x2 `ls -v JR_ortho_flood_*nq8.png` JR_ortho_flood.gif
JR_ortho_flood_tmp.gif \( +clone -set delay 500 \) +swap +delete JR_ortho_flood.gif
rm JR_ortho_flood_tmp.gif
rm JR_ortho_flood_*.png
rm JR_ortho_flood_*.ppm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment