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

Disconnected headwater subcatchments missed #1

Open
matt-s-gibbs opened this issue Jun 23, 2022 · 3 comments
Open

Disconnected headwater subcatchments missed #1

matt-s-gibbs opened this issue Jun 23, 2022 · 3 comments

Comments

@matt-s-gibbs
Copy link

Thanks for making this code available, it looks very useful. In the SQL query I think you also have to match the ExternalSegmentNoLink attribute, for the subcatchments that are outside the network links. Based on the example, in the attached image the selected polygon should be included (I think), and can be found matching ExternalSegmentNoLink=2784950, which matches the adjoining subcatchment that has been included.
GeofabricExternalLink

I also had trouble with larger catchment areas returning NULL, but if it turn on the --exclude_sinks switch it does return a polygon. So it must be caused by the ST_BuildArea or ST_ExteriorRing functions failing. For example, try and get the catchment contributing to Cotter Dam at 148.94,-35.32.

Thanks again,

@matt-s-gibbs
Copy link
Author

And sorry, I would try and submit a pull request with a fix, but the SQL query needed is a bit beyond me...

@amacd31
Copy link
Owner

amacd31 commented Jul 10, 2022

This is a tricky one. I've been able to reproduce both the problems described here with version 3 of the Geofabric, which I haven't worked with quite as much. I think both issues mentioned could do with addressing, so I've raised #2 on the null catchment issue to separate from the disconnected headwater issue.

I haven't been able to find any documentation on the external segment link and how it works. Looking at the data it seems like it should be possible to join subcatchments together with it. However, v2 of the geofabric doesn't have this field so it would be an incompatible change to add this capability. Also it would require a completely different approach to the current implementation. Unfortunately I haven't been able to work out a solution to this in the time I've been able to spend looking into the problem. Hopefully I'll get there eventually, but it might take awhile.

@matt-s-gibbs
Copy link
Author

Thanks for taking a detailed look. If I come up with anything in the mean time I'll share it as well. I haven't seen any suitable tools for creating sub-catchments with v3 which is a shame!

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

2 participants