Skip to content

Instantly share code, notes, and snippets.

@bekicot
Created August 20, 2017 14:40
Show Gist options
  • Save bekicot/ed8eeed77b162f2cf76cf40e40f76cdf to your computer and use it in GitHub Desktop.
Save bekicot/ed8eeed77b162f2cf76cf40e40f76cdf to your computer and use it in GitHub Desktop.
SELECT ?desa ?desaLabel ?lat ?long ?kodeDesa WHERE {
?desa p:P625 ?statement . # coordinate-location statement
?desa wdt:P1588 ?kodeDesa .
?statement psv:P625 ?coordinate_node .
?coordinate_node wikibase:geoLatitude ?lat .
?coordinate_node wikibase:geoLongitude ?long .
FILTER (ABS(?lat - -6.976437) < 0.05)
FILTER (ABS(?long - 107.631003) < 0.05)
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
} ORDER BY DESC(?lat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment