MCPcopy Create free account
hub / github.com/OSGeo/gdal / GetAlgorithm

Function GetAlgorithm

apps/gdaldem_lib.cpp:2969–3003  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2967} Algorithm;
2968
2969static Algorithm GetAlgorithm(const char *pszProcessing)
2970{
2971 if (EQUAL(pszProcessing, "shade") || EQUAL(pszProcessing, "hillshade"))
2972 {
2973 return HILL_SHADE;
2974 }
2975 else if (EQUAL(pszProcessing, "slope"))
2976 {
2977 return SLOPE;
2978 }
2979 else if (EQUAL(pszProcessing, "aspect"))
2980 {
2981 return ASPECT;
2982 }
2983 else if (EQUAL(pszProcessing, "color-relief"))
2984 {
2985 return COLOR_RELIEF;
2986 }
2987 else if (EQUAL(pszProcessing, "TRI"))
2988 {
2989 return TRI;
2990 }
2991 else if (EQUAL(pszProcessing, "TPI"))
2992 {
2993 return TPI;
2994 }
2995 else if (EQUAL(pszProcessing, "roughness"))
2996 {
2997 return ROUGHNESS;
2998 }
2999 else
3000 {
3001 return INVALID;
3002 }
3003}
3004
3005/************************************************************************/
3006/* GDALDEMAppOptionsGetParser() */

Callers 1

GDALDEMProcessingFunction · 0.85

Calls 1

EQUALFunction · 0.50

Tested by

no test coverage detected