query-bdafad6bef123b0af6ed6dec01e63216
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
#defaultView:Map
SELECT ?place ?placeLabel ?location ?layer WHERE {
{
{
SELECT ?place ?gnisPt WHERE {
VALUES (?ps ?place ?gnisPt ?gnisid ?distance) {
(wds:Q30623689-0D440056-3566-461C-A245-3CBE33655C3B wd:Q30623689 "Point(-74.1964155,43.675418)"^^geo:wktLiteral "961941" "22.00675386330437"^^xsd:double )
(wds:Q30623572-41B8044F-9374-47A5-A941-B6528E473DE6 wd:Q30623572 "Point(-74.7266356,43.7651884)"^^geo:wktLiteral "948948" "24.97341688722456"^^xsd:double )
(wds:Q30623652-063205BD-E9FA-4604-87AD-A3293D10F81D wd:Q30623652 "Point(-74.1709696,43.7919114)"^^geo:wktLiteral "943832" "25.55307493643543"^^xsd:double )
(wds:Q30623645-05564F3F-B9C8-4E71-95CA-73C449BE6A20 wd:Q30623645 "Point(-74.4079355,43.8417304)"^^geo:wktLiteral "948828" "27.275239034760396"^^xsd:double )
(wds:Q30623567-AA1ABB5D-21D3-41C1-A45F-2DD590D241D6 wd:Q30623567 "Point(-74.7682523,43.8765356)"^^geo:wktLiteral "956109" "28.517545871307057"^^xsd:double )
(wds:Q30624120-5E77C22A-B94A-491F-AF79-9B4867F62AC9 wd:Q30624120 "Point(-73.857884,42.9388878)"^^geo:wktLiteral "942933" "29.921966350265333"^^xsd:double )
(wds:q14693123-9AF8C312-7B85-43B5-9CD5-5DC4765A0BC6 wd:Q14693123 "Point(-93.8131042,46.2055552)"^^geo:wktLiteral "654101" "37.03149311144129"^^xsd:double )
(wds:Q18351593-4C7C6091-75F5-424F-AA3F-839CACF3F182 wd:Q18351593 "Point(-95.2902336,45.6867788)"^^geo:wktLiteral "639323" "43.36540396906205"^^xsd:double )
(wds:Q22975579-9BEF5BBB-37CF-4BC7-9F95-97480A4C58CB wd:Q22975579 "Point(-91.3490062,46.3422776)"^^geo:wktLiteral "1580140" "184.69535342185696"^^xsd:double )
(wds:Q33289642-F7C7A93E-8A4B-41E5-A8F1-A71E6F8A737D wd:Q33289642 "Point(-74.1279491,43.8454085)"^^geo:wktLiteral "957417" "237.53915222908313"^^xsd:double )
}
}
} ?place wdt:P625 ?location.
BIND( 'wiki' as ?layer )
} UNION {
{
SELECT ?place ?gnisPt WHERE {
VALUES (?ps ?place ?gnisPt ?gnisid ?distance) {
(wds:Q30623689-0D440056-3566-461C-A245-3CBE33655C3B wd:Q30623689 "Point(-74.1964155,43.675418)"^^geo:wktLiteral "961941" "22.00675386330437"^^xsd:double )
(wds:Q30623572-41B8044F-9374-47A5-A941-B6528E473DE6 wd:Q30623572 "Point(-74.7266356,43.7651884)"^^geo:wktLiteral "948948" "24.97341688722456"^^xsd:double )
(wds:Q30623652-063205BD-E9FA-4604-87AD-A3293D10F81D wd:Q30623652 "Point(-74.1709696,43.7919114)"^^geo:wktLiteral "943832" "25.55307493643543"^^xsd:double )
(wds:Q30623645-05564F3F-B9C8-4E71-95CA-73C449BE6A20 wd:Q30623645 "Point(-74.4079355,43.8417304)"^^geo:wktLiteral "948828" "27.275239034760396"^^xsd:double )
(wds:Q30623567-AA1ABB5D-21D3-41C1-A45F-2DD590D241D6 wd:Q30623567 "Point(-74.7682523,43.8765356)"^^geo:wktLiteral "956109" "28.517545871307057"^^xsd:double )
(wds:Q30624120-5E77C22A-B94A-491F-AF79-9B4867F62AC9 wd:Q30624120 "Point(-73.857884,42.9388878)"^^geo:wktLiteral "942933" "29.921966350265333"^^xsd:double )
(wds:q14693123-9AF8C312-7B85-43B5-9CD5-5DC4765A0BC6 wd:Q14693123 "Point(-93.8131042,46.2055552)"^^geo:wktLiteral "654101" "37.03149311144129"^^xsd:double )
(wds:Q18351593-4C7C6091-75F5-424F-AA3F-839CACF3F182 wd:Q18351593 "Point(-95.2902336,45.6867788)"^^geo:wktLiteral "639323" "43.36540396906205"^^xsd:double )
(wds:Q22975579-9BEF5BBB-37CF-4BC7-9F95-97480A4C58CB wd:Q22975579 "Point(-91.3490062,46.3422776)"^^geo:wktLiteral "1580140" "184.69535342185696"^^xsd:double )
(wds:Q33289642-F7C7A93E-8A4B-41E5-A8F1-A71E6F8A737D wd:Q33289642 "Point(-74.1279491,43.8454085)"^^geo:wktLiteral "957417" "237.53915222908313"^^xsd:double )
}
}
} BIND( ?gnisPt AS ?location )
BIND( 'gnis' as ?layer )
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?distance")
v8("?gnisPt")
v8("?gnisid")
v8("?layer"):::projected
v8("?location"):::projected
v8("?place"):::projected
v8("?ps")
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
bind0[/VALUES ?distance ?gnisPt ?gnisid ?place ?ps/]
bind0-->v8
bind0-->v8
bind0-->v8
bind0-->v8
bind0-->v8
bind00(["wd:statement/Q30623689-0D440056-3566-461C-A245-3CBE33655C3B"])
bind00 --> bind0
bind01(["wd:Q30623689"])
bind01 --> bind0
bind02([sPoint(-74.1964155,43.675418)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind02 --> bind0
bind03(["961941"])
bind03 --> bind0
bind04(["22.00675386330437^^xsd:double"])
bind04 --> bind0
bind05(["wd:statement/Q30623572-41B8044F-9374-47A5-A941-B6528E473DE6"])
bind05 --> bind0
bind06(["wd:Q30623572"])
bind06 --> bind0
bind07([sPoint(-74.7266356,43.7651884)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind07 --> bind0
bind08(["948948"])
bind08 --> bind0
bind09(["24.97341688722456^^xsd:double"])
bind09 --> bind0
bind010(["wd:statement/Q30623652-063205BD-E9FA-4604-87AD-A3293D10F81D"])
bind010 --> bind0
bind011(["wd:Q30623652"])
bind011 --> bind0
bind012([sPoint(-74.1709696,43.7919114)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind012 --> bind0
bind013(["943832"])
bind013 --> bind0
bind014(["25.55307493643543^^xsd:double"])
bind014 --> bind0
bind015(["wd:statement/Q30623645-05564F3F-B9C8-4E71-95CA-73C449BE6A20"])
bind015 --> bind0
bind016(["wd:Q30623645"])
bind016 --> bind0
bind017([sPoint(-74.4079355,43.8417304)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind017 --> bind0
bind018(["948828"])
bind018 --> bind0
bind019(["27.275239034760396^^xsd:double"])
bind019 --> bind0
bind020(["wd:statement/Q30623567-AA1ABB5D-21D3-41C1-A45F-2DD590D241D6"])
bind020 --> bind0
bind021(["wd:Q30623567"])
bind021 --> bind0
bind022([sPoint(-74.7682523,43.8765356)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind022 --> bind0
bind023(["956109"])
bind023 --> bind0
bind024(["28.517545871307057^^xsd:double"])
bind024 --> bind0
bind025(["wd:statement/Q30624120-5E77C22A-B94A-491F-AF79-9B4867F62AC9"])
bind025 --> bind0
bind026(["wd:Q30624120"])
bind026 --> bind0
bind027([sPoint(-73.857884,42.9388878)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind027 --> bind0
bind028(["942933"])
bind028 --> bind0
bind029(["29.921966350265333^^xsd:double"])
bind029 --> bind0
bind030(["wd:statement/q14693123-9AF8C312-7B85-43B5-9CD5-5DC4765A0BC6"])
bind030 --> bind0
bind031(["wd:Q14693123"])
bind031 --> bind0
bind032([sPoint(-93.8131042,46.2055552)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind032 --> bind0
bind033(["654101"])
bind033 --> bind0
bind034(["37.03149311144129^^xsd:double"])
bind034 --> bind0
bind035(["wd:statement/Q18351593-4C7C6091-75F5-424F-AA3F-839CACF3F182"])
bind035 --> bind0
bind036(["wd:Q18351593"])
bind036 --> bind0
bind037([sPoint(-95.2902336,45.6867788)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind037 --> bind0
bind038(["639323"])
bind038 --> bind0
bind039(["43.36540396906205^^xsd:double"])
bind039 --> bind0
bind040(["wd:statement/Q22975579-9BEF5BBB-37CF-4BC7-9F95-97480A4C58CB"])
bind040 --> bind0
bind041(["wd:Q22975579"])
bind041 --> bind0
bind042([sPoint(-91.3490062,46.3422776)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind042 --> bind0
bind043(["1580140"])
bind043 --> bind0
bind044(["184.69535342185696^^xsd:double"])
bind044 --> bind0
bind045(["wd:statement/Q33289642-F7C7A93E-8A4B-41E5-A8F1-A71E6F8A737D"])
bind045 --> bind0
bind046(["wd:Q33289642"])
bind046 --> bind0
bind047([sPoint(-74.1279491,43.8454085)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind047 --> bind0
bind048(["957417"])
bind048 --> bind0
bind049(["237.53915222908313^^xsd:double"])
bind049 --> bind0
bind1[/"?gnisPt"/]
v8 --o bind1
bind1 --as--o v8
bind2[/"'gnis'"/]
bind2 --as--o v8
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
bind3[/VALUES ?distance ?gnisPt ?gnisid ?place ?ps/]
bind3-->v8
bind3-->v8
bind3-->v8
bind3-->v8
bind3-->v8
bind30(["wd:statement/Q30623689-0D440056-3566-461C-A245-3CBE33655C3B"])
bind30 --> bind3
bind31(["wd:Q30623689"])
bind31 --> bind3
bind32([sPoint(-74.1964155,43.675418)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind32 --> bind3
bind33(["961941"])
bind33 --> bind3
bind34(["22.00675386330437^^xsd:double"])
bind34 --> bind3
bind35(["wd:statement/Q30623572-41B8044F-9374-47A5-A941-B6528E473DE6"])
bind35 --> bind3
bind36(["wd:Q30623572"])
bind36 --> bind3
bind37([sPoint(-74.7266356,43.7651884)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind37 --> bind3
bind38(["948948"])
bind38 --> bind3
bind39(["24.97341688722456^^xsd:double"])
bind39 --> bind3
bind310(["wd:statement/Q30623652-063205BD-E9FA-4604-87AD-A3293D10F81D"])
bind310 --> bind3
bind311(["wd:Q30623652"])
bind311 --> bind3
bind312([sPoint(-74.1709696,43.7919114)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind312 --> bind3
bind313(["943832"])
bind313 --> bind3
bind314(["25.55307493643543^^xsd:double"])
bind314 --> bind3
bind315(["wd:statement/Q30623645-05564F3F-B9C8-4E71-95CA-73C449BE6A20"])
bind315 --> bind3
bind316(["wd:Q30623645"])
bind316 --> bind3
bind317([sPoint(-74.4079355,43.8417304)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind317 --> bind3
bind318(["948828"])
bind318 --> bind3
bind319(["27.275239034760396^^xsd:double"])
bind319 --> bind3
bind320(["wd:statement/Q30623567-AA1ABB5D-21D3-41C1-A45F-2DD590D241D6"])
bind320 --> bind3
bind321(["wd:Q30623567"])
bind321 --> bind3
bind322([sPoint(-74.7682523,43.8765356)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind322 --> bind3
bind323(["956109"])
bind323 --> bind3
bind324(["28.517545871307057^^xsd:double"])
bind324 --> bind3
bind325(["wd:statement/Q30624120-5E77C22A-B94A-491F-AF79-9B4867F62AC9"])
bind325 --> bind3
bind326(["wd:Q30624120"])
bind326 --> bind3
bind327([sPoint(-73.857884,42.9388878)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind327 --> bind3
bind328(["942933"])
bind328 --> bind3
bind329(["29.921966350265333^^xsd:double"])
bind329 --> bind3
bind330(["wd:statement/q14693123-9AF8C312-7B85-43B5-9CD5-5DC4765A0BC6"])
bind330 --> bind3
bind331(["wd:Q14693123"])
bind331 --> bind3
bind332([sPoint(-93.8131042,46.2055552)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind332 --> bind3
bind333(["654101"])
bind333 --> bind3
bind334(["37.03149311144129^^xsd:double"])
bind334 --> bind3
bind335(["wd:statement/Q18351593-4C7C6091-75F5-424F-AA3F-839CACF3F182"])
bind335 --> bind3
bind336(["wd:Q18351593"])
bind336 --> bind3
bind337([sPoint(-95.2902336,45.6867788)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind337 --> bind3
bind338(["639323"])
bind338 --> bind3
bind339(["43.36540396906205^^xsd:double"])
bind339 --> bind3
bind340(["wd:statement/Q22975579-9BEF5BBB-37CF-4BC7-9F95-97480A4C58CB"])
bind340 --> bind3
bind341(["wd:Q22975579"])
bind341 --> bind3
bind342([sPoint(-91.3490062,46.3422776)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind342 --> bind3
bind343(["1580140"])
bind343 --> bind3
bind344(["184.69535342185696^^xsd:double"])
bind344 --> bind3
bind345(["wd:statement/Q33289642-F7C7A93E-8A4B-41E5-A8F1-A71E6F8A737D"])
bind345 --> bind3
bind346(["wd:Q33289642"])
bind346 --> bind3
bind347([sPoint(-74.1279491,43.8454085)^^<http://www.opengis.net/ont/geosparql#wktLiteral>"])
bind347 --> bind3
bind348(["957417"])
bind348 --> bind3
bind349(["237.53915222908313^^xsd:double"])
bind349 --> bind3
v8 --"wdt:P625"--> v8
bind4[/"'wiki'"/]
bind4 --as--o v8
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end