Skip to content

Commit c08c4a6

Browse files
authored
Merge pull request #2347 from IIIF/prezi-4-scale
Prezi 4 scale
2 parents c1756b2 + 2c0ea12 commit c08c4a6

File tree

2 files changed

+53
-33
lines changed

2 files changed

+53
-33
lines changed

source/presentation/4.0/index.md

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,43 +1633,15 @@ See above...
16331633

16341634
## Conveying Physical Dimensions
16351635

1636-
(why is this important!?)
1636+
In many cases, the dimensions of a Canvas, or the pixel density of a photograph, are not necessarily related to a real-world size of the object they show. A large wall painting and a tiny miniature may both be conveyed by 20 megapixel source images on a 4000 by 3000 unit Canvas. But it can be important to know how big something is or if there is a relationship between pixel density and physical length, especially when comparing objects together. Each pixel in an image may correspond precisely to a physical area, allowing measurement of real world distances from the image. A scanned 3D model may be constructed such that each 3D coordinate unit corresponds to one meter of physical distance.
16371637

1638-
(move the props to vocab doc)
1638+
The `spatialScale` property of a Canvas or Scene provides a corresponding real-world scale for a unit of the Canvas or Scene coordinate system, allowing clients to provide scale information to users, for example by an on-screen virtual ruler. In a 2-up viewer, a client could scale two views to convey the true relative sizes of two objects.
16391639

1640+
The value of `spatialScale` is a `UnitValue` (ref) that has as a value a length unit. This specification defines only one length unit, "m", i.e., meters, though others may be defined externally as an [extension][prezi30-ldce]. If source size metadata is machine readable (or parse-able) in other measurement systems (e.g., feet and inches) then it should be converted to meters for use in `spatialScale`. Publishers may wish to present the original given measure (e.g., from catalogue metadata) in a `metadata` field for context.
16401641

1641-
Continental drift simulation example
1642-
1643-
```
1644-
{
1645-
"type": "Scene",
1646-
1647-
"spatialScale": {
1648-
"type": "UnitValue",
1649-
"value": 22.0,
1650-
"unit": "m"
1651-
},
1652-
1653-
// this would be rarely used
1654-
"temporalScale": {
1655-
"type": "UnitValue",
1656-
"value": 0.00001,
1657-
"unit": "s"
1658-
}
1659-
1660-
}
1661-
```
1662-
1663-
`factor` Required A floating point ratio.
1664-
`units` Required A real-world measuring unit. Always seconds for temporalScale. Possible values for spatialScale include: "m", "ft". (is that it?)
1665-
1666-
For a Canvas, it's the physical "size" of each cartesian integer unit.
1667-
For a Scene, it's the physical size of the unit vector.
1668-
For a timeline it's the ratio of time in the recording to time in the real world.
1669-
1670-
1671-
(define props in the Vocabulary doc)
1642+
The Presentation API also offers a corresponding `temporalScale` property for the `duration` dimension of a Container, when 1 second in the Container does not correspond to 1 second of real time. This is useful for speeded-up or slowed-down audio or video.
16721643

1644+
An extreme example of both physical dimension properties together is a Canvas showing an animation of continental drift over the course of Earth history, where the spatialScale could convey that each Canvas unit is several thousand meters, and each second of the Canvas `duration` is several million years.
16731645

16741646

16751647

source/presentation/4.0/model.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,6 +2045,28 @@ The value _MUST_ be an array of JSON objects. Each object _MUST_ be a service re
20452045
{: #source}
20462046

20472047

2048+
### spatialScale
2049+
{: #spatialScale}
2050+
2051+
A single UnitValue that defines a real-world scale factor for the coordinate units of a Canvas or Scene. For a Canvas, this defines the physical distance between adjacent units horizontally and vertically. A Canvas with a `width` of 5000 and a `spatialScale` with `value` 0.00008 represents a physical space 0.4 meters wide. For a Scene, this defines the physical distance corresponding to the XYZ coordinate units, or in other words, the physical distance length of a unit vector in the 3D coordinate space. The value of `unit` _MUST_ be a length unit. In this specification, the only length unit defined is `m`, i.e., meters. Unless other values are defined externally as an [extension][prezi30-ldce], the value of `unit` _SHOULD_ always be `m`.
2052+
2053+
2054+
{% include api/code_header.html %}
2055+
``` json-doc
2056+
{
2057+
"type": "Scene",
2058+
"spatialScale": {
2059+
"type": "UnitValue",
2060+
"value": 22.0,
2061+
"unit": "m"
2062+
}
2063+
}
2064+
```
2065+
2066+
* A Canvas _MAY_ have the `spatialScale` property.<br/>
2067+
Clients _SHOULD_ process `spatialScale` on a Canvas.
2068+
* A Scene _MAY_ have the `spatialScale` property.<br/>
2069+
Clients _SHOULD_ process `spatialScale` on a Scene.
20482070

20492071

20502072
### start
@@ -2160,6 +2182,32 @@ The value _MUST_ be a JSON object, which _MUST_ have the `id` and `type` propert
21602182
{ "supplementary": { "id": "https://example.org/iiif/1/annos/1", "type": "AnnotationCollection" } }
21612183
```
21622184

2185+
### temporalScale
2186+
{: #temporalScale}
2187+
2188+
A single UnitValue that defines a multiplier or scale factor for the `duration` property of a Container, indicating that one second in "Container time" represents some other real world duration. A Canvas with a `duration` of 450 seconds and a `temporalScale` with `value` 1000 represents a real-world duration of 450,000 seconds (5.2 days), for example a time-lapse video of a growing plant. The value of `unit` _MUST_ be a time unit. In this specification, the only time unit defined is `s`, i.e., seconds. Unless other values are defined externally as an [extension][prezi30-ldce], the value of `unit` _SHOULD_ always be `s`.
2189+
2190+
2191+
{% include api/code_header.html %}
2192+
``` json-doc
2193+
{
2194+
"type": "Canvas",
2195+
"temporalScale": {
2196+
"type": "UnitValue",
2197+
"value": 1000,
2198+
"unit": "s"
2199+
}
2200+
}
2201+
```
2202+
2203+
* A Timeline _MAY_ have the `temporalScale` property.<br/>
2204+
Clients _MAY_ process `temporalScale` on a Timeline.
2205+
* A Canvas _MAY_ have the `temporalScale` property.<br/>
2206+
Clients _MAY_ process `temporalScale` on a Canvas.
2207+
* A Scene _MAY_ have the `temporalScale` property.<br/>
2208+
Clients _MAY_ process `temporalScale` on a Scene.
2209+
2210+
21632211
### thumbnail
21642212
{: #thumbnail}
21652213

0 commit comments

Comments
 (0)