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

map CCMA IIIF images #12

Open
VladimirAlexiev opened this issue Mar 10, 2017 · 22 comments
Open

map CCMA IIIF images #12

VladimirAlexiev opened this issue Mar 10, 2017 · 22 comments

Comments

@VladimirAlexiev
Copy link
Member

http://data.americanartcollaborative.org/page/ccma/object/4 crm:P138i_has_representation
http://iiif.museum.colby.edu/2013.003_001_cd.jpg.
If you click that URL, it returns JSON so there's a live IIIF server underneath. But that URL is not an image (JPEG)

There are two issues here:

@cbutcosk
Copy link
Collaborator

cbutcosk commented Mar 10, 2017

I also would be very interested in seeing that stuff get mapped! I had intended IIIF_URL to be a IIIF identifier, but can change that to whatever makes sense for mapping. I also will have presentation manifests for those objects up sometime next week if that's helpful.

May I suggest that ImagePath still be mapped as the object of a crm:P138i_has_representation predicate though? In addition to whatever the IIIF mapping turns out to be, I mean. All our objects don't have IIIF-represented images and it'd be a shame to lose representation data about the ones that don't.

@caknoblock
Copy link
Contributor

caknoblock commented Mar 10, 2017 via email

@workergnome
Copy link

@azaroth42: Do you have written down any of those notes from our discussion about possible ways to map IIIF to the CIDOC-CRM?

@VladimirAlexiev
Copy link
Member Author

designforcontext/aac_review_tool#51 is the general issue for producing IIIF

@VladimirAlexiev
Copy link
Member Author

@cbutcosk:

intended IIIF_URL to be a IIIF identifier, but can change that to whatever makes sense for mapping
http://iiif.museum.colby.edu/2013.003_001_cd.jpg

Better lose .jpg because that's not a JPG file. Either do this, or add a flag distinguishing deep-zoom (IIIF) from conventional images (eg JPG).

All our objects don't have IIIF-represented images: ImagePath still be mapped as crm:P138i_has_representation

Sure, it would be a pity to lose those. I propose the same Europeana mapping as you can see on the bottom left of this image from designforcontext/aac_review_tool#51:

<http://data.americanartcollaborative.org/ccma/object/4> 
  crm:P138i_has_representation
    <http://iiif.museum.colby.edu/2013.003_001_cd/full/full/0/default.jpg>.

<http://iiif.museum.colby.edu/2013.003_001_cd/full/full/0/default.jpg> a crm:E38_Image;
  svcs:has_service <http://iiif.museum.colby.edu/2013.003_001_cd>.

<http://iiif.museum.colby.edu/2013.003_001_cd> a svcs:Service;
  dct:conformsTo <http://iiif.io/api/image>.

  ## The rest is not needed in the semantic repo, since it's in info.json
  doap:implements     <http://iiif.io/api/image/2/level2.json> ,
    [ iiif:format    "webp" , "jpg" , "gif" , "png" ;
      iiif:quality   "gray" , "default" , "bitonal" , "color" ;
      iiif:supports  iiif:arbitraryRotationFeature , iiif:sizeAboveFullFeature , iiif:canonicalLinkHeaderFeature , iiif:profileLinkHeaderFeature , iiif:mirroringFeature , iiif:regionSquareFeature] ;
   exif:height         3072 ;
   exif:width          2308 .

For conventional images, it's quite simpler:

<http://data.americanartcollaborative.org/ccma/object/4> 
  crm:P138i_has_representation
    <http://iiif.museum.colby.edu/2013.003_001_cd.jpg>.

<http://iiif.museum.colby.edu/2013.003_001_cd.jpg> a crm:E38_Image.

@VladimirAlexiev
Copy link
Member Author

VladimirAlexiev commented Mar 12, 2017

@bsnikhila To implement this (I use $ to indicate variable interpolation as in perl):

  • if ImageUrl ends in \.(jpe?g|png) then emit
<$obj> crm:P138i_has_representation <$ImageUrl>. 
<$ImageUrl> a crm:E38_Image.
  • else emit
<$obj> crm:P138i_has_representation <$ImageUrl/full/full/0/default.jpg>.
<$ImageUrl/full/full/0/default.jpg> a crm:E38_Image; svcs:has_service <$ImageUrl>.
<$ImageUrl> a svcs:Service; dct:conformsTo <http://iiif.io/api/image>.

@VladimirAlexiev
Copy link
Member Author

@workergnome Then you can query like this:

  ?obj crm:P138i_has_representation ?img.
  optional {?img svcs:has_service ?iiif. ?iiif dct:conformsTo <http://iiif.io/api/image>.}

@azaroth42
Copy link

Unsurprisingly, we came up with a simpler approach that treats the Image API endpoint as a CRM Image. Image in CRM is an abstract concept, not necessarily a representation in the web architecture sense, which is fine for the service endpoint from which you can get images.

<https://linked.art/example/object/37> a crm:E22_Man-Made_Object ;
    rdfs:label "Sculpture" ;
    crm:P138i_has_representation <http://iiif.example.org/image/1> ;
    crm:P2_has_type <http://vocab.getty.edu/aat/300047090> .

<http://iiif.example.org/image/1> a crm:E38_Image ;
    rdfs:label "IIIF Image API for Sculpture" ;
    dcterms:conformsTo <http://iiif.io/api/image> .

@cbutcosk
Copy link
Collaborator

We just pushed a bunch of changes to our IIIF setup and our data, the fixed image links are in our most recent commit. The next time @bsnikhila runs the mapping we should be good on our end.

Per @VladimirAlexiev 's suggestion, our IIIF IDs now drop the file extension and internal suffix. They also point at larger images where they can, but an "is DZI?"-style flag isn't workable given our implementation. The IIIF endpoint and returns the right sizes/tile where it can so open sea dragon and/or @workergnome 's viewer should be hunky dunky.

@VladimirAlexiev
Copy link
Member Author

Pragmatically speaking: IMHO restricting crm:P138i_has_representation to actual image URLs will make @workergnome's work simpler.

  • When he needs to display a lightbox (image grid): he can use the crm:P138i_has_representation URLs directly, no matter whether these are IIIF images or not
  • Then to activate deep zooming on an image, he'll check for the presence of dcterms:conformsTo.

Following @azaroth42's proposal, he'd need to examine dcterms:conformsTo and then tack /full/full/0/default.jpg to the end (but what if a particular museum has PNG not JPGs? What if it wants smaller than full size to be used for the "default rendition" of an image?)

Ontologically speaking, an image is different from a server that can return many transformations of that image, including parts thereof. It's true that crm:E38_Image is abstract, so you could interpret it as that whole family of images. But if I return one pixel from Mona Liza, you'd be hard-pressed to call that an image of Mona Liza!

@azaroth42
Copy link

If the implementation cannot return a JPG, then it's not a valid IIIF implementation as the JPG format is mandatory at all conformance levels. And once you get to adding on parameters, that seems beyond the utility and expectations of modeling in CRM to me.

Another suggestion was to give application/ld+json;profile="..." as the dc:format of the IIIF endpoint, as that is what it should return (after a redirect). This is good too, and easily distinguishes from an image with dc:format of image/jpeg ... but IIIF needs to decide what URI to use for the JSON-LD profile in the media type. See: IIIF/api#1090

@workergnome
Copy link

I agree that the format is important. Either I should be able to assume that an id linked using P138i_has_representation will always be natively displayable in a web browser (which seems foolish), or there should be a way to filter on a consistent property those IDs with the correct format.

Speaking as a client, I'd much rather write switch statements based on results returned in dc:format, or sparql queries WHERE {?format IN ("image/jpeg", "image/png")} , then construct logic based around explicitly including and excluding things by OOB mappings.

@bsnikhila
Copy link
Contributor

There are 2 fields: Image_Path (ends in jpg) and IIIF_URL (does not end in jpg). Which field should I consider for mapping? Or should I use both? Could you please tell me how I should map these and if I should do this for all museums (Note: other museums do not have the IIIF URL).

Tagging @jainn3 too because he is using this data.

@workergnome
Copy link

image_path should be mapped as a standard image.

The one without should be mapped so:

<IIIF_URL> a crm:E38_Image ;
    rdfs:label "a meaningful label if provided" ;
    dcterms:conformsTo <http://iiif.io/api/image> .

@cbutcosk
Copy link
Collaborator

The commit I made just now includes a "Label" field in the array of images associated with an object for the <IIIF_URL> rdfs:label "Label" part of the mapping. Not a ton of meaningful data in there currently (though some sculptures include a "3/4 view" label), but updated labels should come soon.

@bsnikhila
Copy link
Contributor

Discussed with @caknoblock today. We are generating the manifest files for all museums' image data, including for CCMA. Is it required for me to map the IIIF URLs here or will the manifest files do?
(CCMA is the only museum that has the IIIF URLs.)

@VladimirAlexiev
Copy link
Member Author

@caknoblock If only CCMA has IIIF (deep zoom) images, why do you need manifests for the other museums? Plain image URLs are enough.

@cbutcosk CCMA had manifests (see first URL in this issue) but I can't find them now. checked these URLs

@cbutcosk
Copy link
Collaborator

@VladimirAlexiev Use the updated URLs/Identifiers from the JSON I pushed a few days ago and you should be good, eg:

@bsnikhila & @caknoblock I think it may be useful to map these images the way already outlined in this issue if you're looking to generate Presentation manifests for all museums--resources backed by servers that speak the Image API have a service key that need the image identifier as its @idAFAIK.

@VladimirAlexiev
Copy link
Member Author

Confirming the above work ok. https://iiif.museum.colby.edu/image/2013.003_001 redirects to
https://iiif.museum.colby.edu/image/2013.003_001/info.json that has the image info.
https://iiif.museum.colby.edu/image/2013.003_001/full/full/0/default.jpg returns the image.

Charlie, do you mean a manifest describing all the images of a museum? That could be useful to @workergnome. For an example, go to http://projectmirador.org/demo/, click left dropdown, select Yale, click right dropdown, select Gallery, and the result is:
image
This is the same image as described by ResearchSpace in 2014: https://confluence.ontotext.com/display/ResearchSpace/Yale+Mapping+Problems#YaleMappingProblems-ImageViews.
Other collections at http://projectmirador.org/demo/ have images of different sizes, and it shows the viewer can lay them out nicely.

@workergnome
Copy link

@VladimirAlexiev: The image API will give us access to metadata that will enable Deep Zoom, and thumbnails, and things like that.

Manifests and the Presentation API will give us the ability to associate metadata with the images, to group related images, and to make using and sharing these images more powerful. They're orthogonal, so we can have a presentation API for a non-deep-zoom image, and we can use the Image API without a manifest, but they're most powerful when you have both.

@workergnome
Copy link

@bsnikhila—if an institution has their own, published manifests, it's probably best to use those.

@jainn3
Copy link

jainn3 commented Apr 4, 2017

We can extract image_url prefix (https://iiif.museum.colby.edu/image/1995.151_001) from the image url itself (https://iiif.museum.colby.edu/image/1995.151_001/full/full/0/default.jpg) and use it as service id in the manifest file. We will do this using the python script and put in the manifest file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants