Skip to content

Commit

Permalink
Merge pull request #407 from IIIF/0318
Browse files Browse the repository at this point in the history
Recipe #318: Using navPlace and navDate Together
  • Loading branch information
glenrobson authored Aug 9, 2024
2 parents b387433 + 31019ba commit 3fc2742
Show file tree
Hide file tree
Showing 9 changed files with 649 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _includes/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@
[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"

[0377]: {{ site.cookbook_url | absolute_url }}/recipe/0377-image-in-annotation/ "Image in annotation"

Expand Down
2 changes: 2 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,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
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 %}
79 changes: 79 additions & 0 deletions recipe/0318-navPlace-navDate/manifest-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"@context": [
"http://iiif.io/api/extension/navplace/context.json",
"http://iiif.io/api/presentation/3/context.json"
],
"id": "{{ id.url }}",
"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
]
}
}
]
},
"items": [
{
"id": "{{ id.path }}/canvas/1",
"type": "Canvas",
"height": 1516,
"width": 2048,
"label": {
"en": [
"Castel Sant'Angelo, Rome"
]
},
"items": [
{
"id": "{{ id.path }}/anno-page/1",
"type": "AnnotationPage",
"items": [
{
"id": "{{ id.path }}/anno/1",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/71b9228e087f15c75b628214cd9f647d-Castel_Sant_Angelo_Rome/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"height": 1516,
"width": 2048,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/71b9228e087f15c75b628214cd9f647d-Castel_Sant_Angelo_Rome",
"profile": "level1",
"type": "ImageService3"
}
]
},
"target": "{{ id.path }}/canvas/1"
}
]
}
]
}
]
}
Loading

0 comments on commit 3fc2742

Please sign in to comment.