module wntr.network.io

write_geojson(wn, prefix, crs=None, pumps_as_points=True, valves_as_points=True)[source]#

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

The GeoJSON 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 (wntr WaterNetworkModel) – Water network model

  • prefix (str) – File 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