Get WikiData Identifier for city by GPS location

后端 未结 1 441
旧巷少年郎
旧巷少年郎 2021-01-23 00:00

I want to get the city /settlement at a specific gps location. meaning the closest one in a given range or at best the closest.

i found some example queries in the wikim

相关标签:
1条回答
  • 2021-01-23 00:49

    I Found my bug.

    here is the working query:

     SELECT DISTINCT *
        WHERE
        {
          ?place wdt:P31/wdt:P279* wd:Q515 .
           # Search by Nearest
      SERVICE wikibase:around { 
        ?place wdt:P625 ?location . 
        bd:serviceParam wikibase:center "Point(8.4024875340491 48.9993762209831)"^^geo:wktLiteral .
        bd:serviceParam wikibase:radius "10" . 
        bd:serviceParam wikibase:distance ?distance .
      }
          SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
        } 
    
    Order by  ?distance
    
    0 讨论(0)
提交回复
热议问题