How to select data that falls within a given boundary on map?
Apr 19, 2020 11:35 PM(391 views)
I have a large on-road GPS dataset. How can I select the data that fall within a give boundary? (see the attachment, I imported the boundary using ESRI to JMP add-in)? I know I can do it manually with the Lasso but was wondering if there is an easier way.
Assuming your data files has latitude and longitude and your boundary is definfed by a sequence of latitude and longitude, there is a function that can be useful called InPolygon(). If your data file has numerous points, the brute force method shown in the script below is likely not efficient.
Here is the script. The picture is shown below and the log output shows that points 2 and 3 are within the area.