Point in Polygon

Draw a polygon on the map, then enter coordinates to check which points fall inside.

🔷Click on the map to start drawing the polygon.

About This Tool

The Point in Polygon tool tests whether a set of geographic points falls inside or outside a drawn polygon. It is used in spatial queries — for example, identifying which addresses lie within a delivery zone, which sensors are inside a study area, or which incidents occurred within a jurisdiction boundary.

Input

First, a polygon drawn by clicking the map (minimum 3 vertices; closed automatically when the first vertex is clicked again). Then, one or more test points added in a second click mode. Points can also be entered as coordinates in the sidebar.

Output

Each test point classified as Inside or Outside the polygon. Results are shown as colour-coded markers on the map (green = inside, red = outside) and as a table listing each point's coordinates and classification. The table can be copied to clipboard.

Key Concepts

Ray casting algorithm
A horizontal ray is projected from the test point to infinity. The number of times this ray crosses the polygon boundary determines the result: an odd count means the point is inside the polygon; an even count (including zero) means it is outside. This is an O(n) algorithm where n is the number of polygon edges. Edge cases — points lying exactly on the boundary — are classified as inside.
Winding number
An alternative classification method (used internally by Turf.js booleanPointInPolygon) that counts how many times the polygon boundary winds around the test point. Unlike ray casting, the winding number correctly handles self-intersecting polygons. A non-zero winding number means the point is inside.
Geometric scope
The algorithm operates on projected 2D coordinates. Results are accurate for polygons up to approximately 500 km in extent. Very large polygons spanning multiple UTM zones may show minor positional discrepancies near their edges due to spherical projection effects.