Wednesday, September 13, 2017

SPARQL-derived IIIF Manifests for Coin Types

Building on Numishare's new IIIF manifest functionality, I have extended this feature to support the generation of a manifest for the IIIF resources for physical coins associated with coin types. The coin type manifest is generated in much of the same way as other queries for related coins: a SPARQL query, with the exception that the results are restricted only to physical specimens connected to IIIF services, according to the EDM extension.

The query is here: https://gist.github.com/ewg118/d4833fc0f61c17f84c723dcb3a7fe901

The metadata for the manifest are still derived from the typological information within the coin type NUDS document, but each canvas object is transformed from the SPARQL results for each coin.

The challenge here is that different organizations have different standards for packaging their obverse and reverse photographs. Most of our IIIF partners (including the ANS) have a separate image file for both the obverse and reverse, but several (like Harvard Art Museums) have combined the obverse and reverse photos into a single image file. In order to present the most cohesive and intuitive display of the manifest within a IIIF viewer, I opted to represent each coin rather than each image as a canvas (and incorporated collection, identifier, weight, diameter, and axis metadata within the canvas). Therefore, I experimented with generating a canvas as wide as the width of both the obverse and reverse images and placing both images on the same canvas, with the reverse image as a segment with its top left corner aligning with the top right corner of the obverse image. This is done by specifying placement and dimensions of the canvas:

"on": "http://gallica.bnf.fr/ark:/12148/btv1b10323768v#xywh=2646,0,2646,2646"

However, I have found that neither Universal Viewer nor Mirador support this functionality out of the box yet, even though it is valid according to the IIIF Presentation API. It does work in Masahide Kanzaki's IIIF viewer built on OpenSeadragon.



You can see an example of the Price 112 manifest rendered here: http://www.kanzaki.com/works/2016/pub/image-annotator?u=http://app1.numismatics.org/pella/manifest/price.112

IIIF coverage will be expanded significantly across PELLA, OCRE, and CRRO once the new version of Mantis goes live in the next one or two weeks. There is now a link at the top of each coin type page (when applicable) to the IIIF manifest.