Flush It! shows the path wastewater takes to the ALCOSAN treatment facility from any address within the ALCOSAN Service Area. This tool was developed in partnership with ALCOSAN and CivicMapper.
Use the embedded version below, or click here for a full-screen view.
This map shows the path wastewater takes to the ALCOSAN treatment facility from an address you enter.
On the map, you'll see the sewer infrastructure network in the ALCOSAN service area. This represents a composite of data from 82 municipalities and authorities, with the color of the pipe indicating who owns the pipes.
Notably, this map shows the municipal sewer lines that may be taken over by ALCOSAN. This process, called regionalization, entails the transfer of ownership of multi-municipal trunk sewers, wet weather control facilities, and related infrastructure from customer municipalities to ALCOSAN. Note that regionalization extents shown here are preliminary and subject to change. Learn more about the regionalization process from the ALCOSAN website.
Using an address, the map searches for the nearest sewer infrastructure and follows the network all the way downstream to the ALCOSAN treatment facility.
When you type in an address, the mapping program uses a geocoder to calculate the latitude and longitude of the address: the address's location in real-world coordinates. From that location, it determines where the nearest sewer structure is, and then traces the pipes downstream to the ALCOSAN treatment facility. On its way to ALCOSAN’s plant, wastewater passes through many miles of pipe and often through several municipalities. This highlights the inter-municipal nature of regional wet weather management, and the challenges that municipalities face in maintaining many miles of sewer line.
This map utilizes an existing database of sewer pipe infrastructure in the region. That database is maintained by 3 Rivers Wet Weather,with support from ALCOSAN and the 82 communities within ALCOSAN's service area.
"I ran a trace from my house and it doesn't start where I know my sewer connects."
Generally, Flush-It! will give you a good sense of where and how far your toilet flushes go. However, the starting point is an approximation, and it should not be used for planning or official use.
"I'm curious about some of the technology used here."
You can check out the source code for this project on GitHub.
The sewer database is managed in a geographic information systems (GIS): a PostGIS-enabled PostgreSQL database, from which the data is provided as a geo-aware web service via Esri ArcGIS Server software. The tracing functionality comes from a geoprocessing service that runs on that software and taps the database. The client-side web application makes calls to to both the database and the geoprocessing service via the ArcGIS REST API to do it's thing.
On the front-end (the map), we're using the Leaflet web mapping library, with an Open Street Map-sourced basemap service from Mapbox that we custom designed. Together, this software assembles all the contextual information, sewer data, and trace results onto the web map.
The rest of the application utilizes some other typical web and server libraries: Python Flask on the back-end, and Bootstrap and jQuery on the front-end.
The accuracy of the trace is limited by a combination of two factors: the varying spatial accuracy of the geocoder, and the lack of consistently documented service line locations (the connections from a building to the sewer). Consequently, you may find that the trace doesn't start quite where you think or know it should. To keep things simple (and fast) for this demonstration, we only look for the nearest sewer structure to the geocoded location.
Since the geocoded location is likely not the point at which the sewer service line attaches the building at the address, and because we don't have control over where specifically that address gets put on the map (we're using a geocoding service from Mapbox), the starting point for the trace is an approximation. Furthermore, the nearest structure to the geocoded address is not likely where the service line actually ties into the sewers—it likely connected directly to a pipe.
The underlying GIS technology and data utilized by the map is already in place and is used on a daily basis; we merely interfaced with it in a different way to make this little mapping application. With the exception of Esri ArcGIS Server, all of the software used by this application is free and open source.
In addition to showing where your toilet flushes go, this map demonstrates the power of using open data standards and open-source technology designed for the modern web.