TOID - UPRN Relationship

Hi, I am trying to find location data using the building_attributes and building_uprns tables and it seems like the only fields are uprn, parent_uprn and ref_toid.
From what I can see, there is a one to one relationship between ref_toid and building_id and a many to one relationship between these and uprn. I’m yet to figure out what parent_uprn is.
I am trying to use the OS API to join location data to this but am unsure where to begin given my uncertainty above.
Would be very appreciative if somebody could shed some light on this! Thanks!

Hi @freddyenglender and welcome to the forum!

A quick outline of the different fields:

  • the building_id is our internal identifier, but as you noticed it is tied one-to-one to the OS building footprints, which come from OS MasterMap
  • ref_toid is the OS TOID from OS MasterMap - also identifies a single building footprint, but comes from OS

The UPRNs are another identifier (the acronym stands for Unique Property Reference Number) - this ID is used mostly in OS AddressBase, and does not identify physical structures but rather properties/addresses. They are both widely used identifiers, but the structure is different, and I think there might actually be a many-to-many relationship between TOIDs and UPRNs - this is because the a physical structure can overlap several properties, and a property can contain several physical structures.
The a UPRN can have a Parent UPRN because UPRNs actually form a hierarchy - e.g. there might be a UPRN for a whole block of flats, and a UPRN for every flat inside that building.

As a heads up, we are actually working right now on including the centroid point coordinates of each building footprint in our data - as these are now made publicly available by OS as part of the Open TOID dataset.

If you want to do this yourself before we upload the data, you should use the ref_toid field and join it to the Open TOID dataset to obtain point coordinates (note that some buildings from our dataset might currently not get a match as they have been recently demolished and so are not contained in Open TOID - we are also working on updating this)

Let us know if you need any more pointers!