User Tools

Site Tools


wikibas10:bas10mtaland

DETECTION AND MONITORING OF FLOODED AREAS

Use of high temporal resolution satellite data for flood analysis

Mariapia Faruolo, Vito Imbrenda

INTRODUCTION

General framework of research activity

Development and implementation of advanced satellite methodologies for flooded areas detection, monitoring and mapping in near real-time

Main goal of research activity

To have a robust and automatic index able to detect and monitor in near real time flooded areas

Main goals of this project

Compare land use map with flooded areas maps to validate flood indexes

METADATA

RASTER DATA

MODIS Remote Sensed Data
Driver: PCIDSK/PCIDSK Database File

Files: Fondi.pix

Size
is 800, 850

Coordinate System is:
GEOGCSBold Text[“Unknown datum based upon the Clarke 1866 ellipsoid”],

  1. DATUM[“Not specified (based on Clarke 1866 spheroid)”],
    - SPHEROID["Clarke 1866",6378206.4,294.9786982138982],                    
    - AUTHORITY["EPSG","7008"],                                        
    - PRIMEM["Greenwich",0],                                                     
    - UNIT["degree",0.0174532925199433]                                         

    Origin = (11.500000000000004,53.125000000000014)

    Pixel Size = (0.002500000000000,-0.002500000000000)


Corine Land Cover Map
Driver: GTiff/GeoTIFF
Files: lceugr25000.tif
Size is 26800, 23200
Coordinate System is: PROJCS[“ETRS
1989LAEA”, GEOGCS[“GCSETRS1989”, - DATUM[“EuropeanTerrestrialReferenceSystem1989”], - SPHEROID[“GRS1980”,6378137.0,298.257222101],

  1. PRIMEM[“Greenwich”,0.0],
  2. UNIT[“Degree”,0.0174532925199433],
  3. PROJECTION[“LambertAzimuthalEqual_Area”],
  4. UNIT[“Meter”,1.0]

Origin = (800000.000000000000000,6500000.000000000000000)
Pixel Size = (250.000000000000000,-250.000000000000000)

VECTOR DATA

Elbe river [http://rimmer.ngdc.noaa.gov/mgg/coast/getcoast.html]

METHOD

  1. modify MODIS data format (original format: pix, final format: tif)
  2. import MODIS data in GRASS
  3. calculate flood indexes with GRASS [Bibliographic Reference: Lacava, T., Filizzola, C., Pergola, N., Sannazzaro, F. and Tramutoli, V., Improving flood monitoring by the Robust AVHRR Technique (RAT) approach: the case of the April 2000 Hungary flood, /International Journal of Remote Sensing/, 31(8), 2043 - 2062]
  4. change projection of Corine land use map
  5. compare land use map with flooded areas maps to validate flood indexes


DATA IMPORT

Code Bash

# manually entering in grass
# grass -text ~/ost4sem/grassdb/Germany/PERMANENT
 
# change pix file in tif format to use Grass and Qgis.
cd ~/ost4sem/project/input
gdal_translate -b 7 Img_Germania.pix ch1_20ago.tif
gdal_translate -b 8 Img_Germania.pix ch2_20ago.tif
gdal_translate -b 3 Fondi.pix media_ch2-ch1.tif
gdal_translate -b 4 Fondi.pix sigma_ch2-ch1.tif
gdal_translate -b 5 Fondi.pix media_ch2/ch1.tif
gdal_translate -b 6 Fondi.pix sigma_ch2/ch1.tif
 
# tif files conversion in Grass format
r.in.gdal input=ch1_20ago.tif output=ch1_20agoGRASS location=Germany --overwrite 
r.in.gdal input=ch2_20ago.tif output=ch2_20agoGRASS location=Germany --overwrite
r.in.gdal input=media_ch2-ch1.tif output=media_ch2-ch1GRASS location=Germany --overwrite
r.in.gdal input=sigma_ch2-ch1.tif output=sigma_ch2-ch1GRASS location=Germany --overwrite
r.in.gdal input=media_ch2/ch1.tif output=media_ch2/ch1GRASS location=Germany --overwrite
r.in.gdal input=sigma_ch2/ch1.tif output=sigma_ch2/ch1GRASS location=Germany --overwrite

DATA PROCESSING

Code Bash

# flood indexes calculation
r.mapcalculator amap=ch2_20agoGRASS@PERMANENT bmap=ch1_20agoGRASS@PERMANENT formula=A-B outfile=diff.tif help=- --overwrite 
r.mapcalculator amap=diff.tif@PERMANENT bmap=media_ch2-ch1GRASS@PERMANENT cmap=sigma_ch2-ch1GRASS@PERMANENT formula="(A-B)/C" outfile=alice_diff help=- --overwrite 
 
r.mapcalculator amap=ch2_20agoGRASS@PERMANENT bmap=ch1_20agoGRASS@PERMANENT formula=A/B outfile=rapp.tif help=- --overwrite 
r.mapcalculator amap=rapp.tif@PERMANENT bmap=media_ch2/ch1GRASS@PERMANENT cmap=sigma_ch2/ch1GRASS@PERMANENT formula="(A-B)/C" outfile=alice_rapp help=- --overwrite 
 
# threshold application to display flooded pixels 
r.mapcalc "inondati_diff = if((alice_diff>-3 && alice_diff<-2),50,if(alice_diff<-3,100,0))"
r.mapcalc "inondati_rapp = if((alice_rapp>-3 && alice_rapp<-2),50,if(alice_rapp<-3,100,0))"
r.colors map=inondati_diff color=ryb
r.colors map=inondati_rapp color=ryb
 
# creation of a map to show flooded pixels identified by both indexes
r.mapcalc "inondati_tot = if((inondati_diff==50 && inondati_rapp==50),1,if(inondati_diff==100 && inondati_rapp==100,2,0))"
r.colors map=inondati_tot color=gyr
 
# creation of maps to show flooded pixels identified by both indexes for S/N level
r.mapcalc "inondati_inters2 = if(( alice_rapp > -3 && alice_rapp < -2  && alice_diff > -3 && alice_diff < -2),50,0)"
r.mapcalc "inondati_inters3 = if((alice_rapp < -3 && alice_diff < -3),100,0)"
r.colors map=inondati_inters2 color=ryg
r.colors map=inondati_inters3 color=sepia
 
# Download and import Corine in Grass (the original file is lceugr250_00.tif): change projection, creation of a new location with r.in.gdal, move the file from the location temporary to my reference location with r.proj
 
if [ -f /home/user/ost4sem/project/input/lceugr_250_00/lceugr250_00.tif ] ; then 
  echo the /home/user/ost4sem/project/input/lceugr_250_00/lceugr250_00.tif exist
else
  cd /home/user/ost4sem/project/input/lceugr_250_00/
  wget http://www.eea.europa.eu/data-and-maps/data/corine-land-cover-clc2000-250-m-version-12-2009/lceugr250_00.zip 
  cd -
fi
r.in.gdal -o -e input=/home/user/ost4sem/project/input/lceugr_250_00/lceugr250_00.tif output=corine  location=tmp
r.proj input=corine  location=tmp mapset=PERMANENT output=corine --overwrite
 
# association of flooded pixels by both indices (alice_diff and alice_rapp) to the Corine Land Cover class 
r.mapcalc "associa_diff = if(inondati_diff==50 || inondati_diff==100,corine,null())"
r.colors map=associa_diff color=byg
r.mapcalc "associa_rapp = if(inondati_rapp==50 || inondati_rapp==100,corine,null())"
r.colors map=associa_rapp color=byg
 
# text file creation to show for flooded pixels lat/lon coordinates
r.stats -acpnl input=associa_diff@PERMANENT output=conta_diff_tot
r.stats -acpnl input=associa_rapp@PERMANENT output=conta_rapp_tot
r.stats -gln input=associa_diff@PERMANENT output=conta_diff_pixel
r.stats -gln input=associa_rapp@PERMANENT output=conta_rapp_pixel
 
# text file creation to attribute land cover classes to flooded pixels
sort -k 3,3 conta_diff_pixel > conta_diff_pixel.txt
sort -k 3,3 conta_rapp_pixel > conta_rapp_pixel.txt
awk -F "," '{if (NR>1) print $1 , $2 , $5  }'   corine_legend.csv  > corine_lev3.txt
sort -k 1,1 corine_lev3.txt > corine_lev3_sort.txt
join -1 3 -2 1 conta_diff_pixel.txt  corine_lev3_sort.txt  > confronto_diff.txt
join -1 3 -2 1 conta_rapp_pixel.txt  corine_lev3_sort.txt  > confronto_rapp.txt
 
# text file creation to attribute flood indexes values to flooded pixels 
r.stats -1nlg input=alice_diff@PERMANENT output=alice_diff.txt
awk  '{if ($3<-2) print $1 "cor" $2 , $3 }'   alice_diff.txt  | sort -k 1,1  > alice_diff2.txt
awk  '{  print $1 , $2"cor" $3 , $4, $5 , $6 ,$7,$8,$9,$10,$11  }'   confronto_diff.txt | sort -k 2,2   > confronto_diff2.txt
join -1 1 -2 2 alice_diff2.txt confronto_diff2.txt  | awk  'BEGIN { print "Long Lat Alice_Diff Id_Cor CLC_Code Class " } { gsub("cor"," ") ; if( $41!=40 || $4!=41) print }' > finale_diff.txt
 
r.stats -1nlg input=alice_rapp@PERMANENT output=alice_rapp.txt
awk  '{if ($3<-2) print $1 "cor" $2 , $3 }'   alice_rapp.txt  | sort -k 1,1  > alice_rapp2.txt
awk  '{  print $1 , $2"cor" $3 , $4, $5 , $6 ,$7,$8,$9,$10,$11  }'   confronto_rapp.txt | sort -k 2,2   > confronto_rapp2.txt
join -1 1 -2 2 alice_rapp2.txt confronto_rapp2.txt  | awk  'BEGIN { print "Long Lat Alice_Diff Id_Cor CLC_Code Class " } { gsub("cor"," ") ; if( $4!=40 && $4!=41 ) print }' > finale_rapp.txt
 
# export elbe rivers text file as vector
dos2unix fiumiGermania.txt
grep -v Line fiumiGermania.txt  |   awk ' {  print $1"|"$2}'  > fiumiGermania4grass.txt
v.edit tool=create map=elba input=fiumiGermania4grass.txt

RESULTS
- 3 flooded areas maps:

  1. for the difference based index (for 2 different levels of S/N)
  2. for the ratio based index (for 2 different levels of S/N)
  3. for the intersection between two flood indexes

- 1 map on relation between flooded pixels and corine type
- 1 text file for flooded pixels characterization (lat/lon, corine type description, alice indexes value)

wikibas10/bas10mtaland.txt · Last modified: 2021/01/20 20:36 (external edit)