I am trying to work on a use case in my workplace which show data points that are located within Polygon Shape (eg. Hexagon, Circle, Pentagon, etc). Apologies as the data are all in my workplace, I can only explain the concept here. Currently, I am able to filter more straightforward polygons like Square (ie. SQL statement WHERE Latitude BETWEEN xx to xx AND Longitude BETWEEN xx to xx). However, I am having trouble with these types of 'weird' shapes. But I figured it should require some Python coding as well.
eg. Polygon over - Angel island state park
Sample data:
Time Latitude Longitude
18-7-23 00:00:00 37.8651, -122.4048 < outside state park (filter this)
18-7-23 00:00:00 37.8627, -122.4319 < within state park (show this)
In this example, I should be just seeing the second data row after querying from SQL (pyodbc lib). Appreciate if anyone can help out or explain the concept on how to approach this. Thank you.