@itwin/core-orbitgt 4.6.0-dev.8 → 4.7.0-dev.0

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.
Files changed (230) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/lib/cjs/pointcloud/format/opc/AttributeMask.js.map +1 -1
  3. package/lib/cjs/pointcloud/format/opc/BlockRecord.js +1 -1
  4. package/lib/cjs/pointcloud/format/opc/BlockRecord.js.map +1 -1
  5. package/lib/cjs/pointcloud/format/opc/ContainerFile.js +1 -1
  6. package/lib/cjs/pointcloud/format/opc/ContainerFile.js.map +1 -1
  7. package/lib/cjs/pointcloud/format/opc/DirectoryReader.js.map +1 -1
  8. package/lib/cjs/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
  9. package/lib/cjs/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
  10. package/lib/cjs/pointcloud/format/opc/FileReader.js +1 -1
  11. package/lib/cjs/pointcloud/format/opc/FileReader.js.map +1 -1
  12. package/lib/cjs/pointcloud/format/opc/GeometryReader.js +1 -1
  13. package/lib/cjs/pointcloud/format/opc/GeometryReader.js.map +1 -1
  14. package/lib/cjs/pointcloud/format/opc/GeometryRecord.js.map +1 -1
  15. package/lib/cjs/pointcloud/format/opc/OPCReader.js.map +1 -1
  16. package/lib/cjs/pointcloud/format/opc/PointReader.js.map +1 -1
  17. package/lib/cjs/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
  18. package/lib/cjs/pointcloud/format/opc/TileRecord.js +1 -1
  19. package/lib/cjs/pointcloud/format/opc/TileRecord.js.map +1 -1
  20. package/lib/cjs/pointcloud/model/AttributeTypes.js +1 -1
  21. package/lib/cjs/pointcloud/model/AttributeTypes.js.map +1 -1
  22. package/lib/cjs/pointcloud/model/AttributeValue.js +1 -1
  23. package/lib/cjs/pointcloud/model/AttributeValue.js.map +1 -1
  24. package/lib/cjs/pointcloud/model/CloudPoint.js +1 -1
  25. package/lib/cjs/pointcloud/model/CloudPoint.js.map +1 -1
  26. package/lib/cjs/pointcloud/model/PointDataRaw.js +1 -1
  27. package/lib/cjs/pointcloud/model/PointDataRaw.js.map +1 -1
  28. package/lib/cjs/pointcloud/model/ReadRequest.js +1 -1
  29. package/lib/cjs/pointcloud/model/ReadRequest.js.map +1 -1
  30. package/lib/cjs/pointcloud/model/StandardAttributes.js +1 -1
  31. package/lib/cjs/pointcloud/model/StandardAttributes.js.map +1 -1
  32. package/lib/cjs/pointcloud/render/Block.js.map +1 -1
  33. package/lib/cjs/pointcloud/render/DataManager.js +1 -1
  34. package/lib/cjs/pointcloud/render/DataManager.js.map +1 -1
  35. package/lib/cjs/pointcloud/render/TileLoadSorter.js +1 -1
  36. package/lib/cjs/pointcloud/render/TileLoadSorter.js.map +1 -1
  37. package/lib/cjs/pointcloud/render/ViewTree.js +1 -1
  38. package/lib/cjs/pointcloud/render/ViewTree.js.map +1 -1
  39. package/lib/cjs/spatial/crs/CRSEngine.js.map +1 -1
  40. package/lib/cjs/spatial/crs/CRSManager.js +1 -1
  41. package/lib/cjs/spatial/crs/CRSManager.js.map +1 -1
  42. package/lib/cjs/spatial/ecrs/CRS.js +1 -1
  43. package/lib/cjs/spatial/ecrs/CRS.js.map +1 -1
  44. package/lib/cjs/spatial/ecrs/CoordinateSystem.js +1 -1
  45. package/lib/cjs/spatial/ecrs/CoordinateSystem.js.map +1 -1
  46. package/lib/cjs/spatial/ecrs/DataFileUnit.js +1 -1
  47. package/lib/cjs/spatial/ecrs/DataFileUnit.js.map +1 -1
  48. package/lib/cjs/spatial/ecrs/Datum.js +1 -1
  49. package/lib/cjs/spatial/ecrs/Datum.js.map +1 -1
  50. package/lib/cjs/spatial/ecrs/Ellipsoid.js.map +1 -1
  51. package/lib/cjs/spatial/ecrs/OnlineEngine.js.map +1 -1
  52. package/lib/cjs/spatial/ecrs/OnlineRegistry.js +1 -1
  53. package/lib/cjs/spatial/ecrs/OnlineRegistry.js.map +1 -1
  54. package/lib/cjs/spatial/ecrs/Operation.js +1 -1
  55. package/lib/cjs/spatial/ecrs/Operation.js.map +1 -1
  56. package/lib/cjs/spatial/ecrs/ParameterValueList.js.map +1 -1
  57. package/lib/cjs/spatial/ecrs/Registry.js +1 -1
  58. package/lib/cjs/spatial/ecrs/Registry.js.map +1 -1
  59. package/lib/cjs/spatial/ecrs/Transform.js +1 -1
  60. package/lib/cjs/spatial/ecrs/Transform.js.map +1 -1
  61. package/lib/cjs/spatial/ecrs/Unit.js +1 -1
  62. package/lib/cjs/spatial/ecrs/Unit.js.map +1 -1
  63. package/lib/cjs/spatial/ecrs/WellKnownText.js +1 -1
  64. package/lib/cjs/spatial/ecrs/WellKnownText.js.map +1 -1
  65. package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js +1 -1
  66. package/lib/cjs/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
  67. package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js +1 -1
  68. package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
  69. package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js +1 -1
  70. package/lib/cjs/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
  71. package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js +1 -1
  72. package/lib/cjs/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
  73. package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js +1 -1
  74. package/lib/cjs/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
  75. package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js +1 -1
  76. package/lib/cjs/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
  77. package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js +1 -1
  78. package/lib/cjs/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
  79. package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js +1 -1
  80. package/lib/cjs/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
  81. package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js +1 -1
  82. package/lib/cjs/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
  83. package/lib/cjs/spatial/ecrs/transformation/PositionVector.js +1 -1
  84. package/lib/cjs/spatial/ecrs/transformation/PositionVector.js.map +1 -1
  85. package/lib/cjs/spatial/geom/Bounds.js.map +1 -1
  86. package/lib/cjs/spatial/geom/Line.js.map +1 -1
  87. package/lib/cjs/spatial/geom/Transform.js.map +1 -1
  88. package/lib/cjs/system/buffer/Float32Buffer.js +1 -1
  89. package/lib/cjs/system/buffer/Float32Buffer.js.map +1 -1
  90. package/lib/cjs/system/buffer/LittleEndian.js.map +1 -1
  91. package/lib/cjs/system/buffer/Uint16Buffer.js +1 -1
  92. package/lib/cjs/system/buffer/Uint16Buffer.js.map +1 -1
  93. package/lib/cjs/system/buffer/Uint8Buffer.js +1 -1
  94. package/lib/cjs/system/buffer/Uint8Buffer.js.map +1 -1
  95. package/lib/cjs/system/collection/AList.js.map +1 -1
  96. package/lib/cjs/system/runtime/ALong.js +1 -1
  97. package/lib/cjs/system/runtime/ALong.js.map +1 -1
  98. package/lib/cjs/system/runtime/ASystem.js +1 -1
  99. package/lib/cjs/system/runtime/ASystem.js.map +1 -1
  100. package/lib/cjs/system/runtime/Downloader.js +1 -1
  101. package/lib/cjs/system/runtime/Downloader.js.map +1 -1
  102. package/lib/cjs/system/runtime/DownloaderNode.js.map +1 -1
  103. package/lib/cjs/system/runtime/DownloaderXhr.js.map +1 -1
  104. package/lib/cjs/system/runtime/Message.js +1 -1
  105. package/lib/cjs/system/runtime/Message.js.map +1 -1
  106. package/lib/cjs/system/runtime/Numbers.js +1 -1
  107. package/lib/cjs/system/runtime/Numbers.js.map +1 -1
  108. package/lib/cjs/system/runtime/Strings.js +1 -1
  109. package/lib/cjs/system/runtime/Strings.js.map +1 -1
  110. package/lib/cjs/system/storage/CacheList.js.map +1 -1
  111. package/lib/cjs/system/storage/ContentLoader.js +1 -1
  112. package/lib/cjs/system/storage/ContentLoader.js.map +1 -1
  113. package/lib/cjs/system/storage/NodeFS.js.map +1 -1
  114. package/lib/cjs/system/storage/PageCachedFile.js.map +1 -1
  115. package/lib/cjs/system/storage/UrlFS.js.map +1 -1
  116. package/lib/esm/pointcloud/format/opc/AttributeMask.js.map +1 -1
  117. package/lib/esm/pointcloud/format/opc/BlockRecord.js +1 -2
  118. package/lib/esm/pointcloud/format/opc/BlockRecord.js.map +1 -1
  119. package/lib/esm/pointcloud/format/opc/ContainerFile.js +1 -2
  120. package/lib/esm/pointcloud/format/opc/ContainerFile.js.map +1 -1
  121. package/lib/esm/pointcloud/format/opc/DirectoryReader.js.map +1 -1
  122. package/lib/esm/pointcloud/format/opc/DirectoryRecord.js.map +1 -1
  123. package/lib/esm/pointcloud/format/opc/EmbeddedAttributeReader.js.map +1 -1
  124. package/lib/esm/pointcloud/format/opc/FileReader.js +1 -2
  125. package/lib/esm/pointcloud/format/opc/FileReader.js.map +1 -1
  126. package/lib/esm/pointcloud/format/opc/GeometryReader.js +1 -2
  127. package/lib/esm/pointcloud/format/opc/GeometryReader.js.map +1 -1
  128. package/lib/esm/pointcloud/format/opc/GeometryRecord.js.map +1 -1
  129. package/lib/esm/pointcloud/format/opc/OPCReader.js.map +1 -1
  130. package/lib/esm/pointcloud/format/opc/PointReader.js.map +1 -1
  131. package/lib/esm/pointcloud/format/opc/TileReadBuffer.js.map +1 -1
  132. package/lib/esm/pointcloud/format/opc/TileRecord.js +1 -2
  133. package/lib/esm/pointcloud/format/opc/TileRecord.js.map +1 -1
  134. package/lib/esm/pointcloud/model/AttributeTypes.js +1 -2
  135. package/lib/esm/pointcloud/model/AttributeTypes.js.map +1 -1
  136. package/lib/esm/pointcloud/model/AttributeValue.js +1 -2
  137. package/lib/esm/pointcloud/model/AttributeValue.js.map +1 -1
  138. package/lib/esm/pointcloud/model/CloudPoint.js +1 -2
  139. package/lib/esm/pointcloud/model/CloudPoint.js.map +1 -1
  140. package/lib/esm/pointcloud/model/PointDataRaw.js +1 -2
  141. package/lib/esm/pointcloud/model/PointDataRaw.js.map +1 -1
  142. package/lib/esm/pointcloud/model/ReadRequest.js +1 -2
  143. package/lib/esm/pointcloud/model/ReadRequest.js.map +1 -1
  144. package/lib/esm/pointcloud/model/StandardAttributes.js +1 -2
  145. package/lib/esm/pointcloud/model/StandardAttributes.js.map +1 -1
  146. package/lib/esm/pointcloud/render/Block.js.map +1 -1
  147. package/lib/esm/pointcloud/render/DataManager.js +1 -2
  148. package/lib/esm/pointcloud/render/DataManager.js.map +1 -1
  149. package/lib/esm/pointcloud/render/TileLoadSorter.js +1 -2
  150. package/lib/esm/pointcloud/render/TileLoadSorter.js.map +1 -1
  151. package/lib/esm/pointcloud/render/ViewTree.js +1 -2
  152. package/lib/esm/pointcloud/render/ViewTree.js.map +1 -1
  153. package/lib/esm/spatial/crs/CRSEngine.js.map +1 -1
  154. package/lib/esm/spatial/crs/CRSManager.js +1 -2
  155. package/lib/esm/spatial/crs/CRSManager.js.map +1 -1
  156. package/lib/esm/spatial/ecrs/CRS.js +1 -2
  157. package/lib/esm/spatial/ecrs/CRS.js.map +1 -1
  158. package/lib/esm/spatial/ecrs/CoordinateSystem.js +1 -2
  159. package/lib/esm/spatial/ecrs/CoordinateSystem.js.map +1 -1
  160. package/lib/esm/spatial/ecrs/DataFileUnit.js +1 -2
  161. package/lib/esm/spatial/ecrs/DataFileUnit.js.map +1 -1
  162. package/lib/esm/spatial/ecrs/Datum.js +1 -2
  163. package/lib/esm/spatial/ecrs/Datum.js.map +1 -1
  164. package/lib/esm/spatial/ecrs/Ellipsoid.js.map +1 -1
  165. package/lib/esm/spatial/ecrs/OnlineEngine.js.map +1 -1
  166. package/lib/esm/spatial/ecrs/OnlineRegistry.js +1 -2
  167. package/lib/esm/spatial/ecrs/OnlineRegistry.js.map +1 -1
  168. package/lib/esm/spatial/ecrs/Operation.js +1 -2
  169. package/lib/esm/spatial/ecrs/Operation.js.map +1 -1
  170. package/lib/esm/spatial/ecrs/ParameterValueList.js.map +1 -1
  171. package/lib/esm/spatial/ecrs/Registry.js +1 -2
  172. package/lib/esm/spatial/ecrs/Registry.js.map +1 -1
  173. package/lib/esm/spatial/ecrs/Transform.js +1 -2
  174. package/lib/esm/spatial/ecrs/Transform.js.map +1 -1
  175. package/lib/esm/spatial/ecrs/Unit.js +1 -2
  176. package/lib/esm/spatial/ecrs/Unit.js.map +1 -1
  177. package/lib/esm/spatial/ecrs/WellKnownText.js +1 -2
  178. package/lib/esm/spatial/ecrs/WellKnownText.js.map +1 -1
  179. package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js +1 -2
  180. package/lib/esm/spatial/ecrs/projection/HotineObliqueMercator.js.map +1 -1
  181. package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js +1 -2
  182. package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConic.js.map +1 -1
  183. package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js +1 -2
  184. package/lib/esm/spatial/ecrs/projection/KrovakObliqueConformalConicEN.js.map +1 -1
  185. package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js +1 -2
  186. package/lib/esm/spatial/ecrs/projection/LambertConical1SP.js.map +1 -1
  187. package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js +1 -2
  188. package/lib/esm/spatial/ecrs/projection/LambertConical2SP.js.map +1 -1
  189. package/lib/esm/spatial/ecrs/projection/Mercator1SP.js +1 -2
  190. package/lib/esm/spatial/ecrs/projection/Mercator1SP.js.map +1 -1
  191. package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js +1 -2
  192. package/lib/esm/spatial/ecrs/projection/ObliqueMercator.js.map +1 -1
  193. package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js +1 -2
  194. package/lib/esm/spatial/ecrs/projection/ObliqueStereographic.js.map +1 -1
  195. package/lib/esm/spatial/ecrs/projection/TransverseMercator.js +1 -2
  196. package/lib/esm/spatial/ecrs/projection/TransverseMercator.js.map +1 -1
  197. package/lib/esm/spatial/ecrs/transformation/PositionVector.js +1 -2
  198. package/lib/esm/spatial/ecrs/transformation/PositionVector.js.map +1 -1
  199. package/lib/esm/spatial/geom/Bounds.js.map +1 -1
  200. package/lib/esm/spatial/geom/Line.js.map +1 -1
  201. package/lib/esm/spatial/geom/Transform.js.map +1 -1
  202. package/lib/esm/system/buffer/Float32Buffer.js +1 -2
  203. package/lib/esm/system/buffer/Float32Buffer.js.map +1 -1
  204. package/lib/esm/system/buffer/LittleEndian.js.map +1 -1
  205. package/lib/esm/system/buffer/Uint16Buffer.js +1 -2
  206. package/lib/esm/system/buffer/Uint16Buffer.js.map +1 -1
  207. package/lib/esm/system/buffer/Uint8Buffer.js +1 -2
  208. package/lib/esm/system/buffer/Uint8Buffer.js.map +1 -1
  209. package/lib/esm/system/collection/AList.js.map +1 -1
  210. package/lib/esm/system/runtime/ALong.js +1 -2
  211. package/lib/esm/system/runtime/ALong.js.map +1 -1
  212. package/lib/esm/system/runtime/ASystem.js +1 -2
  213. package/lib/esm/system/runtime/ASystem.js.map +1 -1
  214. package/lib/esm/system/runtime/Downloader.js +1 -2
  215. package/lib/esm/system/runtime/Downloader.js.map +1 -1
  216. package/lib/esm/system/runtime/DownloaderNode.js.map +1 -1
  217. package/lib/esm/system/runtime/DownloaderXhr.js.map +1 -1
  218. package/lib/esm/system/runtime/Message.js +1 -2
  219. package/lib/esm/system/runtime/Message.js.map +1 -1
  220. package/lib/esm/system/runtime/Numbers.js +1 -2
  221. package/lib/esm/system/runtime/Numbers.js.map +1 -1
  222. package/lib/esm/system/runtime/Strings.js +1 -2
  223. package/lib/esm/system/runtime/Strings.js.map +1 -1
  224. package/lib/esm/system/storage/CacheList.js.map +1 -1
  225. package/lib/esm/system/storage/ContentLoader.js +1 -2
  226. package/lib/esm/system/storage/ContentLoader.js.map +1 -1
  227. package/lib/esm/system/storage/NodeFS.js.map +1 -1
  228. package/lib/esm/system/storage/PageCachedFile.js.map +1 -1
  229. package/lib/esm/system/storage/UrlFS.js.map +1 -1
  230. package/package.json +5 -5
@@ -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;IAwCtD;;;SAGK;IACL,YAAmB,UAA8B;QAC7C,KAAK,CAAC,qBAAqB,CAAC,WAAW,EAAE,yBAAyB,EAAE,UAAU,CAAC,CAAC;QAChF,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;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;;SAEK;IACG,MAAM,CAAC,IAAI,CAAC,CAAU;QAC1B,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAED;;SAEK;IACG,MAAM,CAAC,GAAG,CAAC,CAAU,EAAE,CAAQ;QACnC,IAAI,CA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C,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AAzKD,8BAA8B;AACP,iCAAW,GAAU,IAAI,CAAC;AAFxC,sDAAqB","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
+ {"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;IAwCtD;;;SAGK;IACL,YAAmB,UAA8B;QAC7C,KAAK,CAAC,qBAAqB,CAAC,WAAW,EAAE,yBAAyB,EAAE,UAAU,CAAC,CAAC;QAChF,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;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;;SAEK;IACG,MAAM,CAAC,IAAI,CAAC,CAAU;QAC1B,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAED;;SAEK;IACG,MAAM,CAAC,GAAG,CAAC,CAAU,EAAE,CAAQ;QACnC,IAAI,CAAC,GAAY,GAAG,CAAC;QACrB,KA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AAC;;AA1KL,sDA2KC;AA1KG,8BAA8B;AACP,iCAAW,GAAU,IAAI,CAAC","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"]}
@@ -120,7 +120,7 @@ class KrovakObliqueConformalConic extends OperationMethod_1.OperationMethod {
120
120
  source.setZ(target.getZ()); // Keep the Z value
121
121
  }
122
122
  }
123
+ exports.KrovakObliqueConformalConic = KrovakObliqueConformalConic;
123
124
  /** The code of this method */
124
125
  KrovakObliqueConformalConic.METHOD_CODE = 9819;
125
- exports.KrovakObliqueConformalConic = KrovakObliqueConformalConic;
126
126
  //# sourceMappingURL=KrovakObliqueConformalConic.js.map
@@ -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;IA2B5D;;;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,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;IAC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SACrM;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;;AAtHD,8BAA8B;AACP,uCAAW,GAAU,IAAI,CAAC;AAFxC,kEAA2B","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
+ {"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;IA2B5D;;;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,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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AAC,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;AAvHG,8BAA8B;AACP,uCAAW,GAAU,IAAI,CAAC","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"]}
@@ -68,7 +68,7 @@ class KrovakObliqueConformalConicEN extends OperationMethod_1.OperationMethod {
68
68
  this.projection.reverse(sourceCRS, source, targetCRS, source /* target*/);
69
69
  }
70
70
  }
71
+ exports.KrovakObliqueConformalConicEN = KrovakObliqueConformalConicEN;
71
72
  /** The code of this method */
72
73
  KrovakObliqueConformalConicEN.METHOD_CODE = 1041;
73
- exports.KrovakObliqueConformalConicEN = KrovakObliqueConformalConicEN;
74
74
  //# sourceMappingURL=KrovakObliqueConformalConicEN.js.map
@@ -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;IAO9D;;;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;;AArDD,8BAA8B;AACP,yCAAW,GAAU,IAAI,CAAC;AAFxC,sEAA6B","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
+ {"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;IAO9D;;;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;AAtDG,8BAA8B;AACP,yCAAW,GAAU,IAAI,CAAC","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"]}
@@ -124,7 +124,7 @@ class LambertConical1SP extends OperationMethod_1.OperationMethod {
124
124
  source.setZ(target.getZ()); // Keep the Z value
125
125
  }
126
126
  }
127
+ exports.LambertConical1SP = LambertConical1SP;
127
128
  /** The code of this method */
128
129
  LambertConical1SP.METHOD_CODE = 9801;
129
- exports.LambertConical1SP = LambertConical1SP;
130
130
  //# sourceMappingURL=LambertConical1SP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LambertConical1SP.js","sourceRoot":"","sources":["../../../../../src/spatial/ecrs/projection/LambertConical1SP.ts"],"names":[],"mappings":";AAAA;;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,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;;AAhHD,8BAA8B;AACP,6BAAW,GAAU,IAAI,CAAC;AAFxC,8CAAiB","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
+ {"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;IAelD;;;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,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,KAAK,CAAC,CAAU,EAAE,GAAY;QACzC,OAAO,IAAI,CAAC,GAAG,CAA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CAAC,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC;QAC7D,IAAI,MAAM,GAAY,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,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;AAjHG,8BAA8B;AACP,6BAAW,GAAU,IAAI,CAAC","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"]}
@@ -170,11 +170,11 @@ class LambertConical2SP extends OperationMethod_1.OperationMethod {
170
170
  source.setZ(target.getZ()); // Keep the Z value
171
171
  }
172
172
  }
173
+ exports.LambertConical2SP = LambertConical2SP;
173
174
  /** The code of this method */
174
175
  LambertConical2SP.METHOD_CODE = 9802;
175
176
  /** The value of PI */
176
177
  LambertConical2SP.PI = Math.PI;
177
178
  /** The half value of PI */
178
179
  LambertConical2SP.hPI = 0.5 * Math.PI;
179
- exports.LambertConical2SP = LambertConical2SP;
180
180
  //# sourceMappingURL=LambertConical2SP.js.map
@@ -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;IAkClD;;;SAGK;IACL,YAAmB,UAA8B;QAC7C,KAAK,CAAC,iBAAiB,CAAC,WAAW,EAAE,+BAA+B,EAAE,UA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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;;AAvLD,8BAA8B;AACP,6BAAW,GAAU,IAAI,CAAC;AAEjD,sBAAsB;AACE,oBAAE,GAAY,IAAI,CAAC,EAAE,CAAC;AAC9C,2BAA2B;AACH,qBAAG,GAAY,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC;AAP5C,8CAAiB","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
+ {"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;IAkClD;;;SAGK;IACL,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,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CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACnD,CAAC;;AAxLL,8CAyLC;AAxLG,8BAA8B;AACP,6BAAW,GAAU,IAAI,CAAC;AAEjD,sBAAsB;AACE,oBAAE,GAAY,IAAI,CAAC,EAAE,CAAC;AAC9C,2BAA2B;AACH,qBAAG,GAAY,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC","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"]}
@@ -105,9 +105,9 @@ class Mercator1SP extends OperationMethod_1.OperationMethod {
105
105
  source.setZ(target.getZ()); // Keep the Z value
106
106
  }
107
107
  }
108
+ exports.Mercator1SP = Mercator1SP;
108
109
  /** The code of this method */
109
110
  Mercator1SP.METHOD_CODE = 9804;
110
111
  /** The value of PI/4 */
111
112
  Mercator1SP.QPI = Math.PI / 4.0;
112
- exports.Mercator1SP = Mercator1SP;
113
113
  //# sourceMappingURL=Mercator1SP.js.map
@@ -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;IAkB5C;;;OAGG;IACH,YAAmB,UAA8B;QAC7C,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,gBAA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AAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACrD,wBAAwB;QACxB,IAAI,CAAC,GAAY,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,GAAG,GAAY,GAAG,GAAG,CAAC,WAAW,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpE,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;;AA3FD,8BAA8B;AACP,uBAAW,GAAU,IAAI,CAAC;AAEjD,wBAAwB;AACA,eAAG,GAAY,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AAL5C,kCAAW","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
+ {"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;IAkB5C;;;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,GA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C,IAAI,GAAG,GAAY,GAAG,GAAG,CAAC,WAAW,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpE,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;;AA5FL,kCA6FC;AA5FG,8BAA8B;AACP,uBAAW,GAAU,IAAI,CAAC;AAEjD,wBAAwB;AACA,eAAG,GAAY,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC","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"]}
@@ -166,9 +166,9 @@ class ObliqueMercator extends OperationMethod_1.OperationMethod {
166
166
  source.setZ(target.getZ()); // Keep the Z value
167
167
  }
168
168
  }
169
+ exports.ObliqueMercator = ObliqueMercator;
169
170
  /** The code of this method */
170
171
  ObliqueMercator.METHOD_CODE = 9815; // Hotine Variant B
171
172
  /** The value of PI */
172
173
  ObliqueMercator.PI = Math.PI;
173
- exports.ObliqueMercator = ObliqueMercator;
174
174
  //# sourceMappingURL=ObliqueMercator.js.map
@@ -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;IA2ChD;;;SAGK;IACL,YAAmB,UAA8B;QAC7C,KAAK,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC;QACnE,0BAA0B;QAC1B,IAAI,CAAC,KA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G,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;;AAhLD,8BAA8B;AACP,2BAAW,GAAU,IAAI,CAAC,CAAC,mBAAmB;AAErE,sBAAsB;AACE,kBAAE,GAAY,IAAI,CAAC,EAAE,CAAC;AALrC,0CAAe","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
+ {"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;IA2ChD;;;SAGK;IACL,YAAmB,UAA8B;QAC7C,KAAK,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC;QACnE,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;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;;SAEK;IACG,MAAM,CAAC,IAAI,CAAC,CAAU;QAC1B,OAAO,CAAC,CAAC,GAAG,GAAG,CAA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C,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;AAjLG,8BAA8B;AACP,2BAAW,GAAU,IAAI,CAAC,CAAC,mBAAmB;AAErE,sBAAsB;AACE,kBAAE,GAAY,IAAI,CAAC,EAAE,CAAC","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"]}
@@ -201,9 +201,9 @@ class ObliqueStereographic extends OperationMethod_1.OperationMethod {
201
201
  source.setZ(target.getZ()); // Keep the Z value
202
202
  }
203
203
  }
204
+ exports.ObliqueStereographic = ObliqueStereographic;
204
205
  /** The code of this method */
205
206
  ObliqueStereographic.METHOD_CODE = 9809;
206
207
  /** The value of PI */
207
208
  ObliqueStereographic.PI = Math.PI;
208
- exports.ObliqueStereographic = ObliqueStereographic;
209
209
  //# sourceMappingURL=ObliqueStereographic.js.map