PHP point-in-polygon algorithm
The point-in-polygon algorithm allows you to programmatically check if a particular point is inside a polygon or outside of it.
This PHP implementation checks if a point is inside or outside of a polygon, or if it sits exactly on a vertex or on the boundary.
It works with GPS coordinates (in the form longitude/latitude), so you can easily check if a place is within a specific region.
Free code included in the full article.
- How to make your website or blog look like an app in a few minutesMake your website or blog look like an app (full screen) when its icon/shortcut is added to a smartphone’s home screen, instead of opening it as a tab in the default browser. All it takes is less than 5 minutes and a few lines of code.