-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add navPlace property to IIIF manifests for objects with defined coordinates #708
Comments
Example object: https://purl.stanford.edu/bc592pz8308 {
"label": {
"en": [
"Coverage"
]
},
"value": {
"en": [
"[ca.1:60,000,000].",
"W 160° --E 20°/N 90° --S 90°"
]
}
} The second value can be parsed as a bounding box extending from {
"type": "FeatureCollection",
"features": [
{
"id":"https://example.org/iiif/feature/2",
"type":"Feature",
"properties":{},
"geometry":{
"type":"Polygon",
"coordinates":[
[
[-160, 90],
[20, 90],
[20, -90],
[-160, -90],
[-160, 90]
]
]
}
}
]
} Which is this bounding box: {
"type": "FeatureCollection",
"features": [
{
"id":"https://example.org/iiif/feature/2",
"type":"Feature",
"properties":{},
"geometry":{
"type":"Polygon",
"coordinates":[
[
[-160, 90],
[20, 90],
[20, -90],
[-160, -90],
[-160, 90]
]
]
}
}
]
}
|
Some remaining questions:
Most of these can probably be answered by poking around in the rails console looking for scanned map Purls and inspecting their metadata. Alternatively, you could try to tackle it from the Argo side, maybe. |
Here's the coordinates from the map items. |
This library looks like it supports parsing DMS: https://github.com/zverok/geo_coord |
That parser looks fairly permissive, which is great. There's a lot of weirdness in this data. In case it becomes useful later, I ended up using this regex to get coordinates out: /([NESW]) ?(\d+(?:[.]\d+)?)[°⁰*]? ?(?:(\d+)[ʺ"ʹ']?)? ?(?:(\d+)[ʺ"ʹ']?)?/ |
@thatbudakguy Does this sound correct?
|
How do the minutes and seconds get translated? For example: |
DMS is a base 60 system, so use: Decimal Degrees = degrees + (minutes/60) + (seconds/3600) So for your example: |
W & S values are negative (-) |
I think the irb(main):005> g = Geo::Coord.parse("51°39′43″ N, 36°13′53″E")
=> #<Geo::Coord 51°39'43"N 36°13'53"E>
irb(main):007> g.to_s(dms: false)
=> "51.661944,36.231389" |
There's at least some objects that don't follow this format: https://purl.stanford.edu/cs542df3540 has only a single point instead of a bounding box. That should become a geoJSON |
@mapninja This is deployed to https://sul-purl-stage.stanford.edu/ in case you want to kick the tires. |
The IIIF presentation API has finalized its
navPlace
extension, which allows manifests to describe the geographic extent of objects using geoJSON-LD. There are already many client applications beginning to leverage this functionality for rich presentation of content:Some scanned maps in the SDR have coordinate information already stored as part of the record. If this information exists and is in lat/long format, we could convert it to geoJSON and serve it as part of the manifest so that the map could be displayed in its geographic context.
PURL generates IIIF manifests (specifically, v3) using the
Iiif3PresentationManifest
model. This issue involves changes to v3, but not v2. I think we still render and send v2 because v3 doesn't include all the properties that some sul-embed viewers need (?); see #164. You can request v3 specifically via the/[druid]/iiif3/manifest
endpoint of PURL.The text was updated successfully, but these errors were encountered: