@arcgis/core 4.33.0-next.20250205 → 4.33.0-next.20250206
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/assets/components/assets/icon/dualImageArea16.json +1 -0
- package/assets/components/assets/icon/dualImageArea24.json +1 -0
- package/assets/components/assets/icon/dualImageArea32.json +1 -0
- package/assets/components/assets/icon/dualImageDistance16.json +1 -0
- package/assets/components/assets/icon/dualImageDistance24.json +1 -0
- package/assets/components/assets/icon/dualImageDistance32.json +1 -0
- package/assets/components/assets/icon/dualImageLocation16.json +1 -0
- package/assets/components/assets/icon/dualImageLocation24.json +1 -0
- package/assets/components/assets/icon/dualImageLocation32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{24a86c52c8bdd0b5eb4d.js → 09a99c556089c166d1f8.js} +1 -1
- package/assets/esri/core/workers/chunks/15f850c9a1154fc57e5a.js +1 -0
- package/assets/esri/core/workers/chunks/{9b4f471fcd8a3b5e089f.js → 192569dfa7c0ea8dd864.js} +1 -1
- package/assets/esri/core/workers/chunks/1a2e1a414e651e988435.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/24e47f748f0e4f815c6e.js +1 -0
- package/assets/esri/core/workers/chunks/28374a64790342e1b5ae.js +1 -0
- package/assets/esri/core/workers/chunks/{ad215219e5eef8598745.js → 28dbbfc44cc2bdcd221d.js} +1 -1
- package/assets/esri/core/workers/chunks/2adc533dadcb018a9755.js +1 -0
- package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/333091ab2e267652ed56.js +1 -0
- package/assets/esri/core/workers/chunks/354531dc2f0dea2ad96f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/38cd7745b8ef1b8b6196.js +1 -0
- package/assets/esri/core/workers/chunks/{8a1e4f65fc81aba7a704.js → 4122d10bc910e888eee1.js} +1 -1
- package/assets/esri/core/workers/chunks/433576983754f690bcc7.js +1 -0
- package/assets/esri/core/workers/chunks/{b1269b51cef3e11c85e3.js → 48ecc5a74fecbb2b9c6f.js} +1 -1
- package/assets/esri/core/workers/chunks/{6d5bfcc7856cafe7b043.js → 5a25cef6355fd20e44e7.js} +2 -2
- package/assets/esri/core/workers/chunks/{6d5bfcc7856cafe7b043.js.LICENSE.txt → 5a25cef6355fd20e44e7.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{7a0415db78c68d31733f.js → 6039da57a2adedd3b83f.js} +1 -1
- package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/73d03c208242778e67bf.js +1 -0
- package/assets/esri/core/workers/chunks/77764ca90bdd13ee2167.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{723a9fba144e2fa6d017.js → 7cb09e58bcc537ec1f7a.js} +1 -1
- package/assets/esri/core/workers/chunks/842db06ce62758fab1e7.js +1 -0
- package/assets/esri/core/workers/chunks/{610b33b7291cffcc4e5d.js → a42ae5d5e5f66d120b4d.js} +1 -1
- package/assets/esri/core/workers/chunks/a5e9ea13e844a62b2a7f.js +1 -0
- package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/b43d88b6e7dc4ab13599.js +1 -0
- package/assets/esri/core/workers/chunks/{9c5c6ecaf5be24279fa5.js → ddc30044f61a2c2df3fe.js} +1 -1
- package/assets/esri/core/workers/chunks/ef6279f5c63ab1e88c71.js +1 -0
- package/assets/esri/core/workers/chunks/{0711d3ad4d403bcfdcad.js → f117a89d1f4001a1f9f0.js} +1 -1
- package/assets/esri/core/workers/chunks/f9e48205178a5a804d38.js +1 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +15 -6
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/WaterSurface.glsl.js +2 -2
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/interfaces.d.ts +63 -28
- package/layers/Layer.js +1 -1
- package/layers/graphics/data/FeatureStore.js +1 -1
- package/layers/ogc/wcsUtils.js +1 -1
- package/layers/support/RasterFunctionTemplate.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/multipartParser.js +1 -1
- package/layers/support/rasterDatasets/wcsCapabilitiesParser.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +2 -1
- package/layers/support/rasterFunctionUtils.js +1 -1
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
- package/package.json +2 -2
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/support/util.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileCache.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/assets/esri/core/workers/chunks/380d37ceb8cf52bad190.js +0 -1
- package/assets/esri/core/workers/chunks/39e38aab86dcee3f79be.js +0 -1
- package/assets/esri/core/workers/chunks/69d307758262e5d7a32e.js +0 -1
- package/assets/esri/core/workers/chunks/7e4d72279cc599b7029c.js +0 -1
- package/assets/esri/core/workers/chunks/8438fba57e82e4cc7c11.js +0 -1
- package/assets/esri/core/workers/chunks/858b191c078d04232342.js +0 -1
- package/assets/esri/core/workers/chunks/92155d112ebb6a4c6c6e.js +0 -1
- package/assets/esri/core/workers/chunks/b33122adfd1fb68f7c0f.js +0 -1
- package/assets/esri/core/workers/chunks/bbbe5d6cb8b737811c84.js +0 -1
- package/assets/esri/core/workers/chunks/bf26f58210755875748c.js +0 -1
- package/assets/esri/core/workers/chunks/d8c762ca94e3a11b125d.js +0 -1
- package/assets/esri/core/workers/chunks/dbc447413ab40a79ba87.js +0 -1
- package/assets/esri/core/workers/chunks/e410a09650530d7aad10.js +0 -1
|
@@ -25,7 +25,7 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
25
25
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
26
26
|
|
|
27
27
|
gl_Position = transformPosition(proj, view, vpos);
|
|
28
|
-
forwardLinearDepth();`)),S.include(c,O),O.output){case i.Color:case i.ColorEmission:S.include(t,{pbrMode:m.Disabled,lightingSphericalHarmonicsOrder:2}),S.include(w),S.include(v,O),S.include(p,O),S.fragment.include(o,O),S.include(C,O),N.uniforms.add(z,new y("timeElapsed",(e=>e
|
|
28
|
+
forwardLinearDepth();`)),S.include(c,O),O.output){case i.Color:case i.ColorEmission:S.include(t,{pbrMode:m.Disabled,lightingSphericalHarmonicsOrder:2}),S.include(w),S.include(v,O),S.include(p,O),S.fragment.include(o,O),S.include(C,O),N.include(u),h(N,O),l(N),d(N),N.uniforms.add(z,new y("timeElapsed",(({timeElapsed:e})=>e)),D.uniforms.get("view"),D.uniforms.get("localOrigin")).main.add(j`
|
|
29
29
|
discardBySlice(vpos);
|
|
30
30
|
discardByTerrainDepth();
|
|
31
31
|
vec3 localUp = vnormal;
|
|
@@ -51,7 +51,7 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
51
51
|
vuv = uv0;
|
|
52
52
|
vpos = position;
|
|
53
53
|
|
|
54
|
-
gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(new y("timeElapsed",(e=>e
|
|
54
|
+
gl_Position = transformPosition(proj, view, vpos);`),N.uniforms.add(new y("timeElapsed",(({timeElapsed:e})=>e))).main.add(j`discardBySlice(vpos);
|
|
55
55
|
vec4 tangentNormalFoam = getSurfaceNormalAndFoam(vuv, timeElapsed);
|
|
56
56
|
tangentNormalFoam.xyz = normalize(tangentNormalFoam.xyz);
|
|
57
57
|
fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w);`);break;case i.Highlight:S.include(n,O),S.varyings.add("vpos","vec3"),D.uniforms.add(z),D.main.add(j`
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e}from"../../core/arrayUtils.js";import{load as r,supportsCurves as t,execute as o,executeMany as n,isLoaded as a}from"./gx/operatorProject.js";let s,i,c,m,f,p,u,l,h,j,x;function T(){return!!i&&a()}async function g(){if(!T()){const[e,o,n,a]=await Promise.all([import("./support/apiConverter.js"),import("../../chunks/ProjectionTransformation.js").then((e=>e.aI)).then((({CompositeGeographicTransformation:e})=>e)),import("../../chunks/ProjectionTransformation.js").then((e=>e.aJ)).then((({create:e,createFromWKT:r})=>({create:e,createFromWKT:r}))),import("../../chunks/ProjectionTransformation.js").then((e=>e.aK)).then((({createEx:e,createFromAoi:r})=>({createEx:e,createFromAoi:r}))),r()]);s=e.fromExtent,i=e.fromGeometry,c=e.fromSpatialReference,m=e.getSpatialReference,f=e.toGeometry,p=o,u=n.create,l=n.createFromWKT,h=a.createEx,j=a.createFromAoi,x=t()}}function E(e,r,t={}){const n=F(m(e),r,t);return f(o(i(e),n),r)}function k(r,t,o={}){const a=r.map(i),s=F(m(r),t,o);return n(a,s).map((e=>f(e,t))).filter(e)}function F(e,r,t={}){let o;if(t?.geographicTransformation){const e=t.geographicTransformation.steps.map((e=>e.wkid?u(e.wkid,e.isInverse):l(e.wkt,e.isInverse)));o=new p(e,null,
|
|
5
|
+
import{isSome as e}from"../../core/arrayUtils.js";import{load as r,supportsCurves as t,execute as o,executeMany as n,isLoaded as a}from"./gx/operatorProject.js";let s,i,c,m,f,p,u,l,h,j,x;function T(){return!!i&&a()}async function g(){if(!T()){const[e,o,n,a]=await Promise.all([import("./support/apiConverter.js"),import("../../chunks/ProjectionTransformation.js").then((e=>e.aI)).then((({CompositeGeographicTransformation:e})=>e)),import("../../chunks/ProjectionTransformation.js").then((e=>e.aJ)).then((({create:e,createFromWKT:r})=>({create:e,createFromWKT:r}))),import("../../chunks/ProjectionTransformation.js").then((e=>e.aK)).then((({createEx:e,createFromAoi:r})=>({createEx:e,createFromAoi:r}))),r()]);s=e.fromExtent,i=e.fromGeometry,c=e.fromSpatialReference,m=e.getSpatialReference,f=e.toGeometry,p=o,u=n.create,l=n.createFromWKT,h=a.createEx,j=a.createFromAoi,x=t()}}function E(e,r,t={}){const n=F(m(e),r,t);return f(o(i(e),n),r)}function k(r,t,o={}){const a=r.map(i),s=F(m(r),t,o);return n(a,s).map((e=>f(e,t))).filter(e)}function F(e,r,t={}){let o;const n=c(e),a=c(r);if(t?.geographicTransformation){const e=t.geographicTransformation.steps.map((e=>e.wkid?u(e.wkid,e.isInverse):l(e.wkt,e.isInverse)));o=new p(e,null,n,a)}else if(t?.areaOfInterestExtent)return j(n,a,s(t.areaOfInterestExtent).asEnvelope2D());return h(n,a,o)}export{E as execute,k as executeMany,T as isLoaded,g as load,x as supportsCurves};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e}from"../../core/arrayUtils.js";import{load as r,supportsCurves as t,execute as n,executeMany as o,isLoaded as a}from"./gx/operatorShapePreservingProject.js";let i,s,c,m,p,f,u,
|
|
5
|
+
import{isSome as e}from"../../core/arrayUtils.js";import{load as r,supportsCurves as t,execute as n,executeMany as o,isLoaded as a}from"./gx/operatorShapePreservingProject.js";let i,s,c,m,p,f,u,h,g,l,x;function T(){return!!s&&a()}async function j(){if(!T()){const[e,n,o,a]=await Promise.all([import("./support/apiConverter.js"),import("../../chunks/ProjectionTransformation.js").then((e=>e.aI)).then((({CompositeGeographicTransformation:e})=>e)),import("../../chunks/ProjectionTransformation.js").then((e=>e.aJ)).then((({create:e,createFromWKT:r})=>({create:e,createFromWKT:r}))),import("../../chunks/ProjectionTransformation.js").then((e=>e.aK)).then((({createEx:e,createFromAoi:r})=>({createEx:e,createFromAoi:r}))),r()]);i=e.fromExtent,s=e.fromGeometry,c=e.fromSpatialReference,m=e.getSpatialReference,p=e.toGeometry,f=n,u=o.create,h=o.createFromWKT,g=a.createEx,l=a.createFromAoi,x=t()}}function I(e,r,t={}){const o=E(m(e),r,t),a=t?.maxDeviationInSrTo??0,i=t?.minSegmentLengthInDegrees??0;return p(n(s(e),o,i,a),r)}function v(r,t,n={}){const a=r.map(s),i=E(m(r),t,n),c=n?.maxDeviationInSrTo??0;return o(a,i,n?.minSegmentLengthInDegrees??0,c).map((e=>p(e,t))).filter(e)}function E(e,r,t={}){let n;const o=c(e),a=c(r);if(t?.geographicTransformation){const e=t.geographicTransformation.steps.map((e=>e.wkid?u(e.wkid,e.isInverse):h(e.wkt,e.isInverse)));n=new f(e,null,o,a)}else if(t?.areaOfInterestExtent)return l(o,a,i(t.areaOfInterestExtent).asEnvelope2D());return g(o,a,n)}export{I as execute,v as executeMany,T as isLoaded,j as load,x as supportsCurves};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{getMetersPerUnitForSR as t}from"../../../core/unitUtils.js";import o from"../../Mesh.js";import n from"../../Point.js";import{project as r}from"../../projection.js";import
|
|
5
|
+
import e from"../../../core/Logger.js";import{getMetersPerUnitForSR as t}from"../../../core/unitUtils.js";import o from"../../Mesh.js";import n from"../../Point.js";import{project as r}from"../../projection.js";import i from"../MeshComponent.js";import{MeshVertexAttributes as a}from"../MeshVertexAttributes.js";import{isGround as s}from"../../../support/groundInstanceUtils.js";async function l(t,o,n){let r;if(u(t)||s(t)){const e=await c(t);return r=await e.createElevationSampler(o,{demResolution:n?.demResolution??"finest-contiguous"}),m(r,o,{material:n?.material})}return"string"==typeof n?.demResolution?(e.getLogger("esri.geometry.support.meshUtils.elevation").error("create()","demResolution must be a number when used directly with a sampler"),null):m(t,o,{material:n?.material,demResolution:n?.demResolution})}function m(e,n,s){const l=t(n.spatialReference),m=(s?.demResolution??e.demResolution.min)/l,c=Math.round(n.width/m),u=Math.round(n.height/m),f=c+1,d=u+1,h=new Float64Array(f*d*3),R=new Float32Array(f*d*2);let w=0,y=0;const g=new Uint32Array(c*u*2*3);let j=0,v=0;const A=!e.spatialReference.equals(n.spatialReference);p.spatialReference=n.spatialReference;const{xmin:x,ymin:b,height:M,width:U}=n;for(let t=0;t<d;t++){const o=b+M*(t/u);for(let n=0;n<f;n++){const i=x+U*(n/c);if(h[w++]=i,h[w++]=o,A){p.x=i,p.y=o;const t=r(p,e.spatialReference);h[w++]=e.elevationAt(t.x,t.y)??0}else h[w++]=e.elevationAt(i,o)??0;const a=n/c,s=t/u;R[y++]=a,R[y++]=s,t!==u&&n!==c&&(g[v++]=j+1,g[v++]=j+f+1,g[v++]=j+f,g[v++]=j,g[v++]=j+1,g[v++]=j+f),j++}}return new o({vertexAttributes:new a({position:h,uv:R}),components:[new i({faces:g,shading:"smooth",material:s?.material??null})],spatialReference:n.spatialReference})}async function c(e){return u(e)?e.load():(await e.load(),await Promise.allSettled(e.layers.items.map((e=>e.load()))),e)}function u(e){return"type"in e&&("elevation"===e.type||"base-elevation"===e.type)}const p=new n;export{l as create};
|
package/interfaces.d.ts
CHANGED
|
@@ -23918,15 +23918,6 @@ declare namespace __esri {
|
|
|
23918
23918
|
}
|
|
23919
23919
|
|
|
23920
23920
|
export class Layer {
|
|
23921
|
-
/**
|
|
23922
|
-
* Called by the views, such as {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html MapView} and
|
|
23923
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html SceneView}, when the layer is added to the
|
|
23924
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers Map.layers} collection and a layer view must
|
|
23925
|
-
* be created for it.
|
|
23926
|
-
*
|
|
23927
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#createLayerView Read more...}
|
|
23928
|
-
*/
|
|
23929
|
-
createLayerView: CreateLayerView | nullish;
|
|
23930
23921
|
/**
|
|
23931
23922
|
* The unique ID assigned to the layer.
|
|
23932
23923
|
*
|
|
@@ -24090,6 +24081,19 @@ declare namespace __esri {
|
|
|
24090
24081
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#cancelLoad Read more...}
|
|
24091
24082
|
*/
|
|
24092
24083
|
cancelLoad(): void;
|
|
24084
|
+
/**
|
|
24085
|
+
* Called by the views, such as {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html MapView} and
|
|
24086
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html SceneView}, when the layer is added to the
|
|
24087
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers Map.layers} collection and a layer view must
|
|
24088
|
+
* be created for it.
|
|
24089
|
+
*
|
|
24090
|
+
* @param view The parent view.
|
|
24091
|
+
* @param options An object specifying additional options. See the object specification table below for the required properties of this object.
|
|
24092
|
+
* @param options.signal A signal to abort the creation of the layerview.
|
|
24093
|
+
*
|
|
24094
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#createLayerView Read more...}
|
|
24095
|
+
*/
|
|
24096
|
+
createLayerView(view: any, options?: LayerCreateLayerViewOptions): Promise<LayerView>;
|
|
24093
24097
|
/**
|
|
24094
24098
|
* Destroys the layer and any associated resources (including its {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#portalItem portalItem}, if it is a property on the layer).
|
|
24095
24099
|
*
|
|
@@ -24183,15 +24187,6 @@ declare namespace __esri {
|
|
|
24183
24187
|
}
|
|
24184
24188
|
|
|
24185
24189
|
interface LayerProperties extends LoadableProperties {
|
|
24186
|
-
/**
|
|
24187
|
-
* Called by the views, such as {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html MapView} and
|
|
24188
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html SceneView}, when the layer is added to the
|
|
24189
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers Map.layers} collection and a layer view must
|
|
24190
|
-
* be created for it.
|
|
24191
|
-
*
|
|
24192
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#createLayerView Read more...}
|
|
24193
|
-
*/
|
|
24194
|
-
createLayerView?: CreateLayerView | nullish;
|
|
24195
24190
|
/**
|
|
24196
24191
|
* The full extent of the layer.
|
|
24197
24192
|
*
|
|
@@ -24242,7 +24237,9 @@ declare namespace __esri {
|
|
|
24242
24237
|
visible?: boolean;
|
|
24243
24238
|
}
|
|
24244
24239
|
|
|
24245
|
-
export
|
|
24240
|
+
export interface LayerCreateLayerViewOptions {
|
|
24241
|
+
signal?: AbortSignal | nullish;
|
|
24242
|
+
}
|
|
24246
24243
|
|
|
24247
24244
|
export interface LayerFromArcGISServerUrlParams {
|
|
24248
24245
|
url: string;
|
|
@@ -36672,6 +36669,7 @@ declare namespace __esri {
|
|
|
36672
36669
|
* @param parameters The clip parameters object has the following properties.
|
|
36673
36670
|
* @param parameters.geometry An extent or a polygon geometry to define the clip shape.
|
|
36674
36671
|
* @param parameters.keepOutside When `false`, the imagery within the clip geometry will be kept in the output. When `true`, imagery outside of the clip geometry will be kept and the imagery inside the clip geometry will be discarded.
|
|
36672
|
+
* @param parameters.raster The input raster. Default is the image service.
|
|
36675
36673
|
* @param parameters.outputPixelType The output pixel type.
|
|
36676
36674
|
*
|
|
36677
36675
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#clip Read more...}
|
|
@@ -36690,6 +36688,7 @@ declare namespace __esri {
|
|
|
36690
36688
|
*
|
|
36691
36689
|
* @param parameters The parameters object has the following properties.
|
|
36692
36690
|
* @param parameters.raster The input raster. Default is the image service.
|
|
36691
|
+
* @param parameters.outputPixelType The output pixel type, default is u8.
|
|
36693
36692
|
*
|
|
36694
36693
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#colormapToRGB Read more...}
|
|
36695
36694
|
*/
|
|
@@ -36701,9 +36700,9 @@ declare namespace __esri {
|
|
|
36701
36700
|
* @param parameters.rasters The input raster. Default is the image service.
|
|
36702
36701
|
* @param parameters.outputPixelType The output pixel type, default is unknown.
|
|
36703
36702
|
*
|
|
36704
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#
|
|
36703
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#compositeBand Read more...}
|
|
36705
36704
|
*/
|
|
36706
|
-
|
|
36705
|
+
compositeBand(parameters: rasterFunctionUtilsCompositeBandParameters): RasterFunction;
|
|
36707
36706
|
/**
|
|
36708
36707
|
* Creates a raster function that sets the truthy pixels (value is not 0) to the pixel value from a true raster, and falsy pixels (value is 0) to the pixel value of the false raster.
|
|
36709
36708
|
*
|
|
@@ -36821,6 +36820,7 @@ declare namespace __esri {
|
|
|
36821
36820
|
*
|
|
36822
36821
|
* @param parameters The grayscale parameters object has the following properties.
|
|
36823
36822
|
* @param parameters.weights The weights applied to each input band. Weights are often applied because some bands have variable importance depending on the application.
|
|
36823
|
+
* @param parameters.raster The input raster. Default is the image service.
|
|
36824
36824
|
* @param parameters.outputPixelType The output pixel type, default is unknown.
|
|
36825
36825
|
*
|
|
36826
36826
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#grayscale Read more...}
|
|
@@ -36922,7 +36922,7 @@ declare namespace __esri {
|
|
|
36922
36922
|
* @param parameters The parameters object has the following properties.
|
|
36923
36923
|
* @param parameters.includedRanges The included values for each band. Each band is specified using a range [from, to].
|
|
36924
36924
|
* @param parameters.noDataValues The nodata values for each band.
|
|
36925
|
-
* @param parameters.noDataInterpretation Result is no data if all bands are nodata when match-all is specified, any if any band is nodata when match-any is specified.
|
|
36925
|
+
* @param parameters.noDataInterpretation Result is no data if all bands are nodata when match-all is specified, any if any band is nodata when match-any is specified. Default is match-any.
|
|
36926
36926
|
* @param parameters.raster The input raster. Default is the image service.
|
|
36927
36927
|
* @param parameters.outputPixelType The output pixel type, default is unknown.
|
|
36928
36928
|
*
|
|
@@ -37045,6 +37045,7 @@ declare namespace __esri {
|
|
|
37045
37045
|
* @param parameters The parameters object has the following properties.
|
|
37046
37046
|
* @param parameters.slopeType The slope type
|
|
37047
37047
|
* @param parameters.zFactor A ratio of z unit / xy unit, with optional exaggeration factored in.
|
|
37048
|
+
* @param parameters.scalingType The slope result is scaled dynamically by adjusting the zFactor. Default is none.
|
|
37048
37049
|
* @param parameters.pixelSizePower Pixel size factor accounts for changes in scale as the viewer zooms in and out on the map display. It controls the rate at which the zFactor changes. This parameter is only valid when the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#scalingType scalingType} is `adjusted`.
|
|
37049
37050
|
* @param parameters.pixelSizeZFactor Pixel Size Power accounts for the altitude changes (or scale) as the viewer zooms in and out on the map display. It is the exponent applied to the pixel size term in the equation that controls the rate at which the zFactor changes to avoid significant loss of relief. This parameter is only valid when the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#scalingType scalingType} is `adjusted`.
|
|
37050
37051
|
* @param parameters.removeEdgeEffect Remove edge effect when true
|
|
@@ -37112,6 +37113,20 @@ declare namespace __esri {
|
|
|
37112
37113
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#stretchMinMax Read more...}
|
|
37113
37114
|
*/
|
|
37114
37115
|
stretchMinMax(parameters: rasterFunctionUtilsStretchMinMaxParameters): RasterFunction;
|
|
37116
|
+
/**
|
|
37117
|
+
* Creates a Stretch function without a specific stretch method.
|
|
37118
|
+
*
|
|
37119
|
+
* @param parameters The parameters object has the following properties.
|
|
37120
|
+
* @param parameters.outputMin The minimum output value. Default is 0.
|
|
37121
|
+
* @param parameters.outputMax The maximum output value. Default is 255.
|
|
37122
|
+
* @param parameters.useGamma When true, gamma stretch is applied.
|
|
37123
|
+
* @param parameters.gamma The gamma values used for each band, needed when useGamma is true.
|
|
37124
|
+
* @param parameters.raster The input raster. Default is the image service.
|
|
37125
|
+
* @param parameters.outputPixelType The output pixel type, default is unknown.
|
|
37126
|
+
*
|
|
37127
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-rasterFunctionUtils.html#stretchNone Read more...}
|
|
37128
|
+
*/
|
|
37129
|
+
stretchNone(parameters: rasterFunctionUtilsStretchNoneParameters): RasterFunction;
|
|
37115
37130
|
/**
|
|
37116
37131
|
* Creates a Stretch function using percent-clip stretch type.
|
|
37117
37132
|
*
|
|
@@ -37388,7 +37403,14 @@ declare namespace __esri {
|
|
|
37388
37403
|
| "yellow-to-green-to-dark-blue"
|
|
37389
37404
|
| "yellow-to-red"
|
|
37390
37405
|
| "yellow-green-bright"
|
|
37391
|
-
| "yellow-green-light-to-dark"
|
|
37406
|
+
| "yellow-green-light-to-dark"
|
|
37407
|
+
| "hillshade"
|
|
37408
|
+
| "gray"
|
|
37409
|
+
| "elevation"
|
|
37410
|
+
| "ndvi"
|
|
37411
|
+
| "ndvi2"
|
|
37412
|
+
| "ndvi3"
|
|
37413
|
+
| "random";
|
|
37392
37414
|
raster?: RasterPrimaryArgument;
|
|
37393
37415
|
outputPixelType?: OutputPixelType;
|
|
37394
37416
|
}
|
|
@@ -37597,7 +37619,7 @@ declare namespace __esri {
|
|
|
37597
37619
|
}
|
|
37598
37620
|
|
|
37599
37621
|
export interface rasterFunctionUtilsBandArithmeticSultanParameters {
|
|
37600
|
-
bandIds: [number, number, number, number, number
|
|
37622
|
+
bandIds: [number, number, number, number, number];
|
|
37601
37623
|
raster?: RasterPrimaryArgument;
|
|
37602
37624
|
outputPixelType?: OutputPixelType;
|
|
37603
37625
|
}
|
|
@@ -37639,14 +37661,16 @@ declare namespace __esri {
|
|
|
37639
37661
|
export interface rasterFunctionUtilsClipParameters {
|
|
37640
37662
|
geometry: Polygon | Extent;
|
|
37641
37663
|
keepOutside?: boolean;
|
|
37664
|
+
raster?: RasterPrimaryArgument;
|
|
37642
37665
|
outputPixelType?: OutputPixelType;
|
|
37643
37666
|
}
|
|
37644
37667
|
|
|
37645
37668
|
export interface rasterFunctionUtilsColormapToRGBParameters {
|
|
37646
37669
|
raster?: RasterPrimaryArgument;
|
|
37670
|
+
outputPixelType?: OutputPixelType;
|
|
37647
37671
|
}
|
|
37648
37672
|
|
|
37649
|
-
export interface
|
|
37673
|
+
export interface rasterFunctionUtilsCompositeBandParameters {
|
|
37650
37674
|
rasters: RasterArgument[];
|
|
37651
37675
|
outputPixelType?: OutputPixelType;
|
|
37652
37676
|
}
|
|
@@ -37667,6 +37691,7 @@ declare namespace __esri {
|
|
|
37667
37691
|
|
|
37668
37692
|
export interface rasterFunctionUtilsGrayscaleParameters {
|
|
37669
37693
|
weights: number[];
|
|
37694
|
+
raster?: RasterPrimaryArgument;
|
|
37670
37695
|
outputPixelType?: OutputPixelType;
|
|
37671
37696
|
}
|
|
37672
37697
|
|
|
@@ -37684,9 +37709,9 @@ declare namespace __esri {
|
|
|
37684
37709
|
}
|
|
37685
37710
|
|
|
37686
37711
|
export interface rasterFunctionUtilsMaskParameters {
|
|
37687
|
-
includedRanges
|
|
37688
|
-
noDataValues
|
|
37689
|
-
noDataInterpretation
|
|
37712
|
+
includedRanges?: [number, number][];
|
|
37713
|
+
noDataValues?: number[][];
|
|
37714
|
+
noDataInterpretation?: "match-any" | "match-all";
|
|
37690
37715
|
raster?: RasterPrimaryArgument;
|
|
37691
37716
|
outputPixelType?: OutputPixelType;
|
|
37692
37717
|
}
|
|
@@ -37701,6 +37726,7 @@ declare namespace __esri {
|
|
|
37701
37726
|
export interface rasterFunctionUtilsSlopeParameters {
|
|
37702
37727
|
slopeType: "degree" | "percent-rise";
|
|
37703
37728
|
zFactor: number;
|
|
37729
|
+
scalingType?: "none" | "adjusted";
|
|
37704
37730
|
pixelSizePower?: number;
|
|
37705
37731
|
pixelSizeZFactor?: number;
|
|
37706
37732
|
removeEdgeEffect?: boolean;
|
|
@@ -37735,6 +37761,15 @@ declare namespace __esri {
|
|
|
37735
37761
|
outputPixelType?: OutputPixelType;
|
|
37736
37762
|
}
|
|
37737
37763
|
|
|
37764
|
+
export interface rasterFunctionUtilsStretchNoneParameters {
|
|
37765
|
+
outputMin?: number;
|
|
37766
|
+
outputMax?: number;
|
|
37767
|
+
useGamma?: boolean;
|
|
37768
|
+
gamma?: number[];
|
|
37769
|
+
raster?: RasterPrimaryArgument;
|
|
37770
|
+
outputPixelType?: OutputPixelType;
|
|
37771
|
+
}
|
|
37772
|
+
|
|
37738
37773
|
export interface rasterFunctionUtilsStretchPercentClipParameters {
|
|
37739
37774
|
minPercent: number;
|
|
37740
37775
|
maxPercent: number;
|
package/layers/Layer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import r from"../core/Error.js";import o from"../core/Evented.js";import i from"../core/Identifiable.js";import s from"../core/Loadable.js";import a from"../core/Logger.js";import{isAbortError as l}from"../core/promiseUtils.js";import{urlToObject as n}from"../core/urlUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import d from"../geometry/Extent.js";import c from"../geometry/SpatialReference.js";import{fromPortalItem as u}from"./support/fromPortalItem.js";import m from"../time/TimeExtent.js";let b=0,h=class extends(o.EventedMixin(i.IdentifiableMixin(s))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new d(-180,-90,180,90,c.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=c.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await import("./support/arcgisLayers.js")).fromUrl(t)}static fromPortalItem(e){return u(e)}initialize(){this.when().catch((e=>{l(e)||a.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return n(this.url)}createLayerView(e,t){return Promise.reject(new r("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e){return(await t(e,{query:{f:"json"},responseType:"json"})).data}throw new r("layer:no-attribution-data","Layer does not have attribution data")}};e([p({type:String})],h.prototype,"attributionDataUrl",void 0),e([p({readOnly:!0})],h.prototype,"effectiveVisible",null),e([p({type:d})],h.prototype,"fullExtent",void 0),e([p({readOnly:!0})],h.prototype,"hasAttributionData",null),e([p({type:String,clonable:!1})],h.prototype,"id",void 0),e([p({type:Boolean,nonNullable:!0})],h.prototype,"legendEnabled",void 0),e([p({type:["show","hide","hide-children"]})],h.prototype,"listMode",void 0),e([p({type:Number,range:{min:0,max:1},nonNullable:!0})],h.prototype,"opacity",void 0),e([p({clonable:!1})],h.prototype,"parent",void 0),e([p({readOnly:!0})],h.prototype,"parsedUrl",null),e([p({type:Boolean,readOnly:!0})],h.prototype,"persistenceEnabled",void 0),e([p({type:Boolean})],h.prototype,"popupEnabled",void 0),e([p({type:Boolean})],h.prototype,"attributionVisible",void 0),e([p({type:c})],h.prototype,"spatialReference",void 0),e([p({type:String})],h.prototype,"title",void 0),e([p({readOnly:!0,json:{read:!1}})],h.prototype,"type",void 0),e([p()],h.prototype,"url",void 0),e([p({type:m})],h.prototype,"visibilityTimeExtent",void 0),e([p({type:Boolean,nonNullable:!0})],h.prototype,"visible",void 0),h=e([y("esri.layers.Layer")],h);const f=h;export{f as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import r from"../../../core/Evented.js";import s from"../../../core/Logger.js";import{create as o,fromRect as i}from"../../../geometry/support/aaBoundingBox.js";import{create as n}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as
|
|
5
|
+
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import r from"../../../core/Evented.js";import s from"../../../core/Logger.js";import{create as o,fromRect as i}from"../../../geometry/support/aaBoundingBox.js";import{create as n}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as u}from"../featureConversionUtils.js";import{BoundsStore as a}from"./BoundsStore.js";import{cleanFromGeometryEngine as d}from"./geometryUtils.js";import{optimizedFeatureQueryEngineAdapter as h}from"./optimizedFeatureQueryEngineAdapter.js";const m=o();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new a,this._featuresById=new Map,this._usedMemory=0,this.events=new r,this.featureAdapter=h}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,r,s,o]=this.fullBounds;return{xmin:t,ymin:r,xmax:s,ymax:o,spatialReference:d(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(t){const r=t.map((e=>this._upsert(e)));return this._emitChanged(),r.filter(e)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t(i(m,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const r=e.objectId;if(null==r)return void s.getLogger("esri.layers.graphics.data.FeatureStore").error(new t("featurestore:invalid-feature","feature id is missing",{feature:e}));const o=this._featuresById.get(r);let i;if(o?(e.displayId=o.displayId,i=this._boundsStore.get(r),this._boundsStore.delete(r),this._usedMemory-=this.estimateFeatureUsedMemory?.(o)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(r,null),void this._featuresById.set(r,e);i=u(null!=i?i:n(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(r,i),this._featuresById.set(r,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const r=e?.objectId;if(null==r)return s.getLogger("esri.layers.graphics.data.FeatureStore").error(new t("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const o=this._featuresById.get(r);if(!o)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(o)??0;const{geometry:i,attributes:a}=e;for(const t in a)o.attributes[t]=a[t];return i&&(o.geometry=i,this._boundsStore.set(r,u(n(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(o)??0,o}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}export{f as default};
|
package/layers/ogc/wcsUtils.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import e from"../../request.js";import r from"../../core/Error.js";import{isAbortError as s}from"../../core/promiseUtils.js";import{isSupportedVersion as t,parseCapabilities as o}from"../support/rasterDatasets/wcsCapabilitiesParser.js";import{parseCoverages as a}from"../support/rasterDatasets/wcsCoverageParser.js";async function i(a,i){const{version:n,customParameters:c,signal:p}=i??{},l=n?.startsWith("1.0")?"version":"acceptVersions",m={service:"WCS",request:"GetCapabilities",[l]:n,...c};try{let{data:r}=await e(a,{query:m,responseType:"xml",signal:p});return i?.version||t(r)||(m[l]="2.0.1",({data:r}=await e(a,{query:m,responseType:"xml",signal:p}))),o(r)}catch(u){if(!s(u))throw new r("wcslayer:open","wcs capabilities is not valid or supported");throw u}}async function n(t,o){const{coverageIds:i,version:n,customParameters:c,signal:p}=o,l=n.slice(0,3),m="1.0"===l?"coverage":"1.1"===l?"identifiers":"coverageId",u={service:"WCS",request:"DescribeCoverage",version:n,[m]:i.join(","),...c};try{const{data:r}=await e(t,{query:u,responseType:"xml",signal:p});return a(r,n)}catch(v){if(!s(v))throw new r("wcslayer:open","wcs coverage description is not valid or supported");throw v}}export{n as describeCoverage,i as getCapabilities};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import{JSONMap as e}from"../../core/jsonMap.js";import o from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{Integer as i}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import s from"./RasterFunctionInfo.js";import n from"./RasterFunctionProperties.js";const y=new e({0:"mosaic",1:"item",2:"item-group"},{useNumericKeys:!0});let a=class extends o{constructor(){super(...arguments),this.functionType="mosaic",this.type="RasterFunctionTemplate"}};t([r({type:[String],json:{write:!0}})],a.prototype,"aliases",void 0),t([r({type:Object,json:{write:{isRequired:!0}}})],a.prototype,"arguments",void 0),t([r({type:String,json:{write:{isRequired:!0}}})],a.prototype,"description",void 0),t([r({type:s,json:{write:{isRequired:!0},name:"function"}})],a.prototype,"functionInfo",void 0),t([r({type:y.apiValues,json:{type:[0,1,2],read:y.read,write:{writer:y.write,isRequired:!0}}})],a.prototype,"functionType",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"group",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"help",void 0),t([r({type:Number,json:{type:i,write:!0,name:"_object_id"}})],a.prototype,"id",void 0),t([r({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),t([r({type:String,json:{write:!0,name:"definition"}})],a.prototype,"queryDefinition",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"tag",void 0),t([r({type:n,json:{write:!0}})],a.prototype,"properties",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"thumbnail",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"thumbnailEx",void 0),t([r({json:{type:["RasterFunctionTemplate"],write:!0}})],a.prototype,"type",void 0),a=t([p("esri.layers.support.RasterFunctionTemplate")],a);const c=a;export{c as default};
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import{JSONMap as e}from"../../core/jsonMap.js";import o from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{Integer as i}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import s from"./RasterFunctionInfo.js";import n from"./RasterFunctionProperties.js";const y=new e({0:"mosaic",1:"item",2:"item-group"},{useNumericKeys:!0});let a=class extends o{constructor(){super(...arguments),this.description="",this.functionType="mosaic",this.type="RasterFunctionTemplate"}};t([r({type:[String],json:{write:!0}})],a.prototype,"aliases",void 0),t([r({type:Object,json:{write:{isRequired:!0}}})],a.prototype,"arguments",void 0),t([r({type:String,json:{write:{isRequired:!0}}})],a.prototype,"description",void 0),t([r({type:s,json:{write:{isRequired:!0},name:"function"}})],a.prototype,"functionInfo",void 0),t([r({type:y.apiValues,json:{type:[0,1,2],read:y.read,write:{writer:y.write,isRequired:!0}}})],a.prototype,"functionType",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"group",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"help",void 0),t([r({type:Number,json:{type:i,write:!0,name:"_object_id"}})],a.prototype,"id",void 0),t([r({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),t([r({type:String,json:{write:!0,name:"definition"}})],a.prototype,"queryDefinition",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"tag",void 0),t([r({type:n,json:{write:!0}})],a.prototype,"properties",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"thumbnail",void 0),t([r({type:String,json:{write:!0}})],a.prototype,"thumbnailEx",void 0),t([r({json:{type:["RasterFunctionTemplate"],write:!0}})],a.prototype,"type",void 0),a=t([p("esri.layers.support.RasterFunctionTemplate")],a);const c=a;export{c as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../../../geometry/Extent.js";import{isAxesOrderReversedForWkid as r}from"../../ogc/crsUtils.js";import{getCapabilities as a,describeCoverage as l}from"../../ogc/wcsUtils.js";import c from"../DimensionalDefinition.js";import d from"./BaseRaster.js";import{parse as f}from"./multipartParser.js";import{standardizeInterpolations as p,convertOleDateTimeToEpoch as u}from"./wcsCoverageParser.js";import{getFormat as h}from"../rasterFormats/RasterCodec.js";import{clip as m}from"../rasterFunctions/pixelUtils.js";const g=["nearest neighbor","bilinear","bicubic"],w=["nearest","linear","cubic"],v="response is not a supported multipart/related mediaType with inline tiff, switching to compatibility mode",y="response is not a supported multipart mediaType with inline tiff",x="response is base64 encoded which may impact layer display performance",I="server returns an exception",C=new Set(["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"]);let b=class extends d{constructor(){super(...arguments),this.datasetFormat="WCSServer",this.tileType="Raster"}async fetchRawTile(e,i,n,s={}){if(this.isBlockOutside(e,i,n))return null;const{nativePixelSize:o,spatialReference:r}=this.rasterInfo,a=2**e,l=o.x*a,c=o.y*a,{blockWidth:d,blockHeight:f}=this.getBlockWidthHeight(e),{origin:p}=this.rasterInfo.storageInfo.tileInfo,u=this.getTileExtent({x:l,y:c},i,n,p,r,[d,f]),h=this.rasterInfo.extent,g=u.xmax>h.xmax,w=u.ymin<h.ymin,v=g||w;let y=u,x=d,I=f;if(v&&(y=u.clone().intersection(h),null!=y&&(g&&(x=Math.floor((y.xmax-y.xmin)/l),y.xmax=y.xmin+l*x),w&&(I=Math.floor((y.ymax-y.ymin)/c),y.ymin=y.ymax-c*I))),null==y||x<=1||I<=1)return null;const C=await this._getCoverage(y,x,I,a,s);if(!C)return null;const{coverageDescription:b}=this.coverageInfo,{noDataValue:$,multidimensionalInfo:S}=this.rasterInfo,{multidimensionalDefinition:j}=s;let T;if(null!=S&&null!=j&&j.length){const e=j[0].variableName;if("2.0"===b.version){const t=b.rangeType[0].find((t=>t.name===e));T=t?.nilValue}else if("1.1"===b.version){const t=b.range.find((t=>t.identifier===e));T=t?.nullValues}}const L=T??$,P=await this.decodePixelBlock(C,{width:x,height:I,planes:null,pixelType:null,tiffNoDataValue:Array.isArray(L)?L[0]:L});if(null==P)return null;if(P&&(P.width!==x||P.height!==I))throw new t("wcsraster-fetch",`the response has unexpected dimension width: ${P.width}, height: {pixelBlock.height}`);return v?m(P,{x:0,y:0},{width:f,height:f}):P}async _open(e){const{customFetchParameters:i}=this.ioConfig,n=e?.signal,s=await a(this.url,{version:i?.version??this.version,customParameters:i,signal:n});if(this.capabilities=s,!this.version){let e=s.version.slice(0,3);"2.0"===e||"1.1"===e||"1.0"===e?this.version=s.version:(e=s.supportedVersions.find((e=>"2.0.1"===e))||s.supportedVersions.find((e=>"2.0"===e.slice(0,3)))||s.supportedVersions.find((e=>"1.1"===e.slice(0,3)))||s.supportedVersions.find((e=>"1.0"===e.slice(0,3)))||"1.0.0",this.version=e)}const{version:o}=this;if(!C.has(o))throw new t("wcsraster-open",`unsupported WCS version ${o}`);const{gridCoverages:r}=s;if(!r.length)throw new t("wcsraster-open","cannot find rectified grid coverages");this.coverageId??=r[0].id;const{coverageId:c}=this,d=r.find((e=>e.id===c));if(null==d)throw new t("wcsraster-open",`the coverageId ${c} does not exist in capabilities`);const f=await l(this.url,{coverageIds:[c],version:o,customParameters:i,signal:n});if(this.coverageInfo=f[0],"2.0"===o.slice(0,3)){const{coverageInfo:e}=this;e.lonLatEnvelope=d.lonLatEnvelope,e.supportedInterpolations=p(s.supportedInterpolations),this._patchDimensionValues201(c,n)}this.datasetName=this.coverageInfo.title;const{rasterInfo:u}=this.coverageInfo;if(this.createRemoteDatasetStorageInfo(u,512,512),this._set("rasterInfo",u),null==u.spatialReference)throw new t("wcsraster-open",`coverage without spatial reference is not supported: ${c}`);const{pixelType:h,bandCount:m}=await this._getPixelTypeAndBandCount(n);u.pixelType=h,1===u.bandCount&&m>1&&(u.bandCount=m),this.updateTileInfo()}async _patchDimensionValues201(e,t){const{coverageInfo:i}=this,n=i.rasterInfo.multidimensionalInfo?.variables,s=C.has("1.1.2")?"1.1.2":C.has("1.1.1")?"1.1.1":C.has("1.1.0")?"1.1.0":null,{customFetchParameters:o}=this.ioConfig;if(n&&s)try{const i=this.url.includes("/ImageServer/"),r=e.length>8&&e.startsWith("Coverage")&&i?e.slice(8):e,a=await l(this.url,{coverageIds:[r??e],version:s,customParameters:o,signal:t}).catch((()=>{if(r)return l(this.url,{coverageIds:[e],version:s,customParameters:o,signal:t})})),c=a?.[0].rasterInfo.multidimensionalInfo?.variables;if(c)for(const e of n){const t=c.find((({name:t})=>t===e.name));if(t?.dimensions?.length)for(let n=e.dimensions.length-1;n>=0;n--){const s=e.dimensions[n],o=t.dimensions.find((({name:e})=>e===s.name));o?o.values&&o.extent?.join(",")===s.extent?.join(",")&&(e.dimensions[n]={...s,values:o.values}):i&&e.dimensions.splice(n,1)}}}catch{}}async _getPixelTypeAndBandCount(e){const{pixelSize:n,extent:s,multidimensionalInfo:r}=this.rasterInfo,a=s.center,l=new o({xmin:a.x-n.x,xmax:a.x+n.x,ymin:a.y-n.y,ymax:a.y+n.y,spatialReference:s.spatialReference});let d=[];if(null!=r){const e=r.variables[0];d=[],e.dimensions.forEach((t=>{d.push(new c({variableName:e.name,dimensionName:t.name,values:t.hasRegularIntervals?t.extent?.[0]:t.values?.[0],isSlice:!0}))}))}const{coverageDescription:f}=this.coverageInfo,p={interpolation:"nearest",multidimensionalDefinition:d,signal:e},{version:u}=f,{ioConfig:h}=this,m="2.0"===u&&null==h.allowAnyMediaType||"1.1"===u&&null==h.use2GridOffsets;let g;try{g=await this._getCoverage(l,2,2,1,p,!0)}catch(y){if(!m)throw y;if("1.1"===u){if(!y.details?.isResolutionMismatch)throw y;h.use2GridOffsets=!0}}if(!g&&m&&("2.0"===u&&(h.allowAnyMediaType=!0),g=await this._getCoverage(l,2,2,1,p),g&&i.getLogger(this).warn("wcsraster:getcoverage",v)),!g)throw new t("wcsraster-open","unable to determine pixel type");const w=await this.decodePixelBlock(g,{width:2,height:2,planes:null,pixelType:null});if(null==w)throw new t("wcsraster-open","unable to determine pixel type");return{pixelType:w.pixelType,bandCount:w.getPlaneCount()??0}}async _getCoverage(e,n,s,o,r,a=!1){const{coverageDescription:l}=this.coverageInfo,{version:c}=l,d="2.0"===c?this._getCoverage201Parameters(e,n,s,o,r,l):"1.1"===c?this._getCoverage110Parameters(e,n,s,r,l):this._getCoverage100Parameters(e,n,s,r),p="2.0"===c?await this.request(this._constructWCS201Url(d),{signal:r.signal,responseType:"array-buffer"}):await this.request(this.url,{query:d,signal:r.signal,responseType:"array-buffer"});if("1.0"===c)return p.data;if("2.0"===c&&!1!==this.ioConfig.allowAnyMediaType){if("tiff"===h(p.data))return a&&(this.ioConfig.allowAnyMediaType=!0,i.getLogger(this).warn("wcsraster:getcoverage",v)),p.data}const u=f(p);if(u.isMultipart&&u.data){const e=u.data.find((e=>e.contentType?.toLowerCase().includes("image")&&null!=e.contentData));return a&&"base64"===e?.contentTransferEncoding&&i.getLogger(this).warn("wcsraster:getcoverage",x),e?.contentData}const m=new Uint8Array(p.data,0,Math.min(p.data.byteLength,2e3)),g=String.fromCharCode.apply(null,m).toLowerCase().includes("exception"),w=g&&String.fromCharCode.apply(null,m).includes("A non-zero RESX/RESY or WIDTH/HEIGHT is required but neither was provided");if(g)throw new t("wcsraster:getcoverage",I,{isResolutionMismatch:w});throw new t("wcsraster:getcoverage",y)}_getInterpolationIndex(e){return e&&this.coverageInfo.supportedInterpolations?.includes(e)?"nearest"===e?0:"bilinear"===e?1:"cubic"===e?2:0:0}_getCoverage100Parameters(e,t,i,n){const s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`,o=e.spatialReference.wkid,r=(this.coverageInfo.supportedFormats||[]).find((e=>e.toLowerCase().includes("tiff")))||"GEOTIFF",{bandIds:a,interpolation:l}=n,c=this._getInterpolationIndex(l),d=a?a.map((e=>this.coverageInfo.bandNames[e])):null,f=g[c],{multidimensionalDefinition:p}=n;let u;if(null!=p&&null!=this.rasterInfo.multidimensionalInfo){const e=p.find((e=>"StdTime"===e.dimensionName));let t=e?.values;t&&t.length>0&&(Array.isArray(t[0])&&(t=t[0]),u=t.map((e=>$(e))).join(","))}return{service:"WCS",request:"GetCoverage",version:this.version,coverage:this.coverageId,format:r,crs:`EPSG:${o}`,bbox:s,width:t,height:i,time:u,interpolation:f,band:d?.join(",")}}_getCoverage110Parameters(e,t,i,n,s){const{multidimensionalDefinition:o,bandIds:a,interpolation:l}=n,c=e.spatialReference.wkid,d=`urn:ogc:def:crs:EPSG::${c}`,f=(this.coverageInfo.supportedFormats||[]).find((e=>e.toLowerCase().includes("tiff")))||"image/tiff",p=this._getInterpolationIndex(l),u=w[p],h=null==l||0===this.coverageInfo.supportedInterpolations?.indexOf(l),m=s.domain.spatialDomain,g=m.origin.x<=m.envelope.xmin&&m.origin.y<=m.envelope.ymin,v=e.width/t,y=e.height/i*(g?1:-1),x=g?[e.xmin,e.ymin]:[e.xmin,e.ymax],I=m.useEPSGAxis&&r(c),C=I?`${x[1]},${x[0]}`:`${x[0]},${x[1]}`,b=this.ioConfig.use2GridOffsets,S=I?b?`${y},${v}`:`${y},0,0,${v}`:b?`${v},${y}`:`${v},0,0,${y}`,j=v/2,T=e.xmin+j,L=e.xmax-j,P=Math.abs(y)/2,R=e.ymin+P,_=e.ymax-P,D=I?`${R},${T},${_},${L},${d}`:`${T},${R},${L},${_},${d}`,E=s.range.find((e=>e.axis.some((e=>e.identifier.toLowerCase().includes("band")))));let A,G=E&&u&&a?h?`${E.identifier}[${E.axis[0].identifier}[${a.join(",")}]]`:`${E.identifier}:${u}[${E.axis[0].identifier}[${a.join(",")}]]`:null;if(null!=o&&o.length)for(let r=0;r<o.length;r++){let e=o[r].values;const t=o[r].dimensionName?.toLowerCase(),i=o[r].variableName?.toLowerCase(),n=s.range.find((e=>e.identifier.toLowerCase()===i));if(e.length>0)if(Array.isArray(e[0])&&(e=e[0]),"stdtime"===t)A=e.map((e=>$(e))).join(",");else if(n){const i=n.axis.find((e=>e.identifier.toLowerCase()===t));i&&(G=h?n.identifier+"["+i.identifier+"["+e.join(",")+"]]":n.identifier+":"+u+"["+i.identifier+"["+e.join(",")+"]]")}r===o.length-1&&n&&!G&&(G=h?n.identifier:n.identifier+":"+u)}return{service:"WCS",request:"GetCoverage",version:this.version,identifier:this.coverageId,format:f,crs:`EPSG:${c}`,boundingbox:D,gridCS:"urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS",gridType:"urn:ogc:def:method:WCS:1.1:2dGridIn2dCrs",gridOrigin:C,gridOffsets:S,gridBaseCRS:d,timeSequence:A,rangeSubset:G}}_getCoverage201Parameters(e,t,i,n,s,o){const{multidimensionalDefinition:r,interpolation:a}=s,l=this._getInterpolationIndex(a);let c=null;const{supportedInterpolations:d}=this.capabilities;if(d?.length)switch(l){case 0:c=d.find((e=>e.toLowerCase().includes("nearest")));break;case 1:c=d.find((e=>e.toLowerCase().includes("linear")));break;case 2:c=d.find((e=>e.toLowerCase().includes("cubic")||e.toLowerCase().includes("quadratic")))}const f=(this.coverageInfo.supportedFormats||[]).find((e=>e.toLowerCase().includes("tiff")))||"image/tiff",{bandNames:p}=this.coverageInfo,{boundedBy:u,domainSet:h,rangeType:m}=o,g=u.isEastFirst?0:1,w=1-g,{axisLabels:v}=u,y=v[g],x=v[w],I=`http://www.opengis.net/def/crs/EPSG/0/${e.spatialReference.wkid}`,C=I,b=[];b.push(`${y}(${e.xmin},${e.xmax})`),b.push(`${x}(${e.ymin},${e.ymax})`);const S=[];if(v.length>2)for(let _=2;_<v.length;_++){const e=h.origin[_];if(v[_].toLowerCase().includes("time")){let t=e.toString();u.uomLabels?.[_].toLowerCase().includes("ole")&&(S.push(v[_]),t=$(e,!0)),b.push(v[_]+",http://www.opengis.net("+t+")")}else b.push(v[_]+",http://www.opengis.net("+e+")")}let j=null;if(null!=r&&r.length){const e=[];m.forEach((t=>t.forEach((t=>e.push(t.name)))));const t=[];for(let i=0;i<r.length;i++){const n=v.find((e=>e===r[i].dimensionName)),s=e.find((e=>e===r[i].variableName));if(t.includes(s)||t.push(s),n){let e=r[i].values;if(e.length>0){Array.isArray(e[0])&&(e=e[0]);let t="";t=n.toLowerCase().includes("time")?e.map((e=>$(e))).join(","):e.join(",");const i=b.findIndex((e=>0===e.indexOf(n+",http://www.opengis.net")));-1===i&&b.push(n+",http://www.opengis.net("+t+")"),-1===i||b[i].includes("("+t+")")||b.splice(i,1,n+",http://www.opengis.net("+t+")")}}}t.length&&(j=t.join(","))}else if(p?.length>=2){j=(s.bandIds?s.bandIds.map((e=>p[e])):p).join(",")}const T=b.join("&subset="),L=!o.domainSet.hasSameAxisLabelsAsBoundedBy&&!1!==this.ioConfig.allowScaleFactor,P=L?null:`${y}(${t}),${x}(${i})`,R=L?1/n:null;return{service:"WCS",request:"GetCoverage",version:this.version,coverageId:this.coverageId,rangesubset:j,interpolation:c,scaleSize:P,scaleFactor:R,subset:T,format:f,mediaType:this.ioConfig.allowAnyMediaType?null:"multipart/related",outputcrs:I,subsettingcrs:C}}_constructWCS201Url(e){const t={...this.ioConfig.customFetchParameters,...e},i=[];Object.keys(t).forEach((e=>{const n=t[e];null!=n&&("subset"===e?"string"==typeof n&&n.split("&subset=").forEach((e=>{e&&i.push(`subset=${encodeURIComponent(e)}`)})):i.push(`${e}=${encodeURIComponent(n)}`))}));return`${encodeURI(this.url)}?${i.join("&")}`}};function $(e,t=!1){return(t?new Date(u(e)):new Date(e)).toISOString()}e([n({type:String,json:{write:!0}})],b.prototype,"datasetFormat",void 0),e([n({readOnly:!0})],b.prototype,"tileType",void 0),e([n({type:String,json:{write:!0}})],b.prototype,"version",void 0),e([n({type:String,json:{write:!0}})],b.prototype,"coverageId",void 0),b=e([s("esri.layers.support.rasterDatasets.WCSRaster")],b);const S=b;export{S as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../../../geometry/Extent.js";import{isAxesOrderReversedForWkid as r}from"../../ogc/crsUtils.js";import{getCapabilities as a,describeCoverage as l}from"../../ogc/wcsUtils.js";import c from"../DimensionalDefinition.js";import d from"./BaseRaster.js";import{parse as f}from"./multipartParser.js";import{standardizeInterpolations as p,convertOleDateTimeToEpoch as u}from"./wcsCoverageParser.js";import{getFormat as h}from"../rasterFormats/RasterCodec.js";import{clip as m}from"../rasterFunctions/pixelUtils.js";const g=["nearest neighbor","bilinear","bicubic"],w=["nearest","linear","cubic"],v="response is not a supported multipart/related mediaType with inline tiff, switching to compatibility mode",y="response is not a supported multipart mediaType with inline tiff",x="response is base64 encoded which may impact layer display performance",I="server returns an exception",C=new Set(["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"]);let b=class extends d{constructor(){super(...arguments),this.datasetFormat="WCSServer",this.tileType="Raster"}async fetchRawTile(e,i,n,s={}){if(this.isBlockOutside(e,i,n))return null;const{nativePixelSize:o,spatialReference:r}=this.rasterInfo,a=2**e,l=o.x*a,c=o.y*a,{blockWidth:d,blockHeight:f}=this.getBlockWidthHeight(e),{origin:p}=this.rasterInfo.storageInfo.tileInfo,u=this.getTileExtent({x:l,y:c},i,n,p,r,[d,f]),h=this.rasterInfo.extent,g=u.xmax>h.xmax,w=u.ymin<h.ymin,v=g||w;let y=u,x=d,I=f;if(v&&(y=u.clone().intersection(h),null!=y&&(g&&(x=Math.floor((y.xmax-y.xmin)/l),y.xmax=y.xmin+l*x),w&&(I=Math.floor((y.ymax-y.ymin)/c),y.ymin=y.ymax-c*I))),null==y||x<=1||I<=1)return null;const C=await this._getCoverage(y,x,I,a,s);if(!C)return null;const{coverageDescription:b}=this.coverageInfo,{noDataValue:$,multidimensionalInfo:S}=this.rasterInfo,{multidimensionalDefinition:j}=s;let T;if(null!=S&&null!=j&&j.length){const e=j[0].variableName;if("2.0"===b.version){const t=b.rangeType[0].find((t=>t.name===e));T=t?.nilValue}else if("1.1"===b.version){const t=b.range.find((t=>t.identifier===e));T=t?.nullValues}}const L=T??$,P=await this.decodePixelBlock(C,{width:x,height:I,planes:null,pixelType:null,tiffNoDataValue:Array.isArray(L)?L[0]:L});if(null==P)return null;if(P&&(P.width!==x||P.height!==I))throw new t("wcsraster-fetch",`the response has unexpected dimension width: ${P.width}, height: {pixelBlock.height}`);return v?m(P,{x:0,y:0},{width:f,height:f}):P}async _open(e){const{customFetchParameters:i}=this.ioConfig,n=e?.signal,s=await a(this.url,{version:i?.version??this.version,customParameters:i,signal:n});if(this.capabilities=s,!this.version){let e=s.version.slice(0,3);"2.0"===e||"1.1"===e||"1.0"===e?this.version=s.version:(e=s.supportedVersions.find((e=>"2.0.1"===e))||s.supportedVersions.find((e=>"2.0"===e.slice(0,3)))||s.supportedVersions.find((e=>"1.1"===e.slice(0,3)))||s.supportedVersions.find((e=>"1.0"===e.slice(0,3)))||"1.0.0",this.version=e)}const{version:o}=this;if(!C.has(o))throw new t("wcsraster-open",`unsupported WCS version ${o}`);const{gridCoverages:r}=s;if(!r.length)throw new t("wcsraster-open","cannot find rectified grid coverages");this.coverageId??=r[0].id;const{coverageId:c}=this,d=r.find((e=>e.id===c));if(null==d)throw new t("wcsraster-open",`the coverageId ${c} does not exist in capabilities`);const f=await l(this.url,{coverageIds:[c],version:o,customParameters:i,signal:n});if(this.coverageInfo=f[0],"2.0"===o.slice(0,3)){const{coverageInfo:e}=this;e.lonLatEnvelope=d.lonLatEnvelope,e.supportedInterpolations=p(s.supportedInterpolations),this._patchDimensionValues201(c,n)}this.datasetName=this.coverageInfo.title;const{rasterInfo:u}=this.coverageInfo;if(this.createRemoteDatasetStorageInfo(u,512,512),this._set("rasterInfo",u),null==u.spatialReference)throw new t("wcsraster-open",`coverage without spatial reference is not supported: ${c}`);const{pixelType:h,bandCount:m}=await this._getPixelTypeAndBandCount(n);u.pixelType=h,1===u.bandCount&&m>1&&(u.bandCount=m),this.updateTileInfo()}async _patchDimensionValues201(e,t){const{coverageInfo:i}=this,n=i.rasterInfo.multidimensionalInfo?.variables,s=C.has("1.1.2")?"1.1.2":C.has("1.1.1")?"1.1.1":C.has("1.1.0")?"1.1.0":null,{customFetchParameters:o}=this.ioConfig;if(n&&s)try{const i=this.url.includes("/ImageServer/"),r=e.length>8&&e.startsWith("Coverage")&&i?e.slice(8):e,a=await l(this.url,{coverageIds:[r??e],version:s,customParameters:o,signal:t}).catch((()=>{if(r)return l(this.url,{coverageIds:[e],version:s,customParameters:o,signal:t})})),c=a?.[0].rasterInfo.multidimensionalInfo?.variables;if(c)for(const e of n){const t=c.find((({name:t})=>t===e.name));if(t?.dimensions?.length)for(let n=e.dimensions.length-1;n>=0;n--){const s=e.dimensions[n],o=t.dimensions.find((({name:e})=>e===s.name));o?o.values&&o.extent?.join(",")===s.extent?.join(",")&&(e.dimensions[n]={...s,values:o.values}):i&&e.dimensions.splice(n,1)}}}catch{}}async _getPixelTypeAndBandCount(e){const{pixelSize:n,extent:s,multidimensionalInfo:r}=this.rasterInfo,a=s.center,l=new o({xmin:a.x-n.x,xmax:a.x+n.x,ymin:a.y-n.y,ymax:a.y+n.y,spatialReference:s.spatialReference});let d=[];if(null!=r){const e=r.variables[0];d=[],e.dimensions.forEach((t=>{d.push(new c({variableName:e.name,dimensionName:t.name,values:t.hasRegularIntervals?t.extent?.[0]:t.values?.[0],isSlice:!0}))}))}const{coverageDescription:f}=this.coverageInfo,p={interpolation:"nearest",multidimensionalDefinition:d,signal:e},{version:u}=f,{ioConfig:h}=this,m="2.0"===u&&null==h.allowAnyMediaType||"1.1"===u&&null==h.use2GridOffsets;let g;try{g=await this._getCoverage(l,2,2,1,p,!0)}catch(y){if(!m)throw y;if("1.1"===u){if(!y.details?.isResolutionMismatch)throw y;h.use2GridOffsets=!0}}if(!g&&m&&("2.0"===u&&(h.allowAnyMediaType=!0),g=await this._getCoverage(l,2,2,1,p),g&&i.getLogger(this).warn("wcsraster:getcoverage",v)),!g)throw new t("wcsraster-open","unable to determine pixel type");const w=await this.decodePixelBlock(g,{width:2,height:2,planes:null,pixelType:null});if(null==w)throw new t("wcsraster-open","unable to determine pixel type");return{pixelType:w.pixelType,bandCount:w.getPlaneCount()??0}}async _getCoverage(e,n,s,o,r,a=!1){const{coverageDescription:l}=this.coverageInfo,{version:c}=l,d="2.0"===c?this._getCoverage201Parameters(e,n,s,o,r,l):"1.1"===c?this._getCoverage110Parameters(e,n,s,r,l):this._getCoverage100Parameters(e,n,s,r),p="2.0"===c?await this.request(this._constructWCS201Url(d),{signal:r.signal,responseType:"array-buffer"}):await this.request(this.url,{query:d,signal:r.signal,responseType:"array-buffer"});if("1.0"===c)return p.data;if("2.0"===c&&!1!==this.ioConfig.allowAnyMediaType){if("tiff"===h(p.data))return a&&(this.ioConfig.allowAnyMediaType=!0,i.getLogger(this).warn("wcsraster:getcoverage",v)),p.data}const u=f(p);if(u.isMultipart&&u.data){const e=u.data.find((e=>e.isValidImage));return a&&"base64"===e?.contentTransferEncoding&&i.getLogger(this).warn("wcsraster:getcoverage",x),e?.contentData}const m=new Uint8Array(p.data,0,Math.min(p.data.byteLength,2e3)),g=String.fromCharCode.apply(null,m).toLowerCase().includes("exception"),w=g&&String.fromCharCode.apply(null,m).includes("A non-zero RESX/RESY or WIDTH/HEIGHT is required but neither was provided");if(g)throw new t("wcsraster:getcoverage",I,{isResolutionMismatch:w});throw new t("wcsraster:getcoverage",y)}_getInterpolationIndex(e){return e&&this.coverageInfo.supportedInterpolations?.includes(e)?"nearest"===e?0:"bilinear"===e?1:"cubic"===e?2:0:0}_getCoverage100Parameters(e,t,i,n){const s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`,o=e.spatialReference.wkid,r=(this.coverageInfo.supportedFormats||[]).find((e=>e.toLowerCase().includes("tiff")))||"GEOTIFF",{bandIds:a,interpolation:l}=n,c=this._getInterpolationIndex(l),d=a?a.map((e=>this.coverageInfo.bandNames[e])):null,f=g[c],{multidimensionalDefinition:p}=n;let u;if(null!=p&&null!=this.rasterInfo.multidimensionalInfo){const e=p.find((e=>"StdTime"===e.dimensionName));let t=e?.values;t&&t.length>0&&(Array.isArray(t[0])&&(t=t[0]),u=t.map((e=>$(e))).join(","))}return{service:"WCS",request:"GetCoverage",version:this.version,coverage:this.coverageId,format:r,crs:`EPSG:${o}`,bbox:s,width:t,height:i,time:u,interpolation:f,band:d?.join(",")}}_getCoverage110Parameters(e,t,i,n,s){const{multidimensionalDefinition:o,bandIds:a,interpolation:l}=n,c=e.spatialReference.wkid,d=`urn:ogc:def:crs:EPSG::${c}`,f=(this.coverageInfo.supportedFormats||[]).find((e=>e.toLowerCase().includes("tiff")))||"image/tiff",p=this._getInterpolationIndex(l),u=w[p],h=null==l||0===this.coverageInfo.supportedInterpolations?.indexOf(l),m=s.domain.spatialDomain,g=m.origin.x<=m.envelope.xmin&&m.origin.y<=m.envelope.ymin,v=e.width/t,y=e.height/i*(g?1:-1),x=g?[e.xmin,e.ymin]:[e.xmin,e.ymax],I=m.useEPSGAxis&&r(c),C=I?`${x[1]},${x[0]}`:`${x[0]},${x[1]}`,b=this.ioConfig.use2GridOffsets,S=I?b?`${y},${v}`:`${y},0,0,${v}`:b?`${v},${y}`:`${v},0,0,${y}`,j=v/2,T=e.xmin+j,L=e.xmax-j,P=Math.abs(y)/2,R=e.ymin+P,_=e.ymax-P,D=I?`${R},${T},${_},${L},${d}`:`${T},${R},${L},${_},${d}`,E=s.range.find((e=>e.axis.some((e=>e.identifier.toLowerCase().includes("band")))));let A,G=E&&u&&a?h?`${E.identifier}[${E.axis[0].identifier}[${a.join(",")}]]`:`${E.identifier}:${u}[${E.axis[0].identifier}[${a.join(",")}]]`:null;if(null!=o&&o.length)for(let r=0;r<o.length;r++){let e=o[r].values;const t=o[r].dimensionName?.toLowerCase(),i=o[r].variableName?.toLowerCase(),n=s.range.find((e=>e.identifier.toLowerCase()===i));if(e.length>0)if(Array.isArray(e[0])&&(e=e[0]),"stdtime"===t)A=e.map((e=>$(e))).join(",");else if(n){const i=n.axis.find((e=>e.identifier.toLowerCase()===t));i&&(G=h?n.identifier+"["+i.identifier+"["+e.join(",")+"]]":n.identifier+":"+u+"["+i.identifier+"["+e.join(",")+"]]")}r===o.length-1&&n&&!G&&(G=h?n.identifier:n.identifier+":"+u)}return{service:"WCS",request:"GetCoverage",version:this.version,identifier:this.coverageId,format:f,crs:`EPSG:${c}`,boundingbox:D,gridCS:"urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS",gridType:"urn:ogc:def:method:WCS:1.1:2dGridIn2dCrs",gridOrigin:C,gridOffsets:S,gridBaseCRS:d,timeSequence:A,rangeSubset:G}}_getCoverage201Parameters(e,t,i,n,s,o){const{multidimensionalDefinition:r,interpolation:a}=s,l=this._getInterpolationIndex(a);let c=null;const{supportedInterpolations:d}=this.capabilities;if(d?.length)switch(l){case 0:c=d.find((e=>e.toLowerCase().includes("nearest")));break;case 1:c=d.find((e=>e.toLowerCase().includes("linear")));break;case 2:c=d.find((e=>e.toLowerCase().includes("cubic")||e.toLowerCase().includes("quadratic")))}const f=(this.coverageInfo.supportedFormats||[]).find((e=>e.toLowerCase().includes("tiff")))||"image/tiff",{bandNames:p}=this.coverageInfo,{boundedBy:u,domainSet:h,rangeType:m}=o,g=u.isEastFirst?0:1,w=1-g,{axisLabels:v}=u,y=v[g],x=v[w],I=`http://www.opengis.net/def/crs/EPSG/0/${e.spatialReference.wkid}`,C=I,b=[];b.push(`${y}(${e.xmin},${e.xmax})`),b.push(`${x}(${e.ymin},${e.ymax})`);const S=[];if(v.length>2)for(let _=2;_<v.length;_++){const e=h.origin[_];if(v[_].toLowerCase().includes("time")){let t=e.toString();u.uomLabels?.[_].toLowerCase().includes("ole")&&(S.push(v[_]),t=$(e,!0)),b.push(v[_]+",http://www.opengis.net("+t+")")}else b.push(v[_]+",http://www.opengis.net("+e+")")}let j=null;if(null!=r&&r.length){const e=[];m.forEach((t=>t.forEach((t=>e.push(t.name)))));const t=[];for(let i=0;i<r.length;i++){const n=v.find((e=>e===r[i].dimensionName)),s=e.find((e=>e===r[i].variableName));if(t.includes(s)||t.push(s),n){let e=r[i].values;if(e.length>0){Array.isArray(e[0])&&(e=e[0]);let t="";t=n.toLowerCase().includes("time")?e.map((e=>$(e))).join(","):e.join(",");const i=b.findIndex((e=>0===e.indexOf(n+",http://www.opengis.net")));-1===i&&b.push(n+",http://www.opengis.net("+t+")"),-1===i||b[i].includes("("+t+")")||b.splice(i,1,n+",http://www.opengis.net("+t+")")}}}t.length&&(j=t.join(","))}else if(p?.length>=2){j=(s.bandIds?s.bandIds.map((e=>p[e])):p).join(",")}const T=b.join("&subset="),L=!o.domainSet.hasSameAxisLabelsAsBoundedBy&&!1!==this.ioConfig.allowScaleFactor,P=L?null:`${y}(${t}),${x}(${i})`,R=L?1/n:null;return{service:"WCS",request:"GetCoverage",version:this.version,coverageId:this.coverageId,rangesubset:j,interpolation:c,scaleSize:P,scaleFactor:R,subset:T,format:f,mediaType:this.ioConfig.allowAnyMediaType?null:"multipart/related",outputcrs:I,subsettingcrs:C}}_constructWCS201Url(e){const t={...this.ioConfig.customFetchParameters,...e},i=[];Object.keys(t).forEach((e=>{const n=t[e];null!=n&&("subset"===e?"string"==typeof n&&n.split("&subset=").forEach((e=>{e&&i.push(`subset=${encodeURIComponent(e)}`)})):i.push(`${e}=${encodeURIComponent(n)}`))}));return`${encodeURI(this.url)}?${i.join("&")}`}};function $(e,t=!1){return(t?new Date(u(e)):new Date(e)).toISOString()}e([n({type:String,json:{write:!0}})],b.prototype,"datasetFormat",void 0),e([n({readOnly:!0})],b.prototype,"tileType",void 0),e([n({type:String,json:{write:!0}})],b.prototype,"version",void 0),e([n({type:String,json:{write:!0}})],b.prototype,"coverageId",void 0),b=e([s("esri.layers.support.rasterDatasets.WCSRaster")],b);const S=b;export{S as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
function t(t){const r=e(t);return r?{isMultipart:!0,data:r.boundary?n(t.data,r,0):null}:{isMultipart:!1,data:null}}function n(t,n,e=0){const o="--"+n.boundary,i=[];for(let r=0;r<o.length;r++)i.push(o.charCodeAt(r));const a=[],s="\n--"+n.boundary+"--";for(let r=0;r<s.length;r++)a.push(s.charCodeAt(r));const l=[10],c=[13,10],f=[],u=i.length,h=new Uint8Array(t,e),g=h.length-u;let p=0,d=0;for(let b=0;b<g;b++){for(d=0;d<u&&h[b+d]===i[d];d++);if(d!==u)continue;let t=!1;if(p){const e=r(h.subarray(p,b),n);f.push(e),t=!!e.isValidImage}if(b+=u-1,h[b+1]===l[0]?b+=1:h[b+1]===c[0]&&h[b+2]===c[1]&&(b+=2),p=b+1,t)break}const y=a.length;for(let b=h.length-y-10;b<h.length-y;b++){for(d=0;d<y&&h[b+d]===a[d];d++);if(d===y){f.push(r(h.subarray(p,b),n));break}}return f}function e(t){const n=t.getHeader?.("Content-Type")?.split(";");if(!n)return null;if(!(n[0].trim()??"").startsWith("multipart/"))return null;const e={boundary:"",start:"",type:""};for(let r=1;r<n.length;r++){const t=n[r].indexOf("=");if(t>0){const o=n[r].slice(0,t).trim(),i=n[r].slice(t+1).trim();e[o]=i.startsWith('"')?i.slice(1,-1):i}}return e}function r(t,n){const e=String.fromCharCode.apply(null,t.subarray(0,Math.min(300,t.length))).split("\n"),r=Math.min(e.length,7),o={contentDisposition:"inline"};let i=0;for(let a=0;a<r;a++)if(e[a].length<4)i=i+e[a].length+1;else if("content"===e[a].slice(0,7).toLowerCase()){i=i+e[a].length+1;const t=e[a].indexOf(":");if(-1===t)continue;const n=e[a].slice(0,t).trim(),r=e[a].slice(t+1).trim();switch(n.toLowerCase()){case"content-type":o.contentType=r;break;case"content-description":o.contentDescription=r;break;case"content-transfer-encoding":o.contentTransferEncoding=r;break;case"content-id":o.contentID=r;break;case"content-disposition":o.contentDisposition=r;break;case"content-location":o.contentLocation=r}}else{if(o.contentDisposition.toLowerCase().includes("inline")&&e[a].length>=4&&o.contentType?.toLowerCase().indexOf("image")>-1){let n=!0,e=t.subarray(i,t.length);if(o.contentType.toLowerCase().indexOf("tif")>0){if("base64"===o.contentTransferEncoding){let t="";const n=e;for(let e=0;e<n.length;e+=65535){const r=n.subarray(e,e+65535>n.length-1?n.length-1:e+65535);t+=String.fromCharCode.apply(null,r)}const r=atob(t);e=new Uint8Array(r.length);for(let o=0;o<e.length;o++)e[o]=r.charCodeAt(o)}n=73===e[0]&&73===e[1]||77===e[0]&&77===e[1]}if(n){let n=e.buffer;"base64"!==o.contentTransferEncoding&&(n=new ArrayBuffer(t.length-i),e=new Uint8Array(n),e.set(t.subarray(i,t.length))),o.contentData=n,o.isValidImage=!0}break}if((""===n.start||o.contentID===n.start)&&o.contentType){if(o.contentType.includes("text")||o.contentType.includes("xml")){o.contentData=String.fromCharCode.apply(null,t.subarray(i,t.length));break}o.contentData=t.subarray(i,t.length)}}return o}export{t as parse};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Error.js";import t from"../../../geometry/Extent.js";import{getElementValue as r,getElement as o,getElements as i,getSpaceDelimitedNumericValues as n,getElementValues as a,isSameTagIgnoreNS as s,getNodeNameIgnoreNS as c}from"./xmlUtilities.js";function l(e){return e.endsWith("?")?e.slice(0,-1):e}function u(e){return e.filter((({coverageSubType:e})=>null==e||""===e||/^rectified(grid|dataset)/i.test(e)))}function p(e){const a=r(e,"Service/name"),s=o(e,"Capability"),c=o(s,"GetCapabilities/Get/OnlineResource")?.getAttribute("xlink:href")??"",p=o(s,"DescribeCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",m=o(s,"GetCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",g={getCapabilities:l(c),describeCoverage:l(p),getCoverage:l(m)},v=i(e,"CoverageOfferingBrief"),d=[];for(let o=0;o<v.length;o++){const e=v[o],a=r(e,"name"),s=i(e,"pos"),c=n(s[0]),l=n(s[1]),u=new t({xmin:c[0],ymin:c[1],xmax:l[0],ymax:l[1],spatialReference:{wkid:4326}});d.push({id:a,lonLatEnvelope:u})}return{name:a,onlineResources:g,coverages:d,gridCoverages:u(d),supportedVersions:["1.0.0"],version:"1.0.0"}}function m(e){const o={};for(let i=0;i<e.childNodes.length;i++){const a=e.childNodes[i];if(1!==a.nodeType)continue;const s=c(a).toLowerCase();switch(s){case"title":case"abstract":o[s]=r(a);break;case"identifier":o.id=r(a);break;case"wgs84boundingbox":{const e=n(a,"LowerCorner"),r=n(a,"UpperCorner");o.lonLatEnvelope=new t({xmin:e[0],ymin:e[1],xmax:r[0],ymax:r[1],spatialReference:{wkid:4326}})}break;case"coveragesummary":o.coverageSummaries=o.coverageSummaries||[],o.coverageSummaries.push(m(a))}}return o}function g(e,t){if(e.coverageSummaries)for(let r=0;r<e.coverageSummaries.length;r++)e.coverageSummaries[r].abstract=e.coverageSummaries[r].abstract||e.abstract,e.coverageSummaries[r].lonLatEnvelope=e.coverageSummaries[r].lonLatEnvelope||e.lonLatEnvelope,e.coverageSummaries[r].title=e.coverageSummaries[r].title||e.title,g(e.coverageSummaries[r],t);null!=e.id&&t.push(e)}function v(e){const t=o(e.querySelector("Operation[name=GetCapabilities]"),"Get")?.getAttribute("xlink:href")||"",r=o(e.querySelector("Operation[name=DescribeCoverage]"),"Get")?.getAttribute("xlink:href")||"",i=o(e.querySelector("Operation[name=GetCoverage]"),"Get")?.getAttribute("xlink:href")||"";return{getCapabilities:l(t),describeCoverage:l(r),getCoverage:l(i)}}function d(e){const t=r(e,"ServiceIdentification/Title"),i=a(e,"ServiceIdentification/ServiceTypeVersion"),n=v(o(e,"OperationsMetadata")),c=[],l=o(e,"Contents");for(let r=0;r<l.childNodes.length;r++){const e=l.childNodes[r];1===e.nodeType&&(s(e,"CoverageSummary")&&g(m(e),c))}const p=a(l,"SupportedFormat");return{name:t,onlineResources:n,coverages:c,gridCoverages:u(c),supportedVersions:i,supportedFormats:p,version:"1.1.0"}}function f(e){const s=o(e,"ServiceIdentification"),c=r(s,"Title"),l=a(s,"ServiceTypeVersion"),p=a(s,"Profile"),m=v(o(e,"OperationsMetadata")),g=i(e,"Contents/CoverageSummary"),d=[];for(let i=0;i<g.length;i++){const e=g[i],a=r(e,"CoverageId"),s=o(e,"WGS84BoundingBox");let c;if(s){const e=n(s,"LowerCorner"),r=n(s,"UpperCorner");c=new t({xmin:e[0],ymin:e[1],xmax:r[0],ymax:r[1],spatialReference:{wkid:4326}})}const l=r(e,"CoverageSubtype")||"RectifiedGridCoverage";d.push({id:a,lonLatEnvelope:c,coverageSubType:l})}const f=o(e,"ServiceMetadata");return{name:c,supportedVersions:l,supportedFormats:a(f,"formatSupported"),supportedInterpolations:a(f,"interpolationSupported").concat(a(f,"InterpolationSupported")),onlineResources:m,profiles:p,coverages:d,gridCoverages:u(d),version:"2.0.1"}}function S(t,r=null){let o=null;if("string"==typeof t){o=(new DOMParser).parseFromString(t,"text/xml")}else o=t;let i=o.documentElement.getAttribute("version");"1.0"===i?i="1.0.0":"1.1"===i&&(i="1.1.0");const n=i||r||"1.0.0",a=n.slice(0,3);let s;if("2.0"===a)s=f(o);else if("1.1"===a)s=d(o);else{if("1.0"!==a)throw new e("wcsraster:parsecapabilities","the capabilities version is not supported");s=p(o)}return s.version=n,s}export{S as parseCapabilities};
|
|
5
|
+
import e from"../../../core/Error.js";import t from"../../../geometry/Extent.js";import{getElementValue as r,getElement as o,getElements as i,getSpaceDelimitedNumericValues as n,getElementValues as a,isSameTagIgnoreNS as s,getNodeNameIgnoreNS as c}from"./xmlUtilities.js";function l(e){return e.endsWith("?")?e.slice(0,-1):e}function u(e){return e.filter((({coverageSubType:e})=>null==e||""===e||/^rectified(grid|dataset)/i.test(e)))}function p(e){const a=r(e,"Service/name"),s=o(e,"Capability"),c=o(s,"GetCapabilities/Get/OnlineResource")?.getAttribute("xlink:href")??"",p=o(s,"DescribeCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",m=o(s,"GetCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",g={getCapabilities:l(c),describeCoverage:l(p),getCoverage:l(m)},v=i(e,"CoverageOfferingBrief"),d=[];for(let o=0;o<v.length;o++){const e=v[o],a=r(e,"name"),s=i(e,"pos"),c=n(s[0]),l=n(s[1]),u=new t({xmin:c[0],ymin:c[1],xmax:l[0],ymax:l[1],spatialReference:{wkid:4326}});d.push({id:a,lonLatEnvelope:u})}return{name:a,onlineResources:g,coverages:d,gridCoverages:u(d),supportedVersions:["1.0.0"],version:"1.0.0"}}function m(e){const o={};for(let i=0;i<e.childNodes.length;i++){const a=e.childNodes[i];if(1!==a.nodeType)continue;const s=c(a).toLowerCase();switch(s){case"title":case"abstract":o[s]=r(a);break;case"identifier":o.id=r(a);break;case"wgs84boundingbox":{const e=n(a,"LowerCorner"),r=n(a,"UpperCorner");o.lonLatEnvelope=new t({xmin:e[0],ymin:e[1],xmax:r[0],ymax:r[1],spatialReference:{wkid:4326}})}break;case"coveragesummary":o.coverageSummaries=o.coverageSummaries||[],o.coverageSummaries.push(m(a))}}return o}function g(e,t){if(e.coverageSummaries)for(let r=0;r<e.coverageSummaries.length;r++)e.coverageSummaries[r].abstract=e.coverageSummaries[r].abstract||e.abstract,e.coverageSummaries[r].lonLatEnvelope=e.coverageSummaries[r].lonLatEnvelope||e.lonLatEnvelope,e.coverageSummaries[r].title=e.coverageSummaries[r].title||e.title,g(e.coverageSummaries[r],t);null!=e.id&&t.push(e)}function v(e){const t=o(e.querySelector("Operation[name=GetCapabilities]"),"Get")?.getAttribute("xlink:href")||"",r=o(e.querySelector("Operation[name=DescribeCoverage]"),"Get")?.getAttribute("xlink:href")||"",i=o(e.querySelector("Operation[name=GetCoverage]"),"Get")?.getAttribute("xlink:href")||"";return{getCapabilities:l(t),describeCoverage:l(r),getCoverage:l(i)}}function d(e){const t=r(e,"ServiceIdentification/Title"),i=a(e,"ServiceIdentification/ServiceTypeVersion"),n=v(o(e,"OperationsMetadata")),c=[],l=o(e,"Contents");for(let r=0;r<l.childNodes.length;r++){const e=l.childNodes[r];1===e.nodeType&&(s(e,"CoverageSummary")&&g(m(e),c))}const p=a(l,"SupportedFormat");return{name:t,onlineResources:n,coverages:c,gridCoverages:u(c),supportedVersions:i,supportedFormats:p,version:"1.1.0"}}function f(e){const s=o(e,"ServiceIdentification"),c=r(s,"Title"),l=a(s,"ServiceTypeVersion"),p=a(s,"Profile"),m=v(o(e,"OperationsMetadata")),g=i(e,"Contents/CoverageSummary"),d=[];for(let i=0;i<g.length;i++){const e=g[i],a=r(e,"CoverageId"),s=o(e,"WGS84BoundingBox");let c;if(s){const e=n(s,"LowerCorner"),r=n(s,"UpperCorner");c=new t({xmin:e[0],ymin:e[1],xmax:r[0],ymax:r[1],spatialReference:{wkid:4326}})}const l=r(e,"CoverageSubtype")||"RectifiedGridCoverage";d.push({id:a,lonLatEnvelope:c,coverageSubType:l})}const f=o(e,"ServiceMetadata");return{name:c,supportedVersions:l,supportedFormats:a(f,"formatSupported"),supportedInterpolations:a(f,"interpolationSupported").concat(a(f,"InterpolationSupported")),onlineResources:m,profiles:p,coverages:d,gridCoverages:u(d),version:"2.0.1"}}function S(e){let t=null;if("string"==typeof e){t=(new DOMParser).parseFromString(e,"text/xml")}else t=e;const r=t.documentElement.getAttribute("version"),o=r?.slice(0,3);return null!=o&&o<"2.1"}function b(t,r=null){let o=null;if("string"==typeof t){o=(new DOMParser).parseFromString(t,"text/xml")}else o=t;let i=o.documentElement.getAttribute("version");"1.0"===i?i="1.0.0":"1.1"===i&&(i="1.1.0");const n=i||r||"1.0.0",a=n.slice(0,3);let s;if("2.0"===a)s=f(o);else if("1.1"===a)s=d(o);else{if("1.0"!==a)throw new e("wcsraster:parsecapabilities","the capabilities version is not supported");s=p(o)}return s.version=n,s}export{S as isSupportedVersion,b as parseCapabilities};
|
|
@@ -54,7 +54,7 @@ export const cellStatistics: __esri.rasterFunctionUtils["cellStatistics"];
|
|
|
54
54
|
export const clip: __esri.rasterFunctionUtils["clip"];
|
|
55
55
|
export const colormap: __esri.rasterFunctionUtils["colormap"];
|
|
56
56
|
export const colormapToRGB: __esri.rasterFunctionUtils["colormapToRGB"];
|
|
57
|
-
export const
|
|
57
|
+
export const compositeBand: __esri.rasterFunctionUtils["compositeBand"];
|
|
58
58
|
export const conditional: __esri.rasterFunctionUtils["conditional"];
|
|
59
59
|
export const contrastBrightness: __esri.rasterFunctionUtils["contrastBrightness"];
|
|
60
60
|
export const convolution: __esri.rasterFunctionUtils["convolution"];
|
|
@@ -99,6 +99,7 @@ export const square: __esri.rasterFunctionUtils["square"];
|
|
|
99
99
|
export const statistics: __esri.rasterFunctionUtils["statistics"];
|
|
100
100
|
export const statisticsHistogram: __esri.rasterFunctionUtils["statisticsHistogram"];
|
|
101
101
|
export const stretchMinMax: __esri.rasterFunctionUtils["stretchMinMax"];
|
|
102
|
+
export const stretchNone: __esri.rasterFunctionUtils["stretchNone"];
|
|
102
103
|
export const stretchPercentClip: __esri.rasterFunctionUtils["stretchPercentClip"];
|
|
103
104
|
export const stretchStandardDeviation: __esri.rasterFunctionUtils["stretchStandardDeviation"];
|
|
104
105
|
export const table: __esri.rasterFunctionUtils["table"];
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
export{contrastBrightness,convolution,stretchHistogramEqualization,stretchMinMax,stretchNone,stretchPercentClip,stretchStandardDeviation}from"./rasterFunctions/creators/createAppearenceFunctions.js";export{bandArithmeticBAI,bandArithmeticCIg,bandArithmeticCIre,bandArithmeticClayMinerals,bandArithmeticCustom,bandArithmeticEVI,bandArithmeticFerrousMinerals,bandArithmeticGEMI,bandArithmeticGNDVI,bandArithmeticGVITM,bandArithmeticIronOxide,bandArithmeticMNDWI,bandArithmeticMSAVI,bandArithmeticMTVI2,bandArithmeticNBR,bandArithmeticNDBI,bandArithmeticNDMI,bandArithmeticNDSI,bandArithmeticNDVI,bandArithmeticNDVIre,bandArithmeticNDWI,bandArithmeticPVI,bandArithmeticRTVICore,bandArithmeticSAVI,bandArithmeticSR,bandArithmeticSRre,bandArithmeticSultan,bandArithmeticTSAVI,bandArithmeticVARI,bandArithmeticWNDWI}from"./rasterFunctions/creators/createBandIndexFunctions.js";export{computeChange,threshold}from"./rasterFunctions/creators/createChangeFunctions.js";export{colorspaceConversion,grayscale,spectralConversion,tasseledCap}from"./rasterFunctions/creators/createConversionFunctions.js";export{clip,colormap,colormapToRGB,
|
|
5
|
+
export{contrastBrightness,convolution,stretchHistogramEqualization,stretchMinMax,stretchNone,stretchPercentClip,stretchStandardDeviation}from"./rasterFunctions/creators/createAppearenceFunctions.js";export{bandArithmeticBAI,bandArithmeticCIg,bandArithmeticCIre,bandArithmeticClayMinerals,bandArithmeticCustom,bandArithmeticEVI,bandArithmeticFerrousMinerals,bandArithmeticGEMI,bandArithmeticGNDVI,bandArithmeticGVITM,bandArithmeticIronOxide,bandArithmeticMNDWI,bandArithmeticMSAVI,bandArithmeticMTVI2,bandArithmeticNBR,bandArithmeticNDBI,bandArithmeticNDMI,bandArithmeticNDSI,bandArithmeticNDVI,bandArithmeticNDVIre,bandArithmeticNDWI,bandArithmeticPVI,bandArithmeticRTVICore,bandArithmeticSAVI,bandArithmeticSR,bandArithmeticSRre,bandArithmeticSultan,bandArithmeticTSAVI,bandArithmeticVARI,bandArithmeticWNDWI}from"./rasterFunctions/creators/createBandIndexFunctions.js";export{computeChange,threshold}from"./rasterFunctions/creators/createChangeFunctions.js";export{colorspaceConversion,grayscale,spectralConversion,tasseledCap}from"./rasterFunctions/creators/createConversionFunctions.js";export{clip,colormap,colormapToRGB,compositeBand,createColorComposite,extractBand,mask,remap,statisticsHistogram,table,transposeBits}from"./rasterFunctions/creators/createDataManagementFunctions.js";export{abs,acos,acosh,asin,asinh,atan,atan2,atanh,bitwiseAnd,bitwiseLeftShift,bitwiseNot,bitwiseOr,bitwiseRightShift,bitwiseXor,booleanAnd,booleanNot,booleanOr,booleanXor,calculate,cellStatistics,conditional,cos,cosh,divide,equalTo,exp,exp10,exp2,float,greaterThan,greaterThanEqual,int,isNull,lessThan,lessThanEqual,log,log10,log2,minus,mod,negate,notEqual,plus,power,roundDown,roundUp,setNull,sin,sinh,sqrt,square,tan,tanh,times}from"./rasterFunctions/creators/createLocalFunctions.js";export{weightedOverlay,weightedSum}from"./rasterFunctions/creators/createMultiRasterAnalysisFunctions.js";export{aspect,curvature,hillshade,shadedRelief,slope}from"./rasterFunctions/creators/createSurfaceFunctions.js";export{argStatistics,statistics}from"./rasterFunctions/creators/createStatisticsFunctions.js";const t="$$";export{t as defaultRaster};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getNamedColor as t,hex2rgba as n}from"../../../../colorUtils.js";import{colormapName as e}from"../../rasterFunctionConstants.js";import{createRasterFunction as o}from"./utils.js";import{colorRampDict as r}from"../../../../renderers/support/colorRampUtils.js";function a(t){return"colormap"in t?s(t):"colorRamp"in t?i(t):u(t)}function s(e){const r=e.colormap.map((e=>{if("value"in e){const o="string"==typeof e.color?t(e.color)??n(e.color):e.color;(e=[e.value,...o])[4]&&e[4]<=1&&(e[4]=Math.round(255*e[4]))}return e})),{raster:a,outputPixelType:s}=e;return o("Colormap",{colormap:r,raster:a},s)}function i(t){const{raster:n,colorRamp:e,outputPixelType:r}=t,a={colorRamp:"toJSON"in e?e.toJSON():e,raster:n};return o("Colormap",a,r)}function u(t){const{colorRampName:n}=t,a=Object.values(e).find((t=>t.toLowerCase()===n?.toLowerCase())),s=r.toJSON(n),{raster:i,outputPixelType:u="unknown"}=t;return o("Colormap",a?{colormapName:a,raster:i}:{colorRampName:s,raster:i},u)}function l(t){const{raster:n,outputPixelType:e="u8"}=t;return o("ColormapToRGB",{raster:n},e)}function p(t){const{raster:n,histograms:e,outputPixelType:r}=t,a=t.statistics?.map((t=>({min:t.min,max:t.max,mean:t.avg,standardDeviation:t.stddev})));return o("StatisticsHistograms",{raster:n,statistics:a,histograms:e},r)}function c(t){const{raster:n,attributeTable:e,outputPixelType:r="unknown"}=t,a="toJSON"in e?e.toJSON():e;return o("Table",{raster:n,attributeTableAsRecordSet:a},r)}function m(t){const{raster:n,outputPixelType:e="unknown"}=t,r={raster:n,missingBandAction:"fail"===t.missingBandAction?1:0};return"bandIds"in t?r.bandIds=t.bandIds:"bandNames"in t?r.bandNames=t.bandNames:"bandWavelengths"in t&&(r.bandWavelengths=t.bandWavelengths),o("ExtractBand",r,e)}function d(t){const{redBand:n,greenBand:e,blueBand:r,raster:a,outputPixelType:s}=t,i="name"===t.method?0:2;return o("CreateColorComposite",{raster:a,method:i,bandIndexesR:n,bandIndexesG:e,bandIndexesB:r},s)}function f(t){const{rasters:n,outputPixelType:e}=t;return o("CompositeBand",{rasters:n},e)}function g(t){const{allowUnmatched:n,raster:e,rangeMaps:r,outputPixelType:a}=t,s=r?.filter((({output:t})=>null!=t)),i=s?.flatMap((({range:t})=>t)),u=s?.map((({output:t})=>t)),l=r?.filter((t=>null==t.output))?.flatMap((({range:t})=>t));return o("Remap",{allowUnmatched:n,raster:e,inputRanges:i,outputValues:u,noDataRanges:l},a)}function b(t){const{inputBitPositions:n,raster:e,fillRaster:r,outputBitPositions:a,outputPixelType:s}=t,i={inputBitPositions:n,outputBitPositions:a,raster:e};return null!=r&&("number"==typeof r?(i.constantFillCheck=!0,i.constantFillValue=r):i.fillRaster=r),o("TransposeBits",i,s)}function x(t){const{raster:n,outputPixelType:e="unknown"}=t,r=t.includedRanges?.flatMap((t=>t)),a=t.noDataValues?.map((t=>t.join(" "))),s="match-all"===t.noDataInterpretation?1:0;return o("Mask",{raster:n,includedRanges:r,noDataInterpretation:s,noDataValues:a},e)}function T(t){const{geometry:n,keepOutside:e,outputPixelType:r="unknown",raster:a}=t,s="declaredClass"in n?n.toJSON():n;return o("Clip",{clippingGeometry:s,clippingType:e?2:1,raster:a},r)}export{T as clip,a as colormap,l as colormapToRGB,f as
|
|
5
|
+
import{getNamedColor as t,hex2rgba as n}from"../../../../colorUtils.js";import{colormapName as e}from"../../rasterFunctionConstants.js";import{createRasterFunction as o}from"./utils.js";import{colorRampDict as r}from"../../../../renderers/support/colorRampUtils.js";function a(t){return"colormap"in t?s(t):"colorRamp"in t?i(t):u(t)}function s(e){const r=e.colormap.map((e=>{if("value"in e){const o="string"==typeof e.color?t(e.color)??n(e.color):e.color;(e=[e.value,...o])[4]&&e[4]<=1&&(e[4]=Math.round(255*e[4]))}return e})),{raster:a,outputPixelType:s}=e;return o("Colormap",{colormap:r,raster:a},s)}function i(t){const{raster:n,colorRamp:e,outputPixelType:r}=t,a={colorRamp:"toJSON"in e?e.toJSON():e,raster:n};return o("Colormap",a,r)}function u(t){const{colorRampName:n}=t,a=Object.values(e).find((t=>t.toLowerCase()===n?.toLowerCase())),s=r.toJSON(n),{raster:i,outputPixelType:u="unknown"}=t;return o("Colormap",a?{colormapName:a,raster:i}:{colorRampName:s,raster:i},u)}function l(t){const{raster:n,outputPixelType:e="u8"}=t;return o("ColormapToRGB",{raster:n},e)}function p(t){const{raster:n,histograms:e,outputPixelType:r}=t,a=t.statistics?.map((t=>({min:t.min,max:t.max,mean:t.avg,standardDeviation:t.stddev})));return o("StatisticsHistograms",{raster:n,statistics:a,histograms:e},r)}function c(t){const{raster:n,attributeTable:e,outputPixelType:r="unknown"}=t,a="toJSON"in e?e.toJSON():e;return o("Table",{raster:n,attributeTableAsRecordSet:a},r)}function m(t){const{raster:n,outputPixelType:e="unknown"}=t,r={raster:n,missingBandAction:"fail"===t.missingBandAction?1:0};return"bandIds"in t?r.bandIds=t.bandIds:"bandNames"in t?r.bandNames=t.bandNames:"bandWavelengths"in t&&(r.bandWavelengths=t.bandWavelengths),o("ExtractBand",r,e)}function d(t){const{redBand:n,greenBand:e,blueBand:r,raster:a,outputPixelType:s}=t,i="name"===t.method?0:2;return o("CreateColorComposite",{raster:a,method:i,bandIndexesR:n,bandIndexesG:e,bandIndexesB:r},s)}function f(t){const{rasters:n,outputPixelType:e}=t;return o("CompositeBand",{rasters:n},e)}function g(t){const{allowUnmatched:n,raster:e,rangeMaps:r,outputPixelType:a}=t,s=r?.filter((({output:t})=>null!=t)),i=s?.flatMap((({range:t})=>t)),u=s?.map((({output:t})=>t)),l=r?.filter((t=>null==t.output))?.flatMap((({range:t})=>t));return o("Remap",{allowUnmatched:n,raster:e,inputRanges:i,outputValues:u,noDataRanges:l},a)}function b(t){const{inputBitPositions:n,raster:e,fillRaster:r,outputBitPositions:a,outputPixelType:s}=t,i={inputBitPositions:n,outputBitPositions:a,raster:e};return null!=r&&("number"==typeof r?(i.constantFillCheck=!0,i.constantFillValue=r):i.fillRaster=r),o("TransposeBits",i,s)}function x(t){const{raster:n,outputPixelType:e="unknown"}=t,r=t.includedRanges?.flatMap((t=>t)),a=t.noDataValues?.map((t=>t.join(" "))),s="match-all"===t.noDataInterpretation?1:0;return o("Mask",{raster:n,includedRanges:r,noDataInterpretation:s,noDataValues:a},e)}function T(t){const{geometry:n,keepOutside:e,outputPixelType:r="unknown",raster:a}=t,s="declaredClass"in n?n.toJSON():n;return o("Clip",{clippingGeometry:s,clippingType:e?2:1,raster:a},r)}export{T as clip,a as colormap,l as colormapToRGB,f as compositeBand,d as createColorComposite,m as extractBand,x as mask,g as remap,p as statisticsHistogram,c as table,b as transposeBits};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "4.33.0-next.
|
|
3
|
+
"version": "4.33.0-next.20250206",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
29
|
-
"@esri/calcite-components": "~3.0.0-next.
|
|
29
|
+
"@esri/calcite-components": "~3.0.0-next.128",
|
|
30
30
|
"@vaadin/grid": "~24.6.3",
|
|
31
31
|
"@zip.js/zip.js": "~2.7.57",
|
|
32
32
|
"luxon": "~3.5.0",
|