-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend the value of <https://www.openstreetmap.org/wiki/Key:wikidata> to become a proper URI #49
Comments
As work around the following Federated Query works: PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT * WHERE {
?relation <https://www.openstreetmap.org/wiki/Key:place> "country" .
?relation <https://www.openstreetmap.org/wiki/Key:name:en> ?name.
?relation <https://www.openstreetmap.org/wiki/Key:wikidata> ?wdValue.
BIND(uri(concat("http://www.wikidata.org/entity/", ?wdValue)) as ?wd)
SERVICE <https://query.wikidata.org/sparql> {
?wd wdt:P31 ?type.
?type rdfs:label ?typeName.
FILTER(lang(?typeName)="en")
}
} |
There are two predicates in the datasets produced by
The reasons for the distinction is that the first predicate is how the information is stored in the original data, while the second predicate is more useful. I personally would be in favor of having only one predicate. @lehmann-4178656ch @patrickbr What do you think? |
Thank you for this pointer, this is good to know. To have it only once, but with the Entity URI would make it to be found easier. |
One of the targets @patrickbr and I formulated when we started the work on osm2rdf was to have access to the raw data/every information provided by the OSM where ever possible. Collapsing both representations into one would only work for single value Transforming every entry without retaining the original would break the goal of retaining all information. We would have to split values and introduce intermediate nodes when lists are provided, e.g.:
Currently we simply add a single statement for the first entry in the list, which may be not sufficient for lists, but keeps the graph relatively small. This should provide the most important information if the values are ordered accordingly in the OSM:
We could introduce an entry for every Q-value in the list. This would result in something like the following:
Additionally, we would need to add intermediate nodes (as mentioned before) to provide the order of the values.
This opens the question whether or not single entries should always be treated as if they are lists and therefore explicitly state this information. Treating every single value as a list would make the representation uniform but introduce the overhead many entries as having lists in I'm open for suggestion which allow us to not lose any information found in the original data without making the original data hard to find. I'll also try to talk to @patrickbr next week about this. |
For this specific key, I would argue this is maintaining the original information. You just adapt the format to the medium you convert into. Regarding the lists, does the order have in some keys actual meaning? If so, you should also consider good'ol https://www.w3.org/TR/rdf-schema/#ch_list. |
Thanks for the suggestion, @l00mi ! As @hannahbast said, we are already creating We are currently discussing whether we should add an option to completely drop the free string representations for OSM attribute values handled like this. Let's keep this issue open until we have arrived at a conclusion :) |
The value of
<https://www.openstreetmap.org/wiki/Key:wikidata>
seems to be simply the Q-Number of Wikidata. In RDF the Q Numbers of Wikidata are represented as follows e.g. https://www.wikidata.org/wiki/Q116819199.To make it comfortable to connect and query OSM Entities together with Wikidata it would be great to create for such instances the correct NamedNodes instead of Literals.
The text was updated successfully, but these errors were encountered: