diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-05-21 14:58:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-21 14:58:35 +0200 |
| commit | 52324817002107b51df7cd9abcd5fa687494c10c (patch) | |
| tree | 4b1f1a282a637d835b44e225ed19ac022a38daba /test/unit/test_operation.cpp | |
| parent | 69b1aafe11c0559f0a88d86db7e57ff99a4a6641 (diff) | |
| parent | f58ad32389c316e675254f3a51cd165ea566e277 (diff) | |
| download | PROJ-52324817002107b51df7cd9abcd5fa687494c10c.tar.gz PROJ-52324817002107b51df7cd9abcd5fa687494c10c.zip | |
Merge pull request #1477 from rouault/fix_1474
createOperations(): avoid exception when transforming from NAD83 to projected CRS using NAD83(2011) (fixes #1474)
Diffstat (limited to 'test/unit/test_operation.cpp')
| -rw-r--r-- | test/unit/test_operation.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp index 5ac1609d..2ba76172 100644 --- a/test/unit/test_operation.cpp +++ b/test/unit/test_operation.cpp @@ -6902,6 +6902,29 @@ TEST(operation, IGNF_LAMB1_TO_EPSG_4326) { // --------------------------------------------------------------------------- +TEST(operation, NAD83_to_projeted_CRS_based_on_NAD83_2011) { + auto authFactory = + AuthorityFactory::create(DatabaseContext::create(), "EPSG"); + auto ctxt = CoordinateOperationContext::create(authFactory, nullptr, 0.0); + ctxt->setSpatialCriterion( + CoordinateOperationContext::SpatialCriterion::PARTIAL_INTERSECTION); + auto list = CoordinateOperationFactory::create()->createOperations( + // NAD83 + authFactory->createCoordinateReferenceSystem("4269"), + // NAD83(2011) / California Albers + authFactory->createCoordinateReferenceSystem("6414"), ctxt); + ASSERT_EQ(list.size(), 1U); + EXPECT_EQ(list[0]->nameStr(), "Ballpark geographic offset from NAD83 to " + "NAD83(2011) + California Albers"); + EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()), + "+proj=pipeline +step +proj=axisswap +order=2,1 " + "+step +proj=unitconvert +xy_in=deg +xy_out=rad " + "+step +proj=aea +lat_0=0 +lon_0=-120 +lat_1=34 " + "+lat_2=40.5 +x_0=0 +y_0=-4000000 +ellps=GRS80"); +} + +// --------------------------------------------------------------------------- + TEST(operation, isPROJInstantiable) { { |
