poissonconsulting / fwatlasbc

A R package to get data from the Freshwater Atlas of British Columbia
https://poissonconsulting.github.io/fwatlasbc/
Other
9 stars 0 forks source link

Is `fwa_locatealong` guaranteed to start at the mouth and go until it reaches the head of the stream or the limit? #23

Closed joethorley closed 3 years ago

joethorley commented 3 years ago

It seems to be the case based on my use of the function. If so we can add an end argument to the fwatlasbc call which would then adjust the limit to ensure it just goes as far as needed (or provides a warning if the adjusted limited would be in excess of the max limit).

joethorley commented 3 years ago

@smnorris - any thoughts?

smnorris commented 3 years ago

In fwpg, current default is to start at zero and continue all the way to the end at 1000m intervals. FWA_LocateAlongInterval(blue_line_key integer, start integer DEFAULT 0, interval_length integer DEFAULT 1000) It should be simple to add a maximum measure (defaulting to maximum measure in the db)

joethorley commented 3 years ago

That would be great - more elegant to implement in fwapg than fwapgr I think (but we're willing to do if a pain).

smnorris commented 3 years ago

Updated function is now live. This test works ok, let me know if anything else breaks it.

https://www.hillcrestgeo.ca/fwapg/functions/fwa_locatealonginterval/items.html?blue_line_key=354153927&start_measure=250&interval_length=100&end_measure=1000&limit=500