@kalisio/kdk 2.5.3 → 2.6.1
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/.github/workflows/main.yaml +35 -6
- package/.vscode/settings.json +5 -0
- package/client.globe.js +8 -0
- package/client.js +8 -0
- package/client.map.js +8 -0
- package/core/api/hooks/hooks.push.js +3 -2
- package/core/api/hooks/hooks.tags.js +56 -0
- package/core/api/models/tags.model.mongodb.js +8 -0
- package/core/api/services/index.js +33 -2
- package/core/api/services/tags/tags.hooks.js +47 -0
- package/core/client/api.js +5 -5
- package/core/client/components/KActivity.vue +3 -2
- package/core/client/components/KChip.vue +2 -2
- package/core/client/components/KEditor.vue +3 -1
- package/core/client/components/KFollower.vue +4 -4
- package/core/client/components/KStore.vue +1 -1
- package/core/client/components/KTab.vue +20 -7
- package/core/client/components/account/KProfile.vue +9 -25
- package/core/client/components/action/KAction.vue +10 -10
- package/core/client/components/action/KToggleFullscreenAction.vue +2 -11
- package/core/client/components/app/KHome.vue +3 -2
- package/core/client/components/collection/KFilter.vue +5 -4
- package/core/client/components/collection/KGrid.vue +5 -1
- package/core/client/components/collection/KItemsFilter.vue +47 -0
- package/core/client/components/collection/KItemsSorter.vue +42 -0
- package/core/client/components/collection/KScrollDown.vue +2 -2
- package/core/client/components/collection/KSearchFilterControl.vue +3 -2
- package/core/client/components/collection/KSorter.vue +33 -37
- package/core/client/components/collection/KTagsFilterControl.vue +14 -40
- package/core/client/components/collection/KTagsFilterView.vue +10 -45
- package/core/client/components/collection/KTimeFilterControl.vue +6 -7
- package/core/client/components/collection/KTimeFilterView.vue +13 -22
- package/core/client/components/collection/KTimeLine.vue +18 -9
- package/core/client/components/form/KColorField.vue +13 -6
- package/core/client/components/form/KColorScaleField.vue +7 -12
- package/core/client/components/form/KFileField.vue +118 -89
- package/core/client/components/form/KForm.vue +30 -18
- package/core/client/components/form/KIconField.vue +4 -1
- package/core/client/components/form/KNumberField.vue +9 -2
- package/core/client/components/form/KSelectField.vue +1 -4
- package/core/client/components/form/KTagField.vue +229 -0
- package/core/client/components/form/KTextField.vue +4 -0
- package/core/client/components/form/KTextareaField.vue +3 -1
- package/core/client/components/input/KShapePicker.vue +3 -3
- package/core/client/components/layout/KFab.vue +32 -20
- package/core/client/components/layout/KPage.vue +11 -6
- package/core/client/components/layout/KWindow.vue +6 -1
- package/core/client/components/media/index.js +2 -6
- package/core/client/components/menu/KMenu.vue +12 -10
- package/core/client/components/menu/KSubMenu.vue +12 -12
- package/core/client/components/messages/KMessageCard.vue +13 -12
- package/core/client/components/messages/KMessageComposer.vue +13 -9
- package/core/client/components/messages/KMessagesTimeLine.vue +16 -8
- package/core/client/components/tags/KTagFilter.vue +99 -0
- package/core/client/components/tags/KTagItem.vue +65 -0
- package/core/client/components/tags/KTagManager.vue +198 -0
- package/core/client/components/tags/KTagSelection.vue +82 -0
- package/core/client/components/time/KDate.vue +3 -17
- package/core/client/components/time/KDateTime.vue +1 -1
- package/core/client/components/time/KTime.vue +0 -4
- package/core/client/composables/collection-filter.js +41 -2
- package/core/client/composables/collection.js +3 -3
- package/core/client/composables/index.js +1 -0
- package/core/client/composables/pwa.js +13 -0
- package/core/client/composables/session.js +7 -8
- package/core/client/composables/user.js +36 -0
- package/core/client/directives/index.js +1 -0
- package/core/client/directives/v-drop-file.js +174 -0
- package/core/client/document.js +2 -1
- package/core/client/exporter.js +17 -3
- package/core/client/i18n/core_en.json +34 -7
- package/core/client/i18n/core_fr.json +36 -9
- package/core/client/i18n.js +26 -11
- package/core/client/layout.js +5 -5
- package/core/client/mixins/mixin.base-activity.js +8 -5
- package/core/client/mixins/mixin.base-editor.js +2 -1
- package/core/client/mixins/mixin.base-field.js +3 -2
- package/core/client/mixins/mixin.base-item.js +12 -10
- package/core/client/mixins/mixin.service.js +3 -1
- package/core/client/platform.js +0 -3
- package/core/client/readers/reader.json.js +2 -2
- package/core/client/utils/index.js +2 -0
- package/core/client/utils/utils.collection.js +6 -6
- package/core/client/utils/utils.colors.js +473 -173
- package/core/client/utils/utils.files.js +19 -0
- package/core/client/utils/utils.locale.js +13 -17
- package/core/client/utils/utils.services.js +27 -0
- package/core/client/utils/utils.shapes.js +2 -2
- package/core/client/utils/utils.tags.js +17 -0
- package/core/client/utils/utils.tours.js +31 -0
- package/core/common/permissions.js +3 -0
- package/core/common/schemas/tags.update.json +35 -0
- package/core/common/schemas/users.update-profile.json +1 -1
- package/core/common/utils.js +5 -5
- package/coverage/core/api/application.js.html +464 -464
- package/coverage/core/api/authentication.js.html +219 -351
- package/coverage/core/api/db.js.html +194 -209
- package/coverage/core/api/hooks/hooks.authentication.js.html +208 -34
- package/coverage/core/api/hooks/hooks.authorisations.js.html +717 -432
- package/coverage/core/api/hooks/hooks.groups.js.html +52 -52
- package/coverage/core/api/hooks/hooks.logger.js.html +43 -43
- package/coverage/core/api/hooks/hooks.model.js.html +300 -312
- package/coverage/core/api/hooks/hooks.organisations.js.html +264 -264
- package/coverage/core/api/hooks/hooks.push.js.html +107 -119
- package/coverage/core/api/hooks/hooks.query.js.html +279 -279
- package/coverage/core/api/hooks/hooks.schemas.js.html +135 -135
- package/coverage/core/api/hooks/hooks.service.js.html +28 -28
- package/coverage/core/api/hooks/hooks.storage.js.html +7 -7
- package/coverage/core/api/hooks/hooks.users.js.html +478 -205
- package/coverage/core/api/hooks/index.html +132 -102
- package/coverage/core/api/hooks/index.js.html +19 -13
- package/coverage/core/api/index.html +69 -54
- package/coverage/core/api/index.js.html +25 -25
- package/coverage/core/api/marshall.js.html +127 -127
- package/coverage/core/api/models/groups.model.mongodb.js.html +26 -26
- package/coverage/core/api/models/index.html +66 -21
- package/coverage/core/api/models/messages.model.mongodb.js.html +27 -39
- package/coverage/core/api/models/organisations.model.mongodb.js.html +16 -16
- package/coverage/core/api/models/tags.model.mongodb.js.html +30 -30
- package/coverage/core/api/models/users.model.mongodb.js.html +11 -11
- package/coverage/core/api/services/account/account.hooks.js.html +46 -46
- package/coverage/core/api/services/account/account.service.js.html +139 -139
- package/coverage/core/api/services/account/index.html +22 -22
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +34 -34
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +230 -221
- package/coverage/core/api/services/authorisations/index.html +20 -20
- 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/groups/groups.hooks.js.html +72 -72
- package/coverage/core/api/services/groups/index.html +21 -21
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +76 -76
- package/coverage/core/api/services/import-export/import-export.service.js.html +32 -32
- package/coverage/core/api/services/import-export/index.html +32 -32
- package/coverage/core/api/services/index.html +21 -21
- package/coverage/core/api/services/index.js.html +195 -171
- package/coverage/core/api/services/mailer/index.html +32 -32
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +80 -80
- package/coverage/core/api/services/mailer/mailer.service.js.html +32 -32
- package/coverage/core/api/services/messages/index.html +21 -21
- package/coverage/core/api/services/messages/messages.hooks.js.html +76 -94
- package/coverage/core/api/services/organisations/index.html +32 -32
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +72 -72
- package/coverage/core/api/services/organisations/organisations.service.js.html +163 -163
- package/coverage/core/api/services/push/index.html +32 -32
- package/coverage/core/api/services/push/push.hooks.js.html +80 -80
- package/coverage/core/api/services/push/push.service.js.html +34 -34
- package/coverage/core/api/services/storage/index.html +29 -29
- package/coverage/core/api/services/storage/storage.hooks.js.html +80 -80
- package/coverage/core/api/services/storage/storage.service.js.html +37 -37
- package/coverage/core/api/services/tags/index.html +21 -21
- package/coverage/core/api/services/tags/tags.hooks.js.html +72 -72
- package/coverage/core/api/services/users/index.html +12 -27
- package/coverage/core/api/services/users/users.hooks.js.html +84 -87
- package/coverage/core/api/utils.js.html +1 -1
- package/coverage/core/common/errors.js.html +2 -2
- package/coverage/core/common/index.html +32 -47
- package/coverage/core/common/index.js.html +11 -11
- package/coverage/core/common/permissions.js.html +579 -264
- package/coverage/core/common/schema.js.html +26 -26
- package/coverage/core/common/utils.js.html +59 -65
- package/coverage/index.html +286 -256
- package/coverage/lcov-report/core/api/application.js.html +464 -464
- package/coverage/lcov-report/core/api/authentication.js.html +219 -351
- package/coverage/lcov-report/core/api/db.js.html +194 -209
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +208 -34
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +717 -432
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +52 -52
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +43 -43
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +300 -312
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +264 -264
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +107 -119
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +279 -279
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +135 -135
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +28 -28
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +7 -7
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +478 -205
- package/coverage/lcov-report/core/api/hooks/index.html +132 -102
- package/coverage/lcov-report/core/api/hooks/index.js.html +19 -13
- package/coverage/lcov-report/core/api/index.html +69 -54
- package/coverage/lcov-report/core/api/index.js.html +25 -25
- package/coverage/lcov-report/core/api/marshall.js.html +127 -127
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +26 -26
- package/coverage/lcov-report/core/api/models/index.html +66 -21
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +27 -39
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +16 -16
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +30 -30
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +11 -11
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +46 -46
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +139 -139
- package/coverage/lcov-report/core/api/services/account/index.html +22 -22
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +34 -34
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +230 -221
- package/coverage/lcov-report/core/api/services/authorisations/index.html +20 -20
- 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/groups/groups.hooks.js.html +72 -72
- package/coverage/lcov-report/core/api/services/groups/index.html +21 -21
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +76 -76
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +32 -32
- package/coverage/lcov-report/core/api/services/import-export/index.html +32 -32
- package/coverage/lcov-report/core/api/services/index.html +21 -21
- package/coverage/lcov-report/core/api/services/index.js.html +195 -171
- package/coverage/lcov-report/core/api/services/mailer/index.html +32 -32
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +32 -32
- package/coverage/lcov-report/core/api/services/messages/index.html +21 -21
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +76 -94
- package/coverage/lcov-report/core/api/services/organisations/index.html +32 -32
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +72 -72
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +163 -163
- package/coverage/lcov-report/core/api/services/push/index.html +32 -32
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +34 -34
- package/coverage/lcov-report/core/api/services/storage/index.html +29 -29
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +37 -37
- package/coverage/lcov-report/core/api/services/tags/index.html +21 -21
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +72 -72
- package/coverage/lcov-report/core/api/services/users/index.html +12 -27
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +84 -87
- package/coverage/lcov-report/core/api/utils.js.html +1 -1
- package/coverage/lcov-report/core/common/errors.js.html +2 -2
- package/coverage/lcov-report/core/common/index.html +32 -47
- package/coverage/lcov-report/core/common/index.js.html +11 -11
- package/coverage/lcov-report/core/common/permissions.js.html +579 -264
- package/coverage/lcov-report/core/common/schema.js.html +26 -26
- package/coverage/lcov-report/core/common/utils.js.html +59 -65
- package/coverage/lcov-report/index.html +286 -256
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +257 -353
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +810 -795
- package/coverage/lcov-report/map/api/hooks/index.html +54 -54
- package/coverage/lcov-report/map/api/hooks/index.js.html +16 -16
- package/coverage/lcov-report/map/api/index.html +32 -32
- package/coverage/lcov-report/map/api/index.js.html +46 -46
- package/coverage/lcov-report/map/api/marshall.js.html +72 -72
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +24 -24
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +27 -69
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/lcov-report/map/api/models/index.html +54 -69
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +136 -136
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +343 -343
- package/coverage/lcov-report/map/api/services/alerts/index.html +32 -32
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +160 -178
- package/coverage/lcov-report/map/api/services/catalog/index.html +21 -21
- 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 +114 -183
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +56 -359
- package/coverage/lcov-report/map/api/services/features/index.html +31 -31
- package/coverage/lcov-report/map/api/services/index.html +21 -21
- package/coverage/lcov-report/map/api/services/index.js.html +258 -495
- package/coverage/lcov-report/map/api/services/projects/index.html +21 -21
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +237 -237
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/lcov-report/map/common/errors.js.html +16 -16
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +267 -270
- package/coverage/lcov-report/map/common/grid.js.html +554 -554
- package/coverage/lcov-report/map/common/index.html +158 -158
- package/coverage/lcov-report/map/common/index.js.html +68 -68
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +73 -73
- package/coverage/lcov-report/map/common/moment-utils.js.html +18 -18
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +484 -484
- package/coverage/lcov-report/map/common/opendap-utils.js.html +353 -353
- package/coverage/lcov-report/map/common/permissions.js.html +36 -42
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +59 -59
- package/coverage/lcov-report/map/common/tms-utils.js.html +6 -6
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +190 -190
- package/coverage/lcov-report/map/common/wcs-utils.js.html +339 -339
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +345 -345
- package/coverage/lcov-report/map/common/wfs-utils.js.html +11 -11
- package/coverage/lcov-report/map/common/wms-utils.js.html +8 -8
- package/coverage/lcov-report/map/common/wmts-utils.js.html +7 -7
- package/coverage/lcov.info +7793 -8564
- package/coverage/map/api/hooks/hooks.catalog.js.html +257 -353
- package/coverage/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/map/api/hooks/hooks.query.js.html +810 -795
- package/coverage/map/api/hooks/index.html +54 -54
- package/coverage/map/api/hooks/index.js.html +16 -16
- package/coverage/map/api/index.html +32 -32
- package/coverage/map/api/index.js.html +46 -46
- package/coverage/map/api/marshall.js.html +72 -72
- package/coverage/map/api/models/alerts.model.mongodb.js.html +24 -24
- package/coverage/map/api/models/catalog.model.mongodb.js.html +27 -69
- package/coverage/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/map/api/models/index.html +54 -69
- package/coverage/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +136 -136
- package/coverage/map/api/services/alerts/alerts.service.js.html +343 -343
- package/coverage/map/api/services/alerts/index.html +32 -32
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +160 -178
- package/coverage/map/api/services/catalog/index.html +21 -21
- 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 +114 -183
- package/coverage/map/api/services/features/features.service.js.html +56 -359
- package/coverage/map/api/services/features/index.html +31 -31
- package/coverage/map/api/services/index.html +21 -21
- package/coverage/map/api/services/index.js.html +258 -495
- package/coverage/map/api/services/projects/index.html +21 -21
- package/coverage/map/api/services/projects/projects.hooks.js.html +237 -237
- package/coverage/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/map/common/errors.js.html +16 -16
- package/coverage/map/common/geotiff-grid-source.js.html +267 -270
- package/coverage/map/common/grid.js.html +554 -554
- package/coverage/map/common/index.html +158 -158
- package/coverage/map/common/index.js.html +68 -68
- package/coverage/map/common/meteo-model-grid-source.js.html +73 -73
- package/coverage/map/common/moment-utils.js.html +18 -18
- package/coverage/map/common/opendap-grid-source.js.html +484 -484
- package/coverage/map/common/opendap-utils.js.html +353 -353
- package/coverage/map/common/permissions.js.html +36 -42
- package/coverage/map/common/time-based-grid-source.js.html +59 -59
- package/coverage/map/common/tms-utils.js.html +6 -6
- package/coverage/map/common/wcs-grid-source.js.html +190 -190
- package/coverage/map/common/wcs-utils.js.html +339 -339
- package/coverage/map/common/weacast-grid-source.js.html +345 -345
- package/coverage/map/common/wfs-utils.js.html +11 -11
- package/coverage/map/common/wms-utils.js.html +8 -8
- package/coverage/map/common/wmts-utils.js.html +7 -7
- package/coverage/tmp/coverage-151166-1723543324307-0.json +1 -0
- package/coverage/tmp/coverage-151178-1723543324283-0.json +1 -0
- package/coverage/tmp/coverage-151189-1723543324271-0.json +1 -0
- package/coverage/tmp/coverage-151201-1723543324248-0.json +1 -0
- package/coverage/tmp/coverage-151208-1723543324227-0.json +1 -0
- package/extras/configs/panes.top.js +33 -11
- package/extras/configs/stickies.js +26 -16
- package/extras/configs/widgets.left.js +13 -1
- package/extras/libs/jsts.min.js +8 -0
- package/{test/client/core/account.js → extras/tests/core/account.mjs} +4 -4
- package/extras/tests/core/api.mjs +114 -0
- package/{test/client/core/collection.js → extras/tests/core/collection.mjs} +8 -8
- package/{test/client/core/dialogs.js → extras/tests/core/dialogs.mjs} +1 -1
- package/extras/tests/core/index.mjs +9 -0
- package/{test/client/core/layout.js → extras/tests/core/layout.mjs} +7 -3
- package/{test/client/core/runner.js → extras/tests/core/runner.mjs} +3 -3
- package/{test/client/core/screens.js → extras/tests/core/screens.mjs} +1 -1
- package/{test/client/core/utils.js → extras/tests/core/utils.mjs} +79 -26
- package/extras/tests/index.mjs +4 -0
- package/{test/client/map/api.js → extras/tests/map/api.mjs} +1 -1
- package/{test/client/map/catalog.js → extras/tests/map/catalog.mjs} +18 -18
- package/{test/client/map/controls.js → extras/tests/map/controls.mjs} +3 -3
- package/extras/tests/map/index.mjs +5 -0
- package/{test/client/map/time.js → extras/tests/map/time.mjs} +3 -3
- package/{test/client/map/utils.js → extras/tests/map/utils.mjs} +6 -5
- package/extras/tours/fab.js +36 -0
- package/extras/tours/layout.js +49 -0
- package/extras/tours/pane.left.js +78 -0
- package/extras/tours/pane.right.js +145 -0
- package/extras/tours/pane.top.js +239 -0
- package/map/api/config/layers.cjs +28 -13
- package/map/api/hooks/hooks.query.js +12 -7
- package/map/api/models/catalog.model.mongodb.js +17 -6
- package/map/api/services/catalog/catalog.hooks.js +1 -1
- package/map/api/services/index.js +18 -1
- package/map/client/cesium/utils/utils.cesium.js +25 -65
- package/map/client/cesium/utils/utils.features.js +1 -0
- package/map/client/cesium/utils/utils.geojson.js +1 -0
- package/map/client/cesium/utils/utils.style.js +7 -6
- package/map/client/components/KFeatureEditor.vue +3 -3
- package/map/client/components/KFeaturesChart.vue +4 -4
- package/map/client/components/KFeaturesFilterEditor.vue +19 -13
- package/map/client/components/KFeaturesFilterManager.vue +7 -4
- package/map/client/components/KFeaturesTable.vue +2 -2
- package/map/client/components/KLayerEditor.vue +6 -6
- package/map/client/components/KMeasureTool.vue +2 -1
- package/map/client/components/catalog/KBaseLayersSelector.vue +1 -1
- package/map/client/components/catalog/KCategoryItem.vue +15 -1
- package/map/client/components/catalog/KConnectLayer.vue +2 -2
- package/map/client/components/catalog/KCreateView.vue +3 -2
- package/map/client/components/catalog/KFilteredLayerItem.vue +26 -6
- package/map/client/components/catalog/KImportLayer.vue +6 -3
- package/map/client/components/catalog/KLayerCategories.vue +6 -6
- package/map/client/components/catalog/KLayerItem.vue +12 -2
- package/map/client/components/catalog/KLayersList.vue +180 -0
- package/map/client/components/catalog/KLayersPanel.vue +146 -36
- package/map/client/components/catalog/KLayersSelector.vue +96 -48
- package/map/client/components/catalog/KProjectEditor.vue +0 -9
- package/map/client/components/catalog/KProjectSelector.vue +3 -2
- package/map/client/components/catalog/KProjectsPanel.vue +23 -8
- package/map/client/components/catalog/KViewsPanel.vue +18 -8
- package/map/client/components/catalog/KWeatherLayersSelector.vue +3 -3
- package/map/client/components/form/KDirectionField.vue +3 -6
- package/map/client/components/form/KLayerCategoryField.vue +2 -2
- package/map/client/components/form/KOwsServiceField.vue +25 -24
- package/map/client/components/form/KSelectLayersField.vue +4 -4
- package/map/client/components/form/KSelectViewsField.vue +4 -4
- package/map/client/components/legend/KLayerLegend.vue +11 -2
- package/map/client/components/legend/KLegend.vue +44 -51
- package/map/client/components/location/KLocationCardSection.vue +6 -7
- package/map/client/components/location/KLocationMap.vue +23 -13
- package/map/client/components/stickies/KPosition.vue +5 -0
- package/map/client/components/stickies/KZoomControl.vue +70 -0
- package/map/client/components/styles/KLayerStyleAction.vue +59 -12
- package/map/client/components/styles/KStyleEditor.vue +71 -8
- package/map/client/components/styles/KStyleEditorSection.vue +82 -33
- package/map/client/components/styles/KStyleManager.vue +119 -59
- package/map/client/components/styles/KStylePreview.vue +9 -25
- package/map/client/components/styles/KStylePreviewItem.vue +22 -1
- package/map/client/components/tools/KSearchTool.vue +1 -1
- package/map/client/components/widget/KElevationProfile.vue +20 -17
- package/map/client/components/widget/KInformationBox.vue +5 -5
- package/map/client/components/widget/KMapillaryViewer.vue +2 -1
- package/map/client/components/widget/KTimeSeries.vue +11 -9
- package/map/client/globe.js +2 -0
- package/map/client/i18n/map_en.json +30 -7
- package/map/client/i18n/map_fr.json +30 -7
- package/map/client/leaflet/GradientPath.js +61 -24
- package/map/client/leaflet/ShapeMarker.js +12 -5
- package/map/client/leaflet/TiledMeshLayer.js +3 -3
- package/map/client/leaflet/utils/utils.geojson.js +66 -8
- package/map/client/leaflet/utils/utils.style.js +14 -15
- package/map/client/mixins/globe/mixin.base-globe.js +190 -34
- package/map/client/mixins/globe/mixin.file-layers.js +3 -0
- package/map/client/mixins/globe/mixin.geojson-layers.js +179 -31
- package/map/client/mixins/globe/mixin.opendap-layers.js +2 -1
- package/map/client/mixins/globe/mixin.style.js +23 -1
- package/map/client/mixins/globe/mixin.tooltip.js +14 -2
- package/map/client/mixins/map/mixin.base-map.js +156 -58
- package/map/client/mixins/map/mixin.edit-layers.js +18 -15
- package/map/client/mixins/map/mixin.geojson-layers.js +181 -106
- package/map/client/mixins/map/mixin.heatmap-layers.js +3 -2
- package/map/client/mixins/map/mixin.map-activity.js +6 -1
- package/map/client/mixins/map/mixin.mapillary-layers.js +2 -1
- package/map/client/mixins/map/mixin.pmtiles-layers.js +3 -3
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +3 -2
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +3 -2
- package/map/client/mixins/mixin.activity.js +199 -55
- package/map/client/mixins/mixin.context.js +11 -11
- package/map/client/mixins/mixin.feature-service.js +11 -9
- package/map/client/mixins/mixin.weacast.js +5 -3
- package/map/client/readers/reader.geojson.js +3 -1
- package/map/client/utils/utils.capture.js +3 -3
- package/map/client/utils/utils.catalog.js +9 -5
- package/map/client/utils/utils.features.js +120 -54
- package/map/client/utils/utils.js +25 -10
- package/map/client/utils/utils.layers.js +148 -24
- package/map/client/utils/utils.location.js +26 -9
- package/map/client/utils/utils.schema.js +2 -1
- package/map/client/utils/utils.style.js +53 -9
- package/map/common/geotiff-grid-source.js +1 -3
- package/map/common/opendap-utils.js +0 -1
- package/map/common/tms-utils.js +0 -1
- package/map/common/wcs-utils.js +0 -1
- package/map/common/wfs-utils.js +0 -1
- package/map/common/wms-utils.js +7 -1
- package/map/common/wmts-utils.js +0 -1
- package/package.json +12 -12
- package/scripts/init_runner.sh +3 -3
- package/scripts/kash/CHANGELOG.md +27 -0
- package/scripts/kash/kash.sh +556 -237
- package/scripts/kash/scripts/run_tests.sh +44 -5
- package/scripts/setup_workspace.sh +23 -13
- package/test/api/core/config/default.cjs +2 -1
- package/test/api/core/tags.test.js +62 -0
- package/test/api/core/test-log-2024-04-22.log +84 -0
- package/test/api/core/{test-log-2025-02-05.log → test-log-2024-04-23.log} +3 -3
- package/test/api/core/test-log-2024-08-13.log +3 -0
- package/test/api/map/config/default.cjs +2 -1
- package/test/api/map/config/layers.json +9 -0
- package/test/api/map/data/openradiation.json +13811 -0
- package/test/api/map/grid-sources.test.js +1 -3
- package/test/api/map/index.test.js +60 -1
- package/test/api/map/style.test.js +30 -1
- package/test/api/map/test-log-2025-03-08.log +0 -0
- package/test.api.js +1 -1
- package/vite/App.vue +18 -0
- package/vite/AppWithGlobe.vue +84 -0
- package/vite/GlobeActivity.vue +58 -0
- package/vite/MapActivity.vue +63 -0
- package/vite/MapActivityWithGlobe.vue +63 -0
- package/vite/README.md +169 -0
- package/vite/config.js +221 -0
- package/vite/index_with_globe.html +50 -0
- package/vite/index_with_map.html +50 -0
- package/vite/package.json +173 -0
- package/vite/quasar.variables.scss +17 -0
- package/vite/vite.config.js +166 -0
- package/vite/yarn.lock +11641 -0
- package/core/client/components/media/KImageViewer.vue +0 -68
- package/core/client/components/media/KMarkdownViewer.vue +0 -55
- package/core/client/components/media/KMediaBrowser.vue +0 -301
- package/coverage/core/api/services/users/users.service.js.html +0 -100
- package/coverage/core/common/utils.offline.js.html +0 -199
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +0 -100
- package/coverage/lcov-report/core/common/utils.offline.js.html +0 -199
- package/coverage/lcov-report/map/api/models/styles.model.mongodb.js.html +0 -112
- package/coverage/lcov-report/map/api/services/styles/index.html +0 -116
- package/coverage/lcov-report/map/api/services/styles/styles.hooks.js.html +0 -196
- package/coverage/map/api/models/styles.model.mongodb.js.html +0 -112
- package/coverage/map/api/services/styles/index.html +0 -116
- package/coverage/map/api/services/styles/styles.hooks.js.html +0 -196
- package/coverage/tmp/coverage-151198-1753351220086-0.json +0 -1
- package/coverage/tmp/coverage-151210-1753351220070-0.json +0 -1
- package/coverage/tmp/coverage-151221-1753351129816-0.json +0 -1
- package/coverage/tmp/coverage-151233-1753351129803-0.json +0 -1
- package/coverage/tmp/coverage-151240-1753351129770-0.json +0 -1
- package/coverage/tmp/coverage-151307-1753351220058-0.json +0 -1
- package/coverage/tmp/coverage-151319-1753351220044-0.json +0 -1
- package/coverage/tmp/coverage-151326-1753351220010-0.json +0 -1
- package/extras/tours/core/account-profile.js +0 -32
- package/extras/tours/core/account.js +0 -143
- package/extras/tours/core/add-member.js +0 -75
- package/extras/tours/core/add-tag.js +0 -13
- package/extras/tours/core/create-group.js +0 -19
- package/extras/tours/core/create-organisation.js +0 -19
- package/extras/tours/core/create-tag.js +0 -26
- package/extras/tours/core/edit-member-role.js +0 -13
- package/extras/tours/core/groups.js +0 -65
- package/extras/tours/core/join-group.js +0 -13
- package/extras/tours/core/login.js +0 -41
- package/extras/tours/core/members.js +0 -108
- package/extras/tours/core/register.js +0 -61
- package/extras/tours/core/send-reset-password.js +0 -14
- package/extras/tours/core/tags.js +0 -65
- package/extras/tours/map/catalog-panel.js +0 -112
- package/extras/tours/map/fab.js +0 -26
- package/extras/tours/map/navigation-bar.js +0 -187
- package/extras/tours/map/side-nav.js +0 -36
- package/test/api/core/test-log-2025-05-21.log +0 -15
- package/test/api/core/test-log-2025-06-25.log +0 -9
- package/test/api/core/test-log-2025-07-24.log +0 -44
- package/test/api/map/test-log-2025-05-27.log +0 -13
- package/test/api/map/test-log-2025-06-23.log +0 -7
- package/test/api/map/test-log-2025-07-24.log +0 -11
- package/test/client/core/api.js +0 -361
- package/test/client/core/index.js +0 -9
- package/test/client/index.js +0 -4
- package/test/client/map/index.js +0 -5
- package/test.client.js +0 -1
- /package/{test/client/core/time.js → extras/tests/core/time.mjs} +0 -0
- /package/extras/tours/{map/add-layer.js → add-layer.js} +0 -0
- /package/extras/tours/{map/catalog-categories.js → catalog-categories.js} +0 -0
- /package/extras/tours/{map/connect-layer.js → connect-layer.js} +0 -0
- /package/extras/tours/{map/create-layer.js → create-layer.js} +0 -0
- /package/extras/tours/{map/create-view.js → create-view.js} +0 -0
- /package/extras/tours/{map/import-layer.js → import-layer.js} +0 -0
- /package/extras/tours/{map/timeline.js → pane.bottom.js} +0 -0
|
@@ -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/316</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/1</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/1</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/316</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -379,96 +379,7 @@
|
|
|
379
379
|
<a name='L314'></a><a href='#L314'>314</a>
|
|
380
380
|
<a name='L315'></a><a href='#L315'>315</a>
|
|
381
381
|
<a name='L316'></a><a href='#L316'>316</a>
|
|
382
|
-
<a name='L317'></a><a href='#L317'>317</a></td><td class="line-coverage quiet"><span class="cline-any cline-
|
|
383
|
-
<span class="cline-any cline-yes">1x</span>
|
|
384
|
-
<span class="cline-any cline-yes">1x</span>
|
|
385
|
-
<span class="cline-any cline-yes">1x</span>
|
|
386
|
-
<span class="cline-any cline-yes">1x</span>
|
|
387
|
-
<span class="cline-any cline-yes">1x</span>
|
|
388
|
-
<span class="cline-any cline-yes">2x</span>
|
|
389
|
-
<span class="cline-any cline-yes">2x</span>
|
|
390
|
-
<span class="cline-any cline-yes">2x</span>
|
|
391
|
-
<span class="cline-any cline-yes">2x</span>
|
|
392
|
-
<span class="cline-any cline-yes">2x</span>
|
|
393
|
-
<span class="cline-any cline-yes">2x</span>
|
|
394
|
-
<span class="cline-any cline-yes">2x</span>
|
|
395
|
-
<span class="cline-any cline-yes">2x</span>
|
|
396
|
-
<span class="cline-any cline-yes">2x</span>
|
|
397
|
-
<span class="cline-any cline-yes">2x</span>
|
|
398
|
-
<span class="cline-any cline-yes">2x</span>
|
|
399
|
-
<span class="cline-any cline-yes">1x</span>
|
|
400
|
-
<span class="cline-any cline-yes">1x</span>
|
|
401
|
-
<span class="cline-any cline-yes">1x</span>
|
|
402
|
-
<span class="cline-any cline-yes">1x</span>
|
|
403
|
-
<span class="cline-any cline-yes">1x</span>
|
|
404
|
-
<span class="cline-any cline-yes">1x</span>
|
|
405
|
-
<span class="cline-any cline-yes">1x</span>
|
|
406
|
-
<span class="cline-any cline-yes">1x</span>
|
|
407
|
-
<span class="cline-any cline-yes">1x</span>
|
|
408
|
-
<span class="cline-any cline-yes">1x</span>
|
|
409
|
-
<span class="cline-any cline-yes">1x</span>
|
|
410
|
-
<span class="cline-any cline-yes">2x</span>
|
|
411
|
-
<span class="cline-any cline-yes">2x</span>
|
|
412
|
-
<span class="cline-any cline-yes">2x</span>
|
|
413
|
-
<span class="cline-any cline-yes">1x</span>
|
|
414
|
-
<span class="cline-any cline-yes">1x</span>
|
|
415
|
-
<span class="cline-any cline-yes">2x</span>
|
|
416
|
-
<span class="cline-any cline-yes">2x</span>
|
|
417
|
-
<span class="cline-any cline-yes">2x</span>
|
|
418
|
-
<span class="cline-any cline-yes">1x</span>
|
|
419
|
-
<span class="cline-any cline-yes">1x</span>
|
|
420
|
-
<span class="cline-any cline-yes">1x</span>
|
|
421
|
-
<span class="cline-any cline-yes">1x</span>
|
|
422
|
-
<span class="cline-any cline-yes">1x</span>
|
|
423
|
-
<span class="cline-any cline-yes">1x</span>
|
|
424
|
-
<span class="cline-any cline-yes">1x</span>
|
|
425
|
-
<span class="cline-any cline-no"> </span>
|
|
426
|
-
<span class="cline-any cline-no"> </span>
|
|
427
|
-
<span class="cline-any cline-no"> </span>
|
|
428
|
-
<span class="cline-any cline-yes">1x</span>
|
|
429
|
-
<span class="cline-any cline-no"> </span>
|
|
430
|
-
<span class="cline-any cline-no"> </span>
|
|
431
|
-
<span class="cline-any cline-no"> </span>
|
|
432
|
-
<span class="cline-any cline-no"> </span>
|
|
433
|
-
<span class="cline-any cline-yes">1x</span>
|
|
434
|
-
<span class="cline-any cline-yes">1x</span>
|
|
435
|
-
<span class="cline-any cline-yes">1x</span>
|
|
436
|
-
<span class="cline-any cline-yes">1x</span>
|
|
437
|
-
<span class="cline-any cline-yes">1x</span>
|
|
438
|
-
<span class="cline-any cline-yes">1x</span>
|
|
439
|
-
<span class="cline-any cline-yes">1x</span>
|
|
440
|
-
<span class="cline-any cline-yes">1x</span>
|
|
441
|
-
<span class="cline-any cline-yes">1x</span>
|
|
442
|
-
<span class="cline-any cline-yes">1x</span>
|
|
443
|
-
<span class="cline-any cline-yes">1x</span>
|
|
444
|
-
<span class="cline-any cline-yes">1x</span>
|
|
445
|
-
<span class="cline-any cline-yes">1x</span>
|
|
446
|
-
<span class="cline-any cline-yes">1x</span>
|
|
447
|
-
<span class="cline-any cline-yes">1x</span>
|
|
448
|
-
<span class="cline-any cline-yes">1x</span>
|
|
449
|
-
<span class="cline-any cline-yes">1x</span>
|
|
450
|
-
<span class="cline-any cline-yes">1x</span>
|
|
451
|
-
<span class="cline-any cline-yes">1x</span>
|
|
452
|
-
<span class="cline-any cline-yes">1x</span>
|
|
453
|
-
<span class="cline-any cline-yes">1x</span>
|
|
454
|
-
<span class="cline-any cline-yes">1x</span>
|
|
455
|
-
<span class="cline-any cline-yes">1x</span>
|
|
456
|
-
<span class="cline-any cline-yes">1x</span>
|
|
457
|
-
<span class="cline-any cline-yes">1x</span>
|
|
458
|
-
<span class="cline-any cline-yes">1x</span>
|
|
459
|
-
<span class="cline-any cline-yes">1x</span>
|
|
460
|
-
<span class="cline-any cline-yes">1x</span>
|
|
461
|
-
<span class="cline-any cline-yes">1x</span>
|
|
462
|
-
<span class="cline-any cline-yes">1x</span>
|
|
463
|
-
<span class="cline-any cline-yes">1x</span>
|
|
464
|
-
<span class="cline-any cline-yes">1x</span>
|
|
465
|
-
<span class="cline-any cline-yes">1x</span>
|
|
466
|
-
<span class="cline-any cline-yes">1x</span>
|
|
467
|
-
<span class="cline-any cline-yes">1x</span>
|
|
468
|
-
<span class="cline-any cline-yes">1x</span>
|
|
469
|
-
<span class="cline-any cline-yes">1x</span>
|
|
470
|
-
<span class="cline-any cline-yes">1x</span>
|
|
471
|
-
<span class="cline-any cline-yes">1x</span>
|
|
382
|
+
<a name='L317'></a><a href='#L317'>317</a></td><td class="line-coverage quiet"><span class="cline-any cline-no"> </span>
|
|
472
383
|
<span class="cline-any cline-no"> </span>
|
|
473
384
|
<span class="cline-any cline-no"> </span>
|
|
474
385
|
<span class="cline-any cline-no"> </span>
|
|
@@ -477,39 +388,6 @@
|
|
|
477
388
|
<span class="cline-any cline-no"> </span>
|
|
478
389
|
<span class="cline-any cline-no"> </span>
|
|
479
390
|
<span class="cline-any cline-no"> </span>
|
|
480
|
-
<span class="cline-any cline-yes">1x</span>
|
|
481
|
-
<span class="cline-any cline-yes">1x</span>
|
|
482
|
-
<span class="cline-any cline-yes">1x</span>
|
|
483
|
-
<span class="cline-any cline-yes">1x</span>
|
|
484
|
-
<span class="cline-any cline-yes">1x</span>
|
|
485
|
-
<span class="cline-any cline-yes">1x</span>
|
|
486
|
-
<span class="cline-any cline-yes">1x</span>
|
|
487
|
-
<span class="cline-any cline-yes">1x</span>
|
|
488
|
-
<span class="cline-any cline-yes">1x</span>
|
|
489
|
-
<span class="cline-any cline-yes">1x</span>
|
|
490
|
-
<span class="cline-any cline-yes">1x</span>
|
|
491
|
-
<span class="cline-any cline-yes">1x</span>
|
|
492
|
-
<span class="cline-any cline-yes">1x</span>
|
|
493
|
-
<span class="cline-any cline-yes">1x</span>
|
|
494
|
-
<span class="cline-any cline-yes">1x</span>
|
|
495
|
-
<span class="cline-any cline-yes">1x</span>
|
|
496
|
-
<span class="cline-any cline-yes">1x</span>
|
|
497
|
-
<span class="cline-any cline-yes">1x</span>
|
|
498
|
-
<span class="cline-any cline-yes">1x</span>
|
|
499
|
-
<span class="cline-any cline-yes">1x</span>
|
|
500
|
-
<span class="cline-any cline-yes">1x</span>
|
|
501
|
-
<span class="cline-any cline-yes">1x</span>
|
|
502
|
-
<span class="cline-any cline-yes">1x</span>
|
|
503
|
-
<span class="cline-any cline-yes">1x</span>
|
|
504
|
-
<span class="cline-any cline-yes">1x</span>
|
|
505
|
-
<span class="cline-any cline-yes">1x</span>
|
|
506
|
-
<span class="cline-any cline-yes">1x</span>
|
|
507
|
-
<span class="cline-any cline-yes">1x</span>
|
|
508
|
-
<span class="cline-any cline-yes">1x</span>
|
|
509
|
-
<span class="cline-any cline-yes">1x</span>
|
|
510
|
-
<span class="cline-any cline-yes">1x</span>
|
|
511
|
-
<span class="cline-any cline-yes">1x</span>
|
|
512
|
-
<span class="cline-any cline-yes">1x</span>
|
|
513
391
|
<span class="cline-any cline-no"> </span>
|
|
514
392
|
<span class="cline-any cline-no"> </span>
|
|
515
393
|
<span class="cline-any cline-no"> </span>
|
|
@@ -648,143 +526,265 @@
|
|
|
648
526
|
<span class="cline-any cline-no"> </span>
|
|
649
527
|
<span class="cline-any cline-no"> </span>
|
|
650
528
|
<span class="cline-any cline-no"> </span>
|
|
651
|
-
<span class="cline-any cline-
|
|
652
|
-
<span class="cline-any cline-
|
|
653
|
-
<span class="cline-any cline-
|
|
654
|
-
<span class="cline-any cline-
|
|
655
|
-
<span class="cline-any cline-
|
|
656
|
-
<span class="cline-any cline-
|
|
657
|
-
<span class="cline-any cline-
|
|
658
|
-
<span class="cline-any cline-
|
|
659
|
-
<span class="cline-any cline-
|
|
660
|
-
<span class="cline-any cline-
|
|
661
|
-
<span class="cline-any cline-
|
|
662
|
-
<span class="cline-any cline-
|
|
663
|
-
<span class="cline-any cline-
|
|
664
|
-
<span class="cline-any cline-
|
|
665
|
-
<span class="cline-any cline-
|
|
666
|
-
<span class="cline-any cline-
|
|
667
|
-
<span class="cline-any cline-
|
|
668
|
-
<span class="cline-any cline-
|
|
669
|
-
<span class="cline-any cline-
|
|
670
|
-
<span class="cline-any cline-
|
|
671
|
-
<span class="cline-any cline-
|
|
672
|
-
<span class="cline-any cline-
|
|
673
|
-
<span class="cline-any cline-
|
|
674
|
-
<span class="cline-any cline-
|
|
675
|
-
<span class="cline-any cline-
|
|
676
|
-
<span class="cline-any cline-
|
|
677
|
-
<span class="cline-any cline-
|
|
678
|
-
<span class="cline-any cline-
|
|
679
|
-
<span class="cline-any cline-
|
|
680
|
-
<span class="cline-any cline-
|
|
681
|
-
<span class="cline-any cline-
|
|
682
|
-
<span class="cline-any cline-
|
|
683
|
-
<span class="cline-any cline-
|
|
684
|
-
<span class="cline-any cline-
|
|
685
|
-
<span class="cline-any cline-
|
|
686
|
-
<span class="cline-any cline-
|
|
687
|
-
<span class="cline-any cline-
|
|
688
|
-
<span class="cline-any cline-
|
|
689
|
-
<span class="cline-any cline-
|
|
690
|
-
<span class="cline-any cline-
|
|
691
|
-
<span class="cline-any cline-
|
|
692
|
-
<span class="cline-any cline-
|
|
693
|
-
<span class="cline-any cline-
|
|
694
|
-
<span class="cline-any cline-
|
|
695
|
-
<span class="cline-any cline-
|
|
696
|
-
<span class="cline-any cline-
|
|
697
|
-
<span class="cline-any cline-
|
|
698
|
-
<span class="cline-any cline-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
<span class="
|
|
529
|
+
<span class="cline-any cline-no"> </span>
|
|
530
|
+
<span class="cline-any cline-no"> </span>
|
|
531
|
+
<span class="cline-any cline-no"> </span>
|
|
532
|
+
<span class="cline-any cline-no"> </span>
|
|
533
|
+
<span class="cline-any cline-no"> </span>
|
|
534
|
+
<span class="cline-any cline-no"> </span>
|
|
535
|
+
<span class="cline-any cline-no"> </span>
|
|
536
|
+
<span class="cline-any cline-no"> </span>
|
|
537
|
+
<span class="cline-any cline-no"> </span>
|
|
538
|
+
<span class="cline-any cline-no"> </span>
|
|
539
|
+
<span class="cline-any cline-no"> </span>
|
|
540
|
+
<span class="cline-any cline-no"> </span>
|
|
541
|
+
<span class="cline-any cline-no"> </span>
|
|
542
|
+
<span class="cline-any cline-no"> </span>
|
|
543
|
+
<span class="cline-any cline-no"> </span>
|
|
544
|
+
<span class="cline-any cline-no"> </span>
|
|
545
|
+
<span class="cline-any cline-no"> </span>
|
|
546
|
+
<span class="cline-any cline-no"> </span>
|
|
547
|
+
<span class="cline-any cline-no"> </span>
|
|
548
|
+
<span class="cline-any cline-no"> </span>
|
|
549
|
+
<span class="cline-any cline-no"> </span>
|
|
550
|
+
<span class="cline-any cline-no"> </span>
|
|
551
|
+
<span class="cline-any cline-no"> </span>
|
|
552
|
+
<span class="cline-any cline-no"> </span>
|
|
553
|
+
<span class="cline-any cline-no"> </span>
|
|
554
|
+
<span class="cline-any cline-no"> </span>
|
|
555
|
+
<span class="cline-any cline-no"> </span>
|
|
556
|
+
<span class="cline-any cline-no"> </span>
|
|
557
|
+
<span class="cline-any cline-no"> </span>
|
|
558
|
+
<span class="cline-any cline-no"> </span>
|
|
559
|
+
<span class="cline-any cline-no"> </span>
|
|
560
|
+
<span class="cline-any cline-no"> </span>
|
|
561
|
+
<span class="cline-any cline-no"> </span>
|
|
562
|
+
<span class="cline-any cline-no"> </span>
|
|
563
|
+
<span class="cline-any cline-no"> </span>
|
|
564
|
+
<span class="cline-any cline-no"> </span>
|
|
565
|
+
<span class="cline-any cline-no"> </span>
|
|
566
|
+
<span class="cline-any cline-no"> </span>
|
|
567
|
+
<span class="cline-any cline-no"> </span>
|
|
568
|
+
<span class="cline-any cline-no"> </span>
|
|
569
|
+
<span class="cline-any cline-no"> </span>
|
|
570
|
+
<span class="cline-any cline-no"> </span>
|
|
571
|
+
<span class="cline-any cline-no"> </span>
|
|
572
|
+
<span class="cline-any cline-no"> </span>
|
|
573
|
+
<span class="cline-any cline-no"> </span>
|
|
574
|
+
<span class="cline-any cline-no"> </span>
|
|
575
|
+
<span class="cline-any cline-no"> </span>
|
|
576
|
+
<span class="cline-any cline-no"> </span>
|
|
577
|
+
<span class="cline-any cline-no"> </span>
|
|
578
|
+
<span class="cline-any cline-no"> </span>
|
|
579
|
+
<span class="cline-any cline-no"> </span>
|
|
580
|
+
<span class="cline-any cline-no"> </span>
|
|
581
|
+
<span class="cline-any cline-no"> </span>
|
|
582
|
+
<span class="cline-any cline-no"> </span>
|
|
583
|
+
<span class="cline-any cline-no"> </span>
|
|
584
|
+
<span class="cline-any cline-no"> </span>
|
|
585
|
+
<span class="cline-any cline-no"> </span>
|
|
586
|
+
<span class="cline-any cline-no"> </span>
|
|
587
|
+
<span class="cline-any cline-no"> </span>
|
|
588
|
+
<span class="cline-any cline-no"> </span>
|
|
589
|
+
<span class="cline-any cline-no"> </span>
|
|
590
|
+
<span class="cline-any cline-no"> </span>
|
|
591
|
+
<span class="cline-any cline-no"> </span>
|
|
592
|
+
<span class="cline-any cline-no"> </span>
|
|
593
|
+
<span class="cline-any cline-no"> </span>
|
|
594
|
+
<span class="cline-any cline-no"> </span>
|
|
595
|
+
<span class="cline-any cline-no"> </span>
|
|
596
|
+
<span class="cline-any cline-no"> </span>
|
|
597
|
+
<span class="cline-any cline-no"> </span>
|
|
598
|
+
<span class="cline-any cline-no"> </span>
|
|
599
|
+
<span class="cline-any cline-no"> </span>
|
|
600
|
+
<span class="cline-any cline-no"> </span>
|
|
601
|
+
<span class="cline-any cline-no"> </span>
|
|
602
|
+
<span class="cline-any cline-no"> </span>
|
|
603
|
+
<span class="cline-any cline-no"> </span>
|
|
604
|
+
<span class="cline-any cline-no"> </span>
|
|
605
|
+
<span class="cline-any cline-no"> </span>
|
|
606
|
+
<span class="cline-any cline-no"> </span>
|
|
607
|
+
<span class="cline-any cline-no"> </span>
|
|
608
|
+
<span class="cline-any cline-no"> </span>
|
|
609
|
+
<span class="cline-any cline-no"> </span>
|
|
610
|
+
<span class="cline-any cline-no"> </span>
|
|
611
|
+
<span class="cline-any cline-no"> </span>
|
|
612
|
+
<span class="cline-any cline-no"> </span>
|
|
613
|
+
<span class="cline-any cline-no"> </span>
|
|
614
|
+
<span class="cline-any cline-no"> </span>
|
|
615
|
+
<span class="cline-any cline-no"> </span>
|
|
616
|
+
<span class="cline-any cline-no"> </span>
|
|
617
|
+
<span class="cline-any cline-no"> </span>
|
|
618
|
+
<span class="cline-any cline-no"> </span>
|
|
619
|
+
<span class="cline-any cline-no"> </span>
|
|
620
|
+
<span class="cline-any cline-no"> </span>
|
|
621
|
+
<span class="cline-any cline-no"> </span>
|
|
622
|
+
<span class="cline-any cline-no"> </span>
|
|
623
|
+
<span class="cline-any cline-no"> </span>
|
|
624
|
+
<span class="cline-any cline-no"> </span>
|
|
625
|
+
<span class="cline-any cline-no"> </span>
|
|
626
|
+
<span class="cline-any cline-no"> </span>
|
|
627
|
+
<span class="cline-any cline-no"> </span>
|
|
628
|
+
<span class="cline-any cline-no"> </span>
|
|
629
|
+
<span class="cline-any cline-no"> </span>
|
|
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
|
+
<span class="cline-any cline-no"> </span>
|
|
634
|
+
<span class="cline-any cline-no"> </span>
|
|
635
|
+
<span class="cline-any cline-no"> </span>
|
|
636
|
+
<span class="cline-any cline-no"> </span>
|
|
637
|
+
<span class="cline-any cline-no"> </span>
|
|
638
|
+
<span class="cline-any cline-no"> </span>
|
|
639
|
+
<span class="cline-any cline-no"> </span>
|
|
640
|
+
<span class="cline-any cline-no"> </span>
|
|
641
|
+
<span class="cline-any cline-no"> </span>
|
|
642
|
+
<span class="cline-any cline-no"> </span>
|
|
643
|
+
<span class="cline-any cline-no"> </span>
|
|
644
|
+
<span class="cline-any cline-no"> </span>
|
|
645
|
+
<span class="cline-any cline-no"> </span>
|
|
646
|
+
<span class="cline-any cline-no"> </span>
|
|
647
|
+
<span class="cline-any cline-no"> </span>
|
|
648
|
+
<span class="cline-any cline-no"> </span>
|
|
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
|
+
<span class="cline-any cline-no"> </span>
|
|
653
|
+
<span class="cline-any cline-no"> </span>
|
|
654
|
+
<span class="cline-any cline-no"> </span>
|
|
655
|
+
<span class="cline-any cline-no"> </span>
|
|
656
|
+
<span class="cline-any cline-no"> </span>
|
|
657
|
+
<span class="cline-any cline-no"> </span>
|
|
658
|
+
<span class="cline-any cline-no"> </span>
|
|
659
|
+
<span class="cline-any cline-no"> </span>
|
|
660
|
+
<span class="cline-any cline-no"> </span>
|
|
661
|
+
<span class="cline-any cline-no"> </span>
|
|
662
|
+
<span class="cline-any cline-no"> </span>
|
|
663
|
+
<span class="cline-any cline-no"> </span>
|
|
664
|
+
<span class="cline-any cline-no"> </span>
|
|
665
|
+
<span class="cline-any cline-no"> </span>
|
|
666
|
+
<span class="cline-any cline-no"> </span>
|
|
667
|
+
<span class="cline-any cline-no"> </span>
|
|
668
|
+
<span class="cline-any cline-no"> </span>
|
|
669
|
+
<span class="cline-any cline-no"> </span>
|
|
670
|
+
<span class="cline-any cline-no"> </span>
|
|
671
|
+
<span class="cline-any cline-no"> </span>
|
|
672
|
+
<span class="cline-any cline-no"> </span>
|
|
673
|
+
<span class="cline-any cline-no"> </span>
|
|
674
|
+
<span class="cline-any cline-no"> </span>
|
|
675
|
+
<span class="cline-any cline-no"> </span>
|
|
676
|
+
<span class="cline-any cline-no"> </span>
|
|
677
|
+
<span class="cline-any cline-no"> </span>
|
|
678
|
+
<span class="cline-any cline-no"> </span>
|
|
679
|
+
<span class="cline-any cline-no"> </span>
|
|
680
|
+
<span class="cline-any cline-no"> </span>
|
|
681
|
+
<span class="cline-any cline-no"> </span>
|
|
682
|
+
<span class="cline-any cline-no"> </span>
|
|
683
|
+
<span class="cline-any cline-no"> </span>
|
|
684
|
+
<span class="cline-any cline-no"> </span>
|
|
685
|
+
<span class="cline-any cline-no"> </span>
|
|
686
|
+
<span class="cline-any cline-no"> </span>
|
|
687
|
+
<span class="cline-any cline-no"> </span>
|
|
688
|
+
<span class="cline-any cline-no"> </span>
|
|
689
|
+
<span class="cline-any cline-no"> </span>
|
|
690
|
+
<span class="cline-any cline-no"> </span>
|
|
691
|
+
<span class="cline-any cline-no"> </span>
|
|
692
|
+
<span class="cline-any cline-no"> </span>
|
|
693
|
+
<span class="cline-any cline-no"> </span>
|
|
694
|
+
<span class="cline-any cline-no"> </span>
|
|
695
|
+
<span class="cline-any cline-no"> </span>
|
|
696
|
+
<span class="cline-any cline-no"> </span>
|
|
697
|
+
<span class="cline-any cline-no"> </span>
|
|
698
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" ><span class="branch-0 cbranch-no" title="branch not covered" >import _ from 'lodash'</span></span></span>
|
|
699
|
+
<span class="cstat-no" title="statement not covered" >import moment from 'moment'</span>
|
|
700
|
+
<span class="cstat-no" title="statement not covered" >import { unitConverters, SortOrder, GridSource, Grid1D, TiledGrid, SubGrid } from './grid.js'</span>
|
|
701
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
702
|
+
<span class="cstat-no" title="statement not covered" >// computes how many equidistant points are required to generate</span>
|
|
703
|
+
<span class="cstat-no" title="statement not covered" >// points at most every 'precision' degrees</span>
|
|
704
|
+
<span class="cstat-no" title="statement not covered" >function additionalPointsNeeded (lat, lon1, lon2, precision) {</span>
|
|
705
|
+
<span class="cstat-no" title="statement not covered" > /*</span>
|
|
706
|
+
<span class="cstat-no" title="statement not covered" > const p0 = [lon1, lat]</span>
|
|
707
|
+
<span class="cstat-no" title="statement not covered" > const p1 = [lon2, lat]</span>
|
|
708
|
+
<span class="cstat-no" title="statement not covered" > const dist = distance(p0, p1, { units: 'kilometers' })</span>
|
|
709
|
+
<span class="cstat-no" title="statement not covered" > */</span>
|
|
710
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
711
|
+
<span class="cstat-no" title="statement not covered" > const dist = lon2 - lon1</span>
|
|
712
|
+
<span class="cstat-no" title="statement not covered" > const num = Math.ceil(dist / precision) - 1</span>
|
|
713
|
+
<span class="cstat-no" title="statement not covered" > return Math.max(0, num)</span>
|
|
714
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
715
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
716
|
+
<span class="cstat-no" title="statement not covered" >// compute a query polygon where we make sure that</span>
|
|
717
|
+
<span class="cstat-no" title="statement not covered" >// we'll have a point at most every 'precision' degrees</span>
|
|
718
|
+
<span class="cstat-no" title="statement not covered" >// on longitudinal segments</span>
|
|
719
|
+
<span class="cstat-no" title="statement not covered" >function makeMongoPolygon (bbox, precision) {</span>
|
|
720
|
+
<span class="cstat-no" title="statement not covered" > const minLatPoints = additionalPointsNeeded(bbox[0], bbox[1], bbox[3], precision)</span>
|
|
721
|
+
<span class="cstat-no" title="statement not covered" > const maxLatPoints = additionalPointsNeeded(bbox[2], bbox[1], bbox[3], precision)</span>
|
|
722
|
+
<span class="cstat-no" title="statement not covered" > const deltaLon = bbox[3] - bbox[1]</span>
|
|
723
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
724
|
+
<span class="cstat-no" title="statement not covered" > const polygon = []</span>
|
|
725
|
+
<span class="cstat-no" title="statement not covered" > for (let i = 0; i < minLatPoints + 2; ++i) {</span>
|
|
726
|
+
<span class="cstat-no" title="statement not covered" > const lon = bbox[1] + (i / (minLatPoints + 1)) * deltaLon</span>
|
|
727
|
+
<span class="cstat-no" title="statement not covered" > polygon.push([lon, bbox[0]])</span>
|
|
728
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
729
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
730
|
+
<span class="cstat-no" title="statement not covered" > for (let i = 0; i < maxLatPoints + 2; ++i) {</span>
|
|
731
|
+
<span class="cstat-no" title="statement not covered" > const lon = bbox[3] - (i / (maxLatPoints + 1)) * deltaLon</span>
|
|
732
|
+
<span class="cstat-no" title="statement not covered" > polygon.push([lon, bbox[2]])</span>
|
|
733
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
734
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
735
|
+
<span class="cstat-no" title="statement not covered" > // closing point</span>
|
|
736
|
+
<span class="cstat-no" title="statement not covered" > polygon.push([bbox[1], bbox[0]])</span>
|
|
737
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
738
|
+
<span class="cstat-no" title="statement not covered" > return polygon</span>
|
|
739
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
740
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
741
|
+
<span class="cstat-no" title="statement not covered" >function tile2key (x, y) {</span>
|
|
742
742
|
<span class="cstat-no" title="statement not covered" > return x * 4294967296 + y</span>
|
|
743
743
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
744
|
-
|
|
745
|
-
<span class="cstat-no" title="statement not covered"
|
|
744
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
745
|
+
<span class="cstat-no" title="statement not covered" >function key2tile (k) {</span>
|
|
746
746
|
<span class="cstat-no" title="statement not covered" > const x = Math.floor(k / 4294967296)</span>
|
|
747
747
|
<span class="cstat-no" title="statement not covered" > return [x, k - (x * 4294967296)]</span>
|
|
748
748
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
749
|
-
|
|
750
|
-
export class WeacastGridSource extends GridSource {
|
|
751
|
-
static getKey () {
|
|
752
|
-
return 'weacast'
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
constructor (options) {
|
|
756
|
-
super(options)
|
|
757
|
-
|
|
758
|
-
this.api = options.weacastApi
|
|
759
|
-
this.usable = false
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
getBBox () {
|
|
763
|
-
return this.usable ? [this.minMaxLat[0], this.minMaxLon[0], this.minMaxLat[1], this.minMaxLon[1]]
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
getDataBounds () {
|
|
767
|
-
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
async setup (config) {
|
|
771
|
-
this.usable = false
|
|
772
|
-
++this.sourceKey
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
// find the model
|
|
777
|
-
const model = this.api.models.find(model => model.name === config.model)
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
this.converter = unitConverters[config.converter]
|
|
781
|
-
this.time = moment(config.forecastTime).utc().format()
|
|
782
|
-
this.service = config.model + '/' + config.element
|
|
783
|
-
this.lonResolution = model.tileResolution[0]
|
|
784
|
-
|
|
785
|
-
this.useCache = _.get(config, 'useCache', true)
|
|
786
|
-
this.maxCacheSize = _.get(config, 'maxCacheSize', 0)
|
|
787
|
-
|
|
749
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
750
|
+
<span class="cstat-no" title="statement not covered" >export class WeacastGridSource extends GridSource {</span>
|
|
751
|
+
<span class="cstat-no" title="statement not covered" > static getKey () {</span>
|
|
752
|
+
<span class="cstat-no" title="statement not covered" > return 'weacast'</span>
|
|
753
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
754
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
755
|
+
<span class="cstat-no" title="statement not covered" > constructor (options) {</span>
|
|
756
|
+
<span class="cstat-no" title="statement not covered" > super(options)</span>
|
|
757
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
758
|
+
<span class="cstat-no" title="statement not covered" > this.api = options.weacastApi</span>
|
|
759
|
+
<span class="cstat-no" title="statement not covered" > this.usable = false</span>
|
|
760
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
761
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
762
|
+
<span class="cstat-no" title="statement not covered" > getBBox () {</span>
|
|
763
|
+
<span class="cstat-no" title="statement not covered" > return this.usable ? [this.minMaxLat[0], this.minMaxLon[0], this.minMaxLat[1], this.minMaxLon[1]] : null</span>
|
|
764
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
765
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
766
|
+
<span class="cstat-no" title="statement not covered" > getDataBounds () {</span>
|
|
767
|
+
<span class="cstat-no" title="statement not covered" > return this.usable ? this.minMaxVal : null</span>
|
|
768
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
769
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
770
|
+
<span class="cstat-no" title="statement not covered" > async setup (config) {</span>
|
|
771
|
+
<span class="cstat-no" title="statement not covered" > this.usable = false</span>
|
|
772
|
+
<span class="cstat-no" title="statement not covered" > ++this.sourceKey</span>
|
|
773
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
774
|
+
<span class="cstat-no" title="statement not covered" > if (!this.api) return</span>
|
|
775
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
776
|
+
<span class="cstat-no" title="statement not covered" > // find the model</span>
|
|
777
|
+
<span class="cstat-no" title="statement not covered" > const model = this.api.models.find(model => model.name === config.model)</span>
|
|
778
|
+
<span class="cstat-no" title="statement not covered" > if (!model) return</span>
|
|
779
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
780
|
+
<span class="cstat-no" title="statement not covered" > this.converter = unitConverters[config.converter]</span>
|
|
781
|
+
<span class="cstat-no" title="statement not covered" > this.time = moment(config.forecastTime).utc().format()</span>
|
|
782
|
+
<span class="cstat-no" title="statement not covered" > this.service = config.model + '/' + config.element</span>
|
|
783
|
+
<span class="cstat-no" title="statement not covered" > this.lonResolution = model.tileResolution[0]</span>
|
|
784
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
785
|
+
<span class="cstat-no" title="statement not covered" > this.useCache = _.get(config, 'useCache', true)</span>
|
|
786
|
+
<span class="cstat-no" title="statement not covered" > this.maxCacheSize = _.get(config, 'maxCacheSize', 0)</span>
|
|
787
|
+
<span class="cstat-no" title="statement not covered" > if (this.useCache) {</span>
|
|
788
788
|
<span class="cstat-no" title="statement not covered" > this.tileCache = new Map()</span>
|
|
789
789
|
<span class="cstat-no" title="statement not covered" > this.tileCounter = 0</span>
|
|
790
790
|
<span class="cstat-no" title="statement not covered" ></span>
|
|
@@ -793,39 +793,39 @@ export class WeacastGridSource extends GridSource {
|
|
|
793
793
|
<span class="cstat-no" title="statement not covered" > this.wrapLon = model.bounds[2] > 180.0</span>
|
|
794
794
|
<span class="cstat-no" title="statement not covered" > this.maxTileX = ((model.bounds[2] - model.bounds[0]) / model.tileResolution[0]) - 1</span>
|
|
795
795
|
<span class="cstat-no" title="statement not covered" > this.maxTileY = ((model.bounds[3] - model.bounds[1]) / model.tileResolution[1]) - 1</span>
|
|
796
|
-
} else {
|
|
797
|
-
this.tileCache = null
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
this.minMaxLat = [model.bounds[1], model.bounds[3]]
|
|
801
|
-
// Internal tile management requires longitude in [-180, 180]
|
|
802
|
-
const wrapLongitude = (model.bounds[2] === 360)
|
|
803
|
-
|
|
804
|
-
this.minMaxVal = null
|
|
805
|
-
|
|
806
|
-
const query = {
|
|
807
|
-
time: this.time
|
|
808
|
-
$select: ['forecastTime', 'minValue', 'maxValue']
|
|
809
|
-
$paginate: false
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
const results = await this.api.getService(this.service).find({ query })
|
|
813
|
-
if (results.length > 0) this.minMaxVal = [results[0].minValue, results[0].maxValue]
|
|
814
|
-
|
|
815
|
-
this.usable = true
|
|
816
|
-
|
|
817
|
-
this.dataChanged()
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
fetch (abort, bbox, resolution) {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
return this.useCache
|
|
824
|
-
<span class="
|
|
825
|
-
: this.fetchWithoutCache(abort, bbox, resolution)
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
<span class="
|
|
796
|
+
<span class="cstat-no" title="statement not covered" > } else {</span>
|
|
797
|
+
<span class="cstat-no" title="statement not covered" > this.tileCache = null</span>
|
|
798
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
799
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
800
|
+
<span class="cstat-no" title="statement not covered" > this.minMaxLat = [model.bounds[1], model.bounds[3]]</span>
|
|
801
|
+
<span class="cstat-no" title="statement not covered" > // Internal tile management requires longitude in [-180, 180]</span>
|
|
802
|
+
<span class="cstat-no" title="statement not covered" > const wrapLongitude = (model.bounds[2] === 360)</span>
|
|
803
|
+
<span class="cstat-no" title="statement not covered" > this.minMaxLon = [wrapLongitude ? -180 : model.bounds[0], wrapLongitude ? 180 : model.bounds[2]]</span>
|
|
804
|
+
<span class="cstat-no" title="statement not covered" > this.minMaxVal = null</span>
|
|
805
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
806
|
+
<span class="cstat-no" title="statement not covered" > const query = {</span>
|
|
807
|
+
<span class="cstat-no" title="statement not covered" > time: this.time,</span>
|
|
808
|
+
<span class="cstat-no" title="statement not covered" > $select: ['forecastTime', 'minValue', 'maxValue'],</span>
|
|
809
|
+
<span class="cstat-no" title="statement not covered" > $paginate: false</span>
|
|
810
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
811
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
812
|
+
<span class="cstat-no" title="statement not covered" > const results = await this.api.getService(this.service).find({ query })</span>
|
|
813
|
+
<span class="cstat-no" title="statement not covered" > if (results.length > 0) this.minMaxVal = [results[0].minValue, results[0].maxValue]</span>
|
|
814
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
815
|
+
<span class="cstat-no" title="statement not covered" > this.usable = true</span>
|
|
816
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
817
|
+
<span class="cstat-no" title="statement not covered" > this.dataChanged()</span>
|
|
818
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
819
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
820
|
+
<span class="cstat-no" title="statement not covered" > fetch (abort, bbox, resolution) {</span>
|
|
821
|
+
<span class="cstat-no" title="statement not covered" > if (!this.usable) { return null }</span>
|
|
822
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
823
|
+
<span class="cstat-no" title="statement not covered" > return this.useCache</span>
|
|
824
|
+
<span class="cstat-no" title="statement not covered" > ? this.fetchWithCache(abort, bbox, resolution)</span>
|
|
825
|
+
<span class="cstat-no" title="statement not covered" > : this.fetchWithoutCache(abort, bbox, resolution)</span>
|
|
826
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
827
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
828
|
+
<span class="cstat-no" title="statement not covered" > async fetchWithCache (abort, bbox, resolution) {</span>
|
|
829
829
|
<span class="cstat-no" title="statement not covered" > // compute which weacast tile(s) we're going to hit</span>
|
|
830
830
|
<span class="cstat-no" title="statement not covered" > const minLon = this.wrapLon ? (bbox[1] < 0 ? bbox[1] + 360.0 : bbox[1]) : bbox[1]</span>
|
|
831
831
|
<span class="cstat-no" title="statement not covered" > const maxLon = this.wrapLon ? (bbox[3] < 0 ? bbox[3] + 360.0 : bbox[3]) : bbox[3]</span>
|
|
@@ -964,53 +964,53 @@ export class WeacastGridSource extends GridSource {
|
|
|
964
964
|
<span class="cstat-no" title="statement not covered" > const grid = allGrids.length > 1 ? new TiledGrid(sourceKey, allGrids) : allGrids[0]</span>
|
|
965
965
|
<span class="cstat-no" title="statement not covered" > return new SubGrid(sourceKey, grid, bbox)</span>
|
|
966
966
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
967
|
-
|
|
968
|
-
async fetchWithoutCache (abort, bbox, resolution) {
|
|
969
|
-
const query = {
|
|
970
|
-
time: this.time
|
|
971
|
-
$select: ['forecastTime', 'data', 'geometry', 'size']
|
|
972
|
-
$paginate: false
|
|
973
|
-
// build a polygon with points longitudaly spaced every lonResolution degrees
|
|
974
|
-
// otherwise mongodb will connect points using shortest path on sphere
|
|
975
|
-
// which is not going to be a square lat/lon box
|
|
976
|
-
geometry: {
|
|
977
|
-
$geoIntersects: {
|
|
978
|
-
$geometry: {
|
|
979
|
-
type: 'Polygon'
|
|
980
|
-
coordinates: [makeMongoPolygon(bbox, this.lonResolution)]
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
const sourceKey = this.sourceKey
|
|
987
|
-
const results = await this.api.getService(this.service).find({ query })
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
// This is to target raw data
|
|
991
|
-
// return new Grid1D(
|
|
992
|
-
// bbox, [width, height]
|
|
993
|
-
// results[0].data, true, SortOrder.DESCENDING, SortOrder.ASCENDING
|
|
994
|
-
// this.nodata, this.converter)
|
|
995
|
-
// This is to target tiles instead of raw data
|
|
996
|
-
const tiles = []
|
|
997
|
-
for (const tile of results) {
|
|
998
|
-
const tileBBox = tile.geometry.coordinates[0] // BBox as a polygon
|
|
999
|
-
const tileBounds = [tileBBox[0][1], tileBBox[0][0], tileBBox[2][1], tileBBox[2][0]]
|
|
1000
|
-
// normalize bounds when crossing longitude 180/-180
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
const grid = new Grid1D(
|
|
1004
|
-
sourceKey
|
|
1005
|
-
tileBounds, tile.size
|
|
1006
|
-
tile.data, true, SortOrder.DESCENDING, SortOrder.ASCENDING
|
|
1007
|
-
this.nodata, this.converter)
|
|
1008
|
-
tiles.push(grid)
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
return tiles.length > 1 ? new TiledGrid(sourceKey, tiles)
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
967
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
968
|
+
<span class="cstat-no" title="statement not covered" > async fetchWithoutCache (abort, bbox, resolution) {</span>
|
|
969
|
+
<span class="cstat-no" title="statement not covered" > const query = {</span>
|
|
970
|
+
<span class="cstat-no" title="statement not covered" > time: this.time,</span>
|
|
971
|
+
<span class="cstat-no" title="statement not covered" > $select: ['forecastTime', 'data', 'geometry', 'size'],</span>
|
|
972
|
+
<span class="cstat-no" title="statement not covered" > $paginate: false,</span>
|
|
973
|
+
<span class="cstat-no" title="statement not covered" > // build a polygon with points longitudaly spaced every lonResolution degrees</span>
|
|
974
|
+
<span class="cstat-no" title="statement not covered" > // otherwise mongodb will connect points using shortest path on sphere</span>
|
|
975
|
+
<span class="cstat-no" title="statement not covered" > // which is not going to be a square lat/lon box</span>
|
|
976
|
+
<span class="cstat-no" title="statement not covered" > geometry: {</span>
|
|
977
|
+
<span class="cstat-no" title="statement not covered" > $geoIntersects: {</span>
|
|
978
|
+
<span class="cstat-no" title="statement not covered" > $geometry: {</span>
|
|
979
|
+
<span class="cstat-no" title="statement not covered" > type: 'Polygon',</span>
|
|
980
|
+
<span class="cstat-no" title="statement not covered" > coordinates: [makeMongoPolygon(bbox, this.lonResolution)]</span>
|
|
981
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
982
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
983
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
984
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
985
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
986
|
+
<span class="cstat-no" title="statement not covered" > const sourceKey = this.sourceKey</span>
|
|
987
|
+
<span class="cstat-no" title="statement not covered" > const results = await this.api.getService(this.service).find({ query })</span>
|
|
988
|
+
<span class="cstat-no" title="statement not covered" > if (results.length === 0) return null</span>
|
|
989
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
990
|
+
<span class="cstat-no" title="statement not covered" > // This is to target raw data</span>
|
|
991
|
+
<span class="cstat-no" title="statement not covered" > // return new Grid1D(</span>
|
|
992
|
+
<span class="cstat-no" title="statement not covered" > // bbox, [width, height],</span>
|
|
993
|
+
<span class="cstat-no" title="statement not covered" > // results[0].data, true, SortOrder.DESCENDING, SortOrder.ASCENDING,</span>
|
|
994
|
+
<span class="cstat-no" title="statement not covered" > // this.nodata, this.converter)</span>
|
|
995
|
+
<span class="cstat-no" title="statement not covered" > // This is to target tiles instead of raw data</span>
|
|
996
|
+
<span class="cstat-no" title="statement not covered" > const tiles = []</span>
|
|
997
|
+
<span class="cstat-no" title="statement not covered" > for (const tile of results) {</span>
|
|
998
|
+
<span class="cstat-no" title="statement not covered" > const tileBBox = tile.geometry.coordinates[0] // BBox as a polygon</span>
|
|
999
|
+
<span class="cstat-no" title="statement not covered" > const tileBounds = [tileBBox[0][1], tileBBox[0][0], tileBBox[2][1], tileBBox[2][0]]</span>
|
|
1000
|
+
<span class="cstat-no" title="statement not covered" > // normalize bounds when crossing longitude 180/-180</span>
|
|
1001
|
+
<span class="cstat-no" title="statement not covered" > if (tileBounds[1] > tileBounds[3]) tileBounds[1] -= 360.0</span>
|
|
1002
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
1003
|
+
<span class="cstat-no" title="statement not covered" > const grid = new Grid1D(</span>
|
|
1004
|
+
<span class="cstat-no" title="statement not covered" > sourceKey,</span>
|
|
1005
|
+
<span class="cstat-no" title="statement not covered" > tileBounds, tile.size,</span>
|
|
1006
|
+
<span class="cstat-no" title="statement not covered" > tile.data, true, SortOrder.DESCENDING, SortOrder.ASCENDING,</span>
|
|
1007
|
+
<span class="cstat-no" title="statement not covered" > this.nodata, this.converter)</span>
|
|
1008
|
+
<span class="cstat-no" title="statement not covered" > tiles.push(grid)</span>
|
|
1009
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1010
|
+
<span class="cstat-no" title="statement not covered" ></span>
|
|
1011
|
+
<span class="cstat-no" title="statement not covered" > return tiles.length > 1 ? new TiledGrid(sourceKey, tiles) : tiles[0]</span>
|
|
1012
|
+
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1013
|
+
<span class="cstat-no" title="statement not covered" >}</span>
|
|
1014
1014
|
</pre></td></tr></table></pre>
|
|
1015
1015
|
|
|
1016
1016
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -1018,7 +1018,7 @@ export class WeacastGridSource extends GridSource {
|
|
|
1018
1018
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1019
1019
|
Code coverage generated by
|
|
1020
1020
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1021
|
-
at
|
|
1021
|
+
at 2024-08-13T10:02:04.872Z
|
|
1022
1022
|
</div>
|
|
1023
1023
|
<script src="../../prettify.js"></script>
|
|
1024
1024
|
<script>
|