write_shapefile#
module wntr.network.io
- write_shapefile(wn, prefix, crs=None, pumps_as_points=True, valves_as_points=True)[source]#
Write the WaterNetworkModel to a set of Esri Shapefiles, one directory for each network element.
The Shapefiles only includes information from the water network model. To add results of a simulation or analysis, do:
wn_gis = wn.to_gis() wn_gis.add_node_attributes(some_data_to_add, 'name_of_attribute') wn_gis.write_shapefile(...)
- Parameters:
wn (wntr WaterNetworkModel) – Water network model
prefix (str) – File and directory prefix
crs (str, optional) – Coordinate reference system, by default None
pumps_as_points (bool, optional) – Represent pumps as points (True) or lines (False), by default False
valves_as_points (bool, optional) – Represent valves as points (True) or lines (False), by default False