smnorris / bcfishobs

Reference BC Known Fish Observations to the Freshwater Atlas stream network
Apache License 2.0
6 stars 2 forks source link

observations at zero measure can be lost #31

Closed smnorris closed 1 year ago

smnorris commented 1 year ago

Joining to streams, if point is at zero measure, current logic is not quite right, points at zero measure will be lost. https://github.com/smnorris/bcfishobs/blob/main/sql/07_create-output-tables.sql#L103

update to match like this, or using +/- .01 or similar

ON r.blue_line_key = s.blue_line_key
and r.downstream_route_measure < s.upstream_route_measure
and r.downstream_route_measure >= s.downstream_route_measure
smnorris commented 1 year ago

The fix is simple but the summary QA query should be improved to better capture records that are not coming through (the missing records were matched to a stream in the prelim tables, and those are what the qa checks, not the final output)