You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
5.2 KiB
14 lines
5.2 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("exports ../../../core/Collection ../../../geometry/support/spatialReferenceUtils ../../../layers/support/layerUtils ../../ViewingMode ./NeighborIndex ./TerrainData ../../../chunks/terrainUtilsPlanar ../../../chunks/terrainUtilsSpherical".split(" "),function(b,C,v,D,l,c,h,m,n){function p(a){return"imagery-tile"===a?.type||"wcs"===a?.type}function k(a){return"imagery-tile-3d"===a?.type}function q(a){return"tile-3d"===a?.type}function r(a){return"vector-tile-3d"===a?.type}function t(a){return"wmts-3d"=== |
|
a?.type}function w(a){return"elevation-3d"===a?.type}function x(a){return a&&(q(a)||k(a)||r(a)||t(a))}function y(a){return h.isVectorTile(a?.data)}function u(a,d,g,e,f){return E[e].checkIfTileInfoSupportedForViewSR(a,g,d,f)}function z(a,d,g){a=D.getTileMaxtrixSetFromActiveLayer(a);if(null!=a)if(C.isCollection(a)){if(a=a.find(e=>null==u(e.tileInfo,e.fullExtent,d,g)))return{tileInfo:a.tileInfo,fullExtent:a.fullExtent}}else return{tileInfo:a.tileInfo,fullExtent:a.fullExtent};return{tileInfo:null,fullExtent:null}} |
|
function A(a){return a.isWGS84||a.isWebMercator||v.isCGCS2000(a)||!v.isEarth(a)}const E={[l.ViewingMode.Global]:n.terrainUtilsSpherical,[l.ViewingMode.Local]:m.terrainUtilsPlanar};b.enableTerrainInternalChecks=!1;b.enableWaterproofTests=!1;const B={force512VTL:!1};m=[c.NeighborIndex.NORTH,c.NeighborIndex.EAST,c.NeighborIndex.SOUTH,c.NeighborIndex.WEST];n=[c.NeighborIndex.NORTH_EAST,c.NeighborIndex.SOUTH_EAST,c.NeighborIndex.SOUTH_WEST,c.NeighborIndex.NORTH_WEST];b.almostEquals=function(a,d,g=1E-5){return Math.abs(a- |
|
d)<g};b.checkIfTileInfoSupportedForView=u;b.enableInternalTerrainChecks=function(a){b.enableTerrainInternalChecks=a};b.enableTerrainWaterproofChecks=function(a){b.enableWaterproofTests=a;b.enableTerrainInternalChecks=b.enableTerrainInternalChecks||a};b.eps=1E-5;b.getLayerWithExtentRange=function(a){return k(a)?{fullExtent:a.fullExtent,minScale:a.layer.minScale,maxScale:a.layer.maxScale,tilemapCache:null}:a.layer};b.getTileInfoAndExtentFromWMTSLayer=z;b.getTiledLayerInfo=function(a,d,g){var e=null, |
|
f=null;"wmts"===a?.type?(f=z(a,d,g),e=f.tileInfo,f=f.fullExtent):(f=p(a)?a.getCompatibleFullExtent(d):a.fullExtent,e=g===l.ViewingMode.Local,e=p(a)?a.getCompatibleTileInfo(d,f,e):"vector-tile"===a?.type?e&&!A(d)||B.force512VTL?a.tileInfo:a.tileInfo.getCompatibleForVTL(256):a.tileInfo);a="tilemapCache"in a?a.tilemapCache?.effectiveMaxLOD:void 0;return null!=e&&null!=f&&null==u(e,f,d,g,a)?{tileInfo:e,fullExtent:f}:null};b.internalAssert=function(a,d){if(b.enableTerrainInternalChecks&&!a)throw a=Error().stack?.slice(5), |
|
console.warn("Terrain internal: "+(d??"")+" at "+a),Error("Assertion failed"+(d?": "+d:""));};b.isBlendableLayerView=function(a){return a&&(q(a)||t(a)||k(a)||r(a))};b.isEast=function(a){return a===c.NeighborIndex.NORTH_EAST||a===c.NeighborIndex.EAST||a===c.NeighborIndex.SOUTH_EAST};b.isElevationLayer=function(a){return"elevation"===a?.type};b.isElevationLayerView=w;b.isGroupLayerView=function(a){return"group"===a?.type};b.isImageSourceRenderInfo=function(a){a=a?.sourceLayerInfo?.data;return h.isImageWithType(a)|| |
|
a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof ImageData};b.isImageryTileLayerView=k;b.isImageryTileRenderInfo=function(a){return h.isRasterTile(a?.sourceLayerInfo?.data)};b.isMapTileLayerView=x;b.isNorth=function(a){return a===c.NeighborIndex.NORTH_EAST||a===c.NeighborIndex.NORTH||a===c.NeighborIndex.NORTH_WEST};b.isNorthCorner=function(a){return a===c.NeighborIndex.NORTH_WEST||a===c.NeighborIndex.NORTH_EAST};b.isProjectableRasterLayer=p;b.isSouth=function(a){return a=== |
|
c.NeighborIndex.SOUTH_EAST||a===c.NeighborIndex.SOUTH||a===c.NeighborIndex.SOUTH_WEST};b.isSurfaceLayerView=function(a){return x(a)||w(a)};b.isTextureTileRenderInfo=function(a){return h.isTileTexture(a?.sourceLayerInfo?.data)};b.isTileLayerView=q;b.isVectorTileLayerView=r;b.isVectorTilePerLayerInfo=y;b.isVectorTileRenderInfo=function(a){return y(a?.sourceLayerInfo)||!!a?.isVTLBackground};b.isWMTSLayerView=t;b.isWest=function(a){return a===c.NeighborIndex.NORTH_WEST||a===c.NeighborIndex.WEST||a=== |
|
c.NeighborIndex.SOUTH_WEST};b.isWestCorner=function(a){return a===c.NeighborIndex.NORTH_WEST||a===c.NeighborIndex.SOUTH_WEST};b.lij2s=function(a){return"["+a[0]+","+a[1]+","+a[2]+"]"};b.neighborCornerIndices=n;b.neighborEdgeIndices=m;b.oppositeCorner=function(a){return a===c.NeighborIndex.NORTH_EAST?c.NeighborIndex.SOUTH_WEST:a===c.NeighborIndex.NORTH_WEST?c.NeighborIndex.SOUTH_EAST:a===c.NeighborIndex.SOUTH_WEST?c.NeighborIndex.NORTH_EAST:c.NeighborIndex.NORTH_WEST};b.oppositeEdge=function(a){return a=== |
|
c.NeighborIndex.NORTH?c.NeighborIndex.SOUTH:a===c.NeighborIndex.EAST?c.NeighborIndex.WEST:a===c.NeighborIndex.SOUTH?c.NeighborIndex.NORTH:c.NeighborIndex.EAST};b.releaseTerrainData=function(a){null!=a&&"release"in a&&a.release();return null};b.test=B;b.useFetchTileForLayer=function(a){return a.fetchTile&&!1!==a.hasOverriddenFetchTile};b.v32s=function(a){return"("+a[0]+","+a[1]+","+a[2]+")"};b.vtlAssumes256PixelSizeAsDefault=A;b.weakAssert=function(a,d){a||console.warn("Terrain: "+d)};Object.defineProperty(b, |
|
Symbol.toStringTag,{value:"Module"})}); |