Commons:Bots/Requests/Geograph Update Bot (locations)

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Geograph Update Bot (talk · contribs) (locations)

Operator: Bjh21 (talk · contributions · Statistics · Recent activity · block log · User rights log · uploads · Global account information)

Bot's tasks for which permission is being sought: Adding, amending, and removing geocoding templates on files from Geograph projects.

Automatic or manually assisted: automatic, unsupervised

Edit type (e.g. Continuous, daily, one time run): One-time run initially, thereafter every few months or when I find a new kind of problem.

Maximum edit rate (e.g. edits per minute): 12 edits per minute

Programming language(s): Python with pywikibot

This is an addition to Geograph Update Bot's existing authorisation.

There's more detail of what the bot will do at User:Geograph Update Bot#Location correction. Initially, it will be fixing co-ordinates supplied by GeographBot, as discussed long ago at Commons:Batch uploading/Geograph#Imprecise Geotags. Later I'd like to tackle Geograph images that have never had a location and those with location but no heading. The task description above is intended to cover all of these and more.

As presently coded, the bot will not edit pages if the change of location is small, but this loses the opportunity to record the source and precision, so I'd be quite open to overwriting all of GeographBot's locations if that were desired. That would increase the number of edits from a few hundred thousand to about 1,700,000.

I'll start a test run in a few hours.

--bjh21 (talk) 16:30, 7 October 2017 (UTC)[reply]

Test run complete. See Special:Contributions/Geograph Update Bot. Note that the first few edits are unrepresentative as I debugged the edit-constructing code. --bjh21 (talk) 19:10, 7 October 2017 (UTC)[reply]

A small note: I've decided that adding source and precision is worthwhile even when the actual co-ordinates don't change by much. The bot will tag such changes as minor edits. --bjh21 (talk) 13:35, 19 October 2017 (UTC)[reply]

I've just done a second test run of five edits, now adding {{Object location}} to all images. See Special:Contributions/Geograph Update Bot again. --bjh21 (talk) 21:49, 24 October 2017 (UTC)[reply]

Note: as a result of suggestions by Krd and Nilfanion below, I've realised that there are circumstances where the bot will remove existing {{Location}} templates without replacing them. I've thus added "removing" to the list of things the bot might do to geocoding templates above. --bjh21 (talk) 11:43, 26 October 2017 (UTC)[reply]

Discussion

It occurs to me that people involved in the 2010 discussion may have opinions. @Multichill: , @ClemRutter: , and @Nilfanion: are all still active on Commons. --bjh21 (talk) 10:23, 9 October 2017 (UTC)[reply]

  • Is it possible that some of the photographs show a subset of the actual location and already contain precise location data (perhaps manually corrected), so that updating to the defined coordinates of the general object will worsen the situation? (I ran into such situations when updating coordinates of Austrian monuments.) Maybe the bot should check the file page history for possible manual edits which are not categorization only and skip these files? I know this improves complexity a lot, but it may save some mistakes that are not detected otherwise. Thoughts? --Krd 07:07, 16 October 2017 (UTC)[reply]
    I think you may have misunderstood precisely what I'm planning. I'm going to be updating the camera co-ordinates (mostly: see next paragraph). The new co-ordinates will be based on the camera co-ordinates for the same picture on Geograph Britain and Ireland, which is where both the pictures and the existing co-ordinates came from. To handle cases where the co-ordinates have been updated since upload, I compare the {{Location dec}} template in the latest revision of the page to the one in the first revision, and check that the first revision was generated by User:GeographBot. That should mean that I leave alone any page where the co-ordinates have been changed by hand.
    There is one occasion where I plan to add {{Object location}}, and that's when I can't derive a decent camera location from the Geograph database. Your question has made me realise that I need to avoid doing this where there is already an {{Object location}} recorded for a picture. In that case, I think I should just delete the GeographBot-derived {{Location dec}}. --bjh21 (talk) 11:34, 16 October 2017 (UTC)[reply]
    Ok, understood. I think the task should be approved. --Krd 16:34, 16 October 2017 (UTC)[reply]
  • Looks OK for me. --Jarekt (talk) 12:41, 19 October 2017 (UTC)[reply]
  •  Comment Please record both camera and subject location when available (via appropriate use of {{Object location}}). The location of the object is more significant for categorisation than the camera.--Nilfanion (talk) 09:03, 20 October 2017 (UTC)[reply]
    The documentation for {{Object location}} implies that only one of it and {{Location}} should be used on a file. It says, “For files, camera {{Location}}s are preferred,” and “if you know the camera location ... , use the camera location tag instead.” (my emphasis). Bots should embody best practices, so while the guidance discourages the use of both templates on a file, I think my bot should follow that. If the guidance is updated, the bot's behaviour can change. --bjh21 (talk) 11:20, 20 October 2017 (UTC)[reply]
I wrote that section and that is not how I meant it. Having both {{Object location}} and {{Location}} is is fine. I agree with Nilfanion that it would be nice to have both and if Geograph data have both I would preserve it. Otherwise if they do not have it, I would not worry about it, as that would be manual job, anybody (with infinite amount of time and patience) can do. It is not a job for a bot and that is what we discuses here. --Jarekt (talk) 11:46, 20 October 2017 (UTC)[reply]
OK; that's almost as good as a documentation update. I'll have the bot include both where possible. --bjh21 (talk) 12:33, 20 October 2017 (UTC)[reply]
@Nilfanion: The bot now adds {{Object location}} to any file that doesn't already have it, as well as updating or removing {{Location}}. That took a surprising amount of reworking of the guts of the bot. --bjh21 (talk) 21:49, 24 October 2017 (UTC)[reply]
@Bjh21: looks good to me now, I approve of this task. It might be worth extending it further to cover all Geograph uploads, not just those by Geograph bot - if only to add the two geo-references (eg File:St Clements Church (geograph 3178150).jpg only has the camera).--Nilfanion (talk) 15:00, 27 October 2017 (UTC)[reply]
@Nilfanion: The task as described above (next to Bot's tasks for which permission is being sought) is broad enough to cover that. The bot will eventually add {{Object location}} to all Geograph images that don't have it, and update {{Location}} on ones (like the one you mention) where it can deduce that the existing camera location came from Geograph. --bjh21 (talk) 16:25, 27 October 2017 (UTC)[reply]
Also, could you clarify what value is being used for the camera location? Consider these four examples (all for same 6-figure subject location).
Geograph's primary focus is on the subject not the camera, and the displayed information on Geograph may be less than that recorded internally. This can be seen on the preview maps, as the 4 camera locations are subtly different. How would your bot handle these 4 images?--Nilfanion (talk) 09:32, 20 October 2017 (UTC)[reply]
I've added those to the samples on User:Geograph Update Bot. Note that I've not yet applied the change to generate both templates, so each one only gets one for now.
The bot always works from the full-precision grid reference in the Geograph database, but when use6fig is set it sets the prec parameter to "100". --bjh21 (talk) 14:25, 20 October 2017 (UTC)[reply]
The samples now have both templates where the bot would generate both. --bjh21 (talk) 21:49, 24 October 2017 (UTC)[reply]

It's been a week since the last comment here, and I think I've satisfied everyone's concerns. I seem to have statements of support from two admins and two bureaucrats. I think this is ripe for a decision. --bjh21 (talk) 13:19, 4 November 2017 (UTC)[reply]

Approved. --Krd 07:32, 5 November 2017 (UTC)[reply]