@panoramax/web-viewer 4.4.0-develop-3839b5a4 → 4.4.0-develop-f91f6758
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{src → build}/components/core/Basic.js +22 -16
- package/{src → build}/components/core/CoverageMap.js +19 -14
- package/{src → build}/components/core/Editor.js +16 -16
- package/{src → build}/components/core/PhotoViewer.js +30 -29
- package/{src → build}/components/core/Viewer.js +21 -20
- package/build/components/core/index.js +10 -0
- package/build/components/index.js +11 -0
- package/build/components/index_photoviewer.js +6 -0
- package/{src → build}/components/layout/BottomDrawer.js +4 -4
- package/{src → build}/components/layout/CorneredGrid.js +1 -1
- package/{src → build}/components/layout/Mini.js +5 -4
- package/{src → build}/components/layout/Tabs.js +1 -1
- package/build/components/layout/index.js +9 -0
- package/{src → build}/components/menus/LocationPrecisionDoc.js +4 -6
- package/{src → build}/components/menus/MapBackground.js +4 -6
- package/{src → build}/components/menus/MapFilters.js +16 -21
- package/{src → build}/components/menus/MapLayers.js +20 -24
- package/{src → build}/components/menus/MapLegend.js +3 -4
- package/{src → build}/components/menus/MiniPictureLegend.js +3 -4
- package/{src → build}/components/menus/PictureLegend.js +10 -15
- package/{src → build}/components/menus/PictureMetadata.js +12 -19
- package/{src → build}/components/menus/PlayerOptions.js +5 -7
- package/{src → build}/components/menus/QualityScoreDoc.js +3 -4
- package/{src → build}/components/menus/ReportForm.js +8 -9
- package/{src → build}/components/menus/SemanticsDoc.js +3 -4
- package/{src → build}/components/menus/SemanticsDownload.js +3 -3
- package/{src → build}/components/menus/SemanticsFilters.js +7 -8
- package/{src → build}/components/menus/SemanticsList.js +11 -18
- package/{src → build}/components/menus/SemanticsMetadata.js +8 -11
- package/{src → build}/components/menus/Share.js +6 -7
- package/build/components/menus/index.js +22 -0
- package/build/components/menus/index_photoviewer.js +11 -0
- package/{src → build}/components/styles.js +0 -2
- package/{src → build}/components/ui/AnnotationsSwitch.js +6 -8
- package/{src → build}/components/ui/Button.js +1 -1
- package/{src → build}/components/ui/ButtonGroup.js +2 -1
- package/{src → build}/components/ui/CopyButton.js +4 -6
- package/{src → build}/components/ui/Grade.js +5 -5
- package/{src → build}/components/ui/GradeFilter.js +3 -3
- package/{src → build}/components/ui/IconSwitch.js +1 -1
- package/{src → build}/components/ui/LinkButton.js +1 -1
- package/{src → build}/components/ui/ListGroup.js +3 -3
- package/{src → build}/components/ui/ListItem.js +1 -1
- package/{src → build}/components/ui/Loader.js +8 -7
- package/{src → build}/components/ui/Map.js +38 -26
- package/{src → build}/components/ui/MapMore.js +7 -7
- package/{src → build}/components/ui/Photo.js +29 -27
- package/{src → build}/components/ui/Popup.js +4 -4
- package/{src → build}/components/ui/QualityScore.js +4 -4
- package/{src → build}/components/ui/SearchBar.js +6 -7
- package/{src → build}/components/ui/SemanticsEditor.js +14 -15
- package/{src → build}/components/ui/SemanticsTable.js +4 -5
- package/{src → build}/components/ui/Switch.js +1 -1
- package/{src → build}/components/ui/TogglableGroup.js +4 -4
- package/build/components/ui/index.js +29 -0
- package/build/components/ui/index_photoviewer.js +21 -0
- package/{src → build}/components/ui/widgets/CopyCoordinates.js +5 -5
- package/{src → build}/components/ui/widgets/GeoSearch.js +10 -10
- package/{src → build}/components/ui/widgets/Legend.js +9 -8
- package/{src → build}/components/ui/widgets/LevelSelect.js +9 -7
- package/{src → build}/components/ui/widgets/MapFiltersButton.js +5 -5
- package/{src → build}/components/ui/widgets/MapLayersButton.js +5 -5
- package/{src → build}/components/ui/widgets/OSMEditors.js +8 -8
- package/{src → build}/components/ui/widgets/PictureLegendActions.js +4 -4
- package/{src → build}/components/ui/widgets/Player.js +6 -7
- package/{src → build}/components/ui/widgets/SemanticsFiltersButton.js +6 -7
- package/{src → build}/components/ui/widgets/Zoom.js +6 -6
- package/build/components/ui/widgets/index.js +16 -0
- package/build/components/ui/widgets/index_photoviewer.js +7 -0
- package/build/editor.html +94 -10
- package/{src → build}/img/arrow_triangle.svg +0 -1
- package/{src → build}/img/arrow_turn.svg +0 -1
- package/build/index.html +111 -1
- package/build/index.js +6 -95
- package/build/index_photoviewer.js +4 -0
- package/build/map.html +97 -1
- package/build/package.json +141 -0
- package/build/photo.html +85 -1
- package/build/servers.js +3 -4
- package/{src → build}/utils/API.js +33 -33
- package/{src → build}/utils/InitParameters.js +11 -9
- package/{src → build}/utils/MapStyleComposer.js +39 -37
- package/{src → build}/utils/PhotoAdapter.js +1 -0
- package/{src → build}/utils/PresetsManager.js +4 -4
- package/{src → build}/utils/SemanticsMapProtocol.js +3 -4
- package/{src → build}/utils/URLHandler.js +16 -14
- package/{src → build}/utils/geocoder.js +5 -5
- package/{src → build}/utils/i18n.js +21 -20
- package/build/utils/index.js +17 -0
- package/build/utils/index_photoviewer.js +14 -0
- package/{src → build}/utils/indoor.js +9 -5
- package/{src → build}/utils/map.js +15 -11
- package/{src → build}/utils/picture.js +22 -17
- package/{src → build}/utils/semantics.js +9 -5
- package/{src → build}/utils/utils.js +8 -4
- package/{src → build}/utils/widgets.js +2 -2
- package/build/viewer.html +120 -35
- package/build/viewer_indoor.html +90 -8
- package/build/widgets.html +410 -1
- package/package.json +81 -204
- package/.dockerignore +0 -7
- package/.gitlab-ci.yml +0 -78
- package/CHANGELOG.md +0 -853
- package/CODE_OF_CONDUCT.md +0 -134
- package/Dockerfile +0 -14
- package/build/index.css +0 -36
- package/build/index.css.map +0 -1
- package/build/index.js.map +0 -1
- package/build/photoviewer.css +0 -36
- package/build/photoviewer.css.map +0 -1
- package/build/photoviewer.js +0 -86
- package/build/photoviewer.js.map +0 -1
- package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff2 +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff2 +0 -0
- package/config/env.js +0 -104
- package/config/getHttpsConfig.js +0 -69
- package/config/getPackageJson.js +0 -25
- package/config/jest/babelTransform.js +0 -29
- package/config/jest/cssTransform.js +0 -14
- package/config/jest/fileTransform.js +0 -40
- package/config/jest/mocks.js +0 -230
- package/config/modules.js +0 -134
- package/config/paths.js +0 -76
- package/config/pnpTs.js +0 -35
- package/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
- package/config/webpack.config.js +0 -825
- package/config/webpackDevServer.config.js +0 -131
- package/docs/03_URL_settings.md +0 -218
- package/docs/05_Compatibility.md +0 -83
- package/docs/09_Develop.md +0 -141
- package/docs/90_Releases.md +0 -27
- package/docs/images/class_diagram.drawio +0 -144
- package/docs/images/class_diagram.jpg +0 -0
- package/docs/images/comparative_3drender.jpg +0 -0
- package/docs/images/indoor_level.png +0 -0
- package/docs/images/screenshot.jpg +0 -0
- package/docs/index.md +0 -159
- package/docs/reference/components/core/Basic.md +0 -211
- package/docs/reference/components/core/CoverageMap.md +0 -220
- package/docs/reference/components/core/Editor.md +0 -252
- package/docs/reference/components/core/PhotoViewer.md +0 -320
- package/docs/reference/components/core/Viewer.md +0 -398
- package/docs/reference/components/layout/BottomDrawer.md +0 -35
- package/docs/reference/components/layout/CorneredGrid.md +0 -29
- package/docs/reference/components/layout/Mini.md +0 -45
- package/docs/reference/components/layout/Tabs.md +0 -46
- package/docs/reference/components/menus/LocationPrecisionDoc.md +0 -15
- package/docs/reference/components/menus/MapBackground.md +0 -32
- package/docs/reference/components/menus/MapFilters.md +0 -37
- package/docs/reference/components/menus/MapLayers.md +0 -15
- package/docs/reference/components/menus/MapLegend.md +0 -32
- package/docs/reference/components/menus/MiniPictureLegend.md +0 -15
- package/docs/reference/components/menus/PictureLegend.md +0 -45
- package/docs/reference/components/menus/PictureMetadata.md +0 -32
- package/docs/reference/components/menus/PlayerOptions.md +0 -15
- package/docs/reference/components/menus/QualityScoreDoc.md +0 -15
- package/docs/reference/components/menus/ReportForm.md +0 -15
- package/docs/reference/components/menus/SemanticsDoc.md +0 -15
- package/docs/reference/components/menus/SemanticsDownload.md +0 -15
- package/docs/reference/components/menus/SemanticsFilters.md +0 -33
- package/docs/reference/components/menus/SemanticsList.md +0 -97
- package/docs/reference/components/menus/SemanticsMetadata.md +0 -15
- package/docs/reference/components/menus/ShareMenu.md +0 -32
- package/docs/reference/components/ui/AnnotationsSwitch.md +0 -32
- package/docs/reference/components/ui/Button.md +0 -40
- package/docs/reference/components/ui/ButtonGroup.md +0 -36
- package/docs/reference/components/ui/CopyButton.md +0 -41
- package/docs/reference/components/ui/Grade.md +0 -32
- package/docs/reference/components/ui/GradeFilter.md +0 -42
- package/docs/reference/components/ui/IconSwitch.md +0 -53
- package/docs/reference/components/ui/LinkButton.md +0 -45
- package/docs/reference/components/ui/ListGroup.md +0 -22
- package/docs/reference/components/ui/ListItem.md +0 -39
- package/docs/reference/components/ui/Loader.md +0 -56
- package/docs/reference/components/ui/Map.md +0 -150
- package/docs/reference/components/ui/MapMore.md +0 -150
- package/docs/reference/components/ui/Photo.md +0 -495
- package/docs/reference/components/ui/Popup.md +0 -56
- package/docs/reference/components/ui/ProgressBar.md +0 -32
- package/docs/reference/components/ui/QualityScore.md +0 -45
- package/docs/reference/components/ui/SearchBar.md +0 -63
- package/docs/reference/components/ui/SemanticsEditor.md +0 -113
- package/docs/reference/components/ui/SemanticsTable.md +0 -32
- package/docs/reference/components/ui/Switch.md +0 -49
- package/docs/reference/components/ui/TogglableGroup.md +0 -39
- package/docs/reference/components/ui/widgets/CopyCoordinates.md +0 -32
- package/docs/reference/components/ui/widgets/GeoSearch.md +0 -36
- package/docs/reference/components/ui/widgets/Legend.md +0 -58
- package/docs/reference/components/ui/widgets/LevelSelect.md +0 -16
- package/docs/reference/components/ui/widgets/MapFiltersButton.md +0 -37
- package/docs/reference/components/ui/widgets/MapLayersButton.md +0 -15
- package/docs/reference/components/ui/widgets/OSMEditors.md +0 -15
- package/docs/reference/components/ui/widgets/PictureLegendActions.md +0 -32
- package/docs/reference/components/ui/widgets/Player.md +0 -34
- package/docs/reference/components/ui/widgets/SemanticsFiltersButton.md +0 -15
- package/docs/reference/components/ui/widgets/Zoom.md +0 -15
- package/docs/reference/utils/API.md +0 -389
- package/docs/reference/utils/InitParameters.md +0 -68
- package/docs/reference/utils/MapStyleComposer.md +0 -408
- package/docs/reference/utils/PanoraMapProtocol.md +0 -28
- package/docs/reference/utils/PresetsManager.md +0 -43
- package/docs/reference/utils/SemanticsMapProtocol.md +0 -43
- package/docs/reference/utils/URLHandler.md +0 -114
- package/docs/reference.md +0 -99
- package/docs/shortcuts.md +0 -11
- package/docs/tutorials/aerial_imagery.md +0 -21
- package/docs/tutorials/authentication.md +0 -10
- package/docs/tutorials/custom_widgets.md +0 -59
- package/docs/tutorials/indoor_maps.md +0 -50
- package/docs/tutorials/map_style.md +0 -83
- package/docs/tutorials/migrate_v4.md +0 -153
- package/docs/tutorials/migrate_v5.md +0 -103
- package/docs/tutorials/semantics_overlays.md +0 -74
- package/docs/tutorials/synced_coverage.md +0 -43
- package/mkdocs.yml +0 -131
- package/public/editor.html +0 -53
- package/public/index.html +0 -70
- package/public/map.html +0 -55
- package/public/photo.html +0 -43
- package/public/servers.js +0 -15
- package/public/viewer.html +0 -79
- package/public/viewer_indoor.html +0 -48
- package/public/widgets.html +0 -366
- package/scripts/build.js +0 -217
- package/scripts/doc.js +0 -79
- package/scripts/start.js +0 -172
- package/scripts/test.js +0 -52
- package/src/components/core/index.js +0 -12
- package/src/components/index.js +0 -13
- package/src/components/index_photoviewer.js +0 -8
- package/src/components/layout/index.js +0 -9
- package/src/components/menus/index.js +0 -22
- package/src/components/menus/index_photoviewer.js +0 -13
- package/src/components/ui/index.js +0 -29
- package/src/components/ui/index_photoviewer.js +0 -23
- package/src/components/ui/widgets/index.js +0 -16
- package/src/components/ui/widgets/index_photoviewer.js +0 -9
- package/src/index.js +0 -8
- package/src/index_photoviewer.js +0 -6
- package/src/utils/index.js +0 -17
- package/src/utils/index_photoviewer.js +0 -16
- package/tests/components/core/Basic.test.js +0 -168
- package/tests/components/core/BasicMock.js +0 -25
- package/tests/components/core/CoverageMap.test.js +0 -20
- package/tests/components/core/Editor.test.js +0 -20
- package/tests/components/core/PhotoViewer.test.js +0 -57
- package/tests/components/core/Viewer.test.js +0 -85
- package/tests/components/core/__snapshots__/PhotoViewer.test.js.snap +0 -96
- package/tests/components/core/__snapshots__/Viewer.test.js.snap +0 -188
- package/tests/components/ui/CopyButton.test.js +0 -52
- package/tests/components/ui/Loader.test.js +0 -55
- package/tests/components/ui/Map.test.js +0 -145
- package/tests/components/ui/Photo.test.js +0 -437
- package/tests/components/ui/Popup.test.js +0 -26
- package/tests/components/ui/QualityScore.test.js +0 -18
- package/tests/components/ui/SearchBar.test.js +0 -110
- package/tests/components/ui/__snapshots__/CopyButton.test.js.snap +0 -33
- package/tests/components/ui/__snapshots__/Loader.test.js.snap +0 -56
- package/tests/components/ui/__snapshots__/Map.test.js.snap +0 -16
- package/tests/components/ui/__snapshots__/Photo.test.js.snap +0 -263
- package/tests/components/ui/__snapshots__/Popup.test.js.snap +0 -29
- package/tests/components/ui/__snapshots__/QualityScore.test.js.snap +0 -11
- package/tests/components/ui/__snapshots__/SearchBar.test.js.snap +0 -65
- package/tests/data/Map_geocoder_ban.json +0 -36
- package/tests/data/Map_geocoder_nominatim.json +0 -41
- package/tests/data/Viewer_pictures_1.json +0 -148
- package/tests/setupTests.js +0 -5
- package/tests/utils/API.test.js +0 -752
- package/tests/utils/InitParameters.test.js +0 -599
- package/tests/utils/MapStyleComposer.test.js +0 -697
- package/tests/utils/PresetsManager.test.js +0 -123
- package/tests/utils/URLHandler.test.js +0 -587
- package/tests/utils/__snapshots__/API.test.js.snap +0 -40
- package/tests/utils/__snapshots__/MapStyleComposer.test.js.snap +0 -767
- package/tests/utils/__snapshots__/URLHandler.test.js.snap +0 -21
- package/tests/utils/__snapshots__/geocoder.test.js.snap +0 -37
- package/tests/utils/__snapshots__/map.test.js.snap +0 -1249
- package/tests/utils/__snapshots__/picture.test.js.snap +0 -327
- package/tests/utils/__snapshots__/widgets.test.js.snap +0 -19
- package/tests/utils/geocoder.test.js +0 -37
- package/tests/utils/i18n.test.js +0 -111
- package/tests/utils/map.test.js +0 -200
- package/tests/utils/picture.test.js +0 -745
- package/tests/utils/semantics.test.js +0 -174
- package/tests/utils/utils.test.js +0 -358
- package/tests/utils/widgets.test.js +0 -31
- /package/{src → build}/components/core/Basic.css +0 -0
- /package/{src → build}/components/core/CoverageMap.css +0 -0
- /package/{src → build}/components/core/Editor.css +0 -0
- /package/{src → build}/components/core/PhotoViewer.css +0 -0
- /package/{src → build}/components/core/Viewer.css +0 -0
- /package/{src → build}/components/ui/ButtonGroup.css +0 -0
- /package/{src → build}/components/ui/Map.css +0 -0
- /package/{src → build}/components/ui/Photo.css +0 -0
- /package/{src → build}/components/ui/ProgressBar.js +0 -0
- /package/{src → build}/components/ui/widgets/GeoSearch.css +0 -0
- /package/{src → build}/components/ui/widgets/LevelSelect.css +0 -0
- /package/{src → build}/components/ui/widgets/Player.css +0 -0
- /package/{public → build}/favicon.ico +0 -0
- /package/{src → build}/img/arrow_360.svg +0 -0
- /package/{src → build}/img/arrow_flat.svg +0 -0
- /package/{src → build}/img/bg_aerial.jpg +0 -0
- /package/{src → build}/img/bg_streets.jpg +0 -0
- /package/{src → build}/img/loader_base.jpg +0 -0
- /package/{src → build}/img/logo_dead.svg +0 -0
- /package/{src → build}/img/marker.svg +0 -0
- /package/{src → build}/img/marker_blue.svg +0 -0
- /package/{src → build}/img/osm.svg +0 -0
- /package/{src → build}/img/panoramax.svg +0 -0
- /package/{src → build}/img/switch_big.svg +0 -0
- /package/{src → build}/img/switch_mini.svg +0 -0
- /package/{src → build}/img/wd.svg +0 -0
- /package/{src → build}/translations/ar.json +0 -0
- /package/{src → build}/translations/be.json +0 -0
- /package/{src → build}/translations/br.json +0 -0
- /package/{src → build}/translations/cy.json +0 -0
- /package/{src → build}/translations/da.json +0 -0
- /package/{src → build}/translations/de.json +0 -0
- /package/{src → build}/translations/en.json +0 -0
- /package/{src → build}/translations/eo.json +0 -0
- /package/{src → build}/translations/es.json +0 -0
- /package/{src → build}/translations/fi.json +0 -0
- /package/{src → build}/translations/fr.json +0 -0
- /package/{src → build}/translations/hu.json +0 -0
- /package/{src → build}/translations/it.json +0 -0
- /package/{src → build}/translations/ja.json +0 -0
- /package/{src → build}/translations/ko.json +0 -0
- /package/{src → build}/translations/nl.json +0 -0
- /package/{src → build}/translations/nn.json +0 -0
- /package/{src → build}/translations/pl.json +0 -0
- /package/{src → build}/translations/pt.json +0 -0
- /package/{src → build}/translations/pt_BR.json +0 -0
- /package/{src → build}/translations/sv.json +0 -0
- /package/{src → build}/translations/ti.json +0 -0
- /package/{src → build}/translations/tr.json +0 -0
- /package/{src → build}/translations/uk.json +0 -0
- /package/{src → build}/translations/zh_Hant.json +0 -0
- /package/{src → build}/utils/PanoraMapProtocol.js +0 -0
- /package/{src → build}/utils/services.js +0 -0
|
@@ -1,745 +0,0 @@
|
|
|
1
|
-
import * as picture from "../../src/utils/picture";
|
|
2
|
-
|
|
3
|
-
describe("getExifFloat", () => {
|
|
4
|
-
it.each([
|
|
5
|
-
[undefined, undefined],
|
|
6
|
-
[null, undefined],
|
|
7
|
-
["", undefined],
|
|
8
|
-
[" ", undefined],
|
|
9
|
-
[1, 1],
|
|
10
|
-
[1.4, 1.4],
|
|
11
|
-
["1", 1],
|
|
12
|
-
["-1.4", -1.4],
|
|
13
|
-
["-104/10", -10.4],
|
|
14
|
-
["-104.12/-12.12", 8.590759075907592],
|
|
15
|
-
])("works with %s", (input, expected) => {
|
|
16
|
-
expect(picture.getExifFloat(input)).toBe(expected);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
describe("getGPSPrecision", () => {
|
|
21
|
-
it.each([
|
|
22
|
-
[undefined, null],
|
|
23
|
-
[0.4, "0.4 m"],
|
|
24
|
-
[0.9, "0.9 m"],
|
|
25
|
-
[2.9, "2.9 m"],
|
|
26
|
-
[6.9, "6.9 m"],
|
|
27
|
-
[9.9, "9.9 m"],
|
|
28
|
-
[20, "20 m"],
|
|
29
|
-
["9/10", "0.9 m"],
|
|
30
|
-
["99/10", "9.9 m"],
|
|
31
|
-
])("handles GPSHPos %s > %s", (input, expected) => {
|
|
32
|
-
const p = { properties: { exif: { "Exif.GPSInfo.GPSHPositioningError": input, "Exif.GPSInfo.GPSDOP": input } } };
|
|
33
|
-
expect(picture.getGPSPrecision(p)).toBe(expected);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it.each([
|
|
37
|
-
[undefined, null],
|
|
38
|
-
[0.9, "ideal"],
|
|
39
|
-
[1.9, "excellent"],
|
|
40
|
-
[4.9, "good"],
|
|
41
|
-
[9.9, "moderate"],
|
|
42
|
-
[19.9, "fair"],
|
|
43
|
-
[20, "poor"],
|
|
44
|
-
["1/1", "excellent"],
|
|
45
|
-
["15/10", "excellent"],
|
|
46
|
-
])("handles GPSDOP %s > %s", (input, expected) => {
|
|
47
|
-
const p = { properties: { exif: { "Exif.GPSInfo.GPSDOP": input } } };
|
|
48
|
-
expect(picture.getGPSPrecision(p)).toBe(expected);
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
describe("getSphereCorrection", () => {
|
|
53
|
-
it("works with API props", () => {
|
|
54
|
-
const p = { properties: {
|
|
55
|
-
"view:azimuth": 50,
|
|
56
|
-
"pers:yaw": 42,
|
|
57
|
-
"pers:pitch": -30,
|
|
58
|
-
"pers:roll": 72.2
|
|
59
|
-
} };
|
|
60
|
-
expect(picture.getSphereCorrection(p)).toMatchSnapshot();
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
it("works with exif tags", () => {
|
|
64
|
-
const p = { properties: {
|
|
65
|
-
exif: {
|
|
66
|
-
"Xmp.Camera.Pitch": "-30/1",
|
|
67
|
-
"Xmp.GPano.PoseRollDegrees": 72.2,
|
|
68
|
-
"Exif.MpfInfo.MPFYawAngle": 42,
|
|
69
|
-
},
|
|
70
|
-
"view:azimuth": 50,
|
|
71
|
-
} };
|
|
72
|
-
expect(picture.getSphereCorrection(p)).toMatchSnapshot();
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
describe("getCroppedPanoData", () => {
|
|
77
|
-
it("works with API props", () => {
|
|
78
|
-
const p = { properties: {
|
|
79
|
-
"pers:interior_orientation": {
|
|
80
|
-
"sensor_array_dimensions": [15872,7936],
|
|
81
|
-
"visible_area": [0,2538,0,2792]
|
|
82
|
-
}
|
|
83
|
-
} };
|
|
84
|
-
expect(picture.getCroppedPanoData(p)).toMatchSnapshot();
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
it("works with exif tags", () => {
|
|
88
|
-
const p = { properties: {
|
|
89
|
-
exif: {
|
|
90
|
-
"Xmp.GPano.CroppedAreaImageHeightPixels": "2606",
|
|
91
|
-
"Xmp.GPano.CroppedAreaImageWidthPixels": "15872",
|
|
92
|
-
"Xmp.GPano.CroppedAreaLeftPixels": "0",
|
|
93
|
-
"Xmp.GPano.CroppedAreaTopPixels": "2538",
|
|
94
|
-
"Xmp.GPano.FullPanoHeightPixels": "7936",
|
|
95
|
-
"Xmp.GPano.FullPanoWidthPixels": "15872",
|
|
96
|
-
},
|
|
97
|
-
} };
|
|
98
|
-
expect(picture.getCroppedPanoData(p)).toMatchSnapshot();
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
it("works with API props and unneeded", () => {
|
|
102
|
-
const p = { properties: {
|
|
103
|
-
"pers:interior_orientation": {
|
|
104
|
-
"sensor_array_dimensions": [15872,7936],
|
|
105
|
-
"visible_area": [0,0,0,0]
|
|
106
|
-
}
|
|
107
|
-
} };
|
|
108
|
-
expect(picture.getCroppedPanoData(p)).toMatchSnapshot();
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
it("works with exif tags and unneeded", () => {
|
|
112
|
-
const p = { properties: {
|
|
113
|
-
exif: {
|
|
114
|
-
"Xmp.GPano.CroppedAreaImageHeightPixels": "7936",
|
|
115
|
-
"Xmp.GPano.CroppedAreaImageWidthPixels": "15872",
|
|
116
|
-
"Xmp.GPano.CroppedAreaLeftPixels": "0",
|
|
117
|
-
"Xmp.GPano.CroppedAreaTopPixels": "0",
|
|
118
|
-
"Xmp.GPano.FullPanoHeightPixels": "7936",
|
|
119
|
-
"Xmp.GPano.FullPanoWidthPixels": "15872",
|
|
120
|
-
},
|
|
121
|
-
} };
|
|
122
|
-
expect(picture.getCroppedPanoData(p)).toMatchSnapshot();
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
describe("sortPicturesInDirection", () => {
|
|
127
|
-
it("works with next/prev links", () => {
|
|
128
|
-
const sort = picture.sortPicturesInDirection([0,0]);
|
|
129
|
-
let res = sort({rel: "prev"}, {rel: "next"});
|
|
130
|
-
expect(res).toBe(0);
|
|
131
|
-
res = sort({rel: "prev"}, {rel: "related"});
|
|
132
|
-
expect(res).toBe(-1);
|
|
133
|
-
res = sort({rel: "related"}, {rel: "next"});
|
|
134
|
-
expect(res).toBe(1);
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
it("works with related at different dates", () => {
|
|
138
|
-
const sort = picture.sortPicturesInDirection([0,0]);
|
|
139
|
-
let res = sort(
|
|
140
|
-
{rel: "related", date: "2023-01-01"},
|
|
141
|
-
{rel: "related", date: "2022-01-01"}
|
|
142
|
-
);
|
|
143
|
-
expect(res).toBe(-1); // Most recent goes first
|
|
144
|
-
res = sort(
|
|
145
|
-
{rel: "related", date: "2022-01-01"},
|
|
146
|
-
{rel: "related", date: "2023-01-01"}
|
|
147
|
-
);
|
|
148
|
-
expect(res).toBe(1);
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
it("works with related at same date", () => {
|
|
152
|
-
const sort = picture.sortPicturesInDirection([0,0]);
|
|
153
|
-
let res = sort(
|
|
154
|
-
{rel: "related", date: "2023-01-01", geometry: {coordinates: [0.1,0.1]}},
|
|
155
|
-
{rel: "related", date: "2023-01-01", geometry: {coordinates: [0.5,0.5]}}
|
|
156
|
-
);
|
|
157
|
-
expect(res).toBeLessThan(0); // Nearest goes first
|
|
158
|
-
res = sort(
|
|
159
|
-
{rel: "related", date: "2023-01-01", geometry: {coordinates: [0.5,0.5]}},
|
|
160
|
-
{rel: "related", date: "2023-01-01", geometry: {coordinates: [0.1,0.1]}}
|
|
161
|
-
);
|
|
162
|
-
expect(res).toBeGreaterThan(0);
|
|
163
|
-
res = sort(
|
|
164
|
-
{rel: "related", date: "2023-01-01", geometry: {coordinates: [0.1,0.1]}},
|
|
165
|
-
{rel: "related", date: "2023-01-01", geometry: {coordinates: [0.1,0.1]}}
|
|
166
|
-
);
|
|
167
|
-
expect(res).toBe(0);
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
describe("getNodeCaption", () => {
|
|
172
|
-
it("works with date", () => {
|
|
173
|
-
const m = { properties: { datetime: "2022-02-01T12:15:36Z" } };
|
|
174
|
-
global.Date = jest.fn(() => ({ toLocaleDateString: () => "February 2 2022" }));
|
|
175
|
-
const res = picture.getNodeCaption(m, { pnx: { metadata_general_license_link: "" }});
|
|
176
|
-
expect(res).toMatchSnapshot();
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
it("works with date+tz", () => {
|
|
180
|
-
const m = { properties: { datetimetz: "2022-02-01T12:15:36-03:00" } };
|
|
181
|
-
global.Date = jest.fn(() => ({ toLocaleDateString: () => "February 2 2022" }));
|
|
182
|
-
const res = picture.getNodeCaption(m, { pnx: { metadata_general_license_link: "" }});
|
|
183
|
-
expect(res).toMatchSnapshot();
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
it("works with producer", () => {
|
|
187
|
-
const m = { providers: [ { name: "PanierAvide", roles: ["producer", "licensor"] } ] };
|
|
188
|
-
const res = picture.getNodeCaption(m, { pnx: { metadata_general_license_link: "" }});
|
|
189
|
-
expect(res).toMatchSnapshot();
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
it("works with date + producer", () => {
|
|
193
|
-
const m = { properties: { datetime: "2022-02-01T12:15:36Z" }, providers: [ { name: "PanierAvide", roles: ["producer", "licensor"] } ] };
|
|
194
|
-
global.Date = jest.fn(() => ({ toLocaleDateString: () => "February 2 2022" }));
|
|
195
|
-
const res = picture.getNodeCaption(m, { pnx: { metadata_general_license_link: "" }});
|
|
196
|
-
expect(res).toMatchSnapshot();
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
it("works with date + 2 producers", () => {
|
|
200
|
-
const m = {
|
|
201
|
-
properties: { datetime: "2022-02-01T12:15:36Z" },
|
|
202
|
-
providers: [
|
|
203
|
-
{ name: "GeoVisio Corp.", roles: ["producer", "licensor"] },
|
|
204
|
-
{ name: "PanierAvide", roles: ["producer"] },
|
|
205
|
-
]
|
|
206
|
-
};
|
|
207
|
-
global.Date = jest.fn(() => ({ toLocaleDateString: () => "February 2 2022" }));
|
|
208
|
-
const res = picture.getNodeCaption(m, { pnx: { metadata_general_license_link: "" }});
|
|
209
|
-
expect(res).toMatchSnapshot();
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
describe("apiFeatureToPSVNode", () => {
|
|
214
|
-
it("works", () => {
|
|
215
|
-
const f = {
|
|
216
|
-
"asset_templates": {
|
|
217
|
-
"tiles": {
|
|
218
|
-
"description": "Highest resolution available of this picture, as tiles",
|
|
219
|
-
"href": "https://panoramax.openstreetmap.fr/api/pictures/00000000-76a0-4bec-b19e-a56f51ef997d/tiled/{TileCol}_{TileRow}.jpg",
|
|
220
|
-
"roles": [
|
|
221
|
-
"data"
|
|
222
|
-
],
|
|
223
|
-
"title": "HD tiled picture",
|
|
224
|
-
"type": "image/jpeg"
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
"assets": {
|
|
228
|
-
"hd": {
|
|
229
|
-
"description": "Highest resolution available of this picture",
|
|
230
|
-
"href": "https://panoramax.openstreetmap.fr/api/pictures/00000000-76a0-4bec-b19e-a56f51ef997d/hd.jpg",
|
|
231
|
-
"roles": [
|
|
232
|
-
"data"
|
|
233
|
-
],
|
|
234
|
-
"title": "HD picture",
|
|
235
|
-
"type": "image/jpeg"
|
|
236
|
-
},
|
|
237
|
-
"sd": {
|
|
238
|
-
"description": "Picture in standard definition (fixed width of 2048px)",
|
|
239
|
-
"href": "https://panoramax.openstreetmap.fr/api/pictures/00000000-76a0-4bec-b19e-a56f51ef997d/sd.jpg",
|
|
240
|
-
"roles": [
|
|
241
|
-
"visual"
|
|
242
|
-
],
|
|
243
|
-
"title": "SD picture",
|
|
244
|
-
"type": "image/jpeg"
|
|
245
|
-
},
|
|
246
|
-
"thumb": {
|
|
247
|
-
"description": "Picture in low definition (fixed width of 500px)",
|
|
248
|
-
"href": "https://panoramax.openstreetmap.fr/api/pictures/00000000-76a0-4bec-b19e-a56f51ef997d/thumb.jpg",
|
|
249
|
-
"roles": [
|
|
250
|
-
"thumbnail"
|
|
251
|
-
],
|
|
252
|
-
"title": "Thumbnail",
|
|
253
|
-
"type": "image/jpeg"
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
"bbox": [
|
|
257
|
-
-92.70188245,
|
|
258
|
-
41.322064692,
|
|
259
|
-
-92.70188245,
|
|
260
|
-
41.322064692
|
|
261
|
-
],
|
|
262
|
-
"collection": "ec31c324-b43a-425e-a24c-3de56d7914c1",
|
|
263
|
-
"geometry": {
|
|
264
|
-
"coordinates": [
|
|
265
|
-
-92.70188245,
|
|
266
|
-
41.322064692
|
|
267
|
-
],
|
|
268
|
-
"type": "Point"
|
|
269
|
-
},
|
|
270
|
-
"id": "00000000-76a0-4bec-b19e-a56f51ef997d",
|
|
271
|
-
"links": [
|
|
272
|
-
{
|
|
273
|
-
"href": "https://panoramax.openstreetmap.fr/api/",
|
|
274
|
-
"rel": "root",
|
|
275
|
-
"title": "Instance catalog",
|
|
276
|
-
"type": "application/json"
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ec31c324-b43a-425e-a24c-3de56d7914c1",
|
|
280
|
-
"rel": "parent",
|
|
281
|
-
"type": "application/json"
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ec31c324-b43a-425e-a24c-3de56d7914c1/items/00000000-76a0-4bec-b19e-a56f51ef997d",
|
|
285
|
-
"rel": "self",
|
|
286
|
-
"type": "application/geo+json"
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ec31c324-b43a-425e-a24c-3de56d7914c1",
|
|
290
|
-
"rel": "collection",
|
|
291
|
-
"type": "application/json"
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
"href": "https://spdx.org/licenses/CC-BY-SA-4.0.html",
|
|
295
|
-
"rel": "license",
|
|
296
|
-
"title": "License for this object (CC-BY-SA-4.0)"
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
"geometry": {
|
|
300
|
-
"coordinates": [
|
|
301
|
-
-92.701910458,
|
|
302
|
-
41.322081588
|
|
303
|
-
],
|
|
304
|
-
"type": "Point"
|
|
305
|
-
},
|
|
306
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ec31c324-b43a-425e-a24c-3de56d7914c1/items/5fb8e767-6fe3-4bcb-b19f-7031d9a64fc8",
|
|
307
|
-
"id": "5fb8e767-6fe3-4bcb-b19f-7031d9a64fc8",
|
|
308
|
-
"rel": "next",
|
|
309
|
-
"type": "application/geo+json"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
"geometry": {
|
|
313
|
-
"coordinates": [
|
|
314
|
-
-92.701854443,
|
|
315
|
-
41.322047796
|
|
316
|
-
],
|
|
317
|
-
"type": "Point"
|
|
318
|
-
},
|
|
319
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ec31c324-b43a-425e-a24c-3de56d7914c1/items/66ea29cd-941c-4201-977f-efb87bd5465e",
|
|
320
|
-
"id": "66ea29cd-941c-4201-977f-efb87bd5465e",
|
|
321
|
-
"rel": "prev",
|
|
322
|
-
"type": "application/geo+json"
|
|
323
|
-
}
|
|
324
|
-
],
|
|
325
|
-
"properties": {
|
|
326
|
-
"created": "2024-09-04T02:40:11.836165+00:00",
|
|
327
|
-
"datetime": "2024-09-01T23:35:37.797105+00:00",
|
|
328
|
-
"datetimetz": "2024-09-01T23:35:37.797105+00:00",
|
|
329
|
-
"exif": {
|
|
330
|
-
"Xmp.GPano.CroppedAreaImageHeightPixels": "2688",
|
|
331
|
-
"Xmp.GPano.CroppedAreaImageWidthPixels": "5376",
|
|
332
|
-
"Xmp.GPano.CroppedAreaLeftPixels": "0",
|
|
333
|
-
"Xmp.GPano.CroppedAreaTopPixels": "0",
|
|
334
|
-
"Xmp.GPano.FullPanoHeightPixels": "2688",
|
|
335
|
-
"Xmp.GPano.FullPanoWidthPixels": "5376",
|
|
336
|
-
"Xmp.GPano.ProjectionType": "equirectangular",
|
|
337
|
-
"Xmp.GPano.UsePanoramaViewer": "True"
|
|
338
|
-
},
|
|
339
|
-
"geovisio:image": "https://panoramax.openstreetmap.fr/api/pictures/00000000-76a0-4bec-b19e-a56f51ef997d/hd.jpg",
|
|
340
|
-
"geovisio:producer": "Hopen111",
|
|
341
|
-
"geovisio:thumbnail": "https://panoramax.openstreetmap.fr/api/pictures/00000000-76a0-4bec-b19e-a56f51ef997d/thumb.jpg",
|
|
342
|
-
"license": "CC-BY-SA-4.0",
|
|
343
|
-
"original_file:name": "GS010837-003545.jpg",
|
|
344
|
-
"original_file:size": 788436,
|
|
345
|
-
"panoramax:horizontal_pixel_density": 15,
|
|
346
|
-
"pers:interior_orientation": {
|
|
347
|
-
"field_of_view": 360,
|
|
348
|
-
"sensor_array_dimensions": [
|
|
349
|
-
5376,
|
|
350
|
-
2688
|
|
351
|
-
]
|
|
352
|
-
},
|
|
353
|
-
"tiles:tile_matrix_sets": {
|
|
354
|
-
"geovisio": {
|
|
355
|
-
"identifier": "geovisio-00000000-76a0-4bec-b19e-a56f51ef997d",
|
|
356
|
-
"tileMatrix": [
|
|
357
|
-
{
|
|
358
|
-
"identifier": "0",
|
|
359
|
-
"matrixHeight": 4,
|
|
360
|
-
"matrixWidth": 8,
|
|
361
|
-
"scaleDenominator": 1,
|
|
362
|
-
"tileHeight": 672.0,
|
|
363
|
-
"tileWidth": 672.0,
|
|
364
|
-
"topLeftCorner": [
|
|
365
|
-
0,
|
|
366
|
-
0
|
|
367
|
-
],
|
|
368
|
-
"type": "TileMatrixType"
|
|
369
|
-
}
|
|
370
|
-
],
|
|
371
|
-
"title": "GeoVisio tile matrix for picture 00000000-76a0-4bec-b19e-a56f51ef997d",
|
|
372
|
-
"type": "TileMatrixSetType"
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
"view:azimuth": 309
|
|
376
|
-
},
|
|
377
|
-
"providers": [
|
|
378
|
-
{
|
|
379
|
-
"id": "cddcb3f2-9b2f-454b-8f03-da7dd6a966e2",
|
|
380
|
-
"name": "Hopen111",
|
|
381
|
-
"roles": [
|
|
382
|
-
"producer"
|
|
383
|
-
]
|
|
384
|
-
}
|
|
385
|
-
],
|
|
386
|
-
"stac_extensions": [
|
|
387
|
-
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
|
|
388
|
-
"https://stac-extensions.github.io/perspective-imagery/v1.0.0/schema.json",
|
|
389
|
-
"https://stac-extensions.github.io/tiled-assets/v1.0.0/schema.json"
|
|
390
|
-
],
|
|
391
|
-
"stac_version": "1.0.0",
|
|
392
|
-
"type": "Feature"
|
|
393
|
-
};
|
|
394
|
-
|
|
395
|
-
const res = picture.apiFeatureToPSVNode(f, { pnx: { metadata_general_license_link: "" }});
|
|
396
|
-
expect(res).toMatchSnapshot();
|
|
397
|
-
});
|
|
398
|
-
});
|
|
399
|
-
|
|
400
|
-
describe("filterRelatedPicsLinks", () => {
|
|
401
|
-
it("works", () => {
|
|
402
|
-
const f = {
|
|
403
|
-
"assets": {
|
|
404
|
-
"hd": {
|
|
405
|
-
"description": "Highest resolution available of this picture",
|
|
406
|
-
"href": "https://panoramax.openstreetmap.fr/images/df/f1/68/fd/b375-417d-94e5-61dcb619b106.jpg",
|
|
407
|
-
"roles": [
|
|
408
|
-
"data"
|
|
409
|
-
],
|
|
410
|
-
"title": "HD picture",
|
|
411
|
-
"type": "image/jpeg"
|
|
412
|
-
},
|
|
413
|
-
"sd": {
|
|
414
|
-
"description": "Picture in standard definition (fixed width of 2048px)",
|
|
415
|
-
"href": "https://panoramax.openstreetmap.fr/derivates/df/f1/68/fd/b375-417d-94e5-61dcb619b106/sd.jpg",
|
|
416
|
-
"roles": [
|
|
417
|
-
"visual"
|
|
418
|
-
],
|
|
419
|
-
"title": "SD picture",
|
|
420
|
-
"type": "image/jpeg"
|
|
421
|
-
},
|
|
422
|
-
"thumb": {
|
|
423
|
-
"description": "Picture in low definition (fixed width of 500px)",
|
|
424
|
-
"href": "https://panoramax.openstreetmap.fr/derivates/df/f1/68/fd/b375-417d-94e5-61dcb619b106/thumb.jpg",
|
|
425
|
-
"roles": [
|
|
426
|
-
"thumbnail"
|
|
427
|
-
],
|
|
428
|
-
"title": "Thumbnail",
|
|
429
|
-
"type": "image/jpeg"
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
"bbox": [
|
|
433
|
-
4.8401172,
|
|
434
|
-
45.7562227,
|
|
435
|
-
4.8401172,
|
|
436
|
-
45.7562227
|
|
437
|
-
],
|
|
438
|
-
"collection": "ada7e5ec-1ee6-4059-9744-82f4c1416248",
|
|
439
|
-
"geometry": {
|
|
440
|
-
"coordinates": [
|
|
441
|
-
4.8401172,
|
|
442
|
-
45.7562227
|
|
443
|
-
],
|
|
444
|
-
"type": "Point"
|
|
445
|
-
},
|
|
446
|
-
"id": "dff168fd-b375-417d-94e5-61dcb619b106",
|
|
447
|
-
"links": [
|
|
448
|
-
{
|
|
449
|
-
"href": "https://panoramax.openstreetmap.fr/api/",
|
|
450
|
-
"rel": "root",
|
|
451
|
-
"title": "Instance catalog",
|
|
452
|
-
"type": "application/json"
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ada7e5ec-1ee6-4059-9744-82f4c1416248",
|
|
456
|
-
"rel": "parent",
|
|
457
|
-
"type": "application/json"
|
|
458
|
-
},
|
|
459
|
-
{
|
|
460
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ada7e5ec-1ee6-4059-9744-82f4c1416248/items/dff168fd-b375-417d-94e5-61dcb619b106",
|
|
461
|
-
"rel": "self",
|
|
462
|
-
"type": "application/geo+json"
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ada7e5ec-1ee6-4059-9744-82f4c1416248",
|
|
466
|
-
"rel": "collection",
|
|
467
|
-
"type": "application/json"
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
"href": "https://spdx.org/licenses/CC-BY-SA-4.0.html",
|
|
471
|
-
"rel": "license",
|
|
472
|
-
"title": "License for this object (CC-BY-SA-4.0)"
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
"geometry": {
|
|
476
|
-
"coordinates": [
|
|
477
|
-
4.8401792,
|
|
478
|
-
45.7562024
|
|
479
|
-
],
|
|
480
|
-
"type": "Point"
|
|
481
|
-
},
|
|
482
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ada7e5ec-1ee6-4059-9744-82f4c1416248/items/38abdc16-b878-4762-a433-33e52e62ae9b",
|
|
483
|
-
"id": "38abdc16-b878-4762-a433-33e52e62ae9b",
|
|
484
|
-
"rel": "next",
|
|
485
|
-
"type": "application/geo+json"
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
"geometry": {
|
|
489
|
-
"coordinates": [
|
|
490
|
-
4.8400633,
|
|
491
|
-
45.7562389
|
|
492
|
-
],
|
|
493
|
-
"type": "Point"
|
|
494
|
-
},
|
|
495
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ada7e5ec-1ee6-4059-9744-82f4c1416248/items/1c5025ed-3e03-4cf0-8879-7ed9091a9e33",
|
|
496
|
-
"id": "1c5025ed-3e03-4cf0-8879-7ed9091a9e33",
|
|
497
|
-
"rel": "prev",
|
|
498
|
-
"type": "application/geo+json"
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
"datetime": "2023-08-23T07:13:08Z",
|
|
502
|
-
"geometry": {
|
|
503
|
-
"coordinates": [
|
|
504
|
-
4.840134667,
|
|
505
|
-
45.756240466
|
|
506
|
-
],
|
|
507
|
-
"type": "Point"
|
|
508
|
-
},
|
|
509
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/0ea5e068-a4e5-47b4-a5e2-afefd6f7dec7/items/aaa1ae2f-b48a-4291-972e-030fcd44760b",
|
|
510
|
-
"id": "aaa1ae2f-b48a-4291-972e-030fcd44760b",
|
|
511
|
-
"rel": "related",
|
|
512
|
-
"type": "application/geo+json"
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
"datetime": "2023-06-04T08:17:38Z",
|
|
516
|
-
"geometry": {
|
|
517
|
-
"coordinates": [
|
|
518
|
-
4.84012,
|
|
519
|
-
45.7561907
|
|
520
|
-
],
|
|
521
|
-
"type": "Point"
|
|
522
|
-
},
|
|
523
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/57c5e57e-d9d4-45d2-8bd5-274e61e9a41a/items/ecc02464-06d5-49dd-937d-6c07d2bebd26",
|
|
524
|
-
"id": "ecc02464-06d5-49dd-937d-6c07d2bebd26",
|
|
525
|
-
"rel": "related",
|
|
526
|
-
"type": "application/geo+json"
|
|
527
|
-
},
|
|
528
|
-
{
|
|
529
|
-
"datetime": "2022-07-09T11:47:44Z",
|
|
530
|
-
"geometry": {
|
|
531
|
-
"coordinates": [
|
|
532
|
-
4.8401801,
|
|
533
|
-
45.7562703
|
|
534
|
-
],
|
|
535
|
-
"type": "Point"
|
|
536
|
-
},
|
|
537
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/616e03cc-5f8c-4a75-bd64-c74fbfacb9c3/items/207bed6f-ccdf-4f9b-9b03-2ac5e4fccfe5",
|
|
538
|
-
"id": "207bed6f-ccdf-4f9b-9b03-2ac5e4fccfe5",
|
|
539
|
-
"rel": "related",
|
|
540
|
-
"type": "application/geo+json"
|
|
541
|
-
},
|
|
542
|
-
{
|
|
543
|
-
"datetime": "2023-07-09T09:36:27Z",
|
|
544
|
-
"geometry": {
|
|
545
|
-
"coordinates": [
|
|
546
|
-
4.8400607,
|
|
547
|
-
45.7561715
|
|
548
|
-
],
|
|
549
|
-
"type": "Point"
|
|
550
|
-
},
|
|
551
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/857506ff-62ab-4cb7-ae78-9bdd513c6736/items/cd89e407-9e28-413e-9ba8-8515b4590431",
|
|
552
|
-
"id": "cd89e407-9e28-413e-9ba8-8515b4590431",
|
|
553
|
-
"rel": "related",
|
|
554
|
-
"type": "application/geo+json"
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
"datetime": "2024-07-07T12:37:51Z",
|
|
558
|
-
"geometry": {
|
|
559
|
-
"coordinates": [
|
|
560
|
-
4.8401379,
|
|
561
|
-
45.7561616
|
|
562
|
-
],
|
|
563
|
-
"type": "Point"
|
|
564
|
-
},
|
|
565
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/d1761909-3b69-4741-b70c-e4e4f503a4cb/items/5e1d8461-fe5d-4d57-9c87-f2403baff37d",
|
|
566
|
-
"id": "5e1d8461-fe5d-4d57-9c87-f2403baff37d",
|
|
567
|
-
"rel": "related",
|
|
568
|
-
"type": "application/geo+json"
|
|
569
|
-
},
|
|
570
|
-
{
|
|
571
|
-
"datetime": "2022-09-18T13:45:48Z",
|
|
572
|
-
"geometry": {
|
|
573
|
-
"coordinates": [
|
|
574
|
-
4.8400835,
|
|
575
|
-
45.7561967
|
|
576
|
-
],
|
|
577
|
-
"type": "Point"
|
|
578
|
-
},
|
|
579
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/d787c4e7-bad3-428c-b243-206f0376ac47/items/d3ca4cbc-0011-49ca-9b16-47b627b33bd9",
|
|
580
|
-
"id": "d3ca4cbc-0011-49ca-9b16-47b627b33bd9",
|
|
581
|
-
"rel": "related",
|
|
582
|
-
"type": "application/geo+json"
|
|
583
|
-
},
|
|
584
|
-
{
|
|
585
|
-
"datetime": "2024-09-17T14:34:21Z",
|
|
586
|
-
"geometry": {
|
|
587
|
-
"coordinates": [
|
|
588
|
-
4.8400918,
|
|
589
|
-
45.7561938
|
|
590
|
-
],
|
|
591
|
-
"type": "Point"
|
|
592
|
-
},
|
|
593
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/ea22bc85-86e7-46ce-8b3b-a8ba70ca1afd/items/abff42de-2862-4b15-8c2a-dca22ed2deaf",
|
|
594
|
-
"id": "abff42de-2862-4b15-8c2a-dca22ed2deaf",
|
|
595
|
-
"rel": "related",
|
|
596
|
-
"type": "application/geo+json"
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
"datetime": "2022-08-21T11:14:20Z",
|
|
600
|
-
"geometry": {
|
|
601
|
-
"coordinates": [
|
|
602
|
-
4.8400687,
|
|
603
|
-
45.7561978
|
|
604
|
-
],
|
|
605
|
-
"type": "Point"
|
|
606
|
-
},
|
|
607
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/f2e2263c-ad94-4a61-b120-32d780afe321/items/13184780-53de-4f8e-87ae-336ae51cb9e7",
|
|
608
|
-
"id": "13184780-53de-4f8e-87ae-336ae51cb9e7",
|
|
609
|
-
"rel": "related",
|
|
610
|
-
"type": "application/geo+json"
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
"datetime": "2025-09-03T13:36:48Z",
|
|
614
|
-
"geometry": {
|
|
615
|
-
"coordinates": [
|
|
616
|
-
4.8401266,
|
|
617
|
-
45.7562077
|
|
618
|
-
],
|
|
619
|
-
"type": "Point"
|
|
620
|
-
},
|
|
621
|
-
"href": "https://panoramax.openstreetmap.fr/api/collections/f8b8741e-8af6-4aad-8531-8b52cf472947/items/839a0e15-c9f6-4bbe-8bd3-0fde1d8cc839",
|
|
622
|
-
"id": "839a0e15-c9f6-4bbe-8bd3-0fde1d8cc839",
|
|
623
|
-
"rel": "related",
|
|
624
|
-
"type": "application/geo+json"
|
|
625
|
-
}
|
|
626
|
-
],
|
|
627
|
-
"properties": {
|
|
628
|
-
"created": "2023-06-18T12:01:29.290897+00:00",
|
|
629
|
-
"datetime": "2023-06-18T10:09:20.701000+00:00",
|
|
630
|
-
"datetimetz": "2023-06-18T10:09:20.701000+00:00",
|
|
631
|
-
"exif": {
|
|
632
|
-
"Exif.GPSInfo.GPSAltitude": "220.305",
|
|
633
|
-
"Exif.GPSInfo.GPSAltitudeRef": "",
|
|
634
|
-
"Exif.GPSInfo.GPSDateStamp": "2023:06:18",
|
|
635
|
-
"Exif.GPSInfo.GPSLatitude": "(45.0, 45.0, 22.40172)",
|
|
636
|
-
"Exif.GPSInfo.GPSLatitudeRef": "N",
|
|
637
|
-
"Exif.GPSInfo.GPSLongitude": "(4.0, 50.0, 24.4219199)",
|
|
638
|
-
"Exif.GPSInfo.GPSLongitudeRef": "E",
|
|
639
|
-
"Exif.GPSInfo.GPSTimeStamp": "(10.0, 9.0, 20.0)",
|
|
640
|
-
"Exif.Image.ApertureValue": "2.5",
|
|
641
|
-
"Exif.Image.CompressedBitsPerPixel": "0.004",
|
|
642
|
-
"Exif.Image.DateTime": "2023:06:18 12:09:18",
|
|
643
|
-
"Exif.Image.DateTimeOriginal": "2023:06:18 12:09:18",
|
|
644
|
-
"Exif.Image.ExposureBiasValue": "0.0",
|
|
645
|
-
"Exif.Image.ExposureIndex": "1.0668355509971355",
|
|
646
|
-
"Exif.Image.ExposureProgram": "2",
|
|
647
|
-
"Exif.Image.ExposureTime": "0.0006680026720106881",
|
|
648
|
-
"Exif.Image.FNumber": "2.5",
|
|
649
|
-
"Exif.Image.Flash": "32",
|
|
650
|
-
"Exif.Image.FocalLength": "3.0",
|
|
651
|
-
"Exif.Image.ISOSpeedRatings": "100",
|
|
652
|
-
"Exif.Image.ImageDescription": "DCIM\\126GOPRO\\G0176513.JPG",
|
|
653
|
-
"Exif.Image.LightSource": "0",
|
|
654
|
-
"Exif.Image.Make": "GoPro",
|
|
655
|
-
"Exif.Image.MaxApertureValue": "2.5",
|
|
656
|
-
"Exif.Image.MeteringMode": "1",
|
|
657
|
-
"Exif.Image.Model": "HERO9 Black",
|
|
658
|
-
"Exif.Image.Orientation": "1",
|
|
659
|
-
"Exif.Image.ResolutionUnit": "2",
|
|
660
|
-
"Exif.Image.SensingMethod": "2",
|
|
661
|
-
"Exif.Image.ShutterSpeedValue": "11.0",
|
|
662
|
-
"Exif.Image.Software": "HD9.01.01.72.70",
|
|
663
|
-
"Exif.Image.SubjectDistance": "0.0",
|
|
664
|
-
"Exif.Image.XResolution": "72.0",
|
|
665
|
-
"Exif.Image.YCbCrPositioning": "1",
|
|
666
|
-
"Exif.Image.YResolution": "72.0",
|
|
667
|
-
"Exif.Photo.ApertureValue": "2.5",
|
|
668
|
-
"Exif.Photo.BodySerialNumber": "C3441327278550",
|
|
669
|
-
"Exif.Photo.ColorSpace": "0",
|
|
670
|
-
"Exif.Photo.ComponentsConfiguration": "\u0001\u0002\u0003",
|
|
671
|
-
"Exif.Photo.CompressedBitsPerPixel": "0.004",
|
|
672
|
-
"Exif.Photo.Contrast": "0",
|
|
673
|
-
"Exif.Photo.CustomRendered": "0",
|
|
674
|
-
"Exif.Photo.DateTimeDigitized": "2023:06:18 12:09:18",
|
|
675
|
-
"Exif.Photo.DateTimeOriginal": "2023:06:18 12:09:18",
|
|
676
|
-
"Exif.Photo.DeviceSettingDescription": "",
|
|
677
|
-
"Exif.Photo.DigitalZoomRatio": "1.0",
|
|
678
|
-
"Exif.Photo.ExifVersion": "0221",
|
|
679
|
-
"Exif.Photo.ExposureBiasValue": "0.0",
|
|
680
|
-
"Exif.Photo.ExposureIndex": "1.0668355509971355",
|
|
681
|
-
"Exif.Photo.ExposureMode": "0",
|
|
682
|
-
"Exif.Photo.ExposureProgram": "2",
|
|
683
|
-
"Exif.Photo.ExposureTime": "0.0006680026720106881",
|
|
684
|
-
"Exif.Photo.FNumber": "2.5",
|
|
685
|
-
"Exif.Photo.FileSource": "\u0003",
|
|
686
|
-
"Exif.Photo.Flash": "32",
|
|
687
|
-
"Exif.Photo.FocalLength": "3.0",
|
|
688
|
-
"Exif.Photo.FocalLengthIn35mmFilm": "15",
|
|
689
|
-
"Exif.Photo.GainControl": "0",
|
|
690
|
-
"Exif.Photo.ISOSpeedRatings": "100",
|
|
691
|
-
"Exif.Photo.LightSource": "0",
|
|
692
|
-
"Exif.Photo.MaxApertureValue": "2.5",
|
|
693
|
-
"Exif.Photo.MeteringMode": "1",
|
|
694
|
-
"Exif.Photo.Saturation": "0",
|
|
695
|
-
"Exif.Photo.SceneCaptureType": "1",
|
|
696
|
-
"Exif.Photo.SceneType": "\u0001",
|
|
697
|
-
"Exif.Photo.SensingMethod": "2",
|
|
698
|
-
"Exif.Photo.Sharpness": "2",
|
|
699
|
-
"Exif.Photo.ShutterSpeedValue": "11.0",
|
|
700
|
-
"Exif.Photo.SubjectDistance": "0.0",
|
|
701
|
-
"Exif.Photo.SubjectDistanceRange": "0",
|
|
702
|
-
"Exif.Photo.WhiteBalance": "0"
|
|
703
|
-
},
|
|
704
|
-
"geovisio:image": "https://panoramax.openstreetmap.fr/images/df/f1/68/fd/b375-417d-94e5-61dcb619b106.jpg",
|
|
705
|
-
"geovisio:producer": "Blueberry",
|
|
706
|
-
"geovisio:status": "ready",
|
|
707
|
-
"geovisio:thumbnail": "https://panoramax.openstreetmap.fr/derivates/df/f1/68/fd/b375-417d-94e5-61dcb619b106/thumb.jpg",
|
|
708
|
-
"license": "CC-BY-SA-4.0",
|
|
709
|
-
"original_file:name": "12h09m18-7010.jpg",
|
|
710
|
-
"original_file:size": 3405656,
|
|
711
|
-
"panoramax:horizontal_pixel_density": 56,
|
|
712
|
-
"pers:interior_orientation": {
|
|
713
|
-
"camera_manufacturer": "GoPro",
|
|
714
|
-
"camera_model": "HERO9 Black",
|
|
715
|
-
"field_of_view": 92,
|
|
716
|
-
"focal_length": 3.0,
|
|
717
|
-
"sensor_array_dimensions": [
|
|
718
|
-
5184,
|
|
719
|
-
3888
|
|
720
|
-
]
|
|
721
|
-
},
|
|
722
|
-
"quality:horizontal_accuracy": 4.0,
|
|
723
|
-
"view:azimuth": 108
|
|
724
|
-
},
|
|
725
|
-
"providers": [
|
|
726
|
-
{
|
|
727
|
-
"id": "d259d230-dbdc-43c7-bf36-5c62a70a2363",
|
|
728
|
-
"name": "Blueberry",
|
|
729
|
-
"roles": [
|
|
730
|
-
"producer"
|
|
731
|
-
]
|
|
732
|
-
}
|
|
733
|
-
],
|
|
734
|
-
"stac_extensions": [
|
|
735
|
-
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
|
|
736
|
-
"https://stac-extensions.github.io/perspective-imagery/v1.0.0/schema.json"
|
|
737
|
-
],
|
|
738
|
-
"stac_version": "1.0.0",
|
|
739
|
-
"type": "Feature"
|
|
740
|
-
};
|
|
741
|
-
|
|
742
|
-
const res = picture.filterRelatedPicsLinks(f);
|
|
743
|
-
expect(res).toMatchSnapshot();
|
|
744
|
-
});
|
|
745
|
-
});
|