Learn

GeoJSON geometry types

GeoJSON defines seven geometry types: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, and GeometryCollection.

TL;DR
  • Seven types: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection
  • Use Multi* types when one real-world entity has multiple disconnected shapes of the same kind
  • Use GeometryCollection only when a single entity genuinely mixes geometry types — this is rare in practice
  • Coordinate nesting increases by one level per compound type: [lon, lat] → [[lon, lat], ...] → [[[lon, lat], ...]]

Geometry types at a glance

TypeRepresentsCoordinate nesting depthExample use case
PointA single location[lon, lat]Restaurant marker, GPS fix
MultiPointA set of locations[[lon, lat], ...]Bus stop network, sensor cluster
LineStringA path between two or more locations[[lon, lat], ...]Road segment, river, route
MultiLineStringMultiple disconnected paths[[[lon, lat], ...], ...]Road network with roundabout split, river with tributaries
PolygonA closed area with optional holes[[[lon, lat], ...], ...]Building footprint, park boundary, country outline
MultiPolygonMultiple disconnected closed areas[[[[lon, lat], ...]], ...]Country with islands, postal district split by a river
GeometryCollectionMixed geometry types for a single entityvaries per memberNamed place with both a centroid point and an administrative polygon

Point

A Point has a single coordinates value: a [longitude, latitude] array in decimal degrees (WGS 84).

{
  "type": "Point",
  "coordinates": [-0.1276, 51.5074]
}

Wrapped in a Feature with properties:

{
  "type": "Feature",
  "id": "london-hq",
  "geometry": {
    "type": "Point",
    "coordinates": [-0.1276, 51.5074]
  },
  "properties": {
    "name": "London",
    "category": "capital"
  }
}

Use Points for anything with a precise location and no spatial extent: POIs, sensor readings, delivery addresses, GPS fixes, IP-geolocated users. The id field is optional on a geometry object — it belongs on the Feature wrapper, where it lets you reference or update individual shapes by identifier.

MultiPoint

A MultiPoint is an array of Point coordinate pairs. Where you'd put multiple Point Features when the collection is logically one thing, MultiPoint is the right geometry.

{
  "type": "MultiPoint",
  "coordinates": [
    [-0.1276, 51.5074],
    [2.3522, 48.8566],
    [13.4050, 52.5200]
  ]
}

Choose MultiPoint over separate Point Features when the points form a set — a bus route's stops, a fleet of delivery vehicles at a snapshot in time, a scatter of soil samples — and your application doesn't need to address each point independently. If you need to click one stop and open its timetable, separate Features with id values are the right model. If you're rendering the whole set as one styled layer and never need to select individuals, MultiPoint keeps the data flat.

LineString

A LineString is an ordered sequence of two or more positions. The line visits each position in array order.

{
  "type": "Feature",
  "geometry": {
    "type": "LineString",
    "coordinates": [
      [-0.1276, 51.5074],
      [-0.0754, 51.5085],
      [0.0099, 51.4964]
    ]
  },
  "properties": {
    "name": "Central Line (simplified)",
    "length_km": 8.2
  }
}

Two coordinates is the minimum — that produces a straight segment. Three or more produces a polyline. Use LineString for roads, rivers, walking routes, power cables, shipping lanes, and any geographic path that doesn't enclose an area. A LineString with identical first and last positions is still a LineString, not a Polygon — the geometry type, not the coordinates, determines how renderers treat it.

MultiLineString

A MultiLineString holds an array of LineString coordinate sequences. Each inner array is one line.

{
  "type": "MultiLineString",
  "coordinates": [
    [
      [-0.1350, 51.5150],
      [-0.1280, 51.5120],
      [-0.1200, 51.5090]
    ],
    [
      [-0.1200, 51.5090],
      [-0.1100, 51.5070],
      [-0.1020, 51.5050]
    ]
  ]
}

Use MultiLineString when a single entity is made of disconnected or parallel segments: a road that splits around a roundabout and rejoins on the other side, a river system where tributaries branch off, a set of disconnected pipe segments that belong to one supply network. If the lines are separate entities (two different roads), keep them as separate LineString Features.

Polygon

A Polygon's coordinates is an array of rings. The first ring is the outer boundary. Any additional rings are holes cut out of it.

{
  "type": "Polygon",
  "coordinates": [
    [
      [2.2940, 48.8580],
      [2.2960, 48.8580],
      [2.2960, 48.8596],
      [2.2940, 48.8596],
      [2.2940, 48.8580]
    ]
  ]
}

RFC 7946 specifies counter-clockwise winding for the outer ring (positions go counter-clockwise when viewed from above). The first and last position in each ring must be identical — the ring must close. PostGIS and Mapbox GL JS both enforce this; Leaflet tolerates either winding direction. Following the spec is cheaper than debugging rendering issues downstream.

For winding order, holes, and common mistakes, see GeoJSON polygon.

MultiPolygon

A MultiPolygon holds an array of Polygon coordinate arrays. Each inner array is one polygon (with its own rings).

{
  "type": "Feature",
  "properties": { "name": "Hawaii (simplified)", "iso_a2": "US" },
  "geometry": {
    "type": "MultiPolygon",
    "coordinates": [
      [
        [
          [-157.9, 21.3], [-157.6, 21.3], [-157.6, 21.5],
          [-157.9, 21.5], [-157.9, 21.3]
        ]
      ],
      [
        [
          [-156.6, 20.5], [-156.3, 20.5], [-156.3, 20.9],
          [-156.6, 20.9], [-156.6, 20.5]
        ]
      ]
    ]
  }
}

Use MultiPolygon when one real-world entity consists of multiple disconnected areas: a country with offshore islands (France + Réunion, USA including Hawaii and Alaska), a postal code split by a river, an administrative district with an exclave. If the areas are independent entities — two different neighbourhoods, two different countries — use separate Polygon Features, not MultiPolygon.

For a detailed guide, see GeoJSON MultiPolygon.

GeometryCollection

A GeometryCollection holds an array of geometry objects of any type. Each member is a full geometry object with its own type and coordinates.

{
  "type": "Feature",
  "properties": { "name": "Trafalgar Square" },
  "geometry": {
    "type": "GeometryCollection",
    "geometries": [
      {
        "type": "Point",
        "coordinates": [-0.1281, 51.5080]
      },
      {
        "type": "Polygon",
        "coordinates": [
          [
            [-0.1296, 51.5071],
            [-0.1265, 51.5071],
            [-0.1265, 51.5089],
            [-0.1296, 51.5089],
            [-0.1296, 51.5071]
          ]
        ]
      }
    ]
  }
}

GeometryCollection is appropriate when a single real-world entity is genuinely multi-typed: a named place that is both a Point (its centroid, used for label placement) and a Polygon (its administrative boundary, used for selection). That's the whole use case. GeometryCollection is not a container for unrelated features — that's what FeatureCollection is for. In practice, most datasets never use GeometryCollection; the multi-polygon country case is far more common, and a MultiPolygon handles that correctly.

Choosing the right type

Work through these questions in order:

  • Single location with no area → Point
  • Multiple locations that form a logical set → MultiPoint
  • A path or route → LineString
  • Multiple disconnected paths for one entity → MultiLineString
  • A closed area → Polygon
  • Multiple disconnected areas for one entity → MultiPolygon
  • A single entity that is genuinely both a point and an area → GeometryCollection (rare)

If you're not sure whether to use Multi* or separate Features: ask whether your application ever needs to select, style, or update one part of the entity independently. If yes, separate Features. If the parts are always treated as one unit, use the Multi* type.

Nesting rules

Geometries sit inside Features; Features sit inside FeaturCollections. Each level adds something:

  • Geometry — shape only: a type and a coordinates array
  • Feature — geometry + identity + properties: id, geometry, properties
  • FeatureCollection — an array of Features, the standard envelope for a dataset
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": "eiffel-tower",
      "geometry": {
        "type": "Point",
        "coordinates": [2.2945, 48.8584]
      },
      "properties": {
        "name": "Eiffel Tower",
        "height_m": 330
      }
    },
    {
      "type": "Feature",
      "id": "seine-segment",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [2.2880, 48.8560],
          [2.3200, 48.8510],
          [2.3530, 48.8490]
        ]
      },
      "properties": {
        "name": "Seine (central Paris)",
        "length_km": 6.1
      }
    }
  ]
}

Most APIs and libraries work with FeatureCollections. L.geoJSON() in Leaflet, addSource() in Mapbox GL JS, and gpd.read_file() in geopandas all accept a FeatureCollection as their primary input format. Bare geometry objects (without a Feature wrapper) are valid GeoJSON but rarely used in practice — they carry no properties and no id.

Frequently asked questions

What is a Point in GeoJSON?
A GeoJSON Point is a single location represented as a [longitude, latitude] coordinate pair. It is the simplest geometry type and is used for markers, POIs, GPS fixes, and any location that has no extent.
What is the difference between Polygon and MultiPolygon in GeoJSON?
A Polygon is a single closed shape. A MultiPolygon is an array of Polygons used when a single real-world feature consists of multiple disconnected areas — for example, a country with islands or a postal district split by a river. If the areas are always treated as one unit, use MultiPolygon.
Can a GeoJSON Feature have multiple geometries?
A Feature has exactly one geometry field. To attach multiple geometries to one entity, use a GeometryCollection as the Feature's geometry value. In practice this is rare — most datasets use separate Features with a shared property (e.g. a 'group_id') to represent related shapes.
What is a GeometryCollection in GeoJSON?
A GeometryCollection is a geometry that contains an array of other geometry objects. It is used when a single real-world entity has multiple geometry types — for example, a named place that is both a point (its centroid) and a polygon (its boundary). It is not a container for unrelated features; use FeatureCollection for that.
How do coordinates work in GeoJSON?
GeoJSON coordinates are always [longitude, latitude] in decimal degrees, using the WGS 84 datum (EPSG:4326). Longitude ranges from -180 to 180; latitude from -90 to 90. A third value (elevation) is permitted by RFC 7946 but its interpretation is not defined by the spec.
What geometry types does GeoJSON support?
GeoJSON supports seven geometry types: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, and GeometryCollection. These are the only valid values for the 'type' field on a geometry object.

If you need to draw and edit GeoJSON features in a React application, Element Editor is an open-source library (MIT) that supports all seven geometry types: it draws Points, LineStrings and Polygons, merges them into the Multi* types, and imports and edits MultiPoint and GeometryCollection features too.

Continue reading

Mike Acler

Mike Acler

Design engineer and creator of Element Editor, an open-source map drawing and GeoJSON editing library for React. Writes about web cartography and GIS tooling.