projectionEllipsoid.js 1.5 KB

12345
  1. /*
  2. All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. See https://js.arcgis.com/4.24/esri/copyright.txt for details.
  4. */
  5. import n from"./SpatialReference.js";import{mars as e,moon as r,earth as t}from"./support/Ellipsoid.js";import{isMars as i,isMoon as c,isWKIDFromMars as o,isWKIDFromMoon as S}from"./support/spatialReferenceUtils.js";function T(e){return new n({wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`})}const G=T(t),I=T(e),E=T(r),R=new n({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${t.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`});function A(n){return n&&n===e?I:n&&n===r?E:G}function O(n){return n&&(i(n)||n===I)?I:n&&(c(n)||n===E)?E:G}function p(n){return n&&(i(n)||n===I)?e:n&&(c(n)||n===E)?r:t}function u(n){return o(n)?e:S(n)?r:t}export{G as SphericalECEFSpatialReference,I as SphericalPCPFMars,E as SphericalPCPFMoon,R as WGS84ECEFSpatialReference,T as createSphericalPCPF,p as getReferenceEllipsoid,u as getReferenceEllipsoidFromWKID,O as getSphericalPCPF,A as getSphericalPCPFForEllipsoid};