Here are some common use-cases, and how to satisfy them using OxPoints data.
Remember that departments don’t have locations. First, you’ll need to find a place occupied by the department, and then find the reception for that.
A unit may occupy more than one place. If in doubt, give the user the option to choose the place they want to visit. A unit will normally have a primary place (expressed using the org:hasPrimarySite relationship), to which you may wish to give more weight. Where an organization doesn’t have any occupied places, you’ll want to find a parent organization that does by traversing org:isSubOrganizationOf relationships.
So, once you’ve found a place, you’ll want to find out where to direct users so they can be received. For this purpose, some places have an oxp:reception relationship to another place. If the place doesn’t have an associated reception, the best you can do is direct the user to the place itself.
Here are some examples of places where a reception is made explicit:
Once you’ve found a reception, you’ll need to find some co-ordinates.
Places in OxPoints can be annotated with a latitude or longitude. However, not everything has co-ordinates — it doesn’t make sense to try to add co-ordinates for every room in a building — and so it’s necessary to be able to infer a location for a place.
For any place (not just a room) you should first check whether it has co-ordinates. If not, find its containing place (using spatialrelations:within) and see if that has co-ordinates. You may need to follow the containment links multiple times before you find a place with co-ordinates. Co-ordinates are stored using the geo:lat and geo:long properties.
If you’re attempting this using SPARQL, you’ll want to think of it as “find the first containing place with co-ordinates such that there isn’t an intervening place that also has co-ordiantes”. This can be expressed as:
SELECT ?place ?lat ?long WHERE {
?place a oxp:Room .
OPTIONAL {
?place spatialrelations:within* ?container .
?container geo:lat ?lat ; geo:long ?long .
# This next bit excludes containers where there's something
# between ?place and ?container that also has co-ordinates.
NOT EXISTS {
?place spatialrelations:within* ?intermediate .
?intermediate spatialrelations:within+ ?container ;
geo:lat ?intermediate_lat ;
geo:long ?intermediate_long
}
}
}
OxPoints has a number of types of names that can be applied to organizations and places.
The two you’ll want to use are skos:prefLabel and ov:sortLabel. If something should be sorted differently to its lexical label, it should have a sort label which should be used instead.
Examples where this might be the case include:
You can see the current list of sort labels.