Jannik-Schilling / generate_swmm_inp

a QGIS plugin for the import and export of SWMM input files (conversion of geodata, e.g. shapefiles or geopackage into SWMM models and vice versa)
GNU General Public License v2.0
35 stars 11 forks source link

Fix: manage xsects for conduits with 'CUSTOM' shape #85

Closed smaspons closed 7 months ago

smaspons commented 7 months ago

Hi!

I was having a problem with a conduit that had a CUSTOM shape and it had a shape curve name in the Shp_Trnsct column, but SWMM reported me this: imatge

The shape curve name wasn't there. So I went to look at how SWMM does it and I saw that it wrote them like this:

C2   CUSTOM    0.315    SHAPE_DEMO    0.0    0.0    1    

So I looked into the code and saw that it put the shape curve name in the Geom2 column but then it was overridden by this:

xsections_df['Geom2'] = xsections_df.apply(lambda x: fill_empty_xsects(x, 'Geom2'), axis=1)

I don't know if this change I made is the optimal solution, but it works for my application. I thought it was a bug that was overlooked so I opened this pull request, but if I'm not seeing something and this is intentional please let me know as I'm not a SWMM expert by any means.

Thanks!

Jannik-Schilling commented 7 months ago

Thank you