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

Infer Wikimedia Commons category from Wikidata to show photos (P373) #12303

Closed
dbogdanov opened this issue Jul 29, 2021 · 12 comments · Fixed by osmandapp/OsmAnd-iOS#3278 or osmandapp/OsmAnd-iOS#3291 · May be fixed by #18141
Closed

Infer Wikimedia Commons category from Wikidata to show photos (P373) #12303

dbogdanov opened this issue Jul 29, 2021 · 12 comments · Fixed by osmandapp/OsmAnd-iOS#3278 or osmandapp/OsmAnd-iOS#3291 · May be fixed by #18141
Assignees
Milestone

Comments

@dbogdanov
Copy link

As I understand, currently OsmAnd shows photos found on Wikidata (image) and Wikimedia Commons following the wikidata and wikimedia_commons tags for a node.

However, there will be many situations when there is no wikimedia_commons tag assigned, but it is possible to infer the associated Commons category from Wikidata.

Example:

I am not sure if the wikimedia_commons tag is commonly used on OSM, but I would expect the links from Wikidata to Wikimedia Commons to be better maintained.

Proposal: Look for wikimedia_commons and wikidata tags and if wikimedia_commons is not present look for Commons category on Wikidata to form the pool of photos to show.

@vshcherb
Copy link
Member

Well for now it would require to process maps with Wikidata access cause OsmAnd now displays only images that are provided inside OSM tags. It's one extra step is needed online to get image from wikidata.

@vshcherb vshcherb added this to the future-backend milestone Jul 29, 2021
@Discostu36
Copy link
Contributor

Well for now it would require to process maps with Wikidata access cause OsmAnd now displays only images that are provided inside OSM tags. It's one extra step is needed online to get image from wikidata.

The image shown is already taken online from Wikidata. The only difference would be to also follow the link from Wikidata to Wikimedia Commons.

Another possibility would be that during map creation, Wikimedia Commons and Wikipedia tags are taken from the Wikidata object and then written into the tags if not already present.

@clwacker
Copy link

clwacker commented Jan 13, 2022

OsmAnd now displays only images that are provided inside OSM tags

I was wondering what OSM tags OsmAnd was using to display photos and found this thread.
What I notice is that the image tag is used, but not the wikimedia_commons tag (at least with OsmAnd 4.1.1 on IOS).
It's a pity because the wikimedia_commons tag is the one that is recommended at the top of the list in the OSM wiki to link a photo gallery.
Would it be possible to add the use of this OSM tag in OsmAnd?
Thanks in advance-

@vshcherb vshcherb modified the milestones: future-backend, 4.2-android Jan 13, 2022
@vshcherb
Copy link
Member

@clwacker you probably want to open separate issue for ios cause this issue is fixed
At least for https://www.openstreetmap.org/node/7096334253

@dbogdanov
Copy link
Author

Currently only one image is shown. What about having a way to access all photos available for the POI? This could be done as a clickable "more photos" that links to the appropriate Wikimedia Commons category.

@clwacker
Copy link

Currently only one image is shown. What about having a way to access all photos available for the POI? This could be done as a clickable "more photos" that links to the appropriate Wikimedia Commons category.

Yes, that exactly what I hoped to have in OsmAnd and asked a few days ago in #13548

@vshcherb
Copy link
Member

vshcherb commented Jan 21, 2022

@vshcherb vshcherb reopened this Jan 21, 2022
@vshcherb vshcherb modified the milestones: 4.2-android, 4.3-android Jan 21, 2022
@vshcherb vshcherb modified the milestones: 4.3-android, 4.4-backend Sep 29, 2022
@aspensmonster
Copy link

Seconding this request for improved image pulling. Presently, if there is only a wikimedia_commons key, then all pictures are pulled. However, if there is both a wikimedia_commons key and a wikidata key, then only the image from the wikidata, if it even exists, is displayed. As well, if there is only a wikidata key available on the OSM entity, then only the image from wikidata is displayed (if it exists), even if there is a Commons Category statement on the wikidata entry.

@vshcherb vshcherb modified the milestones: next-backend, 4.6-backend Jun 28, 2023
@vshcherb vshcherb changed the title Infer Wikimedia Commons category from Wikidata to show photos Infer Wikimedia Commons category from Wikidata to show photos (P373) Sep 15, 2023
@DmitryAlexei
Copy link
Contributor

OsmAnd~ 4.6.0#1007m, released: 2023-11-10
6 tested nodes with wikidata=* tag show pictures from wikimedia commons as expected.

video_2023-11-10_21-26-39.mp4
video_2023-11-10_22-12-25.mp4

@dmpr0
Copy link
Contributor

dmpr0 commented Nov 21, 2023

Review

  • ToDo is missed

@dmpr0 dmpr0 reopened this Nov 21, 2023
@vshcherb
Copy link
Member

vshcherb commented Nov 21, 2023

To do:

All OSM objects having tag wikidata or wikipedia or wikimedia_commons like https://www.openstreetmap.org/node/7096334253
should display following images:

  1. Images from wikimedia_commons attached to OSM - https://commons.wikimedia.org/wiki/Category:Tur%C3%B3%20del%20Mar?uselang=en like https://www.openstreetmap.org/node/7096334253
  2. Images from wikidata directly https://www.wikidata.org/wiki/Q11953719 property P18
  3. Images from wikidata https://www.wikidata.org/wiki/Q11953719 wikimedia commons - propery https://www.wikidata.org/wiki/Property:P373
  4. Images that has link to referenced wikidata - https://commons.wikimedia.org/wiki/File:Siilinkari.jpg reference https://www.wikidata.org/wiki/Property:P180

Merged with task - #13926

@dmpr0 dmpr0 reopened this Nov 23, 2023
@dmpr0
Copy link
Contributor

dmpr0 commented Nov 23, 2023

Review

Empire State Building

https://www.openstreetmap.org/way/34633854

Screenshot
Android iOS
  • iOS show less photos

German Nazi Concentration Camp Auschwitz (Auschwitz I)

https://www.openstreetmap.org/way/29572443

Screenshot
Android iOS
  • iOS show less photos

@vshcherb vshcherb modified the milestones: 4.6-backend, 4.6-iOS Nov 27, 2023
@vshcherb vshcherb assigned Skalii and nnngrach and unassigned Dima-1, Skalii and nnngrach Dec 5, 2023
@Skalii Skalii linked a pull request Dec 8, 2023 that will close this issue
@Skalii Skalii linked a pull request Dec 12, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment