| 346 | // --------------------------------------------------------------------------- |
| 347 | |
| 348 | static bool is3DCRS(const PJ *crs) { |
| 349 | auto type = proj_get_type(crs); |
| 350 | if (type == PJ_TYPE_COMPOUND_CRS) |
| 351 | return true; |
| 352 | if (type == PJ_TYPE_GEOGRAPHIC_3D_CRS) |
| 353 | return true; |
| 354 | if (type == PJ_TYPE_GEODETIC_CRS || type == PJ_TYPE_PROJECTED_CRS || |
| 355 | type == PJ_TYPE_DERIVED_PROJECTED_CRS) { |
| 356 | auto cs = proj_crs_get_coordinate_system(nullptr, crs); |
| 357 | assert(cs); |
| 358 | const bool ret = proj_cs_get_axis_count(nullptr, cs) == 3; |
| 359 | proj_destroy(cs); |
| 360 | return ret; |
| 361 | } |
| 362 | return false; |
| 363 | } |
| 364 | |
| 365 | /************************************************************************/ |
| 366 | /* main() */ |
no test coverage detected