Difference of Polygons
difference_toolSubtract one polygon from another to find the area in polygon1 not covered by polygon2. Compute exclusion zones or uncovered service areas offline without API calls.
Instructions
Subtract one polygon from another, returning the area in polygon1 that is not covered by polygon2. Useful for computing exclusion zones, finding uncovered service areas, or "what is in zone A but not zone B?". Returns null geometry if polygon2 fully covers polygon1. Works offline without API calls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| polygon1 | Yes | The polygon to subtract from | |
| polygon2 | Yes | The polygon to subtract |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| geometry | Yes | GeoJSON geometry of the remaining area (polygon1 minus polygon2), or null if polygon2 fully covers polygon1 | |
| has_difference | Yes | Whether any area remains after subtracting polygon2 from polygon1 |