Python Forum
National Flood Hazard Layer (NFHL) files extraction - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: National Flood Hazard Layer (NFHL) files extraction (/thread-3459.html)



National Flood Hazard Layer (NFHL) files extraction - sirgeo - May-25-2017

Noob looking for some guidance with the following task.

Use Python to extract flood hazard info from National Flood Hazard Layer (NFHL) site using any given lat/long point.

Specifically:
1% Annual Chance Flood Hazard
Regulatory Floodway
Special Floodway
Area of Undetermined Flood Hazard
0.2% Annual Chance Flood Hazard
Future Conditions 1% Annual Chance Flood Hazard
Area with Reduced Risk Due to Levee
[Image: aedrsQB]

my code here



RE: National Flood Hazard Layer (NFHL) files extraction - ichabod801 - May-25-2017

This looks like homework. What have you tried? How exactly is it not working?


RE: National Flood Hazard Layer (NFHL) files extraction - sirgeo - May-26-2017

rough draft here:

The script will load a NFHL file for a county:

   nfhl_layers = fiona.open(county_nfhl_file_path)
   nfhl_layer_1 = shape(nfhl_layers['geometry']

   lat = 26.317777, 
   long= -80.100142

## This function returns true if that point is in the layer and false if it is not.

   def is_lat_long_in_nfhl_layer(lat, long, nfhl_layer):
   pass

   print is_lat_long_in_nfhl_layer(lat,long, nfhl_layer_1)

   def get_nfhl_predicates(lat,long):
......
   return {"1%_annual_chance" : percent_chance_1, "0.2%_annual_chance": percent_chance_0_point_2, .....}
It needs to use Shapely, Fiona or any other Python GIS package where it can be installed using pip or conda.