OnlineMapMaker logo

Points in Polygon Tool — Find Which Points Fall Inside a Boundary

Add points by clicking the map or uploading a CSV or zipped Shapefile, then draw or upload a boundary polygon. One click runs the spatial join, colouring every point green (inside) or grey (outside) and giving you a live count of each — then download the inside points, the outside points, or both, as GeoJSON or CSV. Open in full screen ↗

Rate this tool:
Advertisement
Loading map…

What Is a Points-in-Polygon Spatial Join?

A points-in-polygon test — also called a spatial join — answers one question for every point in a dataset: does it fall inside a given boundary shape, or outside it? It sounds simple, but doing it by eye against a list of coordinates is slow and error-prone once you have more than a handful of points. This tool automates the whole test in your browser: load any number of points, draw or upload the boundary you care about, and get an instant, exact inside/outside classification for every single one, ready to export.

Advertisement

Two Ways to Add Points and Boundaries

Points and the boundary polygon are added independently, and each supports both a manual and a file-based method:

  • Click to add points: toggle "+ Add on Map" in the sidebar, then click anywhere on the map to drop a point. Click the toggle again, or press Esc, to stop.
  • Upload points (CSV or Shapefile): upload a CSV with latitude/longitude columns — common column names like lat/lng, latitude/longitude or y/x are detected automatically, with a manual picker if they aren't — or a zipped Shapefile of point features.
  • Draw the boundary: click "✏ Draw on Map", then click each corner of your boundary polygon on the map. Click "✓ Finish Boundary" once you have at least three points to close the shape.
  • Upload the boundary: upload a zipped Shapefile or a .geojson file containing one or more Polygon or MultiPolygon features. The map zooms to fit the boundary automatically.

How the Inside/Outside Test Works

Once you click "Match Points Inside Boundary", every point is tested against every polygon in your boundary layer using Turf.js's exact point-in-polygon algorithm — the same well-tested approach used across professional GIS software. If your boundary layer has more than one polygon (for example several separate zones drawn or uploaded together), a point counts as "inside" the moment it matches any one of them, and is tagged with the name of the polygon it matched. A point sitting exactly on a boundary line is counted as inside. The test runs entirely in your browser, so results appear in well under a second even for thousands of points.

Exporting Your Results

After running the spatial join, the sidebar's Export section offers three downloads, each reflecting the colours and counts shown on the map:

  • Inside Points (GeoJSON): every point classified as inside the boundary, with a pip_status and pip_boundary property added, plus any original attributes from your upload kept intact.
  • Inside Points (CSV): the same inside points as a spreadsheet-ready CSV file, with latitude and longitude as the first two columns.
  • Outside Points (GeoJSON): every point that fell outside every polygon in your boundary layer, in the same tagged GeoJSON format.

All three files open directly in QGIS, ArcGIS, Excel, Google Sheets, or any tool that reads standard GeoJSON or CSV — no conversion step required.

Advertisement

Step by Step

Step 1: Open the tool
1
Step 1
Open the tool
The map opens on a world view with no data yet. The sidebar has separate Points and Boundary sections, a Run button, and an Export section that unlocks once you have a result.
Step 2: Add your points
2
Step 2
Add your points
Click "+ Add on Map" and click the map to place points by hand, or upload a CSV or zipped Shapefile of points from the Points section.
Step 3: Add your boundary
3
Step 3
Add your boundary
Click "✏ Draw on Map" and click each corner of your boundary, finishing with "✓ Finish Boundary", or upload a zipped Shapefile or GeoJSON file from the Boundary section.
Step 4: Try Load Demo Data instead
4
Step 4
Try Load Demo Data instead
If you just want to see how it works first, click "Load Demo Data" to instantly populate a sample boundary and a mix of inside and outside points.
Step 5: Run the spatial join
5
Step 5
Run the spatial join
Click "Match Points Inside Boundary". Every point on the map recolours to show its result, and the sidebar shows the inside and outside counts.
Step 6: Export your results
6
Step 6
Export your results
Use the Export section to download the inside points, the outside points, or both, as GeoJSON or CSV.

Real-World Use Cases

🚚
Delivery Zone Assignment
Logistics teams check which customer addresses fall inside a delivery or service zone boundary before routing orders.
🏘️
Real Estate Filtering
Agents and analysts filter a list of property coordinates down to only those inside a specific neighbourhood, school catchment, or flood zone boundary.
🗳️
Electoral & District Analysis
Researchers test which addresses or survey responses fall inside a voting precinct or administrative district boundary.
🌾
Agriculture & Field Sampling
Agronomists check which soil sample or sensor points fall inside a specific field boundary before analysing the results.
🛰️
Asset & Fleet Tracking
Operations teams verify which GPS-tracked vehicles or assets are currently inside an approved service or geofence area.
🏫
School Catchment Analysis
Education planners check which student home addresses fall inside a school's official catchment boundary.
🚨
Emergency Response Coverage
Responders and planners identify which reported incident locations fall inside a specific jurisdiction or response-zone boundary.
📦
Store & Warehouse Coverage
Retail and logistics analysts confirm which store or warehouse locations fall inside a defined regional coverage area.
Advertisement

Common Questions

More Tools You Might Like

Map tiles © OpenStreetMap contributors and CARTO, Esri (satellite). Spatial join powered by Turf.js. Shapefile reading by shpjs. Map rendering by Leaflet. All spatial matching happens locally in your browser — no data is uploaded to any server.

Advertisement