Skip to main content
Research preview — APIs may change. GitHub

GeoJSON

GeoJSON is raw, unsigned geospatial data. It’s the simplest way to pass location data into Astral — and the least verifiable.

The format

GeoJSON (RFC 7946) is a standard format for encoding geographic data structures. The full spec defines three object types — Geometry, Feature (geometry + properties), and FeatureCollection — but Astral v0 works with bare Geometry objects only, not Feature or FeatureCollection wrappers. A Geometry object has two keys:
  • type — the geometry type: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, or GeometryCollection
  • coordinates — nested arrays of [longitude, latitude] positions
Geometries are built from coordinate arrays. A Point is a single [lon, lat] pair. A LineString is an array of positions. A Polygon is an array of linear rings — where each ring is an array of positions and the first and last position must be identical (closing the ring to form a valid area).
{
  "type": "Polygon",
  "coordinates": [[
    [-122.42, 37.78],
    [-122.42, 37.76],
    [-122.40, 37.76],
    [-122.40, 37.78],
    [-122.42, 37.78]
  ]]
}
Astral APIs accept bare Geometry objects — pass the geometry directly, not wrapped in a Feature. If you’re exporting from tools like geojson.io, extract the geometry field from the Feature before passing it to Astral.

What GeoJSON does not provide

  • Attribution — No record of who created it
  • Integrity — No way to detect if it’s been modified
  • Correspondence — No evidence that it reflects reality
A signed result that uses raw GeoJSON as input proves “Astral computed the relationship between geometry A and geometry B” — but it does not prove who provided those geometries or whether they correspond to anything in the physical world. For inputs where provenance matters, use signed location records or location proofs.

Coordinate conventions

ConventionValue
FormatGeoJSON (RFC 7946)
CRSWGS84 (http://www.opengis.net/def/crs/OGC/1.3/CRS84)
Coordinate order[longitude, latitude]
AltitudeOptional third coordinate, meters above WGS84 ellipsoid
Many mapping APIs use [latitude, longitude] order. GeoJSON uses [longitude, latitude]. Mixing these up is a common source of bugs — your point ends up in the wrong hemisphere.

Tools for working with GeoJSON

  • geojson.io — Draw, edit, and export GeoJSON on a map. The standard quick-start tool.
  • Placemark Play — Open-source geodata editor with drawing and algorithmic operations (buffering, simplification).
  • MapShaper — Simplify, convert, and inspect vector data. Useful for reducing file size and format conversion.

Next: Location records

Signed, verifiable location data

See also: