Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding reverse/ addition/substration operations to the Polyline class #5374

Closed
th3w4y opened this issue Sep 10, 2016 · 2 comments
Closed

Adding reverse/ addition/substration operations to the Polyline class #5374

th3w4y opened this issue Sep 10, 2016 · 2 comments

Comments

@th3w4y
Copy link
Contributor

th3w4y commented Sep 10, 2016

Details:

Polyline(A,E) + Polyline(E,M) = Polyline(A,M)
reversed(Polyline(M,A) = Polyline(A,M)
Polyline(A,M) - Polyline(A,E) = Polyline(E,M)
# point I is the intersection point between Polyline(A,E) and Polyline(X,Y)
Polyline.intersects(Polyline(A,E), Polyline(X,Y)) = True, (Polyline(A,I), Polyline(I,E), Polyline(I,X), Polyline(I,Y)]
# no intersection point 
Polyline.intersects(Polyline(A,E), Polyline(X,Y)) = False, ((ClosestPointOnPolyline1,ClosestPointOnPolyline2 ), distance)
Polyline.intersects(Polyline(A,E), Polyline(X,Y), fetch=True) =  Polyline(A, Z).. and the other possible polylines....# via missing link between  ClosestPointOnPolyline1 and ClosestPointOnPolyline2  fetched from the API
@mjmadsen
Copy link
Contributor

I suppose if a task wanted to force a particular destination, it could send only that one - those that want to let the walker decides will send multiple requests

@th3w4y
Copy link
Contributor Author

th3w4y commented Sep 10, 2016

To add a bit of context to @mjmadsen comment.

We had a chat on gitter.im and the driving force behind the purpose of this change is so that we can prioritise cell_worker tasks and precompute a walking route... in the coordinating class #5367

For this to work the best I would need to modify the Polyline class to support the operations mentioned above in order to be able to re-use Polyline objects as line segments that we can put together or split as we'd want, we could even store them and load them from a file. #5379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants