W3C home > Mailing lists > Public > public-lod@w3.org > January 2011

Re: ANN: geometry2rdf software library

From: Boris Villazón Terrazas <bvillazon@fi.upm.es>
Date: Tue, 18 Jan 2011 10:51:29 +0100
Message-ID: <4D3562A1.1000704@fi.upm.es>
To: Giovanni Tummarello <giovanni.tummarello@deri.org>
CC: public-lod <public-lod@w3.org>
Hi Giovanni

I'll try to do my best to explain the potential benefits of this 
exposure of geometry with an example.

For example, let's suppose that you are going for holidays to visit the 
Mora Municipality in Spain. Since you practice water-related sports, you 
may want to know resources for this within a specific distance (bounding 
box) of this municipality (e.g., beaches, lakes, rivers or something 

In the geospatial context, the transformation and publication of the 
OpenStreetMap [1], Ordnance Survey [2], and GeoLinkedData [3] data 
according to the Linked Data principles have added a new dimension to 
the Web of Data. In this way spatial data can be retrieved and interlinked.

For our example, we query the GeoLinkedData [3] for that purpose. 
GeoLinkedData [3] has geospatial resources like rivers, lakes, 
reservoirs, etc. Most of these resources have associated geometry 
objects. These geometry objects consist basically of points, and 
linestrings, for example, the course of a river. SPARQLing for them and 
putting them on a map isn't too hard.  So, you can express this query in 

Next, the (inefficient) query without geospatial support
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
SELECT  ?subject ?label ?latitude2 ?longitude2
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?g.
                ?g geo:lat ?latitude. ?g geo:long ?longitude.
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?g2. ?g2 geo:lat 
?latitude2. ?g2 geo:long ?longitude2.
                ?subject rdfs:label ?label.
                FILTER(xsd:double(?latitude2) - xsd:double(?latitude) <= 
0.1 && xsd:double(?latitude) - xsd:double(?latitude2) <= 0.1 &&
                xsd:double(?longitude2) - xsd:double(?longitude) <= 0.1 
&& xsd:double(?longitude) - xsd:double(?longitude2) <= 0.1 &&
                lang(?label) = "es").
limit 20

Next, a similar query with RDF-based geospatial support

PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
SELECT ?subject ?latitude2 ?longitude2 
              bif:st_point(?longitude2,?latitude2)) ) as ?distancia 
?latitude ?longitude
<http://geo.linkeddata.es/resource/Municipio/Mora> geo:geometry ?g .
                 ?g geo:lat ?latitude. ?g geo:long ?longitude.
                 ?subject geo:geometry ?g2.
                 ?g2 geo:lat ?latitude2. ?g2 geo:long ?longitude2.
} limit 20

As you may know there are some SPARQL extensions for geometry and 
geographical data, and people are using that. You can check the Virtuoso 
mailing list to see how many people are asking/using the Virtuoso 
geospatial features. And there are lots of additional queries that you 
can do, for example: distance between two resources, intersection with 
respect a point, etc. Of course, this does not necessarily have to 
substitute (either partially or completely) the native support that many 
geographical databases already provide, and for which they are very well 
designed and tested in production environments. The situation is that 
sometimes it may prove to be interesting to have (some of) this data in 
RDF as well, so that inclusion in SPARQL queries is easier. It may be 
considered similar to why we make transformations of (partial or 
complete) relational databases into RDF.

I hope I explained well.


[1] http://www.openstreetmap.org/
[2] http://www.ordnancesurvey.co.uk/
[3] http://geo.linkeddata.es/

On 17/01/2011 14:07, Giovanni Tummarello wrote:
> Boris would you be able to provide a bit of explanation on why would
> you want o do that e.g. what evidence are there (nice use cases) were
> an rdf export of low level features in the map is of use
> thanks!
> Gio
> On Mon, Jan 17, 2011 at 2:34 AM, Boris Villazón Terrazas
> <bvillazon@fi.upm.es>  wrote:
>> Victor, Miguel Angel and Boris
Received on Tuesday, 18 January 2011 09:51:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:16:11 UTC