Skip to content

Packs / geospatial-public

polygon-area-perimeter

measure the area and perimeter of GeoJSON polygons in square metres and metres

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-geospatial-public

Install

logicpacks pack use geospatial-public/polygon-area-perimeter
get_pack geospatial-public/polygon-area-perimeter

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

None.

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: python-stdlibgdal-ogr
  • Checks: 1 in outcome/checks.yaml
  • Code: area.py
  • Tools: python3

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Goal

Measure the area and perimeter of GeoJSON polygons in square metres and metres.

Steps

  1. Export the plot/zone as GeoJSON (WGS84).
  2. Run area.py.
  3. For legal/survey areas use a projected CRS and surveyor data instead.

Edge cases

  • Self-intersecting polygons give wrong areas; fix geometry first.
  • Large polygons (country-size): use an ellipsoidal library (pyproj Geod).

Don'ts

  • Don't quote these numbers as cadastral survey figures.

Routes (free first)

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