@itwin/core-orbitgt 5.5.0-dev.1 → 5.5.0-dev.2
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/lib/cjs/core-orbitgt.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/AttributeMask.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/AttributeReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/BlockRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/ContainerFile.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/ContainerFilePart.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/DirectoryReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileAccess.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/FileRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/GeometryReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/GeometryRecord.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/OPCReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/PointReader.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
- package/lib/cjs/pointcloud/format/opc/TileRecord.js.map +1 -1
- package/lib/cjs/pointcloud/model/AttributeTypes.js.map +1 -1
- package/lib/cjs/pointcloud/model/AttributeValue.js.map +1 -1
- package/lib/cjs/pointcloud/model/BlockIndex.js.map +1 -1
- package/lib/cjs/pointcloud/model/CloudPoint.js.map +1 -1
- package/lib/cjs/pointcloud/model/Grid.js.map +1 -1
- package/lib/cjs/pointcloud/model/GridIndex.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointAttribute.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointCloudReader.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointData.js.map +1 -1
- package/lib/cjs/pointcloud/model/PointDataRaw.js.map +1 -1
- package/lib/cjs/pointcloud/model/ReadRequest.js.map +1 -1
- package/lib/cjs/pointcloud/model/StandardAttributes.js.map +1 -1
- package/lib/cjs/pointcloud/model/TileIndex.js.map +1 -1
- package/lib/cjs/pointcloud/render/AViewRequest.js.map +1 -1
- package/lib/cjs/pointcloud/render/Block.js.map +1 -1
- package/lib/cjs/pointcloud/render/DataManager.js.map +1 -1
- package/lib/cjs/pointcloud/render/FrameData.js.map +1 -1
- package/lib/cjs/pointcloud/render/Level.js.map +1 -1
- package/lib/cjs/pointcloud/render/TileLoadSorter.js.map +1 -1
- package/lib/cjs/pointcloud/render/ViewTree.js.map +1 -1
- package/lib/cjs/spatial/crs/CRSEngine.js.map +1 -1
- package/lib/cjs/spatial/crs/CRSManager.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Axis.js.map +1 -1
- package/lib/cjs/spatial/ecrs/CRS.js.map +1 -1
- package/lib/cjs/spatial/ecrs/CoordinateSystem.js.map +1 -1
- package/lib/cjs/spatial/ecrs/DataFileUnit.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Datum.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Ellipsoid.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OnlineEngine.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OnlineRegistry.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Operation.js.map +1 -1
- package/lib/cjs/spatial/ecrs/OperationMethod.js.map +1 -1
- package/lib/cjs/spatial/ecrs/ParameterValue.js.map +1 -1
- package/lib/cjs/spatial/ecrs/ParameterValueList.js.map +1 -1
- package/lib/cjs/spatial/ecrs/PrimeMeridian.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Registry.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Transform.js.map +1 -1
- package/lib/cjs/spatial/ecrs/Unit.js.map +1 -1
- package/lib/cjs/spatial/ecrs/VerticalModel.js.map +1 -1
- package/lib/cjs/spatial/ecrs/WellKnownText.js.map +1 -1
- package/lib/cjs/spatial/ecrs/WellKnownTextNode.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
- package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
- package/lib/cjs/spatial/ecrs/transformation/PositionVector.js.map +1 -1
- package/lib/cjs/spatial/geom/Bounds.js.map +1 -1
- package/lib/cjs/spatial/geom/Coordinate.js.map +1 -1
- package/lib/cjs/spatial/geom/Line.js.map +1 -1
- package/lib/cjs/spatial/geom/Transform.js.map +1 -1
- package/lib/cjs/system/buffer/ABuffer.js.map +1 -1
- package/lib/cjs/system/buffer/Float32Buffer.js.map +1 -1
- package/lib/cjs/system/buffer/LittleEndian.js.map +1 -1
- package/lib/cjs/system/buffer/Uint16Buffer.js.map +1 -1
- package/lib/cjs/system/buffer/Uint8Buffer.js.map +1 -1
- package/lib/cjs/system/collection/AList.js.map +1 -1
- package/lib/cjs/system/collection/IntMap.js.map +1 -1
- package/lib/cjs/system/collection/StringMap.js.map +1 -1
- package/lib/cjs/system/io/ABufferInStream.js.map +1 -1
- package/lib/cjs/system/io/InStream.js.map +1 -1
- package/lib/cjs/system/io/OutStream.js.map +1 -1
- package/lib/cjs/system/runtime/ALong.js.map +1 -1
- package/lib/cjs/system/runtime/ASystem.js.map +1 -1
- package/lib/cjs/system/runtime/Downloader.js.map +1 -1
- package/lib/cjs/system/runtime/DownloaderNode.js.map +1 -1
- package/lib/cjs/system/runtime/DownloaderXhr.js.map +1 -1
- package/lib/cjs/system/runtime/Message.js.map +1 -1
- package/lib/cjs/system/runtime/Numbers.js.map +1 -1
- package/lib/cjs/system/runtime/Strings.js.map +1 -1
- package/lib/cjs/system/runtime/iComparator.js.map +1 -1
- package/lib/cjs/system/storage/CacheList.js.map +1 -1
- package/lib/cjs/system/storage/CachedItem.js.map +1 -1
- package/lib/cjs/system/storage/ContentLoader.js.map +1 -1
- package/lib/cjs/system/storage/FileContent.js.map +1 -1
- package/lib/cjs/system/storage/FileRange.js.map +1 -1
- package/lib/cjs/system/storage/FileStorage.js.map +1 -1
- package/lib/cjs/system/storage/NodeFS.js.map +1 -1
- package/lib/cjs/system/storage/PageCachedFile.js.map +1 -1
- package/lib/cjs/system/storage/UrlFS.js.map +1 -1
- package/lib/esm/core-orbitgt.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/AttributeMask.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/AttributeReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/BlockRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/ContainerFile.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/ContainerFilePart.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/DirectoryReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileAccess.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/FileRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/GeometryReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/GeometryRecord.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/OPCReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/PointReader.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
- package/lib/esm/pointcloud/format/opc/TileRecord.js.map +1 -1
- package/lib/esm/pointcloud/model/AttributeTypes.js.map +1 -1
- package/lib/esm/pointcloud/model/AttributeValue.js.map +1 -1
- package/lib/esm/pointcloud/model/BlockIndex.js.map +1 -1
- package/lib/esm/pointcloud/model/CloudPoint.js.map +1 -1
- package/lib/esm/pointcloud/model/Grid.js.map +1 -1
- package/lib/esm/pointcloud/model/GridIndex.js.map +1 -1
- package/lib/esm/pointcloud/model/PointAttribute.js.map +1 -1
- package/lib/esm/pointcloud/model/PointCloudReader.js.map +1 -1
- package/lib/esm/pointcloud/model/PointData.js.map +1 -1
- package/lib/esm/pointcloud/model/PointDataRaw.js.map +1 -1
- package/lib/esm/pointcloud/model/ReadRequest.js.map +1 -1
- package/lib/esm/pointcloud/model/StandardAttributes.js.map +1 -1
- package/lib/esm/pointcloud/model/TileIndex.js.map +1 -1
- package/lib/esm/pointcloud/render/AViewRequest.js.map +1 -1
- package/lib/esm/pointcloud/render/Block.js.map +1 -1
- package/lib/esm/pointcloud/render/DataManager.js.map +1 -1
- package/lib/esm/pointcloud/render/FrameData.js.map +1 -1
- package/lib/esm/pointcloud/render/Level.js.map +1 -1
- package/lib/esm/pointcloud/render/TileLoadSorter.js.map +1 -1
- package/lib/esm/pointcloud/render/ViewTree.js.map +1 -1
- package/lib/esm/spatial/crs/CRSEngine.js.map +1 -1
- package/lib/esm/spatial/crs/CRSManager.js.map +1 -1
- package/lib/esm/spatial/ecrs/Axis.js.map +1 -1
- package/lib/esm/spatial/ecrs/CRS.js.map +1 -1
- package/lib/esm/spatial/ecrs/CoordinateSystem.js.map +1 -1
- package/lib/esm/spatial/ecrs/DataFileUnit.js.map +1 -1
- package/lib/esm/spatial/ecrs/Datum.js.map +1 -1
- package/lib/esm/spatial/ecrs/Ellipsoid.js.map +1 -1
- package/lib/esm/spatial/ecrs/OnlineEngine.js.map +1 -1
- package/lib/esm/spatial/ecrs/OnlineRegistry.js.map +1 -1
- package/lib/esm/spatial/ecrs/Operation.js.map +1 -1
- package/lib/esm/spatial/ecrs/OperationMethod.js.map +1 -1
- package/lib/esm/spatial/ecrs/ParameterValue.js.map +1 -1
- package/lib/esm/spatial/ecrs/ParameterValueList.js.map +1 -1
- package/lib/esm/spatial/ecrs/PrimeMeridian.js.map +1 -1
- package/lib/esm/spatial/ecrs/Registry.js.map +1 -1
- package/lib/esm/spatial/ecrs/Transform.js.map +1 -1
- package/lib/esm/spatial/ecrs/Unit.js.map +1 -1
- package/lib/esm/spatial/ecrs/VerticalModel.js.map +1 -1
- package/lib/esm/spatial/ecrs/WellKnownText.js.map +1 -1
- package/lib/esm/spatial/ecrs/WellKnownTextNode.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
- package/lib/esm/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
- package/lib/esm/spatial/ecrs/transformation/PositionVector.js.map +1 -1
- package/lib/esm/spatial/geom/Bounds.js.map +1 -1
- package/lib/esm/spatial/geom/Coordinate.js.map +1 -1
- package/lib/esm/spatial/geom/Line.js.map +1 -1
- package/lib/esm/spatial/geom/Transform.js.map +1 -1
- package/lib/esm/system/buffer/ABuffer.js.map +1 -1
- package/lib/esm/system/buffer/Float32Buffer.js.map +1 -1
- package/lib/esm/system/buffer/LittleEndian.js.map +1 -1
- package/lib/esm/system/buffer/Uint16Buffer.js.map +1 -1
- package/lib/esm/system/buffer/Uint8Buffer.js.map +1 -1
- package/lib/esm/system/collection/AList.js.map +1 -1
- package/lib/esm/system/collection/IntMap.js.map +1 -1
- package/lib/esm/system/collection/StringMap.js.map +1 -1
- package/lib/esm/system/io/ABufferInStream.js.map +1 -1
- package/lib/esm/system/io/InStream.js.map +1 -1
- package/lib/esm/system/io/OutStream.js.map +1 -1
- package/lib/esm/system/runtime/ALong.js.map +1 -1
- package/lib/esm/system/runtime/ASystem.js.map +1 -1
- package/lib/esm/system/runtime/Downloader.js.map +1 -1
- package/lib/esm/system/runtime/DownloaderNode.js.map +1 -1
- package/lib/esm/system/runtime/DownloaderXhr.js.map +1 -1
- package/lib/esm/system/runtime/Message.js.map +1 -1
- package/lib/esm/system/runtime/Numbers.js.map +1 -1
- package/lib/esm/system/runtime/Strings.js.map +1 -1
- package/lib/esm/system/runtime/iComparator.js.map +1 -1
- package/lib/esm/system/storage/CacheList.js.map +1 -1
- package/lib/esm/system/storage/CachedItem.js.map +1 -1
- package/lib/esm/system/storage/ContentLoader.js.map +1 -1
- package/lib/esm/system/storage/FileContent.js.map +1 -1
- package/lib/esm/system/storage/FileRange.js.map +1 -1
- package/lib/esm/system/storage/FileStorage.js.map +1 -1
- package/lib/esm/system/storage/NodeFS.js.map +1 -1
- package/lib/esm/system/storage/PageCachedFile.js.map +1 -1
- package/lib/esm/system/storage/UrlFS.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotineObliqueMercator.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/HotineObliqueMercator.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;GAgBG;AACH,gBAAgB;AAChB,MAAa,qBAAsB,SAAQ,iCAAe;IACtD,8BAA8B;IACvB,M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AC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,kEAAkE;QACxL,uBAAuB;QACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AA1KL,sDA2KC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n// package orbitgt.spatial.ecrs.projection;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Coordinate } from \"../../geom/Coordinate\";\r\nimport { CRS } from \"../CRS\";\r\nimport { Ellipsoid } from \"../Ellipsoid\";\r\nimport { Operation } from \"../Operation\";\r\nimport { OperationMethod } from \"../OperationMethod\";\r\nimport { ParameterValueList } from \"../ParameterValueList\";\r\n\r\n/**\r\n * Class HotineObliqueMercator defines a Hotine Oblique Mercator projection.\r\n *\r\n * The 'source' CRS is the geographic CRS.\r\n * The 'target' CRS is the projected CRS.\r\n *\r\n * Based on the following document:\r\n *\r\n * Coordinate Conversions and Transformations including Formulas\r\n * Guidance Note Number 7, part 2\r\n * Revised August 2006\r\n * Available at: http://www.epsg.org/\r\n *\r\n * Formulas: see 1.4.6: Oblique Mercator and Hotine Oblique Mercator\r\n *\r\n * @version 1.0 May 2008\r\n */\r\n/** @internal */\r\nexport class HotineObliqueMercator extends OperationMethod {\r\n /** The code of this method */\r\n public static readonly METHOD_CODE: int32 = 9812;\r\n\r\n /** Latitude of the projection center */\r\n private _latC: float64;\r\n /** Longitude of the projection center */\r\n private _lonC: float64;\r\n /** Azimuth of the initial line passing through the projection center */\r\n private _aziC: float64;\r\n /** Angle from the recified grid to the skew (oblique) grid */\r\n private _gamC: float64;\r\n /** Scale factor on the initial line of projection */\r\n private _kC: float64;\r\n /** False easting at the natural origin */\r\n private _fe: float64;\r\n /** False northing at the natural origin */\r\n private _fn: float64;\r\n\r\n /** Forward calculation parameters */\r\n private _a: float64;\r\n private _e: float64;\r\n private _e2: float64;\r\n private _B: float64;\r\n private _A: float64;\r\n private _tO: float64;\r\n private _D: float64;\r\n private _F: float64;\r\n private _H: float64;\r\n private _G: float64;\r\n private _latO: float64;\r\n private _lonO: float64;\r\n private _vC: float64;\r\n private _uC: float64;\r\n /** Reverse calculation parameters */\r\n private _rev1: float64;\r\n private _rev2: float64;\r\n private _rev3: float64;\r\n private _rev4: float64;\r\n\r\n /**\r\n * Create a new projection.\r\n * @param parameters the values of the parameters.\r\n */\r\n public constructor(parameters: ParameterValueList) {\r\n super(HotineObliqueMercator.METHOD_CODE, \"Hotine Oblique Mercator\", parameters);\r\n /* Store the parameters */\r\n this._latC = parameters.getValue(8811);\r\n this._lonC = parameters.getValue(8812);\r\n this._aziC = parameters.getValue(8813);\r\n this._gamC = parameters.getValue(8814);\r\n this._kC = parameters.getValue(8815);\r\n this._fe = parameters.getValue(8806);\r\n this._fn = parameters.getValue(8807);\r\n }\r\n\r\n /**\r\n * Get the sign of a number.\r\n */\r\n private static sign(v: float64): float64 {\r\n return (v < 0.0) ? (-1.0) : (1.0);\r\n }\r\n\r\n /**\r\n * Get the power of a number (must be able to handle negative 'n' values).\r\n */\r\n private static pow(n: float64, e: int32): float64 {\r\n let p: float64 = 1.0;\r\n for (let i: number = 0; i < e; i++) p *= n;\r\n return p;\r\n }\r\n\r\n /**\r\n * Initialize the projection.\r\n * @param ellipsoid the ellipsoid to use.\r\n * @return this projection (for convenience).\r\n */\r\n public initializeProjection(ellipsoid: Ellipsoid): HotineObliqueMercator {\r\n /* Prepare the forward parameters */\r\n this._a = ellipsoid.getA();\r\n this._e = ellipsoid.getE();\r\n this._e2 = this._e * this._e;\r\n this._B = Math.sqrt(1.0 + (this._e2 * HotineObliqueMercator.pow(Math.cos(this._latC), 4) / (1.0 - this._e2)));\r\n const esinLatC: float64 = this._e * Math.sin(this._latC);\r\n this._A = this._a * this._B * this._kC * Math.sqrt(1.0 - this._e2) / (1.0 - HotineObliqueMercator.pow(esinLatC, 2));\r\n this._tO = Math.tan(Math.PI / 4.0 - this._latC / 2.0) / Math.pow((1.0 - esinLatC) / (1.0 + esinLatC), this._e / 2.0);\r\n this._D = this._B * Math.sqrt(1.0 - this._e2) / (Math.cos(this._latC) * Math.sqrt(1.0 - HotineObliqueMercator.pow(esinLatC, 2)));\r\n const D2: float64 = (this._D < 1.0) ? (1.0) : (this._D * this._D);\r\n this._F = this._D + Math.sqrt(D2 - 1.0) * HotineObliqueMercator.sign(this._latC);\r\n this._H = this._F * Math.pow(this._tO, this._B);\r\n this._G = (this._F - 1.0 / this._F) / 2.0;\r\n this._latO = Math.asin(Math.sin(this._aziC) / this._D);\r\n this._lonO = this._lonC - Math.asin(this._G * Math.tan(this._latO)) / this._B;\r\n this._vC = 0.0;\r\n if (Math.abs(this._aziC - 0.5 * Math.PI) < 0.00001) this._uC = this._A * (this._lonC - this._lonO); // special case Hungary, Switzerland\r\n else this._uC = (this._A / this._B) * Math.atan(Math.sqrt(D2 - 1.0) / Math.cos(this._aziC)) * HotineObliqueMercator.sign(this._latC);\r\n /* Prepare the reverse parameters */\r\n const e4: float64 = this._e2 * this._e2;\r\n const e6: float64 = e4 * this._e2;\r\n const e8: float64 = e4 * e4;\r\n this._rev1 = (this._e2 / 2 + 5 * e4 / 24 + e6 / 12 + 13 * e8 / 360);\r\n this._rev2 = (7 * e4 / 48 + 29 * e6 / 240 + 811 * e8 / 11520);\r\n this._rev3 = (7 * e6 / 120 + 81 * e8 / 1120);\r\n this._rev4 = (4279 * e8 / 161280);\r\n /* Return the projection */\r\n return this;\r\n }\r\n\r\n /**\r\n * OperationMethod method.\r\n * @see OperationMethod#initialize\r\n */\r\n public override initialize(operation: Operation): void {\r\n this.initializeProjection(operation.getSourceCRS().getEllipsoid());\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#forward\r\n */\r\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters */\r\n const lon: float64 = source.getX();\r\n const lat: float64 = source.getY();\r\n /* Make the calculation */\r\n const esinLat: float64 = this._e * Math.sin(lat);\r\n const t: float64 = Math.tan(Math.PI / 4.0 - lat / 2.0) / Math.pow((1.0 - esinLat) / (1.0 + esinLat), this._e / 2.0);\r\n const Q: float64 = this._H / Math.pow(t, this._B);\r\n const S: float64 = (Q - 1.0 / Q) / 2.0;\r\n const T: float64 = (Q + 1.0 / Q) / 2.0;\r\n const V: float64 = Math.sin(this._B * (lon - this._lonO));\r\n const U: float64 = (-V * Math.cos(this._latO) + S * Math.sin(this._latO)) / T;\r\n const v: float64 = this._A * Math.log((1.0 - U) / (1.0 + U)) / (2.0 * this._B);\r\n const u: float64 = (this._A * Math.atan((S * Math.cos(this._latO) + V * Math.sin(this._latO)) / Math.cos(this._B * (lon - this._lonO))) / this._B); // possibly related to method 9815 atan2 problem? (LER 15/06/2018)\r\n const sinGamC: float64 = Math.sin(this._gamC);\r\n const cosGamC: float64 = Math.cos(this._gamC);\r\n const E: float64 = v * cosGamC + u * sinGamC + this._fe;\r\n const N: float64 = u * cosGamC - v * sinGamC + this._fn;\r\n /* Save the position */\r\n target.setX(E);\r\n target.setY(N);\r\n target.setZ(source.getZ()); // Keep the Z value\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#reverse\r\n */\r\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters */\r\n const E: float64 = target.getX();\r\n const N: float64 = target.getY();\r\n /* Make the calculation */\r\n const sinGamC: float64 = Math.sin(this._gamC);\r\n const cosGamC: float64 = Math.cos(this._gamC);\r\n const v: float64 = (E - this._fe) * cosGamC - (N - this._fn) * sinGamC;\r\n const u: float64 = (N - this._fn) * cosGamC + (E - this._fe) * sinGamC;\r\n const Q: float64 = Math.exp(-this._B * v / this._A);\r\n const S: float64 = (Q - 1.0 / Q) / 2.0;\r\n const T: float64 = (Q + 1.0 / Q) / 2.0;\r\n const V: float64 = Math.sin(this._B * u / this._A);\r\n const U: float64 = (V * Math.cos(this._latO) + S * Math.sin(this._latO)) / T;\r\n const t: float64 = Math.pow(this._H / Math.sqrt((1.0 + U) / (1.0 - U)), 1.0 / this._B);\r\n const chi: float64 = Math.PI / 2.0 - 2.0 * Math.atan(t);\r\n const lat: float64 = chi + Math.sin(2.0 * chi) * this._rev1 + Math.sin(4.0 * chi) * this._rev2 + Math.sin(6.0 * chi) * this._rev3 + Math.sin(8.0 * chi) * this._rev4;\r\n const lon: float64 = this._lonO - Math.atan((S * cosGamC - V * sinGamC) / Math.cos(this._B * u / this._A)) / this._B; // possibly related to method 9815 atan2 problem? (LER 15/06/2018)\r\n /* Save the position */\r\n source.setX(lon);\r\n source.setY(lat);\r\n source.setZ(target.getZ()); // Keep the Z value\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"HotineObliqueMercator.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/HotineObliqueMercator.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;GAgBG;AACH,gBAAgB;AAChB,MAAa,qBAAsB,SAAQ,iCAAe;IACtD,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC;IAEjD,wCAAwC;IAChC,KAAK,CAAU;IACvB,yCAAyC;IACjC,KAAK,CAAU;IACvB,wEAAwE;IAChE,KAAK,CAAU;IACvB,8DAA8D;IACtD,KA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C,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AA1KL,sDA2KC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n// package orbitgt.spatial.ecrs.projection;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Coordinate } from \"../../geom/Coordinate\";\nimport { CRS } from \"../CRS\";\nimport { Ellipsoid } from \"../Ellipsoid\";\nimport { Operation } from \"../Operation\";\nimport { OperationMethod } from \"../OperationMethod\";\nimport { ParameterValueList } from \"../ParameterValueList\";\n\n/**\n * Class HotineObliqueMercator defines a Hotine Oblique Mercator projection.\n *\n * The 'source' CRS is the geographic CRS.\n * The 'target' CRS is the projected CRS.\n *\n * Based on the following document:\n *\n * Coordinate Conversions and Transformations including Formulas\n * Guidance Note Number 7, part 2\n * Revised August 2006\n * Available at: http://www.epsg.org/\n *\n * Formulas: see 1.4.6: Oblique Mercator and Hotine Oblique Mercator\n *\n * @version 1.0 May 2008\n */\n/** @internal */\nexport class HotineObliqueMercator extends OperationMethod {\n /** The code of this method */\n public static readonly METHOD_CODE: int32 = 9812;\n\n /** Latitude of the projection center */\n private _latC: float64;\n /** Longitude of the projection center */\n private _lonC: float64;\n /** Azimuth of the initial line passing through the projection center */\n private _aziC: float64;\n /** Angle from the recified grid to the skew (oblique) grid */\n private _gamC: float64;\n /** Scale factor on the initial line of projection */\n private _kC: float64;\n /** False easting at the natural origin */\n private _fe: float64;\n /** False northing at the natural origin */\n private _fn: float64;\n\n /** Forward calculation parameters */\n private _a: float64;\n private _e: float64;\n private _e2: float64;\n private _B: float64;\n private _A: float64;\n private _tO: float64;\n private _D: float64;\n private _F: float64;\n private _H: float64;\n private _G: float64;\n private _latO: float64;\n private _lonO: float64;\n private _vC: float64;\n private _uC: float64;\n /** Reverse calculation parameters */\n private _rev1: float64;\n private _rev2: float64;\n private _rev3: float64;\n private _rev4: float64;\n\n /**\n * Create a new projection.\n * @param parameters the values of the parameters.\n */\n public constructor(parameters: ParameterValueList) {\n super(HotineObliqueMercator.METHOD_CODE, \"Hotine Oblique Mercator\", parameters);\n /* Store the parameters */\n this._latC = parameters.getValue(8811);\n this._lonC = parameters.getValue(8812);\n this._aziC = parameters.getValue(8813);\n this._gamC = parameters.getValue(8814);\n this._kC = parameters.getValue(8815);\n this._fe = parameters.getValue(8806);\n this._fn = parameters.getValue(8807);\n }\n\n /**\n * Get the sign of a number.\n */\n private static sign(v: float64): float64 {\n return (v < 0.0) ? (-1.0) : (1.0);\n }\n\n /**\n * Get the power of a number (must be able to handle negative 'n' values).\n */\n private static pow(n: float64, e: int32): float64 {\n let p: float64 = 1.0;\n for (let i: number = 0; i < e; i++) p *= n;\n return p;\n }\n\n /**\n * Initialize the projection.\n * @param ellipsoid the ellipsoid to use.\n * @return this projection (for convenience).\n */\n public initializeProjection(ellipsoid: Ellipsoid): HotineObliqueMercator {\n /* Prepare the forward parameters */\n this._a = ellipsoid.getA();\n this._e = ellipsoid.getE();\n this._e2 = this._e * this._e;\n this._B = Math.sqrt(1.0 + (this._e2 * HotineObliqueMercator.pow(Math.cos(this._latC), 4) / (1.0 - this._e2)));\n const esinLatC: float64 = this._e * Math.sin(this._latC);\n this._A = this._a * this._B * this._kC * Math.sqrt(1.0 - this._e2) / (1.0 - HotineObliqueMercator.pow(esinLatC, 2));\n this._tO = Math.tan(Math.PI / 4.0 - this._latC / 2.0) / Math.pow((1.0 - esinLatC) / (1.0 + esinLatC), this._e / 2.0);\n this._D = this._B * Math.sqrt(1.0 - this._e2) / (Math.cos(this._latC) * Math.sqrt(1.0 - HotineObliqueMercator.pow(esinLatC, 2)));\n const D2: float64 = (this._D < 1.0) ? (1.0) : (this._D * this._D);\n this._F = this._D + Math.sqrt(D2 - 1.0) * HotineObliqueMercator.sign(this._latC);\n this._H = this._F * Math.pow(this._tO, this._B);\n this._G = (this._F - 1.0 / this._F) / 2.0;\n this._latO = Math.asin(Math.sin(this._aziC) / this._D);\n this._lonO = this._lonC - Math.asin(this._G * Math.tan(this._latO)) / this._B;\n this._vC = 0.0;\n if (Math.abs(this._aziC - 0.5 * Math.PI) < 0.00001) this._uC = this._A * (this._lonC - this._lonO); // special case Hungary, Switzerland\n else this._uC = (this._A / this._B) * Math.atan(Math.sqrt(D2 - 1.0) / Math.cos(this._aziC)) * HotineObliqueMercator.sign(this._latC);\n /* Prepare the reverse parameters */\n const e4: float64 = this._e2 * this._e2;\n const e6: float64 = e4 * this._e2;\n const e8: float64 = e4 * e4;\n this._rev1 = (this._e2 / 2 + 5 * e4 / 24 + e6 / 12 + 13 * e8 / 360);\n this._rev2 = (7 * e4 / 48 + 29 * e6 / 240 + 811 * e8 / 11520);\n this._rev3 = (7 * e6 / 120 + 81 * e8 / 1120);\n this._rev4 = (4279 * e8 / 161280);\n /* Return the projection */\n return this;\n }\n\n /**\n * OperationMethod method.\n * @see OperationMethod#initialize\n */\n public override initialize(operation: Operation): void {\n this.initializeProjection(operation.getSourceCRS().getEllipsoid());\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#forward\n */\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n const lon: float64 = source.getX();\n const lat: float64 = source.getY();\n /* Make the calculation */\n const esinLat: float64 = this._e * Math.sin(lat);\n const t: float64 = Math.tan(Math.PI / 4.0 - lat / 2.0) / Math.pow((1.0 - esinLat) / (1.0 + esinLat), this._e / 2.0);\n const Q: float64 = this._H / Math.pow(t, this._B);\n const S: float64 = (Q - 1.0 / Q) / 2.0;\n const T: float64 = (Q + 1.0 / Q) / 2.0;\n const V: float64 = Math.sin(this._B * (lon - this._lonO));\n const U: float64 = (-V * Math.cos(this._latO) + S * Math.sin(this._latO)) / T;\n const v: float64 = this._A * Math.log((1.0 - U) / (1.0 + U)) / (2.0 * this._B);\n const u: float64 = (this._A * Math.atan((S * Math.cos(this._latO) + V * Math.sin(this._latO)) / Math.cos(this._B * (lon - this._lonO))) / this._B); // possibly related to method 9815 atan2 problem? (LER 15/06/2018)\n const sinGamC: float64 = Math.sin(this._gamC);\n const cosGamC: float64 = Math.cos(this._gamC);\n const E: float64 = v * cosGamC + u * sinGamC + this._fe;\n const N: float64 = u * cosGamC - v * sinGamC + this._fn;\n /* Save the position */\n target.setX(E);\n target.setY(N);\n target.setZ(source.getZ()); // Keep the Z value\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#reverse\n */\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n const E: float64 = target.getX();\n const N: float64 = target.getY();\n /* Make the calculation */\n const sinGamC: float64 = Math.sin(this._gamC);\n const cosGamC: float64 = Math.cos(this._gamC);\n const v: float64 = (E - this._fe) * cosGamC - (N - this._fn) * sinGamC;\n const u: float64 = (N - this._fn) * cosGamC + (E - this._fe) * sinGamC;\n const Q: float64 = Math.exp(-this._B * v / this._A);\n const S: float64 = (Q - 1.0 / Q) / 2.0;\n const T: float64 = (Q + 1.0 / Q) / 2.0;\n const V: float64 = Math.sin(this._B * u / this._A);\n const U: float64 = (V * Math.cos(this._latO) + S * Math.sin(this._latO)) / T;\n const t: float64 = Math.pow(this._H / Math.sqrt((1.0 + U) / (1.0 - U)), 1.0 / this._B);\n const chi: float64 = Math.PI / 2.0 - 2.0 * Math.atan(t);\n const lat: float64 = chi + Math.sin(2.0 * chi) * this._rev1 + Math.sin(4.0 * chi) * this._rev2 + Math.sin(6.0 * chi) * this._rev3 + Math.sin(8.0 * chi) * this._rev4;\n const lon: float64 = this._lonO - Math.atan((S * cosGamC - V * sinGamC) / Math.cos(this._B * u / this._A)) / this._B; // possibly related to method 9815 atan2 problem? (LER 15/06/2018)\n /* Save the position */\n source.setX(lon);\n source.setY(lat);\n source.setZ(target.getZ()); // Keep the Z value\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KrovakObliqueConformalConic.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/KrovakObliqueConformalConic.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;;;GAkBG;AACH,gBAAgB;AAChB,MAAa,2BAA4B,SAAQ,iCAAe;IAC5D,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC;IAEjD,oCAAoC;IAC5B,KAAK,CAAU;IACvB,0BAA0B;IAClB,KAAK,CAAU;IACvB,4DAA4D;IACpD,KAAK,CAAU;IACvB,2CAA2C;IACnC,KAAK,CAAU;IACvB,+CAA+C;IACvC,GAAG,CAAU;IACrB,6BAA6B;IACrB,GAAG,CAAU;IACrB,8BAA8B;IACtB,GAAG,CAAU;IAErB,oBAAoB;IACZ,EAAE,CAAU;IACZ,EAAE,CAAU;IACZ,GAAG,CAAU;IACb,GAAG,CAAU;IACb,EAAE,CAAU;IACZ,GAAG,CAAU;IAErB;;;SAGK;IACL,YAAmB,UAA8B;QAC7C,KAAK,CAAC,2BAA2B,CAAC,WAAW,EAAE,gCAAgC,EAAE,UAAU,CAAC,CAAC;QAC7F,0BAA0B;QAC1B,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,sGAAsG;QAC9I,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,Q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IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QACtM,CAAC;QACD,MAAM,GAAG,GAAY,IAAI,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;QAC9C,uBAAuB;QACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AAvHL,kEAwHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n// package orbitgt.spatial.ecrs.projection;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Coordinate } from \"../../geom/Coordinate\";\r\nimport { CRS } from \"../CRS\";\r\nimport { Ellipsoid } from \"../Ellipsoid\";\r\nimport { Operation } from \"../Operation\";\r\nimport { OperationMethod } from \"../OperationMethod\";\r\nimport { ParameterValueList } from \"../ParameterValueList\";\r\n\r\n/**\r\n * Class KrovakObliqueConformalConic defines the Krovak Oblique Conformal Conic projection as used in the Czech Republic and Slovakia.\r\n *\r\n * The 'source' CRS is the geographic CRS.\r\n * The 'target' CRS is the projected CRS.\r\n *\r\n * Based on the following document:\r\n *\r\n * Coordinate Conversions and Transformations including Formulas\r\n * Guidance Note Number 7, part 2 (version 6.18.3)\r\n * Revised January 2009\r\n * Available at: http://www.epsg.org/\r\n *\r\n * Formulas: see 1.3.2 \"Krovak Oblique Conformal Conic\"\r\n *\r\n * NOTE: the X axis runs north to south and the Y axis runs east to west. This differs from most other projections.\r\n *\r\n * @version 1.0 October 2009\r\n */\r\n/** @internal */\r\nexport class KrovakObliqueConformalConic extends OperationMethod {\r\n /** The code of this method */\r\n public static readonly METHOD_CODE: int32 = 9819;\r\n\r\n /** Latitude of projection center */\r\n private _latC: float64;\r\n /** Longitude of origin */\r\n private _lonO: float64;\r\n /** Azimuth of initial line through the projection center */\r\n private _aziC: float64;\r\n /** Latitude of pseudo standard parallel */\r\n private _latP: float64;\r\n /** Scale factor on pseudo standard parallel */\r\n private _kP: float64;\r\n /** Easting at grid origin */\r\n private _FE: float64;\r\n /** Northing at grid origin */\r\n private _FN: float64;\r\n\r\n /** The constants */\r\n private _A: float64;\r\n private _B: float64;\r\n private _gO: float64;\r\n private _tO: float64;\r\n private _n: float64;\r\n private _rO: float64;\r\n\r\n /**\r\n * Create a new projection.\r\n * @param parameters the values of the parameters.\r\n */\r\n public constructor(parameters: ParameterValueList) {\r\n super(KrovakObliqueConformalConic.METHOD_CODE, \"Krovak Oblique Conic Conformal\", parameters);\r\n /* Store the parameters */\r\n this._latC = parameters.getValue(8811);\r\n this._lonO = parameters.getValue(8833);\r\n this._aziC = parameters.getValue(1036); // Parameter 8813 has been changed to 1036 for method 9819 in EPSG version 7.7. updated on 31/08/2017.\r\n this._latP = parameters.getValue(8818);\r\n this._kP = parameters.getValue(8819);\r\n this._FE = parameters.getValue(8806);\r\n this._FN = parameters.getValue(8807);\r\n }\r\n\r\n /**\r\n * Get the square of a number.\r\n */\r\n private static sqr(v: float64): float64 {\r\n return (v * v);\r\n }\r\n\r\n /**\r\n * OperationMethod method.\r\n * @see OperationMethod#initialize\r\n */\r\n public override initialize(operation: Operation): void {\r\n /* Prepare the parameters */\r\n const ellipsoid: Ellipsoid = operation.getSourceCRS().getEllipsoid();\r\n const a: float64 = ellipsoid.getA();\r\n const e: float64 = ellipsoid.getE();\r\n const e2: float64 = e * e;\r\n this._A = a * Math.sqrt(1.0 - e2) / (1.0 - KrovakObliqueConformalConic.sqr(e * Math.sin(this._latC)));\r\n this._B = Math.sqrt(1.0 + e2 * Math.pow(Math.cos(this._latC), 4) / (1.0 - e2));\r\n this._gO = Math.asin(Math.sin(this._latC) / this._B);\r\n this._tO = Math.tan(Math.PI / 4 + this._gO / 2) * Math.pow((1 + e * Math.sin(this._latC)) / (1 - e * Math.sin(this._latC)), e * this._B / 2) / Math.pow(Math.tan(Math.PI / 4 + this._latC / 2), this._B);\r\n this._n = Math.sin(this._latP);\r\n this._rO = this._kP * this._A / Math.tan(this._latP);\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#forward\r\n */\r\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters */\r\n const lon: float64 = source.getX();\r\n const lat: float64 = source.getY();\r\n /* Calculate easting and northing */\r\n const e: float64 = sourceCRS.getEllipsoid().getE();\r\n const U: float64 = 2 * (Math.atan(this._tO * Math.pow(Math.tan(lat / 2 + Math.PI / 4), this._B) / Math.pow((1 + e * Math.sin(lat)) / (1 - e * Math.sin(lat)), e * this._B / 2)) - Math.PI / 4);\r\n const V: float64 = this._B * (this._lonO - lon);\r\n const S: float64 = Math.asin(Math.cos(this._aziC) * Math.sin(U) + Math.sin(this._aziC) * Math.cos(U) * Math.cos(V));\r\n const D: float64 = Math.asin(Math.cos(U) * Math.sin(V) / Math.cos(S));\r\n const theta: float64 = this._n * D;\r\n const r: float64 = this._rO * Math.pow(Math.tan(Math.PI / 4 + this._latP / 2), this._n) / Math.pow(Math.tan(S / 2 + Math.PI / 4), this._n);\r\n const E: float64 = this._FE + r * Math.cos(theta);\r\n const N: float64 = this._FN + r * Math.sin(theta);\r\n /* Save the position */\r\n target.setX(E);\r\n target.setY(N);\r\n target.setZ(source.getZ()); // Keep the Z value\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#reverse\r\n */\r\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the easting and northing */\r\n const E: float64 = target.getX();\r\n const N: float64 = target.getY();\r\n /* Get the ellipsoid parameters */\r\n const e: float64 = sourceCRS.getEllipsoid().getE();\r\n /* Calculate longitude and latitude */\r\n const r: float64 = Math.sqrt(KrovakObliqueConformalConic.sqr(E - this._FE) + KrovakObliqueConformalConic.sqr(N - this._FN));\r\n const theta: float64 = Math.atan2((N - this._FN), (E - this._FE));\r\n const D: float64 = theta / Math.sin(this._latP);\r\n const S: float64 = 2 * (Math.atan(Math.pow(this._rO / r, 1 / this._n) * Math.tan(Math.PI / 4 + this._latP / 2)) - Math.PI / 4);\r\n const U: float64 = Math.asin(Math.cos(this._aziC) * Math.sin(S) - Math.sin(this._aziC) * Math.cos(S) * Math.cos(D));\r\n const V: float64 = Math.asin(Math.cos(S) * Math.sin(D) / Math.cos(U));\r\n /* Iterate */\r\n let lat: float64 = U;\r\n for (let i: number = 1; i < 5; i++) {\r\n lat = 2 * (Math.atan(Math.pow(this._tO, -1 / this._B) * Math.pow(Math.tan(U / 2 + Math.PI / 4), 1 / this._B) * Math.pow((1 + e * Math.sin(lat)) / (1 - e * Math.sin(lat)), e / 2)) - Math.PI / 4);\r\n }\r\n const lon: float64 = this._lonO - V / this._B;\r\n /* Save the position */\r\n source.setX(lon);\r\n source.setY(lat);\r\n source.setZ(target.getZ()); // Keep the Z value\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"KrovakObliqueConformalConic.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/KrovakObliqueConformalConic.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;;;GAkBG;A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QACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AAvHL,kEAwHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n// package orbitgt.spatial.ecrs.projection;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Coordinate } from \"../../geom/Coordinate\";\nimport { CRS } from \"../CRS\";\nimport { Ellipsoid } from \"../Ellipsoid\";\nimport { Operation } from \"../Operation\";\nimport { OperationMethod } from \"../OperationMethod\";\nimport { ParameterValueList } from \"../ParameterValueList\";\n\n/**\n * Class KrovakObliqueConformalConic defines the Krovak Oblique Conformal Conic projection as used in the Czech Republic and Slovakia.\n *\n * The 'source' CRS is the geographic CRS.\n * The 'target' CRS is the projected CRS.\n *\n * Based on the following document:\n *\n * Coordinate Conversions and Transformations including Formulas\n * Guidance Note Number 7, part 2 (version 6.18.3)\n * Revised January 2009\n * Available at: http://www.epsg.org/\n *\n * Formulas: see 1.3.2 \"Krovak Oblique Conformal Conic\"\n *\n * NOTE: the X axis runs north to south and the Y axis runs east to west. This differs from most other projections.\n *\n * @version 1.0 October 2009\n */\n/** @internal */\nexport class KrovakObliqueConformalConic extends OperationMethod {\n /** The code of this method */\n public static readonly METHOD_CODE: int32 = 9819;\n\n /** Latitude of projection center */\n private _latC: float64;\n /** Longitude of origin */\n private _lonO: float64;\n /** Azimuth of initial line through the projection center */\n private _aziC: float64;\n /** Latitude of pseudo standard parallel */\n private _latP: float64;\n /** Scale factor on pseudo standard parallel */\n private _kP: float64;\n /** Easting at grid origin */\n private _FE: float64;\n /** Northing at grid origin */\n private _FN: float64;\n\n /** The constants */\n private _A: float64;\n private _B: float64;\n private _gO: float64;\n private _tO: float64;\n private _n: float64;\n private _rO: float64;\n\n /**\n * Create a new projection.\n * @param parameters the values of the parameters.\n */\n public constructor(parameters: ParameterValueList) {\n super(KrovakObliqueConformalConic.METHOD_CODE, \"Krovak Oblique Conic Conformal\", parameters);\n /* Store the parameters */\n this._latC = parameters.getValue(8811);\n this._lonO = parameters.getValue(8833);\n this._aziC = parameters.getValue(1036); // Parameter 8813 has been changed to 1036 for method 9819 in EPSG version 7.7. updated on 31/08/2017.\n this._latP = parameters.getValue(8818);\n this._kP = parameters.getValue(8819);\n this._FE = parameters.getValue(8806);\n this._FN = parameters.getValue(8807);\n }\n\n /**\n * Get the square of a number.\n */\n private static sqr(v: float64): float64 {\n return (v * v);\n }\n\n /**\n * OperationMethod method.\n * @see OperationMethod#initialize\n */\n public override initialize(operation: Operation): void {\n /* Prepare the parameters */\n const ellipsoid: Ellipsoid = operation.getSourceCRS().getEllipsoid();\n const a: float64 = ellipsoid.getA();\n const e: float64 = ellipsoid.getE();\n const e2: float64 = e * e;\n this._A = a * Math.sqrt(1.0 - e2) / (1.0 - KrovakObliqueConformalConic.sqr(e * Math.sin(this._latC)));\n this._B = Math.sqrt(1.0 + e2 * Math.pow(Math.cos(this._latC), 4) / (1.0 - e2));\n this._gO = Math.asin(Math.sin(this._latC) / this._B);\n this._tO = Math.tan(Math.PI / 4 + this._gO / 2) * Math.pow((1 + e * Math.sin(this._latC)) / (1 - e * Math.sin(this._latC)), e * this._B / 2) / Math.pow(Math.tan(Math.PI / 4 + this._latC / 2), this._B);\n this._n = Math.sin(this._latP);\n this._rO = this._kP * this._A / Math.tan(this._latP);\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#forward\n */\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n const lon: float64 = source.getX();\n const lat: float64 = source.getY();\n /* Calculate easting and northing */\n const e: float64 = sourceCRS.getEllipsoid().getE();\n const U: float64 = 2 * (Math.atan(this._tO * Math.pow(Math.tan(lat / 2 + Math.PI / 4), this._B) / Math.pow((1 + e * Math.sin(lat)) / (1 - e * Math.sin(lat)), e * this._B / 2)) - Math.PI / 4);\n const V: float64 = this._B * (this._lonO - lon);\n const S: float64 = Math.asin(Math.cos(this._aziC) * Math.sin(U) + Math.sin(this._aziC) * Math.cos(U) * Math.cos(V));\n const D: float64 = Math.asin(Math.cos(U) * Math.sin(V) / Math.cos(S));\n const theta: float64 = this._n * D;\n const r: float64 = this._rO * Math.pow(Math.tan(Math.PI / 4 + this._latP / 2), this._n) / Math.pow(Math.tan(S / 2 + Math.PI / 4), this._n);\n const E: float64 = this._FE + r * Math.cos(theta);\n const N: float64 = this._FN + r * Math.sin(theta);\n /* Save the position */\n target.setX(E);\n target.setY(N);\n target.setZ(source.getZ()); // Keep the Z value\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#reverse\n */\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the easting and northing */\n const E: float64 = target.getX();\n const N: float64 = target.getY();\n /* Get the ellipsoid parameters */\n const e: float64 = sourceCRS.getEllipsoid().getE();\n /* Calculate longitude and latitude */\n const r: float64 = Math.sqrt(KrovakObliqueConformalConic.sqr(E - this._FE) + KrovakObliqueConformalConic.sqr(N - this._FN));\n const theta: float64 = Math.atan2((N - this._FN), (E - this._FE));\n const D: float64 = theta / Math.sin(this._latP);\n const S: float64 = 2 * (Math.atan(Math.pow(this._rO / r, 1 / this._n) * Math.tan(Math.PI / 4 + this._latP / 2)) - Math.PI / 4);\n const U: float64 = Math.asin(Math.cos(this._aziC) * Math.sin(S) - Math.sin(this._aziC) * Math.cos(S) * Math.cos(D));\n const V: float64 = Math.asin(Math.cos(S) * Math.sin(D) / Math.cos(U));\n /* Iterate */\n let lat: float64 = U;\n for (let i: number = 1; i < 5; i++) {\n lat = 2 * (Math.atan(Math.pow(this._tO, -1 / this._B) * Math.pow(Math.tan(U / 2 + Math.PI / 4), 1 / this._B) * Math.pow((1 + e * Math.sin(lat)) / (1 - e * Math.sin(lat)), e / 2)) - Math.PI / 4);\n }\n const lon: float64 = this._lonO - V / this._B;\n /* Save the position */\n source.setX(lon);\n source.setY(lat);\n source.setZ(target.getZ()); // Keep the Z value\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KrovakObliqueConformalConicEN.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/KrovakObliqueConformalConicEN.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH,wDAAqD;AAErD,+EAA4E;AAE5E;;;;;;;;;GASG;AACH,gBAAgB;AAChB,MAAa,6BAA8B,SAAQ,iCAAe;IAC9D,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC;IAEjD,8BAA8B;IACtB,UAAU,CAA8B;IAEhD;;;SAGK;IACL,YAAmB,UAA8B;QAC7C,KAAK,CAAC,6BAA6B,CAAC,WAAW,EAAE,2CAA2C,EAAE,UAAU,CAAC,CAAC;QAC1G,2BAA2B;QAC3B,IAAI,CAAC,UAAU,GAAG,IAAI,yDAA2B,CAAC,UAAU,CAAC,CAAC;IAClE,CAAC;IAED;;;SAGK;IACW,UAAU,CAAC,SAAoB;QAC3C,4BAA4B;QAC5B,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;IAED;;;SAGK;IACE,OAAO,CAAC,SAAc,EAAE,MAAkB,EAAE,SAAc,EAAE,MAAkB;QACjF,+BAA+B;QAC/B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAC9D,+BAA+B;QAC/B,MAAM,CAAC,GAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,MAAM,CAAC,GAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,UAAU;QACV,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED;;;SAGK;IACE,OAAO,CAAC,SAAc,EAAE,MAAkB,EAAE,SAAc,EAAE,MAAkB;QACjF,8BAA8B;QAC9B,MAAM,CAAC,GAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,CAAC,GAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAClC,kDAAkD;QAClD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,+BAA+B;QAC/B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAA,WAAW,CAAC,CAAC;IAC7E,CAAC;;AAtDL,sEAuDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"KrovakObliqueConformalConicEN.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/KrovakObliqueConformalConicEN.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH,wDAAqD;AAErD,+EAA4E;AAE5E;;;;;;;;;GASG;AACH,gBAAgB;AAChB,MAAa,6BAA8B,SAAQ,iCAAe;IAC9D,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC;IAEjD,8BAA8B;IACtB,UAAU,CAA8B;IAEhD;;;SAGK;IACL,YAAmB,UAA8B;QAC7C,KAAK,CAAC,6BAA6B,CAAC,WAAW,EAAE,2CAA2C,EAAE,UAAU,CAAC,CAAC;QAC1G,2BAA2B;QAC3B,IAAI,CAAC,UAAU,GAAG,IAAI,yDAA2B,CAAC,UAAU,CAAC,CAAC;IAClE,CAAC;IAED;;;SAGK;IACW,UAAU,CAAC,SAAoB;QAC3C,4BAA4B;QAC5B,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;IAED;;;SAGK;IACE,OAAO,CAAC,SAAc,EAAE,MAAkB,EAAE,SAAc,EAAE,MAAkB;QACjF,+BAA+B;QAC/B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAC9D,+BAA+B;QAC/B,MAAM,CAAC,GAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,MAAM,CAAC,GAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,UAAU;QACV,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED;;;SAGK;IACE,OAAO,CAAC,SAAc,EAAE,MAAkB,EAAE,SAAc,EAAE,MAAkB;QACjF,8BAA8B;QAC9B,MAAM,CAAC,GAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,CAAC,GAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAClC,kDAAkD;QAClD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,+BAA+B;QAC/B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAA,WAAW,CAAC,CAAC;IAC7E,CAAC;;AAtDL,sEAuDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n// package orbitgt.spatial.ecrs.projection;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Coordinate } from \"../../geom/Coordinate\";\nimport { CRS } from \"../CRS\";\nimport { Operation } from \"../Operation\";\nimport { OperationMethod } from \"../OperationMethod\";\nimport { ParameterValueList } from \"../ParameterValueList\";\nimport { KrovakObliqueConformalConic } from \"./KrovakObliqueConformalConic\";\n\n/**\n * Class KrovakObliqueConformalConicEN defines the \"East-North\" variant of the Krovak Oblique Conformal Conic projection.\n *\n * In the standard projection X runs from north to south and Y runs from east to west.\n * This seems awkward to most users. They prefer X from west to east and Y from south to north.\n * Therefore an alternative is provided in which both axes are inversed and swapped.\n * This leads to a more traditional map.\n *\n * @version 1.0 October 2009\n */\n/** @internal */\nexport class KrovakObliqueConformalConicEN extends OperationMethod {\n /** The code of this method */\n public static readonly METHOD_CODE: int32 = 1041;\n\n /** The original projection */\n private projection: KrovakObliqueConformalConic;\n\n /**\n * Create a new projection.\n * @param parameters the values of the parameters.\n */\n public constructor(parameters: ParameterValueList) {\n super(KrovakObliqueConformalConicEN.METHOD_CODE, \"Krovak Oblique Conic Conformal East-North\", parameters);\n /* Create the projection */\n this.projection = new KrovakObliqueConformalConic(parameters);\n }\n\n /**\n * OperationMethod method.\n * @see OperationMethod#initialize\n */\n public override initialize(operation: Operation): void {\n /* Prepare the projection */\n this.projection.initialize(operation);\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#forward\n */\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Do the forward projection */\n this.projection.forward(sourceCRS, source, targetCRS, target);\n /* Get the original position */\n const E: float64 = target.getX();\n const N: float64 = target.getY();\n /* Swap */\n target.setX(-N);\n target.setY(-E);\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#reverse\n */\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the swapped position */\n const N: float64 = -target.getX();\n const E: float64 = -target.getY();\n /* Swap (leave the target coordinate untouched) */\n source.setX(E);\n source.setY(N);\n /* Do the reverse projection */\n this.projection.reverse(sourceCRS, source, targetCRS, source/* target*/);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LambertConical1SP.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/LambertConical1SP.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;GAgBG;AACH,gBAAgB;AAChB,MAAa,iBAAkB,SAAQ,iCAAe;IAClD,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC;IAEjD,iCAAiC;IACzB,KAAK,CAAU;IACvB,yDAAyD;IACjD,KAAK,CAAU;IACvB,qCAAqC;IAC7B,GAAG,CAAU;IACrB,oBAAoB;IACZ,GAAG,CAAU;IACrB,qBAAqB;IACb,GAAG,CAAU;IAErB;;;OAGG;IACH,YAAmB,UAA8B;QAC7C,KAAK,CAAC,iBAAiB,CAAC,WAAW,EAAE,+BAA+B,EAAE,UAAU,CAAC,CAAC;QAClF,0BAA0B;QAC1B,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,IAAI,CAAC,CAAU;QAC1B,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,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D,CAAC;;AAjHL,8CAkHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n//package orbitgt.spatial.ecrs.projection;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Coordinate } from \"../../geom/Coordinate\";\r\nimport { CRS } from \"../CRS\";\r\nimport { OperationMethod } from \"../OperationMethod\";\r\nimport { ParameterValueList } from \"../ParameterValueList\";\r\n\r\n/**\r\n * Class LambertConical1SP defines a Lambert Conical Conformal map projection with 1 standard parallel.\r\n *\r\n * The 'source' CRS is the geographic CRS.\r\n * The 'target' CRS is the projected CRS.\r\n *\r\n * Based on the following document:\r\n *\r\n * Coordinate Conversions and Transformations including Formulas\r\n * Guidance Note Number 7, part 2\r\n * Revised August 2006\r\n * Available at: http://www.epsg.org/\r\n *\r\n * Formulas: see 1.4.1.1 -> 1.4.1.4\r\n *\r\n * @version 1.0 January 2007\r\n */\r\n/** @internal */\r\nexport class LambertConical1SP extends OperationMethod {\r\n /** The code of this method */\r\n public static readonly METHOD_CODE: int32 = 9801;\r\n\r\n /** Latitude of natural origin */\r\n private _latN: float64;\r\n /** Longitude of natural origin (the central meridian) */\r\n private _lonN: float64;\r\n /** Scale factor at natural origin */\r\n private _k0: float64;\r\n /** False easting */\r\n private _fE: float64;\r\n /** False northing */\r\n private _fN: float64;\r\n\r\n /**\r\n * Create a new projection.\r\n * @param parameters the values of the parameters.\r\n */\r\n public constructor(parameters: ParameterValueList) {\r\n super(LambertConical1SP.METHOD_CODE, \"Lambert Conic Conformal (1SP)\", parameters);\r\n /* Store the parameters */\r\n this._latN = parameters.getValue(8801);\r\n this._lonN = parameters.getValue(8802);\r\n this._k0 = parameters.getValue(8805);\r\n this._fE = parameters.getValue(8806);\r\n this._fN = parameters.getValue(8807);\r\n }\r\n\r\n /**\r\n * Get the sign of a number.\r\n */\r\n private static sign(v: float64): float64 {\r\n return (v < 0.0) ? (-1.0) : (1.0);\r\n }\r\n\r\n /**\r\n * Calculate M.\r\n */\r\n private static calcM(e: float64, lat: float64): float64 {\r\n return Math.cos(lat) / Math.pow(1.0 - Math.pow(e * Math.sin(lat), 2.0), 0.5);\r\n }\r\n\r\n /**\r\n * Calculate T.\r\n */\r\n private static calcT(e: float64, lat: float64): float64 {\r\n return Math.tan(Math.PI * 0.25 - lat * 0.5) / Math.pow((1.0 - e * Math.sin(lat)) / (1.0 + e * Math.sin(lat)), e * 0.5);\r\n }\r\n\r\n /**\r\n * Calculate R.\r\n */\r\n private static calcR(a: float64, F: float64, t: float64, n: float64, k0: float64): float64 {\r\n if (Math.abs(t) < 1.0e-6) return 0.0;\r\n return a * F * Math.pow(t, n) * k0;\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#forward\r\n */\r\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters */\r\n let lon: float64 = source.getX();\r\n let lat: float64 = source.getY();\r\n /* Get the ellipsoid parameters */\r\n let e: float64 = sourceCRS.getEllipsoid().getE();\r\n let a: float64 = sourceCRS.getEllipsoid().getA();\r\n /* Make the calculation */\r\n let m0: float64 = LambertConical1SP.calcM(e, this._latN);\r\n let t0: float64 = LambertConical1SP.calcT(e, this._latN);\r\n let n: float64 = Math.sin(this._latN);\r\n let F: float64 = m0 / (n * Math.pow(t0, n));\r\n let r0: float64 = LambertConical1SP.calcR(a, F, t0, n, this._k0);\r\n let t: float64 = LambertConical1SP.calcT(e, lat);\r\n let r: float64 = LambertConical1SP.calcR(a, F, t, n, this._k0);\r\n let theta: float64 = n * (lon - this._lonN);\r\n let E: float64 = this._fE + r * Math.sin(theta);\r\n let N: float64 = this._fN + r0 - r * Math.cos(theta);\r\n /* Save the position */\r\n target.setX(E);\r\n target.setY(N);\r\n target.setZ(source.getZ()); // Keep the Z value\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#reverse\r\n */\r\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters */\r\n let E: float64 = target.getX();\r\n let N: float64 = target.getY();\r\n /* Get the ellipsoid parameters */\r\n let e: float64 = sourceCRS.getEllipsoid().getE();\r\n let a: float64 = sourceCRS.getEllipsoid().getA();\r\n /* Make the calculation */\r\n let m0: float64 = LambertConical1SP.calcM(e, this._latN);\r\n let t0: float64 = LambertConical1SP.calcT(e, this._latN);\r\n let n: float64 = Math.sin(this._latN);\r\n let F: float64 = m0 / (n * Math.pow(t0, n));\r\n let r0: float64 = LambertConical1SP.calcR(a, F, t0, n, this._k0);\r\n let r_: float64 = LambertConical1SP.sign(n) * Math.pow(Math.pow(E - this._fE, 2.0) + Math.pow(r0 - (N - this._fN), 2.0), 0.5);\r\n let t_: float64 = Math.pow(r_ / (a * this._k0 * F), 1.0 / n);\r\n let theta_: float64 = Math.atan((E - this._fE) / (r0 - (N - this._fN)));\r\n let lat: float64 = Math.PI * 0.5 - 2.0 * Math.atan(t_);\r\n for (let i: number = 0; i < 7; i++) lat = Math.PI * 0.5 - 2.0 * Math.atan(t_ * Math.pow((1.0 - e * Math.sin(lat)) / (1.0 + e * Math.sin(lat)), e * 0.5)); // recursive formula\r\n let lon: float64 = (theta_) / n + this._lonN;\r\n /* Save the position */\r\n source.setX(lon);\r\n source.setY(lat);\r\n source.setZ(target.getZ()); // Keep the Z value\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"LambertConical1SP.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/LambertConical1SP.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;GAgBG;AACH,gBAAgB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AE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACxE,IAAI,GAAG,GAAY,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACvD,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;YAAE,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,oBAAoB;QAC9K,IAAI,GAAG,GAAY,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7C,uBAAuB;QACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AAjHL,8CAkHC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.spatial.ecrs.projection;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Coordinate } from \"../../geom/Coordinate\";\nimport { CRS } from \"../CRS\";\nimport { OperationMethod } from \"../OperationMethod\";\nimport { ParameterValueList } from \"../ParameterValueList\";\n\n/**\n * Class LambertConical1SP defines a Lambert Conical Conformal map projection with 1 standard parallel.\n *\n * The 'source' CRS is the geographic CRS.\n * The 'target' CRS is the projected CRS.\n *\n * Based on the following document:\n *\n * Coordinate Conversions and Transformations including Formulas\n * Guidance Note Number 7, part 2\n * Revised August 2006\n * Available at: http://www.epsg.org/\n *\n * Formulas: see 1.4.1.1 -> 1.4.1.4\n *\n * @version 1.0 January 2007\n */\n/** @internal */\nexport class LambertConical1SP extends OperationMethod {\n /** The code of this method */\n public static readonly METHOD_CODE: int32 = 9801;\n\n /** Latitude of natural origin */\n private _latN: float64;\n /** Longitude of natural origin (the central meridian) */\n private _lonN: float64;\n /** Scale factor at natural origin */\n private _k0: float64;\n /** False easting */\n private _fE: float64;\n /** False northing */\n private _fN: float64;\n\n /**\n * Create a new projection.\n * @param parameters the values of the parameters.\n */\n public constructor(parameters: ParameterValueList) {\n super(LambertConical1SP.METHOD_CODE, \"Lambert Conic Conformal (1SP)\", parameters);\n /* Store the parameters */\n this._latN = parameters.getValue(8801);\n this._lonN = parameters.getValue(8802);\n this._k0 = parameters.getValue(8805);\n this._fE = parameters.getValue(8806);\n this._fN = parameters.getValue(8807);\n }\n\n /**\n * Get the sign of a number.\n */\n private static sign(v: float64): float64 {\n return (v < 0.0) ? (-1.0) : (1.0);\n }\n\n /**\n * Calculate M.\n */\n private static calcM(e: float64, lat: float64): float64 {\n return Math.cos(lat) / Math.pow(1.0 - Math.pow(e * Math.sin(lat), 2.0), 0.5);\n }\n\n /**\n * Calculate T.\n */\n private static calcT(e: float64, lat: float64): float64 {\n return Math.tan(Math.PI * 0.25 - lat * 0.5) / Math.pow((1.0 - e * Math.sin(lat)) / (1.0 + e * Math.sin(lat)), e * 0.5);\n }\n\n /**\n * Calculate R.\n */\n private static calcR(a: float64, F: float64, t: float64, n: float64, k0: float64): float64 {\n if (Math.abs(t) < 1.0e-6) return 0.0;\n return a * F * Math.pow(t, n) * k0;\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#forward\n */\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n let lon: float64 = source.getX();\n let lat: float64 = source.getY();\n /* Get the ellipsoid parameters */\n let e: float64 = sourceCRS.getEllipsoid().getE();\n let a: float64 = sourceCRS.getEllipsoid().getA();\n /* Make the calculation */\n let m0: float64 = LambertConical1SP.calcM(e, this._latN);\n let t0: float64 = LambertConical1SP.calcT(e, this._latN);\n let n: float64 = Math.sin(this._latN);\n let F: float64 = m0 / (n * Math.pow(t0, n));\n let r0: float64 = LambertConical1SP.calcR(a, F, t0, n, this._k0);\n let t: float64 = LambertConical1SP.calcT(e, lat);\n let r: float64 = LambertConical1SP.calcR(a, F, t, n, this._k0);\n let theta: float64 = n * (lon - this._lonN);\n let E: float64 = this._fE + r * Math.sin(theta);\n let N: float64 = this._fN + r0 - r * Math.cos(theta);\n /* Save the position */\n target.setX(E);\n target.setY(N);\n target.setZ(source.getZ()); // Keep the Z value\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#reverse\n */\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n let E: float64 = target.getX();\n let N: float64 = target.getY();\n /* Get the ellipsoid parameters */\n let e: float64 = sourceCRS.getEllipsoid().getE();\n let a: float64 = sourceCRS.getEllipsoid().getA();\n /* Make the calculation */\n let m0: float64 = LambertConical1SP.calcM(e, this._latN);\n let t0: float64 = LambertConical1SP.calcT(e, this._latN);\n let n: float64 = Math.sin(this._latN);\n let F: float64 = m0 / (n * Math.pow(t0, n));\n let r0: float64 = LambertConical1SP.calcR(a, F, t0, n, this._k0);\n let r_: float64 = LambertConical1SP.sign(n) * Math.pow(Math.pow(E - this._fE, 2.0) + Math.pow(r0 - (N - this._fN), 2.0), 0.5);\n let t_: float64 = Math.pow(r_ / (a * this._k0 * F), 1.0 / n);\n let theta_: float64 = Math.atan((E - this._fE) / (r0 - (N - this._fN)));\n let lat: float64 = Math.PI * 0.5 - 2.0 * Math.atan(t_);\n for (let i: number = 0; i < 7; i++) lat = Math.PI * 0.5 - 2.0 * Math.atan(t_ * Math.pow((1.0 - e * Math.sin(lat)) / (1.0 + e * Math.sin(lat)), e * 0.5)); // recursive formula\n let lon: float64 = (theta_) / n + this._lonN;\n /* Save the position */\n source.setX(lon);\n source.setY(lat);\n source.setZ(target.getZ()); // Keep the Z value\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LambertConical2SP.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/LambertConical2SP.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;GAgBG;AACH,gBAAgB;AAChB,MAAa,iBAAkB,SAAQ,iCAAe;IAClD,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC;IAEjD,sBAAsB;IACd,MAAM,CAAU,EAAE,GAAY,IAAI,CAAC,EAAE,CAAC;IAC9C,2BAA2B;IACnB,MAAM,CAAU,GAAG,GAAY,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC;IAErD,+BAA+B;IACvB,KAAK,CAAU;IACvB,uDAAuD;IAC/C,KAAK,CAAU;IACvB,0CAA0C;IAClC,KAAK,CAAU;IACvB,2CAA2C;IACnC,KAAK,CAAU;IACvB,8BAA8B;IACtB,GAAG,CAAU;IACrB,+BAA+B;IACvB,GAAG,CAAU;IAErB,4BAA4B;IACpB,EAAE,CAAU;IACZ,EAAE,CAAU;IACZ,GAAG,CAAU;IACb,GAAG,CAAU;IACb,GAAG,CAAU;IACb,GAAG,CAAU;IACb,GAAG,CAAU;IACb,EAAE,CAAU;IACZ,EAAE,CAAU;IACZ,GAAG,CAAU;IAErB;;;SAGK;IACL,YAAmB,UAA8B;QAC7C,KAAK,CAAC,iBAAiB,CAAC,WAAW,EA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C,MAAM,CAAC,GAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,+BAA+B;QAC/B,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AAxLL,8CAyLC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n// package orbitgt.spatial.ecrs.projection;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Coordinate } from \"../../geom/Coordinate\";\r\nimport { CRS } from \"../CRS\";\r\nimport { Ellipsoid } from \"../Ellipsoid\";\r\nimport { Operation } from \"../Operation\";\r\nimport { OperationMethod } from \"../OperationMethod\";\r\nimport { ParameterValueList } from \"../ParameterValueList\";\r\n\r\n/**\r\n * Class LambertConical2SP defines a Lambert Conical Conformal map projection with 2 standard parallels.\r\n *\r\n * The 'source' CRS is the geographic CRS.\r\n * The 'target' CRS is the projected CRS.\r\n *\r\n * Based on the following document:\r\n *\r\n * Coordinate Conversions and Transformations including Formulas\r\n * Guidance Note Number 7, part 2\r\n * Revised May 2005\r\n * Available at: http://www.epsg.org/\r\n *\r\n * Formulas: see 1.4.1.1 -> 1.4.1.4\r\n *\r\n * @version 1.0 July 2005\r\n */\r\n/** @internal */\r\nexport class LambertConical2SP extends OperationMethod {\r\n /** The code of this method */\r\n public static readonly METHOD_CODE: int32 = 9802;\r\n\r\n /** The value of PI */\r\n private static readonly PI: float64 = Math.PI;\r\n /** The half value of PI */\r\n private static readonly hPI: float64 = 0.5 * Math.PI;\r\n\r\n /** Latitude of false origin */\r\n private _latF: float64;\r\n /** Longitude of false origin (the central meridian) */\r\n private _lonF: float64;\r\n /** Latitude of first standard parallel */\r\n private _lat1: float64;\r\n /** Latitude of second standard parallel */\r\n private _lat2: float64;\r\n /** Easting at false origin */\r\n private _eF: float64;\r\n /** Northing at false origin */\r\n private _nF: float64;\r\n\r\n /* Calculation parameters */\r\n private _e: float64;\r\n private _a: float64;\r\n private _m1: float64;\r\n private _m2: float64;\r\n private _t1: float64;\r\n private _t2: float64;\r\n private _tF: float64;\r\n private _n: float64;\r\n private _F: float64;\r\n private _rF: float64;\r\n\r\n /**\r\n * Create a new projection.\r\n * @param parameters the values of the parameters.\r\n */\r\n public constructor(parameters: ParameterValueList) {\r\n super(LambertConical2SP.METHOD_CODE, \"Lambert Conic Conformal (2SP)\", parameters);\r\n /* Store the parameters */\r\n this._latF = parameters.getValue(8821);\r\n this._lonF = parameters.getValue(8822);\r\n this._lat1 = parameters.getValue(8823);\r\n this._lat2 = parameters.getValue(8824);\r\n this._eF = parameters.getValue(8826);\r\n this._nF = parameters.getValue(8827);\r\n }\r\n\r\n /**\r\n * Get the sign of a number.\r\n */\r\n private static sign(v: float64): float64 {\r\n return (v < 0.0) ? (-1.0) : (1.0);\r\n }\r\n\r\n /**\r\n * Get the square of a number.\r\n */\r\n private static square(v: float64): float64 {\r\n return (v * v);\r\n }\r\n\r\n /**\r\n * Calculate M.\r\n */\r\n private static calcM(e: float64, lat: float64): float64 {\r\n return Math.cos(lat) / Math.sqrt(1.0 - LambertConical2SP.square(e * Math.sin(lat)));\r\n }\r\n\r\n /**\r\n * Calculate T.\r\n */\r\n private static calcT(e: float64, lat: float64): float64 {\r\n return Math.tan(Math.PI * 0.25 - lat * 0.5) / Math.pow((1.0 - e * Math.sin(lat)) / (1.0 + e * Math.sin(lat)), e * 0.5);\r\n }\r\n\r\n /**\r\n * Calculate R.\r\n */\r\n private static calcR(a: float64, F: float64, t: float64, n: float64): float64 {\r\n if (Math.abs(t) < 1.0e-6) return 0.0;\r\n return a * F * Math.pow(t, n);\r\n }\r\n\r\n /**\r\n * Initialize the projection.\r\n * @param ellipsoid the ellipsoid to use.\r\n * @return this projection (for convenience).\r\n */\r\n public initializeProjection(ellipsoid: Ellipsoid): LambertConical2SP {\r\n /* Get the ellipsoid parameters */\r\n this._e = ellipsoid.getE();\r\n this._a = ellipsoid.getA();\r\n /* Make the calculation */\r\n this._m1 = LambertConical2SP.calcM(this._e, this._lat1);\r\n this._m2 = LambertConical2SP.calcM(this._e, this._lat2);\r\n this._t1 = LambertConical2SP.calcT(this._e, this._lat1);\r\n this._t2 = LambertConical2SP.calcT(this._e, this._lat2);\r\n this._tF = LambertConical2SP.calcT(this._e, this._latF);\r\n this._n = (Math.log(this._m1) - Math.log(this._m2)) / (Math.log(this._t1) - Math.log(this._t2));\r\n this._F = this._m1 / (this._n * Math.pow(this._t1, this._n));\r\n this._rF = LambertConical2SP.calcR(this._a, this._F, this._tF, this._n);\r\n /* Return the projection */\r\n return this;\r\n }\r\n\r\n /**\r\n * Do the projection.\r\n * @param lon the longitude (radians).\r\n * @param lat the latitude (radians).\r\n * @param projected the target projected coordinate (X and Y will be set).\r\n */\r\n public toProjection(lon: float64, lat: float64, projected: Coordinate): void {\r\n /* Make the calculation */\r\n const t: float64 = LambertConical2SP.calcT(this._e, lat);\r\n const r: float64 = LambertConical2SP.calcR(this._a, this._F, t, this._n);\r\n const theta: float64 = this._n * (lon - this._lonF);\r\n const E: float64 = this._eF + r * Math.sin(theta);\r\n const N: float64 = this._nF + this._rF - r * Math.cos(theta);\r\n /* Save the position */\r\n projected.setX(E);\r\n projected.setY(N);\r\n }\r\n\r\n /**\r\n * Do the inverse projection.\r\n * @param x the easting.\r\n * @param y the northing.\r\n * @param geographic the target geographic coordinate (X/Lon and Y/Lat will be set) (radians).\r\n */\r\n public toGeoGraphic(x: float64, y: float64, geographic: Coordinate): void {\r\n /* Get the parameters */\r\n const E: float64 = x;\r\n const N: float64 = y;\r\n /* Make the calculation */\r\n const r_: float64 = LambertConical2SP.sign(this._n) * Math.sqrt(LambertConical2SP.square(E - this._eF) + LambertConical2SP.square(this._rF - (N - this._nF)));\r\n const t_: float64 = Math.pow(r_ / (this._a * this._F), 1.0 / this._n);\r\n const theta_: float64 = Math.atan((E - this._eF) / (this._rF - (N - this._nF)));\r\n let lat: float64 = LambertConical2SP.PI * 0.5 - 2.0 * Math.atan(t_);\r\n const he: float64 = 0.5 * this._e;\r\n for (let i: number = 0; i < 7; i++) // double-checked iteration count. LER, 24/11/2011\r\n {\r\n const eSin: float64 = this._e * Math.sin(lat);\r\n lat = LambertConical2SP.hPI - 2.0 * Math.atan(t_ * Math.pow((1.0 - eSin) / (1.0 + eSin), he)); // recursive formula\r\n }\r\n const lon: float64 = (theta_) / this._n + this._lonF;\r\n /* Save the position */\r\n geographic.setX(lon);\r\n geographic.setY(lat);\r\n }\r\n\r\n /**\r\n * OperationMethod method.\r\n * @see OperationMethod#initialize\r\n */\r\n public override initialize(operation: Operation): void {\r\n this.initializeProjection(operation.getSourceCRS().getEllipsoid());\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#forward\r\n */\r\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters */\r\n const lon: float64 = source.getX();\r\n const lat: float64 = source.getY();\r\n /* Do the projection */\r\n this.toProjection(lon, lat, target);\r\n target.setZ(source.getZ()); // Keep the Z value\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#reverse\r\n */\r\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters */\r\n const E: float64 = target.getX();\r\n const N: float64 = target.getY();\r\n /* Do the inverse projection */\r\n this.toGeoGraphic(E, N, source);\r\n source.setZ(target.getZ()); // Keep the Z value\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"LambertConical2SP.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/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AI,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACrD,uBAAuB;QACvB,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrB,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED;;;SAGK;IACW,UAAU,CAAC,SAAoB;QAC3C,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC;IACvE,CAAC;IAED;;;SAGK;IACE,OAAO,CAAC,SAAc,EAAE,MAAkB,EAAE,SAAc,EAAE,MAAkB;QACjF,wBAAwB;QACxB,MAAM,GAAG,GAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACnC,MAAM,GAAG,GAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACnC,uBAAuB;QACvB,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACpC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;IAED;;;SAGK;IACE,OAAO,CAAC,SAAc,EAAE,MAAkB,EAAE,SAAc,EAAE,MAAkB;QACjF,wBAAwB;QACxB,MAAM,CAAC,GAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,MAAM,CAAC,GAAY,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,+BAA+B;QAC/B,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AAxLL,8CAyLC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n// package orbitgt.spatial.ecrs.projection;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Coordinate } from \"../../geom/Coordinate\";\nimport { CRS } from \"../CRS\";\nimport { Ellipsoid } from \"../Ellipsoid\";\nimport { Operation } from \"../Operation\";\nimport { OperationMethod } from \"../OperationMethod\";\nimport { ParameterValueList } from \"../ParameterValueList\";\n\n/**\n * Class LambertConical2SP defines a Lambert Conical Conformal map projection with 2 standard parallels.\n *\n * The 'source' CRS is the geographic CRS.\n * The 'target' CRS is the projected CRS.\n *\n * Based on the following document:\n *\n * Coordinate Conversions and Transformations including Formulas\n * Guidance Note Number 7, part 2\n * Revised May 2005\n * Available at: http://www.epsg.org/\n *\n * Formulas: see 1.4.1.1 -> 1.4.1.4\n *\n * @version 1.0 July 2005\n */\n/** @internal */\nexport class LambertConical2SP extends OperationMethod {\n /** The code of this method */\n public static readonly METHOD_CODE: int32 = 9802;\n\n /** The value of PI */\n private static readonly PI: float64 = Math.PI;\n /** The half value of PI */\n private static readonly hPI: float64 = 0.5 * Math.PI;\n\n /** Latitude of false origin */\n private _latF: float64;\n /** Longitude of false origin (the central meridian) */\n private _lonF: float64;\n /** Latitude of first standard parallel */\n private _lat1: float64;\n /** Latitude of second standard parallel */\n private _lat2: float64;\n /** Easting at false origin */\n private _eF: float64;\n /** Northing at false origin */\n private _nF: float64;\n\n /* Calculation parameters */\n private _e: float64;\n private _a: float64;\n private _m1: float64;\n private _m2: float64;\n private _t1: float64;\n private _t2: float64;\n private _tF: float64;\n private _n: float64;\n private _F: float64;\n private _rF: float64;\n\n /**\n * Create a new projection.\n * @param parameters the values of the parameters.\n */\n public constructor(parameters: ParameterValueList) {\n super(LambertConical2SP.METHOD_CODE, \"Lambert Conic Conformal (2SP)\", parameters);\n /* Store the parameters */\n this._latF = parameters.getValue(8821);\n this._lonF = parameters.getValue(8822);\n this._lat1 = parameters.getValue(8823);\n this._lat2 = parameters.getValue(8824);\n this._eF = parameters.getValue(8826);\n this._nF = parameters.getValue(8827);\n }\n\n /**\n * Get the sign of a number.\n */\n private static sign(v: float64): float64 {\n return (v < 0.0) ? (-1.0) : (1.0);\n }\n\n /**\n * Get the square of a number.\n */\n private static square(v: float64): float64 {\n return (v * v);\n }\n\n /**\n * Calculate M.\n */\n private static calcM(e: float64, lat: float64): float64 {\n return Math.cos(lat) / Math.sqrt(1.0 - LambertConical2SP.square(e * Math.sin(lat)));\n }\n\n /**\n * Calculate T.\n */\n private static calcT(e: float64, lat: float64): float64 {\n return Math.tan(Math.PI * 0.25 - lat * 0.5) / Math.pow((1.0 - e * Math.sin(lat)) / (1.0 + e * Math.sin(lat)), e * 0.5);\n }\n\n /**\n * Calculate R.\n */\n private static calcR(a: float64, F: float64, t: float64, n: float64): float64 {\n if (Math.abs(t) < 1.0e-6) return 0.0;\n return a * F * Math.pow(t, n);\n }\n\n /**\n * Initialize the projection.\n * @param ellipsoid the ellipsoid to use.\n * @return this projection (for convenience).\n */\n public initializeProjection(ellipsoid: Ellipsoid): LambertConical2SP {\n /* Get the ellipsoid parameters */\n this._e = ellipsoid.getE();\n this._a = ellipsoid.getA();\n /* Make the calculation */\n this._m1 = LambertConical2SP.calcM(this._e, this._lat1);\n this._m2 = LambertConical2SP.calcM(this._e, this._lat2);\n this._t1 = LambertConical2SP.calcT(this._e, this._lat1);\n this._t2 = LambertConical2SP.calcT(this._e, this._lat2);\n this._tF = LambertConical2SP.calcT(this._e, this._latF);\n this._n = (Math.log(this._m1) - Math.log(this._m2)) / (Math.log(this._t1) - Math.log(this._t2));\n this._F = this._m1 / (this._n * Math.pow(this._t1, this._n));\n this._rF = LambertConical2SP.calcR(this._a, this._F, this._tF, this._n);\n /* Return the projection */\n return this;\n }\n\n /**\n * Do the projection.\n * @param lon the longitude (radians).\n * @param lat the latitude (radians).\n * @param projected the target projected coordinate (X and Y will be set).\n */\n public toProjection(lon: float64, lat: float64, projected: Coordinate): void {\n /* Make the calculation */\n const t: float64 = LambertConical2SP.calcT(this._e, lat);\n const r: float64 = LambertConical2SP.calcR(this._a, this._F, t, this._n);\n const theta: float64 = this._n * (lon - this._lonF);\n const E: float64 = this._eF + r * Math.sin(theta);\n const N: float64 = this._nF + this._rF - r * Math.cos(theta);\n /* Save the position */\n projected.setX(E);\n projected.setY(N);\n }\n\n /**\n * Do the inverse projection.\n * @param x the easting.\n * @param y the northing.\n * @param geographic the target geographic coordinate (X/Lon and Y/Lat will be set) (radians).\n */\n public toGeoGraphic(x: float64, y: float64, geographic: Coordinate): void {\n /* Get the parameters */\n const E: float64 = x;\n const N: float64 = y;\n /* Make the calculation */\n const r_: float64 = LambertConical2SP.sign(this._n) * Math.sqrt(LambertConical2SP.square(E - this._eF) + LambertConical2SP.square(this._rF - (N - this._nF)));\n const t_: float64 = Math.pow(r_ / (this._a * this._F), 1.0 / this._n);\n const theta_: float64 = Math.atan((E - this._eF) / (this._rF - (N - this._nF)));\n let lat: float64 = LambertConical2SP.PI * 0.5 - 2.0 * Math.atan(t_);\n const he: float64 = 0.5 * this._e;\n for (let i: number = 0; i < 7; i++) // double-checked iteration count. LER, 24/11/2011\n {\n const eSin: float64 = this._e * Math.sin(lat);\n lat = LambertConical2SP.hPI - 2.0 * Math.atan(t_ * Math.pow((1.0 - eSin) / (1.0 + eSin), he)); // recursive formula\n }\n const lon: float64 = (theta_) / this._n + this._lonF;\n /* Save the position */\n geographic.setX(lon);\n geographic.setY(lat);\n }\n\n /**\n * OperationMethod method.\n * @see OperationMethod#initialize\n */\n public override initialize(operation: Operation): void {\n this.initializeProjection(operation.getSourceCRS().getEllipsoid());\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#forward\n */\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n const lon: float64 = source.getX();\n const lat: float64 = source.getY();\n /* Do the projection */\n this.toProjection(lon, lat, target);\n target.setZ(source.getZ()); // Keep the Z value\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#reverse\n */\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n const E: float64 = target.getX();\n const N: float64 = target.getY();\n /* Do the inverse projection */\n this.toGeoGraphic(E, N, source);\n source.setZ(target.getZ()); // Keep the Z value\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Mercator1SP.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/Mercator1SP.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,gBAAgB;AAChB,MAAa,WAAY,SAAQ,iCAAe;IAC5C,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC;IAEjD,wBAAwB;IAChB,MAAM,CAAU,GAAG,GAAY,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;IAErD,iCAAiC;IACzB,KAAK,CAAU;IACvB,yDAAyD;IACjD,KAAK,CAAU;IACvB,qCAAqC;IAC7B,GAAG,CAAU;IACrB,oBAAoB;IACZ,GAAG,CAAU;IACrB,qBAAqB;IACb,GAAG,CAAU;IAErB;;;OAGG;IACH,YAAmB,UAA8B;QAC7C,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC;QAC7D,0BAA0B;QAC1B,IAAI,CAAC,KAAK,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC1E,IAAI,CAAC,KAAK,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC1E,IAAI,CAAC,GAAG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CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AA5FL,kCA6FC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"Mercator1SP.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/Mercator1SP.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAYH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,gBAAgB;AAChB,MAAa,WAAY,SAAQ,iCAAe;IAC5C,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC;IAEjD,wBAAwB;IAChB,MAAM,CAAU,GAAG,GAAY,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;IAErD,iCAAiC;IACzB,KAAK,CAAU;IACvB,yDAAyD;IACjD,KAAK,CAAU;IACvB,qCAAqC;IAC7B,GAAG,CAAU;IACrB,oBAAoB;IACZ,GAAG,CAAU;IACrB,qBAAqB;IACb,GAAG,CAAU;IAErB;;;OAGG;IACH,YAAmB,UAA8B;QAC7C,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC;QAC7D,0BAA0B;QAC1B,IAAI,CAAC,KAAK,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC1E,IAAI,CAAC,KAAK,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC1E,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,IAAI,IAA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,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AA5FL,kCA6FC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n//package orbitgt.spatial.ecrs.projection;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Coordinate } from \"../../geom/Coordinate\";\nimport { CRS } from \"../CRS\";\nimport { OperationMethod } from \"../OperationMethod\";\nimport { ParameterValueList } from \"../ParameterValueList\";\n\n/**\n * Class Mercator1SP defines the Mercator method with one standard parallel.\n *\n * The 'source' CRS is the geographic CRS.\n * The 'target' CRS is the projected CRS.\n *\n * Based on the following document:\n *\n * Coordinate Conversions and Transformations including Formulas\n * Guidance Note Number 7, part 2\n * Revised January 2009\n * Available at: http://www.epsg.org/\n *\n * Formulas: see 1.3.3.1 -> 1.3.3.2\n *\n * Note that in these formulas common to both 1SP and 2SP cases, the parameter latitude of natural origin (latN)\n * is not used. However for the Merctor (1SP) method the EPSG dataset includes this parameter, which must\n * have a value of zero, for completeness in CRS labelling.\n\n * @version 1.0 April 2009\n */\n/** @internal */\nexport class Mercator1SP extends OperationMethod {\n /** The code of this method */\n public static readonly METHOD_CODE: int32 = 9804;\n\n /** The value of PI/4 */\n private static readonly QPI: float64 = Math.PI / 4.0;\n\n /** Latitude of natural origin */\n private _latN: float64;\n /** Longitude of natural origin (the central meridian) */\n private _lonN: float64;\n /** Scale factor at natural origin */\n private _k0: float64;\n /** False easting */\n private _fE: float64;\n /** False northing */\n private _fN: float64;\n\n /**\n * Create a new projection.\n * @param parameters the values of the parameters.\n */\n public constructor(parameters: ParameterValueList) {\n super(Mercator1SP.METHOD_CODE, \"Mercator (1SP)\", parameters);\n /* Store the parameters */\n this._latN = (parameters != null) ? parameters.getValue2(8801, 0.0) : 0.0;\n this._lonN = (parameters != null) ? parameters.getValue2(8802, 0.0) : 0.0;\n this._k0 = (parameters != null) ? parameters.getValue2(8805, 1.0) : 1.0;\n this._fE = (parameters != null) ? parameters.getValue2(8806, 0.0) : 0.0;\n this._fN = (parameters != null) ? parameters.getValue2(8807, 0.0) : 0.0;\n }\n\n /**\n * Create a new projection.\n * @param latN latitude of natural origin.\n * @param lonN longitude of natural origin (the central meridian).\n * @param k0 scale factor at natural origin.\n * @param fE false easting.\n * @param fN false northing.\n * @return the projection.\n */\n public static create(latN: float64, lonN: float64, k0: float64, fE: float64, fN: float64): Mercator1SP {\n let projection: Mercator1SP = new Mercator1SP(null);\n projection._latN = latN;\n projection._lonN = lonN;\n projection._k0 = k0;\n projection._fE = fE;\n projection._fN = fN;\n return projection;\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#forward\n */\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the geographic parameters (radians) */\n let lon: float64 = source.getX();\n let lat: float64 = source.getY();\n /* Get the radius of the sphere */\n let R: float64 = sourceCRS.getEllipsoid().getA();\n /* Calculate easting */\n let E: float64 = this._fE + R * (lon - this._lonN);\n /* Calculate northing */\n let sin: float64 = Math.sin(lat);\n let N: float64 = this._fN + 0.5 * R * Math.log((1.0 + sin) / (1.0 - sin));\n // double N = this._fN+R*Math.log(Math.tan(QPI+0.5*lat));\n /* Save the position */\n target.setX(E);\n target.setY(N);\n target.setZ(source.getZ()); // Keep the Z value\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#reverse\n */\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n let E: float64 = target.getX();\n let N: float64 = target.getY();\n /* Get the radius of the sphere */\n let R: float64 = sourceCRS.getEllipsoid().getA();\n /* Calculate longitude */\n let lon: float64 = ((E - this._fE) / R) + this._lonN;\n /* Calculate latitude */\n let D: float64 = (this._fN - N) / R;\n let lat: float64 = 2.0 * (Mercator1SP.QPI - Math.atan(Math.exp(D)));\n /* Save the position */\n source.setX(lon);\n source.setY(lat);\n source.setZ(target.getZ()); // Keep the Z value\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObliqueMercator.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/ObliqueMercator.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;GAgBG;AACH,gBAAgB;AAChB,MAAa,eAAgB,SAAQ,iCAAe;IAChD,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC,CAAC,mBAAmB;IAErE,sBAAsB;IACd,MAAM,CAAU,EAAE,GAAY,IAAI,CAAC,EAAE,CAAC;IAE9C,wCAAwC;IAChC,KAAK,CAAU;IACvB,yCAAyC;IACjC,KAAK,CAAU;IACvB,wEAAwE;IAChE,KAAK,CAAU;IACvB,8DAA8D;IACtD,KAAK,CAAU;IACvB,qDAAqD;IAC7C,GAAG,CAAU;IACrB,gDAAgD;IACxC,GAAG,CAAU;IACrB,iDAAiD;IACzC,GAAG,CAAU;IAErB,qCAAqC;IAC7B,EAAE,CAAU;IACZ,EAAE,CAAU;IACZ,GAAG,CAAU;IACb,EAAE,CAAU;IACZ,EAAE,CAAU;IACZ,GAAG,CAAU;IACb,EAAE,CAAU;IACZ,EAAE,CAAU;IACZ,EAAE,CAAU;IACZ,EAAE,CAAU;IACZ,KAAK,CAAU;IACf,KAAK,CAAU;IACf,GAAG,CAAU;IACb,GAAG,CAAU;IACrB,qCAAqC;IAC7B,KAAK,CAAU;IACf,KAAK,CAAU;IACf,KAAK,CAAU;IACf,KAAK,CAAU;IAEvB;;;SAGK;IACL,YAAmB,UAA8B;QAC7C,KAAK,CAAC,eAA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,GAAY,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACrK,6FAA6F;QAC7F,MAAM,GAAG,GAAY,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,oDAAoD;QACpM,uBAAuB;QACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AAjLL,0CAkLC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n// package orbitgt.spatial.ecrs.projection;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Coordinate } from \"../../geom/Coordinate\";\r\nimport { CRS } from \"../CRS\";\r\nimport { Operation } from \"../Operation\";\r\nimport { OperationMethod } from \"../OperationMethod\";\r\nimport { ParameterValueList } from \"../ParameterValueList\";\r\n\r\n/**\r\n * Class ObliqueMercator defines an Oblique Mercator projection (Hotine Variant B).\r\n *\r\n * The 'source' CRS is the geographic CRS.\r\n * The 'target' CRS is the projected CRS.\r\n *\r\n * Based on the following document:\r\n *\r\n * Coordinate Conversions and Transformations including Formulas\r\n * Guidance Note Number 7, part 2\r\n * Revised August 2006\r\n * Available at: http://www.epsg.org/\r\n *\r\n * Formulas: see 1.4.6 (spec v6.13): Oblique Mercator and Hotine Oblique Mercator\r\n *\r\n * @version 1.0 May 2008\r\n */\r\n/** @internal */\r\nexport class ObliqueMercator extends OperationMethod {\r\n /** The code of this method */\r\n public static readonly METHOD_CODE: int32 = 9815; // Hotine Variant B\r\n\r\n /** The value of PI */\r\n private static readonly PI: float64 = Math.PI;\r\n\r\n /** Latitude of the projection center */\r\n private _latC: float64;\r\n /** Longitude of the projection center */\r\n private _lonC: float64;\r\n /** Azimuth of the initial line passing through the projection center */\r\n private _aziC: float64;\r\n /** Angle from the recified grid to the skew (oblique) grid */\r\n private _gamC: float64;\r\n /** Scale factor on the initial line of projection */\r\n private _kC: float64;\r\n /** False easting at the center of projection */\r\n private _eC: float64;\r\n /** False northing at the center of projection */\r\n private _nC: float64;\r\n\r\n /** Forward calculation parameters */\r\n private _a: float64;\r\n private _e: float64;\r\n private _e2: float64;\r\n private _B: float64;\r\n private _A: float64;\r\n private _tO: float64;\r\n private _D: float64;\r\n private _F: float64;\r\n private _H: float64;\r\n private _G: float64;\r\n private _gamO: float64;\r\n private _lonO: float64;\r\n private _vC: float64;\r\n private _uC: float64;\r\n /** Reverse calculation parameters */\r\n private _rev1: float64;\r\n private _rev2: float64;\r\n private _rev3: float64;\r\n private _rev4: float64;\r\n\r\n /**\r\n * Create a new projection.\r\n * @param parameters the values of the parameters.\r\n */\r\n public constructor(parameters: ParameterValueList) {\r\n super(ObliqueMercator.METHOD_CODE, \"Oblique Mercator\", parameters);\r\n /* Store the parameters */\r\n this._latC = parameters.getValue(8811);\r\n this._lonC = parameters.getValue(8812);\r\n this._aziC = parameters.getValue(8813);\r\n this._gamC = parameters.getValue(8814);\r\n this._kC = parameters.getValue(8815);\r\n this._eC = parameters.getValue(8816);\r\n this._nC = parameters.getValue(8817);\r\n }\r\n\r\n /**\r\n * Get the sign of a number.\r\n */\r\n private static sign(v: float64): float64 {\r\n return (v < 0.0) ? (-1.0) : (1.0);\r\n }\r\n\r\n /**\r\n * Get the power of a number (must be able to handle negative 'n' values).\r\n */\r\n private static pow(n: float64, e: int32): float64 {\r\n let p: float64 = 1.0;\r\n for (let i: number = 0; i < e; i++) p *= n;\r\n return p;\r\n }\r\n\r\n /**\r\n * OperationMethod method.\r\n * @see OperationMethod#initialize\r\n */\r\n public override initialize(operation: Operation): void {\r\n /* Get the ellipsoid */\r\n const sourceCRS: CRS = operation.getSourceCRS();\r\n /* Prepare the forward parameters */\r\n this._a = sourceCRS.getEllipsoid().getA();\r\n this._e = sourceCRS.getEllipsoid().getE();\r\n this._e2 = this._e * this._e;\r\n this._B = Math.sqrt(1.0 + (this._e2 * ObliqueMercator.pow(Math.cos(this._latC), 4) / (1.0 - this._e2)));\r\n const esinLatC: float64 = this._e * Math.sin(this._latC);\r\n this._A = this._a * this._B * this._kC * Math.sqrt(1.0 - this._e2) / (1.0 - ObliqueMercator.pow(esinLatC, 2));\r\n this._tO = Math.tan(ObliqueMercator.PI / 4.0 - this._latC / 2.0) / Math.pow((1.0 - esinLatC) / (1.0 + esinLatC), this._e / 2.0);\r\n this._D = this._B * Math.sqrt(1.0 - this._e2) / (Math.cos(this._latC) * Math.sqrt(1.0 - ObliqueMercator.pow(esinLatC, 2)));\r\n const D2: float64 = (this._D < 1.0) ? (1.0) : (this._D * this._D);\r\n this._F = this._D + Math.sqrt(D2 - 1.0) * ObliqueMercator.sign(this._latC);\r\n this._H = this._F * Math.pow(this._tO, this._B);\r\n this._G = (this._F - 1.0 / this._F) / 2.0;\r\n this._gamO = Math.asin(Math.sin(this._aziC) / this._D);\r\n // fix for Switzerland CRS 2056 projection error. LER, 19/06/2018\r\n let w: float64 = this._G * Math.tan(this._gamO);\r\n if (Math.abs(1.0 - w) < 1.0e-13) w = 1.0; // Math.asin(0.9999999999999999) gives a 1.49e-8 difference from the asin(1.0) value, which leads to a 19 cm projection error\r\n // this._lonO = lonC-Math.asin(G*Math.tan(gamO))/B;\r\n this._lonO = this._lonC - Math.asin(w) / this._B;\r\n // end of fix\r\n this._vC = 0.0;\r\n if (Math.abs(this._aziC - 0.5 * ObliqueMercator.PI) < 1.0e-12) this._uC = this._A * (this._lonC - this._lonO); // special case aziC==90 (Hungary, Switzerland)\r\n else this._uC = (this._A / this._B) * Math.atan(Math.sqrt(D2 - 1.0) / Math.cos(this._aziC)) * ObliqueMercator.sign(this._latC);\r\n /* Prepare the reverse parameters */\r\n const e4: float64 = this._e2 * this._e2;\r\n const e6: float64 = e4 * this._e2;\r\n const e8: float64 = e4 * e4;\r\n this._rev1 = (this._e2 / 2.0 + 5.0 * e4 / 24.0 + e6 / 12.0 + 13.0 * e8 / 360.0);\r\n this._rev2 = (7.0 * e4 / 48.0 + 29.0 * e6 / 240.0 + 811.0 * e8 / 11520.0);\r\n this._rev3 = (7.0 * e6 / 120.0 + 81.0 * e8 / 1120.0);\r\n this._rev4 = (4279.0 * e8 / 161280.0);\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#forward\r\n */\r\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters (radians) */\r\n const lon: float64 = source.getX();\r\n const lat: float64 = source.getY();\r\n /* Make the calculation */\r\n const esinLat: float64 = this._e * Math.sin(lat);\r\n const t: float64 = Math.tan(ObliqueMercator.PI / 4.0 - lat / 2.0) / Math.pow((1.0 - esinLat) / (1.0 + esinLat), this._e / 2.0);\r\n const Q: float64 = this._H / Math.pow(t, this._B);\r\n const S: float64 = (Q - 1.0 / Q) / 2.0;\r\n const T: float64 = (Q + 1.0 / Q) / 2.0;\r\n const V: float64 = Math.sin(this._B * (lon - this._lonO));\r\n const U: float64 = (-V * Math.cos(this._gamO) + S * Math.sin(this._gamO)) / T;\r\n const v: float64 = this._A * Math.log((1.0 - U) / (1.0 + U)) / (2.0 * this._B);\r\n let u: float64;\r\n if (Math.abs(this._aziC - 0.5 * ObliqueMercator.PI) < 1.0e-12) // aziC==90? new in guidance note 2 version 8.5. LER, 21/09/2016\r\n {\r\n if (lon == this._lonC) u = 0.0;\r\n else u = (this._A * Math.atan((S * Math.cos(this._gamO) + V * Math.sin(this._gamO)) / Math.cos(this._B * (lon - this._lonO))) / this._B) - (Math.abs(this._uC) * ObliqueMercator.sign(this._latC) * ObliqueMercator.sign(this._lonC - lon));\r\n } else {\r\n u = (this._A * Math.atan((S * Math.cos(this._gamO) + V * Math.sin(this._gamO)) / Math.cos(this._B * (lon - this._lonO))) / this._B) - (Math.abs(this._uC) * ObliqueMercator.sign(this._latC));\r\n }\r\n const sinGamC: float64 = Math.sin(this._gamC);\r\n const cosGamC: float64 = Math.cos(this._gamC);\r\n const E: float64 = v * cosGamC + u * sinGamC + this._eC;\r\n const N: float64 = u * cosGamC - v * sinGamC + this._nC;\r\n /* Save the position */\r\n target.setX(E);\r\n target.setY(N);\r\n target.setZ(source.getZ()); // Keep the Z value\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#reverse\r\n */\r\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters */\r\n const E: float64 = target.getX();\r\n const N: float64 = target.getY();\r\n /* Make the calculation */\r\n const sinGamC: float64 = Math.sin(this._gamC);\r\n const cosGamC: float64 = Math.cos(this._gamC);\r\n const v: float64 = (E - this._eC) * cosGamC - (N - this._nC) * sinGamC;\r\n const u: float64 = (N - this._nC) * cosGamC + (E - this._eC) * sinGamC + (Math.abs(this._uC) * ObliqueMercator.sign(this._latC));\r\n const Q: float64 = Math.exp(-this._B * v / this._A);\r\n const S: float64 = (Q - 1.0 / Q) / 2.0;\r\n const T: float64 = (Q + 1.0 / Q) / 2.0;\r\n const V: float64 = Math.sin(this._B * u / this._A);\r\n const U: float64 = (V * Math.cos(this._gamO) + S * Math.sin(this._gamO)) / T;\r\n const t: float64 = Math.pow(this._H / Math.sqrt((1.0 + U) / (1.0 - U)), 1.0 / this._B);\r\n const chi: float64 = ObliqueMercator.PI / 2.0 - 2.0 * Math.atan(t);\r\n const lat: float64 = chi + Math.sin(2.0 * chi) * this._rev1 + Math.sin(4.0 * chi) * this._rev2 + Math.sin(6.0 * chi) * this._rev3 + Math.sin(8.0 * chi) * this._rev4;\r\n // double lon = lonO-Math.atan((S*Math.cos(gamO)-V*Math.sin(gamO))/Math.cos(B*u/A))/B;\r\n const lon: float64 = this._lonO - Math.atan2((S * Math.cos(this._gamO) - V * Math.sin(this._gamO)), Math.cos(this._B * u / this._A)) / this._B; // replaced atan(y/x) by atan2(y,x). LER, 23/05/2017\r\n /* Save the position */\r\n source.setX(lon);\r\n source.setY(lat);\r\n source.setZ(target.getZ()); // Keep the Z value\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ObliqueMercator.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/ObliqueMercator.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAaH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;GAgBG;AACH,gBAAgB;AAChB,MAAa,eAAgB,SAAQ,iCAAe;IAChD,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC,CAAC,mBAAmB;IAErE,sBAAsB;IACd,MAAM,CAAU,EAAE,GAAY,IAAI,CAAC,EAAE,CAAC;IAE9C,wCAAwC;IAChC,KAAK,CAAU;IACvB,yCAAyC;IACjC,KAAK,CAAU;IACv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AAC,EAAE,CAAC,CAAC,oDAAoD;QACpM,uBAAuB;QACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AAjLL,0CAkLC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n// package orbitgt.spatial.ecrs.projection;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Coordinate } from \"../../geom/Coordinate\";\nimport { CRS } from \"../CRS\";\nimport { Operation } from \"../Operation\";\nimport { OperationMethod } from \"../OperationMethod\";\nimport { ParameterValueList } from \"../ParameterValueList\";\n\n/**\n * Class ObliqueMercator defines an Oblique Mercator projection (Hotine Variant B).\n *\n * The 'source' CRS is the geographic CRS.\n * The 'target' CRS is the projected CRS.\n *\n * Based on the following document:\n *\n * Coordinate Conversions and Transformations including Formulas\n * Guidance Note Number 7, part 2\n * Revised August 2006\n * Available at: http://www.epsg.org/\n *\n * Formulas: see 1.4.6 (spec v6.13): Oblique Mercator and Hotine Oblique Mercator\n *\n * @version 1.0 May 2008\n */\n/** @internal */\nexport class ObliqueMercator extends OperationMethod {\n /** The code of this method */\n public static readonly METHOD_CODE: int32 = 9815; // Hotine Variant B\n\n /** The value of PI */\n private static readonly PI: float64 = Math.PI;\n\n /** Latitude of the projection center */\n private _latC: float64;\n /** Longitude of the projection center */\n private _lonC: float64;\n /** Azimuth of the initial line passing through the projection center */\n private _aziC: float64;\n /** Angle from the recified grid to the skew (oblique) grid */\n private _gamC: float64;\n /** Scale factor on the initial line of projection */\n private _kC: float64;\n /** False easting at the center of projection */\n private _eC: float64;\n /** False northing at the center of projection */\n private _nC: float64;\n\n /** Forward calculation parameters */\n private _a: float64;\n private _e: float64;\n private _e2: float64;\n private _B: float64;\n private _A: float64;\n private _tO: float64;\n private _D: float64;\n private _F: float64;\n private _H: float64;\n private _G: float64;\n private _gamO: float64;\n private _lonO: float64;\n private _vC: float64;\n private _uC: float64;\n /** Reverse calculation parameters */\n private _rev1: float64;\n private _rev2: float64;\n private _rev3: float64;\n private _rev4: float64;\n\n /**\n * Create a new projection.\n * @param parameters the values of the parameters.\n */\n public constructor(parameters: ParameterValueList) {\n super(ObliqueMercator.METHOD_CODE, \"Oblique Mercator\", parameters);\n /* Store the parameters */\n this._latC = parameters.getValue(8811);\n this._lonC = parameters.getValue(8812);\n this._aziC = parameters.getValue(8813);\n this._gamC = parameters.getValue(8814);\n this._kC = parameters.getValue(8815);\n this._eC = parameters.getValue(8816);\n this._nC = parameters.getValue(8817);\n }\n\n /**\n * Get the sign of a number.\n */\n private static sign(v: float64): float64 {\n return (v < 0.0) ? (-1.0) : (1.0);\n }\n\n /**\n * Get the power of a number (must be able to handle negative 'n' values).\n */\n private static pow(n: float64, e: int32): float64 {\n let p: float64 = 1.0;\n for (let i: number = 0; i < e; i++) p *= n;\n return p;\n }\n\n /**\n * OperationMethod method.\n * @see OperationMethod#initialize\n */\n public override initialize(operation: Operation): void {\n /* Get the ellipsoid */\n const sourceCRS: CRS = operation.getSourceCRS();\n /* Prepare the forward parameters */\n this._a = sourceCRS.getEllipsoid().getA();\n this._e = sourceCRS.getEllipsoid().getE();\n this._e2 = this._e * this._e;\n this._B = Math.sqrt(1.0 + (this._e2 * ObliqueMercator.pow(Math.cos(this._latC), 4) / (1.0 - this._e2)));\n const esinLatC: float64 = this._e * Math.sin(this._latC);\n this._A = this._a * this._B * this._kC * Math.sqrt(1.0 - this._e2) / (1.0 - ObliqueMercator.pow(esinLatC, 2));\n this._tO = Math.tan(ObliqueMercator.PI / 4.0 - this._latC / 2.0) / Math.pow((1.0 - esinLatC) / (1.0 + esinLatC), this._e / 2.0);\n this._D = this._B * Math.sqrt(1.0 - this._e2) / (Math.cos(this._latC) * Math.sqrt(1.0 - ObliqueMercator.pow(esinLatC, 2)));\n const D2: float64 = (this._D < 1.0) ? (1.0) : (this._D * this._D);\n this._F = this._D + Math.sqrt(D2 - 1.0) * ObliqueMercator.sign(this._latC);\n this._H = this._F * Math.pow(this._tO, this._B);\n this._G = (this._F - 1.0 / this._F) / 2.0;\n this._gamO = Math.asin(Math.sin(this._aziC) / this._D);\n // fix for Switzerland CRS 2056 projection error. LER, 19/06/2018\n let w: float64 = this._G * Math.tan(this._gamO);\n if (Math.abs(1.0 - w) < 1.0e-13) w = 1.0; // Math.asin(0.9999999999999999) gives a 1.49e-8 difference from the asin(1.0) value, which leads to a 19 cm projection error\n // this._lonO = lonC-Math.asin(G*Math.tan(gamO))/B;\n this._lonO = this._lonC - Math.asin(w) / this._B;\n // end of fix\n this._vC = 0.0;\n if (Math.abs(this._aziC - 0.5 * ObliqueMercator.PI) < 1.0e-12) this._uC = this._A * (this._lonC - this._lonO); // special case aziC==90 (Hungary, Switzerland)\n else this._uC = (this._A / this._B) * Math.atan(Math.sqrt(D2 - 1.0) / Math.cos(this._aziC)) * ObliqueMercator.sign(this._latC);\n /* Prepare the reverse parameters */\n const e4: float64 = this._e2 * this._e2;\n const e6: float64 = e4 * this._e2;\n const e8: float64 = e4 * e4;\n this._rev1 = (this._e2 / 2.0 + 5.0 * e4 / 24.0 + e6 / 12.0 + 13.0 * e8 / 360.0);\n this._rev2 = (7.0 * e4 / 48.0 + 29.0 * e6 / 240.0 + 811.0 * e8 / 11520.0);\n this._rev3 = (7.0 * e6 / 120.0 + 81.0 * e8 / 1120.0);\n this._rev4 = (4279.0 * e8 / 161280.0);\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#forward\n */\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters (radians) */\n const lon: float64 = source.getX();\n const lat: float64 = source.getY();\n /* Make the calculation */\n const esinLat: float64 = this._e * Math.sin(lat);\n const t: float64 = Math.tan(ObliqueMercator.PI / 4.0 - lat / 2.0) / Math.pow((1.0 - esinLat) / (1.0 + esinLat), this._e / 2.0);\n const Q: float64 = this._H / Math.pow(t, this._B);\n const S: float64 = (Q - 1.0 / Q) / 2.0;\n const T: float64 = (Q + 1.0 / Q) / 2.0;\n const V: float64 = Math.sin(this._B * (lon - this._lonO));\n const U: float64 = (-V * Math.cos(this._gamO) + S * Math.sin(this._gamO)) / T;\n const v: float64 = this._A * Math.log((1.0 - U) / (1.0 + U)) / (2.0 * this._B);\n let u: float64;\n if (Math.abs(this._aziC - 0.5 * ObliqueMercator.PI) < 1.0e-12) // aziC==90? new in guidance note 2 version 8.5. LER, 21/09/2016\n {\n if (lon == this._lonC) u = 0.0;\n else u = (this._A * Math.atan((S * Math.cos(this._gamO) + V * Math.sin(this._gamO)) / Math.cos(this._B * (lon - this._lonO))) / this._B) - (Math.abs(this._uC) * ObliqueMercator.sign(this._latC) * ObliqueMercator.sign(this._lonC - lon));\n } else {\n u = (this._A * Math.atan((S * Math.cos(this._gamO) + V * Math.sin(this._gamO)) / Math.cos(this._B * (lon - this._lonO))) / this._B) - (Math.abs(this._uC) * ObliqueMercator.sign(this._latC));\n }\n const sinGamC: float64 = Math.sin(this._gamC);\n const cosGamC: float64 = Math.cos(this._gamC);\n const E: float64 = v * cosGamC + u * sinGamC + this._eC;\n const N: float64 = u * cosGamC - v * sinGamC + this._nC;\n /* Save the position */\n target.setX(E);\n target.setY(N);\n target.setZ(source.getZ()); // Keep the Z value\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#reverse\n */\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n const E: float64 = target.getX();\n const N: float64 = target.getY();\n /* Make the calculation */\n const sinGamC: float64 = Math.sin(this._gamC);\n const cosGamC: float64 = Math.cos(this._gamC);\n const v: float64 = (E - this._eC) * cosGamC - (N - this._nC) * sinGamC;\n const u: float64 = (N - this._nC) * cosGamC + (E - this._eC) * sinGamC + (Math.abs(this._uC) * ObliqueMercator.sign(this._latC));\n const Q: float64 = Math.exp(-this._B * v / this._A);\n const S: float64 = (Q - 1.0 / Q) / 2.0;\n const T: float64 = (Q + 1.0 / Q) / 2.0;\n const V: float64 = Math.sin(this._B * u / this._A);\n const U: float64 = (V * Math.cos(this._gamO) + S * Math.sin(this._gamO)) / T;\n const t: float64 = Math.pow(this._H / Math.sqrt((1.0 + U) / (1.0 - U)), 1.0 / this._B);\n const chi: float64 = ObliqueMercator.PI / 2.0 - 2.0 * Math.atan(t);\n const lat: float64 = chi + Math.sin(2.0 * chi) * this._rev1 + Math.sin(4.0 * chi) * this._rev2 + Math.sin(6.0 * chi) * this._rev3 + Math.sin(8.0 * chi) * this._rev4;\n // double lon = lonO-Math.atan((S*Math.cos(gamO)-V*Math.sin(gamO))/Math.cos(B*u/A))/B;\n const lon: float64 = this._lonO - Math.atan2((S * Math.cos(this._gamO) - V * Math.sin(this._gamO)), Math.cos(this._B * u / this._A)) / this._B; // replaced atan(y/x) by atan2(y,x). LER, 23/05/2017\n /* Save the position */\n source.setX(lon);\n source.setY(lat);\n source.setZ(target.getZ()); // Keep the Z value\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObliqueStereographic.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/ObliqueStereographic.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;GAgBG;AACH,gBAAgB;AAChB,MAAa,oBAAqB,SAAQ,iCAAe;IACrD,8BAA8B;IACvB,MAAM,CAAU,WAAW,GAAU,IAAI,CAAC;IAEjD,sBAAsB;IACd,MAAM,CAAU,EAAE,GAAY,IAAI,CAAC,EAAE,CAAC;IAE9C,+BAA+B;IACvB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C,GAAG,oBAAoB,CAAC,EAAE,GAAG,GAAG,CAAC;QACnH,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACjC,MAAM,OAAO,GAAY,IAAI,CAAC,EAAE,GAAG,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAClE,MAAM,IAAI,GAAY,oBAAoB,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,GAAG,oBAAoB,CAAC,EAAE,GAAG,GAAG,CAAC,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC;YAClM,MAAM,QAAQ,GAAY,IAAI,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,GAAG,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;YAC9H,MAAM,MAAM,GAAY,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;YAClD,IAAI,GAAG,QAAQ,CAAC;YAChB,IAAI,MAAM,GAAG,OAAO;gBAAE,MAAM,CAAC,8BAA8B;QAC/D,CAAC;QACD,uBAAuB;QACvB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AApNL,oDAqNC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module OrbitGT\r\n */\r\n\r\n// package orbitgt.spatial.ecrs.projection;\r\n\r\ntype int8 = number;\r\ntype int16 = number;\r\ntype int32 = number;\r\ntype float32 = number;\r\ntype float64 = number;\r\n\r\nimport { Coordinate } from \"../../geom/Coordinate\";\r\nimport { CRS } from \"../CRS\";\r\nimport { Ellipsoid } from \"../Ellipsoid\";\r\nimport { Operation } from \"../Operation\";\r\nimport { OperationMethod } from \"../OperationMethod\";\r\nimport { ParameterValueList } from \"../ParameterValueList\";\r\n\r\n/**\r\n * Class ObliqueStereographic defines an Oblique Stereographic projection.\r\n *\r\n * The 'source' CRS is the geodetic CRS.\r\n * The 'target' CRS is the projected CRS.\r\n *\r\n * Based on the following document:\r\n *\r\n * Coordinate Conversions and Transformations including Formulas\r\n * Guidance Note Number 7, part 2\r\n * Revised August 2006\r\n * Available at: http://www.epsg.org/\r\n *\r\n * Formulas: see 1.4.7.1 'Oblique and Equatorial Stereographic cases'\r\n *\r\n * @version 1.0 December 2006\r\n */\r\n/** @internal */\r\nexport class ObliqueStereographic extends OperationMethod {\r\n /** The code of this method */\r\n public static readonly METHOD_CODE: int32 = 9809;\r\n\r\n /** The value of PI */\r\n private static readonly PI: float64 = Math.PI;\r\n\r\n /** Latitude of false origin */\r\n private _lat0: float64;\r\n /** Longitude of false origin */\r\n private _lon0: float64;\r\n /** Scale factor at natural origin */\r\n private _k0: float64;\r\n /** False easting */\r\n private _fe: float64;\r\n /** False northing */\r\n private _fn: float64;\r\n\r\n /** The parameters for the conformal sphere */\r\n private _e: float64;\r\n private _e2: float64;\r\n private _R: float64;\r\n private _n: float64;\r\n private _c: float64;\r\n private _chi0: float64;\r\n private _lambda0: float64;\r\n private _g: float64;\r\n private _h: float64;\r\n\r\n /**\r\n * Create a new projection.\r\n * @param parameters the values of the parameters.\r\n */\r\n public constructor(parameters: ParameterValueList) {\r\n super(ObliqueStereographic.METHOD_CODE, \"Oblique Stereographic\", parameters);\r\n /* Store the parameters */\r\n this._lat0 = (parameters != null) ? parameters.getValue(8801) : 0.0;\r\n this._lon0 = (parameters != null) ? parameters.getValue(8802) : 0.0;\r\n this._k0 = (parameters != null) ? parameters.getValue(8805) : 0.0;\r\n this._fe = (parameters != null) ? parameters.getValue(8806) : 0.0;\r\n this._fn = (parameters != null) ? parameters.getValue(8807) : 0.0;\r\n }\r\n\r\n /**\r\n * Create a new projection.\r\n * @param lat0 latitude of natural origin (radians).\r\n * @param lon0 longitude of natural origin (radians).\r\n * @param k0 scale factor at natural origin.\r\n * @param fe false easting.\r\n * @param fn false northing.\r\n */\r\n public static create(lat0: float64, lon0: float64, k0: float64, fe: float64, fn: float64): ObliqueStereographic {\r\n const projection: ObliqueStereographic = new ObliqueStereographic(null);\r\n projection._lat0 = lat0;\r\n projection._lon0 = lon0;\r\n projection._k0 = k0;\r\n projection._fe = fe;\r\n projection._fn = fn;\r\n return projection;\r\n }\r\n\r\n /**\r\n * Get the power of a number.\r\n */\r\n private static pow(n: float64, e: float64): float64 {\r\n return Math.exp(e * Math.log(n));\r\n }\r\n\r\n /**\r\n * Calculate sinus.\r\n */\r\n private static sin(a: float64): float64 {\r\n return Math.sin(a);\r\n }\r\n\r\n /**\r\n * Calculate cosinus.\r\n */\r\n private static cos(a: float64): float64 {\r\n return Math.cos(a);\r\n }\r\n\r\n /**\r\n * Calculate tangent.\r\n */\r\n private static tan(a: float64): float64 {\r\n return Math.tan(a);\r\n }\r\n\r\n /**\r\n * Calculate arcsinus.\r\n */\r\n private static asin(v: float64): float64 {\r\n return Math.asin(v);\r\n }\r\n\r\n /**\r\n * Calculate arctangent.\r\n */\r\n private static atan(v: float64): float64 {\r\n return Math.atan(v);\r\n }\r\n\r\n /**\r\n * Calculate log.\r\n */\r\n private static log(v: float64): float64 {\r\n return Math.log(v);\r\n }\r\n\r\n /**\r\n * Calculate exp.\r\n */\r\n private static exp(v: float64): float64 {\r\n return Math.exp(v);\r\n }\r\n\r\n /**\r\n * Initialize the projection.\r\n * @param ellipsoid the ellipsoid to use.\r\n * @return this projection (for convenience).\r\n */\r\n public initializeProjection(ellipsoid: Ellipsoid): ObliqueStereographic {\r\n /* Get the ellipsoid parameters */\r\n const a: float64 = ellipsoid.getA();\r\n this._e = ellipsoid.getE();\r\n /* Calculate conformat latitude (chi0) and longitude (lambda0) */\r\n this._e2 = this._e * this._e;\r\n const sinLat0: float64 = ObliqueStereographic.sin(this._lat0);\r\n const t0: float64 = 1.0 - this._e2 * sinLat0 * sinLat0;\r\n const rho0: float64 = a * (1 - this._e2) / ObliqueStereographic.pow(t0, 1.5);\r\n const nu0: float64 = a / ObliqueStereographic.pow(t0, 0.5);\r\n this._R = ObliqueStereographic.pow(rho0 * nu0, 0.5);\r\n this._n = ObliqueStereographic.pow(1.0 + (this._e2 * ObliqueStereographic.pow(ObliqueStereographic.cos(this._lat0), 4)) / (1.0 - this._e2), 0.5);\r\n const S1: float64 = (1.0 + sinLat0) / (1.0 - sinLat0);\r\n const S2: float64 = (1.0 - this._e * sinLat0) / (1.0 + this._e * sinLat0);\r\n const w1: float64 = ObliqueStereographic.pow(S1 * ObliqueStereographic.pow(S2, this._e), this._n);\r\n const sinChi0: float64 = (w1 - 1.0) / (w1 + 1.0);\r\n this._c = (this._n + sinLat0) * (1.0 - sinChi0) / ((this._n - sinLat0) * (1.0 + sinChi0));\r\n const w2: float64 = this._c * w1;\r\n this._chi0 = ObliqueStereographic.asin((w2 - 1.0) / (w2 + 1.0));\r\n this._lambda0 = this._lon0;\r\n /* For reverse calculation */\r\n this._g = 2.0 * this._R * this._k0 * ObliqueStereographic.tan(ObliqueStereographic.PI / 4.0 - this._chi0 / 2.0);\r\n this._h = 4.0 * this._R * this._k0 * ObliqueStereographic.tan(this._chi0) + this._g;\r\n /* Return the projection */\r\n return this;\r\n }\r\n\r\n /**\r\n * OperationMethod method.\r\n * @see OperationMethod#initialize\r\n */\r\n public override initialize(operation: Operation): void {\r\n this.initializeProjection(operation.getSourceCRS().getEllipsoid());\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#forward\r\n */\r\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters */\r\n const lon: float64 = source.getX();\r\n const lat: float64 = source.getY();\r\n const sinLat: float64 = ObliqueStereographic.sin(lat);\r\n /* Calculate conformal latitude and longitude */\r\n const lambda: float64 = this._n * (lon - this._lambda0) + this._lambda0;\r\n const Sa: float64 = (1.0 + sinLat) / (1.0 - sinLat);\r\n const Sb: float64 = (1.0 - this._e * sinLat) / (1.0 + this._e * sinLat);\r\n const w: float64 = this._c * ObliqueStereographic.pow(Sa * ObliqueStereographic.pow(Sb, this._e), this._n);\r\n const chi: float64 = ObliqueStereographic.asin((w - 1.0) / (w + 1.0));\r\n /* Calculate easting and northing */\r\n const B: float64 = 1.0 + ObliqueStereographic.sin(chi) * ObliqueStereographic.sin(this._chi0) + ObliqueStereographic.cos(chi) * ObliqueStereographic.cos(this._chi0) * ObliqueStereographic.cos(lambda - this._lambda0);\r\n const E: float64 = this._fe + 2.0 * this._R * this._k0 * ObliqueStereographic.cos(chi) * ObliqueStereographic.sin(lambda - this._lambda0) / B;\r\n const N: float64 = this._fn + 2.0 * this._R * this._k0 * (ObliqueStereographic.sin(chi) * ObliqueStereographic.cos(this._chi0) - ObliqueStereographic.cos(chi) * ObliqueStereographic.sin(this._chi0) * ObliqueStereographic.cos(lambda - this._lambda0)) / B;\r\n /* Save the position */\r\n target.setX(E);\r\n target.setY(N);\r\n target.setZ(source.getZ()); // Keep the Z value\r\n }\r\n\r\n /**\r\n * OperationMethod interface method.\r\n * @see OperationMethod#reverse\r\n */\r\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\r\n /* Get the parameters */\r\n const E: float64 = target.getX() - this._fe;\r\n const N: float64 = target.getY() - this._fn;\r\n /* Calculate conformal latitude and longitude */\r\n const i: float64 = ObliqueStereographic.atan(E / (this._h + N));\r\n const j: float64 = ObliqueStereographic.atan(E / (this._g - N)) - i;\r\n const chi: float64 = this._chi0 + 2.0 * ObliqueStereographic.atan((N - E * ObliqueStereographic.tan(j / 2.0)) / (2.0 * this._R * this._k0));\r\n const lambda: float64 = j + 2.0 * i + this._lambda0;\r\n const lon: float64 = (lambda - this._lambda0) / this._n + this._lambda0;\r\n /* Iterate to get isometric (psi) and geodetic (phi) latitude */\r\n const sinChi: float64 = ObliqueStereographic.sin(chi);\r\n const psi: float64 = 0.5 * ObliqueStereographic.log((1.0 + sinChi) / (this._c * (1.0 - sinChi))) / this._n;\r\n let phiK: float64 = 2.0 * ObliqueStereographic.atan(ObliqueStereographic.exp(psi)) - ObliqueStereographic.PI / 2.0;\r\n for (let k: number = 1; k < 8; k++) {\r\n const esinPhi: float64 = this._e * ObliqueStereographic.sin(phiK);\r\n const psiK: float64 = ObliqueStereographic.log(ObliqueStereographic.tan(phiK / 2.0 + ObliqueStereographic.PI / 4.0) * ObliqueStereographic.pow((1.0 - esinPhi) / (1.0 + esinPhi), this._e / 2.0));\r\n const phiNextK: float64 = phiK - (psiK - psi) * ObliqueStereographic.cos(phiK) * (1.0 - esinPhi * esinPhi) / (1.0 - this._e2);\r\n const change: float64 = Math.abs(phiNextK - phiK);\r\n phiK = phiNextK;\r\n if (change < 1.0e-12) break; // normally after 4 iterations\r\n }\r\n /* Save the position */\r\n source.setX(lon);\r\n source.setY(phiK);\r\n source.setZ(target.getZ()); // Keep the Z value\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ObliqueStereographic.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/ObliqueStereographic.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAcH,wDAAqD;AAGrD;;;;;;;;;;;;;;;;GAgBG;AACH,gBAAgB;AAChB,MAAa,oBAAqB,SAAQ,iCAAe;IACrD,8BAA8B;IACvB,MAAM,CAAU,W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;;AApNL,oDAqNC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module OrbitGT\n */\n\n// package orbitgt.spatial.ecrs.projection;\n\ntype int8 = number;\ntype int16 = number;\ntype int32 = number;\ntype float32 = number;\ntype float64 = number;\n\nimport { Coordinate } from \"../../geom/Coordinate\";\nimport { CRS } from \"../CRS\";\nimport { Ellipsoid } from \"../Ellipsoid\";\nimport { Operation } from \"../Operation\";\nimport { OperationMethod } from \"../OperationMethod\";\nimport { ParameterValueList } from \"../ParameterValueList\";\n\n/**\n * Class ObliqueStereographic defines an Oblique Stereographic projection.\n *\n * The 'source' CRS is the geodetic CRS.\n * The 'target' CRS is the projected CRS.\n *\n * Based on the following document:\n *\n * Coordinate Conversions and Transformations including Formulas\n * Guidance Note Number 7, part 2\n * Revised August 2006\n * Available at: http://www.epsg.org/\n *\n * Formulas: see 1.4.7.1 'Oblique and Equatorial Stereographic cases'\n *\n * @version 1.0 December 2006\n */\n/** @internal */\nexport class ObliqueStereographic extends OperationMethod {\n /** The code of this method */\n public static readonly METHOD_CODE: int32 = 9809;\n\n /** The value of PI */\n private static readonly PI: float64 = Math.PI;\n\n /** Latitude of false origin */\n private _lat0: float64;\n /** Longitude of false origin */\n private _lon0: float64;\n /** Scale factor at natural origin */\n private _k0: float64;\n /** False easting */\n private _fe: float64;\n /** False northing */\n private _fn: float64;\n\n /** The parameters for the conformal sphere */\n private _e: float64;\n private _e2: float64;\n private _R: float64;\n private _n: float64;\n private _c: float64;\n private _chi0: float64;\n private _lambda0: float64;\n private _g: float64;\n private _h: float64;\n\n /**\n * Create a new projection.\n * @param parameters the values of the parameters.\n */\n public constructor(parameters: ParameterValueList) {\n super(ObliqueStereographic.METHOD_CODE, \"Oblique Stereographic\", parameters);\n /* Store the parameters */\n this._lat0 = (parameters != null) ? parameters.getValue(8801) : 0.0;\n this._lon0 = (parameters != null) ? parameters.getValue(8802) : 0.0;\n this._k0 = (parameters != null) ? parameters.getValue(8805) : 0.0;\n this._fe = (parameters != null) ? parameters.getValue(8806) : 0.0;\n this._fn = (parameters != null) ? parameters.getValue(8807) : 0.0;\n }\n\n /**\n * Create a new projection.\n * @param lat0 latitude of natural origin (radians).\n * @param lon0 longitude of natural origin (radians).\n * @param k0 scale factor at natural origin.\n * @param fe false easting.\n * @param fn false northing.\n */\n public static create(lat0: float64, lon0: float64, k0: float64, fe: float64, fn: float64): ObliqueStereographic {\n const projection: ObliqueStereographic = new ObliqueStereographic(null);\n projection._lat0 = lat0;\n projection._lon0 = lon0;\n projection._k0 = k0;\n projection._fe = fe;\n projection._fn = fn;\n return projection;\n }\n\n /**\n * Get the power of a number.\n */\n private static pow(n: float64, e: float64): float64 {\n return Math.exp(e * Math.log(n));\n }\n\n /**\n * Calculate sinus.\n */\n private static sin(a: float64): float64 {\n return Math.sin(a);\n }\n\n /**\n * Calculate cosinus.\n */\n private static cos(a: float64): float64 {\n return Math.cos(a);\n }\n\n /**\n * Calculate tangent.\n */\n private static tan(a: float64): float64 {\n return Math.tan(a);\n }\n\n /**\n * Calculate arcsinus.\n */\n private static asin(v: float64): float64 {\n return Math.asin(v);\n }\n\n /**\n * Calculate arctangent.\n */\n private static atan(v: float64): float64 {\n return Math.atan(v);\n }\n\n /**\n * Calculate log.\n */\n private static log(v: float64): float64 {\n return Math.log(v);\n }\n\n /**\n * Calculate exp.\n */\n private static exp(v: float64): float64 {\n return Math.exp(v);\n }\n\n /**\n * Initialize the projection.\n * @param ellipsoid the ellipsoid to use.\n * @return this projection (for convenience).\n */\n public initializeProjection(ellipsoid: Ellipsoid): ObliqueStereographic {\n /* Get the ellipsoid parameters */\n const a: float64 = ellipsoid.getA();\n this._e = ellipsoid.getE();\n /* Calculate conformat latitude (chi0) and longitude (lambda0) */\n this._e2 = this._e * this._e;\n const sinLat0: float64 = ObliqueStereographic.sin(this._lat0);\n const t0: float64 = 1.0 - this._e2 * sinLat0 * sinLat0;\n const rho0: float64 = a * (1 - this._e2) / ObliqueStereographic.pow(t0, 1.5);\n const nu0: float64 = a / ObliqueStereographic.pow(t0, 0.5);\n this._R = ObliqueStereographic.pow(rho0 * nu0, 0.5);\n this._n = ObliqueStereographic.pow(1.0 + (this._e2 * ObliqueStereographic.pow(ObliqueStereographic.cos(this._lat0), 4)) / (1.0 - this._e2), 0.5);\n const S1: float64 = (1.0 + sinLat0) / (1.0 - sinLat0);\n const S2: float64 = (1.0 - this._e * sinLat0) / (1.0 + this._e * sinLat0);\n const w1: float64 = ObliqueStereographic.pow(S1 * ObliqueStereographic.pow(S2, this._e), this._n);\n const sinChi0: float64 = (w1 - 1.0) / (w1 + 1.0);\n this._c = (this._n + sinLat0) * (1.0 - sinChi0) / ((this._n - sinLat0) * (1.0 + sinChi0));\n const w2: float64 = this._c * w1;\n this._chi0 = ObliqueStereographic.asin((w2 - 1.0) / (w2 + 1.0));\n this._lambda0 = this._lon0;\n /* For reverse calculation */\n this._g = 2.0 * this._R * this._k0 * ObliqueStereographic.tan(ObliqueStereographic.PI / 4.0 - this._chi0 / 2.0);\n this._h = 4.0 * this._R * this._k0 * ObliqueStereographic.tan(this._chi0) + this._g;\n /* Return the projection */\n return this;\n }\n\n /**\n * OperationMethod method.\n * @see OperationMethod#initialize\n */\n public override initialize(operation: Operation): void {\n this.initializeProjection(operation.getSourceCRS().getEllipsoid());\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#forward\n */\n public forward(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n const lon: float64 = source.getX();\n const lat: float64 = source.getY();\n const sinLat: float64 = ObliqueStereographic.sin(lat);\n /* Calculate conformal latitude and longitude */\n const lambda: float64 = this._n * (lon - this._lambda0) + this._lambda0;\n const Sa: float64 = (1.0 + sinLat) / (1.0 - sinLat);\n const Sb: float64 = (1.0 - this._e * sinLat) / (1.0 + this._e * sinLat);\n const w: float64 = this._c * ObliqueStereographic.pow(Sa * ObliqueStereographic.pow(Sb, this._e), this._n);\n const chi: float64 = ObliqueStereographic.asin((w - 1.0) / (w + 1.0));\n /* Calculate easting and northing */\n const B: float64 = 1.0 + ObliqueStereographic.sin(chi) * ObliqueStereographic.sin(this._chi0) + ObliqueStereographic.cos(chi) * ObliqueStereographic.cos(this._chi0) * ObliqueStereographic.cos(lambda - this._lambda0);\n const E: float64 = this._fe + 2.0 * this._R * this._k0 * ObliqueStereographic.cos(chi) * ObliqueStereographic.sin(lambda - this._lambda0) / B;\n const N: float64 = this._fn + 2.0 * this._R * this._k0 * (ObliqueStereographic.sin(chi) * ObliqueStereographic.cos(this._chi0) - ObliqueStereographic.cos(chi) * ObliqueStereographic.sin(this._chi0) * ObliqueStereographic.cos(lambda - this._lambda0)) / B;\n /* Save the position */\n target.setX(E);\n target.setY(N);\n target.setZ(source.getZ()); // Keep the Z value\n }\n\n /**\n * OperationMethod interface method.\n * @see OperationMethod#reverse\n */\n public reverse(sourceCRS: CRS, source: Coordinate, targetCRS: CRS, target: Coordinate): void {\n /* Get the parameters */\n const E: float64 = target.getX() - this._fe;\n const N: float64 = target.getY() - this._fn;\n /* Calculate conformal latitude and longitude */\n const i: float64 = ObliqueStereographic.atan(E / (this._h + N));\n const j: float64 = ObliqueStereographic.atan(E / (this._g - N)) - i;\n const chi: float64 = this._chi0 + 2.0 * ObliqueStereographic.atan((N - E * ObliqueStereographic.tan(j / 2.0)) / (2.0 * this._R * this._k0));\n const lambda: float64 = j + 2.0 * i + this._lambda0;\n const lon: float64 = (lambda - this._lambda0) / this._n + this._lambda0;\n /* Iterate to get isometric (psi) and geodetic (phi) latitude */\n const sinChi: float64 = ObliqueStereographic.sin(chi);\n const psi: float64 = 0.5 * ObliqueStereographic.log((1.0 + sinChi) / (this._c * (1.0 - sinChi))) / this._n;\n let phiK: float64 = 2.0 * ObliqueStereographic.atan(ObliqueStereographic.exp(psi)) - ObliqueStereographic.PI / 2.0;\n for (let k: number = 1; k < 8; k++) {\n const esinPhi: float64 = this._e * ObliqueStereographic.sin(phiK);\n const psiK: float64 = ObliqueStereographic.log(ObliqueStereographic.tan(phiK / 2.0 + ObliqueStereographic.PI / 4.0) * ObliqueStereographic.pow((1.0 - esinPhi) / (1.0 + esinPhi), this._e / 2.0));\n const phiNextK: float64 = phiK - (psiK - psi) * ObliqueStereographic.cos(phiK) * (1.0 - esinPhi * esinPhi) / (1.0 - this._e2);\n const change: float64 = Math.abs(phiNextK - phiK);\n phiK = phiNextK;\n if (change < 1.0e-12) break; // normally after 4 iterations\n }\n /* Save the position */\n source.setX(lon);\n source.setY(phiK);\n source.setZ(target.getZ()); // Keep the Z value\n }\n}\n"]}
|