UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 1.04 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{isSome as e}from"../core/arrayUtils.js";import{deg2rad as t}from"../core/mathUtils.js";import{convertToSpatialReferenceUnit as r}from"../core/unitUtils.js";import{supportsCurves as o,execute as s,executeMany as a}from"../geometry/operators/gx/operatorDensify.js";import{getSpatialReference as n,toGeometry as i,fromGeometry as m}from"../geometry/operators/support/apiConverter.js";function p(e,o,a={}){let{maxAngleInDegrees:p=0,maxDeviation:u=0,unit:c}=a;const l=n(e);return c&&(o=r(o,c,l),u&&(u=r(u,c,l))),i(s(m(e),o,u,t(p)),l)}function u(o,s,p={}){let{maxAngleInDegrees:u=0,maxDeviation:c=0,unit:l}=p;const f=o.map(m),x=n(o);return l&&(s=r(s,l,x),c&&(c=r(c,l,x))),a(f,s,c,t(u)).map((e=>i(e,x))).filter(e)}const c=o(),l=Object.freeze(Object.defineProperty({__proto__:null,execute:p,executeMany:u,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{u as a,l as d,p as e,c as s};