The PointInPolygon function takes a list of location points and a list of polygons and returns a list of binary values for every point and polygon combination, which indicates whether the point is contained in the polygon.
The PointInPolygon function works only on 2D spatial objects.
The function determines whether a given point in the plane lies inside or outside of a polygon. It has various applications in many fields such as computer graphics, geographical information systems (GIS), and CAD.
In the following example, point A is in the polygon and point B is outside of the polygon.
A use case for this function is to determine in which drive-time polygon surrounding a store a customer resides. This information helps in mailer targeting.
Another use case is to determine which cell phones are frequently within a polygon surrounding an airport. This information helps in identifying frequent fliers.