-
Notifications
You must be signed in to change notification settings - Fork 32
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
0135 annotating point in canvas #413
Merged
Merged
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2239762
Draft recipe 0135 annotating point
giacomomarchioro b136aea
Corrects title of the recipe
giacomomarchioro 28682fc
Merge pull request #412 from giacomomarchioro/0135-annotating-point-i…
giacomomarchioro 2457d20
Add recipe to index
giacomomarchioro f42aa47
Corrects type in JSON and index.md
giacomomarchioro b03f2ef
Merge pull request #415 from giacomomarchioro/0135-annotating-point-i…
giacomomarchioro 0c5bc66
Merge branch 'master' into 0135-annotating-point-in-canvas
glenrobson 6a2ee8a
Updating the recipe topic
glenrobson 254b4d9
Fixing link on homepage
glenrobson 2287c46
Cookbook editors review
giacomomarchioro a05c657
Merge branch 'master' into 0135-annotating-point-in-canvas
glenrobson ff64ee4
Merge branch 'master' into 0135-annotating-point-in-canvas
glenrobson 2d5df36
Merge pull request #430 from giacomomarchioro/0135-annotating-point-i…
glenrobson 4e182db
Merge branch 'master' into 0135-annotating-point-in-canvas
glenrobson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Annotating a specific point of an image. | ||
id: 15 | ||
layout: recipe | ||
tags: image | ||
summary: "This recipe explains how to annotate a specific point of an image." | ||
viewers: | ||
topic: | ||
- Annotations | ||
- property | ||
property: PointSelector | ||
--- | ||
|
||
## Use Case | ||
I want to annotate a coordinate of the image rather than a region. I have a map with some locations that can be represented better by a single coordinate. I want to add some auxiliary data relative to a specific point of the image (e.g. some spectroscopic analysis made on a manuscript). | ||
|
||
## Implementation notes | ||
|
||
This recipe, as [Simple Annotation — Tagging][0021] implements a method for annotating an image. Recipe [Begin playback at a specific point - Time-based media][0015] uses a Point Selector for selecting a specific time of a video this recipe selects instead a specific point of the image. | ||
|
||
In this use case, the Annotation is inside an Annotation Page in the `annotations` list of the Manifest. The `motivation` of the Annotation is "tagging" and the target `source` points to the Canvas `id`. The `type` property is a Specific Resource while the Selector `type` property is a Point Selector that contains the coordinates `x` and `y` of the Canvas coordinates system as parameters. | ||
|
||
Viewer might consider implementing scale-independent point markers so that they are visible at every level of zoom. | ||
|
||
## Example | ||
|
||
This example uses a leaflet with a map and a guide supplied by the Library of Congress Geography and Map Division, it shows how we can annotate some locations expressed in the map. | ||
|
||
{% include manifest_links.html viewers="" manifest="manifest.json" %} | ||
|
||
{% include jsonviewer.html src="manifest.json" config='data-line="75-83"' %} | ||
|
||
# Related recipes | ||
|
||
* [Begin playback at a specific point - Time-based media][0015] uses a Point Selector for selecting for starting the playback at a specific time. | ||
* [Simple Annotation — Tagging][0021] a simple annotation pointing to a region of an image. | ||
|
||
{% include acronyms.md %} | ||
{% include links.md %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"@context": ["http://iiif.io/api/presentation/3/context.json", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is causing the build error. It shouldn't have a , at the end. |
||
], | ||
"id": "{{ id.url }}", | ||
"type": "Manifest", | ||
"label": { | ||
"en": [ | ||
"Using a point selector for annotating a location on a map." | ||
] | ||
}, | ||
"summary": { | ||
"en": [ | ||
"A map containing an point with an annotation of the location." | ||
] | ||
}, | ||
"items": [ | ||
{ | ||
"id": "{{ id.path }}/canvas.json", | ||
"type": "Canvas", | ||
"label": { | ||
"en": [ | ||
"Chesapeake and Ohio Canal Pamphlet" | ||
] | ||
}, | ||
"height": 5212, | ||
"width": 7072, | ||
"items": [ | ||
{ | ||
"id": "{{ id.path }}/contentPage.json", | ||
"type": "AnnotationPage", | ||
"items": [ | ||
{ | ||
"id": "{{ id.path }}/content.json", | ||
"type": "Annotation", | ||
"motivation": "painting", | ||
"body": { | ||
"id": "https://iiif.io/api/image/3.0/example/reference/43153e2ec7531f14dd1c9b2fc401678a-88695674/full/max/0/default.jpg", | ||
"type": "Image", | ||
"format": "image/jpeg", | ||
"height": 5212, | ||
"width": 7072, | ||
"service": [ | ||
{ | ||
"id": "https://iiif.io/api/image/3.0/example/reference/43153e2ec7531f14dd1c9b2fc401678a-88695674", | ||
"type": "ImageService3", | ||
"profile": "level1" | ||
} | ||
] | ||
}, | ||
"target": "{{ id.path }}/canvas.json" | ||
} | ||
] | ||
} | ||
], | ||
"annotations": [ | ||
{ | ||
"id": "{{ id.path }}/page/p2/1", | ||
"type": "AnnotationPage", | ||
"items": [ | ||
{ | ||
"id": "{{ id.path }}/annotation/p0002-tag", | ||
"type": "Annotation", | ||
"label": { | ||
"en": [ | ||
"Annotation containing the name of the place annotated using the PointSelector." | ||
] | ||
}, | ||
"motivation": "tagging", | ||
"body": { | ||
"type": "TextualBody", | ||
"value": "Town Creek Aqueduct", | ||
"language": "en", | ||
"format": "text/plain" | ||
}, | ||
"target": { | ||
"type": "SpecificResource", | ||
"source": "{{ id.path }}/canvas.json", | ||
"selector": { | ||
"type": "PointSelector", | ||
"x": 3385, | ||
"y": 1464 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what is going on but it looks like this commit wasn't applied for some reason: giacomomarchioro@2287c46