@geoscene/core 4.34.10 → 4.34.12
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/LICENSE.md +18 -18
- package/README.md +25 -25
- package/WebLinkChart.js +1 -1
- package/assets/geoscene/core/workers/chunks/0f735b0dec173142f3b6.js +1 -1
- package/assets/geoscene/core/workers/chunks/3a457e718a901a45902e.js +1 -1
- package/assets/geoscene/core/workers/chunks/49571d6875de1f2e7e25.js +32 -32
- package/assets/geoscene/core/workers/chunks/7565b382f6b3d2cb46a3.js +1 -1
- package/assets/geoscene/core/workers/chunks/9ff8ee6ed6b98c03ae7e.js +1 -1
- package/assets/geoscene/core/workers/chunks/aa78b69219d9a0ef1c54.js +1 -1
- package/assets/geoscene/core/workers/chunks/ce16489cf7eb0d78c741.js +1 -1
- package/assets/geoscene/core/workers/chunks/d6e0528eacee7ea4c1ce.js +1 -1
- package/assets/geoscene/core/workers/chunks/f651c05604eab83aef5f.js +1 -1
- package/assets/geoscene/css/main.scss +1 -1
- package/assets/geoscene/css/view.scss +1 -1
- package/assets/geoscene/themes/base/_colorVariables.scss +1 -1
- package/assets/geoscene/themes/base/_core.scss +1 -1
- package/assets/geoscene/themes/base/_functions.scss +23 -23
- package/assets/geoscene/themes/base/_layout.scss +11 -11
- package/assets/geoscene/themes/base/_sizes.scss +130 -130
- package/assets/geoscene/themes/base/_type.scss +25 -25
- package/assets/geoscene/themes/base/colors/css/brand_colors.css +76 -76
- package/assets/geoscene/themes/base/colors/css/calcite_core_colors.css +169 -169
- package/assets/geoscene/themes/base/colors/css/calcite_core_colors_dark.css +169 -169
- package/assets/geoscene/themes/base/colors/css/calcite_gray_colors.css +43 -43
- package/assets/geoscene/themes/base/colors/css/calcite_gray_colors_dark.css +43 -43
- package/assets/geoscene/themes/base/colors/css/calcite_highlight_colors.css +43 -43
- package/assets/geoscene/themes/base/colors/css/calcite_highlight_colors_dark.css +43 -43
- package/assets/geoscene/themes/base/colors/css/calcite_vibrant_colors.css +67 -67
- package/assets/geoscene/themes/base/colors/css/calcite_vibrant_colors_dark.css +67 -67
- package/assets/geoscene/themes/base/colors/css/complete.css +610 -610
- package/assets/geoscene/themes/base/colors/css/scss/calcite_core_colors_dark.scss +285 -285
- package/assets/geoscene/themes/base/colors/css/scss/calcite_gray_colors_dark.scss +91 -91
- package/assets/geoscene/themes/base/colors/css/scss/calcite_highlight_colors_dark.scss +64 -64
- package/assets/geoscene/themes/base/colors/css/scss/calcite_vibrant_colors_dark.scss +124 -124
- package/assets/geoscene/themes/base/colors/css/scss/complete.scss +11 -11
- package/assets/geoscene/themes/base/colors/patterns_json/calcite_core_colors_dark.css +673 -673
- package/assets/geoscene/themes/base/colors/patterns_json/calcite_gray_colors_dark.css +169 -169
- package/assets/geoscene/themes/base/colors/patterns_json/calcite_highlight_colors_dark.css +169 -169
- package/assets/geoscene/themes/base/colors/patterns_json/calcite_vibrant_colors_dark.css +265 -265
- package/assets/geoscene/themes/base/colors/patterns_json/scss/calcite_core_colors_dark.scss +964 -964
- package/assets/geoscene/themes/base/colors/patterns_json/scss/calcite_gray_colors_dark.scss +263 -263
- package/assets/geoscene/themes/base/colors/patterns_json/scss/calcite_highlight_colors_dark.scss +234 -234
- package/assets/geoscene/themes/base/colors/patterns_json/scss/calcite_vibrant_colors_dark.scss +347 -347
- package/assets/geoscene/themes/base/colors/patterns_json/scss/complete.scss +11 -11
- package/assets/geoscene/themes/base/fonts/cdn.scss +2 -2
- package/assets/geoscene/themes/base/icons/fonts/CalciteWebCoreIcons.svg +196 -196
- package/assets/geoscene/themes/base/widgets/_AreaMeasurement2D.scss +7 -7
- package/assets/geoscene/themes/base/widgets/_AreaMeasurement3D.scss +7 -7
- package/assets/geoscene/themes/base/widgets/_DirectLineMeasurement3D.scss +7 -7
- package/assets/geoscene/themes/base/widgets/_DistanceMeasurement2D.scss +7 -7
- package/assets/geoscene/themes/base/widgets/_Measurement.scss +7 -7
- package/assets/geoscene/themes/light/view.scss +9 -9
- package/assets/geoscene/views/3d/analysis/images/heading-rotate.ts.svg +10 -10
- package/assets/geoscene/views/3d/analysis/images/tilt-rotate.ts.svg +11 -11
- package/assets/geoscene/views/3d/webgl-engine/lib/intersectorUtils.svg +117 -117
- package/assets/geoscene/views/magnifier/mask.ts.svg +5 -5
- package/assets/geoscene/views/magnifier/overlay.ts.svg +36 -36
- package/copyright.txt +1654 -1654
- package/geometry/operators/graphicBufferOperator.d.ts +4 -4
- package/identity/IdentityModal.js +1 -1
- package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
- package/package.json +30 -30
- package/portal/schemas/definitions.js +1 -1
- package/support/actions/actionUtils.js +1 -1
- package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/BuildingExplorer.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Compass.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Daylight.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/components/FeatureList.js +1 -1
- package/widgets/Editor/components/FooterActions.js +1 -1
- package/widgets/Editor/components/MergeFeaturesList.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/PanelContent.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/Prompt.js +1 -1
- package/widgets/Editor/components/Settings.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/components/UploadDetails.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/components/LegendItem.js +1 -1
- package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
- package/widgets/ElevationProfile/components/Statistics.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureRelationship.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociations.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/support/tableUtils.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/Features/FeaturesDrillIn.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/Fullscreen.js +1 -1
- package/widgets/Home.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/styles/card/CardView.js +1 -1
- package/widgets/LineOfSight.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/NavigationToggle.js +1 -1
- package/widgets/OrientedImageryViewer/components/Alert.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationActions.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationSettings.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
- package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/PanoramicViewer.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
- package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
- package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
- package/widgets/ShadowCast.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/OverflowGroup.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/TimeZoneLabel.js +1 -1
- package/widgets/Track.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker/ValuePickerCombobox.js +1 -1
- package/widgets/ValuePicker/ValuePickerSlider.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/widgets/VideoPlayer/components/MetadataSection.js +1 -1
- package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/Weather/LabeledSlider.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Zoom.js +1 -1
- package/widgets/support/ColorPicker.js +1 -1
- package/widgets/support/FilterBuilder.js +1 -1
- package/widgets/support/FilterCondition.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/widgets/support/LabeledSwitch.js +1 -1
- package/widgets/support/MeasurementWidgetContent.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/SketchTooltipControls.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/widgets/support/TimezonePicker.js +1 -1
- package/widgets/support/UnitSelect.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
- package/widgets/support/componentsUtils.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../interfaces";
|
|
2
|
-
|
|
3
|
-
export const supportsCurves: __esri.graphicBufferOperator["supportsCurves"];
|
|
4
|
-
export const executeMany: __esri.graphicBufferOperator["executeMany"];
|
|
1
|
+
import "../../interfaces";
|
|
2
|
+
|
|
3
|
+
export const supportsCurves: __esri.graphicBufferOperator["supportsCurves"];
|
|
4
|
+
export const executeMany: __esri.graphicBufferOperator["executeMany"];
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright GeoScene, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.geoscene.cn/4.34/geoscene/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import"../intl.js";import{property as e}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import s from"../widgets/Widget.js";import{loadCalciteComponents as i}from"../widgets/support/componentsUtils.js";import{setFocus as n}from"../widgets/support/widgetUtils.js";import{messageBundle as r}from"../widgets/support/decorators/messageBundle.js";import{tsx as l}from"../widgets/support/jsxFactory.js";import{getCalciteModeClass as a}from"../support/modeUtils.js";import{substitute as c}from"../intl/substitute.js";const p="geoscene-identity-modal",d={base:p,info:`${p}__info`,notice:`${p}__notice`},u="GeoScene Online";let m=class extends s{constructor(t,e){super(t,e),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return i({button:()=>import("@
|
|
5
|
+
import{__decorate as t}from"tslib";import"../intl.js";import{property as e}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import s from"../widgets/Widget.js";import{loadCalciteComponents as i}from"../widgets/support/componentsUtils.js";import{setFocus as n}from"../widgets/support/widgetUtils.js";import{messageBundle as r}from"../widgets/support/decorators/messageBundle.js";import{tsx as l}from"../widgets/support/jsxFactory.js";import{getCalciteModeClass as a}from"../support/modeUtils.js";import{substitute as c}from"../intl/substitute.js";const p="geoscene-identity-modal",d={base:p,info:`${p}__info`,notice:`${p}__notice`},u="GeoScene Online";let m=class extends s{constructor(t,e){super(t,e),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return i({button:()=>import("@geoscene/calcite-components/dist/components/calcite-button"),dialog:()=>import("@geoscene/calcite-components/dist/components/calcite-dialog"),input:()=>import("@geoscene/calcite-components/dist/components/calcite-input"),label:()=>import("@geoscene/calcite-components/dist/components/calcite-label"),notice:()=>import("@geoscene/calcite-components/dist/components/calcite-notice")})}get title(){return this.commonMessages?.auth.signIn}render(){const{open:t,title:e,messages:o,signingIn:s,oAuthPrompt:i,server:n,resource:r,error:p}=this,{info:m,oAuthInfo:h,lblItem:g,invalidUser:b,noAuthService:f,lblUser:v,lblPwd:y,lblCancel:_,lblSigning:I,lblOk:w}=o;return l("div",{class:this.classes(d.base,a(this.container))},l("form",{bind:this,onsubmit:this._submit},l("calcite-dialog",{bind:this,heading:e,modal:!0,open:t,outsideCloseDisabled:!0,scale:"s",widthScale:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},l("div",{class:d.info},c(i?h:m,{server:n&&/\.geosceneonline.cn/i.test(n)?u:n,resource:`(${r||g})`})),p?l("calcite-notice",{class:d.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},l("div",{slot:"message"},p.details?.httpStatus?b:f)):null,i?null:[l("calcite-label",null,v,l("calcite-input",{afterCreate:t=>this._usernameInputNode=t,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),l("calcite-label",null,y,l("calcite-input",{afterCreate:t=>this._passwordInputNode=t,bind:this,name:"password",required:!0,type:"password",value:""}))],l("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"footer-end",type:"button"},_),l("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?I:w))))}_focusUsernameInput(){return n(()=>this._usernameInputNode)}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(t){t.preventDefault(),this._set("signingIn",!0);const e=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",e)}};t([e({readOnly:!0})],m.prototype,"container",void 0),t([e(),r("geoscene/t9n/common")],m.prototype,"commonMessages",void 0),t([e()],m.prototype,"error",void 0),t([e(),r("geoscene/identity/t9n/identity")],m.prototype,"messages",void 0),t([e()],m.prototype,"oAuthPrompt",void 0),t([e()],m.prototype,"open",void 0),t([e()],m.prototype,"signingIn",void 0),t([e()],m.prototype,"server",void 0),t([e({readOnly:!0})],m.prototype,"title",null),t([e()],m.prototype,"resource",void 0),m=t([o("geoscene.identity.IdentityModal")],m);const h=m;export{h as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright GeoScene, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.geoscene.cn/4.34/geoscene/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{assertIsSome as i}from"../../../core/maybe.js";import{urlToObject as s}from"../../../core/urlUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import l from"../../../geometry/Extent.js";import n from"../../../geometry/Point.js";import o from"../../../geometry/SpatialReference.js";import c from"../RasterInfo.js";import m from"../RasterStorageInfo.js";import u from"../TileInfo.js";import{TilemapCache as h}from"../TilemapCache.js";import f from"./BaseRaster.js";import{setValidBoundary as p}from"../rasterFunctions/pixelUtils.js";import d from"../rasterTransforms/GCSShiftTransform.js";import{patchServiceInfo as y,fetchServiceRasterInfo as x}from"../../../rest/imageService/fetchRasterInfo.js";let g=class extends f{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:a}=this.rasterInfo,{transposeInfo:l}=r,n=null!=l&&!!s.transposedVariableName;if(this._slices&&!n&&null==s.sliceId)return null;const o=n?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${o}/${t}/${i}`,m=this._slices?n?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let u,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map(e=>this.request(c,{query:{...m,bandId:e},responseType:"array-buffer",signal:s.signal})),t=await Promise.all(e),i=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),r=new Uint8Array(i);h=[];let a=0;for(const{data:s}of t)h.push(a),r.set(new Uint8Array(s),a),a+=s.byteLength;u=r.buffer}else{u=(await this.request(c,{query:m,responseType:"array-buffer",signal:s.signal})).data}if(!u)return null;const f=n?l.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(u,{width:f[0],height:f[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:n,noDataValue:this.rasterInfo.noDataValue,useCanvas: r.tileInfo?.format === "TerrainDEM"});if(null==d)return null;const y=r.blockBoundary[e];if("jpg"!==r.compression||i>y.minCol&&i<y.maxCol&&t>y.minRow&&t<y.maxRow)return d;const{origin:x,blockWidth:g,blockHeight:v}=r,{x:S,y:I}=this.getPyramidPixelSize(e),w=Math.round((a.xmin-x.x)/S)%g,b=Math.round((a.xmax-x.x)/S)%g||g,T=Math.round((x.y-a.ymax)/I)%v,M=Math.round((x.y-a.ymin)/I)%v||v,j=i===y.minCol?w:0,_=t===y.minRow?T:0,O=i===y.maxCol?b:g,R=t===y.maxRow?M:v;return p(d,{x:j,y:_},{width:O-j,height:R-_}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let i=0;i<this._slices.length;i++){const e=this._slices[i].multidimensionalDefinition;if(e.length===t.length&&!e.some(e=>{const i=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);if(!i)return!0;return(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])}))return i}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),r=await Promise.all([i,s]);return r[0]&&r[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let a=r-s+this._levelOffset;const l=i.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,i.row,i.col,t))break}catch{}if(a--,s++,i=this.identifyPixelLocation(l,s,t.datumTransformation),null===i)return null}return-1===a||null==i?null:s}async _open(e){const r=e?.signal,a=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:r});a.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const l=a.data;if(this.sourceJSON=l,!l)throw new t("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!l.tileInfo)throw new t("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo();const n=["jpg","jpeg","png","png8","png24","png32","mixed","terrainrgb","terraindem"];this.tileType=l.cacheType,null==this.tileType&&(n.includes(l.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===l.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=l.name?.slice(l.name.indexOf("/")+1)??"";const o=await this._fetchRasterInfo({signal:r});if(null==o)throw new t("image-server-raster:open","cannot initialize image service");y(o,l);const c="Map"===this.tileType?v(l.tileInfo,l):u.fromJSON(l.tileInfo);i(c);const[f,p]=this._computeMinMaxLOD(o,c),{extent:d,pixelSize:x}=o,g=.5/o.width*x.x,I=Math.max(x.x,x.y),{lods:w}=c;("Map"!==this.tileType&&0!==l.maxScale||Math.abs(x.x-x.y)>g||!w.some(e=>Math.abs(e.resolution-I)<g))&&(x.x=x.y=f.resolution,o.width=Math.ceil((d.xmax-d.xmin)/x.x-.1),o.height=Math.ceil((d.ymax-d.ymin)/x.y-.1));const b=f.level-p.level,[T,M]=c.size,j=[],_=[];w.forEach((e,t)=>{e.level>=p.level&&e.level<=f.level&&j.push({x:e.resolution,y:e.resolution}),t<w.length-1&&_.push(Math.round(10*e.resolution/w[t+1].resolution)/10)}),j.sort((e,t)=>e.x-t.x);const O=this.computeBlockBoundary(d,T,M,c.origin,j,b),R=j.length>1?j.slice(1):null;let L;l.transposeInfo&&(L={tileSize:[l.transposeInfo.rows,l.transposeInfo.cols],packetSize:o.keyProperties?._yxs.PacketSize??0});const z=_.length<=1||_.length>=3&&_.slice(0,-1).every(e=>e===_[0])?_[0]??2:Math.round(10/(p.resolution/f.resolution)**(-1/b))/10;if(o.storageInfo=new m({blockWidth:c.size[0],blockHeight:c.size[1],pyramidBlockWidth:c.size[0],pyramidBlockHeight:c.size[1],pyramidResolutions:R,pyramidScalingFactor:z,compression:c.format,origin:c.origin,firstPyramidLevel:1,maximumPyramidLevel:b,tileInfo:c,isBsqTile:!!l.bsq,transposeInfo:L,blockBoundary:O}),S(o),this._set("rasterInfo",o),l.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:o.storageInfo.tileInfo,parsedUrl:s(this.url),url:this.url,tileServers:[]};this._tilemapCache=new h({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=o.fromJSON(t.spatialReference||e.spatialReference),a=new n({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new c({width:i,height:s,bandCount:3,extent:l.fromJSON(e),spatialReference:r,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=x(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then(e=>e.data?.slices).catch(()=>null):null,a=await Promise.all([s,r]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,a=t.lodAt(Math.max.apply(null,r.map(e=>e.level))),l=t.lodAt(Math.min.apply(null,r.map(e=>e.level))),{tileType:n}=this;if("Map"===n)return this._levelOffset=r[0].level,[a,l];if("Raster"===n){return[r.find(e=>e.resolution===i.x)??a,l]}const{minScale:o,maxScale:c}=this.sourceJSON;let m=a;c>0&&(m=r.find(e=>Math.abs(e.scale-c)<s),m||(m=r.filter(e=>e.scale>c).sort((e,t)=>e.scale>t.scale?1:-1)[0]??a));let u=l;return o>0&&(u=r.find(e=>Math.abs(e.scale-o)<s)??l,this._levelOffset=u.level-l.level),[m,u]}};function v(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:a}=t;if(null!=r&&null!=a)return u.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=r&&e<=a)});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,a=s?t(s):-1/0;return u.fromJSON({...e,lods:e.lods.filter(e=>{const i=t(e.scale);return i<=r&&i>=a})})}return u.fromJSON(e)}function S(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new d,e.extent=e.transform.forwardTransform(t))}e([r({type:String,json:{write:!0}})],g.prototype,"datasetFormat",void 0),e([r()],g.prototype,"tileType",void 0),g=e([a("geoscene.layers.support.rasterDatasets.ImageServerRaster")],g);const I=g;export{I as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{assertIsSome as i}from"../../../core/maybe.js";import{urlToObject as s}from"../../../core/urlUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import l from"../../../geometry/Extent.js";import n from"../../../geometry/Point.js";import o from"../../../geometry/SpatialReference.js";import c from"../RasterInfo.js";import m from"../RasterStorageInfo.js";import u from"../TileInfo.js";import{TilemapCache as h}from"../TilemapCache.js";import f from"./BaseRaster.js";import{setValidBoundary as p}from"../rasterFunctions/pixelUtils.js";import d from"../rasterTransforms/GCSShiftTransform.js";import{patchServiceInfo as y,fetchServiceRasterInfo as x}from"../../../rest/imageService/fetchRasterInfo.js";let g=class extends f{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:a}=this.rasterInfo,{transposeInfo:l}=r,n=null!=l&&!!s.transposedVariableName;if(this._slices&&!n&&null==s.sliceId)return null;const o=n?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${o}/${t}/${i}`,m=this._slices?n?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let u,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map(e=>this.request(c,{query:{...m,bandId:e},responseType:"array-buffer",signal:s.signal})),t=await Promise.all(e),i=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),r=new Uint8Array(i);h=[];let a=0;for(const{data:s}of t)h.push(a),r.set(new Uint8Array(s),a),a+=s.byteLength;u=r.buffer}else{u=(await this.request(c,{query:m,responseType:"array-buffer",signal:s.signal})).data}if(!u)return null;const f=n?l.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(u,{width:f[0],height:f[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:n,noDataValue:this.rasterInfo.noDataValue,useCanvas: r.tileInfo?.format === "TerrainDEM"||r.tileInfo?.format === "WEBP"});if(null==d)return null;const y=r.blockBoundary[e];if("jpg"!==r.compression||i>y.minCol&&i<y.maxCol&&t>y.minRow&&t<y.maxRow)return d;const{origin:x,blockWidth:g,blockHeight:v}=r,{x:S,y:I}=this.getPyramidPixelSize(e),w=Math.round((a.xmin-x.x)/S)%g,b=Math.round((a.xmax-x.x)/S)%g||g,T=Math.round((x.y-a.ymax)/I)%v,M=Math.round((x.y-a.ymin)/I)%v||v,j=i===y.minCol?w:0,_=t===y.minRow?T:0,O=i===y.maxCol?b:g,R=t===y.maxRow?M:v;return p(d,{x:j,y:_},{width:O-j,height:R-_}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let i=0;i<this._slices.length;i++){const e=this._slices[i].multidimensionalDefinition;if(e.length===t.length&&!e.some(e=>{const i=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);if(!i)return!0;return(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])}))return i}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),r=await Promise.all([i,s]);return r[0]&&r[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let a=r-s+this._levelOffset;const l=i.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,i.row,i.col,t))break}catch{}if(a--,s++,i=this.identifyPixelLocation(l,s,t.datumTransformation),null===i)return null}return-1===a||null==i?null:s}async _open(e){const r=e?.signal,a=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:r});a.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const l=a.data;if(this.sourceJSON=l,!l)throw new t("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!l.tileInfo)throw new t("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo();const n=["jpg","jpeg","png","png8","png24","png32","mixed","terrainrgb","terraindem"];this.tileType=l.cacheType,null==this.tileType&&(n.includes(l.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===l.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=l.name?.slice(l.name.indexOf("/")+1)??"";const o=await this._fetchRasterInfo({signal:r});if(null==o)throw new t("image-server-raster:open","cannot initialize image service");y(o,l);const c="Map"===this.tileType?v(l.tileInfo,l):u.fromJSON(l.tileInfo);i(c);const[f,p]=this._computeMinMaxLOD(o,c),{extent:d,pixelSize:x}=o,g=.5/o.width*x.x,I=Math.max(x.x,x.y),{lods:w}=c;("Map"!==this.tileType&&0!==l.maxScale||Math.abs(x.x-x.y)>g||!w.some(e=>Math.abs(e.resolution-I)<g))&&(x.x=x.y=f.resolution,o.width=Math.ceil((d.xmax-d.xmin)/x.x-.1),o.height=Math.ceil((d.ymax-d.ymin)/x.y-.1));const b=f.level-p.level,[T,M]=c.size,j=[],_=[];w.forEach((e,t)=>{e.level>=p.level&&e.level<=f.level&&j.push({x:e.resolution,y:e.resolution}),t<w.length-1&&_.push(Math.round(10*e.resolution/w[t+1].resolution)/10)}),j.sort((e,t)=>e.x-t.x);const O=this.computeBlockBoundary(d,T,M,c.origin,j,b),R=j.length>1?j.slice(1):null;let L;l.transposeInfo&&(L={tileSize:[l.transposeInfo.rows,l.transposeInfo.cols],packetSize:o.keyProperties?._yxs.PacketSize??0});const z=_.length<=1||_.length>=3&&_.slice(0,-1).every(e=>e===_[0])?_[0]??2:Math.round(10/(p.resolution/f.resolution)**(-1/b))/10;if(o.storageInfo=new m({blockWidth:c.size[0],blockHeight:c.size[1],pyramidBlockWidth:c.size[0],pyramidBlockHeight:c.size[1],pyramidResolutions:R,pyramidScalingFactor:z,compression:c.format,origin:c.origin,firstPyramidLevel:1,maximumPyramidLevel:b,tileInfo:c,isBsqTile:!!l.bsq,transposeInfo:L,blockBoundary:O}),S(o),this._set("rasterInfo",o),l.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:o.storageInfo.tileInfo,parsedUrl:s(this.url),url:this.url,tileServers:[]};this._tilemapCache=new h({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=o.fromJSON(t.spatialReference||e.spatialReference),a=new n({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new c({width:i,height:s,bandCount:3,extent:l.fromJSON(e),spatialReference:r,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=x(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then(e=>e.data?.slices).catch(()=>null):null,a=await Promise.all([s,r]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,a=t.lodAt(Math.max.apply(null,r.map(e=>e.level))),l=t.lodAt(Math.min.apply(null,r.map(e=>e.level))),{tileType:n}=this;if("Map"===n)return this._levelOffset=r[0].level,[a,l];if("Raster"===n){return[r.find(e=>e.resolution===i.x)??a,l]}const{minScale:o,maxScale:c}=this.sourceJSON;let m=a;c>0&&(m=r.find(e=>Math.abs(e.scale-c)<s),m||(m=r.filter(e=>e.scale>c).sort((e,t)=>e.scale>t.scale?1:-1)[0]??a));let u=l;return o>0&&(u=r.find(e=>Math.abs(e.scale-o)<s)??l,this._levelOffset=u.level-l.level),[m,u]}};function v(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:a}=t;if(null!=r&&null!=a)return u.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=r&&e<=a)});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,a=s?t(s):-1/0;return u.fromJSON({...e,lods:e.lods.filter(e=>{const i=t(e.scale);return i<=r&&i>=a})})}return u.fromJSON(e)}function S(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new d,e.extent=e.transform.forwardTransform(t))}e([r({type:String,json:{write:!0}})],g.prototype,"datasetFormat",void 0),e([r()],g.prototype,"tileType",void 0),g=e([a("geoscene.layers.support.rasterDatasets.ImageServerRaster")],g);const I=g;export{I as default};
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@geoscene/core",
|
|
3
|
-
"version": "4.34.
|
|
4
|
-
"homepage": "https://js.geoscene.cn",
|
|
5
|
-
"description": "GeoScene Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"GeoScene",
|
|
8
|
-
"javascript",
|
|
9
|
-
"map",
|
|
10
|
-
"3D",
|
|
11
|
-
"2D",
|
|
12
|
-
"visualization",
|
|
13
|
-
"analytics",
|
|
14
|
-
"spatial",
|
|
15
|
-
"data-driven",
|
|
16
|
-
"gis"
|
|
17
|
-
],
|
|
18
|
-
"license": "SEE LICENSE IN copyright.txt",
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@amcharts/amcharts5": "~5.14.1",
|
|
21
|
-
"@arcgis/toolkit": "^4.34.0",
|
|
22
|
-
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
23
|
-
"@
|
|
24
|
-
"@vaadin/grid": "~24.9.1",
|
|
25
|
-
"@zip.js/zip.js": "~2.8.7",
|
|
26
|
-
"luxon": "~3.7.2",
|
|
27
|
-
"marked": "~16.3.0",
|
|
28
|
-
"tslib": "^2.8.1"
|
|
29
|
-
},
|
|
30
|
-
"type": "module"
|
|
1
|
+
{
|
|
2
|
+
"name": "@geoscene/core",
|
|
3
|
+
"version": "4.34.12",
|
|
4
|
+
"homepage": "https://js.geoscene.cn",
|
|
5
|
+
"description": "GeoScene Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"GeoScene",
|
|
8
|
+
"javascript",
|
|
9
|
+
"map",
|
|
10
|
+
"3D",
|
|
11
|
+
"2D",
|
|
12
|
+
"visualization",
|
|
13
|
+
"analytics",
|
|
14
|
+
"spatial",
|
|
15
|
+
"data-driven",
|
|
16
|
+
"gis"
|
|
17
|
+
],
|
|
18
|
+
"license": "SEE LICENSE IN copyright.txt",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@amcharts/amcharts5": "~5.14.1",
|
|
21
|
+
"@arcgis/toolkit": "^4.34.0",
|
|
22
|
+
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
23
|
+
"@geoscene/calcite-components": "^3.3.3",
|
|
24
|
+
"@vaadin/grid": "~24.9.1",
|
|
25
|
+
"@zip.js/zip.js": "~2.8.7",
|
|
26
|
+
"luxon": "~3.7.2",
|
|
27
|
+
"marked": "~16.3.0",
|
|
28
|
+
"tslib": "^2.8.1"
|
|
29
|
+
},
|
|
30
|
+
"type": "module"
|
|
31
31
|
}
|