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.
/areas/{geography}/{release}/{code}/geometryGood to know
- An area made of several pieces, like one with islands, comes back as a single GeometryCollection.
geographystringrequiredA geography type id, e.g.
constituencyorward.releasestringrequiredA boundary release id, e.g.
2024-07-uk-bgc, orlatestfor the geography's newest release: the one/boundary-releases:resolvechooses for the furthest date. A response tolatestnames the release it read inContent-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 with409and the releases that could be newest.codestringrequiredThe official source code for this area on this boundary release.
tierstringoptionalThe 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 offullhighmediumlowDefaultfull
Returns
AreaGeometryEnvelopeThe matching area as a GeoJSON Feature.
apiVersionv1requiredatlasReleasestringrequiredThe immutable
/atlas-releasereleaseIdfor the artifacts that produced this response.metaobjectrequiredShowHide1 child field
nextCursorstring | nullrequiredOpaque cursor for the next page, or null at the end.
dataAreaGeometryrequiredShowHide4 child fields
typeFeaturerequiredidstringrequiredpropertiesArearequiredShowHide8 child fields
idstringrequiredgeographystringrequiredboundaryReleasestringrequiredcodestringrequirednamestringrequiredaliasesstring[]optionalgeneralisationGeneralisationrequiredWhat was done to the geometry before it was served, and at what cost.
methodis present only above thefulltier, where something was actually done; it includes the caveat that neighbours generalised separately may disagree along a shared border.ShowHide8 child fields
tierstringrequiredOne offullhighmediumlowtoleranceMnumberrequiredThe side in metres of the smallest square of detail kept.
minEffectiveAreaM2numberrequiredThe threshold actually applied, in square metres: a vertex is dropped when its triangle is smaller than this.
verticesintegerrequiredVertices in the geometry as served.
verticesAtFullResolutionintegerrequiredpartsintegerrequiredpartsAtFullResolutionintegerrequiredmethodobjectoptional
geometrySourceGeometrySourcerequiredWhere the served WGS84 geometry came from.
transformationis present only when the source was reprojected.ShowHide3 child fields
sourceCrsstringrequiredtransformationobjectoptionalcorrectionsobject[]optionalDeclared grid corrections that moved this area before it was reprojected, such as
northern-ireland-offset.
geometryGeoJsonGeometryrequiredA 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.
ShowHide3 child fields
typestringrequiredcoordinatesanyoptionalPresent on every geometry type except GeometryCollection.
geometriesGeoJsonGeometry[]optionalPresent only when type is GeometryCollection.
- 400The
tierrequested 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 behaviourHide 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.