![inpolygon.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/231827/inpolygon.png)
inPolygon entry time and exit time
1 view (last 30 days)
Show older comments
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
Answers (1)
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/231827/inpolygon.png)
So, at a time instance you can query only points which are not too far from the original polygon.
0 Comments
See Also
Categories
Find more on Hypothesis Tests in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!