query-5be98a85f83796fe5f458587f1ce7517
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wds: <http://www.wikidata.org/entity/statement/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT ?place ?placeLabel ?location ?layer ?distance WHERE {
{
{
SELECT ?place ?gnisPt ?distance WHERE {
VALUES (?ps ?place ?gnisPt ?gnisid ?distance) {
(wds:Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3 wd:Q34920071 "Point(-89.8838357,32.5608125)"^^geo:wktLiteral "676892" "9.635"^^xsd:double )
(wds:Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3 wd:Q34920071 "Point(-89.8838357,32.5608125)"^^geo:wktLiteral "676892" "9.635"^^xsd:double )
(wds:Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3 wd:Q34920071 "Point(-89.8838357,32.5608125)"^^geo:wktLiteral "676892" "9.635"^^xsd:double )
(wds:q4491409-D1B5021F-C153-418C-BC64-09CCA34A1DCB wd:Q4491409 "Point(-78.3957169,35.9040142)"^^geo:wktLiteral "999761" "10.139"^^xsd:double )
(wds:q6476491-BED67AE3-7F33-4E16-9D24-09ADD5392B9C wd:Q6476491 "Point(-115.2357799,48.5436406)"^^geo:wktLiteral "806845" "11.819"^^xsd:double )
(wds:q4311340-A539AE60-F711-4273-AA21-6BB82E7615A3 wd:Q4311340 "Point(-107.051753,36.6717657)"^^geo:wktLiteral "892389" "12.911"^^xsd:double )
(wds:q4311340-A539AE60-F711-4273-AA21-6BB82E7615A3 wd:Q4311340 "Point(-107.051753,36.6717657)"^^geo:wktLiteral "892389" "12.911"^^xsd:double )
(wds:q7331396-87B5F12B-6C39-436B-BFEB-3881CE34AECD wd:Q7331396 "Point(-96.9508621,35.2056252)"^^geo:wktLiteral "1946039" "18.016"^^xsd:double )
(wds:Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C wd:Q49701832 "Point(-79.4523432,40.2355775)"^^geo:wktLiteral "1180051" "18.736"^^xsd:double )
(wds:Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C wd:Q49701832 "Point(-79.4523432,40.2355775)"^^geo:wktLiteral "1180051" "18.736"^^xsd:double )
(wds:Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C wd:Q49701832 "Point(-79.4523432,40.2355775)"^^geo:wktLiteral "1180051" "18.736"^^xsd:double )
(wds:Q1616130-ef10340f-4255-557b-8b04-e059d77b0128 wd:Q1616130 "Point(-121.3699417,37.6260417)"^^geo:wktLiteral "243393" "28.251"^^xsd:double )
}
FILTER EXISTS { ?place wdt:P590 [] }
}
} ?place wdt:P625 ?location.
BIND( 'wiki' as ?layer )
} UNION {
{
SELECT ?place ?gnisPt ?distance WHERE {
VALUES (?ps ?place ?gnisPt ?gnisid ?distance) {
(wds:Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3 wd:Q34920071 "Point(-89.8838357,32.5608125)"^^geo:wktLiteral "676892" "9.635"^^xsd:double )
(wds:Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3 wd:Q34920071 "Point(-89.8838357,32.5608125)"^^geo:wktLiteral "676892" "9.635"^^xsd:double )
(wds:Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3 wd:Q34920071 "Point(-89.8838357,32.5608125)"^^geo:wktLiteral "676892" "9.635"^^xsd:double )
(wds:q4491409-D1B5021F-C153-418C-BC64-09CCA34A1DCB wd:Q4491409 "Point(-78.3957169,35.9040142)"^^geo:wktLiteral "999761" "10.139"^^xsd:double )
(wds:q6476491-BED67AE3-7F33-4E16-9D24-09ADD5392B9C wd:Q6476491 "Point(-115.2357799,48.5436406)"^^geo:wktLiteral "806845" "11.819"^^xsd:double )
(wds:q4311340-A539AE60-F711-4273-AA21-6BB82E7615A3 wd:Q4311340 "Point(-107.051753,36.6717657)"^^geo:wktLiteral "892389" "12.911"^^xsd:double )
(wds:q4311340-A539AE60-F711-4273-AA21-6BB82E7615A3 wd:Q4311340 "Point(-107.051753,36.6717657)"^^geo:wktLiteral "892389" "12.911"^^xsd:double )
(wds:q7331396-87B5F12B-6C39-436B-BFEB-3881CE34AECD wd:Q7331396 "Point(-96.9508621,35.2056252)"^^geo:wktLiteral "1946039" "18.016"^^xsd:double )
(wds:Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C wd:Q49701832 "Point(-79.4523432,40.2355775)"^^geo:wktLiteral "1180051" "18.736"^^xsd:double )
(wds:Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C wd:Q49701832 "Point(-79.4523432,40.2355775)"^^geo:wktLiteral "1180051" "18.736"^^xsd:double )
(wds:Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C wd:Q49701832 "Point(-79.4523432,40.2355775)"^^geo:wktLiteral "1180051" "18.736"^^xsd:double )
(wds:Q1616130-ef10340f-4255-557b-8b04-e059d77b0128 wd:Q1616130 "Point(-121.3699417,37.6260417)"^^geo:wktLiteral "243393" "28.251"^^xsd:double )
}
FILTER EXISTS { ?place wdt:P590 [] }
}
} BIND( ?gnisPt AS ?location )
BIND( 'gnis' as ?layer )
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?label
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v9("?distance"):::projected
v9("?gnisPt")
v9("?gnisid")
v1("?label")
v9("?layer"):::projected
v9("?location"):::projected
v9("?place"):::projected
v9("?ps")
a1((" "))
a2((" "))
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
f0[[" "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P590"--> e0a1
e0v1("?place"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v9
f0 --> c1
f0 --> a2
v9 --"wdt:P590"--> a2
bind1[/VALUES ?distance ?gnisPt ?gnisid ?place ?ps/]
bind1-->v9
bind1-->v9
bind1-->v9
bind1-->v9
bind1-->v9
bind10(["wd:statement/Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3"])
bind10 --> bind1
bind11(["wd:Q34920071"])
bind11 --> bind1
bind12([sPoint(-89.8838357,32.5608125)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind12 --> bind1
bind13(["676892"])
bind13 --> bind1
bind14(["9.635^^xsd:double"])
bind14 --> bind1
bind15(["wd:statement/Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3"])
bind15 --> bind1
bind16(["wd:Q34920071"])
bind16 --> bind1
bind17([sPoint(-89.8838357,32.5608125)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind17 --> bind1
bind18(["676892"])
bind18 --> bind1
bind19(["9.635^^xsd:double"])
bind19 --> bind1
bind110(["wd:statement/Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3"])
bind110 --> bind1
bind111(["wd:Q34920071"])
bind111 --> bind1
bind112([sPoint(-89.8838357,32.5608125)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind112 --> bind1
bind113(["676892"])
bind113 --> bind1
bind114(["9.635^^xsd:double"])
bind114 --> bind1
bind115(["wd:statement/q4491409-D1B5021F-C153-418C-BC64-09CCA34A1DCB"])
bind115 --> bind1
bind116(["wd:Q4491409"])
bind116 --> bind1
bind117([sPoint(-78.3957169,35.9040142)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind117 --> bind1
bind118(["999761"])
bind118 --> bind1
bind119(["10.139^^xsd:double"])
bind119 --> bind1
bind120(["wd:statement/q6476491-BED67AE3-7F33-4E16-9D24-09ADD5392B9C"])
bind120 --> bind1
bind121(["wd:Q6476491"])
bind121 --> bind1
bind122([sPoint(-115.2357799,48.5436406)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind122 --> bind1
bind123(["806845"])
bind123 --> bind1
bind124(["11.819^^xsd:double"])
bind124 --> bind1
bind125(["wd:statement/q4311340-A539AE60-F711-4273-AA21-6BB82E7615A3"])
bind125 --> bind1
bind126(["wd:Q4311340"])
bind126 --> bind1
bind127([sPoint(-107.051753,36.6717657)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind127 --> bind1
bind128(["892389"])
bind128 --> bind1
bind129(["12.911^^xsd:double"])
bind129 --> bind1
bind130(["wd:statement/q4311340-A539AE60-F711-4273-AA21-6BB82E7615A3"])
bind130 --> bind1
bind131(["wd:Q4311340"])
bind131 --> bind1
bind132([sPoint(-107.051753,36.6717657)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind132 --> bind1
bind133(["892389"])
bind133 --> bind1
bind134(["12.911^^xsd:double"])
bind134 --> bind1
bind135(["wd:statement/q7331396-87B5F12B-6C39-436B-BFEB-3881CE34AECD"])
bind135 --> bind1
bind136(["wd:Q7331396"])
bind136 --> bind1
bind137([sPoint(-96.9508621,35.2056252)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind137 --> bind1
bind138(["1946039"])
bind138 --> bind1
bind139(["18.016^^xsd:double"])
bind139 --> bind1
bind140(["wd:statement/Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C"])
bind140 --> bind1
bind141(["wd:Q49701832"])
bind141 --> bind1
bind142([sPoint(-79.4523432,40.2355775)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind142 --> bind1
bind143(["1180051"])
bind143 --> bind1
bind144(["18.736^^xsd:double"])
bind144 --> bind1
bind145(["wd:statement/Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C"])
bind145 --> bind1
bind146(["wd:Q49701832"])
bind146 --> bind1
bind147([sPoint(-79.4523432,40.2355775)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind147 --> bind1
bind148(["1180051"])
bind148 --> bind1
bind149(["18.736^^xsd:double"])
bind149 --> bind1
bind150(["wd:statement/Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C"])
bind150 --> bind1
bind151(["wd:Q49701832"])
bind151 --> bind1
bind152([sPoint(-79.4523432,40.2355775)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind152 --> bind1
bind153(["1180051"])
bind153 --> bind1
bind154(["18.736^^xsd:double"])
bind154 --> bind1
bind155(["wd:statement/Q1616130-ef10340f-4255-557b-8b04-e059d77b0128"])
bind155 --> bind1
bind156(["wd:Q1616130"])
bind156 --> bind1
bind157([sPoint(-121.3699417,37.6260417)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind157 --> bind1
bind158(["243393"])
bind158 --> bind1
bind159(["28.251^^xsd:double"])
bind159 --> bind1
bind2[/"?gnisPt"/]
v9 --o bind2
bind2 --as--o v9
bind3[/"'gnis'"/]
bind3 --as--o v9
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f4[[" "]]
subgraph f4e1["Exists Clause"]
e1v1 --"wdt:P590"--> e1a1
e1v1("?place"):::projected
e1a1((" ")):::projected
end
f4--EXISTS--> f4e1
f4 --> v9
f4 --> c1
f4 --> a1
v9 --"wdt:P590"--> a1
bind5[/VALUES ?distance ?gnisPt ?gnisid ?place ?ps/]
bind5-->v9
bind5-->v9
bind5-->v9
bind5-->v9
bind5-->v9
bind50(["wd:statement/Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3"])
bind50 --> bind5
bind51(["wd:Q34920071"])
bind51 --> bind5
bind52([sPoint(-89.8838357,32.5608125)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind52 --> bind5
bind53(["676892"])
bind53 --> bind5
bind54(["9.635^^xsd:double"])
bind54 --> bind5
bind55(["wd:statement/Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3"])
bind55 --> bind5
bind56(["wd:Q34920071"])
bind56 --> bind5
bind57([sPoint(-89.8838357,32.5608125)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind57 --> bind5
bind58(["676892"])
bind58 --> bind5
bind59(["9.635^^xsd:double"])
bind59 --> bind5
bind510(["wd:statement/Q34920071-BF7F5206-0A46-4D09-BFCB-CE19ABB75EC3"])
bind510 --> bind5
bind511(["wd:Q34920071"])
bind511 --> bind5
bind512([sPoint(-89.8838357,32.5608125)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind512 --> bind5
bind513(["676892"])
bind513 --> bind5
bind514(["9.635^^xsd:double"])
bind514 --> bind5
bind515(["wd:statement/q4491409-D1B5021F-C153-418C-BC64-09CCA34A1DCB"])
bind515 --> bind5
bind516(["wd:Q4491409"])
bind516 --> bind5
bind517([sPoint(-78.3957169,35.9040142)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind517 --> bind5
bind518(["999761"])
bind518 --> bind5
bind519(["10.139^^xsd:double"])
bind519 --> bind5
bind520(["wd:statement/q6476491-BED67AE3-7F33-4E16-9D24-09ADD5392B9C"])
bind520 --> bind5
bind521(["wd:Q6476491"])
bind521 --> bind5
bind522([sPoint(-115.2357799,48.5436406)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind522 --> bind5
bind523(["806845"])
bind523 --> bind5
bind524(["11.819^^xsd:double"])
bind524 --> bind5
bind525(["wd:statement/q4311340-A539AE60-F711-4273-AA21-6BB82E7615A3"])
bind525 --> bind5
bind526(["wd:Q4311340"])
bind526 --> bind5
bind527([sPoint(-107.051753,36.6717657)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind527 --> bind5
bind528(["892389"])
bind528 --> bind5
bind529(["12.911^^xsd:double"])
bind529 --> bind5
bind530(["wd:statement/q4311340-A539AE60-F711-4273-AA21-6BB82E7615A3"])
bind530 --> bind5
bind531(["wd:Q4311340"])
bind531 --> bind5
bind532([sPoint(-107.051753,36.6717657)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind532 --> bind5
bind533(["892389"])
bind533 --> bind5
bind534(["12.911^^xsd:double"])
bind534 --> bind5
bind535(["wd:statement/q7331396-87B5F12B-6C39-436B-BFEB-3881CE34AECD"])
bind535 --> bind5
bind536(["wd:Q7331396"])
bind536 --> bind5
bind537([sPoint(-96.9508621,35.2056252)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind537 --> bind5
bind538(["1946039"])
bind538 --> bind5
bind539(["18.016^^xsd:double"])
bind539 --> bind5
bind540(["wd:statement/Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C"])
bind540 --> bind5
bind541(["wd:Q49701832"])
bind541 --> bind5
bind542([sPoint(-79.4523432,40.2355775)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind542 --> bind5
bind543(["1180051"])
bind543 --> bind5
bind544(["18.736^^xsd:double"])
bind544 --> bind5
bind545(["wd:statement/Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C"])
bind545 --> bind5
bind546(["wd:Q49701832"])
bind546 --> bind5
bind547([sPoint(-79.4523432,40.2355775)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind547 --> bind5
bind548(["1180051"])
bind548 --> bind5
bind549(["18.736^^xsd:double"])
bind549 --> bind5
bind550(["wd:statement/Q49701832-B00165FB-F5DA-45DE-9A41-B9526E69517C"])
bind550 --> bind5
bind551(["wd:Q49701832"])
bind551 --> bind5
bind552([sPoint(-79.4523432,40.2355775)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind552 --> bind5
bind553(["1180051"])
bind553 --> bind5
bind554(["18.736^^xsd:double"])
bind554 --> bind5
bind555(["wd:statement/Q1616130-ef10340f-4255-557b-8b04-e059d77b0128"])
bind555 --> bind5
bind556(["wd:Q1616130"])
bind556 --> bind5
bind557([sPoint(-121.3699417,37.6260417)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind557 --> bind5
bind558(["243393"])
bind558 --> bind5
bind559(["28.251^^xsd:double"])
bind559 --> bind5
v9 --"wdt:P625"--> v9
bind6[/"'wiki'"/]
bind6 --as--o v9
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end