Civil3D : FEMA Floodplain and EPA Watershed Dynamo Scripts
Download the Script
Download the Civil3D Dynamo scripts from my GitHub repository.
https://github.com/andycarter-pe/Civil3D_WebService_Dynamo/archive/main.zip
Web Services for Drainage
There are several federal web services that are currently providing geospatial data that is essential for your design projects. As a civil engineer that specializes in hydrologic and hydraulic design, I need to know the watershed delineation for the site as well as the limits of the FEMA regulated floodplains.
For watershed delineations, the EPA WATER's service (Watershed Assessment, Tracking & Environmental Results System) provides for the request and delivery of pre-calculated watersheds and stream centerlines for the continental United States.
When you need FEMA floodplain limits on and adjacent to your subject site, most folks these days use FEMA's National Flood Hazard Layer (NFHL). Typically, this is ingested through an image overlay map service that is used in either Google Earth, ArcGIS Pro or QGIS.
Dynamo: Getting AutoCAD Linework
I have created a couple of Dynamo scripts that makes a web request to these federal servers to get the needed AutoCAD linework for your drawing. Here is a rough breakdown of what is going on:
- User sets up a Civil3D drawing in the desired Coordinate Reference System (CRS)
- User draws and selects ACAD item for spatial input
- Dynamo converts items coordinates to Latitude/Longitude
- Dynamo builds a URL to request the data from the REST endpoint as JSON
- Example https://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer/27/query?&geometry=-97.786,30.352,-97.782,30.356&f=pjson
- Example https://ofmpub.epa.gov/waters10/NavigationDelineation.Service?pNavigationType=UT&pStartComid=5781811&pOutputFlag=BOTH&pAggregationFlag=TRUE
- JSON data is parsed with Dynamo to get linework
- Lat/Long coordinates converted to local CRS
- Linework drawn inside AutoCAD / Civil3D
Stop (Collaborate and Listen)!
Prior to even thinking about using this script, you will need to install the Civil3DToolkit package for Dynamo. This package is provided by Autodesk and provides functionality necessary for my scripts to work.
Download the Script
Download the Civil3D Dynamo scripts from my GitHub repository.
https://github.com/andycarter-pe/Civil3D_WebService_Dynamo/archive/main.zip
Some Warnings
The scripts are "as is" and are provided without warranty of any kind. You can modify any script but, if you do, know that you are required to provide me proper credit.
Please comment below if you have questions or issues. While I can't provide support, I would like to know what issues y'all are seeing.
8 comments:
Very Nice Andy. Thanks.
This is Awesome! Thanks for sharing! Much quicker to get the linework than our previous methods.
Definitely Cool....If you're into C3D, Dynamo and Open Channels like me, that is....
Just discovered this very cool tool, thank you very much for your time and effort into this and your willingness to share.
I downloaded your Dynamo scripts and the Civil3DToolkit then restarted Civil 3D but each one returns "Run completed with errors" when ran. Any suggestions are greatly appreciated.
Thank you
I was able to use this last week(8-12-24) but FEMA changed the url and now I can't figure out how to update it... would be great if someone could update this!!
Yup... the FEMA REST endpoint changed. The new endpoint is an ESRI service located at https://hazards.fema.gov/arcgis/... as I have paying clients/research this free work will not likely happen quick. Sorry.
I second the "wish someone could update this". Thanks Andy for acknowledging the FEMA url change. I tried changing the "gis" to "arcgis" per your comment, but it didn't seem to help. Hoping the change is easy and we can get a working version again. It sure is helpful.
I managed to figure it out. Edit the URLs in the "Web Request" groups to:
https://hazards.fema.gov/arcgis/rest/services/public/NFHL/MapServer/27/query?geometry=
Change the number to match the node it is in (i.e., 27 to 16 for the BFE's)
Post a Comment