Featured Content

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.



Latest posts