crskit 0.5.0__tar.gz → 0.6.0__tar.gz

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 (346) hide show
  1. {crskit-0.5.0 → crskit-0.6.0}/.github/workflows/epsg.yml +2 -2
  2. {crskit-0.5.0 → crskit-0.6.0}/PKG-INFO +1 -1
  3. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystemAuthorityFactory.cpp +96 -66
  4. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystemEquivalence.cpp +14 -8
  5. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Ellipsoid.cpp +6 -3
  6. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Ellipsoid.h +1 -0
  7. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/GeocentricCoordinateSystem.cpp +11 -4
  8. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Projection.cpp +1 -1
  9. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Projection.h +21 -0
  10. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Wkt2.cpp +220 -4
  11. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Affine.cpp +10 -0
  12. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Afine.h +2 -0
  13. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/AlbersConicEqualArea.cpp +1 -1
  14. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/AmericanPolyconic.cpp +3 -3
  15. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/Authalic.h +61 -0
  16. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/AzimuthalProjections.cpp +251 -0
  17. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/AzimuthalProjections.h +84 -0
  18. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/CassiniSoldner.cpp +7 -4
  19. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/CylindricalProjections.cpp +309 -0
  20. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/CylindricalProjections.h +130 -0
  21. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/Geodesic.h +218 -0
  22. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/HotineObliqueMercator.cpp +8 -4
  23. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/Krovak.cpp +160 -0
  24. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/Krovak.h +66 -0
  25. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertAzimuthalEqualArea.cpp +46 -15
  26. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertAzimuthalEqualArea.h +1 -0
  27. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertConformalConic1SP.cpp +1 -1
  28. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertConformalConic2SP.cpp +1 -1
  29. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/LambertConicConformalVariants.cpp +153 -0
  30. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/LambertConicConformalVariants.h +81 -0
  31. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/MapProjectionBase.cpp +28 -0
  32. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/MapProjectionBase.h +14 -0
  33. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Mercator1Sp.cpp +1 -1
  34. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Mercator2Sp.cpp +1 -1
  35. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/ObliqueMercator.cpp +12 -19
  36. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/ObliqueStereographic.cpp +1 -1
  37. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/OtherProjections.cpp +430 -0
  38. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/OtherProjections.h +131 -0
  39. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/PolarStereographic.cpp +133 -0
  40. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/PolarStereographic.h +57 -0
  41. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/PopularVisualisationPseudoMercator.cpp +2 -2
  42. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/TransverseMercator.cpp +1 -1
  43. crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/TransverseMercatorSouthOrientated.cpp +64 -0
  44. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/TransverseMercatorSouthOrientated.h +6 -23
  45. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformationAuthorityFactory.cpp +8 -15
  46. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformationFactory.cpp +83 -11
  47. crskit-0.6.0/crskit/CoordinateTransformations/MathTransformRegistry.cpp +592 -0
  48. {crskit-0.5.0 → crskit-0.6.0}/crskit/ExtensionManager.cpp +2 -2
  49. {crskit-0.5.0 → crskit-0.6.0}/crskit/IAuthorityProvider.h +11 -0
  50. {crskit-0.5.0 → crskit-0.6.0}/crskit/IUtilities.h +11 -0
  51. {crskit-0.5.0 → crskit-0.6.0}/crskit/OpenGisAttributes.h +3 -1
  52. {crskit-0.5.0 → crskit-0.6.0}/crskit/SqliteProvider.h +66 -49
  53. {crskit-0.5.0 → crskit-0.6.0}/crskit/Utilities.cpp +70 -108
  54. {crskit-0.5.0 → crskit-0.6.0}/crskit/WktDeserializer.cpp +19 -2
  55. {crskit-0.5.0 → crskit-0.6.0}/ports/crskit/portfile.cmake +1 -1
  56. {crskit-0.5.0 → crskit-0.6.0}/ports/crskit/vcpkg.json +1 -1
  57. {crskit-0.5.0 → crskit-0.6.0}/pyproject.toml +1 -1
  58. crskit-0.6.0/tests/TestAmericanPolyconic.cpp +22 -0
  59. crskit-0.6.0/tests/TestAntimeridian.cpp +44 -0
  60. crskit-0.6.0/tests/TestAzimuthalProjections.cpp +90 -0
  61. crskit-0.6.0/tests/TestCassiniSoldner.cpp +40 -0
  62. crskit-0.6.0/tests/TestCatalogueSweep.cpp +221 -0
  63. crskit-0.6.0/tests/TestCylindricalProjections.cpp +50 -0
  64. crskit-0.6.0/tests/TestDatabaseErrors.cpp +287 -0
  65. crskit-0.6.0/tests/TestGeocentricWkt.cpp +46 -0
  66. crskit-0.6.0/tests/TestKrovak.cpp +69 -0
  67. crskit-0.6.0/tests/TestLambertAzimuthalEqualArea.cpp +57 -0
  68. crskit-0.6.0/tests/TestLambertConicConformalVariants.cpp +53 -0
  69. crskit-0.6.0/tests/TestObliqueMercator.cpp +77 -0
  70. crskit-0.6.0/tests/TestOtherProjections.cpp +98 -0
  71. crskit-0.6.0/tests/TestPolarStereographic.cpp +113 -0
  72. crskit-0.6.0/tests/TestProjectionParameters.cpp +45 -0
  73. crskit-0.6.0/tests/TestSexagesimalDms.cpp +74 -0
  74. crskit-0.6.0/tests/TestUtilitiesContract.cpp +91 -0
  75. crskit-0.6.0/tests/TestWestSouthAxes.cpp +38 -0
  76. crskit-0.6.0/tests/TestWktMalformed.cpp +12 -0
  77. crskit-0.6.0/tests/TestWktQuoted.cpp +110 -0
  78. crskit-0.6.0/tests/TestWktUnclosed.cpp +38 -0
  79. {crskit-0.5.0 → crskit-0.6.0}/versions/baseline.json +1 -1
  80. {crskit-0.5.0 → crskit-0.6.0}/versions/c-/crskit.json +5 -0
  81. crskit-0.5.0/crskit/CoordinateTransformations/Algorithms/TransverseMercatorSouthOrientated.cpp +0 -102
  82. crskit-0.5.0/crskit/CoordinateTransformations/MathTransformRegistry.cpp +0 -305
  83. {crskit-0.5.0 → crskit-0.6.0}/.gitattributes +0 -0
  84. {crskit-0.5.0 → crskit-0.6.0}/.github/workflows/ci.yml +0 -0
  85. {crskit-0.5.0 → crskit-0.6.0}/.github/workflows/wheels.yml +0 -0
  86. {crskit-0.5.0 → crskit-0.6.0}/.gitignore +0 -0
  87. {crskit-0.5.0 → crskit-0.6.0}/CMakeLists.txt +0 -0
  88. {crskit-0.5.0 → crskit-0.6.0}/CMakePresets.json +0 -0
  89. {crskit-0.5.0 → crskit-0.6.0}/LICENSE +0 -0
  90. {crskit-0.5.0 → crskit-0.6.0}/Readme.md +0 -0
  91. {crskit-0.5.0 → crskit-0.6.0}/branding/crskit-logo-128.png +0 -0
  92. {crskit-0.5.0 → crskit-0.6.0}/branding/crskit-logo-256.png +0 -0
  93. {crskit-0.5.0 → crskit-0.6.0}/branding/crskit-logo-512.png +0 -0
  94. {crskit-0.5.0 → crskit-0.6.0}/branding/crskit-logo-64.png +0 -0
  95. {crskit-0.5.0 → crskit-0.6.0}/branding/crskit-logo.svg +0 -0
  96. {crskit-0.5.0 → crskit-0.6.0}/branding/crskit.ico +0 -0
  97. {crskit-0.5.0 → crskit-0.6.0}/cmake/crskit-config.cmake.in +0 -0
  98. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/AngularUnit.cpp +0 -0
  99. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/AngularUnit.h +0 -0
  100. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/AxisInfo.h +0 -0
  101. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/AxisOrientationEnum.h +0 -0
  102. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/BaseInfo.h +0 -0
  103. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CompoundCoordinateSystem.cpp +0 -0
  104. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CompoundCoordinateSystem.h +0 -0
  105. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystem.cpp +0 -0
  106. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystem.h +0 -0
  107. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystemAuthorityFactory.h +0 -0
  108. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystemFactory.cpp +0 -0
  109. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystemFactory.h +0 -0
  110. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Datum.cpp +0 -0
  111. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Datum.h +0 -0
  112. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/DatumType.h +0 -0
  113. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/GeocentricCoordinateSystem.h +0 -0
  114. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/GeographicCoordinateSystem.cpp +0 -0
  115. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/GeographicCoordinateSystem.h +0 -0
  116. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/HorizontalCoordinateSystem.cpp +0 -0
  117. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/HorizontalCoordinateSystem.h +0 -0
  118. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/HorizontalDatum.cpp +0 -0
  119. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/HorizontalDatum.h +0 -0
  120. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ICompoundCoordinateSystem.h +0 -0
  121. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ICoordinateSystem.h +0 -0
  122. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ICoordinateSystemAuthorityFactory.h +0 -0
  123. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IDatum.h +0 -0
  124. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IGeocentricCoordinateSystem.h +0 -0
  125. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IGeographicCoordinateSystem.h +0 -0
  126. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IHorizontalCoordinateSystem.h +0 -0
  127. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IHorizontalDatum.h +0 -0
  128. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IInfo.h +0 -0
  129. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ILocalCoordinateSystem.h +0 -0
  130. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ILocalDatum.h +0 -0
  131. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IProjectedCoordinateSystem.h +0 -0
  132. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IProjection.h +0 -0
  133. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IVerticalCoordinateSystem.h +0 -0
  134. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IVerticalDatum.h +0 -0
  135. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LinearUnit.cpp +0 -0
  136. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LinearUnit.h +0 -0
  137. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LocalCoordinateSystem.cpp +0 -0
  138. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LocalCoordinateSystem.h +0 -0
  139. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LocalDatum.cpp +0 -0
  140. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LocalDatum.h +0 -0
  141. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/PrimeMeridian.cpp +0 -0
  142. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/PrimeMeridian.h +0 -0
  143. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ProjectedCoordinateSystem.cpp +0 -0
  144. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ProjectedCoordinateSystem.h +0 -0
  145. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Unit.h +0 -0
  146. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/VerticalCoordinateSystem.cpp +0 -0
  147. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/VerticalCoordinateSystem.h +0 -0
  148. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/VerticalDatum.cpp +0 -0
  149. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/VerticalDatum.h +0 -0
  150. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Wgs84ConversionInfo.h +0 -0
  151. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Wkt2.h +0 -0
  152. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformationOptions.h +0 -0
  153. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/AlbersConicEqualArea.h +0 -0
  154. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/AmericanPolyconic.h +0 -0
  155. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/CassiniSoldner.h +0 -0
  156. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/CoordinateFrameRotation.cpp +0 -0
  157. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/CoordinateFrameRotation.h +0 -0
  158. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GeocentricToTopocentric.cpp +0 -0
  159. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GeocentricToTopocentric.h +0 -0
  160. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GeocentricTranslations.cpp +0 -0
  161. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GeocentricTranslations.h +0 -0
  162. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic2D2Geocentric.cpp +0 -0
  163. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic2D2Geocentric.h +0 -0
  164. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic2D2Geographic3D.cpp +0 -0
  165. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic2D2Geographic3D.h +0 -0
  166. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic3DToGravityRelatedHeightEGM.cpp +0 -0
  167. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic3DToGravityRelatedHeightEGM.h +0 -0
  168. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic3DToGravityRelatedHeightEGM2008.cpp +0 -0
  169. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic3DToGravityRelatedHeightEGM2008.h +0 -0
  170. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridAusGeoid.cpp +0 -0
  171. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridAusGeoid.h +0 -0
  172. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridEGM2008.cpp +0 -0
  173. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridEGM2008.h +0 -0
  174. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridEGM2008Rednap.cpp +0 -0
  175. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridEGM2008Rednap.h +0 -0
  176. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridGtg.cpp +0 -0
  177. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridGtg.h +0 -0
  178. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridGtx.cpp +0 -0
  179. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridGtx.h +0 -0
  180. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/Inflate.cpp +0 -0
  181. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/Inflate.h +0 -0
  182. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/HotineObliqueMercator.h +0 -0
  183. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertConformalConic1SP.h +0 -0
  184. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertConformalConic2SP.h +0 -0
  185. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LongitudeRotation.cpp +0 -0
  186. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LongitudeRotation.h +0 -0
  187. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Mercator1Sp.h +0 -0
  188. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Mercator2Sp.h +0 -0
  189. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/MolodenskyBadekas.cpp +0 -0
  190. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/MolodenskyBadekas.h +0 -0
  191. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/NadCon.cpp +0 -0
  192. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/NadCon.h +0 -0
  193. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Ntv2.cpp +0 -0
  194. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Ntv2.h +0 -0
  195. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/ObliqueMercator.h +0 -0
  196. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/ObliqueStereographic.h +0 -0
  197. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/P6.cpp +0 -0
  198. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/P6.h +0 -0
  199. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/PopularVisualisationPseudoMercator.h +0 -0
  200. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/PositionVectorTransformation.cpp +0 -0
  201. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/PositionVectorTransformation.h +0 -0
  202. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/TransverseMercator.h +0 -0
  203. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/VerticalOffset.cpp +0 -0
  204. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/VerticalOffset.h +0 -0
  205. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/ConcatenatedTransform.cpp +0 -0
  206. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/ConcatenatedTransform.h +0 -0
  207. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateOperation.h +0 -0
  208. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformation.cpp +0 -0
  209. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformation.h +0 -0
  210. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformationAuthorityFactory.h +0 -0
  211. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformationFactory.h +0 -0
  212. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/DomainFlags.h +0 -0
  213. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/ICoordinateTransformation.h +0 -0
  214. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/ICoordinateTransformationAuthorityFactory.h +0 -0
  215. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/ICoordinateTransformationFactory.h +0 -0
  216. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/IMathTransform.h +0 -0
  217. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/IMathTransformFactory.h +0 -0
  218. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/MathTransformBase.cpp +0 -0
  219. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/MathTransformBase.h +0 -0
  220. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/MathTransformFactory.cpp +0 -0
  221. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/MathTransformFactory.h +0 -0
  222. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/MathTransformRegistry.h +0 -0
  223. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Passthrough.cpp +0 -0
  224. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Passthrough.h +0 -0
  225. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/TransformType.h +0 -0
  226. {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/UnitsOfMeasure.h +0 -0
  227. {crskit-0.5.0 → crskit-0.6.0}/crskit/CrsContext.h +0 -0
  228. {crskit-0.5.0 → crskit-0.6.0}/crskit/CrsKit.h +0 -0
  229. {crskit-0.5.0 → crskit-0.6.0}/crskit/CrsKitExport.h +0 -0
  230. {crskit-0.5.0 → crskit-0.6.0}/crskit/EsriProjectionEngine.cpp +0 -0
  231. {crskit-0.5.0 → crskit-0.6.0}/crskit/EsriProjectionEngine.h +0 -0
  232. {crskit-0.5.0 → crskit-0.6.0}/crskit/ExtensionManager.h +0 -0
  233. {crskit-0.5.0 → crskit-0.6.0}/crskit/Factory.h +0 -0
  234. {crskit-0.5.0 → crskit-0.6.0}/crskit/GridFileNotFoundException.h +0 -0
  235. {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Angles.h +0 -0
  236. {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Concepts.h +0 -0
  237. {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/GridCell.h +0 -0
  238. {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/GridInterpolation.h +0 -0
  239. {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Interpolation.h +0 -0
  240. {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Matrix.h +0 -0
  241. {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Point.h +0 -0
  242. {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Window2D.h +0 -0
  243. {crskit-0.5.0 → crskit-0.6.0}/crskit/OpenGisException.h +0 -0
  244. {crskit-0.5.0 → crskit-0.6.0}/crskit/Parameter.h +0 -0
  245. {crskit-0.5.0 → crskit-0.6.0}/crskit/Positioning/Envelope.h +0 -0
  246. {crskit-0.5.0 → crskit-0.6.0}/crskit/StringUtil.h +0 -0
  247. {crskit-0.5.0 → crskit-0.6.0}/crskit/TokenWkt.cpp +0 -0
  248. {crskit-0.5.0 → crskit-0.6.0}/crskit/TokenWkt.h +0 -0
  249. {crskit-0.5.0 → crskit-0.6.0}/crskit/Utilities.h +0 -0
  250. {crskit-0.5.0 → crskit-0.6.0}/crskit/WktDeserializer.h +0 -0
  251. {crskit-0.5.0 → crskit-0.6.0}/crskit/app.ico +0 -0
  252. {crskit-0.5.0 → crskit-0.6.0}/crskit/pch.cpp +0 -0
  253. {crskit-0.5.0 → crskit-0.6.0}/crskit/pch.h +0 -0
  254. {crskit-0.5.0 → crskit-0.6.0}/data/grid-sources.json +0 -0
  255. {crskit-0.5.0 → crskit-0.6.0}/external/sqlite/sqlite3.c +0 -0
  256. {crskit-0.5.0 → crskit-0.6.0}/external/sqlite/sqlite3.h +0 -0
  257. {crskit-0.5.0 → crskit-0.6.0}/python/CMakeLists.txt +0 -0
  258. {crskit-0.5.0 → crskit-0.6.0}/python/README.md +0 -0
  259. {crskit-0.5.0 → crskit-0.6.0}/python/TUTORIAL.de.md +0 -0
  260. {crskit-0.5.0 → crskit-0.6.0}/python/TUTORIAL.es.md +0 -0
  261. {crskit-0.5.0 → crskit-0.6.0}/python/TUTORIAL.fr.md +0 -0
  262. {crskit-0.5.0 → crskit-0.6.0}/python/TUTORIAL.it.md +0 -0
  263. {crskit-0.5.0 → crskit-0.6.0}/python/TUTORIAL.md +0 -0
  264. {crskit-0.5.0 → crskit-0.6.0}/python/crskit/__init__.py +0 -0
  265. {crskit-0.5.0 → crskit-0.6.0}/python/crskit/_crskit.pyi +0 -0
  266. {crskit-0.5.0 → crskit-0.6.0}/python/crskit/py.typed +0 -0
  267. {crskit-0.5.0 → crskit-0.6.0}/python/examples/01_quickstart.py +0 -0
  268. {crskit-0.5.0 → crskit-0.6.0}/python/examples/02_wkt.py +0 -0
  269. {crskit-0.5.0 → crskit-0.6.0}/python/examples/03_point_cloud.py +0 -0
  270. {crskit-0.5.0 → crskit-0.6.0}/python/examples/04_choosing_the_operation.py +0 -0
  271. {crskit-0.5.0 → crskit-0.6.0}/python/examples/05_orthometric_heights.py +0 -0
  272. {crskit-0.5.0 → crskit-0.6.0}/python/examples/06_global_geoid.py +0 -0
  273. {crskit-0.5.0 → crskit-0.6.0}/python/examples/README.md +0 -0
  274. {crskit-0.5.0 → crskit-0.6.0}/python/examples/_setup.py +0 -0
  275. {crskit-0.5.0 → crskit-0.6.0}/python/src/module.cpp +0 -0
  276. {crskit-0.5.0 → crskit-0.6.0}/python/tests/test_crskit.py +0 -0
  277. {crskit-0.5.0 → crskit-0.6.0}/python/tests/test_examples.py +0 -0
  278. {crskit-0.5.0 → crskit-0.6.0}/python-epsg/README.md +0 -0
  279. {crskit-0.5.0 → crskit-0.6.0}/python-epsg/crskit_epsg/EPSG-TERMS-OF-USE.md +0 -0
  280. {crskit-0.5.0 → crskit-0.6.0}/python-epsg/crskit_epsg/__init__.py +0 -0
  281. {crskit-0.5.0 → crskit-0.6.0}/python-epsg/fetch.py +0 -0
  282. {crskit-0.5.0 → crskit-0.6.0}/python-epsg/pyproject.toml +0 -0
  283. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5101Part2.cpp +0 -0
  284. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5101Part3.cpp +0 -0
  285. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5101Part4.cpp +0 -0
  286. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5102Part1.cpp +0 -0
  287. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5102Part2.cpp +0 -0
  288. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5103Part1.cpp +0 -0
  289. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5103Part2.cpp +0 -0
  290. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5103Part3.cpp +0 -0
  291. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5104Part1.cpp +0 -0
  292. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5105Part1.cpp +0 -0
  293. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5105Part2.cpp +0 -0
  294. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5106Part1.cpp +0 -0
  295. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5107Part1.cpp +0 -0
  296. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5108Part1.cpp +0 -0
  297. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5109Part1.cpp +0 -0
  298. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5110Part1.cpp +0 -0
  299. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5111Part1.cpp +0 -0
  300. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5111Part2.cpp +0 -0
  301. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5112Part1.cpp +0 -0
  302. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5113Part1.cpp +0 -0
  303. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5201Part1.cpp +0 -0
  304. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5203Part1.cpp +0 -0
  305. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5204Part1.cpp +0 -0
  306. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5205Part1.cpp +0 -0
  307. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5205Part2.cpp +0 -0
  308. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5207Part1.cpp +0 -0
  309. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5207Part2.cpp +0 -0
  310. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5208Part1.cpp +0 -0
  311. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5209Part1.cpp +0 -0
  312. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part1.cpp +0 -0
  313. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part10.cpp +0 -0
  314. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part11.cpp +0 -0
  315. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part12.cpp +0 -0
  316. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part2.cpp +0 -0
  317. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part3.cpp +0 -0
  318. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part4.cpp +0 -0
  319. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part5.cpp +0 -0
  320. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part6.cpp +0 -0
  321. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part7.cpp +0 -0
  322. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part8.cpp +0 -0
  323. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part9.cpp +0 -0
  324. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5212Part1.cpp +0 -0
  325. {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5213Part1.cpp +0 -0
  326. {crskit-0.5.0 → crskit-0.6.0}/tests/GigsFactory.h +0 -0
  327. {crskit-0.5.0 → crskit-0.6.0}/tests/Test5101Part1.cpp +0 -0
  328. {crskit-0.5.0 → crskit-0.6.0}/tests/TestBase.h +0 -0
  329. {crskit-0.5.0 → crskit-0.6.0}/tests/TestContextEnvironment.cpp +0 -0
  330. {crskit-0.5.0 → crskit-0.6.0}/tests/TestEnvironment.cpp +0 -0
  331. {crskit-0.5.0 → crskit-0.6.0}/tests/TestEquivalence.cpp +0 -0
  332. {crskit-0.5.0 → crskit-0.6.0}/tests/TestExceptions.cpp +0 -0
  333. {crskit-0.5.0 → crskit-0.6.0}/tests/TestGridCell.cpp +0 -0
  334. {crskit-0.5.0 → crskit-0.6.0}/tests/TestGridFile.cpp +0 -0
  335. {crskit-0.5.0 → crskit-0.6.0}/tests/TestOperationSelection.cpp +0 -0
  336. {crskit-0.5.0 → crskit-0.6.0}/tests/TestProjectionEdges.cpp +0 -0
  337. {crskit-0.5.0 → crskit-0.6.0}/tests/TestTowgs84.cpp +0 -0
  338. {crskit-0.5.0 → crskit-0.6.0}/tests/TestTransformPoints.cpp +0 -0
  339. {crskit-0.5.0 → crskit-0.6.0}/tests/TestTransformationAuthorityCode.cpp +0 -0
  340. {crskit-0.5.0 → crskit-0.6.0}/tests/TestUnknownCrs.cpp +0 -0
  341. {crskit-0.5.0 → crskit-0.6.0}/tests/TestWkt2.cpp +0 -0
  342. {crskit-0.5.0 → crskit-0.6.0}/tests/vcpkg.json +0 -0
  343. {crskit-0.5.0 → crskit-0.6.0}/tools/epsg-sqlite/README.md +0 -0
  344. {crskit-0.5.0 → crskit-0.6.0}/tools/epsg-sqlite/epsg_sql_to_sqlite.py +0 -0
  345. {crskit-0.5.0 → crskit-0.6.0}/tools/release.sh +0 -0
  346. {crskit-0.5.0 → crskit-0.6.0}/vcpkg.json +0 -0
@@ -15,11 +15,11 @@ on:
15
15
  required: true
16
16
  default: https://github.com/digi21/crskit/releases/download/epsg-data/epsg-v12.057.sqlite
17
17
  publish:
18
- description: "Publish to TestPyPI (untick to only build and inspect the artifact)"
18
+ description: "Publish it (untick to only build the package and inspect the artifact)"
19
19
  type: boolean
20
20
  default: true
21
21
  production:
22
- description: "Publish to the REAL PyPI instead of TestPyPI. Irreversible."
22
+ description: "Publish to the REAL PyPI. Irreversible. Leave unticked to publish to TestPyPI."
23
23
  type: boolean
24
24
  default: false
25
25
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crskit
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: Coordinate reference systems and coordinate transformations (OGC Coordinate Transformation Services, EPSG, WKT 1 and WKT 2)
5
5
  Keywords: EPSG,CRS,WKT,coordinate,transformation,projection,geodesy,GIS
6
6
  Author-Email: José Ángel Martínez Torres <joseangelmt@outlook.com>
@@ -60,7 +60,12 @@ namespace CrsKit::Epsg
60
60
 
61
61
  auto CoordinateSystemAuthorityFactory::CreateProjectedCoordinateSystem(int code) const -> std::shared_ptr<ProjectedCoordinateSystem>
62
62
  {
63
- return CreateProjectedCoordinateSystem(code, CreateAxisInformation(code));
63
+ // ProjectedCoordinateSystem holds two axes: a projected 3D CRS (EPSG 9895, with ellipsoidal height) is rejected.
64
+ auto const axis = CreateAxisInformation(code);
65
+ if (axis.size() > 2)
66
+ throw UnsupportedFormatException(std::format("The projected coordinate system {} has {} axes; only projected systems with 2 axes are supported.", code, axis.size()));
67
+
68
+ return CreateProjectedCoordinateSystem(code, axis);
64
69
  }
65
70
 
66
71
  auto CoordinateSystemAuthorityFactory::CreateProjectedCoordinateSystem(int code, std::vector<AxisInfo> const& axis) const -> std::shared_ptr<ProjectedCoordinateSystem>
@@ -73,10 +78,12 @@ namespace CrsKit::Epsg
73
78
  if (0 != compareNoCase(coordinateSystemType.c_str(), "projected"))
74
79
  throw runtime_error( std::format("The {} coordinate system is not projected.", code) );
75
80
 
76
- assert(axis.size() == 2);
81
+ if (axis.size() != 2)
82
+ throw UnsupportedFormatException(std::format("A projected coordinate system takes 2 axes, not {}.", axis.size()));
77
83
 
78
84
  auto const units = CreateUnitsInformation(code);
79
- assert(units.size() == 2);
85
+ if (units.empty())
86
+ throw OpenGisException(std::format("The coordinate system of the projected CRS {} has no axis unit.", code));
80
87
 
81
88
  auto geographicCoordinateSystem = CreateGeographicCoordinateSystem(_provider->GetGeographicCrsCodeForProjectedCrs(code));
82
89
  auto const operationCode = _provider->GetOperationCodeForCrs(code);
@@ -140,9 +147,9 @@ namespace CrsKit::Epsg
140
147
  return CreateLinearUnit(code);
141
148
  return CreateAngularUnit(code);
142
149
  }
143
- catch (...)
150
+ catch (std::exception const& e)
144
151
  {
145
- throw runtime_error(std::format("An error was found when creating the unit with authority code: {}", code) );
152
+ throw OpenGisException(std::format("An error was found when creating the unit with authority code {}: {}", code, e.what()));
146
153
  }
147
154
  }
148
155
 
@@ -185,9 +192,9 @@ namespace CrsKit::Epsg
185
192
  axis,
186
193
  units);
187
194
  }
188
- catch (CrsKit::OpenGisException const&)
195
+ catch (OpenGisException const& e)
189
196
  {
190
- throw runtime_error(std::format("An error was found when creating the coordinate system {}", code) );
197
+ throw OpenGisException(std::format("An error was found when creating the coordinate system {}: {}", code, e.what()));
191
198
  }
192
199
  }
193
200
 
@@ -220,9 +227,9 @@ namespace CrsKit::Epsg
220
227
  CreateEllipsoid(_provider->GetEllipsoidCodeForDatum(code)),
221
228
  ResolveWgs84ConversionInfo(code));
222
229
  }
223
- catch (...)
230
+ catch (std::exception const& e)
224
231
  {
225
- throw runtime_error(std::format("An error was found when creating the datum with authority code: {}", code) );
232
+ throw OpenGisException(std::format("An error was found when creating the datum with authority code {}: {}", code, e.what()));
226
233
  }
227
234
  }
228
235
 
@@ -237,40 +244,41 @@ namespace CrsKit::Epsg
237
244
  constexpr int kPositionVector = 9606;
238
245
  constexpr int kCoordinateFrame = 9607;
239
246
 
240
- // Best effort: a missing relationship to WGS 84 is normal and must never break datum creation.
241
- try
247
+ // nullptr when the datum has no Helmert transformation to WGS 84. A database failure throws.
248
+ auto const geographicCrs = _provider->GetGeographicCrsCodeForDatum(datumCode);
249
+ if (0 == geographicCrs || kWgs84GeographicCrs == geographicCrs)
250
+ return nullptr; // No geographic CRS for the datum, or the datum is WGS 84 itself.
251
+
252
+ // Candidates are already ordered by accuracy (best first) and exclude deprecated operations.
253
+ for (auto const& operation : _provider->OperationCodesToTransformSystemAtoB(geographicCrs, kWgs84GeographicCrs))
242
254
  {
243
- auto const geographicCrs = _provider->GetGeographicCrsCodeForDatum(datumCode);
244
- if (0 == geographicCrs || kWgs84GeographicCrs == geographicCrs)
245
- return nullptr; // No geographic CRS for the datum, or the datum is WGS 84 itself.
255
+ if (kGeocentricTranslations != operation.MethodCode && kPositionVector != operation.MethodCode && kCoordinateFrame != operation.MethodCode)
256
+ continue; // Grid- or Molodensky-based transformations cannot be written as TOWGS84.
246
257
 
247
- // Candidates are already ordered by accuracy (best first) and exclude deprecated operations.
248
- for (auto const& operation : _provider->OperationCodesToTransformSystemAtoB(geographicCrs, kWgs84GeographicCrs))
258
+ auto const parameters = _provider->GetTransformationParameters(operation.Code, operation.MethodCode);
259
+ auto const value = [&](size_t i)
249
260
  {
250
- if (kGeocentricTranslations != operation.MethodCode && kPositionVector != operation.MethodCode && kCoordinateFrame != operation.MethodCode)
251
- continue; // Grid- or Molodensky-based transformations cannot be written as TOWGS84.
252
-
253
- auto const parameters = _provider->GetTransformationParameters(operation.Code, operation.MethodCode);
254
- auto const value = [&parameters](size_t i) { return i < parameters.size() ? std::get<double>(parameters[i]) : 0.0; };
255
-
256
- if (kGeocentricTranslations == operation.MethodCode)
257
- return std::make_shared<Wgs84ConversionInfo>(value(0), value(1), value(2), 0.0, 0.0, 0.0, 0.0);
258
-
259
- // The provider returns rotations in decimal degrees, but TOWGS84 (Wgs84ConversionInfo)
260
- // expresses them in arc-seconds, so we scale them up. 9606 is already Position Vector;
261
- // 9607 (Coordinate Frame) is the same shift with the opposite rotation sign, so we also
262
- // negate the rotations to emit Position Vector, the convention WKT 1 TOWGS84 follows in
263
- // GDAL/PROJ. Translations (metres) and scale (ppm) need no conversion.
264
- constexpr double kDegreesToArcSeconds = 3600.0;
265
- auto const rotationFactor = ((kCoordinateFrame == operation.MethodCode) ? -1.0 : 1.0) * kDegreesToArcSeconds;
266
- return std::make_shared<Wgs84ConversionInfo>(
267
- value(0), value(1), value(2),
268
- rotationFactor * value(3), rotationFactor * value(4), rotationFactor * value(5),
269
- value(6));
270
- }
271
- }
272
- catch (...)
273
- {
261
+ if (i >= parameters.size())
262
+ return 0.0;
263
+ if (!std::holds_alternative<double>(parameters[i]))
264
+ throw OpenGisException(std::format("Parameter {} of the transformation {} is not a number.", i, operation.Code));
265
+ return std::get<double>(parameters[i]);
266
+ };
267
+
268
+ if (kGeocentricTranslations == operation.MethodCode)
269
+ return std::make_shared<Wgs84ConversionInfo>(value(0), value(1), value(2), 0.0, 0.0, 0.0, 0.0);
270
+
271
+ // The provider returns rotations in decimal degrees, but TOWGS84 (Wgs84ConversionInfo)
272
+ // expresses them in arc-seconds, so we scale them up. 9606 is already Position Vector;
273
+ // 9607 (Coordinate Frame) is the same shift with the opposite rotation sign, so we also
274
+ // negate the rotations to emit Position Vector, the convention WKT 1 TOWGS84 follows in
275
+ // GDAL/PROJ. Translations (metres) and scale (ppm) need no conversion.
276
+ constexpr double kDegreesToArcSeconds = 3600.0;
277
+ auto const rotationFactor = ((kCoordinateFrame == operation.MethodCode) ? -1.0 : 1.0) * kDegreesToArcSeconds;
278
+ return std::make_shared<Wgs84ConversionInfo>(
279
+ value(0), value(1), value(2),
280
+ rotationFactor * value(3), rotationFactor * value(4), rotationFactor * value(5),
281
+ value(6));
274
282
  }
275
283
 
276
284
  return nullptr;
@@ -306,9 +314,9 @@ namespace CrsKit::Epsg
306
314
  _provider->GetSemiMinorAxis(code),
307
315
  CreateLinearUnit(_provider->GetEllipsoidLinearUnit(code)));
308
316
  }
309
- catch (CrsKit::OpenGisException const&)
317
+ catch (OpenGisException const& e)
310
318
  {
311
- throw runtime_error( std::format("An error was found when creating the ellipsoid with authority code: {}", code) );
319
+ throw OpenGisException(std::format("An error was found when creating the ellipsoid with authority code {}: {}", code, e.what()));
312
320
  }
313
321
  }
314
322
 
@@ -329,9 +337,9 @@ namespace CrsKit::Epsg
329
337
  CreateAngularUnit(_provider->GetMeridianAngularUnit(code)),
330
338
  _provider->GetMeridianLongitude(code)};
331
339
  }
332
- catch (...)
340
+ catch (std::exception const& e)
333
341
  {
334
- throw runtime_error(std::format("An error was found when creating the meridian with authority code: {}", code));
342
+ throw OpenGisException(std::format("An error was found when creating the meridian with authority code {}: {}", code, e.what()));
335
343
  }
336
344
  }
337
345
 
@@ -351,9 +359,9 @@ namespace CrsKit::Epsg
351
359
  _provider->GetUnitInfo(code),
352
360
  _provider->GetFactorToStandardUnit(code)};
353
361
  }
354
- catch (...)
362
+ catch (std::exception const& e)
355
363
  {
356
- throw runtime_error(std::format("An error was found when creating the linear unit with authority code: {}", code) );
364
+ throw OpenGisException(std::format("An error was found when creating the linear unit with authority code {}: {}", code, e.what()));
357
365
  }
358
366
  }
359
367
 
@@ -373,9 +381,9 @@ namespace CrsKit::Epsg
373
381
  _provider->GetUnitInfo(code),
374
382
  _provider->GetFactorToStandardUnit(code)};
375
383
  }
376
- catch (...)
384
+ catch (std::exception const& e)
377
385
  {
378
- throw runtime_error(std::format("An error was found when creating the angular unit with authority code: {}", code) );
386
+ throw OpenGisException(std::format("An error was found when creating the angular unit with authority code {}: {}", code, e.what()));
379
387
  }
380
388
  }
381
389
 
@@ -395,9 +403,9 @@ namespace CrsKit::Epsg
395
403
  _provider->GetInfoDatum(code),
396
404
  DatumType::VD_GeoidModelDerived);
397
405
  }
398
- catch (...)
406
+ catch (std::exception const& e)
399
407
  {
400
- throw runtime_error(std::format("An error was found when creating the datum with authority code: {}", code));
408
+ throw OpenGisException(std::format("An error was found when creating the datum with authority code {}: {}", code, e.what()));
401
409
  }
402
410
  }
403
411
 
@@ -415,15 +423,15 @@ namespace CrsKit::Epsg
415
423
 
416
424
  auto const axis = CreateAxisInformation(code);
417
425
  auto const units = CreateUnitsInformation(code);
426
+ // A derived vertical CRS has no DATUM_CODE and inherits the datum of its BASE_CRS_CODE, which can be
427
+ // derived too: 6358 (NAVD88 depth (ftUS)) -> 6360 (NAVD88 height (ftUS)) -> 5703 (NAVD88 height).
418
428
  auto datumCode = _provider->GetDatumCodeForCrs(code);
419
- if (0 == datumCode)
429
+ for (auto baseCrsCode = code, depth = 0; 0 == datumCode && depth < 8; ++depth)
420
430
  {
421
- // CRS vertical derivado (p.ej. EPSG 5706 "Caspian depth" deriva de 5611
422
- // "Caspian height" via an axis-direction-reversal conversion): the
423
- // DATUM_CODE field is NULL and the datum is inherited from the base CRS (BASE_CRS_CODE).
424
- auto const baseCrsCode = _provider->GetGeographicCrsCodeForProjectedCrs(code);
425
- if (0 != baseCrsCode)
426
- datumCode = _provider->GetDatumCodeForCrs(baseCrsCode);
431
+ baseCrsCode = _provider->GetGeographicCrsCodeForProjectedCrs(baseCrsCode);
432
+ if (0 == baseCrsCode)
433
+ break;
434
+ datumCode = _provider->GetDatumCodeForCrs(baseCrsCode);
427
435
  }
428
436
  auto const verticalDatum = CreateVerticalDatum(datumCode);
429
437
 
@@ -437,9 +445,9 @@ namespace CrsKit::Epsg
437
445
  dynamic_pointer_cast<VerticalDatum>(verticalDatum),
438
446
  axis[0]);
439
447
  }
440
- catch (CrsKit::OpenGisException const&)
448
+ catch (OpenGisException const& e)
441
449
  {
442
- throw runtime_error(std::format("An error was found when creating the coordinate system {}", code));
450
+ throw OpenGisException(std::format("An error was found when creating the coordinate system {}: {}", code, e.what()));
443
451
  }
444
452
  }
445
453
 
@@ -474,9 +482,9 @@ namespace CrsKit::Epsg
474
482
  axis[1],
475
483
  axis[2]);
476
484
  }
477
- catch (CrsKit::OpenGisException const&)
485
+ catch (OpenGisException const& e)
478
486
  {
479
- throw runtime_error(std::format("An error was found when creating the coordinate system {}", code));
487
+ throw OpenGisException(std::format("An error was found when creating the coordinate system {}: {}", code, e.what()));
480
488
  }
481
489
  }
482
490
 
@@ -585,15 +593,37 @@ namespace CrsKit::Epsg
585
593
 
586
594
  auto CoordinateSystemAuthorityFactory::CreateProjection(int operationCode, int algorithmCode) const -> std::shared_ptr<IProjection>
587
595
  {
588
- auto const clase = ExtensionManager::FindMathematicalOperation("EPSG", algorithmCode);
596
+ auto const clase = [&]
597
+ {
598
+ try
599
+ {
600
+ return ExtensionManager::FindMathematicalOperation("EPSG", algorithmCode);
601
+ }
602
+ catch (UnsupportedFormatException const&)
603
+ {
604
+ throw UnsupportedFormatException(std::format("The projection method EPSG:{} '{}' of the conversion {} is not implemented.", algorithmCode, _provider->GetAlgorithmName(algorithmCode), operationCode));
605
+ }
606
+ }();
589
607
  auto const classParameters = ExtensionManager::GetMathOperationParameters(clase);
590
- auto const parameterValues = _provider->GetTransformationParameters(operationCode, algorithmCode);
608
+ auto const parameterValues = _provider->GetOperationParameters(operationCode, algorithmCode);
591
609
 
610
+ // Each value goes to the class parameter with its EPSG code. A provider without codes (code 0) is mapped by
611
+ // position, which relies on the class declaring its parameters in EPSG sort order.
592
612
  vector<CrsKit::Parameter> parameters;
593
- parameters.resize(classParameters.size());
594
-
595
613
  for (auto i = 0u; i < parameterValues.size(); i++)
596
- parameters[i] = CrsKit::Parameter{ classParameters[i]->Name, parameterValues[i] };
614
+ {
615
+ auto const& [code, value] = parameterValues[i];
616
+ auto const it = 0 == code
617
+ ? (i < classParameters.size() ? classParameters.begin() + i : classParameters.end())
618
+ : std::ranges::find_if(classParameters, [code](auto const& p) { return p->EpsgCode == code; });
619
+ if (it == classParameters.end())
620
+ throw OpenGisException(std::format("The operation {} has a parameter (EPSG:{}) that the method EPSG:{} does not take.", operationCode, code, algorithmCode));
621
+
622
+ if (ParameterType::String != (*it)->Type && !std::holds_alternative<double>(value))
623
+ throw OpenGisException(std::format("The parameter '{}' of the operation {} has no numeric value.", (*it)->Name, operationCode));
624
+
625
+ parameters.emplace_back((*it)->Name, value);
626
+ }
597
627
 
598
628
  return make_shared<Projection>(
599
629
  ExtensionManager::GetClassificationName(clase),
@@ -2,6 +2,7 @@
2
2
 
3
3
  #include "VerticalDatum.h"
4
4
  #include "LocalDatum.h"
5
+ #include "Projection.h"
5
6
 
6
7
  // Structural equivalence of coordinate systems: two systems are equivalent when their mathematical
7
8
  // definition matches (datum, prime meridian, projection + parameters, units), ignoring name,
@@ -36,11 +37,8 @@ namespace CrsKit::CoordinateSystems
36
37
  b.GetLongitude() * b.GetAngularUnit().GetRadiansPerUnit());
37
38
  }
38
39
 
39
- auto sameParameter(Parameter const& a, Parameter const& b) -> bool
40
+ auto sameValue(Parameter const& a, Parameter const& b) -> bool
40
41
  {
41
- if (0 != compareNoCase(a.GetName().c_str(), b.GetName().c_str()))
42
- return false;
43
-
44
42
  auto const va = a.GetValue();
45
43
  auto const vb = b.GetValue();
46
44
  if (va.index() != vb.index())
@@ -61,10 +59,18 @@ namespace CrsKit::CoordinateSystems
61
59
  auto const& pb = b->GetParameters();
62
60
  if (pa.size() != pb.size())
63
61
  return false;
64
- for (std::size_t i = 0; i < pa.size(); ++i)
65
- if (!sameParameter(pa[i], pb[i]))
66
- return false;
67
- return true;
62
+ // Each parameter of one has one with the same name and value in the other, both ways (a repeated name must not
63
+ // stand for a missing one), whatever the order; ParameterNamesMatch: GDAL writes standard_parallel_1, the registry
64
+ // standard_parallel1.
65
+ auto const allIn = [](std::vector<Parameter> const& from, std::vector<Parameter> const& in)
66
+ {
67
+ return std::ranges::all_of(from, [&](Parameter const& p)
68
+ {
69
+ auto const it = std::ranges::find_if(in, [&](Parameter const& q) { return ParameterNamesMatch(p.GetName(), q.GetName()); });
70
+ return it != in.end() && sameValue(p, *it);
71
+ });
72
+ };
73
+ return allIn(pa, pb) && allIn(pb, pa);
68
74
  }
69
75
  }
70
76
 
@@ -39,7 +39,8 @@ namespace CrsKit::CoordinateSystems
39
39
  Ellipsoid ellipsoid{ name, authority, code, "", "", linearUnit };
40
40
 
41
41
  ellipsoid._semiMajorAxis = semiMajorAxis;
42
- ellipsoid._inverseFlattening = semiMajorAxis / (semiMajorAxis - semiMinorAxis);
42
+ // A sphere has an inverse flattening of 0, as WKT writes it.
43
+ ellipsoid._inverseFlattening = semiMajorAxis == semiMinorAxis ? 0.0 : semiMajorAxis / (semiMajorAxis - semiMinorAxis);
43
44
  ellipsoid._computedInverseFlattening = true;
44
45
 
45
46
  return ellipsoid;
@@ -58,12 +59,12 @@ namespace CrsKit::CoordinateSystems
58
59
 
59
60
  auto Ellipsoid::GetSemiMinorAxis() const -> double
60
61
  {
61
- return _semiMajorAxis - _semiMajorAxis / _inverseFlattening;
62
+ return 0.0 == _inverseFlattening ? _semiMajorAxis : _semiMajorAxis - _semiMajorAxis / _inverseFlattening;
62
63
  }
63
64
 
64
65
  auto Ellipsoid::GetFlattening() const -> double
65
66
  {
66
- return 1.0 / _inverseFlattening;
67
+ return 0.0 == _inverseFlattening ? 0.0 : 1.0 / _inverseFlattening; // 0: a sphere
67
68
  }
68
69
 
69
70
  auto Ellipsoid::GetEccentricity() const -> double
@@ -92,6 +93,8 @@ namespace CrsKit::CoordinateSystems
92
93
  auto Ellipsoid::GetRadiusOfAuthalicSphere() const -> double
93
94
  {
94
95
  auto const e = GetEccentricity();
96
+ if (0.0 == e)
97
+ return _semiMajorAxis;
95
98
  auto const e2 = pow(e, 2.0);
96
99
  return _semiMajorAxis * sqrt((1.0 - ((1.0 - e2) / (2 * e)) * (log((1.0 - e) / (1.0 + e)))) * 0.5);
97
100
  }
@@ -40,6 +40,7 @@ namespace CrsKit::CoordinateSystems
40
40
 
41
41
  [[nodiscard]] auto GetSemiMajorAxis() const noexcept -> double { return _semiMajorAxis; }
42
42
  [[nodiscard]] auto GetSemiMinorAxis() const -> double;
43
+ // 0 for a sphere.
43
44
  [[nodiscard]] auto GetInverseFlattening() const noexcept -> double { return _inverseFlattening; }
44
45
  [[nodiscard]] auto GetIvfDefinitive() const noexcept -> bool { return !_computedInverseFlattening; }
45
46
  [[nodiscard]] auto GetLinearUnit() const noexcept -> LinearUnit const& { return _linearUnit; }
@@ -39,7 +39,12 @@ namespace CrsKit::CoordinateSystems
39
39
  if (compareNoCase(tokenGEOCCS.GetChild(3).GetName().c_str(), "UNIT"))
40
40
  throw WktParseException("UNIT");
41
41
 
42
- auto const axis = AxisInfo::FromWkt(tokenGEOCCS);
42
+ // Without AXIS, WKT1 (OGC 01-009) defines X OTHER, Y EAST, Z NORTH.
43
+ auto axis = AxisInfo::FromWkt(tokenGEOCCS);
44
+ if (axis.empty())
45
+ axis = { AxisInfo("X", AxisOrientationEnum::Other), AxisInfo("Y", AxisOrientationEnum::East), AxisInfo("Z", AxisOrientationEnum::North) };
46
+ if (axis.size() != 3)
47
+ throw WktParseException(std::format("A GEOCCS takes 3 AXIS, not {}.", axis.size()));
43
48
 
44
49
  return make_shared<GeocentricCoordinateSystem>(
45
50
  tokenGEOCCS.GetChild(0).GetString(),
@@ -79,23 +84,25 @@ namespace CrsKit::CoordinateSystems
79
84
 
80
85
  if (!_authority.empty() && _authorityCode)
81
86
  {
82
- return std::format("GEOCCS[\"{}\",{},{},{},{},{},AUTHORITY[\"{}\",\"{}\"]]",
87
+ return std::format("GEOCCS[\"{}\",{},{},{},{},{},{},AUTHORITY[\"{}\",\"{}\"]]",
83
88
  _name.c_str(),
84
89
  dynamic_pointer_cast<IInfo>(_datum)->GetWkt().c_str(),
85
90
  _primeMeridian.GetWkt().c_str(),
86
91
  _linearUnit.GetWkt().c_str(),
87
92
  _axes[0].GetWkt().c_str(),
88
93
  _axes[1].GetWkt().c_str(),
94
+ _axes[2].GetWkt().c_str(),
89
95
  _authority.c_str(),
90
96
  _authorityCode);
91
97
  }
92
98
 
93
- return std::format("GEOCCS[\"{}\",{},{},{},{},{}]",
99
+ return std::format("GEOCCS[\"{}\",{},{},{},{},{},{}]",
94
100
  _name.c_str(),
95
101
  dynamic_pointer_cast<IInfo>(_datum)->GetWkt().c_str(),
96
102
  _primeMeridian.GetWkt().c_str(),
97
103
  _linearUnit.GetWkt().c_str(),
98
104
  _axes[0].GetWkt().c_str(),
99
- _axes[1].GetWkt().c_str());
105
+ _axes[1].GetWkt().c_str(),
106
+ _axes[2].GetWkt().c_str());
100
107
  }
101
108
  }
@@ -56,7 +56,7 @@ namespace CrsKit::CoordinateSystems
56
56
  auto Projection::GetParameter(std::string const& name) const -> Parameter
57
57
  {
58
58
  auto const it = std::ranges::find_if(_parameters,
59
- [&](auto const& parameter) { return 0 == compareNoCase(name.c_str(), parameter.GetName().c_str()); });
59
+ [&](auto const& parameter) { return ParameterNamesMatch(name, parameter.GetName()); });
60
60
  if (it != _parameters.end())
61
61
  return *it;
62
62
 
@@ -1,7 +1,9 @@
1
1
  #pragma once
2
2
 
3
3
  #include <memory>
4
+ #include <cctype>
4
5
  #include <string>
6
+ #include <string_view>
5
7
  #include <vector>
6
8
 
7
9
  #include "../CrsKitExport.h"
@@ -11,6 +13,25 @@
11
13
 
12
14
  namespace CrsKit::CoordinateSystems
13
15
  {
16
+ // WKT1 parameter names compared without case and without underscores: GDAL and OGC 01-009 write standard_parallel_1,
17
+ // the crskit registry standard_parallel1.
18
+ [[nodiscard]] inline auto ParameterNamesMatch(std::string_view a, std::string_view b) -> bool
19
+ {
20
+ auto const next = [](std::string_view s, size_t& i) { while (i < s.size() && '_' == s[i]) ++i; return i < s.size(); };
21
+ size_t i = 0, j = 0;
22
+ while (true)
23
+ {
24
+ auto const hasA = next(a, i);
25
+ auto const hasB = next(b, j);
26
+ if (!hasA || !hasB)
27
+ return hasA == hasB;
28
+ if (std::tolower(static_cast<unsigned char>(a[i])) != std::tolower(static_cast<unsigned char>(b[j])))
29
+ return false;
30
+ ++i;
31
+ ++j;
32
+ }
33
+ }
34
+
14
35
  class _modeCrsKit Projection final : public IProjection
15
36
  {
16
37
  std::string _methodName;