geo:asWKT (errors)
poi:address (no)
dc:identifier (no)
dc:rights (no)
locn:locatorDesignator (error)
locn:adminUnitL1 (no)
locn:fullAddress (error)
locn:postCode (no)
locn:postName (error)
poi:region (error)
<http://www.w3.org/ns/locnfullAddress> (no)


PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX virtrdf:	<http://www.openlinksw.com/schemas/virtrdf#> 
PREFIX poi: <http://www.openvoc.eu/poi#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT ?Resource
FROM <http://www.sdi4apps.eu/poi.rdf>
WHERE {
  ?Resource poi:region ?obj .
}
GROUP BY ?Resource
HAVING(COUNT(?obj) > 1)
#limit 10


### different languages label
''
ru
de
pt
en
fr
it
cs
ro
pl
fi
la
es
cz
lv

PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX virtrdf:	<http://www.openlinksw.com/schemas/virtrdf#> 
PREFIX poi: <http://www.openvoc.eu/poi#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT distinct (lang(?obj))
FROM <http://www.sdi4apps.eu/poi.rdf>
WHERE {
  ?Resource rdfs:label ?obj .
}


#### different language title
''
en
de
cs



PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX virtrdf:	<http://www.openlinksw.com/schemas/virtrdf#> 
PREFIX poi: <http://www.openvoc.eu/poi#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT ?Resource1 ?Resource2
FROM <http://www.sdi4apps.eu/poi/czech>
WHERE {
  ?Resource1 a ?type1 .
  ?Resource1 rdfs:label ?label1 .
  ?Resource2 a ?type2 .
  ?Resource2 rdfs:label ?label2 .
  #FILTER(lcase(str(?label1) = lcase(str(?label1) ) .
  FILTER ( ?Resource1 != ?Resource2 )
  FILTER regex(?label1, ?label2, "i")
}
limit 10

###

PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX virtrdf:	<http://www.openlinksw.com/schemas/virtrdf#> 
PREFIX poi: <http://www.openvoc.eu/poi#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT DISTINCT ?Resource1 ?Resource2
FROM <http://www.sdi4apps.eu/poi.rdf>
WHERE {
  ?Resource1 a ?type1 .
  ?Resource1 rdfs:label ?label1 .
  ?Resource2 a ?type2 .
  ?Resource2 rdfs:label ?label2 .
  FILTER (lcase(str(?label1)) = lcase(str(?label2) )) .
  FILTER ( ?Resource1 != ?Resource2 )
  #FILTER bif:contains(str(?label1), str(?label2))
}
limit 10

########

PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
PREFIX virtrdf:	<http://www.openlinksw.com/schemas/virtrdf#> 
PREFIX poi: <http://www.openvoc.eu/poi#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX locn: <http://www.w3.org/ns/locn#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX units: <http://www.opengis.net/def/uom/OGC/1.0/>

SELECT DISTINCT ?Resource1 ?Resource2 ?distance
FROM <http://www.sdi4apps.eu/poi/czech>
WHERE {
  ?Resource1 a ?type1 .
  ?Resource1 rdfs:label ?label1 .
  ?Resource1 geo:asWKT ?geo1 .
  ?Resource2 a ?type2 .
  ?Resource2 rdfs:label ?label2 .
  ?Resource2 geo:asWKT ?geo2 .
  FILTER (lcase(str(?label1)) = lcase(str(?label2) )) .
  FILTER ( ?Resource1 != ?Resource2 && ?Resource1 < ?Resource2)  
  FILTER (NOT EXISTS {?x a ?Resource1} && NOT EXISTS {?y a ?Resource2}) .
  BIND (geof:distance ( ?geo1 , ?geo2 , units:meter ) as ?distance) .
  FILTER ( ?distance < 1000 )
}
LIMIT 1000
OFFSET 0