Skip to main content
Projects

TerraTracer

Geospatial tool for converting land certificates to precision GIS polygon maps using bearing + distance sequences

March 18, 2026

TerraTracer

TerraTracer converts land certificates (BLM mining claims, property deeds, survey descriptions) into precision GIS polygon maps. It takes bearing + distance sequences from legal descriptions and outputs KML (Google Earth) and GeoJSON (GIS tools) files.

Repositories

LocationTypeURL
GitHubPrimaryYourGitHubUsername/TerraTracer
GiteaMirrorgit.argobox.com/InovinLabs/TerraTracer
ArgoBoxWeb App/playground/terratracer

Architecture

Python CLI (primary)

Core engine: core_geodesic.py — uses geographiclib (Karney/WGS84 ellipsoidal model) for sub-inch accuracy at any distance.

Input: Tie point (lat/lng) + sequence of bearing/distance segments from land certificate descriptions.

Output:

  • KML file (Google Earth visualization)
  • GeoJSON file (GIS tool import)
  • Matplotlib plot (visual verification)
  • CSV coordinates

Key libraries: GeoPandas, GDAL, Matplotlib, geographiclib

Test coverage: 43 pytest tests — all passing. Core geodesic accuracy verified: 0.007ft closure on rectangle, 0.076ft on lode claim.

Web App (/playground/terratracer)

Browser-based port of core logic using haversine (spherical) approximation. Sufficient for typical claim sizes (<50km) with <0.1% error.

Layout:

┌────────────────┬──────────────────────────┐
│ Input Form     │ Leaflet.js Map           │
│ (left, 400px)  │ (right, flex-grow)       │
├────────────────┴──────────────────────────┤
│ Export Bar: KML | GeoJSON | Copy Coords    │
└───────────────────────────────────────────┘

Features:

  • Tie point input (decimal degrees or DMS)
  • Add/remove bearing+distance segments
  • Real-time polygon drawing on map as segments are added
  • Clickable vertices with coordinate info
  • Area and perimeter display
  • KML and GeoJSON download
  • Pre-populated demo: 4-segment rectangle near Washington DC

CDN dependencies: Leaflet.js 1.9.4 (map), CARTO dark tiles (basemap). No npm dependencies.

Use Cases

  1. Mining Claims — Convert BLM land certificates to plottable polygons
  2. Property Boundaries — Map deed descriptions for real estate
  3. Drone Flight Paths — Define survey boundaries from legal descriptions
  4. Survey Verification — Cross-check surveyor reports against legal descriptions
  5. Rockhounding — Map mineral rights boundaries
  6. Historical Research — Digitize old paper certificates

How It Works

  1. Input — Enter starting tie point coordinates + bearing/distance sequence from legal description
  2. Calculate — Geodesic forward calculation: each bearing+distance from current point produces next point
  3. Export — Download KML (Google Earth), GeoJSON (GIS), or copy coordinates

Known Issues

  • Vincenty method broken: Missing geopy_distance import in computation.py — use Karney (default) instead
  • KML color format: Has # prefix but should be plain aabbggrr (ABGR format)
  • Dead code: Unreachable code after return in order_points()
  • Tkinter dependency: GUI mode fails in headless environments
  • Web app area calc: Shoelace formula on lat/lng gives square degrees, not meters — needs projection fix

Future: PDF OCR Pipeline

Planned feature to scan PDF land certificates → OCR → parse bearing/distance sequences → auto-populate TerraTracer segments → generate polygon. Not yet built.

terratracergeospatialgiskmlgeojsongeodesicpythonland-certificatesmining-claims