Skip to content
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

Convert OpenStreetMap wikimedia_commons tags to IRIs #74

Open
1ec5 opened this issue Jan 24, 2024 · 3 comments
Open

Convert OpenStreetMap wikimedia_commons tags to IRIs #74

1ec5 opened this issue Jan 24, 2024 · 3 comments

Comments

@1ec5
Copy link

1ec5 commented Jan 24, 2024

In OpenStreetMap and OpenHistoricalMap, the wikimedia_commons key can be set to a page name on Wikimedia Commons. The page is typically a file description page in the File: namespace, but sometimes it’s a category in the Category: namespace or a gallery in the main namespace instead. It would be convenient to have osm:wikimedia_commons triples that point to sdc: entities for files. Categories and galleries are usually linked to Wikidata items in the same manner as Wikipedia articles, so I suppose there would be schema:about triples for those.

One use case is to associate map features with Commons images for a better sense of context. OSM-based applications like OsmAnd can fetch the image and associated licensing information using direct MediaWiki API calls because they’re working with a single map feature at a time. OpenHistoricalMap/issues#581 tracks something similar that would be built into the OHM website. But there’s also some value in being able to query for linked images en masse. For example, a query could return map features whose wikimedia_commons tag:

  • Refers to a nonexistent (possibly deleted) image
  • Refers to an image that depicts something completely different than the map feature or a photo that (in the context of OHM) was taken after the feature ceased to exist
  • Refers to a photo that was taken too long ago and should be replaced by something more recent
  • Refers to a photo that remains copyrighted locally, even though it’s in the public domain in the U.S., where Wikimedia Commons is hosted
@hannahbast
Copy link
Member

hannahbast commented Jan 24, 2024

@1ec5 Thanks for the suggestion. For example, here are two triples of the predicate osmkey:wikimedia_commons in the current dataset, one with an object that starts with "File:" and one with an object that starts with "Category:" (for osm-germany, there are only 31 triples where it's neither):

osmnode:773640801 osmkey:wikimedia_commons "File: Berlin-Mitte 10-2012 View from Panorama Point img01.jpg"
osmway:23492927 osmkey:wikimedia_commons "Category: Feuersteinfelder"

So how should be triples you are envisioning look like and how do or should the triples look like that connect these to https://qlever.cs.uni-freiburg.de/wikidata or https://qlever.cs.uni-freiburg.de/wikimedia-commons ?

@1ec5
Copy link
Author

1ec5 commented Jan 24, 2024

Node 773640801 and way 23492927 are fairly unusual in that they contain a space after the namespace (which MediaWiki normalizes anyways). Nevertheless, it would be nice to be able to write something like:

osmnode:773640801 osm:wikimedia_commons ?file . // sdc:M22277555
SERVICE <https://qlever.cs.uni-freiburg.de/api/wikimedia-commons> {
  ?file wdt:P1259 ?geometry .
}
osmway:23492927 osm:wikimedia_commons ?category . // wd:Q1409723
SERVICE <https://qlever.cs.uni-freiburg.de/api/wikidata> {
  ?category wdt:P625 ?geometry .
}

However, I don’t know whether it’s a good idea or not to use the same predicate for both files on SDC and items on Wikidata.

@1ec5
Copy link
Author

1ec5 commented Mar 19, 2024

Refers to an image that depicts something completely different than the map feature

For example, a mapper wanted to query for coordinate mismatches between the two datasets, but I was unable to come up with anything that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants