| 25 | /************************************************************************/ |
| 26 | |
| 27 | GDALVectorGridInvdistAlgorithm::GDALVectorGridInvdistAlgorithm( |
| 28 | bool standaloneStep) |
| 29 | : GDALVectorGridAbstractAlgorithm(NAME, DESCRIPTION, HELP_URL, |
| 30 | standaloneStep) |
| 31 | { |
| 32 | AddArg("power", 0, _("Weighting power"), &m_power).SetDefault(m_power); |
| 33 | AddArg("smoothing", 0, _("Smoothing parameter"), &m_smoothing) |
| 34 | .SetDefault(m_smoothing); |
| 35 | |
| 36 | AddRadiusArg(); |
| 37 | AddRadius1AndRadius2Arg(); |
| 38 | AddAngleArg(); |
| 39 | AddMinPointsArg(); |
| 40 | AddMaxPointsArg(); |
| 41 | AddMinMaxPointsPerQuadrantArg(); |
| 42 | AddNodataArg(); |
| 43 | |
| 44 | AddValidationAction( |
| 45 | [this]() |
| 46 | { |
| 47 | bool ret = true; |
| 48 | |
| 49 | if (m_minPoints > 0 && m_radius == 0 && m_radius1 == 0) |
| 50 | { |
| 51 | ReportError(CE_Failure, CPLE_AppDefined, |
| 52 | "'radius' or 'radius1' and 'radius2' should be " |
| 53 | "defined when 'min-points' is."); |
| 54 | ret = false; |
| 55 | } |
| 56 | |
| 57 | if (m_maxPoints < std::numeric_limits<int>::max() && |
| 58 | m_radius == 0 && m_radius1 == 0) |
| 59 | { |
| 60 | ReportError(CE_Failure, CPLE_AppDefined, |
| 61 | "'radius' or 'radius1' and 'radius2' should be " |
| 62 | "defined when 'max-points' is."); |
| 63 | ret = false; |
| 64 | } |
| 65 | return ret; |
| 66 | }); |
| 67 | } |
| 68 | |
| 69 | /************************************************************************/ |
| 70 | /* GDALVectorGridInvdistAlgorithm::RunImpl() */ |
nothing calls this directly
no test coverage detected