Extract data from linkedgeodata.org

I am trying to get data from linkedgeodata.org/sparql

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

But the answer is empty. I want to get restaurants in Bratislava .... 5 km from the coordinates.

I used a similar sparql code, as in the example, I changed only the class to the restaurant and the coordinates of the city, so I do not know where I am wrong. (http://linkedgeodata.org/OnlineAccess/SparqlEndpoints?v= bpg)

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.372966, 51.310228), 0.1)) .
}
+5
source share
1 answer

You can see all types of things that fall into these coordinates by running the following query:

Prefix lgdo: <http://linkedgeodata.org/ontology/>
Select ?type, count(?s)
From <http://linkedgeodata.org>
{
    ?s a ?type .
    ?s rdfs:label ?l .
    ?s geo:geometry ?g .
Filter(bif:st_intersects (?g, bif:st_point (48.143889, 17.109722), 5.1)) .
} GROUP BY ?type

This query, using GROUP BYand COUNT, gives you calculations for all the different ones types. As you can see, there are no restaurants in the geographical area. Your request is not erroneous, the database does not contain restaurants for the given coordinates.

+3
source

All Articles