You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using streamstats to get different basin characteristics in watersheds in GA. If I understand correctly, there is a function within the package that determines the state the lat/long coordinate is in so it can make an API call with that rcode. However, I think that the rcode technically coincides with the streamgrid that the lat/long coordinate is near.
I found that the GA rcode garners a response but the FL one gives an error. In my mind I think one solution would be downloading all the stream grids for each state and then creating a polygon for each of those based on the extents. Those polygons would essentially be the states you would want those lat/long coordinates fall into and determine the rcode based off of.
As a test I ran the following code:
lat, lon = 30.43632736, -82.28711271
ws = streamstats.Watershed(lat=lat, lon=lon)
print(ws)
I got the following error:
RetryError: HTTPSConnectionPool(host='streamstats.usgs.gov', port=443): Max retries exceeded with url: /streamstatsservices/watershed.geojson?rcode=FL&xlocation=-82.28711271&ylocation=30.43632736&crs=4326&includeparameters=True&includeflowtypes=False&includefeatures=True&simplify=False (Caused by ResponseError('too many 500 error responses'))
Please disregard or correct me if I am incorrect!
The text was updated successfully, but these errors were encountered:
Description
I was using streamstats to get different basin characteristics in watersheds in GA. If I understand correctly, there is a function within the package that determines the state the lat/long coordinate is in so it can make an API call with that rcode. However, I think that the rcode technically coincides with the streamgrid that the lat/long coordinate is near.
See the stream grids here: https://streamstatsags.cr.usgs.gov/StreamGrids/directoryBrowsing.asp
What I Did
There was a particular lat/long coordinate that falls within Florida, but the streamgrid for Georgia actually extends down into this area of Florida.
To confirm this I tried running the coordinates through the StreamStats Service Documentation (https://streamstats.usgs.gov/docs/streamstatsservices/#/).
I tried both of the following REST Query URLs:
https://streamstats.usgs.gov/streamstatsservices/watershed.geojson?rcode=FL&xlocation=-82.12233534&ylocation=30.26887137&crs=4326&includeparameters=false&includeflowtypes=false&includefeatures=true&simplify=true
and:
https://streamstats.usgs.gov/streamstatsservices/watershed.geojson?rcode=GA&xlocation=-82.12233534&ylocation=30.26887137&crs=4326&includeparameters=false&includeflowtypes=false&includefeatures=true&simplify=true
I found that the GA rcode garners a response but the FL one gives an error. In my mind I think one solution would be downloading all the stream grids for each state and then creating a polygon for each of those based on the extents. Those polygons would essentially be the states you would want those lat/long coordinates fall into and determine the rcode based off of.
Please disregard or correct me if I am incorrect!
The text was updated successfully, but these errors were encountered: