Understanding GeoJSON Geometry Types

GeoJSON is the most widely used format for representing geographic data on the web. At its core, every GeoJSON object is built from one of seven geometry types. Whether you're plotting a coffee shop on a map or outlining a national park boundary, knowing which geometry type to use — and how to write it correctly — is fundamental.

The Seven Geometry Types

1. Point

A Point represents a single location in space. Its coordinates are a single [longitude, latitude] pair (and optionally an elevation as a third value).

{
  "type": "Point",
  "coordinates": [-73.9857, 40.7484]
}

Use Points for: landmarks, addresses, GPS positions, POIs (points of interest).

2. MultiPoint

A MultiPoint is a collection of Points. It holds an array of coordinate pairs and is useful when you need to represent a set of discrete locations as a single feature.

Use MultiPoints for: a chain of store locations, a set of sensor readings, multiple transit stops.

3. LineString

A LineString represents a connected sequence of two or more points, forming a path or line. Coordinates are an array of position arrays.

{
  "type": "LineString",
  "coordinates": [
    [-73.9857, 40.7484],
    [-73.9700, 40.7600],
    [-73.9550, 40.7700]
  ]
}

Use LineStrings for: roads, rivers, routes, pipelines, flight paths.

4. MultiLineString

A MultiLineString groups multiple LineStrings into one feature. Think of a highway that has multiple disconnected segments, or a river system with tributaries.

5. Polygon

A Polygon defines a closed area. Its coordinates consist of one or more rings — the first ring is the exterior boundary, and any subsequent rings are holes (interior cutouts).

{
  "type": "Polygon",
  "coordinates": [
    [
      [-74.0, 40.7], [-73.9, 40.7],
      [-73.9, 40.8], [-74.0, 40.8],
      [-74.0, 40.7]
    ]
  ]
}

Important: The first and last coordinate in each ring must be identical to close the polygon. Exterior rings follow a counter-clockwise winding order; interior rings (holes) follow clockwise.

Use Polygons for: city boundaries, land parcels, building footprints, lake outlines.

6. MultiPolygon

A MultiPolygon groups multiple Polygon geometries. This is ideal for geographic entities that consist of several separate areas — for example, a country with overseas territories or an archipelago.

7. GeometryCollection

A GeometryCollection is a heterogeneous grouping of any of the above geometry types. Use it sparingly — it's often cleaner to use a FeatureCollection with distinct Features instead.

Quick Reference Table

TypeShapeCoordinates StructureCommon Use
PointDot[lon, lat]POI, address
MultiPointMultiple dots[[lon,lat], ...]Store locations
LineStringLine/path[[lon,lat], ...]Road, route
MultiLineStringMultiple lines[[[lon,lat], ...], ...]Highway network
PolygonFilled area[[[lon,lat], ...]]Boundary, park
MultiPolygonMultiple areas[[[[lon,lat], ...]]]Country with islands
GeometryCollectionMixedArray of geometriesComplex features

Key Rules to Remember

  • Coordinate order matters: GeoJSON always uses longitude first, latitude second — the opposite of many GPS displays.
  • WGS 84 only: The GeoJSON spec (RFC 7946) mandates the WGS 84 coordinate reference system. Other CRS values are not supported.
  • Polygon rings must close: The first and last position in a ring must be the same point.
  • Right-hand rule: Exterior rings should be counter-clockwise; holes should be clockwise.

Wrapping Geometries in Features

In practice, you'll almost always wrap geometries inside a Feature object, which lets you attach a properties object with metadata like names, IDs, or styling hints. Multiple Features live inside a FeatureCollection, which is the standard top-level container for most GeoJSON files.