query-06d1b596caf17ed03742a9ac3a4abb48

rq turtle/ttl

Birthplace coordinatesHello! The query below works fine for obtaining data on the persons listed on a category page but how could I obtain the geographic coordinates of the birthplace? Many thanks, tiha

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?philo ?philoLabel ?birthLabel ?pbirthLabel ?occLabel ?fìeldLabel
# will find all entities of a category page that  are in BBOX
WHERE
{
  SERVICE wikibase:mwapi
  {
    bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
    bd:serviceParam wikibase:api "Generator" .
    bd:serviceParam mwapi:generator "categorymembers" .
    bd:serviceParam mwapi:gcmtitle "Category:Ancient Greek astronomers" .
    bd:serviceParam mwapi:gcmlimit "max" .
    bd:serviceParam mwapi:gcmnamespace "0" .
    ?philo wikibase:apiOutputItem mwapi:item .
  }
  OPTIONAL { ?philo wdt:P569 ?birth. }
  OPTIONAL { ?philo wdt:P19 ?pbirth. }
  OPTIONAL { ?philo wdt:P106 ?occ. }
  OPTIONAL { ?philo wdt:P101 ?field. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]" . } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?birth") v5("?field") v4("?occ") v3("?pbirth") v1("?philo"):::projected c16(["mwapi:item"]):::iri c12(["max"]):::literal c8(["categorymembers"]):::literal c14(["0"]):::literal c4(["en.wikipedia.org"]):::literal c2(["bd:serviceParam"]):::iri c23(["#91;AUTO_LANGUAGE#93;"]):::literal c10(["Category:Ancient Greek astronomers"]):::literal c6(["Generator"]):::literal subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c2 --"mwapi:endpoint"--> c4 c2 --"mwapi:api"--> c6 c2 --"mwapi:generator"--> c8 c2 --"mwapi:gcmtitle"--> c10 c2 --"mwapi:gcmlimit"--> c12 c2 --"mwapi:gcmnamespace"--> c14 v1 --"mwapi:apiOutputItem"--> c16 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P569".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P19".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P106".-> v4 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P101".-> v5 end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c2 --"mwapi:language"--> c23 end