MATLAB Answers

0

inPolygon entry time and exit time

Asked by MarFanta on 3 Jul 2019
Latest activity Answered by Dheeraj Singh on 30 Jul 2019
Hi
here my scope:
I have tracking position of many runner (name,lat long and time). I need to know at waht time each runner enter and exit from a polygon (defined by lat long).
What I did so far:
Using inpolygon function I create a new table with runner name, lat long, and time when they were inside the polygon but data they are quite a lot.
Anyone has an idea on how I could select for each runner only the entry time and exit time form the polygon?
Any advice on how to approach the problem is welcome.
thank you

  0 Comments

Sign in to comment.

1 Answer

Answer by Dheeraj Singh on 30 Jul 2019

I understand that the main issue is repeated querying of large number of points to inpoygon function.
One approach can be filtering of points that are too far away from the polygon.
So, you can make two extra polygons like the below image with one extra polygon but with one polygon inside the original polygon:
inpolygon.PNG
So, at a time instance you can query only points which are not too far from the original polygon.

  0 Comments

Sign in to comment.