GeoJSON
JSON-based format for encoding geographic data structures
GeoJSON is an open, JSON-based format for encoding geographic data structures, including points, lines, polygons, and collections of these features, along with arbitrary non-spatial properties attached to each one. It is designed to…
Definition
GeoJSON is an open, JSON-based format for encoding geographic data structures, including points, lines, polygons, and collections of these features, along with arbitrary non-spatial properties attached to each one. It is designed to represent real-world geographic information — a city boundary, a road, a set of store locations — in a format that is both machine-parseable using standard JSON tooling and directly usable by web mapping libraries without an intermediate conversion step.
Overview
A GeoJSON document is built around the concept of a Feature: a geometry (such as a Point, LineString, or Polygon, each defined by coordinate arrays) paired with a properties object holding arbitrary key-value metadata, like a name, population, or category. Multiple features are grouped into a FeatureCollection, the structure most commonly seen in real files, which lets a single document describe an entire dataset of geographic objects along with their attributes in one self-contained payload. Because GeoJSON is just JSON with a defined geometry vocabulary, it can be produced, parsed, and manipulated with the same tools used for any JSON data — no specialized binary reader or proprietary SDK is required. Coordinates are expressed as longitude-latitude pairs following a documented convention, and the specification defines a small, fixed set of geometry types (Point, LineString, Polygon, and their Multi- variants, plus GeometryCollection) rather than allowing arbitrary custom shapes, which keeps parsers simple and interoperable across implementations written in different languages. GeoJSON differs from more specialized geographic formats in scope and audience. Shapefile, an older format from Esri, stores similar feature-and-attribute data but uses a proprietary multi-file binary layout aimed at desktop GIS software. KML adds visual styling and is oriented toward earth-visualization tools like Google Earth. GPX, by contrast, is narrower still, modeling only GPS waypoints, routes, and tracks rather than general polygons or arbitrary feature properties. GeoJSON's advantage is that it maps naturally onto web technologies: it can be embedded directly in a web page, sent over an HTTP API, and consumed by JavaScript mapping libraries with no format translation. In practice, GeoJSON is the default interchange format for web mapping: it is the format most browser-based mapping libraries expect for overlaying custom shapes, it is a common response format for geographic web APIs, and many GIS tools support exporting to and importing from GeoJSON as a bridge between desktop analysis software and web-facing applications. It is also frequently used for smaller open datasets — administrative boundaries, points of interest, transit routes — published for public reuse. The format's simplicity has trade-offs at scale: because it is text-based JSON rather than a compact binary encoding, GeoJSON files describing complex geometries or large datasets can become significantly larger than equivalent Shapefile or binary vector-tile representations, and parsing very large GeoJSON files in a browser can be memory-intensive. For large-scale mapping applications, GeoJSON is often used as an authoring or interchange format that gets converted into more compact tiled formats for actual rendering, rather than served directly at scale.
Specification
- JSON-based encoding requiring no specialized binary parser
- Defines Point, LineString, Polygon, and their Multi- geometry variants
- Groups features with attached properties into a FeatureCollection
- Coordinates follow a documented longitude-latitude convention
- Directly consumable by JavaScript-based web mapping libraries
- Open specification with broad cross-language tooling support
- Text-based format, larger than compact binary alternatives at scale