Overview

Every alert area is reduced to postcodes. An NPT search never looks up subscribers by team name. It expands the NPT into postcode strings, then matches those strings to watch locations.

NPT is the neighbourhood policing team (a beat). Community Alerts and Pinpoint store it as type NPT, with fields BEAT_CODE and BEAT_NAME.

Community Alerts does not call Pinpoint when an alert is sent. Search uses the boundaries already stored in SQL.

The pieces

How areas join

Lines on this diagram are spatial overlap, not a strict tree. A postcode polygon can intersect more than one parent. Settlement is a separate ONS geography, not a child of an NPT. The postcode is the unit used when an alert is sent.

flowchart TD
  force[Force area]
  lpa[LPA]
  npa[NPA]
  settlement[Settlement]
  npt[NPT]
  postcode[Postcode]
  watch[Watch location]
  force --> lpa
  force --> npa
  force --> settlement
  lpa --> npt
  npa --> npt
  npt --> postcode
  settlement --> postcode
  postcode --> watch
Area What it is How it relates to a postcode In send-alert search today
Postcode Smallest GIS polygon, plus a string with spaces removed (for example BS35TG) It is itself. Type POSTCODE. Also carries labels from GIS: BEAT_CODE, BEAT_NAME, NPA, LPA Used to validate a new watch, and as the match key for recipients
NPT Neighbourhood policing team (beat). Type NPT The NPT polygon is tested with Geometry.Intersects against every postcode polygon. Matching postcodes are stored as children Yes. Operators search BEAT_CODE or BEAT_NAME
Settlement Named place from ONS (Name1_Text, GSS code). Type SETTLEMENT Same intersect rule: settlement polygon to child postcodes. No beat fields on the settlement layer Imported into the database, not offered in the admin search
LPA Local Policing Area An LPA label copied onto each postcode or beat feature, and an intended LPA polygon layer that would use the same intersect rule Import URL exists. Pinpoint has no GetAllLpa endpoint. Not in admin search
NPA Neighbourhood Policing Area, larger than an NPT Same intersect rule as NPT. Pinpoint GetAllNFAs returns NPAs Imported, not in admin search

Who owns the logic

Pinpoint only fetches ArcGIS layers. Community Alerts owns which postcodes sit in an NPT, and which subscribers match those postcodes.

Question Pinpoint and ArcGIS Community Alerts
What polygons exist? Reads ArcGIS layers and returns features Stores a copy as Boundaries plus Attributes
Which postcodes sit inside an NPT? Not answered at query time Precomputed: parent polygon intersects child POSTCODE, stored in BoundaryRelations
Which subscribers get the alert? Not involved AlertLocations.Postcode in the expanded postcode set, plus watch rules

The Community Alerts timer that would pull those layers (GetBoundaries) is currently commented out. Live search uses whatever is already in SQL.

Settlement and LPA can be expanded the same way in the data model. The send-alert UI only searches NPTs today.

Related