Python Forum

Full Version: National Flood Hazard Layer (NFHL) files extraction
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
This looks like homework. What have you tried? How exactly is it not working?
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.