218 if (proj_get_type(pj_crs) == PJ_TYPE_COMPOUND_CRS)
221 pj_sub = proj_crs_get_sub_crs(NULL, pj_crs, 0);
223 lwerror(
"%s: proj_crs_get_sub_crs(0) returned NULL", __func__);
225 else if (proj_get_type(pj_crs) == PJ_TYPE_BOUND_CRS)
227 pj_sub = proj_get_source_crs(NULL, pj_crs);
229 lwerror(
"%s: proj_get_source_crs returned NULL", __func__);
234 pj_sub = proj_crs_get_coordinate_system(NULL, pj_crs);
244 lwerror(
"%s: %s", __func__, proj_errno_string(proj_context_errno(NULL)));
247 int pj_type = proj_get_type(pj_sub);
248 if (pj_type == PJ_TYPE_GEOGRAPHIC_2D_CRS || pj_type == PJ_TYPE_PROJECTED_CRS)
250 PJ *pj_2d = proj_crs_get_coordinate_system(NULL, pj_sub);
251 proj_destroy(pj_sub);
256 if (pj_type == PJ_TYPE_COMPOUND_CRS || pj_type == PJ_TYPE_BOUND_CRS)
260 lwerror(
"%s: un-handled CRS sub-type: %s", __func__, pj_type);
void lwerror(const char *fmt,...)
Write a notice out to the error handler.