Location based category search

March 4, 2020 · View on GitHub

Task: Identify the best strategy/APIs to find Commons categories that are within a certain radius of specified GPS coordinates.

This page will be used to document the results of testing the categories obtained via different APIs/strategies against the benchmark of categories that have been manually entered (by the Commons community or by myself) for each picture.

Pictures are found by:

  1. Visiting https://commons.wikimedia.org/wiki/Special:Random/File
  2. Eliminating files that are not photos or could not possibly be obtained via a smartphone
  3. File must have location data available

For the "existing pics at that location" strategy tests, I manually exclude the categories found that are attached to the exact same file that is being used for the test.

Sample 1

URL: https://commons.wikimedia.org/wiki/File:Palermo_Cathedral2.JPG
Camera location: 38° 06′ 49.93″ N, 13° 21′ 22.55″ E
Decimal degrees: 38.11386944444445, 13.356263888888888
Manual categorization: 5 good categories

  • Side views of the Cathedral of Palermo - Architectural details -> listed on Commons
  • Cathedral (Palermo) - Exterior -> my opinion
  • La Martorana (Palermo)
  • Saint Rosalia by Vincenzo Vitaliano
  • Side views of the Cathedral of Palermo

WikiData API: results

  • 2 good categories (radius 0.1km):
  • Cathedral (Palermo)
  • La Martorana (Palermo)
  • 1 false positives:
  • Museo Diocesano (Palermo)

"Existing pics at that location" strategy:

  • 100m radius: results
  • 3 good categories: Side views of the Cathedral of Palermo, Cathedral (Palermo), Saint Rosalia by Vincenzo Vitaliano
  • 3 false positives: Piazza del Duomo (Palermo), Porch of the Cathedral of Palermo, Church towers of the Cathedral of Palermo

Method D

  • Radius with min 5 categories: 100m
  • Position of good categories: 1, 3, 4

10k radius

  • Same results as method D - link

Sample 2

URL: https://commons.wikimedia.org/wiki/File:Oberstaufen_Heiligen-Geist_church.jpg
Camera location: 47° 33′ 14.42″ N, 10° 01′ 06.11″ E
Decimal degrees: 47.554005555555555, 10.01836388888889
Manual categorization: 5 good categories

  • Churches in Oberstaufen -> listed on Commons
  • Cultural heritage monuments in Oberstaufen -> listed on Commons
  • Holy Spirit churches in Bavaria -> listed on Commons
  • St. Peter und Paul (Oberstaufen)
  • Lourdeskapelle (Oberstaufen)

WikiData API: results

  • 1 good category:
  • St. Peter und Paul (Oberstaufen)
  • 0 false positives

"Existing pics at that location" strategy:

  • 100m radius: results
  • 1 good categories: Lourdeskapelle (Oberstaufen)
  • 0 false positives

Method D

  • Radius with min 5 categories: 1000m
  • Additional good categories found: Cultural heritage monuments in Oberstaufen, Buildings in Oberstaufen, St. Peter und Paul (Oberstaufen)
  • Position of good categories: 1, 2, 4, 5

10k radius

  • Same results as Method D - link

Sample 3

URL: https://commons.wikimedia.org/wiki/File:Slipway_at_Canvey_Point_-_geograph.org.uk_-_1207137.jpg
Camera location: 51° 31′ 14.41″ N, 0° 37′ 28.77″ E
Decimal degrees: 51.520669444444444, 0.6246583333333333
Manual categorization: 3 good categories

  • Essex -> listed on Commons
  • Canvey Island -> my opinion
  • Canvey Island F.C.

WikiData API: results

  • 1 good category:
  • Canvey Island F.C.
  • 0 false positives

"Existing pics at that location" strategy:

  • 100m radius: results
  • 1 good categories: Essex
  • 1 false positives: Images from the Geograph British Isles project needing categories as of 26 February 2011

Method D

  • Radius with min 5 categories: 1000m
  • Additional good categories found: Canvey Island
  • Position of good categories: 1, 3

10k radius

  • Found same good categories as Method D
  • Additional categories: Leigh Beck, Yacht clubs in England, Pumping Stations in the United Kingdom - link

Sample 4

URL: https://commons.wikimedia.org/wiki/File:2008_07_15_Bird_Care_Centre_of_Castel_Tyrol_61210_D9917.jpg
Camera location: 46° 41′ 37.45″ N, 11° 08′ 38.64″ E
Decimal degrees: 46.69373611111111, 11.144066666666665
Manual categorization: 3 good categories

  • Bird Care Centre of Tirol Castle -> listed on Commons
  • Falconry displays -> listed on Commons
  • Gyps in flight -> listed on Commons

WikiData API: results

  • 0 good categories
  • 1 false positive: Tirol Castle

"Existing pics at that location" strategy:

  • 100m radius: results
  • 2 good categories: Bird Care Centre of Tirol Castle, Falconry displays
  • 3 false positives: Corvus corax (captive), Coragyps atratus (captive), Parabuteo unicinctus in flight (captive)

Method D

  • Radius with min 5 categories: 100m
  • Position of good categories: 1, 1 (all categories have similar distance. maybe taken by 1 person?)

10k radius

  • Same results as Method D - link

Sample 5

URL: https://commons.wikimedia.org/wiki/File:MammysCupboardSept2008E.jpg
Camera location: 31° 28′ 41″ N, 91° 22′ 16.9″ W
Decimal degrees: 31.478055555555553, -91.3713611111111
Manual categorization: 1 good category

  • Mammy's Cupboard Restaurant -> listed on Commons

WikiData API: results

  • 1 good category:
  • Mammy's Cupboard Restaurant
  • 0 false positives

"Existing pics at that location" strategy:

  • 100m radius: results
  • 1 good categories: Mammy's Cupboard Restaurant
  • 0 false positives

Method D

  • Radius with min 5 categories: does not exist, increased until received error (ggsradius may not be over 10000 (set to 100000) for users)
  • Position of good categories: 1

10k radius

  • Same results as Method D - link

Sample 6

URL: https://commons.wikimedia.org/wiki/File:Tai%27an_Dai_Miao_2015.08.13_10-18-46.jpg
Camera location: 36° 11′ 41.48″ N, 117° 07′ 30.97″ E
Decimal degrees: 36.194855555555556, 117.12526944444444 Manual categorization: 1 good category

  • Dai miao -> listed on Commons

WikiData API: results

  • 0 good categories
  • 1 false positives : Tai'an

"Existing pics at that location" strategy:

  • 100m radius: results
  • 1 good categories: Dai miao
  • 0 false positives

Method D

  • Radius with min 5 categories: nonexistent (ggsradius may not be over 10000 (set to 100000) for users)
  • Position of good categories: 1

10k radius

  • Same results as Method D - link

Sample 7

URL: https://commons.wikimedia.org/wiki/File:Tyr_Reykjavik_20120624.JPG
Camera location: 64° 09′ 00.28″ N, 21° 56′ 19.82″ W
Decimal degrees: 64.15007777777778, -21.93883888888889
Manual categorization: 3 good categories

  • Reykjavik harbour -> listed on Commons
  • Týr (ship, 1975) -> listed on Commons
  • Icelandic Coast Guard ships in Reykjavík harbour -> listed on Commons

WikiData API: results

  • 0 good categories
  • 0 false positives

"Existing pics at that location" strategy:

  • 100m radius: results
  • 0 good categories
  • 2 false positives: Monuments and memorials in Reykjav\u00edk, 2008 in Reykjav\u00edk

Method D

  • Radius with min 5 categories: 1000m
  • Additional good categories found: Reykjavik harbour
  • Position of good categories: 4

10k radius

  • Same results as Method D - link

Sample 8

URL: https://commons.wikimedia.org/wiki/File:Tupadly,_n%C3%A1ves.jpg
Camera location: 50° 26′ 32.01″ N, 14° 28′ 23.83″ E
Decimal degrees: 50.44222499999999, 14.473286111111111
Manual categorization: 1 good category

  • Tupadly (Mělník District) -> listed on Commons

WikiData API: results

  • 1 good category (needed to expand radius to 1km to find):
  • Tupadly (Mělník District)
  • 3 false positives: Mokřady dolní Liběchovky, Cultural monuments in Tupadly (Mělník District), Stráně Hlubockého dolu

"Existing pics at that location" strategy:

  • 100m radius: results
  • 1 good categories: Tupadly (M\u011bln\u00edk District)
  • 5 false positives: Bell towers in M\u011bln\u00edk District, Chapels in M\u011bln\u00edk District, Cultural monuments in Tupadly (M\u011bln\u00edk District), Lib\u011bchovka, Castle Slav\u00edn

Method D

  • Radius with min 5 categories: 100m
  • Position of good categories: 1

10k radius

  • Same results as method D - link

Sample 9

URL: https://commons.wikimedia.org/wiki/File:Allt_Mor_na_h-Uamha_-_geograph.org.uk_-_411143.jpg
Camera location: 56° 59′ 42.27″ N, 6° 16′ 18″ W
Decimal degrees: 56.995075, -6.2716666666666665
Manual categorization: 2 good categories

  • Fords in Scotland -> listed on Commons
  • Allt Mor na h-Uamha -> listed on Commons

WikiData API: results

  • 0 good categories
  • 0 false positives

"Existing pics at that location" strategy:

  • 100m radius: results
  • 1 good categories: Allt Mor na h-Uamha
  • 1 false positive: Hallival

Method D

  • Radius with min 5 categories: 1000m
  • Additional good categories found: Hiking paths of Scotland
  • Position of good categories: 1, 4

10k radius

  • Same results as Method D - link

Sample 10

URL: https://commons.wikimedia.org/wiki/File:Kest%C5%99any_-_Horn%C3%AD_tvrz_(8).jpg
Camera location: 49° 16′ 14.4″ N, 14° 04′ 25.57″ E
Decimal degrees: 49.27066666666666, 14.073769444444444
Manual categorization: 3 good categories

  • Horní tvrz (Kestřany) -> listed on Commons
  • Tvrze -> listed on Commons
  • Kestřany -> my opinion

WikiData API: results

  • 1 good category:
  • Kestřany
  • 0 false positives

"Existing pics at that location" strategy:

  • 100m radius: results
  • 2 good categories: Horn\u00ed tvrz (Kest\u0159any), Tvrze
  • 0 false positives

Method D

  • Radius with min 5 categories: nonexistent (ggsradius may not be over 10000 (set to 100000) for users)
  • Position of good categories:

10k radius

  • Same results as Method D - link

WikiData results

  • Score for sample 1 = 0.0666666666667
  • Score for sample 2 = 0.0666666666667
  • Score for sample 3 = 0.111111111111
  • Score for sample 4 = -0.111111111111
  • Score for sample 5 = 0.333333333333
  • Score for sample 6 = -0.333333333333
  • Score for sample 7 = 0.0
  • Score for sample 8 = -0.666666666667
  • Score for sample 9 = 0.0
  • Score for sample 10 = 0.111111111111
  • Total score = -0.422222222222

"Existing pics at location" strategy

  • Score for sample 1 = 0.0
  • Score for sample 2 = 0.0666666666667
  • Score for sample 3 = 0.0
  • Score for sample 4 = -0.111111111111
  • Score for sample 5 = 0.333333333333
  • Score for sample 6 = 0.333333333333
  • Score for sample 7 = -0.222222222222
  • Score for sample 8 = -1.33333333333
  • Score for sample 9 = 0.0
  • Score for sample 10 = 0.222222222222
  • Total score = -0.711111111111