Cross Sections - Import from Excel / CSV?

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Cross Sections - Import from Excel / CSV?

Paul
Hello everybody,
Is it possible to import Cross Section Data from an Excel oder CSV file in Hec-Ras?

I have the coordinates/geometry for the cross sections of my new project as an Excel File. I would like to avoid typing it all out again in the cross section editor.

I already opened a sample geometry file from Hec-Ras in a text editor. The data is in there in plain text. To create the VBA Script to create this kind of output file already crossed my mind, but it will be kind of complicated.

So: Is there an easy solution? Like creating a simple CSV-File from my data and importing it?

Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

Marulke
You can import several data formats, including CSV (but I have never tried to do it). Read chapter 6 in the users manual. You can also copy station - elevation data from Excel and paste it into the CS editor in RAS.
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

Paul
Thank you. The csv-import unfortunately does not work for Cross Sections.

I used the "Excel-Copy-Paste" method. Still kind of inconvenient compared to preparing a text-based input file but way better than typing it out in the internal Cross Section Editor.

By using the little tool "Do-it-again" (you can find it via Google) I was able to automate the copying and pasting and speed up the process a little bit. The tool records your mouse actions and keyboard inputs so you do not have to do the same movements and inputs 100 times. Maybe that helps someone...

Reply | Threaded
Open this post in threaded view
|

Cross Sections - Import from Excel / CSV?

Paul Currier
Its relatively simple:

Create a spreadsheet with column data as follows (6 columns total):
River Name, River Reach, River Station, X, Y, Z

The first line will have header information only, in 6 separate columns.  Example:
Anytown River, Jones Reach, River Station, Local Easting, Local Northing, Your Elevation Datum

Subsequent rows will have your River Station, X, Y, and Z data.  Obviously, there's no additional information in columns A and B, only columns C, D, E, F.

Save the spreadsheet as a CSV file.

Under Geometry Data: File / Import Geometry Data / CSV.

Follow the prompts.

I think you'll appreciate how simple it really is.

- Paul

www.WRC-LLC.com
- Paul Currier Water Resource Consultants, LLC www.WRC-LLC.com
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

Mike
Thanks it really works but I have a question.Does it work for rivers with junctions?
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

Bibu
In reply to this post by Paul
Hi everyone !

When I import my CSV in Hec Ras (x,y,z), some of my cross sections look bad. when I see the cross sections windows, the points are not in the good order and so my river bed looks like making waves. In the geometry data, my cross sections are going and coming, I don't really know how to describe it. Is there a way to add pictures ?
I would like Hec-Ras to draw me the good bed, how can I manage that ?

Thank you for your help :)
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

Beginner
In reply to this post by Paul Currier
Hi Paul!

I tried to import cross section as u described : in HEC 4 and 5 ;
only header ST,X ,Y ,Z contain data,
However in import wizard at 2nd tab ,it ask for river and reach ,which is obviously only 1 line info.but 3rd tab for cross section import is disabled ,so only river and reach info is imported ,no cross sections are imported .
I don't know what's wrong

Can you please show an example csv import file .I know it is an older thread ,and chance of reply are rare,

ye I am waiting  'finger crossed'
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

Alexis Morales
In reply to this post by Paul Currier
Hi Paul Currier (and everyone out there)

I would jus like to ask if you have encountered a problem where in you have to import geometric cross section data in CSV format for a river network with several tributaries (ergo a lot of nodes/junctions)? I have this problem and when I tried following the steps in the manual (which I think was discussed quite briefly), I always get an error message saying 'cross sections not georeferenced'. I'm quite lost as to have to resolve it because I already tried several measures like creating the river centerlines and bank lines in ArcGIS as stated in the manual but still nothing happens.

I would really appreciate it if you could provide me some tips or guidelines so I could make a headway with my project.

Thank you very much!
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

PaoloP
You can see
https://www.youtube.com/watch?v=wmmtczbnMZ4
It is an App to build very quickly RAS geometry.

PaoloP
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

gerar200
Banned User
This post was updated on .
In reply to this post by Paul
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

Jerry Davis
Thanks for providing this sample data.  These seem to be cross sections at various locations along the reach.  I'm assuming the rs is the longitudinal distance along the reach, and the station distances start at one side or another.  However what defines where the zero station is located, or the thalweg position, or the orientation of the cross section?  There must be other information that relates the cross section to XY coordinates.
 
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

gerar200
Banned User
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

Jerry Davis
What I am doing is doing surveys of cross sections in the field.  They are not derived from elevation models, but from using a telescopic or digital level.  So I was wanting to import these in a CSV or excel format into HEC-RAS.  The  documentation for HEC-RAS only discusses creating these from an elevation model like a TIN or LiDAR.  I have XYZ locations for the cross section start point, end points, and thalweg (similar to stream center line).
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

Jerry Davis
In reply to this post by Beginner
Ok, this looks pretty straightforward.  The cross section format of ST, X, Y, Z presumably goes from left to right, and so for our field survey data, I just need to convert cross section distances to X, Y from the starting point X, Y and orientation (in turn derived from the end point X, Y, in relation to the starting point).  

Jerry
Reply | Threaded
Open this post in threaded view
|

Re: Cross Sections - Import from Excel / CSV?

Jerry Davis
In reply to this post by Alexis Morales
This thread is very useful, though I’m unclear what to specify as river reach for a cross section.  Would it be numerical and correspond to a longitudinal river station (distance)?  Then the cross section station would be distance along the cross section?  If so, I’m set.