Open lgrimley opened 3 years ago
The line throwing the error is related to rating curves which are not well supported by parserasgeo. You may have to do some debugging to figure out what is going wrong. Feel free to submit a PR if you fix it.
Thanks for the info on the rating curves!! I found a work around for now....
I have another question about importing the XS GIS Cutline into a non-georeferenced geometry file.... I can't seem to write the cutline info to the geometry file. I've made sure I am writing the GIS cutline in the correct format....xs.cutline.points = ([(x1,y1),(x2,y2),(x3,y3),...] where the values are strings. I tested the example w/ increasing manning's values by 50% and geo.write() worked in writing this change back to the geometry file.
Do you think it won't write out the GIS cutline into a new geometry file because it didn't previously exist in the geometry file?
I'm not fully following you on "I can't seem to write the cutline info to the geometry file". What happens when you try to write the geo file? Error? Is the cutline not visible in the geo file in a text editor? In the RAS geo viewer? in RAS mapper? parserasgeo was written before mapper was really a thing so they might not play nicely together. But the cutline geo should be visible in the geo viewer, unless RAS is angry that the river cutline isn't defined. It might also be worth using floats in that list of points, versus strings, though I don't think it should matter.
self.number_pts = None
self.points = [] # [(x1,y1),(x2,y2),(x3,y3),...] Values are currently stored as strings
Scratch that about trying floats. Are you setting number_pts
? That really should be dynamic, but it isn't yet. That might be making RAS angry
I don't get any python errors when I write the geo file (after looping through the XS to assign a cutline). I've been comparing the input geo file to the output geo file in a text editor and I don't see the cutline data. They are actually identical text files just with different file names. I am not setting the xs.cutline.number_pts !
I just realized I haven't defined the river cutline in the geometry file. I'm guessing that is probably why it isn't working, sorry about that!!!
So I wrote the XY of the river reach before moving onto the cross-sections. The XY of the river reach DID successfully get added to the geo file, the XS cutline still isn't writing to the geo file. I will keep messing around with it...
Sorry it's not working for you. It may be beneficial to try loading an existing georeferenced model into PRG, modify the cut line, and save it. I'd take a look but I don't have time right now, or a computer that HEC-RAS will run on =D
@lgrimley I might be able to help. Are you able to share the model?
@vdwees sure, I've attached the HEC-RAS model. Let me know what you find out.... 3710402014011232_WO002New River_RAS.zip
Mike, I'm trying to read a RAS geometry file and get this error.
Originally posted by @lgrimley in https://github.com/mikebannis/parserasgeo/issues/23#issuecomment-795646350