smnorris / bcfishobs

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

handle observations at the same location #34

Closed smnorris closed 1 year ago

smnorris commented 1 year ago

In output event table, position is primary key and we insert with on conflict do nothing - this means records are lost if they are in the same location as another. Points with slightly different locations can be snapped to exactly the same point on the network.

Fixing #33 would help ensure problems like this are found immediately

smnorris commented 1 year ago

Ideally, aggregate the observations and keep the PK constraint on position

smnorris commented 1 year ago

the query is attempting to aggregate, but mistakenly grouping on the source geometry rather than the snapped geom