Points Within Polygon
points_within_polygon_toolTest geographic points against a polygon to return only those inside. Enables delivery zone validation, fleet geofencing, and customer segmentation offline.
Instructions
Test one or more geographic points against a polygon, returning only those inside. Handles a single point or a batch of points in one call. Useful for delivery zone validation, fleet geofencing, and customer segmentation. Works offline without API calls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| points | Yes | Array of points to test against the polygon | |
| polygon | Yes | Polygon coordinates as array of rings (first is outer, rest are holes). Each ring is [longitude, latitude] pairs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | Number of points inside the polygon | |
| total | Yes | Total number of input points tested | |
| points_within | Yes | Points that are inside the polygon |