Find areas in a box
Give a box of coordinates as west,south,east,north and get every area that meets it, each marked within the box or overlaps if it crosses the edge. It's the query a map makes as you pan around.
/areas:intersectsGood to know
- You get area identities by default, which keeps wide boxes quick. Add
tierto include their shapes too.
bboxstringrequiredwest,south,east,northin WGS 84 degrees, with west < east and south < north.geographystringrequiredThe geography of the boundary release to search.
releasestringoptionalThe boundary release to search, whose geometry the box is tested against. Omit it, or use
latest, for the newest unambiguous published release.DefaultlatesttierstringoptionalOmit for identities only. Set to a tier to include each match's geometry, generalised to it.
One offullhighmediumlowlimitinteger 1–1000optionalHow many matching areas to return in a page, 1 to 1000.
truncatedsays whether more follow.Default200cursorstringoptionalThe
meta.nextCursorof the previous page. A cursor is opaque and belongs to the query that issued it.
Returns
AreaBoxSearchEnvelopeThe areas meeting the box, and how each meets it.
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.
dataAreaBoxSearchrequiredShowHide14 child fields
bboxnumber[]requiredgeographystringrequiredboundaryReleasestringrequiredmatchedintegerrequiredAreas meeting the box, before the limit is applied.
returnedintegerrequiredlimitintegerrequiredtruncatedbooleanrequiredWhether
matchedexceededlimit.relationRulestringrequiredgeometrystringoptionalPresent only when no
tierwas asked for, saying how to get the coordinates.tierstringoptionalOne offullhighmediumlowtoleranceMnumberoptionalminEffectiveAreaM2numberoptionalgeneralisationMethodobjectoptionalShowHide4 child fields
rulestringrequiredthresholdstringrequiredpartsstringrequiredsharedBordersstringrequired
matchesAreaInRelease[]requiredShowHide11 child fields
idstringrequiredgeographystringoptionalboundaryReleasestringoptionalcodestringrequirednamestringrequiredaliasesstring[]optionalrelationstringrequiredOne ofwithinoverlapsboundingBoxnumber[]requiredgeometrySourceGeometrySourcerequiredWhere 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.
generalisationobjectoptionalPresent only when a
tierwas asked for.ShowHide4 child fields
verticesintegeroptionalverticesAtFullResolutionintegeroptionalpartsintegeroptionalpartsAtFullResolutionintegeroptional
geometryGeoJsonGeometryoptionalA 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 box is missing or malformed, the geography or release is missing, or
tierorlimitis out of range. - 404No compiled area release matches the requested geography and release.
- 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
Returns every area of one geography and release that meets the given WGS 84 box: the query a map makes when it pans, and the one an analysis makes to scope a region before asking for anything heavier.
relation says how each area meets the box. within means the area lies entirely inside it; overlaps means it meets the box without being contained by it. Both are exact. An area is tested against the box itself, not against its own bounding box, so a crescent whose bounding box reaches into the query while its land does not is excluded, as is a box sitting inside a lake within an area.
Identities come back by default, each with its own bounding box, and the coordinates are opted into with tier, which generalises every match exactly as the geometry route does. That keeps the cost of a wide box bounded whether or not a caller wants geometry with it. The same caveat applies: above full, matches are generalised one at a time and neighbours drawn together may disagree along a shared border.
Results come a page at a time in code order, limit to a page, 200 by default and 1000 at most. matched counts every area the box meets, truncated says whether more follow this page, and nextCursor, with a Link: rel="next" header, fetches them. For every area of a release, the whole-release download is quicker. The cap is on results rather than on the box: a box covering the whole country is a reasonable analysis question, and it is the geometry that is expensive, not the extent. A box matching nothing is an empty answer, not an error; a geography and release the catalogue does not carry is a 404.