Skip to content

Maps and GIS ​

Map pictures ​

Map pictures (tiles) are fetched by the system for each person's browser, so the map source's key never reaches a browser and the source never sees who is looking. Staff can draw up to 600 tiles a minute each; people using the client portal 300 each; and, on the public sites of an organisation with one switched on, anyone, 300 a minute from each network address (at /api/public-maps/<organisation>). Browsers keep tiles for a day. A public site's map can also be moved to a postcode, found in the organisation's gazetteer first and then the national source.

The source is chosen for each installation:

SourceForWhat it needs
OS MapsLive use. Free to public bodies in England, Wales and Scotland under the Public Sector Geospatial AgreementAn OS Data Hub project key with the OS Maps API
OpenStreetMapDevelopment and light use only: its tile policy forbids heavy useNothing
Another sourceAn organisation's own tile serviceIts address, with {z}, {x} and {y}, and any key
NoneNo maps

Every map shows its source's attribution, such as "Contains OS data © Crown copyright and database rights".

Positions ​

Positions are kept in WGS84 latitude and longitude, as GPS and web maps use them, to six decimal places. Addresses from OS Places bring their own position; from postcodes.io, the middle of the postcode. A case's or register entry's place is its first answer with a position.

The British National Grid ​

Places are also shown and accepted on the British National Grid (EPSG:27700), which councils' GIS and gazetteers use: as a grid reference, such as SO 91398 98723, or an easting and northing, such as 391398, 298723. A grid reference coarser than a metre, such as SO 9198, means the middle of its square. Places are turned into National Grid figures and back by OSTN15, Ordnance Survey's definitive transformation, right to about 10 centimetres, as GIS do; only far out at sea, beyond OSTN15's grid, OS's Helmert transformation (2 to 5 metres) is used. GPS positions (WGS84) are taken as ETRS89, as OS does.

In and around Northern Ireland, references are on the Irish Grid (TM75, EPSG:29903), with one letter, such as J 33831 74005 for Belfast City Hall, by the published transformation, right to about a metre. Either kind of reference can be typed anywhere a place is asked for.

Spreadsheet imports and the migration tool take either form for a place: 52.586, -2.128, 391398, 298723 or SO 91398 98723, each followed by a comma and what is there if you like. The public API takes a place as latitude and longitude, easting and northing, or gridReference.

An area comes in as GeoJSON text ({"type": "Polygon", "coordinates": [[[-2.129, 52.586], ...]]}) or as well-known text, as GIS exports it: POLYGON ((-2.129 52.586, -2.1275 52.586, -2.1275 52.5869, -2.129 52.586)), longitude first. The public API takes either, the latter as {"wkt": "POLYGON (...)"}. An area with holes gives each hole as a ring after the outline, and one with several shapes is a MultiPolygon (MULTIPOLYGON (((...)), ((...))) in well-known text).

GIS ​

The public API gives places as GeoJSON, which QGIS, ArcGIS and most GIS read directly:

  • GET /api/v1/cases/geojson: open cases with a place (add includeClosed=true for all, and caseType=<key> for one type). Needs the permission to see cases.
  • GET /api/v1/register-entries/geojson: register entries with a place (add includeArchived=true and register=<key>). Needs the permission to see registers.

Each feature carries the record's reference, title, kind and status, and dates, but not its details, and its National Grid easting and northing and its gridReference. Add crs=27700 for the geometry itself on the National Grid, or crs=29903 on the Irish Grid, with a crs member naming it, as QGIS and ArcGIS read it. Add areas=true to the cases feed for the areas drawn on cases: each case with an area comes as its first area, a Polygon with any holes or a MultiPolygon for several shapes, and those without are left out, so a page can hold fewer than 5,000. Restricted cases are left out unless the API client may see them. Up to 5,000 features come at a time: ask for the next with page. Each read is recorded in the audit log as an export.

In QGIS, add a vector layer from Protocol: HTTP(S), with the address above and an authentication setting that sends Authorization: Bearer and the API client's secret or an access token.

The Power BI case feed also has latitude and longitude, for map visuals, and easting and northing.

Genera: case management for UK public sector organisations