Skip to content

Commit

Permalink
Merge branch 'master' into issue-502
Browse files Browse the repository at this point in the history
  • Loading branch information
glenrobson authored Aug 9, 2024
2 parents 84b58cf + 7c21105 commit 1397899
Show file tree
Hide file tree
Showing 15 changed files with 809 additions and 16 deletions.
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ GIT
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
colorator (1.1.0)
concurrent-ruby (1.3.1)
concurrent-ruby (1.3.3)
diff-lcs (1.5.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
ffi (1.16.3)
ffi (1.17.0)
forwardable-extended (2.6.0)
html-proofer (3.19.0)
addressable (~> 2.3)
Expand Down Expand Up @@ -78,33 +78,33 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
mini_portile2 (2.8.6)
nokogiri (1.16.5)
mini_portile2 (2.8.7)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogumbo (2.0.5)
nokogiri (~> 1.8, >= 1.8.4)
parallel (1.24.0)
parallel (1.25.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.5)
racc (1.8.0)
public_suffix (6.0.1)
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
redcarpet (3.6.0)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.3.4)
strscan
rouge (3.30.0)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
rspec-expectations (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
Expand Down
4 changes: 3 additions & 1 deletion _includes/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@
[0269]: {{ site.cookbook_url | absolute_url }}/recipe/0269-embedded-or-referenced-annotations/ "Embedded or Referenced Annotations"
[0283]: {{ site.cookbook_url | absolute_url }}/recipe/0283-missing-image/ "Missing Images in a Sequence"

[0326]: {{ site.cookbook_url | absolute_url }}/recipe/0326-annotating-image-layer/ "Annotate a specific images or layers"
[0306]: {{ site.cookbook_url | absolute_url }}/recipe/0306-linking-annotations-to-manifests/ "Linking external Annotations targeting a Canvas to a Manifest"
[0318]: {{ site.cookbook_url | absolute_url }}/recipe/0318-navPlace-navDate/ "Locating an Item in Place and Time"
[0326]: {{ site.cookbook_url | absolute_url }}/recipe/0326-annotating-image-layer/ "Annotate a specific images or layers"

[0346]: {{ site.cookbook_url | absolute_url }}/recipe/0346-multilingual-annotation-body/ "Annotating in Multiple Languages"
[0377]: {{ site.cookbook_url | absolute_url }}/recipe/0377-image-in-annotation/ "Image in annotation"

[0466]: {{ site.cookbook_url | absolute_url }}/recipe/0466-link-for-loading-manifest/ "Loading a manifest with a viewer using a link"
Expand Down
8 changes: 7 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ code {
display: table !important;
overflow-x: unset !important;
border-width: 0 0 1px !important;
border: none !important;
}

.viewer tr {
Expand All @@ -43,3 +42,10 @@ code {
border: none !important;
text-align: center !important;
}

.scrolling-header {
position: sticky;
top: 0px;
background-color: white;
box-shadow: inset 0 -1px 0 #dbdbdb;
}
3 changes: 3 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ _(leading on to segmentation examples later)_
* [Embedded or Referenced Annotations][0269]
* [Linking external Annotations targeting a Canvas to a Manifest][0306]
* [Image in annotations][0377]
* [Annotating in Multiple Languages][0346]

## Internal structure

Expand Down Expand Up @@ -171,6 +172,8 @@ Recipes using [Content State API](https://iiif.io/api/content-state/1.0/)
* Mixed Image Service references (a mashup, with img2 and img3 services)
* Glenn Gould - score and performance scenarios (transcribing)
* A Map
* [Locating an Item in Place and Time][0318]


## Access Control
_this might be in a separate auth cookbook_
Expand Down
1 change: 1 addition & 0 deletions recipe/0118-multivalue/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ In this example, the work has multiple titles in both English and French. The Ma

* [Internationalization and Multi-language Values][0006]
* [Metadata][0029]
* [Annotating in Multiple Languages][0346]

{% include acronyms.md %}
{% include links.md %}
202 changes: 202 additions & 0 deletions recipe/0318-navPlace-navDate/collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"@context": [
"http://iiif.io/api/extension/navplace/context.json",
"http://iiif.io/api/presentation/3/context.json"
],
"id": "{{ id.url }}",
"type": "Collection",
"label": {
"en": [
"NavPlace and NavDate Collection"
]
},
"summary": {
"en": [
"A collection of items related to Rome."
]
},
"requiredStatement": {
"label": {
"en": [
"Attribution"
]
},
"value": {
"en": [
"Objects from the Yale Center for British Art"
]
}
},
"items": [
{
"id": "{{ id.path }}/manifest-1.json",
"type": "Manifest",
"label": {
"en": [
"Castel Sant'Angelo, Rome"
]
},
"navDate": "1776-01-01T00:00:00+00:00",
"navPlace": {
"id": "{{ id.path }}/feature-collection/1",
"type": "FeatureCollection",
"features": [
{
"id": "{{ id.path }}/feature/1",
"type": "Feature",
"properties": {
"label": {
"en": [
"Castel Sant'Angelo, Rome"
]
}
},
"geometry": {
"type": "Point",
"coordinates": [
12.4663,
41.9031
]
}
}
]
}
},
{
"id": "{{ id.path }}/manifest-2.json",
"type": "Manifest",
"label": {
"en": [
"The Colosseum"
]
},
"navDate": "1776-01-01T00:00:00+00:00",
"navPlace": {
"id": "{{ id.path }}/feature-collection/2",
"type": "FeatureCollection",
"features": [
{
"id": "{{ id.path }}/feature/2",
"type": "Feature",
"properties": {
"label": {
"en": [
"The Colosseum"
]
}
},
"geometry": {
"type": "Point",
"coordinates": [
12.492222,
41.890278
]
}
}
]
}
},
{
"id": "{{ id.path }}/manifest-3.json",
"type": "Manifest",
"label": {
"en": [
"The Arch of Titus from the Forum, Rome, ca. 1725"
]
},
"navDate": "1725-01-01T00:00:00+00:00",
"navPlace": {
"id": "{{ id.path }}/feature-collection/3",
"type": "FeatureCollection",
"features": [
{
"id": "{{ id.path }}/feature/3",
"type": "Feature",
"properties": {
"label": {
"en": [
"The Arch of Titus from the Forum, Rome, ca. 1725"
]
}
},
"geometry": {
"type": "Point",
"coordinates": [
12.488585,
41.890717
]
}
}
]
}
},
{
"id": "{{ id.path }}/manifest-4.json",
"type": "Manifest",
"label": {
"en": [
"The Temple of Vesta, Rome, 1849"
]
},
"navDate": "1849-01-01T00:00:00+00:00",
"navPlace": {
"id": "{{ id.path }}/feature-collection/4",
"type": "FeatureCollection",
"features": [
{
"id": "{{ id.path }}/feature/4",
"type": "Feature",
"properties": {
"label": {
"en": [
"The Temple of Vesta, Rome, 1849"
]
}
},
"geometry": {
"type": "Point",
"coordinates": [
12.4862,
41.8917
]
}
}
]
}
},
{
"id": "{{ id.path }}/manifest-5.json",
"type": "Manifest",
"label": {
"en": [
"A View of Trajan's Forum, Rome, 1821"
]
},
"navDate": "1821-01-01T00:00:00+00:00",
"navPlace": {
"id": "{{ id.path }}/feature-collection/5",
"type": "FeatureCollection",
"features": [
{
"id": "{{ id.path }}/feature/5",
"type": "Feature",
"properties": {
"label": {
"en": [
"A View of Trajan's Forum, Rome, 1821"
]
}
},
"geometry": {
"type": "Point",
"coordinates": [
12.485869,
41.895419
]
}
}
]
}
}
]
}
48 changes: 48 additions & 0 deletions recipe/0318-navPlace-navDate/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Locating an Item in Place and Time
id: 318
layout: recipe
topic: geo-recipes
tags: [maps, geolocate, navPlace, navDate]
summary: "Use navDate together with the navPlace extension to provide geographic and temporal data"
viewers:
- Navplace Viewer
---

### Use Case

You have one or more IIIF resources that have a date and a location associated with each, and you would like to provide these to a client for use in the user interface. For instance, you may wish the client to provide a visualization in a timeline with an associated map, or to provide the capability to filter the set based on a date range or a bounding box on a map. The data required to meet this use case can be provided by the use of both the `navDate` and `navPlace` properties on the IIIF resources.

### Implementation Notes

The `navDate` property, as implied by its name, allows a Manifest to identify a pertinent date associated with an IIIF resource in order to help viewers provide users with date-aware navigation. Clients are not required to make use of `navDate`, and clients that do have date-aware navigation available may not default to that navigation interface. This property is described in [Navigation by Chronology][0230]

The `navPlace` property is analogous to `navDate`, but provides geographic information. The value for `navPlace` is a single [GeoJSON Feature Collection](https://iiif.io/api/extension/navplace/#222-feature-collection). A Feature Collection represents an aggregation of spatially bounded areas. This property is described in [Locate a Manifest on a Web Map][0154].

The `navPlace` property is not processed by the Universal Viewer or Mirador viewer at this time.

### Example

The example consists of a [Collection](collection.json) that references five Manifests. All five Manifests contain the `navDate` and `navPlace` properties, as shown below.

The example can be displayed in a [custom viewer](https://mikeapp.github.io/maptime-demo/?iiif-content=https://preview.iiif.io/cookbook/0318/recipe/0318-navPlace-navDate/collection.json). In the viewer, click on the "Limit by Date Range" button to sort the objects by date. Adjust the ends of the timeline slider to filter the objects based on a date range.

In a more limited way, the Collection can be displayed in the Navplace viewer used elsewhere in this cookbook. This viewer will show all examples places appropriately on a map, but ignores the `navDate` data.

[NavPlace and NavDate Collection](collection.json)
* [Castel Sant'Angelo, Rome](manifest-1.json)
* [The Colosseum](manifest-2.json)
* [The Arch of Titus from the Forum, Rome, ca. 1725](manifest-3.json)
* [The Temple of Vesta, Rome, 1849](manifest-4.json)
* [A View of Trajan's Forum, Rome, 1821](manifest-5.json)

{% include manifest_links.html manifest="collection.json" %}

{% include jsonviewer.html src="collection.json" config='data-line="39-63,73-97,107-131,141-165,175-200"' %}

## Related Recipes
* [Locate a Manifest on a Web Map][0154]
* [Navigation by Chronology][0230]

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

0 comments on commit 1397899

Please sign in to comment.