MCPcopy Create free account
hub / github.com/OSGeo/PROJ / buildCRSFromProjStrThroughWKT

Function buildCRSFromProjStrThroughWKT

test/unit/test_operationfactory.cpp:3771–3784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3769// ---------------------------------------------------------------------------
3770
3771static CRSNNPtr buildCRSFromProjStrThroughWKT(const std::string &projStr) {
3772 auto crsFromProj = nn_dynamic_pointer_cast<CRS>(
3773 PROJStringParser().createFromPROJString(projStr));
3774 if (crsFromProj == nullptr) {
3775 throw "crsFromProj == nullptr";
3776 }
3777 auto crsFromWkt = nn_dynamic_pointer_cast<CRS>(
3778 WKTParser().createFromWKT(crsFromProj->exportToWKT(
3779 WKTFormatter::create(WKTFormatter::Convention::WKT2_2019).get())));
3780 if (crsFromWkt == nullptr) {
3781 throw "crsFromWkt == nullptr";
3782 }
3783 return NN_NO_CHECK(crsFromWkt);
3784}
3785
3786TEST(operation,
3787 boundCRS_to_boundCRS_with_base_geog_crs_different_from_source_of_transf) {

Callers 1

TESTFunction · 0.85

Calls 4

createFromPROJStringMethod · 0.80
createFromWKTMethod · 0.80
exportToWKTMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected