® OGC GeoSPARQL: Standardizing OGC GeoSPARQL: Standardizing Spatial Query on the Semantic Web Spatial Query on the Semantic Web Matthew Perry, Oracle 4th Annual Spatial Ontology Community of Practice Workshop USGS, 12201 Sunrise Valley Drive , Reston VA December 2, 2011
46
Embed
OGC GeoSPARQL : Standardizing Spatial Query on the Semantic Web
OGC GeoSPARQL : Standardizing Spatial Query on the Semantic Web. Matthew Perry, Oracle. 4th Annual Spatial Ontology Community of Practice Workshop USGS, 12201 Sunrise Valley Drive , Reston VA December 2, 2011. Agenda. About the OGC GeoSPARQL SWG Overview of GeoSPARQL Use Cases - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
®
OGC GeoSPARQL: Standardizing Spatial OGC GeoSPARQL: Standardizing Spatial Query on the Semantic WebQuery on the Semantic Web
Matthew Perry, Oracle
4th Annual Spatial Ontology Community of Practice Workshop
USGS, 12201 Sunrise Valley Drive , Reston VA
December 2, 2011
OGC®
AgendaAgenda
• About the OGC GeoSPARQL SWG
• Overview of GeoSPARQL– Use Cases– GeoSPARQL Vocabulary– Query Functions– Entailment Components
• GeoSPARQL FAQ
• Future Work
2
THE FOLLOWING IS INTENDED TO OUTLINE OUR GENERAL PRODUCT DIRECTION. IT IS INTENDED FOR INFORMATION PURPOSES ONLY, AND MAY NOT BE INCORPORATED INTO ANY CONTRACT. IT IS NOT A COMMITMENT TO DELIVER ANY MATERIAL, CODE, OR FUNCTIONALITY, AND SHOULD NOT BE RELIED UPON IN MAKING PURCHASING DECISION. THE DEVELOPMENT, RELEASE, AND TIMING OF ANY FEATURES OR FUNCTIONALITY DESCRIBED FOR ORACLE'S PRODUCTS REMAINS AT THE SOLE DISCRETION OF ORACLE.
3
OGC®
About the OGC GeoSPARQL SWGAbout the OGC GeoSPARQL SWG
4
OGC®
Group MembersGroup Members
• Open Geospatial Consortium standards working group– 13 voting members, 36 observers– Editors: Matthew Perry and John Herring– Chairs: John Herring and Dave Kolas
• Submitting Organizations– Australian Bureau of Meteorology
– Bentley Systems, Inc.
– CSIRO
– Defence Geospatial Information Working Group (DGIWG)
– GeoConnections - Natural Resources Canada
– Interactive Instruments GmbH
– Oracle America
– Ordnance Survey
– Raytheon Company
– Traverse Technologies, Inc.
– US Geological Survey (USGS)
OGC®
Standardization ProcessStandardization Process
6
OGC®
GeoSPARQL OverviewGeoSPARQL Overview
7
OGC®
Some Use CasesSome Use Cases
• Existing LOD RDF datasets with some simple spatial data– DBPedia, GeoNames, etc.– Mainly simple, WGS84 Lat Long points
• GIS applications with semantically complex thematic aspects– Reasoning based on complex land cover type hierarchy
• Qualitative reasoning applications without explicit geometries– RCC8-based reasoning
• Data integration applications– RDB2RDF + Federated SPARQL over spatial datasets
8
OGC®
Goals for GeoSPARQLGoals for GeoSPARQL
• Provide a common target for implementers & users– Oracle, BBN Parliament, Virtuoso, OWLIM, Franz, …
• Work within SPARQL’s extensibility framework• Simple enough for general users but capable enough for
GIS professionals• Accommodate systems based on qualitative spatial
reasoning and systems based on quantitative geometries• Don’t re-invent the wheel!
• Entailment Components– RIF rules to expand feature-feature query into geometry query– Gives a common interface for qualitative and quantitative systems
11
OGC®
Some Features of the SpecSome Features of the Spec
• Uses a Modular Design– Consists of several components
• Benefits– Vendors can easily identify what they support
• We support components X, Y and Z for WKT and GML serializations and Simple Features relations
– Extensible• Can easily add new components
• Can easily add new spatial relations and serializations
12
OGC®
GeoSPARQL VocabularyGeoSPARQL Vocabulary
13
OGC®
serializations
metadata
ogc:SpatialObject
ogc:Feature0 .. *
0 .. 1
ogc:hasGeometry
ogc:hasDefaultGeometry
ogc:Geometry
ogc:dimension : xsd:int
ogc:coordinateDimension : xsd:int
ogc:spatialDimension : xsd:int
ogc:isEmpty : xsd:boolean
ogc:isSimple : xsd:boolean
ogc:asWKT : ogc:WKTLiteral
ogc:asGML : ogc:GMLLiteral
…
GeoSPARQL Vocabulary: Basic Classes and RelationsGeoSPARQL Vocabulary: Basic Classes and Relations
Same as ISO GFI_Feature
Same as ISO GM_Object
14
Geometry encoded as a Literal
OGC®
All RDFS Literals of type ogc:WKTLiteral shall consist of an optional IRI identifying the spatial reference system followed by Simple Features Well Known Text (WKT) describing a geometric value [ISO 19125-1].
Basic graph pattern matching shall use the semantics defined by the RDFS Entailment Regime [W3C SPARQL Entailment]
Implementations shall support graph patterns involving terms from an RDFS/OWL class hierarchy of geometry types consistent with the one in the specified version of Simple Features / GML
Main Requirements:
OGC®
Simple Features Geometry TypesSimple Features Geometry Types
Basic graph pattern matching shall use the semantics defined by the RIF Core Entailment Regime [W3C SPARQL Entailment] for the RIF rules [W3C RIF Core] geor:sf-equals, geor:sf-disjoint, geor:sf-intersects, geor:sf-touches, geor:sf-crosses, geor:sf-within, geor:sf-contains, geor:sf-overlaps.
Main Requirement:
OGC®
Query Rewrite RulesQuery Rewrite Rules
• Used to compute Feature-Feature spatial relations based on default geometries
• Specified as a collection of RIF rules• Example: ogcr:sfEquals
Find all water bodies that are within 1 km of Route 3
Consistent way to pass geometry information around
Consistent way to select geometry information
Why Encode Geometry Data as a Literal?Why Encode Geometry Data as a Literal?
38
OGC®
Why is SRID encoded in Geometry Literal?Why is SRID encoded in Geometry Literal?
• The query functions need the SRID to perform computations
• SRID is really a property of the serialization not fundamental to the geometry itself
• GML already encodes it, only WKT has to be modified• Adding a separate property is redundant and potentially
inconsistent– Note: geometry type class is also redundant but can be useful for
entailment
• We have an ogcf:getSRID() function to aid in filtering based on SRID
39
OGC®
Why don’t you support W3C Basic Geo?Why don’t you support W3C Basic Geo?
• Too simple to meet our requirements– Can’t use different datums and coordinate systems – Limited number of geometry types
• W3C Basic Geo data can easily be converted to WKTLiteral
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>PREFIX ogc: <http://www.opengis.net/def/dataType/OGC-SF/1.0/>SELECT (STRDT(CONCAT("POINT(",?long," ",?lat,")"), ogc:WKTLiteral) AS ?wktLit) WHERE { ?point geo:long ?long . ?point geo:lat ?lat }
40
OGC®
Can I support both GML and WKT?Can I support both GML and WKT?
• YES• A valid GMLLiteral is an invalid WKTLiteral and vice versa• An operation on these two objects is an error according to
the GeoSPARQL spec, but …
41
From Section 11.3.1 of the SPARQL specification [W3C SPARQL] (http://www.w3.org/TR/rdf-sparql-query/#operatorExtensibility):
SPARQL language extensions may provide additional associations between operators and operator functions; this amounts to adding rows to the table above. No additional operator may yield a result that replaces any result other than a type error in the semantics defined above. The consequence of this rule is that SPARQL extensions will produce at least the same solutions as an unextended implementation, and may, for some queries, produce more solutions.
OGC®
Why no Universal Geometry Ontology?Why no Universal Geometry Ontology?
• Geometry types in existing standards are different abstractions– e.g. Polygon edges can be arcs in ISO 19107 / GML but must be
straight lines in Simple Features
• Any hierarchy we get may be too restrictive– You should be able to conceptualize a geometry any way you want
as long as you can support the required operations.
• All we’re left with is a single root Geometry class in the core vocabulary– More detailed Geometry types are available with RDFS Entailment
Extension– Supported Geometry types tied to serialization
• Can’t use a geometry type if you can’t serialize it
42
OGC®
Why do I have to support RDFS entailment?Why do I have to support RDFS entailment?
• Support for only geometry literals and query functions could be a popular use case
• All entailment requirements are contained in a separate conformance class– RDFS Entailment Extension (serialization, version)– Query Rewrite Extension (serialization, version, relation_family)