Giter Site home page Giter Site logo

civicmapper / flush-it Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 4.0 20.51 MB

See how far and where wastewater travels to the Allegheny County Sanitary Authority (ALCOSAN) treatement facility.

Home Page: http://flush-it.civicmapper.com

License: MIT License

JavaScript 98.40% CSS 0.13% HTML 1.36% Python 0.11%
geoprocessing mapbox esri turfjs wastewater infrastructure pittsburgh allegheny sewers bootstrap

flush-it's People

Contributors

dependabot[bot] avatar fossabot avatar garrettbuyan avatar gassc avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

flush-it's Issues

IE 11 / TurfJS 5 compatibility

In IE11, we're get an error that kills the map at the start: Object doesn't support property or method 'fill' from a piece of code in TurfJS 5: CoordinateList.coordArrayType=new Array(0).fill(null);. We'll need to find an appropriate polyfill/shim for this and any other similar things we encounter.

Trace from landmarks

Not all viewers of this site might be from the area or have an address in mind.

The geocoder supports searching by place names, e.g., PNC Park, Cathedral of Learning, Pittsburgh Zoo, etc. We can update the search bar and docs to make it clear that's an option as well.

Trace comparison to Regionalization Extents

Goal: Display the calculated length of regionalized pipe in the trace. In most cases it would be 0; however, it would entice a user to question what it means.

This requires modification of 3RWW's network trace service, so that, in addition to the trace result geometry, it returns a summary of pipes within the trace that are also potentially going to be regionalized. Since the regionalization data changes frequently and is being managed in a separate database, the most straightforward way to identify this will be to implement some spatial intersects on the trace results with available regionalization data.

Since that kind of analysis will require more processing time, we'll turn that functionality in the trace service off by default (we don't need that for other applications that utilize the Sewer Atlas trace service), but call it for this app.

Order of municipalities from trace

The sort order of them munis in the results pop-up reflects the basic limitation of the underlying geometric network trace function used in ArcGIS Server: it returns traced records in "database order", not in trace order. There are a couple possible solutions to this:

Option 1: On the client-side, dissolve the trace results using TurfJS in a single line (as best as possible). Traverse vertices of that line top-to-bottom to get intersecting municipalities. (We have some of this code implemented currently).

Option 2: Do the same as Option 1, but on the server side withing the geoprocessing tool. Less work for the client.

Option 3: When publishing the version of the sewer network used for tracing, add a "stream order"-like attribute that can used either in the server-side geoprocessing tool to re-order trace results, or in the client-side trace post-processing steps to get the pipe's position in the network.

good search after bad search fails

When searching a workable address after having searched an unworkable address (address outside of the ALCOSAN boundary), the trace fails with an undefined error message. At that point, hitting "start over" and using the workable address again, the trace proceeds normally.

This may be a matter of ensuring proper resets are hit in the the unworkable address callback.

ArcGIS Server token request error handling with retry

Currently, if the application can't get a token from the ArcGIS Server endpoint (on ROK Tech), we only show a message to the effect of "couldn't get the token, sorry". It doesn't attempt to retry the request.
image

Since the problem is fairly rare, a short term solution is in cfe8ef7, which advises the end-user to refresh the browser window. This almost always works.

The real solution of course is to attempt to retry acquiring that token using a randomized and exponential back-off and retry approach.

More detailed trace information

User comment:

it would be interesting to know how far the waste flows before it reaches the CSO or before it reaches the interceptor system

Tasks for Public Beta

  • Legend: Enable popup when hovering over the “i” or have the legend shown in the lower right hand corner. Addressed with 3c433db
  • Enable a “cool facts” or “did you know?” popup about ALCOSAN so when user zoom onto the treatment plant, fun facts show. Addressed with 73f4f62
  • Have a disclosure at the bottom stating “Not for official use or planning”. Addressed with 0102f1f
  • Enable hyperlinks or popups so users can get information as to what Inch-Miles mean and what Regionalization means (“The transferring of ownership of trunk sewers, wet weather control facilities, and related infrastructure from customer municipalities to ALCOSAN.”
  • When a user zooms to a streets view or property view, popup disclosure stating “Not actual representation of sewer lateral connection”. At Open House, we observed a few users comments, “Hey, my line ties to the sewer in the back of the house not front”etc. Sewer laterals not shown; About/FAQ content addresses this question specifically
  • Regionalization: Display the calculated length of regionalized pipe in the trace. In most cases it would be 0; however, it would entice a user to question what it means. See Issue #4
  • Calculate approximate flow rate time to plant. Enable popup/hyperlink clearly disclosing the approximation and perhaps how it is calculated. This can be complicated- might have to work with the flow model.
  • If possible, enable a flushing sound when processing calculations.

Auto-zoom behavior on small screens

User comment:

the smaller version zooms out to full view after mapping the route. this is a bit confusing because the route is not entirely visible in the small window until you zoom in

Will investigate; not sure if this is a bug or an expectation about behavior. Either way, possible solution would be to disable zoom-to-extents behavior on small screens, using standard screen breakpoints.

Identify CSO in trace summary

The trace returns all pipes downstream of an address, including those in Combined Sewer Areas that encounter overflow splits and go towards either the plant or the river. We can test for when that happens, and call it out with a message like this:

"Uh-oh! It looks like your sewer connection flows to a Combined Sewer Outfall (CSO)! When it rains, there is a chance that your toilet flushes go straight into the river. Learn more about the combined sewer systems in our region, why they exist, and what ALCOSAN is doing to address them and this sort of problem here.

(something like that)

...with links out to the various 3RWW and ALCOSAN web resources on the topic.

Trace Results modal action needs to close any other modals, nav

Before the Trace Results modal appears, any other open modals need to be automatically closed (the About modal) and the navigation should be collapsed (if already collapsed, which would only be the case on a mobile device). Otherwise, expect weird behavior!

Composite Sewer Atlas layer

Need a single, composite, cached version of the sewer atlas--pipes and structures--that works nicely at various scales and works with the black background of this map.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.