api icon indicating copy to clipboard operation
api copied to clipboard

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

Open azaroth42 opened this issue 1 year ago • 3 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

azaroth42 avatar Feb 01 '24 23:02 azaroth42

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.

azaroth42 avatar Feb 01 '24 23:02 azaroth42

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 https://github.com/IIIF/api/issues/2271)

tomcrane avatar Feb 01 '24 23:02 tomcrane

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

tomcrane avatar Feb 02 '24 00:02 tomcrane