Comments (10)
Yes I think that is the best option. We will just have an R function that creates the Rkm column from Distance (in meters)
from fwapg.
I've generalized it a tiny bit more - rather than return distance, the function returns an index - multiply that index by the interval length to get Rkm.
from fwapg.
Proposed functions:
FWA_LocateAlong(blue_line_key, downstream_route_measure)
- return a point geometry, basically just a wrapper around https://postgis.net/docs/ST_LocateAlong.htmlFWA_LocateAlongInterval(blue_line_key, interval, downstream_route_measure)
- return a table of point geometries located along the stream at set interval, starting at downstream_route_measure (default of 0).
@sebdalgarno, @joethorley - let me know if these names/parameters don't work (and any comments on the FWA_NearestStream
-> FWA_IndexPoint
name change in #27 are welcome too)
from fwapg.
I think these names should work. We can always rename them in the fwapgr package, if need be.
In the FWA_LocateAlongInterval function, is it possible for you to return a 'Label' (or 'Distance'?) column along with the geometries in the returned table? i.e. some way for the user to know the order of the points...so at interval of 100m, Label would be 0, 0.1, 0.2, 0.3 etc. with default units in km starting at the most downstream point
from fwapg.
actually this column could be called Rkm or RiverKm
from fwapg.
if that seems too specific, perhaps there could be a third function FWA_Rkm that makes use of FWA_LocateAlongInterval and returns the Rkm labels...
from fwapg.
Sure, a third FWA_Rkm func is no problem.
Maybe easier is that FWA_LocateAlongInterval
has a label / distance column (in metres) that you divide by 1000 in an FWA_Rkm R function?
from fwapg.
fwa_locatealonginterval is live. The default limit
is low, so the server doesn't bog down on big features. Explicitly set your limit high if it is a long river. I think I have to adjust the return type in fwa_locatealong
, the function is on the server but not showing up in the function list.
from fwapg.
Looks like the above request doesn't return a point at index=0, I'll fix.
index=0 does get returned if the starting point isn't 0 - my check on whether the location actually exists is too strict.
from fwapg.
Zero indexes are now included at measure=0 and fwa_locatealong() shows up in the list.
I'll close the issue for now but test out the functions and reopen if you find any problems.
from fwapg.
Related Issues (20)
- ensure makefile bails on errors
- load of named point features and obstructions fail
- update docker files
- scheduled load from data/FWA_BC.gdb.zip failure does not stop build
- demo web app
- add action to run job weekly
- add function for measuring gradient at a given location over given interval
- add channel width and discharge modelling HOT 1
- only run job if source files modified
- cross border data additions HOT 1
- build fails, can't find FWA_Upstream function HOT 2
- FWA named points fails to load HOT 1
- update discharge/channel width data with FWA updates
- unexpected results for fwa_watershedstream() HOT 2
- assessment watersheds -> streams lookup HOT 1
- discharge download
- functions/docs cleanup
- add visibilityfilter for better cartography
- incorrect channel widths HOT 3
- value added stream order data currently empty HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fwapg.