@kalisio/kdk 1.3.5 → 1.4.2
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/.nyc_output/2c5b7c8e-81db-4d2c-a7a4-02dc640d301f.json +1 -0
- package/.nyc_output/{0b8aa700-8daa-49ce-85e7-a8f8965d55f0.json → 2e74ca23-8cf0-4161-9536-f71c2a1a74bb.json} +0 -0
- package/.nyc_output/{20df4355-911a-4b16-a8ab-d3392e9f0a7f.json → 81d21e46-766a-46bc-b1b7-143ca577347a.json} +0 -0
- package/.nyc_output/a762cb58-70dc-4d39-ab69-928635affa98.json +1 -0
- package/.nyc_output/{257af0bb-96c3-465a-b5ef-a1df60078d5f.json → aaf3ebbb-f895-4d7b-9255-bc5dee832570.json} +0 -0
- package/.nyc_output/{284aebfa-23fd-425f-9d72-e4b8904dc224.json → dbeb2602-0ac2-4e66-978b-0d29548359ca.json} +0 -0
- package/.nyc_output/{5cbee06e-be6e-468a-bd78-4793ee785fe4.json → e47d1e4c-2fff-4dcb-908f-d3081162547c.json} +0 -0
- package/.nyc_output/processinfo/{2bece194-92f7-4971-a688-10604044a7fa.json → 2c5b7c8e-81db-4d2c-a7a4-02dc640d301f.json} +1 -1
- package/.nyc_output/processinfo/2e74ca23-8cf0-4161-9536-f71c2a1a74bb.json +1 -0
- package/.nyc_output/processinfo/81d21e46-766a-46bc-b1b7-143ca577347a.json +1 -0
- package/.nyc_output/processinfo/a762cb58-70dc-4d39-ab69-928635affa98.json +1 -0
- package/.nyc_output/processinfo/aaf3ebbb-f895-4d7b-9255-bc5dee832570.json +1 -0
- package/.nyc_output/processinfo/dbeb2602-0ac2-4e66-978b-0d29548359ca.json +1 -0
- package/.nyc_output/processinfo/e47d1e4c-2fff-4dcb-908f-d3081162547c.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/CHANGELOG.md +189 -67
- package/README.md +1 -1
- package/coverage/core/api/application.js.html +145 -145
- package/coverage/core/api/authentication.js.html +37 -37
- package/coverage/core/api/db.js.html +74 -74
- package/coverage/core/api/hooks/hooks.account.js.html +15 -15
- package/coverage/core/api/hooks/hooks.authentication.js.html +16 -16
- package/coverage/core/api/hooks/hooks.authorisations.js.html +112 -121
- package/coverage/core/api/hooks/hooks.devices.js.html +5 -5
- package/coverage/core/api/hooks/hooks.groups.js.html +3 -3
- package/coverage/core/api/hooks/hooks.logger.js.html +7 -7
- package/coverage/core/api/hooks/hooks.model.js.html +149 -149
- package/coverage/core/api/hooks/hooks.organisations.js.html +13 -61
- package/coverage/core/api/hooks/hooks.pusher.js.html +7 -7
- package/coverage/core/api/hooks/hooks.query.js.html +68 -32
- package/coverage/core/api/hooks/hooks.service.js.html +15 -15
- package/coverage/core/api/hooks/hooks.storage.js.html +5 -5
- package/coverage/core/api/hooks/hooks.tags.js.html +7 -7
- package/coverage/core/api/hooks/hooks.users.js.html +111 -63
- package/coverage/core/api/hooks/index.html +72 -72
- package/coverage/core/api/hooks/index.js.html +15 -15
- package/coverage/core/api/index.html +35 -35
- package/coverage/core/api/index.js.html +13 -13
- package/coverage/core/api/marshall.js.html +81 -81
- package/coverage/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/index.html +1 -1
- package/coverage/core/api/models/organisations.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/users.model.mongodb.js.html +7 -7
- package/coverage/core/api/oauth2-handler.js.html +3 -3
- package/coverage/core/api/oauth2-verifier.js.html +5 -5
- package/coverage/core/api/services/account/account.hooks.js.html +1 -1
- package/coverage/core/api/services/account/account.service.js.html +34 -34
- package/coverage/core/api/services/account/index.html +17 -17
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +3 -3
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +40 -37
- package/coverage/core/api/services/authorisations/index.html +17 -17
- package/coverage/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/core/api/services/databases/index.html +1 -1
- package/coverage/core/api/services/devices/devices.hooks.js.html +1 -1
- package/coverage/core/api/services/devices/devices.service.js.html +1 -1
- package/coverage/core/api/services/devices/index.html +1 -1
- package/coverage/core/api/services/groups/groups.hooks.js.html +1 -1
- package/coverage/core/api/services/groups/index.html +1 -1
- package/coverage/core/api/services/index.html +5 -5
- package/coverage/core/api/services/index.js.html +40 -40
- package/coverage/core/api/services/mailer/index.html +1 -1
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/core/api/services/organisations/index.html +1 -1
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/core/api/services/organisations/organisations.service.js.html +1 -1
- package/coverage/core/api/services/pusher/index.html +1 -1
- package/coverage/core/api/services/pusher/pusher.channels.js.html +1 -1
- package/coverage/core/api/services/pusher/pusher.hooks.js.html +1 -1
- package/coverage/core/api/services/pusher/pusher.service.js.html +1 -1
- package/coverage/core/api/services/storage/index.html +1 -1
- package/coverage/core/api/services/storage/storage.hooks.js.html +4 -4
- package/coverage/core/api/services/tags/index.html +1 -1
- package/coverage/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/core/api/services/users/index.html +1 -1
- package/coverage/core/api/services/users/users.hooks.js.html +12 -12
- package/coverage/core/common/index.html +32 -32
- package/coverage/core/common/index.js.html +27 -27
- package/coverage/core/common/permissions.js.html +135 -75
- package/coverage/index.html +157 -157
- package/coverage/lcov-report/core/api/application.js.html +145 -145
- package/coverage/lcov-report/core/api/authentication.js.html +37 -37
- package/coverage/lcov-report/core/api/db.js.html +74 -74
- package/coverage/lcov-report/core/api/hooks/hooks.account.js.html +15 -15
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +16 -16
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +112 -121
- package/coverage/lcov-report/core/api/hooks/hooks.devices.js.html +5 -5
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +3 -3
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +7 -7
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +149 -149
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +13 -61
- package/coverage/lcov-report/core/api/hooks/hooks.pusher.js.html +7 -7
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +68 -32
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +15 -15
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +5 -5
- package/coverage/lcov-report/core/api/hooks/hooks.tags.js.html +7 -7
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +111 -63
- package/coverage/lcov-report/core/api/hooks/index.html +72 -72
- package/coverage/lcov-report/core/api/hooks/index.js.html +15 -15
- package/coverage/lcov-report/core/api/index.html +35 -35
- package/coverage/lcov-report/core/api/index.js.html +13 -13
- package/coverage/lcov-report/core/api/marshall.js.html +81 -81
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/index.html +1 -1
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +7 -7
- package/coverage/lcov-report/core/api/oauth2-handler.js.html +3 -3
- package/coverage/lcov-report/core/api/oauth2-verifier.js.html +5 -5
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +34 -34
- package/coverage/lcov-report/core/api/services/account/index.html +17 -17
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +3 -3
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +40 -37
- package/coverage/lcov-report/core/api/services/authorisations/index.html +17 -17
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/index.html +1 -1
- package/coverage/lcov-report/core/api/services/devices/devices.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/devices/devices.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/devices/index.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/index.html +1 -1
- package/coverage/lcov-report/core/api/services/index.html +5 -5
- package/coverage/lcov-report/core/api/services/index.js.html +40 -40
- package/coverage/lcov-report/core/api/services/mailer/index.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/index.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/pusher/index.html +1 -1
- package/coverage/lcov-report/core/api/services/pusher/pusher.channels.js.html +1 -1
- package/coverage/lcov-report/core/api/services/pusher/pusher.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/pusher/pusher.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/index.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +4 -4
- package/coverage/lcov-report/core/api/services/tags/index.html +1 -1
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/users/index.html +1 -1
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +12 -12
- package/coverage/lcov-report/core/common/index.html +32 -32
- package/coverage/lcov-report/core/common/index.js.html +27 -27
- package/coverage/lcov-report/core/common/permissions.js.html +135 -75
- package/coverage/lcov-report/index.html +157 -157
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +55 -55
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +337 -274
- package/coverage/lcov-report/map/api/hooks/index.html +43 -43
- package/coverage/lcov-report/map/api/hooks/index.js.html +12 -12
- package/coverage/lcov-report/map/api/index.html +31 -31
- package/coverage/lcov-report/map/api/index.js.html +24 -24
- package/coverage/lcov-report/map/api/marshall.js.html +39 -39
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +20 -20
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +22 -22
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +24 -24
- package/coverage/lcov-report/map/api/models/index.html +43 -43
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +21 -21
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +156 -156
- package/coverage/lcov-report/map/api/services/alerts/index.html +30 -30
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +19 -19
- package/coverage/lcov-report/map/api/services/catalog/index.html +17 -17
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/daptiles/index.html +1 -1
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +20 -20
- package/coverage/lcov-report/map/api/services/features/index.html +21 -21
- package/coverage/lcov-report/map/api/services/geocoder/geocoder.hooks.js.html +8 -8
- package/coverage/lcov-report/map/api/services/geocoder/geocoder.service.js.html +99 -99
- package/coverage/lcov-report/map/api/services/geocoder/index.html +28 -28
- package/coverage/lcov-report/map/api/services/index.html +21 -21
- package/coverage/lcov-report/map/api/services/index.js.html +71 -71
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/lcov-report/map/common/errors.js.html +9 -9
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +120 -120
- package/coverage/lcov-report/map/common/grid.js.html +268 -268
- package/coverage/lcov-report/map/common/index.html +149 -149
- package/coverage/lcov-report/map/common/index.js.html +31 -31
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +71 -71
- package/coverage/lcov-report/map/common/moment-utils.js.html +14 -14
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +280 -280
- package/coverage/lcov-report/map/common/opendap-utils.js.html +220 -220
- package/coverage/lcov-report/map/common/permissions.js.html +21 -21
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +51 -51
- package/coverage/lcov-report/map/common/tms-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +99 -99
- package/coverage/lcov-report/map/common/wcs-utils.js.html +66 -66
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +196 -196
- package/coverage/lcov-report/map/common/wfs-utils.js.html +8 -5
- package/coverage/lcov-report/map/common/wms-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/wmts-utils.js.html +71 -11
- package/coverage/lcov.info +3588 -3659
- package/coverage/map/api/hooks/hooks.catalog.js.html +55 -55
- package/coverage/map/api/hooks/hooks.query.js.html +337 -274
- package/coverage/map/api/hooks/index.html +43 -43
- package/coverage/map/api/hooks/index.js.html +12 -12
- package/coverage/map/api/index.html +31 -31
- package/coverage/map/api/index.js.html +24 -24
- package/coverage/map/api/marshall.js.html +39 -39
- package/coverage/map/api/models/alerts.model.mongodb.js.html +20 -20
- package/coverage/map/api/models/catalog.model.mongodb.js.html +22 -22
- package/coverage/map/api/models/features.model.mongodb.js.html +24 -24
- package/coverage/map/api/models/index.html +43 -43
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +21 -21
- package/coverage/map/api/services/alerts/alerts.service.js.html +156 -156
- package/coverage/map/api/services/alerts/index.html +30 -30
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +19 -19
- package/coverage/map/api/services/catalog/index.html +17 -17
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +1 -1
- package/coverage/map/api/services/daptiles/index.html +1 -1
- package/coverage/map/api/services/features/features.hooks.js.html +20 -20
- package/coverage/map/api/services/features/index.html +21 -21
- package/coverage/map/api/services/geocoder/geocoder.hooks.js.html +8 -8
- package/coverage/map/api/services/geocoder/geocoder.service.js.html +99 -99
- package/coverage/map/api/services/geocoder/index.html +28 -28
- package/coverage/map/api/services/index.html +21 -21
- package/coverage/map/api/services/index.js.html +71 -71
- package/coverage/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/map/common/errors.js.html +9 -9
- package/coverage/map/common/geotiff-grid-source.js.html +120 -120
- package/coverage/map/common/grid.js.html +268 -268
- package/coverage/map/common/index.html +149 -149
- package/coverage/map/common/index.js.html +31 -31
- package/coverage/map/common/meteo-model-grid-source.js.html +71 -71
- package/coverage/map/common/moment-utils.js.html +14 -14
- package/coverage/map/common/opendap-grid-source.js.html +280 -280
- package/coverage/map/common/opendap-utils.js.html +220 -220
- package/coverage/map/common/permissions.js.html +21 -21
- package/coverage/map/common/time-based-grid-source.js.html +51 -51
- package/coverage/map/common/tms-utils.js.html +1 -1
- package/coverage/map/common/wcs-grid-source.js.html +99 -99
- package/coverage/map/common/wcs-utils.js.html +66 -66
- package/coverage/map/common/weacast-grid-source.js.html +196 -196
- package/coverage/map/common/wfs-utils.js.html +8 -5
- package/coverage/map/common/wms-utils.js.html +1 -1
- package/coverage/map/common/wmts-utils.js.html +71 -11
- package/extras/icons/kanban.png +0 -0
- package/extras/testcafe/page-models/map/catalog.js +2 -2
- package/extras/tours/core/add-member.js +10 -1
- package/extras/tours/core/{tag-member.js → edit-member-tags.js} +4 -3
- package/extras/tours/core/groups.js +8 -2
- package/extras/tours/core/members.js +11 -21
- package/extras/tours/core/tags.js +7 -1
- package/extras/tours/map/catalog-categories.js +4 -4
- package/extras/tours/map/catalog-panel.js +16 -16
- package/extras/tours/map/favorite-views.js +3 -3
- package/lib/core/api/hooks/hooks.authorisations.js +149 -140
- package/lib/core/api/hooks/hooks.authorisations.js.map +1 -1
- package/lib/core/api/hooks/hooks.organisations.js +1 -23
- package/lib/core/api/hooks/hooks.organisations.js.map +1 -1
- package/lib/core/api/hooks/hooks.query.js +22 -0
- package/lib/core/api/hooks/hooks.query.js.map +1 -1
- package/lib/core/api/hooks/hooks.users.js +34 -18
- package/lib/core/api/hooks/hooks.users.js.map +1 -1
- package/lib/core/api/services/authorisations/authorisations.service.js +34 -25
- package/lib/core/api/services/authorisations/authorisations.service.js.map +1 -1
- package/lib/core/client/api.js +1 -0
- package/lib/core/client/api.js.map +1 -1
- package/lib/core/client/components/account/KAccountDZ.vue +3 -4
- package/lib/core/client/components/account/KAccountDevices.vue +5 -6
- package/lib/core/client/components/account/KDeviceCard.vue +2 -1
- package/lib/core/client/components/account/KIdentityPanel.vue +1 -7
- package/lib/core/client/components/collection/KBoard.vue +26 -155
- package/lib/core/client/components/collection/KCard.vue +144 -42
- package/lib/core/client/components/collection/KCardSection.vue +52 -0
- package/lib/core/client/components/collection/KColumn.vue +181 -0
- package/lib/core/client/components/collection/KGrid.vue +13 -18
- package/lib/core/client/components/collection/KHistory.vue +61 -89
- package/lib/core/client/components/collection/KHistoryEntry.vue +90 -66
- package/lib/core/client/components/collection/KItem.vue +21 -2
- package/lib/core/client/components/collection/KList.vue +9 -12
- package/lib/core/client/components/collection/KTable.vue +33 -39
- package/lib/core/client/components/collection/index.js +6 -1
- package/lib/core/client/components/collection/index.js.map +1 -1
- package/lib/core/client/components/editor/KEditor.vue +0 -6
- package/lib/core/client/components/editor/KModalEditor.vue +4 -4
- package/lib/core/client/components/editor/KSettingsEditor.vue +49 -0
- package/lib/core/client/components/form/KAttachmentField.vue +10 -10
- package/lib/core/client/components/form/KChipsField.vue +28 -23
- package/lib/core/client/components/form/KColorField.vue +30 -25
- package/lib/core/client/components/form/KForm.vue +0 -12
- package/lib/core/client/components/form/KIconField.vue +1 -0
- package/lib/core/client/components/form/KItemField.vue +8 -4
- package/lib/core/client/components/form/KRoleField.vue +56 -0
- package/lib/core/client/components/form/KSelectField.vue +16 -1
- package/lib/core/client/components/form/KView.vue +5 -14
- package/lib/core/client/components/frame/KAction.vue +18 -12
- package/lib/core/client/components/frame/KAvatar.vue +3 -3
- package/lib/core/client/components/frame/KChart.vue +60 -0
- package/lib/core/client/components/frame/KChipsPane.vue +80 -0
- package/lib/core/client/components/frame/KContent.vue +1 -1
- package/lib/core/client/components/frame/KModal.vue +30 -44
- package/lib/core/client/components/frame/KPanel.vue +1 -1
- package/lib/core/client/components/frame/{KMenu.vue → KPopupAction.vue} +6 -7
- package/lib/core/client/components/frame/KSpot.vue +31 -0
- package/lib/core/client/components/frame/KStamp.vue +62 -0
- package/lib/core/client/components/frame/index.js +56 -1
- package/lib/core/client/components/frame/index.js.map +1 -1
- package/lib/core/client/components/input/KColorChooser.vue +16 -8
- package/lib/core/client/components/input/KIconChooser.vue +2 -1
- package/lib/core/client/components/input/KUploader.vue +14 -5
- package/lib/core/client/components/layout/KAbout.vue +9 -3
- package/lib/core/client/components/layout/KFab.vue +1 -1
- package/lib/core/client/components/layout/KPage.vue +44 -19
- package/lib/core/client/components/layout/KTour.vue +2 -2
- package/lib/core/client/components/layout/KWelcome.vue +13 -12
- package/lib/core/client/components/layout/KWindow.vue +1 -1
- package/lib/core/client/components/media/KImageViewer.vue +9 -7
- package/lib/core/client/components/media/KMediaBrowser.vue +12 -8
- package/lib/core/client/components/menu/KMenu.vue +103 -0
- package/lib/core/client/components/team/KAddMember.vue +17 -9
- package/lib/core/client/components/team/KChangeRole.vue +5 -7
- package/lib/core/client/components/team/KGroupCard.vue +34 -51
- package/lib/core/client/components/team/KGroupsActivity.vue +9 -2
- package/lib/core/client/components/team/KJoinGroup.vue +5 -7
- package/lib/core/client/components/team/KMemberCard.vue +104 -63
- package/lib/core/client/components/team/KMembersActivity.vue +9 -2
- package/lib/core/client/components/team/KOrganisationsActivity.vue +8 -1
- package/lib/core/client/components/team/KTagCard.vue +26 -26
- package/lib/core/client/components/team/KTagsActivity.vue +9 -2
- package/lib/core/client/components/time/KTimeRange.vue +144 -0
- package/lib/core/client/components/viewer/KModalViewer.vue +6 -0
- package/lib/core/client/components/viewer/KViewer.vue +0 -6
- package/lib/core/client/i18n/core_en.json +133 -93
- package/lib/core/client/i18n/core_fr.json +56 -16
- package/lib/core/client/index.js +28 -14
- package/lib/core/client/index.js.map +1 -1
- package/lib/core/client/mixins/mixin.authorisation.js +28 -18
- package/lib/core/client/mixins/mixin.authorisation.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-collection.js +57 -9
- package/lib/core/client/mixins/mixin.base-collection.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-context.js +1 -1
- package/lib/core/client/mixins/mixin.base-context.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-editor.js +26 -16
- package/lib/core/client/mixins/mixin.base-editor.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-field.js +0 -4
- package/lib/core/client/mixins/mixin.base-field.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-item.js +29 -14
- package/lib/core/client/mixins/mixin.base-item.js.map +1 -1
- package/lib/core/client/mixins/mixin.base-viewer.js +0 -2
- package/lib/core/client/mixins/mixin.base-viewer.js.map +1 -1
- package/lib/core/client/mixins/mixin.object-proxy.js +17 -3
- package/lib/core/client/mixins/mixin.object-proxy.js.map +1 -1
- package/lib/core/client/mixins/mixin.schema-proxy.js +31 -0
- package/lib/core/client/mixins/mixin.schema-proxy.js.map +1 -1
- package/lib/core/client/mixins/mixin.service.js +5 -33
- package/lib/core/client/mixins/mixin.service.js.map +1 -1
- package/lib/core/client/services/index.js +23 -0
- package/lib/core/client/services/index.js.map +1 -1
- package/lib/core/client/services/local-settings.service.js +4 -0
- package/lib/core/client/services/local-settings.service.js.map +1 -1
- package/lib/core/client/time.js +131 -0
- package/lib/core/client/time.js.map +1 -0
- package/lib/core/common/permissions.js +65 -23
- package/lib/core/common/permissions.js.map +1 -1
- package/lib/core/common/schemas/groups.create.json +1 -1
- package/lib/core/common/schemas/groups.update.json +1 -1
- package/lib/core/common/schemas/organisations.create.json +1 -1
- package/lib/core/common/schemas/organisations.update.json +2 -2
- package/lib/core/common/schemas/settings.update.json +139 -0
- package/lib/core/common/schemas/tags.update.json +9 -1
- package/lib/map/api/hooks/hooks.query.js +48 -27
- package/lib/map/api/hooks/hooks.query.js.map +1 -1
- package/lib/map/api/services/features/features.hooks.js +1 -1
- package/lib/map/api/services/features/features.hooks.js.map +1 -1
- package/lib/map/client/components/KColorLegend.vue +25 -23
- package/lib/map/client/components/KFavoriteViews.vue +71 -35
- package/lib/map/client/components/KFeaturesChart.vue +11 -9
- package/lib/map/client/components/KFeaturesFilter.vue +15 -7
- package/lib/map/client/components/KFeaturesTable.vue +27 -2
- package/lib/map/client/components/KLayerEditionToolbar.vue +43 -0
- package/lib/map/client/components/KLayerStyleEditor.vue +10 -4
- package/lib/map/client/components/KLayerStyleForm.vue +14 -11
- package/lib/map/client/components/KLocationInput.vue +126 -65
- package/lib/map/client/components/KLocationMap.vue +199 -84
- package/lib/map/client/components/KPositionIndicator.vue +1 -0
- package/lib/map/client/components/KTimeline.vue +41 -36
- package/lib/map/client/components/KUrlLegend.vue +21 -19
- package/lib/map/client/components/catalog/KBaseLayersSelector.vue +105 -0
- package/lib/map/client/components/catalog/KCatalog.vue +14 -2
- package/lib/map/client/components/catalog/KConnectLayer.vue +31 -11
- package/lib/map/client/components/catalog/KCreateLayer.vue +37 -14
- package/lib/map/client/components/catalog/KImportLayer.vue +28 -8
- package/lib/map/client/components/catalog/KLayerCategories.vue +86 -62
- package/lib/map/client/components/catalog/KLayersSelector.vue +42 -42
- package/lib/map/client/components/catalog/KWeatherLayersSelector.vue +3 -3
- package/lib/map/client/components/form/KLocationField.vue +1 -1
- package/lib/map/client/components/form/KOwsLayerField.vue +21 -2
- package/lib/map/client/components/form/KOwsServiceField.vue +1 -0
- package/lib/map/client/components/widget/KInformationBox.vue +10 -16
- package/lib/map/client/components/widget/KMapillaryViewer.vue +59 -49
- package/lib/map/client/components/widget/KTimeSeries.vue +39 -29
- package/lib/map/client/i18n/map_en.json +65 -17
- package/lib/map/client/i18n/map_fr.json +67 -20
- package/lib/map/client/init.js +18 -6
- package/lib/map/client/init.js.map +1 -1
- package/lib/map/client/leaflet/GSMaPLayer.js +4 -9
- package/lib/map/client/leaflet/GSMaPLayer.js.map +1 -1
- package/lib/map/client/leaflet/GradientPath.js.map +1 -1
- package/lib/map/client/leaflet/MaskLayer.js +64 -0
- package/lib/map/client/leaflet/MaskLayer.js.map +1 -0
- package/lib/map/client/mixins/globe/mixin.base-globe.js +4 -1
- package/lib/map/client/mixins/globe/mixin.base-globe.js.map +1 -1
- package/lib/map/client/mixins/globe/mixin.geojson-layers.js +7 -9
- package/lib/map/client/mixins/globe/mixin.geojson-layers.js.map +1 -1
- package/lib/map/client/mixins/index.js +8 -13
- package/lib/map/client/mixins/index.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.base-map.js +30 -6
- package/lib/map/client/mixins/map/mixin.base-map.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.canvas-layers.js +274 -51
- package/lib/map/client/mixins/map/mixin.canvas-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.edit-layers.js +218 -121
- package/lib/map/client/mixins/map/mixin.edit-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.file-layers.js +25 -18
- package/lib/map/client/mixins/map/mixin.file-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.geojson-layers.js +18 -10
- package/lib/map/client/mixins/map/mixin.geojson-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.georaster-layers.js +7 -4
- package/lib/map/client/mixins/map/mixin.georaster-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.gsmap-layers.js +3 -3
- package/lib/map/client/mixins/map/mixin.gsmap-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.heatmap-layers.js +8 -10
- package/lib/map/client/mixins/map/mixin.heatmap-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.mapillary-layers.js +25 -40
- package/lib/map/client/mixins/map/mixin.mapillary-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.tiled-mesh-layers.js +5 -3
- package/lib/map/client/mixins/map/mixin.tiled-mesh-layers.js.map +1 -1
- package/lib/map/client/mixins/map/mixin.tiled-wind-layers.js +5 -3
- package/lib/map/client/mixins/map/mixin.tiled-wind-layers.js.map +1 -1
- package/lib/map/client/mixins/mixin.activity.js +60 -68
- package/lib/map/client/mixins/mixin.activity.js.map +1 -1
- package/lib/map/client/mixins/mixin.feature-selection.js +8 -10
- package/lib/map/client/mixins/mixin.feature-selection.js.map +1 -1
- package/lib/map/client/mixins/mixin.feature-service.js +7 -5
- package/lib/map/client/mixins/mixin.feature-service.js.map +1 -1
- package/lib/map/client/mixins/mixin.weacast.js +6 -4
- package/lib/map/client/mixins/mixin.weacast.js.map +1 -1
- package/lib/map/client/pixi-utils.js +9 -0
- package/lib/map/client/pixi-utils.js.map +1 -1
- package/lib/map/client/utils.js +50 -0
- package/lib/map/client/utils.js.map +1 -1
- package/lib/map/common/wfs-utils.js +1 -1
- package/lib/map/common/wfs-utils.js.map +1 -1
- package/lib/map/common/wmts-utils.js +31 -7
- package/lib/map/common/wmts-utils.js.map +1 -1
- package/lib/test/client/core/account.js +100 -0
- package/lib/test/client/core/account.js.map +1 -0
- package/lib/test/client/core/api.js +400 -0
- package/lib/test/client/core/api.js.map +1 -0
- package/lib/test/client/core/collection.js +109 -0
- package/lib/test/client/core/collection.js.map +1 -0
- package/lib/test/client/core/index.js +90 -0
- package/lib/test/client/core/index.js.map +1 -0
- package/lib/test/client/core/layout.js +221 -0
- package/lib/test/client/core/layout.js.map +1 -0
- package/lib/test/client/core/runner.js +204 -0
- package/lib/test/client/core/runner.js.map +1 -0
- package/lib/test/client/core/screens.js +68 -0
- package/lib/test/client/core/screens.js.map +1 -0
- package/lib/test/client/core/utils.js +304 -0
- package/lib/test/client/core/utils.js.map +1 -0
- package/lib/test/client/index.js +20 -0
- package/lib/test/client/index.js.map +1 -0
- package/lib/test/client/map/catalog.js +191 -0
- package/lib/test/client/map/catalog.js.map +1 -0
- package/lib/test/client/map/controls.js +54 -0
- package/lib/test/client/map/controls.js.map +1 -0
- package/lib/test/client/map/index.js +30 -0
- package/lib/test/client/map/index.js.map +1 -0
- package/package.json +17 -9
- package/test.client.js +1 -0
- package/tests/core/test-log-2021-07-15.log +71 -0
- package/tests/core/test-log-2021-09-02.log +47 -0
- package/tests/map/test-log-%DATE%.logYYYY-07-DD +12 -0
- package/tests/map/test-log-%DATE%.logYYYY-09-DD +6 -0
- package/tests/map/test-log-2021-07-12.log +12 -0
- package/tests/map/test-log-2021-07-15.log +5 -0
- package/tests/map/test-log-2021-09-02.log +3 -0
- package/.nyc_output/11cd93d8-69cb-405c-98a3-d249ea35b6da.json +0 -1
- package/.nyc_output/2bece194-92f7-4971-a688-10604044a7fa.json +0 -1
- package/.nyc_output/5ddee33e-b658-4c8e-a247-54f575ac67e8.json +0 -1
- package/.nyc_output/78760ae4-555f-4d9c-a6a1-acf5e2f0fe45.json +0 -1
- package/.nyc_output/d0bb2559-084e-4c92-b9e6-29a9abd41f7c.json +0 -1
- package/.nyc_output/processinfo/0b8aa700-8daa-49ce-85e7-a8f8965d55f0.json +0 -1
- package/.nyc_output/processinfo/11cd93d8-69cb-405c-98a3-d249ea35b6da.json +0 -1
- package/.nyc_output/processinfo/20df4355-911a-4b16-a8ab-d3392e9f0a7f.json +0 -1
- package/.nyc_output/processinfo/257af0bb-96c3-465a-b5ef-a1df60078d5f.json +0 -1
- package/.nyc_output/processinfo/284aebfa-23fd-425f-9d72-e4b8904dc224.json +0 -1
- package/.nyc_output/processinfo/5cbee06e-be6e-468a-bd78-4793ee785fe4.json +0 -1
- package/.nyc_output/processinfo/5ddee33e-b658-4c8e-a247-54f575ac67e8.json +0 -1
- package/.nyc_output/processinfo/78760ae4-555f-4d9c-a6a1-acf5e2f0fe45.json +0 -1
- package/.nyc_output/processinfo/d0bb2559-084e-4c92-b9e6-29a9abd41f7c.json +0 -1
- package/lib/core/client/components/frame/KLabel.vue +0 -56
- package/lib/core/client/components/team/KTagsPane.vue +0 -35
- package/lib/map/client/leaflet/TiledMapillaryLayer.js +0 -137
- package/lib/map/client/leaflet/TiledMapillaryLayer.js.map +0 -1
- package/lib/map/client/mixins/mixin.time.js +0 -73
- package/lib/map/client/mixins/mixin.time.js.map +0 -1
- package/tests/core/account.test.js +0 -415
- package/tests/core/client.test.js.skip +0 -37
- package/tests/core/config/default.js +0 -97
- package/tests/core/config/email-templates/confirmInvitation/html.ejs +0 -18
- package/tests/core/config/email-templates/identityChange/html.ejs +0 -12
- package/tests/core/config/email-templates/newDevice/html.ejs +0 -7
- package/tests/core/config/email-templates/passwordChange/html.ejs +0 -5
- package/tests/core/config/email-templates/resendVerifySignup/html.ejs +0 -10
- package/tests/core/config/email-templates/resetPwd/html.ejs +0 -5
- package/tests/core/config/email-templates/sendResetPwd/html.ejs +0 -8
- package/tests/core/config/email-templates/verifySignup/html.ejs +0 -3
- package/tests/core/data/10k_most_common_passwords.txt +0 -10000
- package/tests/core/data/logo.png +0 -0
- package/tests/core/hooks.test.js +0 -175
- package/tests/core/index.test.js +0 -418
- package/tests/core/notifications.test.js +0 -465
- package/tests/core/storage.test.js +0 -134
- package/tests/core/team.test.js +0 -610
- package/tests/core/utils.js +0 -59
- package/tests/map/alerts.test.js +0 -554
- package/tests/map/config/default.js +0 -112
- package/tests/map/config/layers.json +0 -37
- package/tests/map/daptiles.test.js +0 -41
- package/tests/map/data/DescribeCoverage.xml +0 -55
- package/tests/map/data/GetCoverage.tif +0 -0
- package/tests/map/data/adsb.observations.json +0 -132
- package/tests/map/data/dataset.grb.das +0 -55
- package/tests/map/data/dataset.grb.dds +0 -17
- package/tests/map/data/dataset.grb.dods +0 -0
- package/tests/map/data/lat_lon_bounds.grb.dods +0 -0
- package/tests/map/data/subdataset.grb.dods +0 -0
- package/tests/map/data/vigicrues.observations.json +0 -47042
- package/tests/map/data/vigicrues.stations.json +0 -15422
- package/tests/map/data/zones.json +0 -1228
- package/tests/map/grid-sources.test.js +0 -304
- package/tests/map/hooks.test.js +0 -96
- package/tests/map/index.test.js +0 -333
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>0/188</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>0/86</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>0/48</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>0/166</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -439,47 +439,47 @@
|
|
|
439
439
|
<a name='L380'></a><a href='#L380'>380</a>
|
|
440
440
|
<a name='L381'></a><a href='#L381'>381</a>
|
|
441
441
|
<a name='L382'></a><a href='#L382'>382</a>
|
|
442
|
-
<a name='L383'></a><a href='#L383'>383</a></td><td class="line-coverage quiet"><span class="cline-any cline-
|
|
442
|
+
<a name='L383'></a><a href='#L383'>383</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
443
443
|
<span class="cline-any cline-neutral"> </span>
|
|
444
|
-
<span class="cline-any cline-
|
|
444
|
+
<span class="cline-any cline-no"> </span>
|
|
445
445
|
<span class="cline-any cline-neutral"> </span>
|
|
446
446
|
<span class="cline-any cline-neutral"> </span>
|
|
447
447
|
<span class="cline-any cline-neutral"> </span>
|
|
448
448
|
<span class="cline-any cline-neutral"> </span>
|
|
449
|
-
<span class="cline-any cline-
|
|
450
|
-
<span class="cline-any cline-
|
|
449
|
+
<span class="cline-any cline-no"> </span>
|
|
450
|
+
<span class="cline-any cline-no"> </span>
|
|
451
451
|
<span class="cline-any cline-neutral"> </span>
|
|
452
452
|
<span class="cline-any cline-neutral"> </span>
|
|
453
453
|
<span class="cline-any cline-neutral"> </span>
|
|
454
454
|
<span class="cline-any cline-neutral"> </span>
|
|
455
455
|
<span class="cline-any cline-neutral"> </span>
|
|
456
|
-
<span class="cline-any cline-
|
|
457
|
-
<span class="cline-any cline-
|
|
458
|
-
<span class="cline-any cline-
|
|
459
|
-
<span class="cline-any cline-
|
|
460
|
-
<span class="cline-any cline-
|
|
456
|
+
<span class="cline-any cline-no"> </span>
|
|
457
|
+
<span class="cline-any cline-no"> </span>
|
|
458
|
+
<span class="cline-any cline-no"> </span>
|
|
459
|
+
<span class="cline-any cline-no"> </span>
|
|
460
|
+
<span class="cline-any cline-no"> </span>
|
|
461
461
|
<span class="cline-any cline-neutral"> </span>
|
|
462
|
-
<span class="cline-any cline-
|
|
462
|
+
<span class="cline-any cline-no"> </span>
|
|
463
463
|
<span class="cline-any cline-no"> </span>
|
|
464
464
|
<span class="cline-any cline-neutral"> </span>
|
|
465
|
-
<span class="cline-any cline-
|
|
465
|
+
<span class="cline-any cline-no"> </span>
|
|
466
466
|
<span class="cline-any cline-no"> </span>
|
|
467
467
|
<span class="cline-any cline-neutral"> </span>
|
|
468
|
-
<span class="cline-any cline-
|
|
468
|
+
<span class="cline-any cline-no"> </span>
|
|
469
469
|
<span class="cline-any cline-no"> </span>
|
|
470
470
|
<span class="cline-any cline-neutral"> </span>
|
|
471
471
|
<span class="cline-any cline-neutral"> </span>
|
|
472
472
|
<span class="cline-any cline-neutral"> </span>
|
|
473
473
|
<span class="cline-any cline-neutral"> </span>
|
|
474
|
-
<span class="cline-any cline-
|
|
474
|
+
<span class="cline-any cline-no"> </span>
|
|
475
475
|
<span class="cline-any cline-neutral"> </span>
|
|
476
476
|
<span class="cline-any cline-neutral"> </span>
|
|
477
477
|
<span class="cline-any cline-neutral"> </span>
|
|
478
|
-
<span class="cline-any cline-
|
|
478
|
+
<span class="cline-any cline-no"> </span>
|
|
479
479
|
<span class="cline-any cline-neutral"> </span>
|
|
480
480
|
<span class="cline-any cline-neutral"> </span>
|
|
481
481
|
<span class="cline-any cline-neutral"> </span>
|
|
482
|
-
<span class="cline-any cline-
|
|
482
|
+
<span class="cline-any cline-no"> </span>
|
|
483
483
|
<span class="cline-any cline-neutral"> </span>
|
|
484
484
|
<span class="cline-any cline-neutral"> </span>
|
|
485
485
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -576,8 +576,8 @@
|
|
|
576
576
|
<span class="cline-any cline-neutral"> </span>
|
|
577
577
|
<span class="cline-any cline-neutral"> </span>
|
|
578
578
|
<span class="cline-any cline-neutral"> </span>
|
|
579
|
-
<span class="cline-any cline-
|
|
580
|
-
<span class="cline-any cline-
|
|
579
|
+
<span class="cline-any cline-no"> </span>
|
|
580
|
+
<span class="cline-any cline-no"> </span>
|
|
581
581
|
<span class="cline-any cline-neutral"> </span>
|
|
582
582
|
<span class="cline-any cline-neutral"> </span>
|
|
583
583
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -607,11 +607,11 @@
|
|
|
607
607
|
<span class="cline-any cline-neutral"> </span>
|
|
608
608
|
<span class="cline-any cline-neutral"> </span>
|
|
609
609
|
<span class="cline-any cline-neutral"> </span>
|
|
610
|
-
<span class="cline-any cline-
|
|
610
|
+
<span class="cline-any cline-neutral"> </span>
|
|
611
611
|
<span class="cline-any cline-no"> </span>
|
|
612
612
|
<span class="cline-any cline-neutral"> </span>
|
|
613
613
|
<span class="cline-any cline-neutral"> </span>
|
|
614
|
-
<span class="cline-any cline-
|
|
614
|
+
<span class="cline-any cline-neutral"> </span>
|
|
615
615
|
<span class="cline-any cline-no"> </span>
|
|
616
616
|
<span class="cline-any cline-neutral"> </span>
|
|
617
617
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -627,34 +627,34 @@
|
|
|
627
627
|
<span class="cline-any cline-neutral"> </span>
|
|
628
628
|
<span class="cline-any cline-neutral"> </span>
|
|
629
629
|
<span class="cline-any cline-neutral"> </span>
|
|
630
|
-
<span class="cline-any cline-
|
|
631
|
-
<span class="cline-any cline-
|
|
632
|
-
<span class="cline-any cline-
|
|
630
|
+
<span class="cline-any cline-no"> </span>
|
|
631
|
+
<span class="cline-any cline-no"> </span>
|
|
632
|
+
<span class="cline-any cline-no"> </span>
|
|
633
633
|
<span class="cline-any cline-no"> </span>
|
|
634
634
|
<span class="cline-any cline-neutral"> </span>
|
|
635
635
|
<span class="cline-any cline-neutral"> </span>
|
|
636
636
|
<span class="cline-any cline-neutral"> </span>
|
|
637
637
|
<span class="cline-any cline-neutral"> </span>
|
|
638
|
-
<span class="cline-any cline-
|
|
638
|
+
<span class="cline-any cline-no"> </span>
|
|
639
639
|
<span class="cline-any cline-neutral"> </span>
|
|
640
640
|
<span class="cline-any cline-neutral"> </span>
|
|
641
641
|
<span class="cline-any cline-neutral"> </span>
|
|
642
642
|
<span class="cline-any cline-neutral"> </span>
|
|
643
|
-
<span class="cline-any cline-
|
|
644
|
-
<span class="cline-any cline-
|
|
643
|
+
<span class="cline-any cline-no"> </span>
|
|
644
|
+
<span class="cline-any cline-no"> </span>
|
|
645
645
|
<span class="cline-any cline-no"> </span>
|
|
646
646
|
<span class="cline-any cline-neutral"> </span>
|
|
647
647
|
<span class="cline-any cline-neutral"> </span>
|
|
648
648
|
<span class="cline-any cline-neutral"> </span>
|
|
649
|
-
<span class="cline-any cline-
|
|
650
|
-
<span class="cline-any cline-
|
|
651
|
-
<span class="cline-any cline-
|
|
649
|
+
<span class="cline-any cline-no"> </span>
|
|
650
|
+
<span class="cline-any cline-no"> </span>
|
|
651
|
+
<span class="cline-any cline-no"> </span>
|
|
652
652
|
<span class="cline-any cline-neutral"> </span>
|
|
653
653
|
<span class="cline-any cline-no"> </span>
|
|
654
654
|
<span class="cline-any cline-neutral"> </span>
|
|
655
655
|
<span class="cline-any cline-neutral"> </span>
|
|
656
656
|
<span class="cline-any cline-neutral"> </span>
|
|
657
|
-
<span class="cline-any cline-
|
|
657
|
+
<span class="cline-any cline-no"> </span>
|
|
658
658
|
<span class="cline-any cline-neutral"> </span>
|
|
659
659
|
<span class="cline-any cline-no"> </span>
|
|
660
660
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -669,21 +669,21 @@
|
|
|
669
669
|
<span class="cline-any cline-neutral"> </span>
|
|
670
670
|
<span class="cline-any cline-no"> </span>
|
|
671
671
|
<span class="cline-any cline-neutral"> </span>
|
|
672
|
-
<span class="cline-any cline-
|
|
672
|
+
<span class="cline-any cline-no"> </span>
|
|
673
673
|
<span class="cline-any cline-neutral"> </span>
|
|
674
674
|
<span class="cline-any cline-no"> </span>
|
|
675
675
|
<span class="cline-any cline-neutral"> </span>
|
|
676
676
|
<span class="cline-any cline-neutral"> </span>
|
|
677
677
|
<span class="cline-any cline-neutral"> </span>
|
|
678
678
|
<span class="cline-any cline-neutral"> </span>
|
|
679
|
-
<span class="cline-any cline-
|
|
679
|
+
<span class="cline-any cline-no"> </span>
|
|
680
680
|
<span class="cline-any cline-neutral"> </span>
|
|
681
|
-
<span class="cline-any cline-
|
|
681
|
+
<span class="cline-any cline-no"> </span>
|
|
682
682
|
<span class="cline-any cline-neutral"> </span>
|
|
683
|
-
<span class="cline-any cline-
|
|
684
|
-
<span class="cline-any cline-
|
|
683
|
+
<span class="cline-any cline-no"> </span>
|
|
684
|
+
<span class="cline-any cline-no"> </span>
|
|
685
685
|
<span class="cline-any cline-neutral"> </span>
|
|
686
|
-
<span class="cline-any cline-
|
|
686
|
+
<span class="cline-any cline-no"> </span>
|
|
687
687
|
<span class="cline-any cline-no"> </span>
|
|
688
688
|
<span class="cline-any cline-no"> </span>
|
|
689
689
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -691,12 +691,12 @@
|
|
|
691
691
|
<span class="cline-any cline-neutral"> </span>
|
|
692
692
|
<span class="cline-any cline-neutral"> </span>
|
|
693
693
|
<span class="cline-any cline-neutral"> </span>
|
|
694
|
-
<span class="cline-any cline-
|
|
694
|
+
<span class="cline-any cline-no"> </span>
|
|
695
695
|
<span class="cline-any cline-neutral"> </span>
|
|
696
696
|
<span class="cline-any cline-neutral"> </span>
|
|
697
697
|
<span class="cline-any cline-neutral"> </span>
|
|
698
698
|
<span class="cline-any cline-neutral"> </span>
|
|
699
|
-
<span class="cline-any cline-
|
|
699
|
+
<span class="cline-any cline-no"> </span>
|
|
700
700
|
<span class="cline-any cline-neutral"> </span>
|
|
701
701
|
<span class="cline-any cline-no"> </span>
|
|
702
702
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -718,13 +718,13 @@
|
|
|
718
718
|
<span class="cline-any cline-neutral"> </span>
|
|
719
719
|
<span class="cline-any cline-neutral"> </span>
|
|
720
720
|
<span class="cline-any cline-neutral"> </span>
|
|
721
|
-
<span class="cline-any cline-
|
|
722
|
-
<span class="cline-any cline-
|
|
721
|
+
<span class="cline-any cline-no"> </span>
|
|
722
|
+
<span class="cline-any cline-no"> </span>
|
|
723
723
|
<span class="cline-any cline-neutral"> </span>
|
|
724
|
-
<span class="cline-any cline-
|
|
725
|
-
<span class="cline-any cline-
|
|
724
|
+
<span class="cline-any cline-no"> </span>
|
|
725
|
+
<span class="cline-any cline-no"> </span>
|
|
726
726
|
<span class="cline-any cline-neutral"> </span>
|
|
727
|
-
<span class="cline-any cline-
|
|
727
|
+
<span class="cline-any cline-no"> </span>
|
|
728
728
|
<span class="cline-any cline-no"> </span>
|
|
729
729
|
<span class="cline-any cline-no"> </span>
|
|
730
730
|
<span class="cline-any cline-no"> </span>
|
|
@@ -743,38 +743,38 @@
|
|
|
743
743
|
<span class="cline-any cline-neutral"> </span>
|
|
744
744
|
<span class="cline-any cline-neutral"> </span>
|
|
745
745
|
<span class="cline-any cline-neutral"> </span>
|
|
746
|
-
<span class="cline-any cline-
|
|
747
|
-
<span class="cline-any cline-
|
|
748
|
-
<span class="cline-any cline-
|
|
749
|
-
<span class="cline-any cline-
|
|
746
|
+
<span class="cline-any cline-no"> </span>
|
|
747
|
+
<span class="cline-any cline-no"> </span>
|
|
748
|
+
<span class="cline-any cline-no"> </span>
|
|
749
|
+
<span class="cline-any cline-no"> </span>
|
|
750
750
|
<span class="cline-any cline-neutral"> </span>
|
|
751
|
-
<span class="cline-any cline-
|
|
752
|
-
<span class="cline-any cline-
|
|
753
|
-
<span class="cline-any cline-
|
|
751
|
+
<span class="cline-any cline-no"> </span>
|
|
752
|
+
<span class="cline-any cline-no"> </span>
|
|
753
|
+
<span class="cline-any cline-no"> </span>
|
|
754
754
|
<span class="cline-any cline-neutral"> </span>
|
|
755
|
-
<span class="cline-any cline-
|
|
755
|
+
<span class="cline-any cline-no"> </span>
|
|
756
756
|
<span class="cline-any cline-neutral"> </span>
|
|
757
|
-
<span class="cline-any cline-
|
|
758
|
-
<span class="cline-any cline-
|
|
757
|
+
<span class="cline-any cline-no"> </span>
|
|
758
|
+
<span class="cline-any cline-no"> </span>
|
|
759
759
|
<span class="cline-any cline-no"> </span>
|
|
760
760
|
<span class="cline-any cline-neutral"> </span>
|
|
761
761
|
<span class="cline-any cline-neutral"> </span>
|
|
762
762
|
<span class="cline-any cline-neutral"> </span>
|
|
763
|
-
<span class="cline-any cline-
|
|
764
|
-
<span class="cline-any cline-
|
|
765
|
-
<span class="cline-any cline-
|
|
766
|
-
<span class="cline-any cline-
|
|
767
|
-
<span class="cline-any cline-
|
|
763
|
+
<span class="cline-any cline-no"> </span>
|
|
764
|
+
<span class="cline-any cline-no"> </span>
|
|
765
|
+
<span class="cline-any cline-no"> </span>
|
|
766
|
+
<span class="cline-any cline-no"> </span>
|
|
767
|
+
<span class="cline-any cline-no"> </span>
|
|
768
768
|
<span class="cline-any cline-neutral"> </span>
|
|
769
769
|
<span class="cline-any cline-neutral"> </span>
|
|
770
|
-
<span class="cline-any cline-
|
|
771
|
-
<span class="cline-any cline-
|
|
770
|
+
<span class="cline-any cline-no"> </span>
|
|
771
|
+
<span class="cline-any cline-no"> </span>
|
|
772
772
|
<span class="cline-any cline-neutral"> </span>
|
|
773
|
-
<span class="cline-any cline-
|
|
773
|
+
<span class="cline-any cline-no"> </span>
|
|
774
774
|
<span class="cline-any cline-neutral"> </span>
|
|
775
|
-
<span class="cline-any cline-
|
|
776
|
-
<span class="cline-any cline-
|
|
777
|
-
<span class="cline-any cline-
|
|
775
|
+
<span class="cline-any cline-no"> </span>
|
|
776
|
+
<span class="cline-any cline-no"> </span>
|
|
777
|
+
<span class="cline-any cline-no"> </span>
|
|
778
778
|
<span class="cline-any cline-neutral"> </span>
|
|
779
779
|
<span class="cline-any cline-neutral"> </span>
|
|
780
780
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -782,24 +782,24 @@
|
|
|
782
782
|
<span class="cline-any cline-neutral"> </span>
|
|
783
783
|
<span class="cline-any cline-neutral"> </span>
|
|
784
784
|
<span class="cline-any cline-neutral"> </span>
|
|
785
|
-
<span class="cline-any cline-
|
|
785
|
+
<span class="cline-any cline-no"> </span>
|
|
786
786
|
<span class="cline-any cline-neutral"> </span>
|
|
787
787
|
<span class="cline-any cline-neutral"> </span>
|
|
788
788
|
<span class="cline-any cline-neutral"> </span>
|
|
789
789
|
<span class="cline-any cline-neutral"> </span>
|
|
790
790
|
<span class="cline-any cline-neutral"> </span>
|
|
791
|
-
<span class="cline-any cline-
|
|
792
|
-
<span class="cline-any cline-
|
|
793
|
-
<span class="cline-any cline-
|
|
794
|
-
<span class="cline-any cline-
|
|
795
|
-
<span class="cline-any cline-
|
|
791
|
+
<span class="cline-any cline-no"> </span>
|
|
792
|
+
<span class="cline-any cline-no"> </span>
|
|
793
|
+
<span class="cline-any cline-no"> </span>
|
|
794
|
+
<span class="cline-any cline-no"> </span>
|
|
795
|
+
<span class="cline-any cline-no"> </span>
|
|
796
796
|
<span class="cline-any cline-neutral"> </span>
|
|
797
797
|
<span class="cline-any cline-neutral"> </span>
|
|
798
|
-
<span class="cline-any cline-
|
|
798
|
+
<span class="cline-any cline-no"> </span>
|
|
799
799
|
<span class="cline-any cline-no"> </span>
|
|
800
800
|
<span class="cline-any cline-neutral"> </span>
|
|
801
801
|
<span class="cline-any cline-neutral"> </span>
|
|
802
|
-
<span class="cline-any cline-
|
|
802
|
+
<span class="cline-any cline-no"> </span>
|
|
803
803
|
<span class="cline-any cline-neutral"> </span>
|
|
804
804
|
<span class="cline-any cline-neutral"> </span>
|
|
805
805
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -823,61 +823,61 @@
|
|
|
823
823
|
<span class="cline-any cline-neutral"> </span>
|
|
824
824
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import _ from 'lodash'
|
|
825
825
|
|
|
826
|
-
export const SortOrder = {
|
|
826
|
+
export const SortOrder = <span class="cstat-no" title="statement not covered" >{</span>
|
|
827
827
|
ASCENDING: 0,
|
|
828
828
|
DESCENDING: 1
|
|
829
829
|
}
|
|
830
830
|
|
|
831
|
-
export const gridSourceFactories = { }
|
|
832
|
-
export const unitConverters = { }
|
|
831
|
+
export const gridSourceFactories = <span class="cstat-no" title="statement not covered" >{ }</span>
|
|
832
|
+
export const unitConverters = <span class="cstat-no" title="statement not covered" >{ }</span>
|
|
833
833
|
|
|
834
834
|
// Base 2d grid class
|
|
835
835
|
// TODO: add interpolate/bilinearInterpolate and other missing stuff from weacast grid
|
|
836
836
|
export class BaseGrid {
|
|
837
|
-
|
|
838
|
-
this.sourceKey = sourceKey
|
|
839
|
-
this.bbox = bbox
|
|
840
|
-
this.dimensions = dimensions
|
|
841
|
-
this.resolution = [(bbox[2] - bbox[0]) / (dimensions[0] - 1), (bbox[3] - bbox[1]) / (dimensions[1] - 1)]
|
|
842
|
-
this.nodata = nodata
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
837
|
+
<span class="fstat-no" title="function not covered" > co</span>nstructor (sourceKey, bbox, dimensions, nodata) {
|
|
838
|
+
<span class="cstat-no" title="statement not covered" > this.sourceKey = sourceKey</span>
|
|
839
|
+
<span class="cstat-no" title="statement not covered" > this.bbox = bbox</span>
|
|
840
|
+
<span class="cstat-no" title="statement not covered" > this.dimensions = dimensions</span>
|
|
841
|
+
<span class="cstat-no" title="statement not covered" > this.resolution = [(bbox[2] - bbox[0]) / (dimensions[0] - 1), (bbox[3] - bbox[1]) / (dimensions[1] - 1)]</span>
|
|
842
|
+
<span class="cstat-no" title="statement not covered" > this.nodata = nodata</span>
|
|
843
|
+
|
|
844
|
+
<span class="cstat-no" title="statement not covered" > if (this.bbox[0] >= this.bbox[2] || this.bbox[1] >= this.bbox[3]) {</span>
|
|
845
|
+
<span class="cstat-no" title="statement not covered" > throw new Error('Grid bbox seems weird')</span>
|
|
846
846
|
}
|
|
847
|
-
|
|
848
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
847
|
+
<span class="cstat-no" title="statement not covered" > if (this.dimensions[0] <= 0 || this.dimensions[1] <= 0) {</span>
|
|
848
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("Grid dimension is < 0, something's wrong")</span>
|
|
849
849
|
}
|
|
850
|
-
|
|
851
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
850
|
+
<span class="cstat-no" title="statement not covered" > if (this.resolution[0] <= 0.0 || this.resolution[1] <= 0.0) {</span>
|
|
851
|
+
<span class="cstat-no" title="statement not covered" > throw new Error("Grid resolution is < 0, something's wrong")</span>
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
854
|
|
|
855
|
-
|
|
856
|
-
return this.dimensions
|
|
855
|
+
<span class="fstat-no" title="function not covered" > ge</span>tDimensions () {
|
|
856
|
+
<span class="cstat-no" title="statement not covered" > return this.dimensions</span>
|
|
857
857
|
}
|
|
858
858
|
|
|
859
|
-
|
|
860
|
-
return this.resolution
|
|
859
|
+
<span class="fstat-no" title="function not covered" > ge</span>tResolution () {
|
|
860
|
+
<span class="cstat-no" title="statement not covered" > return this.resolution</span>
|
|
861
861
|
}
|
|
862
862
|
|
|
863
|
-
|
|
864
|
-
return this.bbox
|
|
863
|
+
<span class="fstat-no" title="function not covered" > ge</span>tBBox () {
|
|
864
|
+
<span class="cstat-no" title="statement not covered" > return this.bbox</span>
|
|
865
865
|
}
|
|
866
866
|
|
|
867
|
-
<span class="fstat-no" title="function not covered" >
|
|
868
|
-
<span class="cstat-no" title="statement not covered" > for (let ilat = <span class="cstat-no" title="statement not covered" >0
|
|
869
|
-
<span class="cstat-no" title="statement not covered" > for (let ilon = <span class="cstat-no" title="statement not covered" >0
|
|
870
|
-
const value = <span class="cstat-no" title="statement not covered" >this.
|
|
871
|
-
<span class="cstat-no" title="statement not covered" > if (value !== this.nodata) { <span class="cstat-no" title="statement not covered" >return
|
|
867
|
+
<span class="fstat-no" title="function not covered" > ha</span>sData () {
|
|
868
|
+
<span class="cstat-no" title="statement not covered" > for (let ilat = <span class="cstat-no" title="statement not covered" >0;</span> ilat < this.dimensions[0]; ++ilat) {</span>
|
|
869
|
+
<span class="cstat-no" title="statement not covered" > for (let ilon = <span class="cstat-no" title="statement not covered" >0;</span> ilon < this.dimensions[1]; ++ilon) {</span>
|
|
870
|
+
const value = <span class="cstat-no" title="statement not covered" >this.getValue(ilat, ilon)</span>
|
|
871
|
+
<span class="cstat-no" title="statement not covered" > if (value !== this.nodata) { <span class="cstat-no" title="statement not covered" >return true </span>}</span>
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
874
|
|
|
875
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
875
|
+
<span class="cstat-no" title="statement not covered" > return false</span>
|
|
876
876
|
}
|
|
877
877
|
|
|
878
|
-
<span class="fstat-no" title="function not covered" >
|
|
878
|
+
<span class="fstat-no" title="function not covered" > ge</span>tDataBounds () {
|
|
879
879
|
// if already computed, return
|
|
880
|
-
<span class="cstat-no" title="statement not covered" > if (this.dataBounds) { <span class="cstat-no" title="statement not covered" >return
|
|
880
|
+
<span class="cstat-no" title="statement not covered" > if (this.dataBounds) { <span class="cstat-no" title="statement not covered" >return this.dataBounds </span>}</span>
|
|
881
881
|
|
|
882
882
|
// find initial value (!= nodata)
|
|
883
883
|
let ilat = <span class="cstat-no" title="statement not covered" >0</span>
|
|
@@ -885,278 +885,278 @@ export class BaseGrid {
|
|
|
885
885
|
let minVal; let maxVal
|
|
886
886
|
<span class="cstat-no" title="statement not covered" > for (; ilat < this.dimensions[0] && maxVal === undefined; ++ilat) {</span>
|
|
887
887
|
<span class="cstat-no" title="statement not covered" > for (; ilon < this.dimensions[1] && maxVal === undefined; ++ilon) {</span>
|
|
888
|
-
const value = <span class="cstat-no" title="statement not covered" >this.
|
|
889
|
-
<span class="cstat-no" title="statement not covered" > if (value === this.nodata) { <span class="cstat-no" title="statement not covered" >continue }</span
|
|
890
|
-
<span class="cstat-no" title="statement not covered" > minVal =
|
|
888
|
+
const value = <span class="cstat-no" title="statement not covered" >this.getValue(ilat, ilon)</span>
|
|
889
|
+
<span class="cstat-no" title="statement not covered" > if (value === this.nodata) { <span class="cstat-no" title="statement not covered" >continue </span>}</span>
|
|
890
|
+
<span class="cstat-no" title="statement not covered" > minVal = maxVal = value</span>
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
893
|
|
|
894
894
|
// scan through data set
|
|
895
895
|
<span class="cstat-no" title="statement not covered" > for (; ilat < this.dimensions[0]; ++ilat) {</span>
|
|
896
896
|
<span class="cstat-no" title="statement not covered" > for (; ilon < this.dimensions[1]; ++ilon) {</span>
|
|
897
|
-
const value = <span class="cstat-no" title="statement not covered" >this.
|
|
898
|
-
<span class="cstat-no" title="statement not covered" > if (value === this.nodata) { <span class="cstat-no" title="statement not covered" >continue }</span
|
|
897
|
+
const value = <span class="cstat-no" title="statement not covered" >this.getValue(ilat, ilon)</span>
|
|
898
|
+
<span class="cstat-no" title="statement not covered" > if (value === this.nodata) { <span class="cstat-no" title="statement not covered" >continue </span>}</span>
|
|
899
899
|
|
|
900
|
-
<span class="cstat-no" title="statement not covered" > minVal =
|
|
901
|
-
<span class="cstat-no" title="statement not covered" > maxVal =
|
|
900
|
+
<span class="cstat-no" title="statement not covered" > minVal = Math.min(minVal, value)</span>
|
|
901
|
+
<span class="cstat-no" title="statement not covered" > maxVal = Math.max(maxVal, value)</span>
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
-
<span class="cstat-no" title="statement not covered" > this.
|
|
906
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
905
|
+
<span class="cstat-no" title="statement not covered" > this.dataBounds = [minVal, maxVal]</span>
|
|
906
|
+
<span class="cstat-no" title="statement not covered" > return this.dataBounds</span>
|
|
907
907
|
}
|
|
908
908
|
|
|
909
|
-
<span class="fstat-no" title="function not covered" >
|
|
910
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
909
|
+
<span class="fstat-no" title="function not covered" > ge</span>tLat (ilat) {
|
|
910
|
+
<span class="cstat-no" title="statement not covered" > return this.bbox[0] + (ilat * this.resolution[0])</span>
|
|
911
911
|
}
|
|
912
912
|
|
|
913
|
-
<span class="fstat-no" title="function not covered" >
|
|
914
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
913
|
+
<span class="fstat-no" title="function not covered" > ge</span>tLon (ilon) {
|
|
914
|
+
<span class="cstat-no" title="statement not covered" > return this.bbox[1] + (ilon * this.resolution[1])</span>
|
|
915
915
|
}
|
|
916
916
|
|
|
917
|
-
<span class="fstat-no" title="function not covered" >
|
|
918
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
917
|
+
<span class="fstat-no" title="function not covered" > ge</span>tValue (ilat, ilon) {
|
|
918
|
+
<span class="cstat-no" title="statement not covered" > throw new Error('Not implemented')</span>
|
|
919
919
|
}
|
|
920
920
|
|
|
921
|
-
<span class="fstat-no" title="function not covered" >
|
|
922
|
-
<span class="cstat-no" title="statement not covered" > if (lat < this.bbox[0] || lat > this.bbox[2] || lon < this.bbox[1] || lon > this.bbox[2]) { <span class="cstat-no" title="statement not covered" >return
|
|
921
|
+
<span class="fstat-no" title="function not covered" > ge</span>tIndices (lat, lon) {
|
|
922
|
+
<span class="cstat-no" title="statement not covered" > if (lat < this.bbox[0] || lat > this.bbox[2] || lon < this.bbox[1] || lon > this.bbox[2]) { <span class="cstat-no" title="statement not covered" >return null </span>}</span>
|
|
923
923
|
|
|
924
|
-
const ilat = <span class="cstat-no" title="statement not covered" >(lat - this.bbox[0]) / this.
|
|
925
|
-
const ilon = <span class="cstat-no" title="statement not covered" >(lon - this.bbox[1]) / this.
|
|
924
|
+
const ilat = <span class="cstat-no" title="statement not covered" >(lat - this.bbox[0]) / this.resolution[0]</span>
|
|
925
|
+
const ilon = <span class="cstat-no" title="statement not covered" >(lon - this.bbox[1]) / this.resolution[1]</span>
|
|
926
926
|
|
|
927
|
-
<span class="cstat-no" title="statement not covered" > return [
|
|
927
|
+
<span class="cstat-no" title="statement not covered" > return [Math.floor(ilat), Math.floor(ilon)]</span>
|
|
928
928
|
}
|
|
929
929
|
|
|
930
|
-
<span class="fstat-no" title="function not covered" >
|
|
930
|
+
<span class="fstat-no" title="function not covered" > ge</span>tBestFit (fitBbox) {
|
|
931
931
|
let iminlat = <span class="cstat-no" title="statement not covered" >-1</span>
|
|
932
|
-
<span class="cstat-no" title="statement not covered" > for (let ilat = <span class="cstat-no" title="statement not covered" >0
|
|
933
|
-
const lat = <span class="cstat-no" title="statement not covered" >this.
|
|
934
|
-
<span class="cstat-no" title="statement not covered" > if (lat > fitBbox[0]) <span class="cstat-no" title="statement not covered" >iminlat =
|
|
932
|
+
<span class="cstat-no" title="statement not covered" > for (let ilat = <span class="cstat-no" title="statement not covered" >0;</span> ilat < this.dimensions[0] - 1 && iminlat === -1; ++ilat) {</span>
|
|
933
|
+
const lat = <span class="cstat-no" title="statement not covered" >this.getLat(ilat + 1)</span>
|
|
934
|
+
<span class="cstat-no" title="statement not covered" > if (lat > fitBbox[0]) <span class="cstat-no" title="statement not covered" >iminlat = ilat</span></span>
|
|
935
935
|
}
|
|
936
936
|
|
|
937
937
|
let imaxlat = <span class="cstat-no" title="statement not covered" >-1</span>
|
|
938
|
-
<span class="cstat-no" title="statement not covered" > for (let ilat = <span class="cstat-no" title="statement not covered" >this.dimensions[0] - 1
|
|
939
|
-
const lat = <span class="cstat-no" title="statement not covered" >this.
|
|
940
|
-
<span class="cstat-no" title="statement not covered" > if (lat < fitBbox[2]) <span class="cstat-no" title="statement not covered" >imaxlat =
|
|
938
|
+
<span class="cstat-no" title="statement not covered" > for (let ilat = <span class="cstat-no" title="statement not covered" >this.dimensions[0] - 1;</span> ilat > 0 && imaxlat === -1; --ilat) {</span>
|
|
939
|
+
const lat = <span class="cstat-no" title="statement not covered" >this.getLat(ilat - 1)</span>
|
|
940
|
+
<span class="cstat-no" title="statement not covered" > if (lat < fitBbox[2]) <span class="cstat-no" title="statement not covered" >imaxlat = ilat</span></span>
|
|
941
941
|
}
|
|
942
942
|
|
|
943
943
|
let iminlon = <span class="cstat-no" title="statement not covered" >-1</span>
|
|
944
|
-
<span class="cstat-no" title="statement not covered" > for (let ilon = <span class="cstat-no" title="statement not covered" >0
|
|
945
|
-
const lon = <span class="cstat-no" title="statement not covered" >this.
|
|
946
|
-
<span class="cstat-no" title="statement not covered" > if (lon > fitBbox[1]) <span class="cstat-no" title="statement not covered" >iminlon =
|
|
944
|
+
<span class="cstat-no" title="statement not covered" > for (let ilon = <span class="cstat-no" title="statement not covered" >0;</span> ilon < this.dimensions[1] - 1 && iminlon === -1; ++ilon) {</span>
|
|
945
|
+
const lon = <span class="cstat-no" title="statement not covered" >this.getLon(ilon + 1)</span>
|
|
946
|
+
<span class="cstat-no" title="statement not covered" > if (lon > fitBbox[1]) <span class="cstat-no" title="statement not covered" >iminlon = ilon</span></span>
|
|
947
947
|
}
|
|
948
948
|
|
|
949
949
|
let imaxlon = <span class="cstat-no" title="statement not covered" >-1</span>
|
|
950
|
-
<span class="cstat-no" title="statement not covered" > for (let ilon = <span class="cstat-no" title="statement not covered" >this.dimensions[1] - 1
|
|
951
|
-
const lon = <span class="cstat-no" title="statement not covered" >this.
|
|
952
|
-
<span class="cstat-no" title="statement not covered" > if (lon < fitBbox[3]) <span class="cstat-no" title="statement not covered" >imaxlon =
|
|
950
|
+
<span class="cstat-no" title="statement not covered" > for (let ilon = <span class="cstat-no" title="statement not covered" >this.dimensions[1] - 1;</span> ilon > 0 && imaxlon === -1; --ilon) {</span>
|
|
951
|
+
const lon = <span class="cstat-no" title="statement not covered" >this.getLon(ilon - 1)</span>
|
|
952
|
+
<span class="cstat-no" title="statement not covered" > if (lon < fitBbox[3]) <span class="cstat-no" title="statement not covered" >imaxlon = ilon</span></span>
|
|
953
953
|
}
|
|
954
954
|
|
|
955
|
-
<span class="cstat-no" title="statement not covered" > return [
|
|
955
|
+
<span class="cstat-no" title="statement not covered" > return [iminlat, iminlon, imaxlat, imaxlon]</span>
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
|
|
959
959
|
export class GridSource {
|
|
960
|
-
|
|
961
|
-
this.events = {}
|
|
962
|
-
this.sourceKey = 0
|
|
960
|
+
<span class="fstat-no" title="function not covered" > co</span>nstructor (options) {
|
|
961
|
+
<span class="cstat-no" title="statement not covered" > this.events = {}</span>
|
|
962
|
+
<span class="cstat-no" title="statement not covered" > this.sourceKey = 0</span>
|
|
963
963
|
}
|
|
964
964
|
|
|
965
|
-
<span class="fstat-no" title="function not covered" >
|
|
966
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
965
|
+
<span class="fstat-no" title="function not covered" > ge</span>tBBox () {
|
|
966
|
+
<span class="cstat-no" title="statement not covered" > return null</span>
|
|
967
967
|
}
|
|
968
968
|
|
|
969
|
-
<span class="fstat-no" title="function not covered" >
|
|
970
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
969
|
+
<span class="fstat-no" title="function not covered" > ge</span>tDataBounds () {
|
|
970
|
+
<span class="cstat-no" title="statement not covered" > throw new Error('Not implemented')</span>
|
|
971
971
|
}
|
|
972
972
|
|
|
973
|
-
<span class="fstat-no" title="function not covered" >
|
|
974
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
973
|
+
<span class="fstat-no" title="function not covered" > su</span>pportsNoData () {
|
|
974
|
+
<span class="cstat-no" title="statement not covered" > return this.nodata !== undefined</span>
|
|
975
975
|
}
|
|
976
976
|
|
|
977
977
|
/**
|
|
978
978
|
* @returns {Number} Returns a new longitude with the value wrapped so it's always in the same range than the given bounding box (e.g. between -180 and +180 degrees).
|
|
979
979
|
*/
|
|
980
|
-
<span class="fstat-no" title="function not covered" >
|
|
980
|
+
<span class="fstat-no" title="function not covered" > wr</span>apLongitude (lon, bounds) {
|
|
981
981
|
// We have longitudes in range [-180, 180] so take care if longitude is given in range [0, 360]
|
|
982
982
|
<span class="cstat-no" title="statement not covered" > if (bounds[0] < 0) {</span>
|
|
983
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
983
|
+
<span class="cstat-no" title="statement not covered" > return lon > 180 ? lon - 360 : lon</span>
|
|
984
984
|
} else <span class="cstat-no" title="statement not covered" >if (bounds[2] > 180) {</span>
|
|
985
985
|
// We have longitudes in range [0, 360] so take care if longitude is given in range [-180, 180]
|
|
986
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
986
|
+
<span class="cstat-no" title="statement not covered" > return lon < 0 ? lon + 360 : lon</span>
|
|
987
987
|
} else {
|
|
988
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
988
|
+
<span class="cstat-no" title="statement not covered" > return lon</span>
|
|
989
989
|
}
|
|
990
990
|
}
|
|
991
991
|
|
|
992
|
-
|
|
993
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
992
|
+
<span class="fstat-no" title="function not covered" > as</span>ync setup (config) {
|
|
993
|
+
<span class="cstat-no" title="statement not covered" > throw new Error('Not implemented')</span>
|
|
994
994
|
}
|
|
995
995
|
|
|
996
|
-
|
|
997
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
996
|
+
<span class="fstat-no" title="function not covered" > as</span>ync fetch (abort, bbox, resolution) {
|
|
997
|
+
<span class="cstat-no" title="statement not covered" > throw new Error('Not implemented')</span>
|
|
998
998
|
}
|
|
999
999
|
|
|
1000
|
-
<span class="fstat-no" title="function not covered" > on
|
|
1001
|
-
const callbacks = <span class="cstat-no" title="statement not covered" >_.
|
|
1002
|
-
<span class="cstat-no" title="statement not covered" > callbacks.
|
|
1003
|
-
<span class="cstat-no" title="statement not covered" > if (callbacks.length === 1) { <span class="cstat-no" title="statement not covered" >this.
|
|
1000
|
+
<span class="fstat-no" title="function not covered" > on</span> (event, callback) {
|
|
1001
|
+
const callbacks = <span class="cstat-no" title="statement not covered" >_.get(this.events, event, [])</span>
|
|
1002
|
+
<span class="cstat-no" title="statement not covered" > callbacks.push(callback)</span>
|
|
1003
|
+
<span class="cstat-no" title="statement not covered" > if (callbacks.length === 1) { <span class="cstat-no" title="statement not covered" >this.events[event] = callbacks </span>}</span>
|
|
1004
1004
|
}
|
|
1005
1005
|
|
|
1006
|
-
<span class="fstat-no" title="function not covered" >
|
|
1007
|
-
const callbacks = <span class="cstat-no" title="statement not covered" >_.
|
|
1008
|
-
<span class="cstat-no" title="statement not covered" > callbacks.
|
|
1006
|
+
<span class="fstat-no" title="function not covered" > of</span>f (event, callback) {
|
|
1007
|
+
const callbacks = <span class="cstat-no" title="statement not covered" >_.get(this.events, event, [])</span>
|
|
1008
|
+
<span class="cstat-no" title="statement not covered" > callbacks.splice(0, 0, callback)</span>
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
|
-
|
|
1012
|
-
const callbacks = _.get(this.events, event, [])
|
|
1013
|
-
const ctx = { source: this, event: event }
|
|
1014
|
-
for (const cb of callbacks) {
|
|
1015
|
-
<span class="cstat-no" title="statement not covered" > cb(
|
|
1011
|
+
<span class="fstat-no" title="function not covered" > em</span>it (event) {
|
|
1012
|
+
const callbacks = <span class="cstat-no" title="statement not covered" >_.get(this.events, event, [])</span>
|
|
1013
|
+
const ctx = <span class="cstat-no" title="statement not covered" >{ source: this, event: event }</span>
|
|
1014
|
+
<span class="cstat-no" title="statement not covered" > for (const cb of callbacks) {</span>
|
|
1015
|
+
<span class="cstat-no" title="statement not covered" > cb(ctx)</span>
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
|
-
|
|
1020
|
-
this.emit('data-changed')
|
|
1019
|
+
<span class="fstat-no" title="function not covered" > da</span>taChanged () {
|
|
1020
|
+
<span class="cstat-no" title="statement not covered" > this.emit('data-changed')</span>
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
|
|
1024
|
-
export function makeGridSource (key, options = null) {
|
|
1025
|
-
const factory = _.get(gridSourceFactories, key, null)
|
|
1026
|
-
|
|
1027
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
1024
|
+
export function <span class="fstat-no" title="function not covered" >makeGridSource </span>(key, options = <span class="branch-0 cbranch-no" title="branch not covered" >null)</span> {
|
|
1025
|
+
const factory = <span class="cstat-no" title="statement not covered" >_.get(gridSourceFactories, key, null)</span>
|
|
1026
|
+
<span class="cstat-no" title="statement not covered" > if (factory) { <span class="cstat-no" title="statement not covered" >return factory(options) </span>}</span>
|
|
1027
|
+
<span class="cstat-no" title="statement not covered" > return null</span>
|
|
1028
1028
|
}
|
|
1029
1029
|
|
|
1030
|
-
export function extractGridSourceConfig (options) {
|
|
1031
|
-
for (const key of Object.keys(options)) {
|
|
1032
|
-
const factory = _.get(gridSourceFactories, key, null)
|
|
1033
|
-
|
|
1030
|
+
export function <span class="fstat-no" title="function not covered" >extractGridSourceConfig </span>(options) {
|
|
1031
|
+
<span class="cstat-no" title="statement not covered" > for (const key of Object.keys(options)) {</span>
|
|
1032
|
+
const factory = <span class="cstat-no" title="statement not covered" >_.get(gridSourceFactories, key, null)</span>
|
|
1033
|
+
<span class="cstat-no" title="statement not covered" > if (factory) { <span class="cstat-no" title="statement not covered" >return [key, options[key]] </span>}</span>
|
|
1034
1034
|
}
|
|
1035
|
-
<span class="cstat-no" title="statement not covered" > return [
|
|
1035
|
+
<span class="cstat-no" title="statement not covered" > return [null, null]</span>
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
1038
|
// these allow to query grid with ascending lat/lon
|
|
1039
|
-
const grid1DAccessFunctions = [
|
|
1039
|
+
const grid1DAccessFunctions = <span class="cstat-no" title="statement not covered" >[</span>
|
|
1040
1040
|
// lonFirst, latOrder=SortOrder.ASCENDING, lonOrder=SortOrder.ASCENDING
|
|
1041
|
-
<span class="fstat-no" title="function not covered" >
|
|
1041
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[ilon * latCount + ilat] </span>},
|
|
1042
1042
|
// lonFirst, latOrder=SortOrder.ASCENDING, lonOrder=SortOrder.DESCENDING
|
|
1043
|
-
<span class="fstat-no" title="function not covered" >
|
|
1043
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[(lonCount - (ilon + 1)) * latCount + ilat] </span>},
|
|
1044
1044
|
// lonFirst, latOrder=SortOrder.DESCENDING, lonOrder=SortOrder.ASCENDING
|
|
1045
|
-
<span class="fstat-no" title="function not covered" >
|
|
1045
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[ilon * latCount + (latCount - (ilat + 1))] </span>},
|
|
1046
1046
|
// lonFirst, latOrder=SortOrder.DESCENDING, lonOrder=SortOrder.DESCENDING
|
|
1047
|
-
<span class="fstat-no" title="function not covered" >
|
|
1047
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[(lonCount - (ilon + 1)) * latCount + (latCount - (ilat + 1))] </span>},
|
|
1048
1048
|
|
|
1049
1049
|
// latFirst, latOrder=SortOrder.ASCENDING, lonOrder=SortOrder.ASCENDING
|
|
1050
|
-
<span class="fstat-no" title="function not covered" >
|
|
1050
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[ilat * lonCount + ilon] </span>},
|
|
1051
1051
|
// latFirst, latOrder=SortOrder.ASCENDING, lonOrder=SortOrder.DESCENDING
|
|
1052
|
-
<span class="fstat-no" title="function not covered" >
|
|
1052
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[ilat * lonCount + (lonCount - (ilon + 1))] </span>},
|
|
1053
1053
|
// latFirst, latOrder=SortOrder.DESCENDING, lonOrder=SortOrder.ASCENDING
|
|
1054
|
-
|
|
1054
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[(latCount - (ilat + 1)) * lonCount + ilon] </span>},
|
|
1055
1055
|
// latFirst, latOrder=SortOrder.DESCENDING, lonOrder=SortOrder.DESCENDING
|
|
1056
|
-
<span class="fstat-no" title="function not covered" >
|
|
1056
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[(latCount - (ilat + 1)) * lonCount + (lonCount - (ilon + 1))] </span>}
|
|
1057
1057
|
]
|
|
1058
1058
|
|
|
1059
1059
|
export class Grid1D extends BaseGrid {
|
|
1060
|
-
|
|
1061
|
-
super(sourceKey, bbox, dimensions, nodata)
|
|
1060
|
+
<span class="fstat-no" title="function not covered" > co</span>nstructor (sourceKey, bbox, dimensions, data, latFirst, latSortOrder, lonSortOrder, nodata = <span class="branch-0 cbranch-no" title="branch not covered" >undefined,</span> converter = <span class="branch-0 cbranch-no" title="branch not covered" >null)</span> {
|
|
1061
|
+
<span class="cstat-no" title="statement not covered" > super(sourceKey, bbox, dimensions, nodata)</span>
|
|
1062
1062
|
|
|
1063
|
-
this.data = data
|
|
1063
|
+
<span class="cstat-no" title="statement not covered" > this.data = data</span>
|
|
1064
1064
|
|
|
1065
|
-
const index = lonSortOrder + (latSortOrder * 2) + ((latFirst ? 1 :
|
|
1066
|
-
this.getByIndex = grid1DAccessFunctions[index]
|
|
1065
|
+
const index = <span class="cstat-no" title="statement not covered" >lonSortOrder + (latSortOrder * 2) + ((latFirst ? 1 : 0) * 4)</span>
|
|
1066
|
+
<span class="cstat-no" title="statement not covered" > this.getByIndex = grid1DAccessFunctions[index]</span>
|
|
1067
1067
|
|
|
1068
|
-
|
|
1069
|
-
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0
|
|
1070
|
-
<span class="cstat-no" title="statement not covered" > data[i
|
|
1068
|
+
<span class="cstat-no" title="statement not covered" > if (converter) {</span>
|
|
1069
|
+
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0;</span> i < data.length; ++i) {</span>
|
|
1070
|
+
<span class="cstat-no" title="statement not covered" > data[i] = converter(data[i])</span>
|
|
1071
1071
|
}
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
1074
|
|
|
1075
|
-
|
|
1076
|
-
return this.getByIndex(this.data, ilat, ilon, this.dimensions[0], this.dimensions[1])
|
|
1075
|
+
<span class="fstat-no" title="function not covered" > ge</span>tValue (ilat, ilon) {
|
|
1076
|
+
<span class="cstat-no" title="statement not covered" > return this.getByIndex(this.data, ilat, ilon, this.dimensions[0], this.dimensions[1])</span>
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
1080
|
// these allow to query grid with ascending lat/lon
|
|
1081
|
-
const grid2DAccessFunctions = [
|
|
1081
|
+
const grid2DAccessFunctions = <span class="cstat-no" title="statement not covered" >[</span>
|
|
1082
1082
|
// lonFirst, latOrder=SortOrder.ASCENDING, lonOrder=SortOrder.ASCENDING
|
|
1083
|
-
<span class="fstat-no" title="function not covered" >
|
|
1083
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[ilon][ilat] </span>},
|
|
1084
1084
|
// lonFirst, latOrder=SortOrder.ASCENDING, lonOrder=SortOrder.DESCENDING
|
|
1085
|
-
<span class="fstat-no" title="function not covered" >
|
|
1085
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[lonCount - (ilon + 1)][ilat] </span>},
|
|
1086
1086
|
// lonFirst, latOrder=SortOrder.DESCENDING, lonOrder=SortOrder.ASCENDING
|
|
1087
|
-
<span class="fstat-no" title="function not covered" >
|
|
1087
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[ilon][latCount - (ilat + 1)] </span>},
|
|
1088
1088
|
// lonFirst, latOrder=SortOrder.DESCENDING, lonOrder=SortOrder.DESCENDING
|
|
1089
|
-
<span class="fstat-no" title="function not covered" >
|
|
1089
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[lonCount - (ilon + 1)][latCount - (ilat + 1)] </span>},
|
|
1090
1090
|
|
|
1091
1091
|
// latFirst, latOrder=SortOrder.ASCENDING, lonOrder=SortOrder.ASCENDING
|
|
1092
|
-
<span class="fstat-no" title="function not covered" >
|
|
1092
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[ilat][ilon] </span>},
|
|
1093
1093
|
// latFirst, latOrder=SortOrder.ASCENDING, lonOrder=SortOrder.DESCENDING
|
|
1094
|
-
<span class="fstat-no" title="function not covered" >
|
|
1094
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[ilat][lonCount - (ilon + 1)] </span>},
|
|
1095
1095
|
// latFirst, latOrder=SortOrder.DESCENDING, lonOrder=SortOrder.ASCENDING
|
|
1096
|
-
<span class="fstat-no" title="function not covered" >
|
|
1096
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[latCount - (ilat + 1)][ilon] </span>},
|
|
1097
1097
|
// latFirst, latOrder=SortOrder.DESCENDING, lonOrder=SortOrder.DESCENDING
|
|
1098
|
-
<span class="fstat-no" title="function not covered" >
|
|
1098
|
+
<span class="fstat-no" title="function not covered" > fu</span>nction (data, ilat, ilon, latCount, lonCount) { <span class="cstat-no" title="statement not covered" >return data[latCount - (ilat + 1)][lonCount - (ilon + 1)] </span>}
|
|
1099
1099
|
]
|
|
1100
1100
|
|
|
1101
1101
|
export class Grid2D extends BaseGrid {
|
|
1102
|
-
|
|
1103
|
-
super(sourceKey, bbox, dimensions, nodata)
|
|
1104
|
-
this.data = data
|
|
1105
|
-
|
|
1106
|
-
const index = lonSortOrder + (latSortOrder * 2) + ((latFirst ? 1 :
|
|
1107
|
-
this.getByIndex = grid2DAccessFunctions[index]
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
<span class="cstat-no" title="statement not covered" > for (let l = <span class="cstat-no" title="statement not covered" >0
|
|
1111
|
-
const line = <span class="cstat-no" title="statement not covered" >data[l</span>
|
|
1112
|
-
<span class="cstat-no" title="statement not covered" > for (let r = <span class="cstat-no" title="statement not covered" >0
|
|
1113
|
-
<span class="cstat-no" title="statement not covered" > line[r
|
|
1102
|
+
<span class="fstat-no" title="function not covered" > co</span>nstructor (sourceKey, bbox, dimensions, data, latFirst, latSortOrder, lonSortOrder, nodata = <span class="branch-0 cbranch-no" title="branch not covered" >undefined,</span> converter = <span class="branch-0 cbranch-no" title="branch not covered" >null)</span> {
|
|
1103
|
+
<span class="cstat-no" title="statement not covered" > super(sourceKey, bbox, dimensions, nodata)</span>
|
|
1104
|
+
<span class="cstat-no" title="statement not covered" > this.data = data</span>
|
|
1105
|
+
|
|
1106
|
+
const index = <span class="cstat-no" title="statement not covered" >lonSortOrder + (latSortOrder * 2) + ((latFirst ? 1 : 0) * 4)</span>
|
|
1107
|
+
<span class="cstat-no" title="statement not covered" > this.getByIndex = grid2DAccessFunctions[index]</span>
|
|
1108
|
+
|
|
1109
|
+
<span class="cstat-no" title="statement not covered" > if (converter) {</span>
|
|
1110
|
+
<span class="cstat-no" title="statement not covered" > for (let l = <span class="cstat-no" title="statement not covered" >0;</span> l < data.length; ++l) {</span>
|
|
1111
|
+
const line = <span class="cstat-no" title="statement not covered" >data[l]</span>
|
|
1112
|
+
<span class="cstat-no" title="statement not covered" > for (let r = <span class="cstat-no" title="statement not covered" >0;</span> r < line.length; ++r) {</span>
|
|
1113
|
+
<span class="cstat-no" title="statement not covered" > line[r] = converter(line[r])</span>
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
|
|
1119
|
-
<span class="fstat-no" title="function not covered" >
|
|
1120
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
1119
|
+
<span class="fstat-no" title="function not covered" > ge</span>tValue (ilat, ilon) {
|
|
1120
|
+
<span class="cstat-no" title="statement not covered" > return this.getByIndex(this.data, ilat, ilon, this.dimensions[0], this.dimensions[1])</span>
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
1123
1123
|
|
|
1124
1124
|
// Class to aggregate multiple grids in a single one
|
|
1125
1125
|
// All grids in the aggregate MUST have the same resolution
|
|
1126
1126
|
export class TiledGrid extends BaseGrid {
|
|
1127
|
-
|
|
1128
|
-
const bbox0 = tiles[0].getBBox()
|
|
1129
|
-
const dim0 = tiles[0].getDimensions()
|
|
1130
|
-
const res0 = tiles[0].getResolution()
|
|
1131
|
-
super(sourceKey, bbox0, dim0, nodata)
|
|
1127
|
+
<span class="fstat-no" title="function not covered" > co</span>nstructor (sourceKey, tiles, nodata = <span class="branch-0 cbranch-no" title="branch not covered" >undefined)</span> {
|
|
1128
|
+
const bbox0 = <span class="cstat-no" title="statement not covered" >tiles[0].getBBox()</span>
|
|
1129
|
+
const dim0 = <span class="cstat-no" title="statement not covered" >tiles[0].getDimensions()</span>
|
|
1130
|
+
const res0 = <span class="cstat-no" title="statement not covered" >tiles[0].getResolution()</span>
|
|
1131
|
+
<span class="cstat-no" title="statement not covered" > super(sourceKey, bbox0, dim0, nodata)</span>
|
|
1132
1132
|
|
|
1133
|
-
this.dimensions = [0, 0]
|
|
1134
|
-
this.bbox = [bbox0[0], bbox0[1], bbox0[2], bbox0[3]]
|
|
1135
|
-
this.resolution = [res0[0], res0[1]]
|
|
1133
|
+
<span class="cstat-no" title="statement not covered" > this.dimensions = [0, 0]</span>
|
|
1134
|
+
<span class="cstat-no" title="statement not covered" > this.bbox = [bbox0[0], bbox0[1], bbox0[2], bbox0[3]]</span>
|
|
1135
|
+
<span class="cstat-no" title="statement not covered" > this.resolution = [res0[0], res0[1]]</span>
|
|
1136
1136
|
|
|
1137
|
-
for (const tile of tiles) {
|
|
1137
|
+
<span class="cstat-no" title="statement not covered" > for (const tile of tiles) {</span>
|
|
1138
1138
|
// make sure resolution match between tiles
|
|
1139
|
-
const res = tile.getResolution()
|
|
1140
|
-
|
|
1141
|
-
<span class="cstat-no" title="statement not covered" > throw
|
|
1139
|
+
const res = <span class="cstat-no" title="statement not covered" >tile.getResolution()</span>
|
|
1140
|
+
<span class="cstat-no" title="statement not covered" > if (res[0] !== res0[0] || res[1] !== res0[1]) {</span>
|
|
1141
|
+
<span class="cstat-no" title="statement not covered" > throw new Error('Resolution does not match between tiles')</span>
|
|
1142
1142
|
}
|
|
1143
1143
|
|
|
1144
1144
|
// update grid bbox and make sure it is contiguous
|
|
1145
|
-
const bbox = tile.getBBox()
|
|
1146
|
-
this.bbox[0] = Math.min(this.bbox[0], bbox[0])
|
|
1147
|
-
this.bbox[1] = Math.min(this.bbox[1], bbox[1])
|
|
1148
|
-
this.bbox[2] = Math.max(this.bbox[2], bbox[2])
|
|
1149
|
-
this.bbox[3] = Math.max(this.bbox[3], bbox[3])
|
|
1145
|
+
const bbox = <span class="cstat-no" title="statement not covered" >tile.getBBox()</span>
|
|
1146
|
+
<span class="cstat-no" title="statement not covered" > this.bbox[0] = Math.min(this.bbox[0], bbox[0])</span>
|
|
1147
|
+
<span class="cstat-no" title="statement not covered" > this.bbox[1] = Math.min(this.bbox[1], bbox[1])</span>
|
|
1148
|
+
<span class="cstat-no" title="statement not covered" > this.bbox[2] = Math.max(this.bbox[2], bbox[2])</span>
|
|
1149
|
+
<span class="cstat-no" title="statement not covered" > this.bbox[3] = Math.max(this.bbox[3], bbox[3])</span>
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
|
-
this.dimensions[0] = 1 + Math.trunc((this.bbox[2] - this.bbox[0]) / this.resolution[0])
|
|
1153
|
-
this.dimensions[1] = 1 + Math.trunc((this.bbox[3] - this.bbox[1]) / this.resolution[1])
|
|
1152
|
+
<span class="cstat-no" title="statement not covered" > this.dimensions[0] = 1 + Math.trunc((this.bbox[2] - this.bbox[0]) / this.resolution[0])</span>
|
|
1153
|
+
<span class="cstat-no" title="statement not covered" > this.dimensions[1] = 1 + Math.trunc((this.bbox[3] - this.bbox[1]) / this.resolution[1])</span>
|
|
1154
1154
|
|
|
1155
|
-
this.tiles = []
|
|
1155
|
+
<span class="cstat-no" title="statement not covered" > this.tiles = []</span>
|
|
1156
1156
|
|
|
1157
|
-
for (const tile of tiles) {
|
|
1158
|
-
const bbox = tile.getBBox()
|
|
1159
|
-
const meta = {
|
|
1157
|
+
<span class="cstat-no" title="statement not covered" > for (const tile of tiles) {</span>
|
|
1158
|
+
const bbox = <span class="cstat-no" title="statement not covered" >tile.getBBox()</span>
|
|
1159
|
+
const meta = <span class="cstat-no" title="statement not covered" >{</span>
|
|
1160
1160
|
tile: tile,
|
|
1161
1161
|
iLatMin: Math.floor((bbox[0] - this.bbox[0]) / this.resolution[0]),
|
|
1162
1162
|
iLatMax: Math.floor((bbox[2] - this.bbox[0]) / this.resolution[0]),
|
|
@@ -1164,43 +1164,43 @@ export class TiledGrid extends BaseGrid {
|
|
|
1164
1164
|
iLonMax: Math.floor((bbox[3] - this.bbox[1]) / this.resolution[1])
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
|
-
this.tiles.push(meta)
|
|
1167
|
+
<span class="cstat-no" title="statement not covered" > this.tiles.push(meta)</span>
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
1170
|
|
|
1171
|
-
|
|
1171
|
+
<span class="fstat-no" title="function not covered" > ge</span>tValue (ilat, ilon) {
|
|
1172
1172
|
// find which tile holds our data
|
|
1173
|
-
let tile = null
|
|
1174
|
-
for (const t of this.tiles) {
|
|
1175
|
-
if (ilat < t.iLatMin || ilat > t.iLatMax || ilon < t.iLonMin || ilon > t.iLonMax) { continue }
|
|
1176
|
-
tile = t
|
|
1177
|
-
break
|
|
1173
|
+
let tile = <span class="cstat-no" title="statement not covered" >null</span>
|
|
1174
|
+
<span class="cstat-no" title="statement not covered" > for (const t of this.tiles) {</span>
|
|
1175
|
+
<span class="cstat-no" title="statement not covered" > if (ilat < t.iLatMin || ilat > t.iLatMax || ilon < t.iLonMin || ilon > t.iLonMax) { <span class="cstat-no" title="statement not covered" >continue </span>}</span>
|
|
1176
|
+
<span class="cstat-no" title="statement not covered" > tile = t</span>
|
|
1177
|
+
<span class="cstat-no" title="statement not covered" > break</span>
|
|
1178
1178
|
}
|
|
1179
1179
|
|
|
1180
|
-
|
|
1180
|
+
<span class="cstat-no" title="statement not covered" > if (!tile) {</span>
|
|
1181
1181
|
<span class="cstat-no" title="statement not covered" > return 0</span>
|
|
1182
1182
|
}
|
|
1183
1183
|
|
|
1184
|
-
return tile.tile.getValue(ilat - tile.iLatMin, ilon - tile.iLonMin)
|
|
1184
|
+
<span class="cstat-no" title="statement not covered" > return tile.tile.getValue(ilat - tile.iLatMin, ilon - tile.iLonMin)</span>
|
|
1185
1185
|
}
|
|
1186
1186
|
}
|
|
1187
1187
|
|
|
1188
1188
|
export class SubGrid extends BaseGrid {
|
|
1189
|
-
<span class="fstat-no" title="function not covered" >
|
|
1190
|
-
const [iminlat, iminlon, imaxlat, imaxlon] = <span class="cstat-no" title="statement not covered" >grid.
|
|
1189
|
+
<span class="fstat-no" title="function not covered" > co</span>nstructor (sourceKey, grid, subBbox) {
|
|
1190
|
+
const [iminlat, iminlon, imaxlat, imaxlon] = <span class="cstat-no" title="statement not covered" >grid.getBestFit(subBbox)</span>
|
|
1191
1191
|
|
|
1192
|
-
const adjustedDims = <span class="cstat-no" title="statement not covered" >[1
|
|
1193
|
-
const adjustedBbox = <span class="cstat-no" title="statement not covered" >[
|
|
1192
|
+
const adjustedDims = <span class="cstat-no" title="statement not covered" >[1 + imaxlat - iminlat, 1 + imaxlon - iminlon]</span>
|
|
1193
|
+
const adjustedBbox = <span class="cstat-no" title="statement not covered" >[grid.getLat(iminlat), grid.getLon(iminlon), grid.getLat(imaxlat), grid.getLon(imaxlon)]</span>
|
|
1194
1194
|
|
|
1195
|
-
<span class="cstat-no" title="statement not covered" > super(
|
|
1195
|
+
<span class="cstat-no" title="statement not covered" > super(sourceKey, adjustedBbox, adjustedDims, grid.nodata)</span>
|
|
1196
1196
|
// this.resolution = grid.resolution.slice()
|
|
1197
|
-
<span class="cstat-no" title="statement not covered" > this.
|
|
1198
|
-
<span class="cstat-no" title="statement not covered" > this.
|
|
1199
|
-
<span class="cstat-no" title="statement not covered" > this.
|
|
1197
|
+
<span class="cstat-no" title="statement not covered" > this.latOffset = iminlat</span>
|
|
1198
|
+
<span class="cstat-no" title="statement not covered" > this.lonOffset = iminlon</span>
|
|
1199
|
+
<span class="cstat-no" title="statement not covered" > this.implGrid = grid</span>
|
|
1200
1200
|
}
|
|
1201
1201
|
|
|
1202
|
-
<span class="fstat-no" title="function not covered" >
|
|
1203
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
1202
|
+
<span class="fstat-no" title="function not covered" > ge</span>tValue (ilat, ilon) {
|
|
1203
|
+
<span class="cstat-no" title="statement not covered" > return this.implGrid.getValue(ilat + this.latOffset, ilon + this.lonOffset)</span>
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
</pre></td></tr></table></pre>
|
|
@@ -1210,7 +1210,7 @@ export class SubGrid extends BaseGrid {
|
|
|
1210
1210
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1211
1211
|
Code coverage generated by
|
|
1212
1212
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
1213
|
-
at
|
|
1213
|
+
at Wed Dec 08 2021 20:41:51 GMT+0100 (GMT+01:00)
|
|
1214
1214
|
</div>
|
|
1215
1215
|
</div>
|
|
1216
1216
|
<script src="../../prettify.js"></script>
|