The specific use-case that drives this requirement is as follows:
We are generating LOD from the co-ops-uk open data CSV files. That data will use the essglobal vocab. The co-ops-uk data includes UK postcodes. In order to put the UK co-ops onto a geographic map we need to convert UK postcodes into lat/long. UK Ordnance Survey provides LOD to describe UK postcodes, including the lat/long (of the "centre"?) of the postcode. For example, http://data.ordnancesurvey.co.uk/id/postcodeunit/SO160AS describes the postcode "SO16 0AS". So we want our LOD for co-ops-uk to include links to these postcodeunit URIs.
Requirements
We do not want essglobal to contain anything that is specific to UK postcodes. However, linking into GeoSPARQL is acceptable.
So, we hope (subject to further investigation) that we can use GeoSPARQL within essglobal, and http://data.ordnancesurvey.co.uk/ontology/postcode/ within the co-ops-uk LOD, and that the SubClass and/or SubProperty relationships defined in the above ordnance survey ontologies will be sufficient to make this work! See the section below for details.
Looking at the definition of http://data.ordnancesurvey.co.uk/ontology/postcode/PostcodeUnit:
<owl:Class rdf:about="http://data.ordnancesurvey.co.uk/ontology/postcode/PostcodeUnit">
<rdfs:label rdf:datatype="&xsd;string">Postcode Unit</rdfs:label>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="&spatialrelations;within"/>
<owl:someValuesFrom rdf:resource="http://data.ordnancesurvey.co.uk/ontology/postcode/PostcodeSector"/>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:comment>An area covered by a particular postcode. Postcodes are an alphanumeric abbreviated form of address. Postcode units are unique references and identify an average of 15 addresses. In some cases, where an address receives a substantial amount of mail, a postcode will apply to only one address (a large-user postcode). The maximum number of addresses in a postcode is 100.
A sub-area of a postcode sector, indicated by the two letters of the inward postcode, which identifies one or more small-user postcode delivery points or an individual large-user postcode. There are approximately 1.7 million postcode units in the UK.</rdfs:comment>
<rdfs:isDefinedBy rdf:resource="http://www.ordnancesurvey.co.uk/ontology/postcode.owl"/>
</owl:Class>
we see that PostcodeUnits are a SubClassOf the set of things that are &spatialrelations;within a PostcodeSector.
Looking at the definition of &spatialrelations;within:
<owl:ObjectProperty rdf:about="&spatialrelations;within">
<rdf:type rdf:resource="&owl;TransitiveProperty"/>
<rdfs:label xml:lang="en">within</rdfs:label>
<rdfs:comment rdf:datatype="&xsd;string">The interior of one object is completely within the interior of the other object. Their boundaries may or may not intersect.</rdfs:comment>
<owl:inverseOf rdf:resource="&spatialrelations;contains"/>
<rdfs:range rdf:resource="http://www.opengis.net/ont/geosparql#SpatialObject"/>
<rdfs:domain rdf:resource="http://www.opengis.net/ont/geosparql#SpatialObject"/>
<owl:equivalentProperty rdf:resource="http://www.opengis.net/ont/geosparql#sfWithin"/>
<rdfs:subPropertyOf rdf:resource="&owl;topObjectProperty"/>
<owl:propertyChainAxiom rdf:parseType="Collection">
<rdf:Description rdf:about="&spatialrelations;within"/>
<rdf:Description rdf:about="&spatialrelations;equals"/>
</owl:propertyChainAxiom>
<owl:propertyChainAxiom rdf:parseType="Collection">
<rdf:Description rdf:about="&spatialrelations;equals"/>
<rdf:Description rdf:about="&spatialrelations;within"/>
</owl:propertyChainAxiom>
</owl:ObjectProperty>
we see that the domain of &spatialrelations;within is http://www.opengis.net/ont/geosparql#SpatialObject. We can therefore infer that a PostcodeUnit isa http://www.opengis.net/ont/geosparql#SpatialObject.
BUT ... http://www.opengis.net/ont/geosparql#SpatialObject makes no mention of latitude and longitude, but this is what we want to know in order to put something on a map.
Looking at the RDF for http://data.ordnancesurvey.co.uk/id/postcodeunit/SO160AS, as returned by:
Propose that an essglobal:Address has a geosparql:SpatialObject
hasa, or isa?
This allows us to make assertions about that SpatialObject: for example that it is within some other SpatialObject (like a postcodeunit).
Note: "spatial things and geometries are different things, the geometries being properties of spatial things. One spatial thing could have several geometries, each giving a different representation of the thing."
Use case
The specific use-case that drives this requirement is as follows:
We are generating LOD from the co-ops-uk open data CSV files. That data will use the essglobal vocab. The co-ops-uk data includes UK postcodes. In order to put the UK co-ops onto a geographic map we need to convert UK postcodes into lat/long. UK Ordnance Survey provides LOD to describe UK postcodes, including the lat/long (of the "centre"?) of the postcode. For example,
http://data.ordnancesurvey.co.uk/id/postcodeunit/SO160AS
describes the postcode "SO16 0AS". So we want our LOD for co-ops-uk to include links to these postcodeunit URIs.Requirements
We do not want essglobal to contain anything that is specific to UK postcodes. However, linking into GeoSPARQL is acceptable.
Investigation
The ontology used for the UK postcode data is http://data.ordnancesurvey.co.uk/ontology/postcode/. The postcode ontology has links to http://data.ordnancesurvey.co.uk/ontology/spatialrelations/, which imports GeoSPARQL.
So, we hope (subject to further investigation) that we can use GeoSPARQL within essglobal, and http://data.ordnancesurvey.co.uk/ontology/postcode/ within the co-ops-uk LOD, and that the
SubClass
and/orSubProperty
relationships defined in the above ordnance survey ontologies will be sufficient to make this work! See the section below for details.See https://www.w3.org/2011/02/GeoSPARQL.pdf and try following 1.5 "Illustrative Examples" for a possible way forward.
Details of existing ontologies
Looking at the definition of
http://data.ordnancesurvey.co.uk/ontology/postcode/PostcodeUnit
:we see that
PostcodeUnit
s are aSubClassOf
the set of things that are&spatialrelations;within
aPostcodeSector
.Looking at the definition of
&spatialrelations;within
:we see that the domain of
&spatialrelations;within
ishttp://www.opengis.net/ont/geosparql#SpatialObject
. We can therefore infer that aPostcodeUnit
isahttp://www.opengis.net/ont/geosparql#SpatialObject
.BUT ...
http://www.opengis.net/ont/geosparql#SpatialObject
makes no mention of latitude and longitude, but this is what we want to know in order to put something on a map.Looking at the RDF for
http://data.ordnancesurvey.co.uk/id/postcodeunit/SO160AS
, as returned by:we see that it uses the following properties:
TODO - how to relate lat/long from wgs84_pos to geosparql? There is no mention of geosparql in wgs84_pos
Other sources of postcode data
Initially http://opendatacommunities.org/data/postcodes showed promise, but it turns out to be a 'portal' into the OS postcodeunit dataset that we already plan to use.
Proposals
Propose that an essglobal:Address has a geosparql:SpatialObject
hasa
, orisa
? This allows us to make assertions about thatSpatialObject
: for example that it iswithin
some otherSpatialObject
(like apostcodeunit
).The
isa
relationship has been implemented in https://github.com/p6data-coop/ise-linked-open-data/commit/b54a49d62c932b139d9814ea0f3dd73e594fa052 .Implementation
Note that postcode.owl seems to have disappeared from http://data.ordnancesurvey.co.uk/ontology/postcode/. However, there is a version of it here. Perhaps we will need to load this into our OntoWiki?
Related documents
OWL Overview
OWL Guide
OWL Reference
W3C Organization Ontology
rdfs:subClassOf <http://www.w3.org/ns/org#OrganizationUnit
rdfs:subClassOf <http://www.w3.org/ns/org#OrganizationColaboration>
Spatial Data on the Web Best Practices
w3.org locn vocabulary