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 MapShed Endpoint to Geoprocessing API #3480

Merged
merged 5 commits into from
Feb 18, 2022

Conversation

rajadain
Copy link
Member

@rajadain rajadain commented Feb 11, 2022

Overview

Adds a new endpoint in the geoprocessing API to start a MapShed / GWLF-E Preparation job that takes an area of interest or a WKAoI, a set of optional layer overrides, and generates an input for GWLF-E, which will be consumed by the endpoint made for #3473.

This does not remove the existing internal API, which will continue to be used until the front-end switches to using the new APIs in #3475.

While I initially named the endpoint /modeling/mapshed, I ended up going with /modeling/gwlf-e/prepare/. This is because:

  1. GWLF-E is likely a more recognized term than MapShed, which was the Windows-based tool used to run the model previously
  2. Having the other endpoint be /modeling/gwlf-e/run/ will pair the two endpoints in a semantic manner that mapshed would not have

Also, this endpoint takes a more complex payload, described in MODELING_INPUT, than the simple GeoJSON taken by the /analyze/ endpoints. This is because of the need to specify layer overrides, and perhaps even more modifiers in the future.

The LAYER_OVERRIDES definition only documents the __LAND__ and __STREAMS__ layers, since they are the only ones with viable alternatives.

The result object is not documented, because:

  1. It has 500+ fields and would be a massive undertaking to document, is beyond the scope of this card
  2. Since it is to be used as-is, without modification, in the second endpoint, the lack of documentation is more tolerable

Connects #3472

Demo

Starting a MapShed job:

xh --verbose :8000/api/modeling/gwlf-e/prepare/ Authorization:"Token b0c671e1424f37e58c81670ce8118e8eff0f0c14" < test.json
POST /api/modeling/gwlf-e/prepare/ HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate, br
Authorization: Token b0c671e1424f37e58c81670ce8118e8eff0f0c14
Connection: keep-alive
Content-Length: 93
Content-Type: application/json
Host: localhost:8000
User-Agent: xh/0.13.0

{
    "wkaoi": "huc12__55174",
    "layer_overrides": {
        "__STREAMS__": "nhd"
    }
}



HTTP/1.1 200 OK
Allow: POST, OPTIONS
Connection: keep-alive
Content-Type: application/json
Date: Fri, 11 Feb 2022 21:12:01 GMT
Location: /api/jobs/401cd324-d6dc-4e39-84a0-ec2b2f6491cb/
Server: nginx
Transfer-Encoding: chunked
Vary: Accept-Encoding
Vary: Accept, Cookie, Origin

{
    "job": "401cd324-d6dc-4e39-84a0-ec2b2f6491cb",
    "status": "started"
}

Getting job results:

xh --verbose :8000/api/jobs/401cd324-d6dc-4e39-84a0-ec2b2f6491cb/ Authorization:"Token b0c671e1424f37e58c81670ce8118e8eff0f0c14"
GET /api/jobs/401cd324-d6dc-4e39-84a0-ec2b2f6491cb/ HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Authorization: Token b0c671e1424f37e58c81670ce8118e8eff0f0c14
Connection: keep-alive
Host: localhost:8000
User-Agent: xh/0.13.0

HTTP/1.1 200 OK
Allow: OPTIONS, GET
Connection: keep-alive
Content-Type: application/json
Date: Fri, 11 Feb 2022 21:14:45 GMT
Server: nginx
Transfer-Encoding: chunked
Vary: Accept-Encoding
Vary: Accept, Cookie, Origin

{
    "job_uuid": "401cd324-d6dc-4e39-84a0-ec2b2f6491cb",
    "status": "complete",
    "result": {
        "NRur": 10,
        "NUrb": 6,
        "TranVersionNo": "1.4.0",
        "SeepCoef": 0,
        "UnsatStor": 10,
        "SatStor": 0,
        "InitSnow": 0,
        "TileDrainRatio": 0,
        "TileDrainDensity": 0,
        "ETFlag": "<Hamon method>",
        "AntMoist": [0, 0, 0, 0, 0],
        "StreamWithdrawal": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        "GroundWithdrawal": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        "PcntET": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
        "Landuse": ["<Hay/Past>", "<Cropland>", "<Forest>", "<Wetland>", "<Disturbed>", "<Turfgrass>", "<Open_Land>", "<Bare_Rock>", "<Sandy_Areas>", "<Unpaved_Road>", "<Ld_Mixed>", "<Md_Mixed>", "<Hd_Mixed>", "<Ld_Residential>", "<Md_Residential>", "<Hd_Residential>"],
        "Imper": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.35, 0.65, 0.9, 0.1, 0.52, 0.87],
        "C": [0.029675159158769938, 0.24983757957938504, 0.002, 0.01, 0.08, 0.03, 0.04, 0.001, 0.01, 0.8, 0, 0, 0, 0, 0, 0],
        "CNI": [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 98, 98, 92, 92, 92], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ],
        "CNP": [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 79, 79, 74, 74, 74], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ],
        "TotSusSolids": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, 70, 80, 90, 100, 110],
        "PhysFlag": "<No>",
        "PointFlag": "<Yes>",
        "SeptSysFlag": "<No>",
        "CountyFlag": "<No>",
        "SoilPFlag": "<Yes>",
        "GWNFlag": "<Yes>",
        "SedAAdjust": 0.8,
        "BankNFrac": 0.25,
        "BankPFrac": 0.25,
        "ManuredAreas": 2,
        "FirstManureMonth": 0,
        "LastManureMonth": 0,
        "FirstManureMonth2": 0,
        "LastManureMonth2": 0,
        "NitrConc": [0.75, 2.9, 0.19, 0.19, 0.02, 2.5, 0.5, 0.3, 0.1, 0.19, 0, 0, 0, 0, 0, 0],
        "Nqual": 3,
        "Contaminant": ["Nitrogen", "Phosphorus", "Sediment"],
        "LoadRateImp": [ [], [], [], [], [], [], [], [], [], [], [0.095, 0.0095, 2.8], [0.105, 0.0105, 6.2], [0.11, 0.0115, 2.8], [0.095, 0.0095, 2.5], [0.1, 0.0115, 6.2], [0.105, 0.012, 5] ],
        "LoadRatePerv": [ [], [], [], [], [], [], [], [], [], [], [0.015, 0.0021, 0.8], [0.015, 0.0021, 0.8], [0.015, 0.0021, 0.8], [0.015, 0.0019, 1.3], [0.015, 0.0039, 1.1], [0.015, 0.0078, 1.5] ],
        "DisFract": [ [], [], [], [], [], [], [], [], [], [], [0.33, 0.4, 0], [0.33, 0.4, 0], [0.33, 0.4, 0], [0.28, 0.37, 0], [0.28, 0.37, 0], [0.28, 0.37, 0] ],
        "UrbBMPRed": [ [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0] ],
        "SepticFlag": "<Yes>",
        "NumPondSys": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        "NumShortSys": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        "NumDischargeSys": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        "NumSewerSys": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        "NitrSepticLoad": 12,
        "PhosSepticLoad": 2.5,
        "NitrPlantUptake": 1.6,
        "PhosPlantUptake": 0.4,
        "TileNconc": 15,
        "TilePConc": 0.1,
        "TileSedConc": 50,
        "n1": 0,
        "n2": 0,
        "n2b": 0,
        "n2c": 0,
        "n2d": 0,
        "n3": 0,
        "n4": 0,
        "n5": 0,
        "n6": 0,
        "n6b": 0,
        "n6c": 0,
        "n6d": 0,
        "n7": 0,
        "n7b": 0,
        "n8": 0,
        "n9": 0,
        "n10": 0,
        "n11": 0,
        "n12": 0,
        "n13": 0,
        "n13b": 0,
        "n13c": 0,
        "n13d": 0,
        "n14": 0,
        "n14b": 0,
        "n15": 0,
        "n16": 0,
        "n17": 0,
        "n18": 0,
        "n19": 0,
        "n20": 0,
        "n21": 0,
        "n22": 0,
        "n23c": 5,
        "n24c": 3,
        "n24d": 6,
        "n24e": 6,
        "n25": 0,
        "n25b": 0,
        "n25c": 0,
        "n25d": 0,
        "n25e": 0,
        "n26": 0,
        "n26b": 0,
        "n26c": 0,
        "n27": 0,
        "n27b": 0,
        "n28": 0,
        "n28b": 0,
        "n29": 0,
        "n30": 0,
        "n30b": 0,
        "n30c": 0,
        "n30d": 0,
        "n30e": 0,
        "n31": 0,
        "n31b": 0,
        "n31c": 0,
        "n32": 0,
        "n32b": 0,
        "n32c": 0,
        "n32d": 0,
        "n33": 0,
        "n33b": 0,
        "n33c": 0,
        "n33d": 0,
        "n34": 0,
        "n35": 0,
        "n35b": 0,
        "n36": 0,
        "n37": 0,
        "n38": 0,
        "n38b": 0,
        "n39": 0,
        "n40": 0,
        "n41b": 0,
        "n41c": 0,
        "n41d": 0,
        "n41e": 0,
        "n41f": 0,
        "n41g": 0,
        "n41h": 0,
        "n41i": 0,
        "n42c": 0,
        "n43": 0,
        "GRLBN": 0,
        "NGLBN": 0,
        "GRLBP": 0,
        "NGLBP": 0,
        "NGLManP": 0,
        "NGLBFC": 0,
        "GRLBFC": 0,
        "GRSFC": 0,
        "GRSN": 0,
        "GRSP": 0,
        "n43b": 0,
        "n43c": 0,
        "n43d": 0,
        "n43e": 0,
        "n43f": 0,
        "n43g": 0,
        "n43h": 0,
        "n43i": 0,
        "n43j": 0,
        "n44": 0,
        "n44b": 0,
        "n45": 0,
        "n45b": 0,
        "n45c": 0,
        "n45d": 0,
        "n45e": 0,
        "n45f": 0,
        "n46": 0,
        "n46b": 0,
        "n46c": 0,
        "n46d": 0,
        "n46g": 0,
        "n46h": 0,
        "n46i": 0,
        "n46j": 0,
        "n46k": 0,
        "n46l": 0,
        "n46m": 0,
        "n46n": 0,
        "n46o": 0,
        "n46p": 0,
        "n47": 0,
        "n48": 0,
        "n49": 0,
        "n50": 0,
        "n51": 0,
        "n52": 0,
        "n53": 0,
        "n54": 0,
        "n55": 0,
        "n56": 0,
        "n57": 0,
        "n58": 0,
        "n59": 0,
        "n60": 0,
        "n61": 0,
        "n62": 0,
        "n63": 0.4,
        "n64": 0.41,
        "n65": 0.08,
        "n66": 0.66,
        "n66b": 0.05,
        "n67": 0,
        "n68": 0.95,
        "n68b": 0.3,
        "n69": 0.56,
        "n69b": 0.2,
        "n69c": 0.95,
        "n70": 0.29,
        "n70b": 0.25,
        "n71": 0.5,
        "n71b": 0.28,
        "n72": 0.4,
        "n73": 0.22,
        "n74": 0.1,
        "n74b": 0.1,
        "n75": 0,
        "n76": 0.95,
        "n76b": 0.3,
        "n77": 0.78,
        "n77b": 0.45,
        "n77c": 0.95,
        "n78": 0.44,
        "n78b": 0.35,
        "n79": 0.35,
        "n79b": 0.44,
        "n79c": 0.63,
        "n80": 0.53,
        "n81": 0.3,
        "n82": 0.17,
        "n82b": 0.16,
        "n83": 0,
        "n84": 0.95,
        "n84b": 0.38,
        "n85": 0.76,
        "n85b": 0.6,
        "n85c": 0.55,
        "n85d": 0.95,
        "n85e": 0.02,
        "n85f": 0.0035,
        "n85g": 2.55,
        "n85h": 0.75,
        "n85i": 0.75,
        "n85j": 0.14,
        "n85k": 0.14,
        "n85l": 0.15,
        "n85m": 0.15,
        "n85n": 0.21,
        "n85o": 0.7,
        "n85p": 1,
        "n85q": 0.85,
        "n85r": 0.14,
        "n85s": 0.15,
        "n85t": 0.71,
        "n85u": 0.82,
        "n85v": 0.71,
        "Qretention": 0,
        "FilterWidth": 0,
        "Capacity": 0,
        "BasinDeadStorage": 0,
        "BasinArea": 0,
        "DaysToDrain": 0,
        "CleanMon": 0,
        "PctAreaInfil": 0,
        "PctStrmBuf": 0,
        "UrbBankStab": 0,
        "ISRR": [0, 0, 0, 0, 0, 0],
        "ISRA": [0, 0, 0, 0, 0, 0],
        "SweepType": "<Mechanical>",
        "UrbSweepFrac": 1,
        "StreetSweepNo": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        "n108": 0,
        "n109": 0,
        "n110": 0,
        "n111": 0,
        "n111b": 0,
        "n111c": 0,
        "n111d": 0,
        "n112": 0,
        "n112b": 0,
        "n112c": 0,
        "n112d": 0,
        "n113": 0,
        "n113b": 0,
        "n113c": 0,
        "n113d": 0,
        "n114": 0,
        "n115": 0,
        "n115b": 0,
        "n116": 0,
        "n116b": 0,
        "n117": 0,
        "n118": 0,
        "n119": 0,
        "n120": 0,
        "n121": 0,
        "n122": 0,
        "n123": 0,
        "n124": 0,
        "n125": 0,
        "n126": 0,
        "n127": 0,
        "n128": 0,
        "n129": 0,
        "n130": 0,
        "n131": 0,
        "n132": 0,
        "n133": 0,
        "n134": 0,
        "n135": 0,
        "n136": 0,
        "n137": 0,
        "n138": 0,
        "n139": 0,
        "n140": 0,
        "n141": 0,
        "n142": 0,
        "n143": 0,
        "n144": 0,
        "n145": 0,
        "n146": 0,
        "n147": 0,
        "n148": 0,
        "n149": 0,
        "n150": 0,
        "n151": 0,
        "InitNgN": 2373,
        "InitNgP": 785,
        "InitNgFC": 3380000000,
        "NGAppSum": 0.55,
        "NGBarnSum": 0.28,
        "NGTotSum": 0.83,
        "InitGrN": 2373,
        "InitGrP": 785,
        "InitGrFC": 3380000000,
        "GRAppSum": 0.52,
        "GRBarnSum": 0.18,
        "GRTotSum": 1,
        "AnimalFlag": "<Yes>",
        "WildOrgsDay": 500000000,
        "WildDensity": 25,
        "WuDieoff": 0.9,
        "UrbEMC": 9600,
        "SepticOrgsDay": 2000000000,
        "SepticFailure": 0,
        "WWTPConc": 200,
        "InstreamDieoff": 0.5,
        "AWMSGrPct": 0,
        "AWMSNgPct": 0,
        "RunContPct": 0,
        "PhytasePct": 0,
        "AnimalName": ["Dairy Cows", "Beef Cows", "Broilers", "Layers", "Hogs/Swine", "Sheep", "Horses", "Turkeys", "Other"],
        "NumAnimals": [0, 0, 99, 0, 3, 1, 28, 0, 0],
        "GrazingAnimal": ["<Yes>", "<Yes>", "<No>", "<No>", "<No>", "<Yes>", "<Yes>", "<No>", "<No>"],
        "AvgAnimalWt": [640, 360, 0.9, 1.8, 61, 50, 500, 6.8, 0],
        "AnimalDailyN": [0.44, 0.31, 1.07, 0.85, 0.48, 0.37, 0.28, 0.59, 0],
        "AnimalDailyP": [0.07, 0.09, 0.3, 0.29, 0.15, 0.1, 0.06, 0.2, 0],
        "FCOrgsPerDay": [100000000000, 100000000000, 140000000, 140000000, 11000000000, 12000000000, 420000000, 95000000, 0],
        "Month": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
        "NGPctManApp": [0.01, 0.01, 0.15, 0.1, 0.05, 0.03, 0.03, 0.03, 0.11, 0.1, 0.1, 0.08],
        "NGAppNRate": [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05],
        "NGAppPRate": [0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07],
        "NGAppFCRate": [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12],
        "NGPctSoilIncRate": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        "NGBarnNRate": [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2],
        "NGBarnPRate": [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2],
        "NGBarnFCRate": [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12],
        "PctGrazing": [0.02, 0.02, 0.1, 0.25, 0.5, 0.5, 0.5, 0.5, 0.5, 0.4, 0.25, 0.1],
        "PctStreams": [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05],
        "GrazingNRate": [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05],
        "GrazingPRate": [0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07],
        "GrazingFCRate": [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12],
        "GRPctManApp": [0.01, 0.01, 0.1, 0.05, 0.05, 0.03, 0.03, 0.03, 0.11, 0.06, 0.02, 0.02],
        "GRAppNRate": [0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05],
        "GRAppPRate": [0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07],
        "GRAppFCRate": [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12],
        "GRPctSoilIncRate": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
        "GRBarnNRate": [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2],
        "GRBarnPRate": [0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2],
        "GRBarnFCRate": [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12],
        "ShedAreaDrainLake": 0,
        "RetentNLake": 0.12,
        "RetentPLake": 0.29,
        "RetentSedLake": 0.84,
        "AttenFlowDist": 0,
        "AttenFlowVel": 4,
        "AttenLossRateN": 0.287,
        "AttenLossRateP": 0.226,
        "AttenLossRateTSS": 0,
        "AttenLossRatePath": 0,
        "StreamFlowVolAdj": 1,
        "watershed_id": null,
        "DayHrs": [9.4, 10.4, 11.8, 13.2, 14.3, 14.8, 14.6, 13.6, 12.2, 10.8, 9.7, 9.2],
        "WeatherStations": [ {"station": 13739, "distance": 0}, {"station": 13781, "distance": 37739.75691360847} ],
        "Grow": ["<Non-growing season>", "<Non-growing season>", "<Non-growing season>", "<Growing season>", "<Growing season>", "<Growing season>", "<Growing season>", "<Growing season>", "<Growing season>", "<Non-growing season>", "<Non-growing season>", "<Non-growing season>"],
        "Acoef": [0.091, 0.091, 0.091, 0.26, 0.26, 0.26, 0.26, 0.26, 0.26, 0.091, 0.091, 0.091],
        "WxYrBeg": 1961,
        "WxYrEnd": 1990,
        "WxYrs": 30,
        "AEU": 0.0007084943035853231,
        "n41j": 15,
        "n41k": 0,
        "n41l": 15,
        "ManNitr": [2.44, 2.44],
        "ManPhos": [0.38, 0.38],
        "StreamLength": 28931,
        "n42b": 28.9,
        "PointNitr": [782.6575974663439, 782.6575974663439, 782.6575974663439, 782.6575974663439, 782.6575974663439, 782.6575974663439, 782.6575974663439, 782.6575974663439, 782.6575974663439, 782.6575974663439, 782.6575974663439, 782.6575974663439],
        "PointPhos": [3381.8640528175874, 3381.8640528175874, 3381.8640528175874, 3381.8640528175874, 3381.8640528175874, 3381.8640528175874, 3381.8640528175874, 3381.8640528175874, 3381.8640528175874, 3381.8640528175874, 3381.8640528175874, 3381.8640528175874],
        "PointFlow": [1.2429635201090756, 1.1226767278404555, 1.2429635201090756, 1.202867922686202, 1.2429635201090756, 1.202867922686202, 1.2429635201090756, 1.2429635201090756, 1.202867922686202, 1.2429635201090756, 1.202867922686202, 1.2429635201090756],
        "Temp": [
            [
                [  3.8888888888888888,   0.000000000000000,  0.000000000000000, -3.888888888888889, -2.500000000000000,  2.2222222222222223,  3.8888888888888888,  2.5000000000000000, -3.8888888888888888, -2.7777777777777777,  0.0000000000000000,  1.6666666666666667,  1.6666666666666667,  5.5555555555555554,  2.5000000000000000, -1.1111111111111112,  1.1111111111111112,  3.333333333333333, -4.4444444444444446, -9.4444444444444446, -11.1111111111111107, -12.5000000000000000, -10.000000000000000, -8.3333333333333339, -12.777777777777779, -10.000000000000000, -9.4444444444444446, -11.6666666666666661,     -8.3333333333333339,     -8.333333333333334,     -5.000000000000000 ],
                [ -7.5000000000000000, -13.888888888888889, -7.500000000000000,  0.000000000000000, -2.500000000000000, -3.8888888888888888, -2.7777777777777777, -1.1111111111111112,  1.6666666666666667,  2.5000000000000000, -0.5555555555555556, -2.2222222222222223,  0.5555555555555556,  3.3333333333333330,  2.2222222222222223,  1.6666666666666667,  0.0000000000000000,  6.111111111111111, 10.0000000000000000,  2.5000000000000000,   2.2222222222222223,   3.8888888888888888,   6.111111111111111,  8.8888888888888893,  11.111111111111111,   6.111111111111111,  8.3333333333333339,   4.4444444444444446, -55572.7777777777810115, -55572.777777777781012, -55572.777777777781012 ],
                [  2.2222222222222223,   5.555555555555555,  8.888888888888889,  9.444444444444445, 12.222222222222221,  8.3333333333333339, 10.5555555555555554,  3.3333333333333330,  2.5000000000000000, -0.5555555555555556,  1.1111111111111112,  6.6666666666666661,  4.4444444444444446,  4.4444444444444446,  7.2222222222222223,  4.4444444444444446, -1.6666666666666667,  0.000000000000000,  2.5000000000000000,  5.5555555555555554,   3.3333333333333330,   3.0555555555555554,   3.333333333333333,  6.6666666666666661,   7.500000000000000,   8.333333333333334, 11.9444444444444446,  15.0000000000000000,     12.5000000000000000,      8.055555555555555,      4.444444444444445 ],
                [  5.5555555555555554,   4.444444444444445,  6.666666666666666,  6.111111111111111,  7.777777777777778,  9.4444444444444446,  6.9444444444444446,  6.6666666666666661,  6.1111111111111107,  7.5000000000000000,  7.5000000000000000,  6.6666666666666661,  4.4444444444444446,  8.8888888888888893, 11.6666666666666661, 11.6666666666666661,  8.8888888888888893,  7.222222222222222,  7.5000000000000000,  7.7777777777777777,  11.1111111111111107,  16.1111111111111107,  16.111111111111111, 18.8888888888888893,  19.444444444444443,  16.111111111111111, 11.1111111111111107,  10.5555555555555554,     10.0000000000000000,      8.888888888888889, -55572.777777777781012 ],
                [ 11.6666666666666661,  11.111111111111111, 10.000000000000000, 10.555555555555555, 12.777777777777779, 11.1111111111111107, 15.0000000000000000, 19.4444444444444429, 20.5555555555555571, 17.2222222222222214, 13.8888888888888893, 15.5555555555555554, 17.2222222222222214, 19.4444444444444429, 18.8888888888888893, 20.0000000000000000, 15.5555555555555554, 13.888888888888889, 12.5000000000000000, 13.8888888888888893,  15.5555555555555554,  13.3333333333333339,  13.333333333333334, 16.1111111111111107,  20.000000000000000,  16.666666666666664,  8.3333333333333339,  15.0000000000000000,     16.1111111111111107,     12.777777777777779,     16.111111111111111 ],
                [ 21.1111111111111107,  25.555555555555557, 19.444444444444443, 17.777777777777779, 20.000000000000000, 21.6666666666666643, 20.5555555555555571, 20.5555555555555571, 22.5000000000000000, 23.8888888888888893, 23.8888888888888893, 24.4444444444444429, 27.2222222222222214, 23.3333333333333357, 16.1111111111111107, 16.6666666666666643, 17.7777777777777786, 20.000000000000000, 21.1111111111111107, 22.2222222222222214,  20.0000000000000000,  22.2222222222222214,  23.055555555555557, 20.0000000000000000,  20.555555555555557,  20.555555555555557, 16.6666666666666643,  19.4444444444444429,     21.6666666666666643,     26.111111111111111, -55572.777777777781012 ],
                [ 26.1111111111111107,  26.666666666666664, 23.333333333333336, 21.666666666666664, 21.666666666666664, 18.8888888888888893, 20.0000000000000000, 21.6666666666666643, 21.1111111111111107, 21.1111111111111107, 22.2222222222222214, 22.7777777777777786, 22.5000000000000000, 24.4444444444444429, 23.3333333333333357, 23.3333333333333357, 23.8888888888888893, 25.000000000000000, 26.1111111111111107, 25.5555555555555571,  27.2222222222222214,  27.7777777777777786,  27.222222222222221, 25.0000000000000000,  26.111111111111111,  25.555555555555557, 25.0000000000000000,  24.4444444444444429,     23.8888888888888893,     25.000000000000000,     26.111111111111111 ],
                [ 23.3333333333333357,  21.666666666666664, 22.777777777777779, 22.777777777777779, 22.222222222222221, 22.7777777777777786, 23.8888888888888893, 24.4444444444444429, 26.1111111111111107, 26.1111111111111107, 25.0000000000000000, 25.5555555555555571, 20.5555555555555571, 18.8888888888888893, 21.6666666666666643, 23.8888888888888893, 21.6666666666666643, 20.000000000000000, 20.0000000000000000, 19.4444444444444429,  20.5555555555555571,  22.7777777777777786,  21.666666666666664, 23.8888888888888893,  25.000000000000000,  23.888888888888889, 26.1111111111111107,  26.1111111111111107,     26.1111111111111107,     22.777777777777779,     23.888888888888889 ],
                [ 26.1111111111111107,  26.666666666666664, 25.000000000000000, 26.666666666666664, 27.777777777777779, 26.6666666666666643, 23.8888888888888893, 23.3333333333333357, 23.8888888888888893, 25.0000000000000000, 26.1111111111111107, 26.1111111111111107, 25.5555555555555571, 23.8888888888888893, 18.8888888888888893, 15.0000000000000000, 16.1111111111111107, 16.111111111111111, 18.3333333333333357, 20.5555555555555571,  22.5000000000000000,  23.8888888888888893,  24.444444444444443, 24.4444444444444429,  23.888888888888889,  20.000000000000000, 17.2222222222222214,  17.7777777777777786,     11.9444444444444446,     13.333333333333334, -55572.777777777781012 ],
                [ 15.5555555555555554,  17.222222222222221, 13.888888888888889, 10.000000000000000, 10.555555555555555, 15.5555555555555554, 17.5000000000000000, 17.7777777777777786, 17.7777777777777786, 18.0555555555555571, 17.7777777777777786, 17.5000000000000000, 17.7777777777777786, 13.3333333333333339,  7.7777777777777777,  8.3333333333333339, 11.1111111111111107, 14.444444444444445, 14.4444444444444446, 16.6666666666666643,  12.2222222222222214,  11.1111111111111107,   8.333333333333334,  7.7777777777777777,  12.500000000000000,  11.666666666666666,  7.5000000000000000,   7.5000000000000000,     12.2222222222222214,     15.555555555555555,     16.666666666666664 ],
                [ 12.5000000000000000,  10.555555555555555, 17.777777777777779, 18.888888888888889, 19.444444444444443, 15.5555555555555554, 10.0000000000000000,  5.0000000000000000,  2.5000000000000000,  1.6666666666666667,  2.2222222222222223,  9.4444444444444446, 13.3333333333333339, 15.0000000000000000, 11.6666666666666661,  9.4444444444444446, 10.0000000000000000,  3.333333333333333,  1.6666666666666667,  1.6666666666666667,   2.5000000000000000,   2.7777777777777777,   7.222222222222222,  9.4444444444444446,   7.222222222222222,   7.500000000000000,  5.5555555555555554,   0.5555555555555556,      1.6666666666666667,      2.500000000000000, -55572.777777777781012 ],
                [  3.3333333333333330,   3.888888888888889,  6.111111111111111,  5.000000000000000,  8.888888888888889,  1.6666666666666667,  2.5000000000000000, -1.6666666666666667, -2.5000000000000000,  0.0000000000000000,  3.3333333333333330,  5.5555555555555554,  0.5555555555555556, -2.7777777777777777, -2.5000000000000000, -5.5555555555555554,  0.5555555555555556,  2.500000000000000,  3.8888888888888888,  3.8888888888888888,   1.1111111111111112,  -1.6666666666666667,  -2.500000000000000, -1.6666666666666667,  -2.500000000000000,  -2.500000000000000,  1.1111111111111112,   0.0000000000000000,     -6.6666666666666661,     -6.666666666666666,     -3.333333333333333 ]
            ]
        ],
        "Prec": [
            [
                [ 2.832100000000000062, 0.00000000000000000, 0.0000000000000000, 0.0000, 0.000000000000000000, 0.000000000000000000, 0.0000, 0.0000000000000000, 0.000000000000000000, 0.000000000000000000, 0.000000000000000000, 0.0000, 0.000000000000000000, 0.0000000000000000, 1.676400000000000112, 0.012700000000000001, 0.000000000000000000, 0.0000000000000000, 1.739900000000000002, 0.6350000000000000, 0.000000000000000000, 0.0000000000000000, 0.114300000000000013, 0.10160000000000001, 0.0000000000000000, 0.508000000000000007, 0.000000000000000000, 0.00000000000000000,       0.0000,       0.000000000000000000,       0.0000000000000000 ],
                [ 0.012700000000000001, 0.00000000000000000, 1.2446000000000002, 2.1844, 0.000000000000000000, 0.000000000000000000, 0.0000, 0.8381999999999999, 0.000000000000000000, 0.000000000000000000, 0.012700000000000001, 0.2540, 0.000000000000000000, 0.0000000000000000, 0.000000000000000000, 0.012700000000000001, 0.025400000000000002, 0.8001000000000000, 0.000000000000000000, 0.0000000000000000, 0.025400000000000002, 1.2191999999999998, 0.558799999999999963, 0.00000000000000000, 0.9398000000000000, 0.012700000000000001, 0.000000000000000000, 0.58420000000000005, -253997.4600, -253997.459999999991850927, -253997.4599999999918509 ],
                [ 0.457199999999999995, 0.00000000000000000, 0.0000000000000000, 0.7239, 0.000000000000000000, 0.800100000000000033, 0.0000, 2.9082999999999997, 0.025400000000000002, 0.000000000000000000, 0.000000000000000000, 0.0000, 0.203199999999999992, 2.0573999999999999, 0.000000000000000000, 0.000000000000000000, 0.000000000000000000, 0.6858000000000000, 1.270000000000000018, 0.0000000000000000, 0.000000000000000000, 0.6604000000000000, 1.130300000000000082, 0.00000000000000000, 0.0000000000000000, 0.000000000000000000, 0.000000000000000000, 0.43179999999999996,       0.0000,       0.000000000000000000,       1.8034000000000001 ],
                [ 0.063500000000000001, 0.00000000000000000, 0.0000000000000000, 0.0000, 0.000000000000000000, 0.012700000000000001, 0.0000, 0.0000000000000000, 0.215900000000000009, 3.048000000000000043, 0.000000000000000000, 0.6858, 5.257799999999999585, 0.0000000000000000, 0.139700000000000019, 0.660400000000000098, 0.000000000000000000, 0.0381000000000000, 0.000000000000000000, 0.0000000000000000, 0.000000000000000000, 0.4064000000000000, 0.000000000000000000, 0.00000000000000000, 0.6350000000000000, 0.533400000000000096, 0.000000000000000000, 0.53340000000000010,       0.0889,       0.000000000000000000, -253997.4599999999918509 ],
                [ 0.660400000000000098, 0.11430000000000001, 0.0000000000000000, 0.0000, 0.000000000000000000, 0.596899999999999986, 0.6731, 0.0000000000000000, 0.685799999999999965, 0.000000000000000000, 0.800100000000000033, 0.1270, 0.038100000000000002, 0.0000000000000000, 0.000000000000000000, 0.762000000000000011, 0.000000000000000000, 0.0000000000000000, 0.050800000000000005, 0.0000000000000000, 0.063500000000000001, 0.0000000000000000, 0.000000000000000000, 0.00000000000000000, 0.0000000000000000, 2.489200000000000301, 0.127000000000000002, 0.00000000000000000,       0.2159,       0.000000000000000000,       0.0000000000000000 ],
                [ 0.000000000000000000, 0.00000000000000000, 0.1905000000000000, 0.0000, 0.000000000000000000, 0.063500000000000001, 0.0000, 0.0762000000000000, 1.066799999999999971, 0.698500000000000121, 0.000000000000000000, 0.0000, 0.000000000000000000, 1.8161000000000000, 0.012700000000000001, 0.000000000000000000, 0.000000000000000000, 0.0000000000000000, 0.000000000000000000, 0.0000000000000000, 1.346200000000000063, 0.5206999999999999, 0.088900000000000007, 0.48259999999999997, 0.3556000000000000, 0.025400000000000002, 0.939799999999999969, 0.00000000000000000,       0.0000,       0.000000000000000000, -253997.4599999999918509 ],
                [ 0.050800000000000005, 0.00000000000000000, 0.0381000000000000, 0.0000, 0.000000000000000000, 0.000000000000000000, 0.0000, 0.0000000000000000, 0.000000000000000000, 0.000000000000000000, 0.000000000000000000, 0.0000, 4.965700000000000003, 0.2667000000000000, 1.117599999999999927, 0.495300000000000018, 0.431800000000000017, 0.0000000000000000, 0.000000000000000000, 0.0000000000000000, 0.000000000000000000, 0.0000000000000000, 0.025400000000000002, 2.55269999999999975, 0.0381000000000000, 0.000000000000000000, 0.000000000000000000, 0.00000000000000000,       3.7338,       0.000000000000000000,       0.0000000000000000 ],
                [ 0.000000000000000000, 0.00000000000000000, 0.0635000000000000, 0.0000, 0.000000000000000000, 0.241300000000000014, 0.0000, 0.0000000000000000, 0.025400000000000002, 0.012700000000000001, 0.622299999999999964, 0.2286, 0.000000000000000000, 0.0000000000000000, 0.000000000000000000, 0.000000000000000000, 0.000000000000000000, 0.0000000000000000, 0.000000000000000000, 2.7050999999999998, 1.244600000000000151, 0.0000000000000000, 2.032000000000000028, 0.00000000000000000, 1.3207999999999998, 0.546100000000000030, 0.000000000000000000, 0.00000000000000000,       0.0635,       0.000000000000000000,       0.0000000000000000 ],
                [ 0.000000000000000000, 0.74929999999999997, 0.0000000000000000, 0.0000, 0.000000000000000000, 0.000000000000000000, 0.0000, 0.0000000000000000, 0.000000000000000000, 0.000000000000000000, 0.000000000000000000, 0.0000, 0.000000000000000000, 2.4130000000000003, 0.838200000000000056, 0.000000000000000000, 0.000000000000000000, 0.0000000000000000, 0.000000000000000000, 0.7365999999999999, 1.282699999999999951, 0.0000000000000000, 0.000000000000000000, 0.00000000000000000, 0.0000000000000000, 0.000000000000000000, 0.000000000000000000, 0.00000000000000000,       0.0000,       0.000000000000000000, -253997.4599999999918509 ],
                [ 0.000000000000000000, 1.04139999999999988, 0.7874000000000001, 0.0762, 0.000000000000000000, 0.000000000000000000, 0.0000, 0.0000000000000000, 0.000000000000000000, 0.000000000000000000, 0.000000000000000000, 0.0000, 0.000000000000000000, 1.3081000000000000, 0.000000000000000000, 0.000000000000000000, 0.000000000000000000, 0.0000000000000000, 0.000000000000000000, 0.0000000000000000, 1.206500000000000128, 0.2540000000000000, 0.000000000000000000, 0.00000000000000000, 0.0000000000000000, 0.012700000000000001, 0.000000000000000000, 0.00000000000000000,       0.0000,       0.025400000000000002,       0.0000000000000000 ],
                [ 0.000000000000000000, 0.00000000000000000, 0.0000000000000000, 0.0381, 0.012700000000000001, 0.000000000000000000, 1.1938, 0.0000000000000000, 0.000000000000000000, 0.000000000000000000, 0.000000000000000000, 0.0000, 0.000000000000000000, 0.7493000000000001, 0.000000000000000000, 0.787399999999999989, 0.088900000000000007, 0.0000000000000000, 0.000000000000000000, 1.0160000000000000, 0.000000000000000000, 0.0000000000000000, 0.000000000000000000, 1.75259999999999994, 0.0000000000000000, 0.000000000000000000, 0.012700000000000001, 0.00000000000000000,       0.0000,       0.000000000000000000, -253997.4599999999918509 ],
                [ 0.000000000000000000, 0.00000000000000000, 0.0000000000000000, 0.0000, 0.038100000000000002, 0.000000000000000000, 0.0000, 0.0000000000000000, 0.431800000000000017, 0.457199999999999995, 0.038100000000000002, 1.6637, 0.012700000000000001, 0.0000000000000000, 0.000000000000000000, 0.355600000000000027, 0.977899999999999991, 2.0446999999999997, 0.012700000000000001, 0.0000000000000000, 0.000000000000000000, 0.0000000000000000, 0.863599999999999923, 0.10160000000000000, 0.0000000000000000, 0.000000000000000000, 0.000000000000000000, 0.38100000000000001,       0.0000,       0.000000000000000000,       0.0000000000000000 ]
            ]
        ],
        "AgLength": 0,
        "UrbLength": 28931,
        "n42": 0,
        "n46e": 3.9211719817767654,
        "n46f": 5.107408883826879,
        "CN": [75, 82, 73, 87, 0, 0, 87, 87, 0, 0, 0, 0, 0, 0, 0, 0],
        "SedPhos": 702.0881355932204,
        "Area": [19.531572398312594, 4.500362303758663, 315.47539749348215, 125.38009378271632, 0, 0, 42.123391163181076, 6.3905144713373, 0, 0, 1020.1421270160135, 2460.7081004491615, 3335.8485540380707, 880.8109100916455, 0, 0],
        "PhosConc": [0.2764622881355932, 0.2764622881355932, 0.01, 0.01, 0.01, 1.52217074851999, 0.01, 0.01, 0.01, 0.01, 0, 0, 0, 0, 0, 0],
        "AgSlope3": 4.770384041984181,
        "AgSlope3To8": 2.970239120480717,
        "n41": 0.19850187265917604,
        "AvSlope": 2.708598957407307,
        "AvKF": 0.041529888439988824,
        "KF": [0.04628612149734886, 0.01905999978169285, 0.08901381492614746, 0.0010458505176378996, 0, 0, 0.028835581312474063, 0.055922335422832835, 0, 0, 0.07449951557197956, 0.038477696207372625, 0.020628080722413292, 0, 0, 0],
        "SedDelivRatio": 0.11972374125279198,
        "TotArea": 8567.879761141816,
        "GrNitrConc": 8.714170460479961,
        "GrPhosConc": 0.06670789571848966,
        "MaxWaterCap": 1.7660511808298869,
        "UrbAreaTotal": 7697.509691594892,
        "NumNormalSys": [5414, 5414, 5414, 5414, 5414, 5414, 5414, 5414, 5414, 5414, 5414, 5414],
        "KV": [0.7336239896628883, 0.7923139088359195, 0.8263540619562774, 0.8560898920777636, 0.8733366735482256, 0.8833398068010936, 0.8891416240877571, 0.8925066781140218, 0.8944584094492554, 0.8855978723120123, 0.8804587607724113, 0.8774780760794426],
        "n23": 4.500362303758663,
        "n23b": 880.8109100916455,
        "n24": 19.531572398312594,
        "n24b": 2460.7081004491615,
        "SedAFactor": 0.004258464104269981,
        "LS": [0.8820283465597613, 0.4569726138257634, 0.22450569506577475, 0.21903608212438547, 0, 0, 0.24544744890955333, 0.2220525935911708, 0, 0, 0.21985887010205032, 0.23850966770266996, 0.2488632623927896, 0.3260987322238475, 0, 0],
        "P": [0.9901624204206153, 0.8948025465403191, 0.45, 0.1, 0.1, 0.2, 0.45, 0.45, 0.45, 1, 0, 0, 0, 0, 0, 0],
        "SedNitr": 1056.3471074380166,
        "RecessionCoef": 0.04235508474576272
    },
    "error": "",
    "started": "2022-02-11T21:12:01.315066Z",
    "finished": "2022-02-11T21:12:02.499064Z"
}

Testing Instructions

  • Check out this branch and go to http://localhost:8000/
  • Log in, then go to your account and copy your API key:
    image
  • Log out of MMW
  • Go to http://localhost:8000/api/docs and click "Authorize"
  • Enter Token $YOUR_API_KEY in the box, and click "Authorize"
    image
  • Read the documentation for /modeling/gwlf-e/prepare/ endpoint
    • Ensure it makes sense
  • Submit a request with an area of interest
    • Ensure it works
  • Submit a request with a WKAoI
    • Ensure it works
  • Submit a request with layer overrides
    • Ensure it works

This very basic endpoint can take a GeoJSON shape or a WKAoI id
and starts a MapShed job, which can be queried using the returned
job id.

This endpoint currently does not support layer overrides. It is
also missing API documentation.
@rajadain rajadain added the DRWI Funding Source: Delaware River Watershed Initiative label Feb 11, 2022
Copy link
Member Author

@rajadain rajadain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments.

@@ -178,3 +178,61 @@
},
required=['location'],
)

nlcd_override_allowed_values = '", "'.join([
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently only used for generating the documentation. This should also be used for validating the input.

type=TYPE_OBJECT,
properties={
'area_of_interest': MULTIPOLYGON,
'wkaoi': Schema(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use a distinct definition here from this one, because that is for a query parameter, and here it is a JSON parameter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice clarification!

@@ -36,5 +36,7 @@
re_path(r'jobs/' + uuid_regex, get_job, name='get_job'),
re_path(r'modeling/worksheet/$', views.start_modeling_worksheet,
name='start_modeling_worksheet'),
re_path(r'modeling/gwlf-e/prepare/$', views.start_modeling_gwlfe_prepare,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the hyphenated form gwlf-e in the URL as that is standardized. See the repository https://github.com/WikiWatershed/gwlf-e and the pypi package https://pypi.org/project/gwlf-e/

from apps.modeling.serializers import AoiSerializer
from apps.modeling.views import _parse_input as _parse_modeling_input
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Importing from modeling.views is a little messy here. I expect that this will be removed once everything is moved to geoprocessing_api.

@rajadain rajadain force-pushed the tt/add-public-mapshed-endpoint branch from 2c75eb7 to 9547c49 Compare February 14, 2022 14:48
Copy link
Contributor

@emilyhu0106 emilyhu0106 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new endpoint works very well! I like your explanation about how this API link is chosen and it does make sense to have it as /modeling/gwlf-e/prepare/ instead of /mapshed/

Is the parameter model description automatically generated? I found it slightly confusing since both the "Area of Interest" and the "Layer Overrides" are big and bold but wkaoi is relatively small. The description you wrote definitely helped to clarify the parameters.
image

@simonkassel simonkassel self-assigned this Feb 16, 2022
@rajadain
Copy link
Member Author

Thanks for noting that Emily. I added a title to the WKAOI Schema definition to see if that would help in ea87fd1, but unfortunately it did not:

image

I think this is because both Area of Interest and Layer Overrides are complex objects, and can be expanded or collapsed using that big title, but since WKAoI is a simple string it doesn't get the same treatment.

It may be worthwhile to upgrade to a more recent version of our Swagger generating repo https://github.com/axnsan12/drf-yasg. I'll make a card for that.

Previously, all endpoints took a GeoJSON as the POST body, and
any additional parameters, e.g. layer name or WKAoI, were path
or query parameters.

However, for modeling, the requests are much more complex.
They may specify multiple layer overrides, HUC IDs, and other
modifications. To allow for this, we create a new MODELING_REQUEST
schema, which mimics the format used in the internal API, to
allow for such complex requests.

The Analyze endpoints will continue to use their simple forms.

This creates a disparity in the payloads / expected formats between
Analyze and Modeling. However, since there is only one existing
modeling endpoint (/modeling/worksheet/) and this is used internally,
making this switch will be minimally disruptive.
Although all the layers used in MMW can be overridden, only the
__LAND__ and __STREAMS__ layers have viable alternatives. Thus,
we only document support for those two here. When alternatives
are added for other layer types in the future, this documentation
should be expanded to include them.
Copy link
Contributor

@simonkassel simonkassel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working well for me! I tested with a variety of combinations of aois/wkaois and land overrides as well as no land overrides and everything returned results in the expected format.
Documentation looks good, the only thing I have to add to Emily's review is one question (inline comment) about the last line in the gwlf-e endpoint description

src/mmw/apps/geoprocessing_api/views.py Outdated Show resolved Hide resolved
@simonkassel simonkassel assigned rajadain and unassigned simonkassel Feb 16, 2022
GWLF-E is a more recognizable name for the general public
than MapShed. Also, grouping the two endpoints under one
path will improve the semantic linking of the two.

The other endpoint will be called gwlf-e/run.
@rajadain rajadain force-pushed the tt/add-public-mapshed-endpoint branch from ea87fd1 to ee5990d Compare February 18, 2022 14:58
@rajadain
Copy link
Member Author

Thanks for all reviews!! Will merge once green.

@rajadain rajadain merged commit 79cd1bd into develop Feb 18, 2022
@rajadain rajadain deleted the tt/add-public-mapshed-endpoint branch February 18, 2022 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DRWI Funding Source: Delaware River Watershed Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants