Replies: 4 comments
-
Hi @jweisbaum ! That's correct, there's no point-on-line API at this time, but you could use the polyline distance API |
Beta Was this translation helpful? Give feedback.
-
In general I'm looking to replace turf.js: https://turfjs.org/ https://turfjs.org/docs/#pointOnFeature Buffer would also be useful for us since we often need to check if someone is near the coast and the global coast datasets are large and buffering takes forever. |
Beta Was this translation helpful? Give feedback.
-
Is turfjs implemented in Javascript? For your small-ish data size (O(100K) boats) you may not even need a GPU, just a better CPU implementation (e.g. in C++) |
Beta Was this translation helpful? Give feedback.
-
I believe turf is implemented in js. It's true the number of boats isn't likely to be huge but it's important for our end users that we have incredibly low latency. Also, we want to do privacy checks and filtering for data - for instance having high resolution polygons of the land or Open Street Map data, and if someone is on a highway, or on land, we can throw out those data points for privacy reasons because they obviously aren't part of the race. If we end up doing these checks a few times a second for hundreds of races at a time, I think the parallelization would help us with latency. We're also interested in offline stuff with much larger data sets. For instance when we open our data set up to Olympic race teams sailing in a new area, they pull in tens of millions of positions for that region from archived races to answer questions like which side of the bay is more advantageous. The real time component of the system is mission critical - for instance being able to umpire races and react in real time as the boats cross lines or enter areas. The subscribers on the other end can't wait around too long for events. It's true I haven't benchmarked turf.js yet, I was just hoping we could get a POC running with parallelization from the get-go. |
Beta Was this translation helpful? Give feedback.
-
What is your question?
I could be crazy but I didn't see an obvious way to check if a point is on a line from the docs. Is the expected way to find the distance and if it's 0 it's assumed to be on the line? How about line intersection checks or self intersection checks, or line simplification? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions