User:Lucas Werkmeister/Wikidata Image Positions
Wikidata Image Positions is a tool that shows relative position within image (P2677) qualifiers on depicts (P180) statements on Wikidata items as areas on the item’s image (P18) (or other property), and also allows users to add new such qualifiers for depicts (P180) statements that don’t have them yet.
There are two ways to use the tool to view positions: by item, or by IIIF region (i. e., relative position within image (P2677) value). Additionally, you can use it in combination with IIIF-based tools.
This is the most straightforward way to use the tool. You enter an item ID into the first form on the index page, or append it directly to the URL https://tools.wmflabs.org/wd-image-positions/item/, and the tool will load the item and all its depicts (P180) statements and show you the item’s best image (P18) (respecting rank) with the depicted items on top of it, according to their relative position within image (P2677) qualifiers. (The depicted items are only visible when you hover the mouse over the image. If you’re on mobile, uh, uhhhm… oh look, over there, a distraction!) Any depicts (P180) statements without such qualifiers will be listed below the image.
If the image is specified in a different property than image (P18), enter that property ID into the form as well, or append it to the URL after another slash.
By IIIF region
This mode of the tool is useful mainly as the formatter URL for relative position within image (P2677). You enter a relative position within image (P2677) value into the second form on the index page, or append it directly to the URL https://tools.wmflabs.org/wd-image-positions/iiif_region/, and the tool will search for all items with a depicts (P180) statement and relative position within image (P2677) qualifier matching that value and list them on one page, very similar to the “by item” mode. (Most likely, there’s only one matching item, in which case the result looks identical.)
As in “by item” mode, you can specify a different property than image (P18), though I’m not sure when that would be useful.
The tool can also generate manifests for the International Image Interoperability Framework.
The manifest URL is
and an example tool where you can use it is Mirador –
append the manifest URL to the URL https://iiif.si.edu/mirador/?manifest= to try it out
then click the icon on the left to show the annotations.
Specifying the language
By default, the tool displays item labels in your browser’s preferred languages. To select different languages, you can add uselang parameters to the URL, e. g. https://tools.wmflabs.org/wd-image-positions/item/Q1231009?uselang=de-at&uselang=de. Note that the tool doesn’t support any kind of language fallbacks (except that English labels are always used as a last resort before falling back to the plain item ID), so any fallbacks you want need to be encoded explicitly in the URL (like the fallback “Austrian German” → “German” in the last example).
The tool’s UI is not translated, by the way, in case you’re wondering. This section only applies to the item labels.
If an item has any depicts (P180) statements that don’t have a relative position within image (P2677) qualifier yet, you can also use the tool to add those qualifiers. (The tool only lets you add qualifiers to existing statements: if the statements themselves don’t exist yet, add them first separately, e. g. on Wikidata or using another tool like QuickStatements.)
Defining the region
To define a new region, click the “add region” button after any of the “depicted, but with no region qualified” items listed below the image. Then, move the mouse to the upper left corner of the intended target region, and press the left mouse button. While keeping the left mouse button pressed, move the mouse to the lower right corner of the intended target region. When you’re happy with the indicated region (which should already be visible at this point, updating live as you move the mouse), release the left mouse button. If you’re not happy with the region and want to try again, press the Esc key to abort.
Adding the region with QuickStatements
If you are not logged into the tool, then as soon as you release the left mouse button, the tool will ask you if you want the resulting region copied into your clipboard. (If you currently have anything important in the clipboard that you don’t want to lose, cancel here, otherwise it will be overwritten.) If you confirm, it will be copied into your clipboard using QuickStatements syntax; you can then go to the Quickstatements tool and paste the new region there (in “V1” syntax). If you want, you can collect several regions in one QuickStatements batch by continuing to draw regions and paste them into the tool before you actually make the edits.
Adding the region directly
You can also log into the tool, using the “login” link in the upper right corner. Once you’re logged in, as soon as you’re finished drawing a region, the corresponding qualifier will be added immediately. Note that there is no confirmation prompt in this case, as this mode prioritizes editing efficiency over safety; if you’re not happy with a region, press Esc while you’re still drawing it before releasing the left mouse button, or revert your own edit afterwards.
You can see edits made using this tool on the recent changes list.