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

Migrate extensions and services from annex to registry #2092

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source/_includes/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[annex-cookbook]: {{ site.cookbook_url | absolute_url }}/ "IIIF Cookbook"
[annex-json-ld]: {{ site.api_url | absolute_url }}/annex/notes/jsonld/ "JSON-LD Frames Implementation Notes"
[annex-oa]: {{ site.api_url | absolute_url }}/annex/openannotation/ "Open Annotation Extensions"
[annex-wa]: {{ site.api_url | absolute_url }}/registry/webannotation/ "Open/Web Annotation Extensions"
[annex-patterns]: {{ site.api_url | absolute_url }}/annex/notes/design_principles/
[annex-services]: {{ site.api_url | absolute_url }}/annex/services/ "Services Annex Document"
[auth094]: {{ site.api_url | absolute_url }}/auth/0.9/ "Authentication API v0.9.4"
Expand All @@ -14,7 +15,7 @@
[auth1]: {{ site.api_url | absolute_url }}/auth/1.0/ "IIIF Authentication API 1.0"
[auth10]: {{ site.api_url | absolute_url }}/auth/1.0/ "IIIF Authentication API 1.0"
[contentstate09]: {{ site.api_url | absolute_url }}/content-state/0.9/
[contentstate-export]: {{ site.api_url | absolute_url }}/content-state/0.9/#export "3.7. Exporting Current Content State from Viewer"
[contentstate-export]: {{ site.api_url | absolute_url }}/content-state/0.9/#export "3.7. Exporting Current Content State from Viewer"
[contentstate-http]: {{ site.api_url | absolute_url }}/content-state/0.9/#7-http-requests-and-responses "HTTP Request and Responses"
[contentstate-initialization]: {{ site.api_url | absolute_url }}/content-state/0.9/#initialization "Initialization mechanisms (protocol)"
[contentstate03]: {{ site.api_url | absolute_url }}/content-state/0.3/ "IIIF Content State API"
Expand Down
2 changes: 0 additions & 2 deletions source/annex/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ hero:

## API Annex Documents

- [Open Annotation ImageApiSelector]({{ site.api_url | absolute_url }}/annex/openannotation/)
- [Description of REST usage with IIIF APIs]({{ site.api_url | absolute_url }}/annex/rest/)
- [Known External Services]({{ site.api_url | absolute_url }}/annex/services/)

## API Implementation Notes

Expand Down
1 change: 1 addition & 0 deletions source/registry/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The process for having an entry included in one of the IIIF extension registries
* [Presentation API Extensions][extensions]
* [Motivations][registry-motivations]
* [Profiles][registry-profiles]
* [Open/Web Annotation Extensions][annex-wa]
* [Services][registry-services]
* [TimeModes][registry-timeModes]
* [Types][registry-types]
Expand Down
123 changes: 119 additions & 4 deletions source/registry/services/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ editors:
- name: Simeon Warner
ORCID: https://orcid.org/0000-0002-7970-7855
institution: Cornell University
- name: Dawn Childress
ORCID: https://orcid.org/0000-0003-2602-2788
institution: UCLA
- name: Jeff Mixter
ORCID: https://orcid.org/0000-0002-8411-2952
institution: OCLC Research
---

## Status of this Document
Expand Down Expand Up @@ -56,13 +62,28 @@ The process for having a new entry added to this registry is [described here][re

## 3. Registry

This table summarizes the services available and which APIs they may be used in. The '![not allowed][icon-na]' icon means that the service is not to be used in the API. The '![recommended][icon-rec]' icon means that the service can be used in the API.
This table summarizes the services available and which APIs they may be used in. For the icons and their meanings, consult the [Summary of Property Requirements][prezi30-appendixa] icon table in the IIIF Presentation 3 API documentation.

| Service | Image API | Presentation API |
| ------------------------------ |:-------------------------:|:-------------------------:|
| [Image Information][image-api] | ![optional][icon-opt] | ![recommended][icon-rec] |
| Service | Image API | Presentation 2 API | Presentation 3 API |
| ------------------------------ |:-------------------------:|:-------------------------:|:-------------------------:|
| [Image Information][image-api] | ![optional][icon-opt] | ![recommended][icon-rec] | ![recommended][icon-rec] |
| [GeoJSON][lgeojson] | ![not allowed][icon3-na] | ![recommended][icon3-rec] | ![not allowed][icon3-na] |
| [Physical Dimensions][physdim] | ![recommended][icon3-rec] | ![recommended][icon3-rec] | ![recommended][icon3-rec] |
{: .api-table}

The following names have been added as of version 3.0 of the Image and Presentation APIs in order to facilitate cross-version compatibility. These names are used in the `type` or `@type` field for the service.

| Value | Specification |
| -------------------- | ------------- |
| ImageService1 | [Image API version 1][image11] |
| ImageService2 | [Image API version 2][image21] |
| SearchService1 | [Search API version 1][search1] |
| SearchService2 | In development |
| AutoCompleteService1 | [Search API version 1][search1-autocomplete] |
| AuthCookieService1 | [Authentication API version 1][auth1-cookie-service] |
| AuthTokenService1 | [Authentication API version 1][auth1-token-service] |
| AuthLogoutService1 | [Authentication API version 1][auth1-logout-service] |
{: .api-table #table-service-types}

### 3.1 Image Information
_Added: 2014-05-20_
Expand Down Expand Up @@ -134,6 +155,91 @@ With the `logo` property added to the Image Information description in version 2
}
```

### 3.2 GeoJSON
{: #geojson}
_Added: 2014-05-20_, _Latest Revision: 2022-02-01_

*Note: GeoJSON as a service is supported in the Presentation 2 API. For the Presentation 3 API, use the [navPlace extension][navPlace].*

[GeoJSON][geojson] provides the ability to associate a geographical place with a resource, in order to drive a map-based user interface or visualization tool. This might be a location associated with the provenance of the object such as where it was created, or where it is currently held. The location might also be related to the content of the resource, such as a city mentioned in the text or the landmark depicted in a photograph. It is not appropriate to use this feature for tagging of time, people, events, and other semantic metadata outside of the scope of the Presentation API.

The [JSON-LD representation][geojson-ld] of GeoJSON, with `@context` `http://geojson.org/geojson-ld/geojson-context.jsonld` _SHOULD_ be used. See the GeoJSON documentation for a full description of the functionality available.

An external reference example for tagging a place, where the URI would return a GeoJSON description of the city of Paris, France:

{% include api/code_header.html %}
``` json-doc
{
"service": {
"@context" : "http://geojson.org/geojson-ld/geojson-context.jsonld",
"@id" : "http://www.example.org/geojson/paris.json"
}
}
```

Or embedding the content:

{% include api/code_header.html %}
``` json-doc
{
"service": {
"@context" : "http://geojson.org/geojson-ld/geojson-context.jsonld",
"@id" : "http://www.example.org/geojson/paris.json",
"type": "Feature",
"properties": {"name": "Paris"},
"geometry": {
"type": "Point",
"coordinates" : [48.8567,2.3508]
}
}
}
```
### 3.3 Physical Dimensions
{: #physical-dimensions}
_Added: 2014-05-20_, _Latest Revision: 2015-12-04_

For digitized objects, it is often useful to know the physical dimensions of the object. When available, they allow a client to present a ruler, or other rendition of physical scale, to the user. However, implementers are warned that while this information may be available, frequently:

* It is not available at all.
* It is unreliable when it is recorded.
* It is different for every view of an object.
* When used with the Presentation API, the Canvas might not be sized to depict only the physical object, but might also include a ruler, color bar, the scanning bed or other background objects. In these cases, the Canvas height and width will not be representative of the main object.

As the Presentation API already includes an aspect ratio for the Canvas, and the Image API includes the height and width of the Image, the physical dimensions service need only report two additional pieces of information: the scale factor to multiply the dimensions by to calculate the physical dimensions, and the units for those generated physical dimensions. It is _RECOMMENDED_ that the information always be embedded rather than requiring the client to retrieve it with an additional HTTP request, however some implementers _MAY WISH TO_ keep the information separate.

When used with the Image API, it allows a client to calculate the pixels per inch (often abbreviated as PPI or DPI) of the image it is associated with. When used with the Presentation API, it gives the size of the object that the Canvas is a surrogate for.

The physical dimensions description includes the following properties:

| Property | Required? | Description |
| ---------------- | --------- | ----------- |
| `@context` | Required | The string "http://iiif.io/api/registry/services/physdim/1/context.json". |
| `@id` | Optional | A URI that will return the information, perhaps generated dynamically from the image. |
| `profile` | Required | The string "http://iiif.io/api/registry/services/physdim". |
| `physicalScale` | Required | The floating point ratio by which the digital resource's height and width are multiplied in order to determine the depicted scene's height and width. |
| `physicalUnits` | Required | The physical units for the generated height and width. Possible values are: "mm", "cm", in". |
{: .api-table}

The following example demonstrates the resulting structure, as embedded within the [Presentation API][prezi-api] response:

{% include api/code_header.html %}
``` json-doc
{
"service": {
"@context": "http://iiif.io/api/registry/services/physdim/1/context.json",
"profile": "http://iiif.io/api/registry/services/physdim",
"physicalScale": 0.0025,
"physicalUnits": "in"
}
}
```

If the above example was associated with a Canvas of width 4000 and height 6000, then the physical object would be 4000 * 0.0025 = 10 inches wide, and 15 inches high. If it was associated with an image with width 4000 and height 6000, then it would mean the image was 4000 pixels for 10 inches, or 400 pixels per inch.

__Note:__
There is a proposal to add a confidence label or value to this service to allow clients to either determine if they should use the information, or to display an appropriate warning or description when using it. This proposal is currently deferred until additional experience and use cases have been explored. Any interest in this feature should be brought up on [iiif-discuss][iiif-discuss].
{: .note}

## Appendices

### A. Acknowledgements
Expand All @@ -146,7 +252,16 @@ Thanks to the members of the [IIIF][iiif-community] for their continuous engagem

| Date | Description |
| ---------- | -------------------------------------------------- |
| 2022-02-01 | Migrate Physical Dimensions from Annex |
| 2022-02-01 | Migrate GeoJSON from Annex |
| 2018-XX-YY | New Version 3 Registries |


{% include acronyms.md %}
{% include links.md %}

[geojson]: http://geojson.org/ "GeoJSON"
[geojson-ld]: http://geojson.org/geojson-ld/ "GeoJSON-LD"
[imageinfo]: #image-information
[lgeojson]: #geojson
[physdim]: #physical-dimensions
16 changes: 16 additions & 0 deletions source/registry/services/physdim/1/context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
---
{
"@context": {
"iiif": "http://iiif.io/api/presentation/2#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"physicalScale": {
"@id": "iiif:physicalScale",
"@type": "xsd:float"
},
"physicalUnits": {
"@id": "iiif:physicalUnits",
"@type": "xsd:string"
}
}
}
26 changes: 26 additions & 0 deletions source/registry/webannotation/context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"@context": {
"iiif": "http://iiif.io/api/image/2#",

"region": {
"@id": "iiif:regionValue",
"@type": "xsd:string"
},
"size": {
"@id": "iiif:sizeValue",
"@type": "xsd:string"
},
"rotation": {
"@id": "iiif:rotationValue",
"@type": "xsd:string"
},
"format": {
"@id": "iiif:formatValue",
"@type": "xsd:string"
},
"quality": {
"@id": "iiif:qualityValue",
"@type": "xsd:string"
}
}
}
Loading