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 and registry metadata supply no date, 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. Per-area compiled geometry carriesvalidity; release-wide provenance and direct source reads omit it.ShowHide6 child fields
inputstringoptionalRegistered source file, preserved without validity repairs.
inputHashstringoptionalSHA-256 of the registered source file's original bytes.
validityGeometryValidityoptionalDeterministic build-time validation of the full served geometry, after declared corrections and reprojection. Checks Polygon and MultiPolygon topology in planar WGS84 XY using JSTS IsValidOp, including self-intersections, holes, ring degeneracy and relationships between MultiPolygon parts. Z is ignored. This is not a geodesic, antimeridian, cross-area coverage or general GeoJSON/OGC conformance certificate. At most the first issue found by the checker is returned. Source geometry is never repaired by validation. A valid result applies only to these checks. More than 10,000 positions, or 10,000 polygon/ring components, yields
not-checkedwithposition-limit; GeometryCollection and non-polygon types areunsupported-geometry. Older stores without reports arenot-compiled. Validator failures arevalidator-error, never a valid result. No topology validation runs during requests.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. Coordinates keep seven decimal places of a degree, about a centimetre; most publishers' WGS84 files carry fifteen, which is float noise from their own reprojection. A few areas whose parts lie less than a centimetre apart keep their source precision, because rounding would make their valid boundary invalid.
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.