Summary
I'm currently trying to make a subset of the hydrofabric for some routing code and noticed the downstream-most divide is missing from the divide-attributes layer.
My suspicion is the origin is not included when running the query for the divide-attributes.
I've run this with a few different attributes and am always finding the downstream-most catchment/divide missing.
Reproducibility
subset_fabric <- get_subset(gpkg = gpkg, id="nex-87405", lyrs = c("divides", "flowpaths", "network", "nexus", "flowpath-attributes", "flowpath-attributes-ml", "lakes", "divide-attributes"))
and saving the subset to a GPKG using the following lines of code:
> st_write(subset_fabric$flowpaths, "/Users/taddbindas/projects/ddr/data/jrb_2.gpkg", "flowpaths", append = TRUE)
> st_write(subset_fabric$nexus, "/Users/taddbindas/projects/ddr/data/jrb_2.gpkg", "nexus", append = TRUE)
> st_write(subset_fabric$divides, "/Users/taddbindas/projects/ddr/data/jrb_2.gpkg", "divides", append = TRUE)
> st_write(subset_fabric$lakes, "/Users/taddbindas/projects/ddr/data/jrb_2.gpkg", "lakes", append = TRUE)
> con <- dbConnect(RSQLite::SQLite(), "/Users/taddbindas/projects/ddr/data/jrb_2.gpkg")
> dbWriteTable(con, "network", subset_fabric$network)
> dbWriteTable(con, "divide-attributes", subset_fabric[["divide-attributes"]])
> dbWriteTable(con, "flowpath-attributes", subset_fabric[["flowpath-attributes"]])
> dbWriteTable(con, "flowpath-attributes-ml", subset_fabric[["flowpath-attributes-ml"]])
> dbDisconnect(con)
Here is a photo of the divides and divide-attributes tables printed in QGIS next to each other

Summary
I'm currently trying to make a subset of the hydrofabric for some routing code and noticed the downstream-most divide is missing from the
divide-attributeslayer.My suspicion is the
originis not included when running the query for thedivide-attributes.I've run this with a few different attributes and am always finding the downstream-most catchment/divide missing.
Reproducibility
and saving the subset to a GPKG using the following lines of code:
Here is a photo of the
dividesanddivide-attributestables printed in QGIS next to each other