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

Incorrect shapes returned by rapid watershed delineation (RWD) #3562

Open
SRGDamia1 opened this issue Sep 9, 2022 · 2 comments
Open

Incorrect shapes returned by rapid watershed delineation (RWD) #3562

SRGDamia1 opened this issue Sep 9, 2022 · 2 comments

Comments

@SRGDamia1
Copy link
Member

Incorrect shapes are being returned by the RWD (watershed) endpoint.

Ex:
Delineating the point 40.54472997284455,-75.18346667289734

curl "https://staging.modelmywatershed.org/api/watershed/" -X POST -H "Authorization: Token xxxx" --data-raw "{""location"":[40.554462,-75.18302],""snappingOn"":true,""dataSource"":""drb""}"

returns the job result

{"input_pt": {"geometry": {"coordinates": [-75.182899, 40.554491], "type": "Point"}, "properties": {"Dist_moved": 1, "ID": 1, "Lat": 40.554462, "Lon": -75.18302}, "type": "Feature"}, "watershed": {"geometry": {"coordinates": [[[-75.17563, 40.555926], [-75.174982, 40.555741], [-75.174797, 40.555926], [-75.174149, 40.555926], [-75.173779, 40.555648], [-75.173316, 40.555648], [-75.171186, 40.554259], [-75.170538, 40.554352], [-75.169519, 40.553426], [-75.168038, 40.553611], [-75.167482, 40.553333], [-75.166186, 40.553333], [-75.165816, 40.553611], [-75.165353, 40.553611], [-75.165075, 40.553889], [-75.165075, 40.554167], [-75.164519, 40.554444], [-75.16239, 40.554444], [-75.161927, 40.55463], [-75.161464, 40.55463], [-75.161371, 40.554444], [-75.161186, 40.554444], [-75.160353, 40.554537], [-75.16026, 40.554722], [-75.158223, 40.554815], [-75.157945, 40.554444], [-75.156464, 40.554259], [-75.156279, 40.553981], [-75.155908, 40.553981], [-75.15563, 40.553796], [-75.154982, 40.553704], [-75.154519, 40.553981], [-75.154705, 40.553519], [-75.154705, 40.553333], [-75.154519, 40.553241], [-75.154705, 40.5525], [-75.154612, 40.552037], [-75.15489, 40.551852], [-75.155445, 40.551852], [-75.156093, 40.551481], [-75.156927, 40.551389], [-75.157019, 40.551204], [-75.15776, 40.551111], [-75.157853, 40.550926], [-75.158038, 40.550926], [-75.15813, 40.550648], [-75.158408, 40.550648], [-75.158593, 40.55037], [-75.158964, 40.55037], [-75.158964, 40.550185], [-75.159242, 40.550093], [-75.159242, 40.549815], [-75.159982, 40.54963], [-75.160167, 40.549259], [-75.161093, 40.549352], [-75.161464, 40.549074], [-75.161464, 40.548889], [-75.161834, 40.548889], [-75.161742, 40.548704], [-75.162112, 40.548704], [-75.161927, 40.5475], [-75.162019, 40.546944], [-75.161742, 40.546944], [-75.161556, 40.546481], [-75.161742, 40.546481], [-75.161649, 40.546111], [-75.162019, 40.546111], [-75.162205, 40.545741], [-75.161927, 40.545741], [-75.161834, 40.545556], [-75.161464, 40.545648], [-75.161279, 40.545463], [-75.161279, 40.545278], [-75.161464, 40.545185], [-75.161279, 40.54463], [-75.161742, 40.544352], [-75.162019, 40.543889], [-75.162297, 40.543796], [-75.162297, 40.543426], [-75.162482, 40.543241], [-75.16313, 40.543241], [-75.163501, 40.543519], [-75.163871, 40.543333], [-75.164056, 40.542963], [-75.164427, 40.54287], [-75.164334, 40.542407], [-75.164519, 40.542315], [-75.164519, 40.542037], [-75.164705, 40.542037], [-75.164705, 40.541667], [-75.164982, 40.541574], [-75.164982, 40.541111], [-75.165538, 40.541389], [-75.166556, 40.541296], [-75.167019, 40.541481], [-75.16776, 40.541204], [-75.167945, 40.541852], [-75.16813, 40.541852], [-75.168038, 40.542222], [-75.168316, 40.542222], [-75.168501, 40.5425], [-75.168964, 40.5425], [-75.169612, 40.54287], [-75.170445, 40.54287], [-75.170538, 40.543056], [-75.170816, 40.543056], [-75.171093, 40.543333], [-75.171464, 40.543333], [-75.171556, 40.543519], [-75.172205, 40.543519], [-75.172945, 40.544167], [-75.173038, 40.544444], [-75.173223, 40.544444], [-75.173223, 40.544722], [-75.173501, 40.545], [-75.173686, 40.544815], [-75.174334, 40.544815], [-75.174334, 40.545], [-75.174519, 40.545093], [-75.17489, 40.545], [-75.17526, 40.545278], [-75.176001, 40.545278], [-75.176093, 40.545463], [-75.176464, 40.545463], [-75.176834, 40.545833], [-75.177019, 40.545833], [-75.177482, 40.546574], [-75.178038, 40.546389], [-75.178779, 40.546574], [-75.180075, 40.546481], [-75.181001, 40.545556], [-75.181742, 40.545463], [-75.182482, 40.545093], [-75.18239, 40.544815], [-75.182575, 40.544722], [-75.182853, 40.544074], [-75.184056, 40.543611], [-75.18739, 40.543519], [-75.18989, 40.543704], [-75.18989, 40.543519], [-75.191556, 40.543426], [-75.191927, 40.543796], [-75.192297, 40.543796], [-75.192482, 40.544074], [-75.194242, 40.544074], [-75.19563, 40.545463], [-75.19563, 40.546019], [-75.196927, 40.546296], [-75.196927, 40.546481], [-75.197853, 40.546296], [-75.199334, 40.546481], [-75.199242, 40.546667], [-75.199519, 40.546759], [-75.199519, 40.547222], [-75.19989, 40.5475], [-75.199797, 40.548333], [-75.199982, 40.548426], [-75.199982, 40.548796], [-75.200167, 40.548889], [-75.200167, 40.549074], [-75.201001, 40.549722], [-75.201556, 40.549722], [-75.201093, 40.549907], [-75.201001, 40.550093], [-75.200816, 40.549907], [-75.199982, 40.549907], [-75.19989, 40.549722], [-75.199612, 40.549722], [-75.19813, 40.550185], [-75.197945, 40.55], [-75.19739, 40.550185], [-75.196834, 40.549815], [-75.195908, 40.549722], [-75.193223, 40.549907], [-75.192575, 40.550463], [-75.192019, 40.55037], [-75.191001, 40.551389], [-75.190723, 40.551389], [-75.190445, 40.551667], [-75.189705, 40.551667], [-75.189519, 40.551852], [-75.187945, 40.551667], [-75.187205, 40.55213], [-75.186186, 40.55213], [-75.186001, 40.551944], [-75.185353, 40.551852], [-75.18526, 40.551667], [-75.184612, 40.551667], [-75.184519, 40.55213], [-75.184056, 40.552222], [-75.183779, 40.5525], [-75.183779, 40.55287], [-75.183223, 40.553333], [-75.183223, 40.554352], [-75.182297, 40.555], [-75.181649, 40.554907], [-75.181464, 40.555093], [-75.181186, 40.555093], [-75.181186, 40.55537], [-75.179982, 40.555278], [-75.179519, 40.555648], [-75.175723, 40.555741], [-75.17563, 40.555926]]], "type": "Polygon"}, "properties": {"Area": 20.34667562, "AvgOLF": 0.184229641014657, "Avgslp": 0.115720748901367, "BR": 223.9205780029297, "BasinLen": 8.2393681640625, "DrnDen": 2.714004094271789, "GRIDCODE": 1, "RR": 0.027176911011338, "StrLen": 55.2209609375, "Strord": 5.0}, "type": "Feature"}}

The shape in the response looks like this:
image

Notice where the shape slices through the middle of the blue line in the south, cutting off a sizable upstream area.

Looking carefully at the RWD result, the shape properties give an area of 20.3 km^2. But the actual geojson shape that is returned (and fed further to analysis in the web app) only has an area of 3 km^3. There are 17 km^2 of the watershed missing.

@SRGDamia1
Copy link
Member Author

I've combed through the RWD task chain, and I believe the error is in the RWD code itself.

@SRGDamia1
Copy link
Member Author

This does not appear to be an issue with the delineation on the NHD medium resolution layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant