Welcome to the RAS Solution › Forums › HEC-RAS Help › Mining the Geometry Text File
- This topic has 8 replies, 496 voices, and was last updated 5 years, 3 months ago by Scott Miller.
-
AuthorPosts
-
August 30, 2019 at 9:17 pm #7423Scott MillerParticipant
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).
August 31, 2019 at 9:22 pm #12483AnonymousGuestI’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.
September 4, 2019 at 7:52 pm #12484Scott MillerParticipantThank 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?
September 5, 2019 at 2:36 am #12485ckatsoulasParticipantScott I’m pretty sure the header is self explanatory
ie Type RM Length L Ch R = 1 ,750 ,25,25,25Type=1
RM=750
L=25
Ch=25
R=25the 25’s are the left bank, main channel and right bank distances to next cross section
750 is the XS chainageSeptember 5, 2019 at 3:11 am #12486AnonymousGuestI 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.
September 6, 2019 at 4:34 pm #12487PaoloPParticipantScott, you should use HECRASController to easily read the geometry file.
You can download “RAS to Excel” fromto see a VBA code that reads a geometry file.
Unfortunately the cose is only partially documentedPaolo
October 2, 2019 at 7:00 pm #12488Chris G.KeymasterScott- 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
October 2, 2019 at 7:03 pm #12490Chris G.KeymasterNot 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.
October 25, 2019 at 9:11 pm #12489Scott MillerParticipantYes. 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.
-
AuthorPosts
- You must be logged in to reply to this topic.