Explorar el Código

libgis: add standardized option for interpolation methods
G_OPT_R_INTERP_TYPE


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56211 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa hace 12 años
padre
commit
d1b8c3bc88
Se han modificado 2 ficheros con 10 adiciones y 1 borrados
  1. 1 0
      include/gis.h
  2. 9 1
      lib/gis/parser_standard_options.c

+ 1 - 0
include/gis.h

@@ -198,6 +198,7 @@ static const char *GRASS_copyright __attribute__ ((unused))
     G_OPT_R_COVER,		/* old input cover raster map */
     G_OPT_R_ELEV,		/* old input elevation raster map */
     G_OPT_R_ELEVS,		/* old input elevation raster maps */
+    G_OPT_R_INTERP_TYPE,        /* interpolation type */
 
     G_OPT_R3_INPUT,		/* old input raster3d map */
     G_OPT_R3_INPUTS,		/* old input raster3d maps */

+ 9 - 1
lib/gis/parser_standard_options.c

@@ -54,7 +54,8 @@
    - G_OPT_R_COVER
    - G_OPT_R_ELEV
    - G_OPT_R_ELEVS
-   
+   - G_OPT_R_INTERP_TYPE
+
   - raster3d:
    - G_OPT_R3_INPUT
    - G_OPT_R3_INPUTS
@@ -302,6 +303,13 @@ struct Option *G_define_standard_option(int opt)
 	Opt->gisprompt = "old,cell,raster";
 	Opt->description = _("Name of input elevation raster map(s)");
 	break;
+    case G_OPT_R_INTERP_TYPE:
+        Opt->key = "method";
+        Opt->type = TYPE_STRING;
+        Opt->required = NO;
+        Opt->description = _("Interpolation method");
+        Opt->options = "nearest,bilinear,bicubic";
+        break;
 
 	/*g3d maps */
     case G_OPT_R3_INPUT: