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

output hydrosequence for upstream main and downstream main queries #162

Open
jkreft-usgs opened this issue Jul 21, 2020 · 6 comments
Open
Milestone

Comments

@jkreft-usgs
Copy link

As a developer who wants to display the next upstream and downstream locations from NLDI, I want to get back the hydrosequence (A value from the NHDPlus assigned to each COMID) so that I can sort the response from the NLDI and determine the next upstream and downstream locations.

@dblodgett-usgs
Copy link
Member

Hydrosequence is a topological sort of the graph that connects things behind the scenes. So for single-path navigation results it is a pretty simple property that indicates the upstream (largest values) to downstream (smallest values) sort order. However, for UT and DD navigations, all it indicates is that if you traverse the data in hydrosequence order, you will encounter things in upstream to downstream order -- NOT that things are physically up/downstream of eachother.

As long as we are ok with this distinction, I'm happy to include the hydrosequence and leave it up to the client to know if they are holding data that lies on a single path or data that includes many paths that can't be disambiguated without additional information.

The other option (and frankly the one I prefer) is to add a list of optional additional parameters that can be added to the response. Hydrosequence and streamorder come to mind but there are a number of others that would be useful for various use cases and easy enough to add.

Another option (if the queries work this way) would be to just inherently sort the whole database by Hydrosequence such that when a query comes back it is already in hydrosequence order. That way the ordering of everything would just be upstream-downstream.

@jkreft-usgs
Copy link
Author

I like the idea of having these kinds of additional metadata being requested as boolean parameters, so that users can make use of them if they want to and have the knowledge capacity to deal with them. Otherwise they are just cruft.

@mneilson-usgs
Copy link

Adding in another potential use case for additional parameters: the NAS Database tracks sightings of introduced aquatic species, and it would benefit us to be able to use standardized names from NHDPlus for info and analyses (e.g., infested waterbody lists for specific states). GNIS_ID, GNIS_NAME, StreamLevel, and StreamOrder would be of interest for our program.

@mneilson-usgs
Copy link

Getting GNIS_NAME and GNIS_ID from the waterbodies layer #29 would also be helpful

@dblodgett-usgs dblodgett-usgs added this to the Summer 2021 milestone Jun 22, 2021
@Markweese
Copy link

Markweese commented Jan 14, 2022

data that lies on a single path or data that includes many paths that can't be disambiguated without additional information

I'm not sure if this is related, but when I query for upstream flowlines and render them in the order they were returned, there are seemingly multiple lines along the stream (image attached). Downstream flowlines render without the 'noise' around the main stream. Am I parsing the response incorrectly, or is this expected? Any tips on how to pull out only the main stream line would be greatly appreciated!

My apologies if this is the wrong channel to surface questions such as this, if there is somewhere else you would like me to direct questions, please let me know.
Screen Shot 2022-01-13 at 11 53 44 PM

@dblodgett-usgs
Copy link
Member

Hi @Markweese -- this is a fine place to pose your question.

I think you may be parsing the geojson wrong. Try pasting the web service response in here to check?

https://geojson.io

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

4 participants