SPARQL Endpoints

We now have a SPARQL Endpoint powered by OpenLink's Virtuoso database system.
Currently the Relevant-NodeTags and Way Tags datasets are loaded.


In this section example queries will be gathered.


Note: The predicate

bif:st_intersects
is used to efficiently find points in the vicinity of a given point. The first two arguments must be (point-)geometries whereas the third argument specifies the maximum distance between them in kilometers for which the predicate evaluates to true.


Find all schools within a 5km radius around a specific location, and for each school find coffeeshops that are closer than 1km.

PREFIX lgdo: <http://linkedgeodata.org/ontology/>
SELECT ?schoolname ?schoolgeo ?coffeeshopname ?coffeeshopgeo
FROM <http://linkedgeodata.org>
WHERE {
    ?school     a            lgdo:School .
    ?school     geo:geometry ?schoolgeo .
    ?school     rdfs:label   ?schoolname .

    ?coffeeshop a            lgdo:CoffeeShop .
    ?coffeeshop geo:geometry ?coffeeshopgeo .
    ?coffeeshop rdfs:label   ?coffeeshopname .

    FILTER(
        bif:st_intersects (?schoolgeo, bif:st_point (4.89222252.373056), 5) &&
        bif:st_intersects (?coffeeshopgeo, ?schoolgeo, 1)
    ) .
}

Click here to run the query


Retrieve all amenities 100m from Connewitz Kreuz

Prefix lgdo: <http://linkedgeodata.org/ontology/>
Select *
From <http://linkedgeodata.org>
{
    ?s a lgdo:Amenity .
    ?s rdfs:label ?l .
    ?s geo:geometry ?g .
    Filter(bif:st_intersects (?g, bif:st_point (12.37296651.310228), 0.1)) .
}

Click here to run the query


Get all icons associated with the schema.

PREFIX lgdo: <http://linkedgeodata.org/ontology/>
SELECT *
FROM <http://linkedgeodata.org>
WHERE {
    ?s lgdo:schemaIcon ?o .
}

Click here to run the query



 
There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]

Information

Last Modification: 2011-05-02 11:08:47 by Claus Stadler