Database Reference
In-Depth Information
(RCC8) spatial relations that it uses. Here, we show how these are used in the query
language itself, which defines spatial extensions to SPARQL and is about to be pub-
lished as an Open Geospatial Consortium (OGC) standard in its own right (Perry
and Herring, 2011). GeoSPARQL consists of
An RDF/OWL vocabulary for representing spatial information
A set of functions for spatial calculations
A set of query transformation rules
GeoSPARQL models some spatial concepts in an OWL ontology; for example,
it has SpatialObject as its top-level class, with a direct subclass of Feature. There
are also classes for geometry objects and RDFS datatypes for representing geom-
etry data (such as points, lines, and polygons as discussed in Chapter 6). The prop-
erty geo:hasGeometry links a feature with a geometry that represents its spatial
extent and geo:asGML relates a geometry to its Geography Markup Language
(GML) serialization. A feature can have multiple geometries. This step, of separat-
ing the concept of the object from the concept of its spatial representation (footprint,
or point location), is very important as it allows us to separate the logical reasoning
we want to carry out on the semantics from the geometric calculations we need to
carry out on the spatial data. There are also a number of properties for spatial rela-
tionships, with three different families of spatial relations included as part of the
standard: the Simple Feature Relations model, the RCC8 spatial relations, and the
Egenhofer 9 Intersection model relationships. These can be used directly in SPARQL
triple patterns to test whether spatial relationships exist between two instances of
geo:SpatialObject .
A number of functions are available in GeoSPARQL for spatial calculations, for
example, geof:distance , which returns the shortest distance in units between
any two points in two geometric objects as calculated in a particular spatial reference
system. Also, geof:buffer returns a geometric object that represents all points
whose distance from the geometric object is less than or equal to the given radius.
Other functions that can be used are geof:convexHull , geof:intersection ,
geof:union , geof:difference , geof:envelope , and geof:boundary .
Finally, GeoSPARQL includes a set of query transformation rules (specified in
the Rule Interchange Format), which expands a triple pattern using a spatial predi-
cate into a set of triple patterns plus a Boolean query function. That is, the rules map
each of the spatial relations onto a function, which actually does the calculations on
the geometries to see whether the spatial relationship holds.
Using GeoSPARQL, we can, for example, pose the query “Find the pubs in
Merea” (where the “in” means “spatially contained in”):
1. prefix geosparql: < http://www.opengis.net/def/geosparql/ >
2. prefix mm: < http://mereamaps.gov.me/topo/ >
3. prefix admin: < http://mereamaps.gov.me/administrativeRegions/ >
4. select distinct ?pub where {
5. graph < http://data.mereamaps.gov.me > {
6. < http://data.mereamaps.gov.me/0001 > a admin:Country;
Search WWH ::




Custom Search