You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow the convention used within pyswmm: support cleaner importing of the main classes, straighten out the config and definitions.
support these pattern:
fromswmmioimportModel, FloodReport, ComparisonReport, INPDiff, BuildInstructionsmymodel=Model('model.inp')
mymodel.draw(param, ...) #is there a better function word?mymodel.conduits=modified_conduits#setters/getters to make changing a model more straightforward#access global/config variables in a more obvious wayimportswmmioswmmio.config.prj='epsg:2272'swmmio.config.shapefile_directory='/path/containing/shapefiles/for/basemap'
The text was updated successfully, but these errors were encountered:
Getting and setting model data should be straightforward. A possible implementation could look like this:
model=swmmio.Model('path/to/model.inp')
# get dataframe of junctions section from inp filejuncs=model.inp.junctions# change the datum juncs['Elevation'] =juncs['Elevation'] +10model.inp.junctions=juncsmodel.save() #overwrite existing model or optionally set a new filename # get a geojson representation object of the conduitsmodel.inp.conduits.to_json()
# retrieve specific subset of columns of data from rpt and inp files (as available) model.conduits(data=['MaxDepth, MaxQ', 'geometry'])
Follow the convention used within pyswmm: support cleaner importing of the main classes, straighten out the config and definitions.
support these pattern:
The text was updated successfully, but these errors were encountered: