IIIF / api

Source for API and model specifications documents (api and model)

Home Page:http://iiif.io/api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PointSelector as "media" fragment on the URI of a scene?

azaroth42 opened this issue · comments

Do we want to allow a media fragment like URI fragment to be used with a Scene to select a point? This would reduce the dependence on PointSelector and instead move it into the URI.

Instead of:

              "target": {
                "type": "SpecificResource",
                "source": [
                  {
                    "id": "https://example.org/iiif/scene1",
                    "type": "Scene"
                  }
                ],
                "selector": [
                  {
                    "type": "PointSelector",
                    "x": -1.0,
                    "y": 0.0,
                    "z": 0.0
                  }
                ]
              }

It would become:

"target": "https://example.org/iiif/scene1#xyz=-1.0,0.0,0.0"

Which is a lot less verbose and conveys the same data at the expense of extracting it from the URI

This would solve #2254 by requiring the xyz=0,0,0 to target the origin, and if you target the entire scene then you don't use a fragment selector.

Can also do xyz=0,0,0&t=20,50 to select a range of 30 seconds starting 20 seconds in.

This works for Scenes because they are our construct, as opposed to models which might have their own fragment definitions specified in their media type registrations.

Mixing in t: the advantage is that:

              "target": {
                "type": "SpecificResource",
                "source": [
                  {
                    "id": "https://example.org/iiif/scene1",
                    "type": "Scene"
                  }
                ],
                "selector": [
                  {
                    "type": "PointSelector",
                    "x": -1.0,
                    "y": 0.0,
                    "z": 0.0,
                    "refinedBy": {
                    "type": "FragmentSelector",
                    "value": "t=45,90"
                    } 
                  }
                ]
              }

becomes:

"target": "https://example.org/iiif/scene1#xyz=-1.0,0.0,0.0&t=45,90"

BUT what does this become?

                  {
                    "type": "PointSelector",
                    "x": -1.0,
                    "y": 0.0,
                    "z": 0.0,
                    "t": 37.3
                  }

(expanded in #2271)

PointSelector becomes:

                  {
                    "type": "PointSelector",
                    "x": -1.0,
                    "y": 0.0,
                    "z": 0.0,
                    "instant": 37.3
                  }

So:

"target": "https://example.org/iiif/scene1#xyz=-1.0,0.0,0.0&t=45,90"

...means the spatial point -1,0,0 between 45s and 90s

"target": "https://example.org/iiif/scene1#xyz=-1.0,0.0,0.0&instant=37.5"

...means the point in time and space at -1,0,0 at 37.5s

"target": "https://example.org/iiif/scene1#xyz=-1.0,0.0,0.0&t=37.5"

...means the spatial point -1,0,0 between 37.5s and the end of the Scene duration