Search code examples
sparqldbpedia

can not find out all city from germany


I tried with this query.

SELECT distinct ?city ?cityName ?country  WHERE {
 ?city rdf:type dbo:City .
?city rdfs:label ?cityName.
?city dbo:country ?country.
?city dbo:country dbr:Germany.


  FILTER (lang(?cityName) = 'en')
} ORDER BY ?city

But some city which have dbo:country predicate and dbr:Germany value those are still not listed in the output. For example try this link http://dbpedia.org/page/Goslar . There is no "Goslar" city in output. Can anybody explain me why?


Solution

  • First of all, dbpedia is really a messy place. For example, Goslar, in dbpedia, is not even a city it is a dbo:PopulatedPlace dbo:Town yago:City108524735 . That's why It's not in the output. Another example is Paris. You can check it.