Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Subbasin NHD+ Table #2794

Merged
merged 7 commits into from Apr 24, 2018
Merged

Add Subbasin NHD+ Table #2794

merged 7 commits into from Apr 24, 2018

Commits on Apr 20, 2018

  1. Add Subbasin Catchments Endpoint

    Add an endpoint similar to the subbasin huc12s endpoint
    to fetch the id, area, shape, and streams for a set of
    catchment ids.
    
    GET
    /mmw/modeling/subbasins/catchments/?catchment_comids=%255B%25224780661%2522%252C%25224780663%2522%252C%25224780665%2522%252C%25224780751%2522%252C%25224782293%2522%252C%25224782295%2522%252C%25224782297%2522%252C%25224782307%2522%255D
    
    -- where `catchment_comids` is a urlencoded json array
    
    Response:
    [
        {
            "id": 423312 // comid
            "shape": { "type": "MultiPolygon", ...}, // catchment geojson
            "stream": { "type": "MultiLineString", ...}, // stream geojson
            "area": 4.3111 // area in hectares
        }, ...
    ]
    Alice Rottersman committed Apr 20, 2018
    Configuration menu
    Copy the full SHA
    2c461aa View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2018

  1. Fetch Subbasin Catchments If Needed

    When entering the HUC-12-level view, fetch
    the catchment details if they have not already
    been fetched. This provides us the catchment area to
    eventually calculate the rates, as well as the geometries.
    Alice Rottersman committed Apr 24, 2018
    Configuration menu
    Copy the full SHA
    5591554 View commit details
    Browse the repository at this point in the history
  2. Add Subbasin Catchment Table View

    Add template and view to display catchment loads for
    an active HUC-12 in subbasin view.
    Alice Rottersman committed Apr 24, 2018
    Configuration menu
    Copy the full SHA
    d782b2d View commit details
    Browse the repository at this point in the history
  3. Initialize Bootstrap Table On Render and On Attach

    The huc-12 totals table re-renders after the huc12 details
    change. After every re-render the bootstrap table must be
    reinitialized.
    Alice Rottersman committed Apr 24, 2018
    Configuration menu
    Copy the full SHA
    b5c95bb View commit details
    Browse the repository at this point in the history
  4. Add Subbasin Shapes Back To Map If In Huc-12 Mode

    Fix a bug where if you switched to Analyze or Model views
    while you were viewing a HUC-12 in subbasin mode, the shapes
    would not get re-added to the map after coming back to the subbasin
    view.
    Alice Rottersman committed Apr 24, 2018
    Configuration menu
    Copy the full SHA
    65af20d View commit details
    Browse the repository at this point in the history
  5. Fix Exit Subbasin View Shape-Clearing Bug

    Use the helper function to clear the subbasin shapes
    when exiting subbasin mode instead of clearing the collection.
    The helper function removes the map listeners, which would otherwise
    try to fire on removed layers.
    Alice Rottersman committed Apr 24, 2018
    Configuration menu
    Copy the full SHA
    6b6c32e View commit details
    Browse the repository at this point in the history
  6. Only show huc12 View if there's an active huc12

    The huc12 view should only be rendered if there's
    an active huc12 to populate it with.
    Alice Rottersman committed Apr 24, 2018
    Configuration menu
    Copy the full SHA
    a1d3403 View commit details
    Browse the repository at this point in the history