ソースを参照

some queries and info about properties

Raul Palma 5 年 前
コミット
cbf7ff77d0

+ 31 - 0
cz-full-spoi-construct-better-sfWithin.sparql

@@ -0,0 +1,31 @@
+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 olu-instance: <http://w3id.org/foodie/olu/LandUse/22165431>
+PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+PREFIX dc: <http://purl.org/dc/elements/1.1/>
+PREFIX poi: <http://www.openvoc.eu/poi#>
+PREFIX dct: <http://purl.org/dc/terms/1.1/>
+PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
+PREFIX locn: <http://www.w3.org/ns/locn#>
+
+
+### WORKS WITH SMALL NUMBER OF TRIPLES, WILL ALL TRIPLES IT DOES NOT WORK 
+
+CONSTRUCT {?Resource ?p ?o } 
+FROM <http://www.sdi4apps.eu/poi.rdf>
+WHERE { 
+   ?Resource ?p ?o .
+   GRAPH ?g {
+        SELECT DISTINCT ?Resource FROM <http://www.sdi4apps.eu/poi.rdf> WHERE {  ##
+  	    ?Resource a ?POI_Class .
+  	    ?Resource geo:sfWithin <http://dbpedia.org/resource/Czech_Republic> .
+  	    } ORDER BY ASC(?Resource)   ###
+   }
+}
+GROUP BY ?Resource ?p ?o
+#ORDER BY ?Resource
+#OFFSET 0
+LIMIT 100000

+ 28 - 0
cz-full-spoi-construct-polygon-aprox.sparql

@@ -0,0 +1,28 @@
+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 olu-instance: <http://w3id.org/foodie/olu/LandUse/22165431>
+PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+PREFIX dc: <http://purl.org/dc/elements/1.1/>
+PREFIX poi: <http://www.openvoc.eu/poi#>
+PREFIX dct: <http://purl.org/dc/terms/1.1/>
+PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
+PREFIX locn: <http://www.w3.org/ns/locn#>
+
+
+### WORKS WITH SMALL NUMBER OF TRIPLES, WILL ALL TRIPLES IT DOES NOT WORK 
+
+
+CONSTRUCT { ?Resource ?p ?o } 
+FROM <http://www.sdi4apps.eu/poi.rdf>
+WHERE { ?Resource ?p ?o .
+   GRAPH ?g { 
+  	?Resource a ?POI_Class .
+  	?Resource geo:asWKT ?Coordinates .
+  	?Resource ?p ?o .
+  	FILTER(bif:st_intersects (?Coordinates, bif:st_geomFromText("POLYGON((12.805550244791675 50.44110310248771,14.453499463541675 50.97679985865346,15.365364697916675 50.907574557509825,16.387093213541675 50.636610300310906,17.309944776041675 50.30095867480735,18.035042432291675 50.026485564958456,18.880989697916675 49.52275194210202,18.188851026041675 49.25816551764307,17.760384229166675 48.88390343585812,17.189095166666675 48.847768061048605,16.947395947916675 48.601355238570925,16.222298291666675 48.731959479050985,15.024788526041675 49.013774785025085,14.552376416666675 48.58682276011454,14.014046338541675 48.601355238570925,13.761360791666675 48.833306604672416,13.234017041666675 49.114552196164965,12.805550244791675 49.35844690296278,12.410042432291675 49.76462984717475,12.530892041666675 49.92757212334005,12.201302197916675 50.146321472693394,12.805550244791675 50.44110310248771))"))) .
+  	}
+}
+limit 10

ファイルの差分が大きいため隠しています
+ 87 - 0
cz-full-spoi-polygon.sparql


+ 13 - 0
spoi-quality-address.sparql

@@ -0,0 +1,13 @@
+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#>
+
+SELECT ?Resource
+FROM <http://www.sdi4apps.eu/poi.rdf>
+WHERE {
+  ?Resource poi:address	?address .
+}
+GROUP BY ?Resource
+HAVING(COUNT(?address) > 1)

+ 14 - 0
spoi-quality-coordinates.sparql

@@ -0,0 +1,14 @@
+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#>
+
+SELECT ?Resource
+FROM <http://www.sdi4apps.eu/poi.rdf>
+WHERE {
+  #?Resource a ?POI_Class .
+  ?Resource geo:asWKT ?Coordinates .
+}
+GROUP BY ?Resource
+HAVING(COUNT(?Coordinates) > 1)

+ 91 - 0
unique-should-properties-spoi-sparql.txt

@@ -0,0 +1,91 @@
+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

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません