Re: ANN: geometry2rdf software library

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 
similar).

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 
SPARQL.

Next, the (inefficient) query without geospatial support
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
SELECT  ?subject ?label ?latitude2 ?longitude2
WHERE {
<http://geo.linkeddata.es/resource/Municipio/Mora> 
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?g.
                ?g geo:lat ?latitude. ?g geo:long ?longitude.
                ?subject 
<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_distance(bif:st_point(?longitude,?latitude),
              bif:st_point(?longitude2,?latitude2)) ) as ?distancia 
?latitude ?longitude
WHERE {
<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.

Boris

[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