Pages

Wednesday, October 19, 2016

Creating Static Results Maps (Shapefiles or Rasters) using RAS Mapper

Written by Mikell Warms  |  WEST Consultants
Copyright © The RAS Solution.  2016.  All rights reserved.
Many readers have been asking how to create shapefiles and other static maps in RAS Mapper. One of the main differences between RAS Mapper in RAS 4.1 and RAS 5.0 is the existence of Dynamic Maps. What makes these maps dynamic is that when you have that Results Layer selected in RAS Mapper, you can use the slider bar (top right) to animate through the simulation and see the results of that layer at each mapping output interval (or each profile for steady flow models). These maps are not saved to the disk, they are temporarily stored in memory.



With this change, you can no longer “Export Layer to Shapefile” as you could previously, due to the fact that these dynamic layers are not one map, they are many maps.

To create static maps, such as shapefiles or rasters, we must first tell RAS Mapper what type of static map we want (Inundation Boundary, Velocity, Shear Stress, etc.) and whether we want the data from a specific timestep, or max/min. To do this, right click on the bold “Results” heading in the Layer Manager in RAS Mapper, then choose “Manage Results Maps”.  All of your plans and default layers will load (like below):


Choose the plan you are interested in, and click on “Add New Map.”

If you’re running a Steady model, the window that pops up will look like this: 

If you’re running an Unsteady model, the window that pops up will look like this: 

Choose the Map Type you are interested in creating; in this case we are creating a maximum Inundation Boundary. Notice we have chosen “Maximum” under the Unsteady Profile options, but we could have chosen “Minimum” or a specific point in time. On the right hand side of the window, make sure to change the Map Output Mode to one of the “Stored (saved to disk)” options, depending on your needs. In this case, we are creating a shapefile polygon. Then click Add Map.

One last step. The Manage Results Maps layer should now look like below:


Notice the static map we have added has appeared. However, the Inundation Boundary map status says “Map Not Created”. You will need to select that map, and click on “Compute/Update Stored Maps” at the top right. If you have multiple static maps, you can select them all by holding the CTRL key and selecting multiple maps prior to computing them.

Once the computations have completed, the status will change to “Map files up to date” and RAS will save your shapefile in your HEC-RAS project folder, in a subfolder that has the same name as the plan from which the shapefiles were created.


69 comments:

  1. Has anyone had any luck getting saved maps using the"Hybrid" water surface rendering that is new with Version 5.0.3? No matter what I set the Render Mode Option to, my saved maps (rasters, shapefiles) come out as the old "Sloping (Interpolated Values)" rendering mode.

    ReplyDelete
    Replies
    1. I haven't tried yet. But that sounds like it could be a bug. Would you mind sending a bug report to HEC on that one?

      Delete
    2. I submitted a report to HEC.RAS@usace.army.mil and got a response last week:

      "Thank you for reporting this problem. I have been able to reproduce the issue here with a separate dataset and have submitted the bug to our development team. The bug should be corrected in the next HEC-RAS release."

      Delete
    3. Thanks for doing that Derek.
      -Chris

      Delete
    4. The bug still exists with the newest version 5.0.7 :(

      Delete
  2. Hi Chris, I am currently experimenting with purely the 2D modeling function of HEC-RAS. I have several areas that show flow splits in different directions. Is there a way to quantify how much Q goes in which direction? Any advice will be appreciated!

    ReplyDelete
    Replies
    1. Hi Chris. Yes, in Version 5.0.3 you can draw profile lines in RAS Mapper and use them as transects to extract flow data. It's really easy. Profile lines can be drawn using the Profile lines tab in the lower left hand corner of the RAS Mapper window.

      Delete
  3. Hi Chris, I am trying to create a hydraulic connection between 2 2D flow areas using a weir and culvert combination in RAS 2D. But everytime I attempt to run a simulation, I get the following error message. Do you have any advice?
    Plan: 'Unsteady Run with 2D Flow Interior Area' (GI_FINAL_2D.p07)
    Simulation started at: 26Jan2015 01:55:39 PM
    Using 64 Bit Computation Engines

    Writing Geometry
    Completed writing geometry

    Geometric Preprocessor HEC-RAS 5.0.0 Beta October 2014
    2 Internal Boundary curve(s) have been read in

    Finished Processing Geometry

    Writing event conditions
    Event conditions complete

    Performing Unsteady Flow Simulation HEC-RAS 5.0.0 Beta October 2014

    forrtl: severe (157): Program Exception - access violation
    Image PC Routine Line Source
    RasUnsteady64.exe 00000001401F62E2 Unknown Unknown Unknown
    RasUnsteady64.exe 00000001401D649F Unknown Unknown Unknown
    RasUnsteady64.exe 00000001401B9207 Unknown Unknown Unknown
    RasUnsteady64.exe 00000001401B2F2D Unknown Unknown Unknown
    RasUnsteady64.exe 00000001401B2C4A Unknown Unknown Unknown
    RasUnsteady64.exe 000000013FF880BB Unknown Unknown Unknown
    RasUnsteady64.exe 000000013FEF2ECA Unknown Unknown Unknown
    RasUnsteady64.exe 000000013FFC557C Unknown Unknown Unknown
    RasUnsteady64.exe 000000013FF102DC Unknown Unknown Unknown
    RasUnsteady64.exe 0000000140078B48 Unknown Unknown Unknown
    RasUnsteady64.exe 000000013FF6CDC6 Unknown Unknown Unknown
    RasUnsteady64.exe 000000013FEBEF5E Unknown Unknown Unknown
    RasUnsteady64.exe 000000013FEE41CE Unknown Unknown Unknown
    RasUnsteady64.exe 0000000140794AC6 Unknown Unknown Unknown
    RasUnsteady64.exe 0000000140344D82 Unknown Unknown Unknown
    kernel32.dll 0000000076B959ED Unknown Unknown Unknown
    ntdll.dll 0000000076DCC541 Unknown Unknown Unknown
    forrtl: severe (157): Program Exception - access violation

    Error with program: RasUnsteady64.exe Exit Code = 157

    ReplyDelete
    Replies
    1. Try saving, closing, and reopening RAS, then run again. If that doesn't fix it, then I'd have to see your data set to have a chance to figure it out.

      Delete
    2. Dear Chris I am having the same bug. Did you find the solution for this bug ?

      Delete
  4. I have a question concerning inundation mapping. In the first picture you showed above it seems to me that the inundation mapping is not limited to where I have cross sections. However, in my model, inundation mapping is limited to where I have cross sections and it looks like ras mapper would connect the outward points of every cross section and then, only calculate the difference between the Terrain and the WSE within this "polygon". But i would like the ras mapper to inundate everything around the river which is below WSE, even if there this place is "outside of the cross section range". Thank you for your advice.

    ReplyDelete
    Replies
    1. RAS only gets results where you have cross sections or 2D areas. Outside of these areas it can't map, because it doesn't have any data to map. You could try to manually expand your floodplain by following contours in ArcGIS if you really want to do this. Or you could extend your cross sections to cover the full area that gets wet. This is what you should do anyway.

      Delete
  5. Hi Chris,

    When I'm running an unsteady 2D flow model, is there a way to have HEC-RAS produce the shear stress map in RAS Mapper in it's initial run along with depth, velocity, and WSE? It's just when I add the shear stress map layer after I've run the model, it takes almost as long to produce the shear stress map as it does to run the initial model (which for larger projects with smaller time steps can be over an hour). I was hoping there was a way to define the maps that HEC-RAS automatically produces with each run. Thanks for your help!

    Regards,
    Jeremy

    ReplyDelete
    Replies
    1. I'm not sure if there is a way to do that. Strange that it takes so long to produce the map. I've never had a map take longer than a couple of seconds to compute.

      Delete
    2. Hi Chris,

      I've been having the same issue as Jeremy. RAS takes a long time to generate shear stress for one plan (>= 1 hr), and also crashes for some plans while generating shear. Could it be the size of my 2D Area (~350000 cells of 10 ft spacing)?

      Thanks,
      Jai

      Delete
    3. Oh yeah. That is a lot of cells.

      Delete
  6. Hi Chris,

    I've had some troubles in creating static results maps. Sometimes, when I'm trying to creating a map the program break down and I recieve this message: "System.OutOfMemoryException".

    Do you know what can be happening?

    Thank you!!

    ReplyDelete
    Replies
    1. Sounds to me that you are running out of memory to make that map. I would make sure you have enough space on your hard drive and that the map is not too large (in MB). You might try a larger mesh size and see if that helps.

      Delete
  7. Has any one had luck creating and storing maps for multiple runs (rather than creating one at a time as discussed). If not possible in HEC-RAS Mappers GUI, any luck in HEC-RAS Controller?

    Thanks!

    ReplyDelete
    Replies
    1. Ben, see if this is what you are after: http://hecrasmodel.blogspot.com/2016/03/post-processing-with-ras-mapper.html

      Chris

      Delete
  8. i am facing issues in generating mesh i don't know why ? as i am trying to model a part of indus river pakistan and exactly following the method which most of tutorials do but the problem comes when i try to generate the mesh in 2d flow area after identifying the polygon as well. when i got to the 2d flow area and click generate computation points on regular interval tab a window open and i put there x and y values and click generate than nothing happen and on the earlier window same line is mention that current mesh contains no computation points. can any body please giude me how to resolve this issue ??

    ReplyDelete
    Replies
    1. I had this problem when trying to use a mesh and cellsize that resulted in over 3,000,000 cells. Instead of showing me the cell count - the mesh builder would show nothing. In reducing cells to 1,000,000 i was able to get the mesh builder to work. 1,000,000 seems to me to be an upper limit. Others have reported higher cell counts, but on my machine I can't achieve that - despite system resources having plenty of RAM/CPU on hand.

      Delete
  9. Hi Chris,

    I'm having issues with extremely high shear stress values in my 2-D model. And by high, I mean 1,400 lbs/sq high! The study reach is about 4,000 LF, the valley slope ranges from 0.5-2 percent, I have a mesh cell size of 4'x4', and am using a time step of 2 seconds for 24 hour storm events. A majority of the mesh cells give realistic shear values (0.69 lb/sq) that are anticipated based on the desgin, but then I'll have a random mesh cell with a shear stress in the thousands. The surface was built from field run topo and I've checked it for errors, and it appears to be fine. I was wondering if you've ever had this problem before, and if any of my input parameters should be adjusted to give me realistic results. And I've had this problem on several projects, so I was hoping to figure it out seeing my clients don't like seeing bright red spots on my shear stress map!

    I appreciate your time, knowledge, and help!

    Thanks,
    Jeremy

    ReplyDelete
    Replies
    1. Jeremy- I seem to recall seeing that before but can't remember the issue. You're using 5.0.3, right? Can you send me your dataset and I'll see your if I can figure it out?

      Delete
  10. Chris,

    I finally figured it out. It was an issue with the land cover shapefile that I used. I wanted to model the trees on the floodplain, so I included them in the land cover and gave them an extremely high manning's "n" value with the hopes that I could see the flow diverging around them. What really happened is that the cells with the trees showed extremely high shear stresses. Is there a better way to show the trees in the floodplain? Including them in the surface? Or should I just adjust the manning's "n" to account for the trees?

    Thanks,
    Jeremy

    ReplyDelete
  11. Chris,

    I have a good working 2D model and am attempting to export a maximum shear stress raster. I save and compute the stored map as outlined in this post, and it creates a .TIF file and a .VRT file. The issue is I can't find any way to open/view the .TIF

    I've tried several different projects with different base terrain files, so I'm assuming it is something wrong with the TIF being created. Any ideas?

    Thanks

    ReplyDelete
    Replies
    1. You can save it as a static shapefile, which would allow you to view it in any GIS program.

      Delete
    2. When you say save as static shapefile, does that mean selecting 'polygon at boundary value' under 'Stored (saved to disk)'? Won't this just give me a boundary of the shear stress surface, not an actual representation of the shear?

      Ideally I would like to be able to bring the max shear .TIF into CAD as an image or import as a geotiff and have an actual surface.

      Delete
    3. You should be able to see the geotiff as a raster in CAD or ArcGIS. I wonder if there is a bug with creating the shrear stress map. Can you get a raster map of another output type (say depth or velocity)?

      Delete
  12. That's what I thought at first, but same issue with water depth and velocity .TIFs

    I'm running 5.0.3, I was going to try 5.0 and see if that makes a difference.

    ReplyDelete
    Replies
    1. I get this same problem as Reid. I'm running 5.0.3 and have what seems to be a stable, fairly accurate model. I only desire depth/velocity/shear maps at a given flow...I'm so close but can't get past this last step! Every time I try to create a static map (stored (saved to disk)) its a failure. When using the 'Raster based on terrain' I get a TIF and VRT file but they don't open, image viewer or CAD or anything says the file is 'damaged, corrupted, or is too large'. There is something to the files as they vary in size from 1-20 Mb depending on output. But nothing opens them for me. If I do the 'polygon boundary at value' option this just seems to give me one shapefile that doesn't show the variation by cells. What am a doing wrong?? Any help would be greatly appreciated! Thanks, Eric

      Delete
    2. I'm glad at least someone else is having the issue. We've tried everything and still can't figure it out. I have come up with some work-arounds, but their not perfect.

      I originally used this online converter, https://mygeodata.cloud/converter/ and just selected a TIF to TIF conversion. For some reason it takes the TIF from RAS and creates a workable TIF that comes into CAD fine. They only allow a certain amount of conversions for free per month so it's not great if you'll need several iterations. Also, I had a co-worker try recently and they said it no longer allows the Tif to Tif conversion.

      The way I've been doing it recently is with SAGA GUI software. http://www.saga-gis.org/en/about/software.html doing the same thing.

      Once downloaded, you open the software, go to the data tab and drag the tif from HECRAS and just drop it on the gray background. Switch over to the 'Tools' tab, Under 'Import/Export' Go to 'GDAL/OGR', select the grid system (your surface should be the only one in there), and then you can select the surface and hit 'OK'. It's not the most intuitive process, but it exports a TIF that I can bring into CAD. It also tends to really blow up the file sizes.

      Delete
    3. Thank you Reid! Much thanks for sharing your work-arounds, I found the SAGA GUI software to work for me (although not an intuitive process as you noted). I'm wondering if everyone else has to do something like this to produce static maps? If so, hopefully next release will have this fixed.

      Delete
  13. Hi Chris,

    Have you come across a way of exporting out the WSE or depth grids for horizontal rendering? I see in the post on 11/10/16 by Derek Etkin that HEC realizes this as a bug. Have you come up with any work arounds? We know that the sloping water surface allows neighboring cells to drag results up or down, the rendered images are not true to the water volumes computed by the RAS 2D engine, and errors can be dramatic in steep terrain with shallow flow. Thus, I assume we need to be cautious whenever presenting depth grids exported from RAS Mapper to clients, because they may not be accurate. And even if we could export depth grids with horizontal rendering, this may show artificial stairstepping.

    We are considering the following approach and were wondering if you had any thoughts: We export the WSE with horizontal rendering as a point shapefile for each 2D cell (or extract them from the HDF file). We open the file in GIS and for points with a value of 0, we assign them the underlying terrain elevation value. We convert the TIN to a raster, using the Natural Neighbors method, with a cell size the same as the terrain. Then using raster calculator, we subtract the terrain from the WSE raster, to develop a depth grid.

    Final question... is there a way to extract WSE along the edges of cells? This might help with improving our method.

    Thanks!

    ReplyDelete
    Replies
    1. Hi Yacoub,
      as I am facing the same problem. I would like to know if you have any further improvements regarding your proposed method?

      Best regards

      Phuong

      Delete
  14. I have a GeoTiff with a 5 ft grid spacing as my terrain layer. I've noticed that the dynamic WSE surface will fit to the terrain with a relatively smooth boundary. But when I select for it to be saved to disk as a Polygon Boundary, the edges of the polygon are not as smooth as the dynamic surface had been. Instead it follows the boxy sides of the GeoTiff. Is there a way to export the more smooth looking dynamic surface?

    ReplyDelete
    Replies
    1. Has anybody resolve this problem? I am experiencing the same issue. I have a 30 by 30 feet terrain data and when I save the max depth to disk, the quality of the results changes into 30 by 30 squares. Thank you

      Delete
    2. Has anyone solve this problem?
      I am experiencing the same issue. I have a 30 by 30 feet terrain data and when I save the maximum depth to the disk (using the Raster based on Terrain option), the quality of the TIFF file changes and the results are shown in 30x30 ft squares. Is there any way to solve this problem, or to use the Raster that is stored on the fly (in memory) for ArcGIS purposes?

      Thank you,

      Delete
    3. Yes, you can try to resample your terrain using a finer resolution (finer enough to be adequate to the final scale of your maps) . after this , you need to recompute (save) your maps once again using the new (resampled) terrain.
      I do this quite often and works for me

      Delete
  15. Hi Chris,
    I noticed that you had mentioned the dynamic maps. Do you know how RAS Mapper uses the results of computation? What strategy or algorithm is used in Dynamic Mapping? And even more, what can I do to programmatically achieve the procedure of inputing the computation results and generating the dynamic maps?

    ReplyDelete
  16. Hi Chris,
    I noticed that you had mentioned the dynamic maps above. It seems that RAS Mapper uses the computation results and some strategy or algorithm to generate these maps. So, do you know how RAS Mapper processes this procedure, including inputing the computation results and generating these maps? Glad for your reply.

    ReplyDelete
    Replies
    1. Yes, I’m general terms I know how RAS does this. It’s discussed in the manual in decent detail. I don’t know at a programming level though since I don’t have the source code. What I do know is RAS Mapper reads from the plan HDF file to generate the maps. There are libraries out there that can read from HDF files. If you can learn how to read from HDF programmatically, you could replicate what RAS does in your own code.

      Delete
    2. Thanks for your reply, Chris.
      Yes, I have known how to read out the data from the plan HDF file programmatically using Python. But I don't know how to use the data to generate the dynamic maps. Could you please introduce what strategy, algorithm or method is participated in this procedure? Any articles or blogs or any libraries will help. Looking forward for your reply.

      Delete
    3. I’m afraid that gets beyond my area of expertise. You might want to check the GIS forums. Good luck.

      Delete
    4. What a pity. Thanks for your reply. Actually it's not necessary to know the thorough algorithm. Maybe I can look for some interface that executes the procedure and is exposed to users. I don't know if the "RasMapper.exe" or "RasMapperLib.dll" file contains this interface. Have you ever researched for it?

      Delete
    5. I haven’t had much luck with those. But haven’t tried much either.

      Delete
    6. Tian, were you able to figure out the mapping algorithms that is used to create the maps? I can't seem to figure it out.

      Delete
    7. What I would love to be able to do is manipulate the output results (e.g. set my own WSEL) for a XS (this is for 1D) and then map those edited WSELs onto the terrain using RASMapper's algorithms. Chris, have you heard of anybody having success doing this?

      Delete
  17. Thank you for the helpful tutorials. I am a senior engineering student working on my senior project and I have run a flood plain analysis in hec-ras but when I'm trying to create a shapefile for arc gis, every time I try to follow your tutorial, the interface says "Map not created" though I have followed all the steps. Is there any advice you can offer? I'm a real novice with a lot of this software.

    Thanks for your time.

    ReplyDelete
  18. Chris, Is there any way to export the velocity vector arrows as part of a stored map?

    ReplyDelete
  19. Hi,
    I am still getting a store status of 'Map not created', when I click Compute/Update Stored Maps. Do you have any tips on how to get the map to be created??
    Thanks.

    ReplyDelete
  20. Hi!
    I tried to export a velocity field from RasMapper, when I open the .tif on GlobalMapper or ArcGIS I dont have the m/s units, all I see is in meters...but the values are those from de velocity field on RasMapper...has anyone an idea on how to export a raster with the good units?
    thanks!

    ReplyDelete
    Replies
    1. Unfortunately, I think this is just a nuisance bug we'll have to live with until the next version.

      Delete
  21. Hi Chris. I have been exporting D*V raster maps into ArcGIS. I have noticed that while D and V (maximum) outputs match in extent, D*V does not. Its the same in RAS. Is this due to a difference in spatial interpolation between D*V and D and V results? Further to that - when calculating D*V (Maximum), is RAS using the max of D and the max of V (independent of time) or does it step through the model time steps and calculate a composite max D*V based on each time step. If the former, then I suppose you could process D and V results external to RAS, to get D*V, thereby having consistent extents. Any advice on the most suitable approach would be valuable. Thanks

    ReplyDelete
    Replies
    1. Mark. Great questions. I don't know why D*V has different inundation extents. Seems like every cell that had water in it during the simulation should be included in the extents for every Max map. My understanding is The Max D*V map is not the max D * max V, but rather max (D*V). Yeah, you might just have to send out the data to ArcGIS or something similar.

      Delete
  22. Hi Chris. Im currently performing 2d modellingon a certain river. I've already exported my depthmax from ras to arcgis. how can I convert the depthmax.tiff to a shapefile with its area and depth values and at the same time I could use it to get its percentage match from a flood footprint?

    ReplyDelete
    Replies
    1. Hi Carl, I’m not sure. Perhaps you could try an ArcGIS held forum?

      Delete
    2. Hi Chris, I just want to ask if is it okay to use normal depth as a boundary condition on a river mouth instead of using stage hydrograph? i used normal depth since we don't have any data for tidal. would it alter or cause abnormality on the flood results?

      Delete
    3. Using normal depth as a boundary condition in a tidal zone will not work. You'll be able to run the model, but the answer will be wrong. If it's a very steep river, then the error may not persist very far upstream, but for a flat river, the error could propagate upstream a long way.

      Delete
    4. the water from the river seems to backflow from the river mouth boundary with no stage hydrograph and tends to spread sideways, causing areas that shouldn't be flooded, be flooded.

      Delete
  23. Why are steady flow water surface elevations not available as shapfiles like unsteady flow? Exporting GIS data for steady flow only results in cross sectional "lines" at the water surface, but not in a shapfile that would be the source of producing a surface in Civil 3D. In unsteady flow the shape files are available for import. All I can get for steady flow is tiff and jpeg image files.

    ReplyDelete
  24. Hi Chris,

    I have the results of one flood simulation for a flow rate ranging from 1000 to 2000 (m3/s). I want to have several inundation maps at various flow rates. Is there a way to ask HEC-RAS to plot all of them for me, or I have to choose every single flow/time and plot one map at a time (in "Results Map Parameters" window)?

    Thank you for your time and help in advance.

    Regards

    ReplyDelete
    Replies
    1. For now, in RAS Mapper you have to do them one at a time. Hopefully they'll have something like you're suggesting in a future release.

      Delete
  25. Good afternoon Chris,
    I am having issues trying to "Compute/Update Stored Maps." When I select it, a dialog box appears showing the progress, but typically gets stuck on "File 2 of 12: 4% processed". I have let it run for around 12 hours once and when I checked back, the progress bar was blank and it said something like "waiting on external process." Have you come across this? I wonder if it is because the model is too large, but I am not seeing the errors associated with that like have been mentioned in other blog posts. Any ideas? Or, are there other ways of exporting I could try?
    Thanks in advance for your time!

    ReplyDelete
    Replies
    1. Kathleen, have you tried saving RAS, closing, rebooting your machine and trying again? Sounds like you might have a process running in the background that's conflicting. A reboot might fix this.

      Delete
    2. Yes, and I have the same issue. I contacted someone using the same model and he hasn't had problems so we think it may be an issue with my computer, maybe running out of RAM (this desktop only has 16GB). I will try it on the new workstations and hopefully the problem is solved! Thank you for the response.

      Delete
  26. Hi, I've used this method to export flood extents to .shp-files and have an issue. When exporting my WSE using version 5.0.7 the file size are a lot larger compared to using the same model to extract results with version 5.0.3. The sizes are approximately 4000kB vs. 25000kB and I can't see any difference when comparing them in GIS software. Have you experienced the same or know why the files are significantly larger?

    ReplyDelete

Note: Only a member of this blog may post a comment.