Welcome to the RAS Solution Forums HEC-RAS Help Mining the Geometry Text File

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #7423
    Scott Miller
    Participant

    I am about to write code to pull channel/XS characteristics from the HEC RAS text geometry file. This will be to write the characteristics to EPA SWMM text file format. Please let me know if there is a description of the formatting applied in the text file. I haven’t found it in HEC documentation.

    I’m working from a .g01 exported from Civil 3D, but will cross check against files generated by Mapper and GeoRAS. I’d like, for instance, to know which length to use for the main channel (without having to twiddle around with a model to figure out what changes).

    #12483
    Anonymous
    Guest

    I’m not really sure what you are trying to do. But if you haven’t already, you might consider trying to read the info from the hdf file. You don’t need to develop the full model. Just enough to run the preprocessor.

    #12484
    Scott Miller
    Participant

    Thank you, Jarvus. I haven’t harvested information from hdf files. I know that is where results are written, but it sounds like 1D geometry data may be stored there too. Is that correct?

    I’m interested in the text geometry file. There is very little change that needs to be made to translate a HEC RAS cross section to SWMM transects. Both use an awkward format, which I believe was the HEC 2 format – written for limited storage and computational capacity. Here is a cross section:


    Type RM Length L Ch R = 1 ,750 ,25,25,25
    XS GIS Cut Line=3
    1422669.09648924177400.4128280281422668.86708273177410.410196314
    1422668.63767623177420.407564601
    Node Last Edited Time=Aug/07/2019 09:54:45
    #Sta/Elev= 16
    0 767.2 .46 767.11 4.95 765.86 6.73 765.39 7.6 765.24
    8.42 765.29 10 765.23 10.85 765.2 11.51 765.23 12.85 765.63
    15.67 766.06 16.9 766.25 17.45 766.1 19.29 765.99 19.68 765.99
    20 765.97
    #Mann= 0 , 0 , 0
    Bank Sta=0,20
    XS Rating Curve= 0 ,0
    XS HTab Horizontal Distribution= 5 , 5 , 5
    Exp/Cntr=0.3,0.1

    It’s largely a bunch of lists – northing/easting pairs, station/elevation pairs, some of them mixed – like bank stations then downstream lengths. It’s all formatted. But I don’t know which one of those “25”s is the downstream length of the main channel, not without tweaking a model and seeing what changes in the text file.

    Is there a document that describes the formatting?

    #12485
    ckatsoulas
    Participant

    Scott I’m pretty sure the header is self explanatory
    ie Type RM Length L Ch R = 1 ,750 ,25,25,25

    Type=1
    RM=750
    L=25
    Ch=25
    R=25

    the 25’s are the left bank, main channel and right bank distances to next cross section
    750 is the XS chainage

    #12486
    Anonymous
    Guest

    I don’t think there is any documentation. The 507 hdf file looks like it has the 1D cross section information. If you download the HDF viewer, you can open up a file. Open up the geometry folder and then the cross section folder. There is a file called attributes that has a lot of information for each cross section with clearly labeled columns.

    But if you can get it out of the text file, you might find that easier than trying to figure out how to use hdf.

    #12487
    PaoloP
    Participant

    Scott, you should use HECRASController to easily read the geometry file.
    You can download “RAS to Excel” from

    to see a VBA code that reads a geometry file.
    Unfortunately the cose is only partially documented

    Paolo

    #12488
    Chris G.
    Keymaster

    Scott- My book, Breaking the HEC-RAS Code dissects the geometry and flow text files. It shows every key, plus what all of the arguments behind the keys mean. If you are trying to decipher the geometry text file, and want documentation on how to do it, you should get the book.

    -Chris

    #12490
    Chris G.
    Keymaster

    Not sure what happened to my last post. Anyway, the geometry file is fully documented in “Breaking the HEC-RAS Code”. Let me know if you have any questions about it.

    #12489
    Scott Miller
    Participant

    Yes. It’s about time I get your book. Thank you, Chris. It’s on its way.

    And thank you Jarvus, Con, and Paolo for your suggestions.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.