Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Excel file into HEC-RAS 2

Status
Not open for further replies.

Trackfiend

Civil/Environmental
Jan 10, 2008
128
I have been given an ASCII point file in CSV format in excel. The information is ordered as follows: Point number, Northing (Y), Easting (X), Elevation, and Description.

This data is the culmination of a hydrographic survey done on a river reach that is to be modeled in HEC-RAS. How do I import this data into HEC-RAS without having to painstakingly input each cross section one point at a time? Do I need additional programs (ArcView, ArcGIS, GeoRAS) in order to accomplish this?

Any help or insight is much appreciated.
 
Replies continue below

Recommended for you

"Importing Geometric Data



HEC-RAS has the ability to import geometric data in several different formats. These formats include: a GIS format (developed at HEC); the USACE Standard Surveyor format; HEC-2 data format; HEC-RAS data format; UNET geometric data format; and the MIKE11 cross section data format. Data can be imported into an existing HEC-RAS geometry file or for a completely new geometry file. Multiple data files can be imported into the same geometric data file on a reach-by-reach basis.



To import data into a HEC-RAS geometric data file, the user selects the Import Geometric Data option from the File menu of the Geometric Data window. Once this option is selected, the user then selects one of the three available formats from the list. After a format is selected, the user will be asked if they want to add the data to the current geometry file, or if they want to clear the current geometry file before importing the data. Once this choice is made, the user will be prompted to enter the name of the file containing the data. The following is a discussion of each of the three file formats.




--------------------------------------------------------------------------------

GIS Format

USACE Survey Data Format

HEC-2 Data Format

HEC-RAS Data Format

UNET Geometric Data Format

MIKE11 Cross-Section Data"

good luck
 
HEC-RAS data files are plain text. Create a few cross-sections in the program to discern the format and then format your Excel file accordingly.
 
I actually looked into these formats (GIS, USACE, MIKE11), minutes before reading your post RWF7437. It would seem the only one applicable is the USACE Survey Data Format but I still can't seem to get it to work.

We have EaglePoint in our office and are currently trying to figure out a way to import this data into EP and then export out to HEC-RAS. The only problem we seem to be running into is a "tab delimited" error. EP apparently doesn't play well with this file type. I've gone and converted the original file to several different options (comma delimited, space delimited....) but everytime I go to resave it, it defaults back to tab delimited. Still trying to hammer out this bug.

I've noticed in scanning the internet for possible solutions that you could create a text file with commands but sadly, I am not at all familiar with that. I also tried creating a few generic cross sections but don't know how to discern the format.

Thanks for the input guys. I'll keep hammering away at it.
 
Open the geometry file in Notepad, Wordpad, MS Word, etc. It's plain text with a different file extension.
 
I have now downloaded the newer 4.0 version of HEC-RAS and this newer version has an option to import a csv file. Now when I go to import it, there are (2) radio buttons indicating the particular format that your csv file is in (X,Y,Z or Station, Elevation). Since mine is in X,Y,Z format (Number, Northing, Easting, and Elevation), I choose the X,Y,Z format and it then gives an error message reading "runtime error '6', Overflow".

I've tried creating a series of river and reaches (stick figure on geometry data plan) with which to import this data into and I've also tried to only import one cross section (as a test) to see if it would work, but I keep getting this error message.

I know there is a solution to this without having to go buy ArcView or ArcGIS (to use with GeoRAS), but I keep spinning my wheels trying to figure it out. Any thoughts?
 
One of the easiest ways, if you have a few cross-sections, to input (sta,el) data into HEC-RAS is to just copy/paste from excel. You will have to create each cross-section, but the sta,el can entered by using the windows c/p commands. Also, using the tables within the geometry screen is a quick way to modify all the station lengths, manning's, c/e coeff. at one time.
 
Have you tried erasing your number field? And does it ask if you have a header row or not?
 
Yes, I've tried erasing my number field. I've tried several different options eliminating various columns in my csv file but everytime I go to import using the CSV option, it still gives the "runtime error '6' overflow" message. It does ask if I have a header (which I do), but I've also tried with and without a header and both give an error message.

I've seen the sample geometry files in the HEC-RAS manual but I don't know how to convert the csv to this type of file (forgive me for my ignorance). Do I have to manually type out the data file structure in word or is there a simpler way to convert one to the other?

Again, I apologize if it seems that I am asking the same questions, but I am new to taking raw survey data and importing it into HEC-RAS. Here is my file if anyone can take a look at it and see if there is something wrong with the initial setup.

Thanks again.
 
 http://files.engineering.com/getfile.aspx?folder=667bb408-2f60-4550-b0e7-6783e7171a23&file=CrossSections.csv
You've got to add columns on the left for River, Reach, and Station (RS). Delete the last column. You will have to manually interpret from your data where the RS breaks are and put them in the CSV file. Not sure whether or not if the RS numbering has to be "upstream to downstream" in the CSV file.
 
I've added the columns (River & Reach), eliminated the last column (description) and the original file has the station numbers. I've tried eliminating all of the cross sections with the exception of either one or two (for simplicity and no junctions or separate river/reaches) in order to just import one river with one reach and still no luck.

Could it be that the new version (4.0) still has some bugs pertaining to importing csv files?

It seems that the only option left is to use ArcGIS and GeoRAS. I'm in the process of downloading GeoRAS and going through its manual as we speak.

I shall slay this beast if it takes everything inside of me...(or until 5pm roles around).
 
I think what you are referring to as the station numbers in your file are not River Station values as the program would like. Each row in your file has a unique "station", I think the program is thinking you have a long chain of one-point cross sections, which it does not know how to handle. The value of RS for a given cross section should be the same for all the data points for that cross section. You would need at least three (I think) X,y,z points for a given RS to define a valid cross section.
 
Thanks DMcGrath, it seems that the station numbering was the problem in getting the "runtime error '6' overflow" message. I've imported a few cross sections into HEC-RAS by adding the River and Reach columns, eliminating the description column, and renaming the individual station numbers for each point with a common station number per cross section.

Currently, I'm in the process of pairing each cross section with a station number. I'll see if the placing matters as far as upstream/downstream layout it concerned.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor