bool GDALSpatialLinking::checkCentroid(OGRGeometry* geo, OGRGeometry * lead_geo) { OGRPoint ct; if (int error = geo->Centroid(&ct) != OGRERR_NONE) { DM::Logger(DM::Warning) << "error calculationg ct " << error; return false; } return ct.Within(lead_geo); }