4

Is it possible to create cross sections along a river in QGIS and then export the data to HEC-RAS?

  • Also, is it possible to export the results from HEC RAS back to qgis? – H.Wiener Apr 9 '14 at 14:54
  • yes, that is quite easy with RAS Mapper (part of HEC-RAS 5.0.3), but it is a bit longer in a comment. – Marco Jun 13 '17 at 22:28
4

Well, here it is:

(How to) Create and transfer cross-Section Data from QGIS to Hec-RAS

A. In QGIS RUN the following SAGA GIS modules:

  1. Cross Profiles (Using a DEM and the stream reach as the axis "Cross_prof.shp" will be created and imported into the layers (data frame) Note: clear the "Cross_prof.shp" file from profiles that intersect each other
  2. Profiles from Lines (Using the SAME DEM and the "Cross_prof.shp" as the "lines" file "Each New LINE as a NEW file" Select NO It saves a new shapefile as a POINT shapefile WITH coordinates (i.e. rofile_points.shp)
  3. Import the "Profile_points.shp" into Excel (or copy from the attribute table within QGIS and paste into excel)
  4. COPY from Profile_points.shp and PASTE all columns.
  5. ERASE the columns "ID", "DIST" and "DIST_SURF"; leave only the columns "Line_ID", "X", "Y" and "Z"
  6. Insert TWO columns on the left: Column A will be named as RIVER_NAME and Column B as RIVER_REACH

  7. ADD the name of the river (column A) in ALL lines;

  8. ADD the RIVER_REACH name (=i.e. "2" or anything else);
  9. RENAME column "Line_ID" as "RIVER_STATION" (column "Line_ID" of the "Profile_points.shp" shapefile). Now the file has six columns: River_name (A), River_Reach (B), River_Station (C), X (D), Y (E) and Z (F) Save the file in excel format so that you can re-use it.

  10. SAVE the file in .CSV format. Please note than in some cases, EXCEL uses the semi-colon (;) character instead of the comma (,). In such a case, open the CSV file with Notepad, press ctrl-H (replace function) and REPLACE ";" with "," (do not use the quotes)

SAVE the CSV file and it is ready for importing into HEC-RAS

B. Import .csv to HEC-RAS Open HEC-RAS New Project New Geometry Data Import Geometry Data / CSV

Set/Pick the correct Columns Pick the UNIT system (SI or Metric) and ...finish / import data.

2

I found 2 usefull plugins:

  1. Station Lines: creates cross sections (perpendicular lines) at a specific distance and length along the "river".
  2. VoGIS Profil tool: creates cross sections based on a raster map and the vector layer of the cross sections created by the Station Lines.
  3. The output of the VoGIS Profil tool is (amongst other option) a csv file which can be imported to HEC RAS.
1

I have used the Q-Ras plug-in https://plugins.qgis.org/plugins/Qgis2Ras/ and it has done the expected work.

Here the help text, which is all I needed:

Q-RAS Plugin is a preprocessing for geometry preparation in HEC-RAS.

The steps to using Q-RAS Plugin are fairly simple:

  1. Load in QGIS a Digital Elevation Model in grid format in a projected crs

  2. Digitize a stream network vector line from upstream do downstream

  3. Digitize a Cross sections vector line from left overbank to righ toverbank (it’s not necessary to follow a particular order in XS digitizing as the plugin order the XS basing on the river feature)

  4. Designate where to store your new geometry file

  5. press OK

  6. Open HEC-RAS and enjoy

There is another plugin, RiverGIS, but I did not want to go through the cumbersome process of configuring PostGIS.

UPDATE: I went to the process of creating a PostGIS database and RiverGIS is much better than Q-RAS. Here some tips to install PostGIS: How to install PostGIS on Windows?

1

There are two plugins under QGIS 2.18 that are very suited for this task:

  1. Profile tool: it gets the profile along a line from raster.
  2. ProfileFromPoints: it interpolates a point layer along a line(s).

The plugin RiverGIS is able to do the same and a lot more, but for tailoring a model section to section, the ones above are probably better.

0

there will be a few steps to achieve this.

A) create evenly spaced points along your river

B) build the line perpendicular to your river for each point

C) create evenly spaced point along those lines

D) extract the values of your DEM for each point

E) copy paste your attributes to excel (ctrl-C/ctrl-V)

A,C and D cand be done with the "profile from line" plugin

B could be done based on this post (slope (m) of perpendicular is -1/m slope of segment where the point is located).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.