Introduction of flood evacuation   route search using QGIS,PostGIS, GRASS and pgRouting                    Yoichi Kayama
Self-introduction• A member of OSGeo.JP• A member of GISA Japan(also a member of  FOSS4G SIG)• Coordinator of QGIS Japanes...
Flood area simulation map• In Japan, since 2001 , MLIT( The Ministry of  Land, Infrastructure, Transport and Tourism )  an...
Flood area simulation map http://www.ktr.mlit.go.jp/tonejo/saigai/sinsuisoutei/tonegawa_zentai.pdf
Hazard map (made by local government )http://www.town.itakura.gunma.jp/kurashi/kinkyuu/hazard.html
Water depth calculated unit                making flood area simulation maps                                              ...
50m grid overlay
2m grid overlay
50m grid overlay
Compare 2m grid and 50m grid            2m                 50m
using 2m grid ,we could find that such  a road on bank is submerged or not                 2m                 50m
Using fine grid is better
How can we getsuch a fine grid elevation          data ?
We can get fine grid elevation data using             LiDAR system                                  ALMAPS                ...
ALMAPS(Asahi Laser MAPping System/Aerial Lidar Mapping)
Using 2m grid elevation data fromLIDAR ,we could make fine flood areasimulation maps                           2m         ...
We could get fine flood area map    using LIDAR mapping
There are many flood area simulationdata by 10 minute every assumed place       where bank overtopping             40minut...
We can see assumed flood area       vary with time
10 minutes later after overflow
20 minutes later after overflow
50 minutes later after overflow
120 minutes later after overflow
180 minutes later overflow
Using such fine flood area data• If we have network data of roads, I thought  perhaps I could make a program of searching ...
How can I make such system?
When we would make a system       about searching route,• I think, using pgRouting is a best solution .
pgRouting is a excellent program for   searching shortest path route
We can add any conditions to the pgRouting search functions as SQL• Those conditions must be described as SQL of  PostGIS/...
But !!• Using stable version of PostGIS, we can use  only vector type geometries.• We have no functions in PostGIS about r...
Raster Data    How can I use it with pgRouting?• If I can change raster of flood area to vector,  such as polygon, I could...
GRASS• GRASS has many functions about raster and  vector spatial data.
Data conversion process                                                  START                               Import raster...
Import raster of flood area to       GRASS mapsetr.in.gdal
Select the pixels from raster these are submerged =(                     depth >= 0.3m).Create a new raster using selected...
Convert the raster to the vector r.to.vect --overwrite --verbose input=D_SINSUI_NEW output=D_SINSUI_POLYGON feature=area
Details of created polygon
Export the vector of flood area to            shape file    v.out.ogr -c -e -p --verbose input=D_SINSUI_POLYGON    type=li...
Load shapfiles toPostGIS/Postgresql database
Now we can search using such SQLSELECT vertex_id , edge_id , cost FROM        shortest_path_astar(                     -- ...
Using pgRouting•   We can search route with network data•   But there are query results strings.•   There are no maps of r...
There are may ways of make a map           for pgRouting• Web Mapping such as OpenLayers are cool  method.• There are some...
I used QuantumGIS for this system• Stand alone use(without internet) is required• There are Japanese GUI( we transrated )•...
A system using pgRouting                                         PostgreSQL             QGIS             Python           ...
Route to a shelter                  target point                                               routeSubmerged area overflo...
There are no route to any shelter                                    Submerged area     overflow point                    ...
10 minutes later after overflow       target point                                                      route             ...
30 minutes later after overflow                                                     route      target point               ...
Driving distance calculation                Start pointWithin 30 minute , reachable route by walking                      ...
Demo ?
Using FOSS4G products• Without FOSS4G we would have been difficult  to obtain tools for such spatial data usage.• pgRoutin...
• This system made for The Ministry of Land,  Infrastructure, Transport and Tourism Japan,  Kanto Regional Development Bur...
Thanks for your attention
Introduction of flood evacuation route search system using QGIS,PostGIS,GRASS and pgRouting
Upcoming SlideShare
Loading in …5
×

Introduction of flood evacuation route search system using QGIS,PostGIS,GRASS and pgRouting

3,181 views

Published on

presentation FOSS4G2010 Barcelona

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,181
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
105
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Introduction of flood evacuation route search system using QGIS,PostGIS,GRASS and pgRouting

  1. 1. Introduction of flood evacuation route search using QGIS,PostGIS, GRASS and pgRouting Yoichi Kayama
  2. 2. Self-introduction• A member of OSGeo.JP• A member of GISA Japan(also a member of FOSS4G SIG)• Coordinator of QGIS Japanese GUI translators• Working as GIS programmer and researcher at Aero Asahi Corporation
  3. 3. Flood area simulation map• In Japan, since 2001 , MLIT( The Ministry of Land, Infrastructure, Transport and Tourism ) and prefectural governments made maps of flood area simulation about major rivers.
  4. 4. Flood area simulation map http://www.ktr.mlit.go.jp/tonejo/saigai/sinsuisoutei/tonegawa_zentai.pdf
  5. 5. Hazard map (made by local government )http://www.town.itakura.gunma.jp/kurashi/kinkyuu/hazard.html
  6. 6. Water depth calculated unit making flood area simulation maps Hight of water surface were Calculated by 250m grid unit Water depths were calculated by 50m grid unit of ground elevationhttp://www.mlit.go.jp/river/shishin_guideline/bousai/press/200507_12/050705/050705_manual.pdf
  7. 7. 50m grid overlay
  8. 8. 2m grid overlay
  9. 9. 50m grid overlay
  10. 10. Compare 2m grid and 50m grid 2m 50m
  11. 11. using 2m grid ,we could find that such a road on bank is submerged or not 2m 50m
  12. 12. Using fine grid is better
  13. 13. How can we getsuch a fine grid elevation data ?
  14. 14. We can get fine grid elevation data using LiDAR system ALMAPS GPS on aircraft 航空機の空間位置情報 X1,Y1、Z1 IMU Laser Scanner 航空機の姿勢および レーザー照射角 加速度情報 Ground GPS および往復時間 ω,φ、κ、a 航空機の空間位置 θ,t の補正情報 X2,Y2、Z2LiDAR System AERO ASAHI CORPORATION
  15. 15. ALMAPS(Asahi Laser MAPping System/Aerial Lidar Mapping)
  16. 16. Using 2m grid elevation data fromLIDAR ,we could make fine flood areasimulation maps 2m 2m 2m Hight of water surface were Calculated by 250m unit 2m Water depths were calculated by 2m unit of ground elevation
  17. 17. We could get fine flood area map using LIDAR mapping
  18. 18. There are many flood area simulationdata by 10 minute every assumed place where bank overtopping 40minute 30minute 50minute 20minute 10minute 60minute
  19. 19. We can see assumed flood area vary with time
  20. 20. 10 minutes later after overflow
  21. 21. 20 minutes later after overflow
  22. 22. 50 minutes later after overflow
  23. 23. 120 minutes later after overflow
  24. 24. 180 minutes later overflow
  25. 25. Using such fine flood area data• If we have network data of roads, I thought perhaps I could make a program of searching route system, without roads of submerged.
  26. 26. How can I make such system?
  27. 27. When we would make a system about searching route,• I think, using pgRouting is a best solution .
  28. 28. pgRouting is a excellent program for searching shortest path route
  29. 29. We can add any conditions to the pgRouting search functions as SQL• Those conditions must be described as SQL of PostGIS/PostgreSQL.• We can use many spatial relation function at PostGIS.• So we can add spatial conditions to the search function of pgRouting by using functions of PostGIS.
  30. 30. But !!• Using stable version of PostGIS, we can use only vector type geometries.• We have no functions in PostGIS about raster data now.• LIDAR data and flood area data are raster.• So we could not use raster flood area data for spatial functions in PostGIS.
  31. 31. Raster Data How can I use it with pgRouting?• If I can change raster of flood area to vector, such as polygon, I could use the polygon data for pgRouting function.• Are there any program ,have such function ?
  32. 32. GRASS• GRASS has many functions about raster and vector spatial data.
  33. 33. Data conversion process START Import raster of flood area to GRASS mapset r.in.gdal  Select the pixels from raster these are submerged =( depth >= 0.3m). Create a new raster using selected pixels with value 1 and other pixels with null. r.mapcalc "D_SINSUI_NEW = if (D_SINSUI_ORG >= 0.3,1,null())" (D_SINSUI_NEW is new raster name D_SINSUI_ORG is original raster name) Convert the raster to the vector r.to.vect --overwrite --verbose input=D_SINSUI_NEW output=D_SINSUI_POLYGON feature=area Export the vector of flood area to the shape v.out.ogr -c -e -p --verbose input=D_SINSUI_POLYGON type=line,boundary,area dsn=D_SINSUI_shp Make a SQL to load the shape file of flood area to the PostGIS/PostgreSQL database shp2pgsql -s 2451 D_SINSUI  public.D_SINSUI_TBL > DSinsui.sql Execute the SQL to load the flood area polygons to the PostGIS/PostgreSQL database psql -d dbname -U Username -f DSinsui.sql END
  34. 34. Import raster of flood area to GRASS mapsetr.in.gdal
  35. 35. Select the pixels from raster these are submerged =( depth >= 0.3m).Create a new raster using selected pixels with value 1 and other pixels with null. r.mapcalc "D_SINSUI_NEW = if (D_SINSUI_ORG >= 0.3,1,null())"
  36. 36. Convert the raster to the vector r.to.vect --overwrite --verbose input=D_SINSUI_NEW output=D_SINSUI_POLYGON feature=area
  37. 37. Details of created polygon
  38. 38. Export the vector of flood area to shape file v.out.ogr -c -e -p --verbose input=D_SINSUI_POLYGON type=line,boundary,area dsn=D_SINSUI_shp
  39. 39. Load shapfiles toPostGIS/Postgresql database
  40. 40. Now we can search using such SQLSELECT vertex_id , edge_id , cost FROM shortest_path_astar( -- shortest path A starSELECT a.gid as id, source, target, cost as cost, x1, y1, x2, y2 FROM ways as a where a.gid not in( select b.gid from ways as b, suishin_polygon_all as c where c.minute = 30 -- after 30 minute from bank break and ST_Intersects(b.the_geom,c.the_geom))‘ -- is geometries intersect? a function of PostGIS ,4799, 3962, false, false) /* source id, target id, directed, has reverse cost */
  41. 41. Using pgRouting• We can search route with network data• But there are query results strings.• There are no maps of route using only pgRouting.• How we can see the maps of routes ?
  42. 42. There are may ways of make a map for pgRouting• Web Mapping such as OpenLayers are cool method.• There are some good desktop GIS tools such as QGIS, uDig, gvSIG, Open JUMP etc……• Perhaps we can see a map ,that contain result of using pgRouting, with such good FOSS4G products.
  43. 43. I used QuantumGIS for this system• Stand alone use(without internet) is required• There are Japanese GUI( we transrated )• We can add functions as external plug-in program to QuantumGIS.
  44. 44. A system using pgRouting PostgreSQL QGIS Python Plug-inQuantumGIS Shelter s Points PostGIS Flooded area PgRouting Road network DEM
  45. 45. Route to a shelter target point routeSubmerged area overflow point Start point
  46. 46. There are no route to any shelter Submerged area overflow point Start point
  47. 47. 10 minutes later after overflow target point route Submerged area overflow point Start point
  48. 48. 30 minutes later after overflow route target point Submerged area overflow point Start point
  49. 49. Driving distance calculation Start pointWithin 30 minute , reachable route by walking without submerged road
  50. 50. Demo ?
  51. 51. Using FOSS4G products• Without FOSS4G we would have been difficult to obtain tools for such spatial data usage.• pgRouting, PostGIS/PostgreSQL, GRASS, QGIS have excellent functions for our works.• I think when we want to use some functions about spatial data, make combination of some FOSS4G product is best solution.
  52. 52. • This system made for The Ministry of Land, Infrastructure, Transport and Tourism Japan, Kanto Regional Development Bureau.
  53. 53. Thanks for your attention

×