Get an area's shape

Download one area's boundary as a GeoJSON Feature, in ordinary longitude and latitude (WGS 84). You get full detail by default; add tier for a lighter version.

get
/areas/{geography}/{release}/{code}/geometry

Good to know

  • An area made of several pieces, like one with islands, comes back as a single GeometryCollection.
  • geographystringrequired

    A geography type id, e.g. constituency or ward.

  • releasestringrequired

    A boundary release id, e.g. 2024-07-uk-bgc, or latest for the geography's newest release: the one /boundary-releases:resolve chooses for the furthest date. A response to latest names the release it read in Content-Location. A geography whose newest month holds several releases that differ in more than coverage, or that has a release whose id carries no month, is refused with 409 and the releases that could be newest.

  • codestringrequired

    The official source code for this area on this boundary release.

  • tierstringoptional

    The generalisation tier, as the side in metres of the smallest square of detail kept: full (every vertex), high (10 m), medium (100 m), low (1000 m).

    One offullhighmediumlow
    Defaultfull

Returns

AreaGeometryEnvelope

The matching area as a GeoJSON Feature.

  • apiVersionv1required
  • atlasReleasestringrequired

    The immutable /atlas-release releaseId for the artifacts that produced this response.

  • metaobjectrequired
    Show1 child field
    • nextCursorstring | nullrequired

      Opaque cursor for the next page, or null at the end.

  • dataAreaGeometryrequired
    Show4 child fields
    • typeFeaturerequired
    • idstringrequired
    • propertiesArearequired
      Show8 child fields
      • idstringrequired
      • geographystringrequired
      • boundaryReleasestringrequired
      • codestringrequired
      • namestringrequired
      • aliasesstring[]optional
      • generalisationGeneralisationrequired

        What was done to the geometry before it was served, and at what cost. method is present only above the full tier, where something was actually done; it includes the caveat that neighbours generalised separately may disagree along a shared border.

        Show8 child fields
        • tierstringrequired
          One offullhighmediumlow
        • toleranceMnumberrequired

          The side in metres of the smallest square of detail kept.

        • minEffectiveAreaM2numberrequired

          The threshold actually applied, in square metres: a vertex is dropped when its triangle is smaller than this.

        • verticesintegerrequired

          Vertices in the geometry as served.

        • verticesAtFullResolutionintegerrequired
        • partsintegerrequired
        • partsAtFullResolutionintegerrequired
        • methodobjectoptional
      • geometrySourceGeometrySourcerequired

        Where the served WGS84 geometry came from. transformation is present only when the source was reprojected.

        Show3 child fields
        • sourceCrsstringrequired
        • transformationobjectoptional
        • correctionsobject[]optional

          Declared grid corrections that moved this area before it was reprojected, such as northern-ireland-offset.

    • geometryGeoJsonGeometryrequired

      A GeoJSON geometry object as read from the raw cached source, or a GeometryCollection when the source represents one area code as more than one feature fragment.

      Show3 child fields
      • typestringrequired
      • coordinatesanyoptional

        Present on every geometry type except GeometryCollection.

      • geometriesGeoJsonGeometry[]optional

        Present only when type is GeometryCollection.

  • 400The tier requested is not one of the named tiers.
  • 404Either no compiled area matches that identity, the area exists but no feature for its code was found in the raw geometry source, or every part of it is smaller than the requested tier keeps.
  • 503The area exists but its geometry cannot be served: no raw source is declared, or its CRS has no transformation to WGS84.

Every error has the same shape. See Errors for how to handle them.

Show the precise behaviour

Serves the area's own geometry from its raw, cached source GeoJSON, not a generalised or simplified derivative, always in WGS84. A source in British National Grid (EPSG:27700) is reprojected per area through EPSG:1314, OSGB36 to WGS 84 (6), a Helmert transformation EPSG states as accurate to 2 m in Great Britain; properties.geometrySource records the source CRS and any transformation applied. Northern Ireland areas in the releases that declare northern-ireland-offset are first moved by that correction, which the ONS's grid files need there, and geometrySource.corrections names it when applied. A code that maps to more than one feature fragment in the source (e.g. an area split across islands) is returned as a single GeometryCollection rather than picking one fragment.

tier generalises the geometry before it is served, for callers that do not need every vertex: Highland is 45,124 of them. A tier is the side of the smallest square of detail kept, and the rule is Visvalingam-Whyatt, dropping the vertex whose triangle with its neighbours is smallest until none below the tier's threshold remains. Triangles are measured in the EPSG:6933 equal-area projection, so a tier means the same thing anywhere in the country. A part or hole smaller than the threshold is dropped whole rather than left as a triangle, and properties.generalisation reports the vertex and part counts both before and after.

A tier bounds the size of feature dropped; it does not promise that no vertex moves further than its tolerance, since the same deviation spans a larger triangle the further apart its neighbours lie. Each area is generalised on its own, so above full two neighbours drawn together may disagree along the border they share. Ask for full where borders must meet exactly. This is still per-request simplification, not the vector tiles the full proposal describes.