query-be0574b0369f423be43709fac790cd54

rq turtle/ttl

Matthias Winkelmann

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wds: <http://www.wikidata.org/entity/statement/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?ps ?lakeLabel ?latDEC ?lonDEC ?lat ?long ?gnisURL WHERE {
  {
    SELECT ?ps ?lake ?latDEC ?lonDEC ?lat ?long ?gnisid WHERE {
      VALUES (?ps ?lake ?gnisid ?latDEC ?lonDEC) {
        (wds:q7335953-42836CD9-7979-4F71-87D7-91F1519254E6 wd:Q7335953 "1614835" "45.1918512"^^xsd:double "-84.7642201"^^xsd:double)
        (wds:Q6477828-027DF6A9-FE91-41BD-A0F3-0C5FA7373100 wd:Q6477828 "291599" "29.3079458"^^xsd:double "-82.4791358"^^xsd:double)
        (wds:q6475804-48CD1BCD-4573-4385-95CD-8C3BDB15FEA1 wd:Q6475804 "771253" "48.7499294"^^xsd:double "-113.9135721"^^xsd:double)
        (wds:q6477077-08DF184C-258E-4FD8-84BB-F811EC7427A2 wd:Q6477077 "958316" "43.3081268"^^xsd:double "-76.4369827"^^xsd:double)
        (wds:q6475994-69586DA3-56F2-4DEA-8482-EEC5E1802109 wd:Q6475994 "951103" "41.3981179"^^xsd:double "-73.6754025"^^xsd:double)
        (wds:q6377827-B18B7A53-D6AF-4DE6-B7A5-B5F3F831751D wd:Q6377827 "772940" "48.5282363"^^xsd:double "-113.4481318"^^xsd:double)
        (wds:q6475271-A124F3C5-56DE-4F4A-A8FE-56FDC80B5612 wd:Q6475271 "553954" "30.2282451"^^xsd:double "-93.2347173"^^xsd:double)
        (wds:q6477999-0D69C812-5795-4976-B1AB-5CA0CBBBBE60 wd:Q6477999 "967114" "44.1070059"^^xsd:double "-73.9356783"^^xsd:double)
        (wds:q6477136-35814F23-B203-439A-A0B7-6F38CD948C79 wd:Q6477136 "1570331" "45.2566848"^^xsd:double "-87.9080654"^^xsd:double)
        (wds:q6476368-2F724E96-DABC-4346-9857-14260CA74979 wd:Q6476368 "772914" "48.7810128"^^xsd:double "-113.6756959"^^xsd:double)
        (wds:q7235286-832B6767-EEE5-47EA-8109-4F609CF362E6 wd:Q7235286 "1217748" "41.3873242"^^xsd:double "-71.5311693"^^xsd:double)
        (wds:q6477143-763568E7-6158-4A91-BCB3-A7FAB06F660E wd:Q6477143 "306117" "28.939347"^^xsd:double "-81.5410478"^^xsd:double)
        (wds:q6938987-2454D549-D883-4EC7-81C9-3F678F033AB5 wd:Q6938987 "1570045" "45.6965111"^^xsd:double "-91.2081829"^^xsd:double)
        (wds:Q6476282-B81F7238-E49F-46DA-8EED-2375226D6DCB wd:Q6476282 "477318" "38.2472036"^^xsd:double "-97.7191383"^^xsd:double)
        (wds:q6693772-8075AC7F-DA34-4570-8D35-634FE0D19BFA wd:Q6693772 "956107" "44.3028384"^^xsd:double "-74.1931089"^^xsd:double)
        (wds:q6476251-89FAD984-5259-452C-A87A-AEE4B803AE36 wd:Q6476251 "284452" "30.6312498"^^xsd:double "-84.2390238"^^xsd:double)
        (wds:q5665721-81992C6B-A823-430F-9504-091EBFE78FFF wd:Q5665721 "784584" "48.5167701"^^xsd:double "-113.7705404"^^xsd:double)
        (wds:q6477828-6BDDFE36-5F26-4643-A942-E600D1088C8C wd:Q6477828 "291599" "29.3079458"^^xsd:double "-82.4791358"^^xsd:double)
        (wds:q6477231-85C105DC-33C1-4645-828D-26F62B11BE69 wd:Q6477231 "288259" "26.5970392"^^xsd:double "-80.0780448"^^xsd:double)
      }
      ?ps psv:P625 ?node.
      ?node wikibase:geoLatitude ?lat;
        wikibase:geoLongitude ?long.
    }
  }
  BIND(URI(CONCAT("https://geonames.usgs.gov/apex/f?p=GNISPQ:3:::NO::P3_FID:", ?gnisid)) AS ?gnisURL)
  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; v9("?gnisURL"):::projected v3("?gnisid") v2("?lake") v7("?lat"):::projected v4("?latDEC"):::projected v5("?lonDEC"):::projected v8("?long"):::projected v6("?node") v1("?ps"):::projected c5(["bd:serviceParam"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/VALUES ?gnisid ?lake ?latDEC ?lonDEC ?ps/] bind0-->v1 bind0-->v2 bind0-->v3 bind0-->v4 bind0-->v5 bind00(["wd:statement/q7335953-42836CD9-7979-4F71-87D7-91F1519254E6"]) bind00 --> bind0 bind01(["wd:Q7335953"]) bind01 --> bind0 bind02(["1614835"]) bind02 --> bind0 bind03(["45.1918512^^xsd:double"]) bind03 --> bind0 bind04(["-84.7642201^^xsd:double"]) bind04 --> bind0 bind05(["wd:statement/Q6477828-027DF6A9-FE91-41BD-A0F3-0C5FA7373100"]) bind05 --> bind0 bind06(["wd:Q6477828"]) bind06 --> bind0 bind07(["291599"]) bind07 --> bind0 bind08(["29.3079458^^xsd:double"]) bind08 --> bind0 bind09(["-82.4791358^^xsd:double"]) bind09 --> bind0 bind010(["wd:statement/q6475804-48CD1BCD-4573-4385-95CD-8C3BDB15FEA1"]) bind010 --> bind0 bind011(["wd:Q6475804"]) bind011 --> bind0 bind012(["771253"]) bind012 --> bind0 bind013(["48.7499294^^xsd:double"]) bind013 --> bind0 bind014(["-113.9135721^^xsd:double"]) bind014 --> bind0 bind015(["wd:statement/q6477077-08DF184C-258E-4FD8-84BB-F811EC7427A2"]) bind015 --> bind0 bind016(["wd:Q6477077"]) bind016 --> bind0 bind017(["958316"]) bind017 --> bind0 bind018(["43.3081268^^xsd:double"]) bind018 --> bind0 bind019(["-76.4369827^^xsd:double"]) bind019 --> bind0 bind020(["wd:statement/q6475994-69586DA3-56F2-4DEA-8482-EEC5E1802109"]) bind020 --> bind0 bind021(["wd:Q6475994"]) bind021 --> bind0 bind022(["951103"]) bind022 --> bind0 bind023(["41.3981179^^xsd:double"]) bind023 --> bind0 bind024(["-73.6754025^^xsd:double"]) bind024 --> bind0 bind025(["wd:statement/q6377827-B18B7A53-D6AF-4DE6-B7A5-B5F3F831751D"]) bind025 --> bind0 bind026(["wd:Q6377827"]) bind026 --> bind0 bind027(["772940"]) bind027 --> bind0 bind028(["48.5282363^^xsd:double"]) bind028 --> bind0 bind029(["-113.4481318^^xsd:double"]) bind029 --> bind0 bind030(["wd:statement/q6475271-A124F3C5-56DE-4F4A-A8FE-56FDC80B5612"]) bind030 --> bind0 bind031(["wd:Q6475271"]) bind031 --> bind0 bind032(["553954"]) bind032 --> bind0 bind033(["30.2282451^^xsd:double"]) bind033 --> bind0 bind034(["-93.2347173^^xsd:double"]) bind034 --> bind0 bind035(["wd:statement/q6477999-0D69C812-5795-4976-B1AB-5CA0CBBBBE60"]) bind035 --> bind0 bind036(["wd:Q6477999"]) bind036 --> bind0 bind037(["967114"]) bind037 --> bind0 bind038(["44.1070059^^xsd:double"]) bind038 --> bind0 bind039(["-73.9356783^^xsd:double"]) bind039 --> bind0 bind040(["wd:statement/q6477136-35814F23-B203-439A-A0B7-6F38CD948C79"]) bind040 --> bind0 bind041(["wd:Q6477136"]) bind041 --> bind0 bind042(["1570331"]) bind042 --> bind0 bind043(["45.2566848^^xsd:double"]) bind043 --> bind0 bind044(["-87.9080654^^xsd:double"]) bind044 --> bind0 bind045(["wd:statement/q6476368-2F724E96-DABC-4346-9857-14260CA74979"]) bind045 --> bind0 bind046(["wd:Q6476368"]) bind046 --> bind0 bind047(["772914"]) bind047 --> bind0 bind048(["48.7810128^^xsd:double"]) bind048 --> bind0 bind049(["-113.6756959^^xsd:double"]) bind049 --> bind0 bind050(["wd:statement/q7235286-832B6767-EEE5-47EA-8109-4F609CF362E6"]) bind050 --> bind0 bind051(["wd:Q7235286"]) bind051 --> bind0 bind052(["1217748"]) bind052 --> bind0 bind053(["41.3873242^^xsd:double"]) bind053 --> bind0 bind054(["-71.5311693^^xsd:double"]) bind054 --> bind0 bind055(["wd:statement/q6477143-763568E7-6158-4A91-BCB3-A7FAB06F660E"]) bind055 --> bind0 bind056(["wd:Q6477143"]) bind056 --> bind0 bind057(["306117"]) bind057 --> bind0 bind058(["28.939347^^xsd:double"]) bind058 --> bind0 bind059(["-81.5410478^^xsd:double"]) bind059 --> bind0 bind060(["wd:statement/q6938987-2454D549-D883-4EC7-81C9-3F678F033AB5"]) bind060 --> bind0 bind061(["wd:Q6938987"]) bind061 --> bind0 bind062(["1570045"]) bind062 --> bind0 bind063(["45.6965111^^xsd:double"]) bind063 --> bind0 bind064(["-91.2081829^^xsd:double"]) bind064 --> bind0 bind065(["wd:statement/Q6476282-B81F7238-E49F-46DA-8EED-2375226D6DCB"]) bind065 --> bind0 bind066(["wd:Q6476282"]) bind066 --> bind0 bind067(["477318"]) bind067 --> bind0 bind068(["38.2472036^^xsd:double"]) bind068 --> bind0 bind069(["-97.7191383^^xsd:double"]) bind069 --> bind0 bind070(["wd:statement/q6693772-8075AC7F-DA34-4570-8D35-634FE0D19BFA"]) bind070 --> bind0 bind071(["wd:Q6693772"]) bind071 --> bind0 bind072(["956107"]) bind072 --> bind0 bind073(["44.3028384^^xsd:double"]) bind073 --> bind0 bind074(["-74.1931089^^xsd:double"]) bind074 --> bind0 bind075(["wd:statement/q6476251-89FAD984-5259-452C-A87A-AEE4B803AE36"]) bind075 --> bind0 bind076(["wd:Q6476251"]) bind076 --> bind0 bind077(["284452"]) bind077 --> bind0 bind078(["30.6312498^^xsd:double"]) bind078 --> bind0 bind079(["-84.2390238^^xsd:double"]) bind079 --> bind0 bind080(["wd:statement/q5665721-81992C6B-A823-430F-9504-091EBFE78FFF"]) bind080 --> bind0 bind081(["wd:Q5665721"]) bind081 --> bind0 bind082(["784584"]) bind082 --> bind0 bind083(["48.5167701^^xsd:double"]) bind083 --> bind0 bind084(["-113.7705404^^xsd:double"]) bind084 --> bind0 bind085(["wd:statement/q6477828-6BDDFE36-5F26-4643-A942-E600D1088C8C"]) bind085 --> bind0 bind086(["wd:Q6477828"]) bind086 --> bind0 bind087(["291599"]) bind087 --> bind0 bind088(["29.3079458^^xsd:double"]) bind088 --> bind0 bind089(["-82.4791358^^xsd:double"]) bind089 --> bind0 bind090(["wd:statement/q6477231-85C105DC-33C1-4645-828D-26F62B11BE69"]) bind090 --> bind0 bind091(["wd:Q6477231"]) bind091 --> bind0 bind092(["288259"]) bind092 --> bind0 bind093(["26.5970392^^xsd:double"]) bind093 --> bind0 bind094(["-80.0780448^^xsd:double"]) bind094 --> bind0 v1 --"psv:P625"--> v6 v6 --"wikibase:geoLatitude"--> v7 v6 --"wikibase:geoLongitude"--> v8 bind1[/"concat('https://geonames.usgs.gov/apex/f?p=GNISPQ:3:::NO::P3_FID:',?gnisid)"/] v3 --o bind1 bind1 --as--o v9 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end