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.
- {crskit-0.5.0 → crskit-0.6.0}/.github/workflows/epsg.yml +2 -2
- {crskit-0.5.0 → crskit-0.6.0}/PKG-INFO +1 -1
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystemAuthorityFactory.cpp +96 -66
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystemEquivalence.cpp +14 -8
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Ellipsoid.cpp +6 -3
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Ellipsoid.h +1 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/GeocentricCoordinateSystem.cpp +11 -4
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Projection.cpp +1 -1
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Projection.h +21 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Wkt2.cpp +220 -4
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Affine.cpp +10 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Afine.h +2 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/AlbersConicEqualArea.cpp +1 -1
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/AmericanPolyconic.cpp +3 -3
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/Authalic.h +61 -0
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/AzimuthalProjections.cpp +251 -0
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/AzimuthalProjections.h +84 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/CassiniSoldner.cpp +7 -4
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/CylindricalProjections.cpp +309 -0
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/CylindricalProjections.h +130 -0
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/Geodesic.h +218 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/HotineObliqueMercator.cpp +8 -4
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/Krovak.cpp +160 -0
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/Krovak.h +66 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertAzimuthalEqualArea.cpp +46 -15
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertAzimuthalEqualArea.h +1 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertConformalConic1SP.cpp +1 -1
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertConformalConic2SP.cpp +1 -1
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/LambertConicConformalVariants.cpp +153 -0
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/LambertConicConformalVariants.h +81 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/MapProjectionBase.cpp +28 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/MapProjectionBase.h +14 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Mercator1Sp.cpp +1 -1
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Mercator2Sp.cpp +1 -1
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/ObliqueMercator.cpp +12 -19
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/ObliqueStereographic.cpp +1 -1
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/OtherProjections.cpp +430 -0
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/OtherProjections.h +131 -0
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/PolarStereographic.cpp +133 -0
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/PolarStereographic.h +57 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/PopularVisualisationPseudoMercator.cpp +2 -2
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/TransverseMercator.cpp +1 -1
- crskit-0.6.0/crskit/CoordinateTransformations/Algorithms/TransverseMercatorSouthOrientated.cpp +64 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/TransverseMercatorSouthOrientated.h +6 -23
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformationAuthorityFactory.cpp +8 -15
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformationFactory.cpp +83 -11
- crskit-0.6.0/crskit/CoordinateTransformations/MathTransformRegistry.cpp +592 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/ExtensionManager.cpp +2 -2
- {crskit-0.5.0 → crskit-0.6.0}/crskit/IAuthorityProvider.h +11 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/IUtilities.h +11 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/OpenGisAttributes.h +3 -1
- {crskit-0.5.0 → crskit-0.6.0}/crskit/SqliteProvider.h +66 -49
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Utilities.cpp +70 -108
- {crskit-0.5.0 → crskit-0.6.0}/crskit/WktDeserializer.cpp +19 -2
- {crskit-0.5.0 → crskit-0.6.0}/ports/crskit/portfile.cmake +1 -1
- {crskit-0.5.0 → crskit-0.6.0}/ports/crskit/vcpkg.json +1 -1
- {crskit-0.5.0 → crskit-0.6.0}/pyproject.toml +1 -1
- crskit-0.6.0/tests/TestAmericanPolyconic.cpp +22 -0
- crskit-0.6.0/tests/TestAntimeridian.cpp +44 -0
- crskit-0.6.0/tests/TestAzimuthalProjections.cpp +90 -0
- crskit-0.6.0/tests/TestCassiniSoldner.cpp +40 -0
- crskit-0.6.0/tests/TestCatalogueSweep.cpp +221 -0
- crskit-0.6.0/tests/TestCylindricalProjections.cpp +50 -0
- crskit-0.6.0/tests/TestDatabaseErrors.cpp +287 -0
- crskit-0.6.0/tests/TestGeocentricWkt.cpp +46 -0
- crskit-0.6.0/tests/TestKrovak.cpp +69 -0
- crskit-0.6.0/tests/TestLambertAzimuthalEqualArea.cpp +57 -0
- crskit-0.6.0/tests/TestLambertConicConformalVariants.cpp +53 -0
- crskit-0.6.0/tests/TestObliqueMercator.cpp +77 -0
- crskit-0.6.0/tests/TestOtherProjections.cpp +98 -0
- crskit-0.6.0/tests/TestPolarStereographic.cpp +113 -0
- crskit-0.6.0/tests/TestProjectionParameters.cpp +45 -0
- crskit-0.6.0/tests/TestSexagesimalDms.cpp +74 -0
- crskit-0.6.0/tests/TestUtilitiesContract.cpp +91 -0
- crskit-0.6.0/tests/TestWestSouthAxes.cpp +38 -0
- crskit-0.6.0/tests/TestWktMalformed.cpp +12 -0
- crskit-0.6.0/tests/TestWktQuoted.cpp +110 -0
- crskit-0.6.0/tests/TestWktUnclosed.cpp +38 -0
- {crskit-0.5.0 → crskit-0.6.0}/versions/baseline.json +1 -1
- {crskit-0.5.0 → crskit-0.6.0}/versions/c-/crskit.json +5 -0
- crskit-0.5.0/crskit/CoordinateTransformations/Algorithms/TransverseMercatorSouthOrientated.cpp +0 -102
- crskit-0.5.0/crskit/CoordinateTransformations/MathTransformRegistry.cpp +0 -305
- {crskit-0.5.0 → crskit-0.6.0}/.gitattributes +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/.github/workflows/ci.yml +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/.github/workflows/wheels.yml +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/.gitignore +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/CMakeLists.txt +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/CMakePresets.json +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/LICENSE +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/Readme.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/branding/crskit-logo-128.png +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/branding/crskit-logo-256.png +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/branding/crskit-logo-512.png +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/branding/crskit-logo-64.png +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/branding/crskit-logo.svg +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/branding/crskit.ico +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/cmake/crskit-config.cmake.in +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/AngularUnit.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/AngularUnit.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/AxisInfo.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/AxisOrientationEnum.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/BaseInfo.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CompoundCoordinateSystem.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CompoundCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystem.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystemAuthorityFactory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystemFactory.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/CoordinateSystemFactory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Datum.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Datum.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/DatumType.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/GeocentricCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/GeographicCoordinateSystem.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/GeographicCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/HorizontalCoordinateSystem.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/HorizontalCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/HorizontalDatum.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/HorizontalDatum.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ICompoundCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ICoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ICoordinateSystemAuthorityFactory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IDatum.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IGeocentricCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IGeographicCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IHorizontalCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IHorizontalDatum.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IInfo.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ILocalCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ILocalDatum.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IProjectedCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IProjection.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IVerticalCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/IVerticalDatum.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LinearUnit.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LinearUnit.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LocalCoordinateSystem.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LocalCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LocalDatum.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/LocalDatum.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/PrimeMeridian.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/PrimeMeridian.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ProjectedCoordinateSystem.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/ProjectedCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Unit.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/VerticalCoordinateSystem.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/VerticalCoordinateSystem.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/VerticalDatum.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/VerticalDatum.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Wgs84ConversionInfo.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateSystems/Wkt2.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformationOptions.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/AlbersConicEqualArea.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/AmericanPolyconic.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/CassiniSoldner.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/CoordinateFrameRotation.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/CoordinateFrameRotation.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GeocentricToTopocentric.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GeocentricToTopocentric.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GeocentricTranslations.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GeocentricTranslations.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic2D2Geocentric.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic2D2Geocentric.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic2D2Geographic3D.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic2D2Geographic3D.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic3DToGravityRelatedHeightEGM.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic3DToGravityRelatedHeightEGM.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic3DToGravityRelatedHeightEGM2008.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Geographic3DToGravityRelatedHeightEGM2008.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridAusGeoid.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridAusGeoid.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridEGM2008.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridEGM2008.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridEGM2008Rednap.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridEGM2008Rednap.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridGtg.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridGtg.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridGtx.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/GridGtx.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/Inflate.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/GridFiles/Inflate.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/HotineObliqueMercator.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertConformalConic1SP.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LambertConformalConic2SP.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LongitudeRotation.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/LongitudeRotation.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Mercator1Sp.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Mercator2Sp.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/MolodenskyBadekas.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/MolodenskyBadekas.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/NadCon.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/NadCon.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Ntv2.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/Ntv2.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/ObliqueMercator.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/ObliqueStereographic.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/P6.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/P6.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/PopularVisualisationPseudoMercator.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/PositionVectorTransformation.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/PositionVectorTransformation.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/TransverseMercator.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/VerticalOffset.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Algorithms/VerticalOffset.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/ConcatenatedTransform.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/ConcatenatedTransform.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateOperation.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformation.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformation.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformationAuthorityFactory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/CoordinateTransformationFactory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/DomainFlags.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/ICoordinateTransformation.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/ICoordinateTransformationAuthorityFactory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/ICoordinateTransformationFactory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/IMathTransform.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/IMathTransformFactory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/MathTransformBase.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/MathTransformBase.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/MathTransformFactory.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/MathTransformFactory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/MathTransformRegistry.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Passthrough.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/Passthrough.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/TransformType.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CoordinateTransformations/UnitsOfMeasure.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CrsContext.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CrsKit.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/CrsKitExport.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/EsriProjectionEngine.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/EsriProjectionEngine.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/ExtensionManager.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Factory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/GridFileNotFoundException.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Angles.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Concepts.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/GridCell.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/GridInterpolation.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Interpolation.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Matrix.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Point.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Mathematics/Window2D.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/OpenGisException.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Parameter.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Positioning/Envelope.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/StringUtil.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/TokenWkt.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/TokenWkt.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/Utilities.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/WktDeserializer.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/app.ico +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/pch.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/crskit/pch.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/data/grid-sources.json +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/external/sqlite/sqlite3.c +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/external/sqlite/sqlite3.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/CMakeLists.txt +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/README.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/TUTORIAL.de.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/TUTORIAL.es.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/TUTORIAL.fr.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/TUTORIAL.it.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/TUTORIAL.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/crskit/__init__.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/crskit/_crskit.pyi +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/crskit/py.typed +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/examples/01_quickstart.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/examples/02_wkt.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/examples/03_point_cloud.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/examples/04_choosing_the_operation.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/examples/05_orthometric_heights.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/examples/06_global_geoid.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/examples/README.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/examples/_setup.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/src/module.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/tests/test_crskit.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python/tests/test_examples.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python-epsg/README.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python-epsg/crskit_epsg/EPSG-TERMS-OF-USE.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python-epsg/crskit_epsg/__init__.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python-epsg/fetch.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/python-epsg/pyproject.toml +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5101Part2.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5101Part3.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5101Part4.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5102Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5102Part2.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5103Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5103Part2.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5103Part3.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5104Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5105Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5105Part2.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5106Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5107Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5108Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5109Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5110Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5111Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5111Part2.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5112Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5113Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5201Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5203Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5204Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5205Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5205Part2.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5207Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5207Part2.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5208Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5209Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part10.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part11.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part12.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part2.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part3.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part4.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part5.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part6.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part7.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part8.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5210Part9.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5212Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Gigs/Test5213Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/GigsFactory.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/Test5101Part1.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestBase.h +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestContextEnvironment.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestEnvironment.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestEquivalence.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestExceptions.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestGridCell.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestGridFile.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestOperationSelection.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestProjectionEdges.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestTowgs84.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestTransformPoints.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestTransformationAuthorityCode.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestUnknownCrs.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/TestWkt2.cpp +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tests/vcpkg.json +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tools/epsg-sqlite/README.md +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tools/epsg-sqlite/epsg_sql_to_sqlite.py +0 -0
- {crskit-0.5.0 → crskit-0.6.0}/tools/release.sh +0 -0
- {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
|
|
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
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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 (
|
|
195
|
+
catch (OpenGisException const& e)
|
|
189
196
|
{
|
|
190
|
-
throw
|
|
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
|
|
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
|
-
//
|
|
241
|
-
|
|
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
|
-
|
|
244
|
-
|
|
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
|
-
|
|
248
|
-
|
|
258
|
+
auto const parameters = _provider->GetTransformationParameters(operation.Code, operation.MethodCode);
|
|
259
|
+
auto const value = [&](size_t i)
|
|
249
260
|
{
|
|
250
|
-
if (
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
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 (
|
|
317
|
+
catch (OpenGisException const& e)
|
|
310
318
|
{
|
|
311
|
-
throw
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
429
|
+
for (auto baseCrsCode = code, depth = 0; 0 == datumCode && depth < 8; ++depth)
|
|
420
430
|
{
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
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 (
|
|
448
|
+
catch (OpenGisException const& e)
|
|
441
449
|
{
|
|
442
|
-
throw
|
|
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 (
|
|
485
|
+
catch (OpenGisException const& e)
|
|
478
486
|
{
|
|
479
|
-
throw
|
|
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 =
|
|
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->
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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;
|