-
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
Represent Canvas Fragment as a Geographic Area on a Web Map #183
Merged
Merged
Changes from all commits
Commits
Show all changes
196 commits
Select commit
Hold shift + click to select a range
65193d5
A geographic assertion done in presentation 3 using an embedded annot…
03c939d
Target a text document that is a correspondence betweens friends invo…
9966d0c
This may be ready for eyes.
85197b6
Don't need purpose since there is only one body for the Annotation an…
119dbbd
Fix up index
25a3053
Fix up index
39ea6ff
Cleanup naming convention
6d9650d
We can do this the easy way, or the hard way.
d8074e1
Perk up this index a bit, for presentation and review.
33dc065
Add in dimensions
cd7e8b8
Fix target
8167412
Add in image format
f8fa7e0
Small index fixes
60c1ee2
small transcription text change.
4c689de
Small index fixes
f9e37af
Small index fixes
c518a41
Changes from notes after meeting. Glen is right, an Annotation/Annot…
a9359fd
Collapsing the recipe into its evolved form. An image fragment with …
096e7e2
Collapsing the recipe into its evolved form. An image fragment with …
0add286
Wrap it all in a manifest
74af8bf
Collapsing the recipe into its evolved form. An image fragment with …
c4d6f00
Point index to the FeatureCollection example artifact that is otherwi…
9527d37
Wrap it all in a manifest
b6125eb
Small changes for Travis.
b70e35e
Better json file naming convention.
df738cf
Fix content annotation
36d978b
Squash transcribing anno for now. I think i found another bug with t…
aa4cf48
It is not the transcription annos fault. It is the old issue resurfa…
47e2841
All embedded annotations fully expanded.
1599902
Describe textual annotation a bit
d733c3e
Do the right label
da89491
Give label as a property to the GeoJSON, for effect.
f747a78
More sensible labels
67b072c
More sensible labels
e102e5b
Merge branch 'master' into 0139-geo-annotation
26973ca
Provide some explanation for why 2 annotations instead of 1 annotatio…
9a90b2f
Simplify label, add a summary.
0d0b83c
Small json update
a59753a
Trigger the travis build.
6dc0850
JSON fixes
2e36127
JSON fixes
570cd46
update copy on index
7033ded
update copy on index
2c04a9a
update copy on index
712534e
update copy on index
7784ff9
update copy on index
b1ccadf
update copy on index
d6a5105
Different JSON includer
1f83449
Different JSON includer
3d151ef
update copy on index
152922d
geolocate is more appropriate than geocode
525e7f3
Fix copy a bit
4b031a0
Use existing motivations/purposes. That way @context stays clean.
2539cc6
Use existing motivations/purposes. That way @context stays clean.
292d3fc
motivation and purpose plug
6f03939
update line highlighting
02c7399
Test travis
43dbed8
Small summary change.
346d6de
Small related recipes change.
9fea999
Merge branch 'master' into 0139-geo-annotation
36a5e54
Small index updates. Ready for PR.
4daa5e1
Small rename
47cbbe2
long, lat. NOT lat, long. WGS84
2a47fa7
Small index updates
691b308
Merge branch 'master' into 0139-geo-annotation
7eb3d3c
Small index change
f49e325
Small index change
8d16295
Small index change
52a290d
Small index change
c42a16b
Small index update
b639a79
Change Title
78052b5
change manifest label, add italics for titles.
275a610
Add italics to canvas
8418cee
No i tag.
de00ff3
escaped quotes and italic html in summary
f800e03
Single space after periods.
5dc58aa
Single space after periods.
33bbdd2
Add this space.
0801e0f
Final change from review at call
e081af3
Final change from review at call
fa4fcde
Final change from review at call
b848e6a
Changes suggested during last week's call
15fdb65
Changes suggested during last week's call
bf1b454
Merge branch 'master' into 0139-geo-annotation
fb8d90f
Update label to help separate recipes.
226e83d
Update label to help separate recipes.
dfff0b9
Merge branch 'master' into 0139-geo-annotation
118b7c5
small updates
thehabes e5fd3e4
Updates to simplify some of the copy and implement some style guid de…
thehabes 904d300
small updates
thehabes 65ca39a
Fix IIIF Presentation API 3.0 references
thehabes ef1e8e7
Merge branch 'master' into 0139-geo-annotation
thehabes e7074da
Merge branch 'master' into 0139-geo-annotation
thehabes ae32d3e
First pass at changes suggested at Cookbook call.
thehabes c5321e4
Change wording a bit.
thehabes d8d69fa
Merge branch 'master' into 0139-geo-annotation
thehabes be61739
Changes to index from notes.
thehabes 4c3b7c6
To 'Image' or to 'image'.
thehabes 5968d3a
Final changes from IIIF Cookbook group review.
thehabes c22f149
Merge branch 'master' into 0139-geo-annotation
thehabes 8e11fa1
'via' -> 'to'
thehabes 371f737
Paragraph breaklines
thehabes c6570e8
Having a pass at the TRC suggested changes.
thehabes 710af2c
Get rid of extraneous resolvable resources. Add in the link to the _…
thehabes e8f10ba
Get rid of that (TBD, TBD, TBD)
thehabes cd0a74c
Fix the link. Use recipe name, not branch name.
thehabes 517a854
Fix the link. Use recipe name, not branch name.
thehabes 93e8fec
Merge branch 'master' into 0139-geo-annotation
glenrobson 703627e
Merge branch 'master' into 0139-geo-annotation
glenrobson 12a7983
Ensure merged with master. Change Use Case wording to help clarify i…
thehabes bcb2c67
Revert "Ensure merged with master. Change Use Case wording to help c…
thehabes 6b24c78
More description about why to do this and how it intends to work.
thehabes aaaa65f
Try to add examples
thehabes 293ce8b
Try to add examples
thehabes 73808ca
Merge branch 'master' into 0139-geo-annotation
thehabes 48b21fe
Try to add examples
thehabes c0c793a
Try to add examples
thehabes 3fca10d
Clean it up a bit.
thehabes 3e99106
Clean it up a bit.
thehabes 01abb77
Clean it up a bit.
thehabes 551cbba
Clean it up a bit.
thehabes 8199ff0
better examples
thehabes 8b6c4e4
better examples
thehabes a239a73
clean up
thehabes b54e5a1
example title change
thehabes f9058de
Also highlight context
thehabes 8f920e9
No more 'geolocate'
thehabes cabd777
Redo labels, redact 'geolocate'
thehabes e251d26
Redo labels, redact 'geolocate'
thehabes 6b320e5
Small wording changes
thehabes 1660d98
Consistency if IIIF Presentation API 3.0 references.
thehabes 552c854
Consistency if IIIF Presentation API 3.0 references.
thehabes 92cb8d6
more clear
thehabes f510e9e
Changes from previous Cookbook review. Happy new year!
thehabes 67a552b
Just playin...
thehabes c0e01c5
Play some more...
thehabes f6ef93e
Cool, this lightbox technique works.
thehabes ba7b30d
This is good. We may decide to present the image/thumbnail differently.
thehabes d1cd1ce
This is good. We may decide to present the image/thumbnail differently.
thehabes 4a9b1bf
Finalize, ready to be reviewed.
thehabes e9da2e4
Fix the title here, get rid of 'geolocate' term.
thehabes 78d92cc
Finalize, ready to be reviewed.
thehabes 6ccf19e
Changes in response to hypothesis notes from Dawn and Trip -- THANK YOU.
thehabes bc34140
Title change
thehabes b5add4c
Title change in related recipes
thehabes a1a31df
ahh the title struggles
thehabes 6e035a3
More changes in response to hypothesis notes from Dawn and Trip -- TH…
thehabes 46286a2
More changes in response to hypothesis notes from Dawn and Trip -- TH…
thehabes 99ba8f6
Fix tics
thehabes efae2a3
Fix tics
thehabes 03ac2da
In favor of clarity
thehabes 70dd89c
In favor of clarity
thehabes 586de0d
In favor of clarity
thehabes c57fd70
Better for phones
thehabes a782b98
Add in these tics, since we mean specifically the Annotation.body member
thehabes 989c1eb
Change up wording a bit (feedback from Cookbook review)
thehabes 4dcc4b7
small touch up
thehabes 981e99b
A new kind of soft intro
thehabes a7974d5
Redo for a resource that has a mp
thehabes ef7059c
New example image for new manifest and resource
thehabes feccb50
Whoops done testing, change motivation back to tagging.
thehabes 5e737a6
More wording changes
thehabes 49607d2
Example zoomed in a bit more.
thehabes 061caab
A bit more clear
thehabes 47cb275
no hyphen
thehabes 7dd19c1
Better example image
thehabes f0e1991
Put in the fixture image. Better example image.
thehabes 2ea86b4
see image info link, since it is a fixture now.
thehabes a5ca4b7
Classing for that link
thehabes 357b715
Classing for that link
thehabes 4491c9c
Consistency with 'Web Map'
thehabes ddaafa3
br
thehabes c96d033
Classing for that link
thehabes ac4a425
whitespace spacing
thehabes ca7ec3a
Get rid of extra image
thehabes 759920d
Put full image next to example
thehabes 3da80d0
Play with look and feel
thehabes 3d2fea4
Play with look and feel
thehabes 38738b6
Play with look and feel
thehabes cd025af
Play with look and feel
thehabes 197af6b
Play with look and feel
thehabes f9cf5b1
Play with look and feel
thehabes 96d8404
Play with look and feel
thehabes c284d0c
Play with look and feel
thehabes 4c1f70a
This one is best.
thehabes bc9bfcf
Better on smaller screens
thehabes 7482bfc
Better on smaller screens
thehabes cb5c9b3
Better on smaller screens
thehabes 8d211bf
Small note about GeoJSON.properties.label
thehabes 8df109f
Add the comma
thehabes d4a8f28
Merge branch 'master' into 0139-geo-annotation
glenrobson 9120726
Changes in response to Cookbook Editors and IIIF Maps TSG call partic…
thehabes f3327ea
Handle 'Web Map' in a label in the Manifest.
thehabes 436c06f
use web mapping client term effectively.
thehabes 1995921
make this one web map
thehabes b72beb2
Merge branch 'master' into 0139-geo-annotation
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,81 @@ | ||
--- | ||
title: Represent Canvas Fragment as a Geographic Area in a Web Mapping Client | ||
id: 139 | ||
layout: recipe | ||
tags: [maps, annotation] | ||
summary: "Use Web Annotation to provide geocoordinates for a fragment of an IIIF Presentation API 3.0 Canvas." | ||
--- | ||
|
||
A multitude of real world resources benefit from geographic data, many of which are already represented in IIIF digital collections. New and old maps, travel journals, newspapers, manuscripts, poems and diaries are just a subset of cultural heritage artifacts that have geographic characteristics. These traits bring human context to the material and offer a recognizable, comfortable setting for discovering connections between disparate resources. | ||
|
||
### Use Case | ||
A Canvas has a region of interest that contains a map. You would like to associate this map with geographic coordinates for use in web mapping clients like [Leaflet](https://leafletjs.com/examples/geojson/) and [OpenLayers](https://openlayers.org/en/latest/examples/geojson.html). This could mean simply showing a non-interactive shape on a web map, but often more data from the resource is displayed in connection with the shape as a result of available functionality. The example below shows a pop-up that appears upon clicking the shape. The pop-up includes the targeted map as well as other metadata from the resource. | ||
|
||
<p style="text-align: center;"> | ||
<a class="imagelink" target="_blank" href="https://fixtures.iiif.io/info.html?file=/images/loc/chesapeake_map/88695674.jpg"><img id="orig" onclick="" style="max-width: 11em;" src="./images/piece2.png" /></a> | ||
<img id="leaf" onclick="showBigImage()" style="max-height: 11em; max-width: 100%;" src="./images/leaflet_example.png" /> | ||
</p> | ||
|
||
### Implementation Notes | ||
The third party [GeoJSON-LD](https://geojson.org/geojson-ld/) context is included in addition to the IIIF Presentation API 3.0 context. The GeoJSON-LD context supplies the vocabulary terms for the Annotation bodies since the IIIF Presentation API 3.0 context does not describe those terms. When there are multiple contexts, the `@context` property can be an array which is processed as a set. Typically order does not matter for a set. However, when the IIIF context is used in these arrays it must be the last item in the set. | ||
|
||
The GeoJSON `properties` object is generic and [can be nearly anything](https://tools.ietf.org/html/rfc7946#section-3.2). It is used to pass metadata along with the geocoordinates. This has implications on clients and parsers that must discern what data to use. For example, if the targeted resource has a `label` property and the `properties` object has a `label` property, the consuming interface must make a choice on which to prioritize for presentation purposes. In the image from the Use Case section, the "Label" uses the GeoJSON `properties` object's `label` property (lines 80-83) instead of the `label` property from the Annotation or Canvas. This is because web mapping clients are designed to look for metadata in GeoJSON `properties` for display. | ||
|
||
Note that [`geometry` has more types besides `Polygon`.](https://tools.ietf.org/html/rfc7946#section-3.1) | ||
|
||
### Restrictions | ||
Applications that strictly follow Linked Data practices will find that nested GeoJSON coordinate arrays are incompatible with the processing model of JSON-LD 1.0. The JSON-LD 1.1 processing model does not have this restriction. Be aware if you plan to serialize JSON-LD into [other semantic data formats or markup languages](https://www.w3.org/TR/json-ld11/#relationship-to-other-linked-data-formats) such as RDF. | ||
|
||
### Example | ||
The Manifest has one Canvas with one Image, and the Canvas has the same size dimensions as the Image. The Canvas has one Annotation Page with one Annotation targeting the region of interest where a map depiction appears using the [#xywh Fragment Selector syntax](https://www.w3.org/TR/annotation-model/#fragment-selector). The Annotation `body` is GeoJSON-LD, which is supported by a number of open source mapping systems. A client can parse the Annotation from the Canvas and pass the Annotation `body` into a web map resulting in rendered geometric shapes on a world map. Often, data from the resource such as an image URL, label, or description is connected with those shapes via [`properties`](https://tools.ietf.org/html/rfc7946#section-3.2) in GeoJSON. Since the image used is a IIIF Fixture following [IIIF Image API 3.0](https://iiif.io/api/image/3.0/), you can see the targeted fragment by supplying [the values used in the #xywh selector to the image URL](https://iiif.io/api/image/3.0/example/reference/43153e2ec7531f14dd1c9b2fc401678a-88695674/920,3600,1510,3000/max/0/default.jpg). | ||
|
||
{% include manifest_links.html viewers="" manifest="manifest.json" %} | ||
|
||
{% include jsonviewer.html src="manifest.json" config='data-line="2-5, 67-111"' %} | ||
|
||
## Related Recipes | ||
* [Fragment Selectors][0020] | ||
* [Tagging Annotation][0021] | ||
|
||
{% include acronyms.md %} | ||
{% include links.md %} | ||
|
||
<div id="bigImage"> | ||
<h4 style="color:white;"> Click Image to Close </h4> | ||
<img onclick="hideBigImage()" style="max-height: 100%; max-width: 100%;" src="./images/leaflet_example.png" /> | ||
</div> | ||
|
||
<style> | ||
#bigImage{ | ||
position: fixed; | ||
top: 0; | ||
left : 0; | ||
height : 100em; | ||
width: 100%; | ||
background-color: rgba(0,0,0,.8); | ||
display:none; | ||
text-align: center; | ||
padding-top: 4px; | ||
} | ||
img{ | ||
cursor: pointer; | ||
} | ||
.imagelink{ | ||
margin-right: 1%; | ||
display: inline-block; | ||
text-decoration: none !important; | ||
border-bottom: none !important; | ||
} | ||
.imagelink:focus{ | ||
outline: none !important; | ||
} | ||
</style> | ||
|
||
<script type="text/javascript"> | ||
function showBigImage(){ | ||
document.getElementById("bigImage").style.display = "block" | ||
} | ||
function hideBigImage(){ | ||
document.getElementById("bigImage").style.display = "none" | ||
} | ||
</script> |
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,105 @@ | ||
{ | ||
"@context":[ | ||
"http://geojson.org/geojson-ld/geojson-context.jsonld", | ||
"http://iiif.io/api/presentation/3/context.json" | ||
], | ||
"id":"{{ id.url }}", | ||
"type":"Manifest", | ||
"label":{ | ||
"en":[ | ||
"Recipe Manifest for #139" | ||
] | ||
}, | ||
"summary":{ | ||
"en":[ | ||
"A IIIF Presentation API 3.0 Manifest containing a GeoJSON-LD Web Annotation which targets a Canvas fragment." | ||
] | ||
}, | ||
"items":[ | ||
{ | ||
"id":"{{ id.path }}/canvas.json", | ||
"type":"Canvas", | ||
"label":{ | ||
"en":[ | ||
"Chesapeake and Ohio Canal Pamphlet" | ||
] | ||
}, | ||
"width":5212, | ||
"height":7072, | ||
"items":[ | ||
{ | ||
"id":"{{ id.path }}/contentPage.json", | ||
"type":"AnnotationPage", | ||
"items":[ | ||
{ | ||
"id":"{{ id.path }}/content.json", | ||
"type":"Annotation", | ||
"motivation":"painting", | ||
"label":{ | ||
"en":[ | ||
"Pamphlet Cover" | ||
] | ||
}, | ||
"body":{ | ||
"id":"https://iiif.io/api/image/3.0/example/reference/43153e2ec7531f14dd1c9b2fc401678a-88695674/full/max/0/default.jpg", | ||
"type":"Image", | ||
"format":"image/jpeg", | ||
"service":[ | ||
{ | ||
"id":"https://iiif.io/api/image/3.0/example/reference/43153e2ec7531f14dd1c9b2fc401678a-88695674", | ||
"type":"ImageService3", | ||
"profile":"level1" | ||
} | ||
], | ||
"width":5212, | ||
"height":7072 | ||
}, | ||
"target":"{{ id.path }}/canvas.json" | ||
} | ||
] | ||
} | ||
], | ||
"annotations":[ | ||
{ | ||
"id":"{{ id.path }}/supplementingPage.json", | ||
"type":"AnnotationPage", | ||
"items":[ | ||
{ | ||
"id":"{{ id.path }}/geoAnno.json", | ||
"type":"Annotation", | ||
"motivation":"tagging", | ||
"label":{ | ||
"en":[ | ||
"Annotation containing GeoJSON-LD coordinates that place the map depiction onto a Leaflet web map." | ||
] | ||
}, | ||
"body":{ | ||
"id":"{{ id.path }}/geo.json", | ||
"type":"Feature", | ||
"properties":{ | ||
"label":{ | ||
"en":[ | ||
"Targeted Map from Chesapeake and Ohio Canal Pamphlet" | ||
] | ||
} | ||
}, | ||
"geometry":{ | ||
"type":"Polygon", | ||
"coordinates":[ | ||
[ | ||
[-77.097847, 38.901359], | ||
[-77.026940, 38.901359], | ||
[-77.026940, 39.034040], | ||
[-77.097847, 39.034040] | ||
] | ||
] | ||
} | ||
}, | ||
"target":"{{ id.path }}/canvas.json#xywh=920,3600,1510,3000" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
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.
Could you add a link to the manifest by including the following here:
{% include manifest_links.html viewers="" manifest="manifest.json" %}