All the queries in this tutorial can be verified against http://lod.openlinksw.com (LOD Cloud Cache) instance.
Also available are /sparql (basic SPARQL Endpoint) and /HtmlPivotViewer (HtmlPivotViewer Endpoint).
## Find items of each type
## whose coordinates fall within a bounded
## Geometry box shape: Box
SELECT ?href
?name
?name as ?Label
?f
?type
?latitude
?longitude
FROM <http://linkedgeodata.org>
WHERE
{
?href <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?f ;
<http://www.w3.org/2000/01/rdf-schema#label> ?name ;
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?p ;
geo:lat ?latitude ;
geo:long ?longitude .
?f <http://www.w3.org/2000/01/rdf-schema#label> ?type .
FILTER
(
bif:st_intersects
(
bif:st_geomfromtext
(
"BOX(0.3412 43.5141, 9.3412 48.0141)"
),
?p
)
)
FILTER (lang(?name) = "en")
}
LIMIT 1500
## See LOD Cloud /sparql Endpoint live results.
## See LOD Cloud Pivot Viewer live results.
## Find items of each type
## whose coordinates fall within a bounded
## Geometry box shape: Polygon
SELECT ?href
?name
?name as ?Label
?f
?type
?latitude
?longitude
FROM <http://linkedgeodata.org>
WHERE
{
?href <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?f ;
<http://www.w3.org/2000/01/rdf-schema#label> ?name ;
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?p ;
geo:lat ?latitude ;
geo:long ?longitude .
?f <http://www.w3.org/2000/01/rdf-schema#label> ?type .
FILTER
(
bif:st_intersects
(
bif:st_geomfromtext
(
"POLYGON((1 2, 6 1, 9 3, 8 5, 3 6, 1 2))"
),
?p
)
)
}
LIMIT 1500
## See LOD Cloud /sparql Endpoint live results.
## See LOD Cloud Pivot Viewer live results.
## Find items of each type
## whose coordinates fall within a bounded
## Geometry box shape: Polygon with hole
SELECT ?href
?name
?name as ?Label
?f
?type
?latitude
?longitude
FROM <http://linkedgeodata.org>
WHERE
{
?href <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?f ;
<http://www.w3.org/2000/01/rdf-schema#label> ?name ;
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?p ;
geo:lat ?latitude ;
geo:long ?longitude .
?f <http://www.w3.org/2000/01/rdf-schema#label> ?type .
FILTER
(
bif:st_intersects
(
bif:st_geomfromtext
(
"POLYGON((1 2, 6 1, 9 3, 8 5, 3 6, 1 2), (3 3, 5 5, 6 2, 3 3))"
),
?p
)
)
}
LIMIT 1500
## See LOD Cloud /sparql Endpoint live results.
## See LOD Cloud Pivot Viewer live results.
## Find items of each type
## whose coordinates fall within a bounded
## Geometry box shape: Multi Polygon
SELECT ?href
?name
?name as ?Label
?f
?type
?latitude
?longitude
FROM <http://linkedgeodata.org>
WHERE
{
?href <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?f ;
<http://www.w3.org/2000/01/rdf-schema#label> ?name ;
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?p ;
geo:lat ?latitude ;
geo:long ?longitude .
?f <http://www.w3.org/2000/01/rdf-schema#label> ?type .
FILTER
(
bif:st_intersects
(
bif:st_geomfromtext
(
"MULTIPOLYGON(((1 2, 6 1, 9 3, 3 6, 1 2)), ((4 9, 7 6, 9 8, 4 9)))"
),
?p
)
)
FILTER (lang(?name) = "en")
}
LIMIT 1500
## See LOD Cloud /sparql Endpoint live results.
## See LOD Cloud Pivot Viewer live results.
## Find items of each type
## whose coordinates fall within a bounded
## Geometry box shape: Geometry Collection
SELECT ?href
?name
?name as ?Label
?f
?type
?latitude
?longitude
FROM <http://linkedgeodata.org>
WHERE
{
?href <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?f ;
<http://www.w3.org/2000/01/rdf-schema#label> ?name ;
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?p ;
geo:lat ?latitude ;
geo:long ?longitude .
?f <http://www.w3.org/2000/01/rdf-schema#label> ?type .
FILTER
(
bif:st_intersects
(
bif:st_geomfromtext
(
"GEOMETRYCOLLECTION( POINT(4 5), POINT(7 4), POINT(6 2), Line String(4 5, 6 7, 7 4, 6 2), Polygon((1 2, 6 1, 9 3, 8 5, 3 6, 1 2)) )"
),
?p
)
)
FILTER (lang(?name) = "en")
}
LIMIT 1500
## See LOD Cloud /sparql Endpoint live results.
## See LOD Cloud Pivot Viewer live results.
## Find items of each type
## whose coordinates fall within a bounded
## Geometry box shape: Multi Point
SELECT ?href
?name
?name as ?Label
?f
?type
?latitude
?longitude
FROM <http://linkedgeodata.org>
WHERE
{
?href <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?f ;
<http://www.w3.org/2000/01/rdf-schema#label> ?name ;
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?p ;
geo:lat ?latitude ;
geo:long ?longitude .
?f <http://www.w3.org/2000/01/rdf-schema#label> ?type .
FILTER
(
bif:st_intersects
(
bif:st_geomfromtext
(
"MULTIPOINT(3 7, 4 2, 8 6)"
),
?p
)
)
}
LIMIT 1500
## See LOD Cloud /sparql Endpoint live results.
## See LOD Cloud Pivot Viewer live results.
## Find items of each type
## whose coordinates fall within a bounded
## Geometry box shape: Line String
SELECT ?href
?name
?name as ?Label
?f
?type
?latitude
?longitude
FROM <http://linkedgeodata.org>
WHERE
{
?href <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?f ;
<http://www.w3.org/2000/01/rdf-schema#label> ?name ;
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?p ;
geo:lat ?latitude ;
geo:long ?longitude .
?f <http://www.w3.org/2000/01/rdf-schema#label> ?type .
FILTER
(
bif:st_intersects
(
bif:st_geomfromtext
(
"LINESTRING(1 2, 3 6, 9 4)"
),
?p
)
)
}
LIMIT 1500
## See LOD Cloud /sparql Endpoint live results.
## See LOD Cloud Pivot Viewer live results.
## Find items of each type
## whose coordinates fall within a bounded
## Geometry box shape: Multi Line String
SELECT ?href
?name
?name as ?Label
?f
?type
?latitude
?longitude
FROM <http://linkedgeodata.org>
WHERE
{
?href <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?f ;
<http://www.w3.org/2000/01/rdf-schema#label> ?name ;
<http://www.w3.org/2003/01/geo/wgs84_pos#geometry> ?p ;
geo:lat ?latitude ;
geo:long ?longitude .
?f <http://www.w3.org/2000/01/rdf-schema#label> ?type .
FILTER
(
bif:st_intersects
(
bif:st_geomfromtext
(
"MULTILINESTRING((1 8, 4 4), (4 9, 8 5, 6 2, 1 4))"
),
?p
)
)
FILTER (lang(?name) = "en")
}
LIMIT 1500
## See LOD Cloud /sparql Endpoint live results.
## See LOD Cloud Pivot Viewer live results.