| | 128 | case GGA_MetricMinimum: |
|---|
| | 129 | printf( "Algorithm name: \"%s\".\n", szAlgNameMinimum ); |
|---|
| | 130 | printf( "Options are " |
|---|
| | 131 | "\"radius1=%f:radius2=%f:angle=%f:min_points=%lu" |
|---|
| | 132 | ":nodata=%f\"\n", |
|---|
| | 133 | ((GDALGridDataMetricsOptions *)pOptions)->dfRadius1, |
|---|
| | 134 | ((GDALGridDataMetricsOptions *)pOptions)->dfRadius2, |
|---|
| | 135 | ((GDALGridDataMetricsOptions *)pOptions)->dfAngle, |
|---|
| | 136 | (unsigned long)((GDALGridDataMetricsOptions *)pOptions)->nMinPoints, |
|---|
| | 137 | ((GDALGridDataMetricsOptions *)pOptions)->dfNoDataValue); |
|---|
| | 138 | break; |
|---|
| | 139 | case GGA_MetricMaximum: |
|---|
| | 140 | printf( "Algorithm name: \"%s\".\n", szAlgNameMaximum ); |
|---|
| | 141 | printf( "Options are " |
|---|
| | 142 | "\"radius1=%f:radius2=%f:angle=%f:min_points=%lu" |
|---|
| | 143 | ":nodata=%f\"\n", |
|---|
| | 144 | ((GDALGridDataMetricsOptions *)pOptions)->dfRadius1, |
|---|
| | 145 | ((GDALGridDataMetricsOptions *)pOptions)->dfRadius2, |
|---|
| | 146 | ((GDALGridDataMetricsOptions *)pOptions)->dfAngle, |
|---|
| | 147 | (unsigned long)((GDALGridDataMetricsOptions *)pOptions)->nMinPoints, |
|---|
| | 148 | ((GDALGridDataMetricsOptions *)pOptions)->dfNoDataValue); |
|---|
| | 149 | break; |
|---|
| | 150 | case GGA_MetricRange: |
|---|
| | 151 | printf( "Algorithm name: \"%s\".\n", szAlgNameRange ); |
|---|
| | 152 | printf( "Options are " |
|---|
| | 153 | "\"radius1=%f:radius2=%f:angle=%f:min_points=%lu" |
|---|
| | 154 | ":nodata=%f\"\n", |
|---|
| | 155 | ((GDALGridDataMetricsOptions *)pOptions)->dfRadius1, |
|---|
| | 156 | ((GDALGridDataMetricsOptions *)pOptions)->dfRadius2, |
|---|
| | 157 | ((GDALGridDataMetricsOptions *)pOptions)->dfAngle, |
|---|
| | 158 | (unsigned long)((GDALGridDataMetricsOptions *)pOptions)->nMinPoints, |
|---|
| | 159 | ((GDALGridDataMetricsOptions *)pOptions)->dfNoDataValue); |
|---|
| | 160 | break; |
|---|
| 246 | | } |
|---|
| | 294 | |
|---|
| | 295 | case GGA_MetricMinimum: |
|---|
| | 296 | case GGA_MetricMaximum: |
|---|
| | 297 | case GGA_MetricRange: |
|---|
| | 298 | *ppOptions = |
|---|
| | 299 | CPLMalloc( sizeof(GDALGridDataMetricsOptions) ); |
|---|
| | 300 | |
|---|
| | 301 | pszValue = CSLFetchNameValue( papszParms, "radius1" ); |
|---|
| | 302 | ((GDALGridDataMetricsOptions *)*ppOptions)-> |
|---|
| | 303 | dfRadius1 = (pszValue) ? atof(pszValue) : 0.0; |
|---|
| | 304 | |
|---|
| | 305 | pszValue = CSLFetchNameValue( papszParms, "radius2" ); |
|---|
| | 306 | ((GDALGridDataMetricsOptions *)*ppOptions)-> |
|---|
| | 307 | dfRadius2 = (pszValue) ? atof(pszValue) : 0.0; |
|---|
| | 308 | |
|---|
| | 309 | pszValue = CSLFetchNameValue( papszParms, "angle" ); |
|---|
| | 310 | ((GDALGridDataMetricsOptions *)*ppOptions)-> |
|---|
| | 311 | dfAngle = (pszValue) ? atof(pszValue) : 0.0; |
|---|
| | 312 | |
|---|
| | 313 | pszValue = CSLFetchNameValue( papszParms, "min_points" ); |
|---|
| | 314 | ((GDALGridDataMetricsOptions *)*ppOptions)-> |
|---|
| | 315 | nMinPoints = (pszValue) ? atol(pszValue) : 0; |
|---|
| | 316 | |
|---|
| | 317 | pszValue = CSLFetchNameValue( papszParms, "nodata" ); |
|---|
| | 318 | ((GDALGridDataMetricsOptions *)*ppOptions)-> |
|---|
| | 319 | dfNoDataValue = (pszValue) ? atof(pszValue) : 0.0; |
|---|
| | 320 | break; |
|---|
| | 321 | |
|---|
| | 322 | } |
|---|