wntr.network.io#

The wntr.network.io module includes functions that convert the water network model to other data formats, create a water network model from file, and write the water network model to a file.

Functions

from_dict

Create or append a WaterNetworkModel from a dictionary

from_gis

Create or append a WaterNetworkModel from GeoDataFrames

read_geojson

Create or append a WaterNetworkModel from GeoJSON files

read_inpfile

Create or append a WaterNetworkModel from an EPANET INP file

read_json

Create or append a WaterNetworkModel from a JSON file

read_shapefile

Create or append a WaterNetworkModel from Esri Shapefiles

to_dict

Convert a WaterNetworkModel into a dictionary

to_gis

Convert a WaterNetworkModel into GeoDataFrames

to_graph

Convert a WaterNetworkModel into a networkx MultiDiGraph

valid_gis_names

Valid column/field names for GeoJSON or Shapefiles

write_geojson

Write the WaterNetworkModel to a set of GeoJSON files, one file for each network element.

write_inpfile

Write the WaterNetworkModel to an EPANET INP file

write_json

Write the WaterNetworkModel to a JSON file

write_shapefile

Write the WaterNetworkModel to a set of Esri Shapefiles, one directory for each network element.