Experiences of linking ontologies to a geospatial database Cathy Dolbear, John Goodwin, Katalin Kovacs, Glen Hart Research & Innovation Overview Introduction to Ordnance Survey’s data Authoring topographic ontologies Open world modelling, closed world thinking Linking ontologies to our database Immature technology Introduction to Ordnance Survey National Mapping Agency of Great Britain Digital data accounts for 80% of business activity 3.5 terabytes of contiguous feature based data 5,000 updates a day, change captured within 6 months 2000+ Concepts OS MasterMap – integrated layers Overview Introduction to Ordnance Survey’s data Authoring topographic ontologies Open world modelling, closed world thinking Linking ontologies to our database Immature technology Our approach to ontologies Capturing organisational knowledge about topography Driving database modelling vs using legacy systems Up to 80% of applications have a geospatial component Topography not a stand-alone application Our data nearly always integrated with other datasets Authoring topographic ontologies Domain Ontology Conceptual Aspect Built by domain expert A River Stretch is part of a River River_ Stretch direct_part_of ∃ River Computational Aspect Ontology engineer translates into OWL <owl:ObjectProperty rdf:ID="directPartOf"> <rdf:type rdf:resource="&owl;FunctionalProperty"/> </owl:ObjectProperty> <owl:Class rdf:ID="River"/> <owl:Class rdf:ID="RiverStretch"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="#directPartOf"/> <owl:someValuesFrom rdf:resource="#River"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class> Domain experts think in a closed world Structured sentences default to disjoint, XOR etc. “River can overlap with Stream” Closure axioms are needed “A River flows into the Sea or a Lake or a River” (it has to flow into something, and can only flow into these things, and nothing else) Difficulties in modelling “sometimes” or “may” in OWL “A Channel may contain Water” (All Channels enable Some ContainmentOfWater All TypicalChannels contain Some Water) Ontologies vs Databases: Issues Is it an instance or a concept? Water Winter Should it be stored in the ontology or database? East Anglia, Midlands, the Fens “A Burn is a Stream in Scotland” Identity Identity of Place - Topographic Identifiers (TOIDs) Woodland Naming Land Networks cover geography Itchen Valley Southampton, Basset A Road Populated Land Roundabout Overview Introduction to Ordnance Survey’s data Authoring topographic ontologies Open world modelling, closed world thinking Linking ontologies to our database Immature technology Data repurposing using ontologies has Form Sluice Gate Ordnance Survey ontology has Form Weir Sluice Weir Is a Flood defence Is a Environment Agency ontology OS Database Database - ontology mapping SPARQL query Query result D2RQ Server Joseki SPARQL service JDBC connection Oracle spatial database D2RQ RDF virtual graph D2RQ Map Jena OWL ontology DIG reasoner (e.g. Pellet) Database & ontology structural differences Ontologies designed to work with RDF triple data, not relational databases Don’t bury semantics in mapping file Efficiency is a big issue hasFootprint hasTOID Building Footprint has Use TOID Use is a University Building is a Database Feature Table TOID Type Form 1234 Building Church Place of Worship SDO_GEOMETRY Shape 5678 Inland Water River Inland Navigation SDO_GEOMETRY 9101 House Residence Residence … House Function Building …. … …. SDO_GEOMETRY SDO_GEOMETRY How can we do this… Ontology: River -> flowsInto some Sea Data: Forth rdf:type River Tay rdf:type River Clyde rdf:type River Forth flowsInto North_Sea Tay flowsInto North_Sea North_Sea rdf:type Sea Query: select ?a where {?b rdf:type Sea ?a flowsInto ?b} Closed World result: Forth, Tay Open World result: Clyde as well. Summary Domain experts find open-world thinking difficult Software tools still have some way to go Ontologies will help improve database design Open world vs closed world isn’t our biggest problem – content is.