diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-03-23 18:34:09 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-03-24 10:18:17 +0100 |
| commit | 23d2941ef30f5fa62230606766ae8b9e296f814f (patch) | |
| tree | 042a08df700fa054bf4fd0d476ce527f08bcdb5a /test/unit | |
| parent | 9af705d630b0cd629daa0b8a28b82ba28752aa7d (diff) | |
| download | PROJ-23d2941ef30f5fa62230606766ae8b9e296f814f.tar.gz PROJ-23d2941ef30f5fa62230606766ae8b9e296f814f.zip | |
ESRI WKT import / identification: special case for NAD_1983_HARN_StatePlane_Colorado_North_FIPS_0501 with Foot_US unit (fixes #2086)
Diffstat (limited to 'test/unit')
| -rw-r--r-- | test/unit/test_crs.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/unit/test_crs.cpp b/test/unit/test_crs.cpp index 5f35a5e6..13ddc587 100644 --- a/test/unit/test_crs.cpp +++ b/test/unit/test_crs.cpp @@ -2472,6 +2472,34 @@ TEST(crs, projectedCRS_identify_db) { EXPECT_EQ(res.front().first->getEPSGCode(), 2193); EXPECT_EQ(res.front().second, 90); } + { + // Special case for https://github.com/OSGeo/PROJ/issues/2086 + // The name of the CRS to identify is + // NAD_1983_HARN_StatePlane_Colorado_North_FIPS_0501 + // whereas it should be + // NAD_1983_HARN_StatePlane_Colorado_North_FIPS_0501_Feet + auto obj = WKTParser().attachDatabaseContext(dbContext).createFromWKT( + "PROJCS[\"NAD_1983_HARN_StatePlane_Colorado_North_FIPS_0501\"," + "GEOGCS[\"GCS_North_American_1983_HARN\"," + "DATUM[\"D_North_American_1983_HARN\",SPHEROID[\"GRS_1980\"," + "6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0]," + "UNIT[\"Degree\",0.0174532925199433]]," + "PROJECTION[\"Lambert_Conformal_Conic\"]," + "PARAMETER[\"False_Easting\",3000000.000316083]," + "PARAMETER[\"False_Northing\",999999.999996]," + "PARAMETER[\"Central_Meridian\",-105.5]," + "PARAMETER[\"Standard_Parallel_1\",39.71666666666667]," + "PARAMETER[\"Standard_Parallel_2\",40.78333333333333]," + "PARAMETER[\"Latitude_Of_Origin\",39.33333333333334]," + "UNIT[\"Foot_US\",0.3048006096012192]]"); + auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj); + ASSERT_TRUE(crs != nullptr); + auto factoryAll = AuthorityFactory::create(dbContext, std::string()); + auto res = crs->identify(factoryAll); + ASSERT_EQ(res.size(), 1U); + EXPECT_EQ(res.front().first->getEPSGCode(), 2876); + EXPECT_EQ(res.front().second, 100); + } } // --------------------------------------------------------------------------- |
