# point-in-polygon

assign each point to the GeoJSON zone polygon that contains it (delivery zones, districts)

- **Space:** geospatial-public (https://github.com/Tech-Realm/space-geospatial-public/tree/main/point-in-polygon)
- **Level:** L2 (as the registry reports it)
- **Keys it needs (names only):** none
- **Tools:** python3
- **Routes:** python-stdlib, gdal-ogr; checks: 1
- **Uses:** new (no recorded use yet)
- **Install:** `logicpacks pack use geospatial-public/point-in-polygon` or MCP `get_pack geospatial-public/point-in-polygon`
- **Files:** CHANGELOG.md, code/pip.py, outcome/EVIDENCE.md, outcome/checks.yaml, outcome/fixtures/pts.csv, outcome/fixtures/zones.geojson, outcome/results.json, pack.yaml, refs/refs.yaml, spec/SPEC.md, spec/source.md

## Purpose (spec/SPEC.md)

## Goal

Assign each point to the GeoJSON zone polygon that contains it (delivery zones, districts).

## Steps

1. Draw or export zones as GeoJSON (geojson.io, QGIS).
2. Run pip.py with your points.
3. Review OUTSIDE points: gaps between zones or bad coordinates.

## Edge cases

- Holes (inner rings) are excluded, as the fixture shows.
- Points exactly on a shared edge may land in either zone.

## Don'ts

- Don't swap GeoJSON [lon, lat] order.

## Routes (free first)

1. `python-stdlib`: `code/pip.py` (no install).
2. `gdal-ogr` (free): GDAL/OGR for format conversion and reprojection at scale (brew install gdal)



---

Canonical URL: https://logicpacks.io/packs/geospatial-public/point-in-polygon

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](/llms.txt). Plain facts: [/about.md](/about.md). Safety: [/safety.md](/safety.md).
