PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ RASTER_reclass()

Datum RASTER_reclass ( PG_FUNCTION_ARGS  )

Definition at line 3439 of file rtpg_mapalgebra.c.

3439  {
3440  rt_pgraster *pgraster = NULL;
3441  rt_pgraster *pgrtn = NULL;
3442  rt_raster raster = NULL;
3443  rt_band band = NULL;
3444  rt_band newband = NULL;
3445  uint32_t numBands = 0;
3446 
3447  ArrayType *array;
3448  Oid etype;
3449  Datum *e;
3450  bool *nulls;
3451  int16 typlen;
3452  bool typbyval;
3453  char typalign;
3454  int n = 0;
3455 
3456  int i = 0;
3457  int j = 0;
3458  int k = 0;
3459 
3460  uint32_t a = 0;
3461  uint32_t b = 0;
3462  uint32_t c = 0;
3463 
3464  rt_reclassexpr *exprset = NULL;
3465  HeapTupleHeader tup;
3466  bool isnull;
3467  Datum tupv;
3468  uint32_t nband = 0;
3469  char *expr = NULL;
3470  text *exprtext = NULL;
3471  double val = 0;
3472  char *junk = NULL;
3473  int inc_val = 0;
3474  int exc_val = 0;
3475  char *pixeltype = NULL;
3476  text *pixeltypetext = NULL;
3477  rt_pixtype pixtype = PT_END;
3478  double nodataval = 0;
3479  bool hasnodata = FALSE;
3480 
3481  char **comma_set = NULL;
3482  uint32_t comma_n = 0;
3483  char **colon_set = NULL;
3484  uint32_t colon_n = 0;
3485  char **dash_set = NULL;
3486  uint32_t dash_n = 0;
3487 
3488  POSTGIS_RT_DEBUG(3, "RASTER_reclass: Starting");
3489 
3490  /* pgraster is null, return null */
3491  if (PG_ARGISNULL(0))
3492  PG_RETURN_NULL();
3493  pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
3494 
3495  /* raster */
3496  raster = rt_raster_deserialize(pgraster, FALSE);
3497  if (!raster) {
3498  PG_FREE_IF_COPY(pgraster, 0);
3499  elog(ERROR, "RASTER_reclass: Could not deserialize raster");
3500  PG_RETURN_NULL();
3501  }
3502  numBands = rt_raster_get_num_bands(raster);
3503  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: %d possible bands to be reclassified", numBands);
3504 
3505  /* process set of reclassarg */
3506  POSTGIS_RT_DEBUG(3, "RASTER_reclass: Processing Arg 1 (reclassargset)");
3507  array = PG_GETARG_ARRAYTYPE_P(1);
3508  etype = ARR_ELEMTYPE(array);
3509  get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign);
3510 
3511  deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
3512  &nulls, &n);
3513 
3514  if (!n) {
3515  elog(NOTICE, "Invalid argument for reclassargset. Returning original raster");
3516 
3517  pgrtn = rt_raster_serialize(raster);
3519  PG_FREE_IF_COPY(pgraster, 0);
3520  if (!pgrtn)
3521  PG_RETURN_NULL();
3522 
3523  SET_VARSIZE(pgrtn, pgrtn->size);
3524  PG_RETURN_POINTER(pgrtn);
3525  }
3526 
3527  /*
3528  process each element of reclassarg
3529  each element is the index of the band to process, the set
3530  of reclass ranges and the output band's pixeltype
3531  */
3532  for (i = 0; i < n; i++) {
3533  if (nulls[i]) continue;
3534 
3535  /* each element is a tuple */
3536  tup = (HeapTupleHeader) DatumGetPointer(e[i]);
3537  if (NULL == tup) {
3538  elog(NOTICE, "Invalid argument for reclassargset. Returning original raster");
3539 
3540  pgrtn = rt_raster_serialize(raster);
3542  PG_FREE_IF_COPY(pgraster, 0);
3543  if (!pgrtn)
3544  PG_RETURN_NULL();
3545 
3546  SET_VARSIZE(pgrtn, pgrtn->size);
3547  PG_RETURN_POINTER(pgrtn);
3548  }
3549 
3550  /* band index (1-based) */
3551  tupv = GetAttributeByName(tup, "nband", &isnull);
3552  if (isnull) {
3553  elog(NOTICE, "Invalid argument for reclassargset. Missing value of nband for reclassarg of index %d . Returning original raster", i);
3554 
3555  pgrtn = rt_raster_serialize(raster);
3557  PG_FREE_IF_COPY(pgraster, 0);
3558  if (!pgrtn)
3559  PG_RETURN_NULL();
3560 
3561  SET_VARSIZE(pgrtn, pgrtn->size);
3562  PG_RETURN_POINTER(pgrtn);
3563  }
3564  nband = DatumGetInt32(tupv);
3565  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: expression for band %d", nband);
3566 
3567  /* valid band index? */
3568  if (nband < 1 || nband > numBands) {
3569  elog(NOTICE, "Invalid argument for reclassargset. Invalid band index (must use 1-based) for reclassarg of index %d . Returning original raster", i);
3570 
3571  pgrtn = rt_raster_serialize(raster);
3573  PG_FREE_IF_COPY(pgraster, 0);
3574  if (!pgrtn)
3575  PG_RETURN_NULL();
3576 
3577  SET_VARSIZE(pgrtn, pgrtn->size);
3578  PG_RETURN_POINTER(pgrtn);
3579  }
3580 
3581  /* reclass expr */
3582  tupv = GetAttributeByName(tup, "reclassexpr", &isnull);
3583  if (isnull) {
3584  elog(NOTICE, "Invalid argument for reclassargset. Missing value of reclassexpr for reclassarg of index %d . Returning original raster", i);
3585 
3586  pgrtn = rt_raster_serialize(raster);
3588  PG_FREE_IF_COPY(pgraster, 0);
3589  if (!pgrtn)
3590  PG_RETURN_NULL();
3591 
3592  SET_VARSIZE(pgrtn, pgrtn->size);
3593  PG_RETURN_POINTER(pgrtn);
3594  }
3595  exprtext = (text *) DatumGetPointer(tupv);
3596  if (NULL == exprtext) {
3597  elog(NOTICE, "Invalid argument for reclassargset. Missing value of reclassexpr for reclassarg of index %d . Returning original raster", i);
3598 
3599  pgrtn = rt_raster_serialize(raster);
3601  PG_FREE_IF_COPY(pgraster, 0);
3602  if (!pgrtn)
3603  PG_RETURN_NULL();
3604 
3605  SET_VARSIZE(pgrtn, pgrtn->size);
3606  PG_RETURN_POINTER(pgrtn);
3607  }
3608  expr = text_to_cstring(exprtext);
3609  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: expr (raw) %s", expr);
3610  expr = rtpg_removespaces(expr);
3611  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: expr (clean) %s", expr);
3612 
3613  /* split string to its components */
3614  /* comma (,) separating rangesets */
3615  comma_set = rtpg_strsplit(expr, ",", &comma_n);
3616  if (comma_n < 1) {
3617  elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i);
3618 
3619  pgrtn = rt_raster_serialize(raster);
3621  PG_FREE_IF_COPY(pgraster, 0);
3622  if (!pgrtn)
3623  PG_RETURN_NULL();
3624 
3625  SET_VARSIZE(pgrtn, pgrtn->size);
3626  PG_RETURN_POINTER(pgrtn);
3627  }
3628 
3629  /* set of reclass expressions */
3630  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: %d possible expressions", comma_n);
3631  exprset = palloc(comma_n * sizeof(rt_reclassexpr));
3632 
3633  for (a = 0, j = 0; a < comma_n; a++) {
3634  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: map %s", comma_set[a]);
3635 
3636  /* colon (:) separating range "src" and "dst" */
3637  colon_set = rtpg_strsplit(comma_set[a], ":", &colon_n);
3638  if (colon_n != 2) {
3639  elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i);
3640  for (k = 0; k < j; k++) pfree(exprset[k]);
3641  pfree(exprset);
3642 
3643  pgrtn = rt_raster_serialize(raster);
3645  PG_FREE_IF_COPY(pgraster, 0);
3646  if (!pgrtn)
3647  PG_RETURN_NULL();
3648 
3649  SET_VARSIZE(pgrtn, pgrtn->size);
3650  PG_RETURN_POINTER(pgrtn);
3651  }
3652 
3653  /* allocate mem for reclass expression */
3654  exprset[j] = palloc(sizeof(struct rt_reclassexpr_t));
3655 
3656  for (b = 0; b < colon_n; b++) {
3657  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: range %s", colon_set[b]);
3658 
3659  /* dash (-) separating "min" and "max" */
3660  dash_set = rtpg_strsplit(colon_set[b], "-", &dash_n);
3661  if (dash_n < 1 || dash_n > 3) {
3662  elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i);
3663  for (k = 0; k < j; k++) pfree(exprset[k]);
3664  pfree(exprset);
3665 
3666  pgrtn = rt_raster_serialize(raster);
3668  PG_FREE_IF_COPY(pgraster, 0);
3669  if (!pgrtn)
3670  PG_RETURN_NULL();
3671 
3672  SET_VARSIZE(pgrtn, pgrtn->size);
3673  PG_RETURN_POINTER(pgrtn);
3674  }
3675 
3676  for (c = 0; c < dash_n; c++) {
3677  /* need to handle: (-9999-100 -> "(", "9999", "100" */
3678  if (
3679  c < 1 &&
3680  strlen(dash_set[c]) == 1 && (
3681  strchr(dash_set[c], '(') != NULL ||
3682  strchr(dash_set[c], '[') != NULL ||
3683  strchr(dash_set[c], ')') != NULL ||
3684  strchr(dash_set[c], ']') != NULL
3685  )
3686  ) {
3687  uint32_t dash_it;
3688  junk = palloc(sizeof(char) * (strlen(dash_set[c + 1]) + 2));
3689  if (NULL == junk) {
3690  for (k = 0; k <= j; k++) pfree(exprset[k]);
3691  pfree(exprset);
3693  PG_FREE_IF_COPY(pgraster, 0);
3694 
3695  elog(ERROR, "RASTER_reclass: Could not allocate memory");
3696  PG_RETURN_NULL();
3697  }
3698 
3699  sprintf(junk, "%s%s", dash_set[c], dash_set[c + 1]);
3700  c++;
3701  dash_set[c] = repalloc(dash_set[c], sizeof(char) * (strlen(junk) + 1));
3702  strcpy(dash_set[c], junk);
3703  pfree(junk);
3704 
3705  /* rebuild dash_set */
3706  for (dash_it = 1; dash_it < dash_n; dash_it++) {
3707  dash_set[dash_it - 1] = repalloc(dash_set[dash_it - 1], (strlen(dash_set[dash_it]) + 1) * sizeof(char));
3708  strcpy(dash_set[dash_it - 1], dash_set[dash_it]);
3709  }
3710  dash_n--;
3711  c--;
3712  pfree(dash_set[dash_n]);
3713  dash_set = repalloc(dash_set, sizeof(char *) * dash_n);
3714  }
3715 
3716  /* there shouldn't be more than two in dash_n */
3717  if (c < 1 && dash_n > 2) {
3718  elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i);
3719  for (k = 0; k < j; k++) pfree(exprset[k]);
3720  pfree(exprset);
3721 
3722  pgrtn = rt_raster_serialize(raster);
3724  PG_FREE_IF_COPY(pgraster, 0);
3725  if (!pgrtn)
3726  PG_RETURN_NULL();
3727 
3728  SET_VARSIZE(pgrtn, pgrtn->size);
3729  PG_RETURN_POINTER(pgrtn);
3730  }
3731 
3732  /* check interval flags */
3733  exc_val = 0;
3734  inc_val = 1;
3735  /* range */
3736  if (dash_n != 1) {
3737  /* min */
3738  if (c < 1) {
3739  if (
3740  strchr(dash_set[c], ')') != NULL ||
3741  strchr(dash_set[c], ']') != NULL
3742  ) {
3743  exc_val = 1;
3744  inc_val = 1;
3745  }
3746  else if (strchr(dash_set[c], '(') != NULL){
3747  inc_val = 0;
3748  }
3749  else {
3750  inc_val = 1;
3751  }
3752  }
3753  /* max */
3754  else {
3755  if (
3756  strrchr(dash_set[c], '(') != NULL ||
3757  strrchr(dash_set[c], '[') != NULL
3758  ) {
3759  exc_val = 1;
3760  inc_val = 0;
3761  }
3762  else if (strrchr(dash_set[c], ']') != NULL) {
3763  inc_val = 1;
3764  }
3765  else {
3766  inc_val = 0;
3767  }
3768  }
3769  }
3770  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: exc_val %d inc_val %d", exc_val, inc_val);
3771 
3772  /* remove interval flags */
3773  dash_set[c] = rtpg_chartrim(dash_set[c], "()[]");
3774  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: min/max (char) %s", dash_set[c]);
3775 
3776  /* value from string to double */
3777  errno = 0;
3778  val = strtod(dash_set[c], &junk);
3779  if (errno != 0 || dash_set[c] == junk) {
3780  elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i);
3781  for (k = 0; k < j; k++) pfree(exprset[k]);
3782  pfree(exprset);
3783 
3784  pgrtn = rt_raster_serialize(raster);
3786  PG_FREE_IF_COPY(pgraster, 0);
3787  if (!pgrtn)
3788  PG_RETURN_NULL();
3789 
3790  SET_VARSIZE(pgrtn, pgrtn->size);
3791  PG_RETURN_POINTER(pgrtn);
3792  }
3793  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: min/max (double) %f", val);
3794 
3795  /* strsplit removes dash (a.k.a. negative sign), compare now to restore */
3796  if (c < 1)
3797  junk = strstr(colon_set[b], dash_set[c]);
3798  else
3799  junk = rtpg_strrstr(colon_set[b], dash_set[c]);
3801  4,
3802  "(colon_set[%d], dash_set[%d], junk) = (%s, %s, %s)",
3803  b, c, colon_set[b], dash_set[c], junk
3804  );
3805  /* not beginning of string */
3806  if (junk != colon_set[b]) {
3807  /* prior is a dash */
3808  if (*(junk - 1) == '-') {
3809  /* prior is beginning of string or prior - 1 char is dash, negative number */
3810  if (
3811  ((junk - 1) == colon_set[b]) ||
3812  (*(junk - 2) == '-') ||
3813  (*(junk - 2) == '[') ||
3814  (*(junk - 2) == '(')
3815  ) {
3816  val *= -1.;
3817  }
3818  }
3819  }
3820  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: min/max (double) %f", val);
3821 
3822  /* src */
3823  if (b < 1) {
3824  /* singular value */
3825  if (dash_n == 1) {
3826  exprset[j]->src.exc_min = exprset[j]->src.exc_max = exc_val;
3827  exprset[j]->src.inc_min = exprset[j]->src.inc_max = inc_val;
3828  exprset[j]->src.min = exprset[j]->src.max = val;
3829  }
3830  /* min */
3831  else if (c < 1) {
3832  exprset[j]->src.exc_min = exc_val;
3833  exprset[j]->src.inc_min = inc_val;
3834  exprset[j]->src.min = val;
3835  }
3836  /* max */
3837  else {
3838  exprset[j]->src.exc_max = exc_val;
3839  exprset[j]->src.inc_max = inc_val;
3840  exprset[j]->src.max = val;
3841  }
3842  }
3843  /* dst */
3844  else {
3845  /* singular value */
3846  if (dash_n == 1)
3847  exprset[j]->dst.min = exprset[j]->dst.max = val;
3848  /* min */
3849  else if (c < 1)
3850  exprset[j]->dst.min = val;
3851  /* max */
3852  else
3853  exprset[j]->dst.max = val;
3854  }
3855  }
3856  pfree(dash_set);
3857  }
3858  pfree(colon_set);
3859 
3860  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: or: %f - %f nr: %f - %f"
3861  , exprset[j]->src.min
3862  , exprset[j]->src.max
3863  , exprset[j]->dst.min
3864  , exprset[j]->dst.max
3865  );
3866  j++;
3867  }
3868  pfree(comma_set);
3869 
3870  /* pixel type */
3871  tupv = GetAttributeByName(tup, "pixeltype", &isnull);
3872  if (isnull) {
3873  elog(NOTICE, "Invalid argument for reclassargset. Missing value of pixeltype for reclassarg of index %d . Returning original raster", i);
3874 
3875  pgrtn = rt_raster_serialize(raster);
3877  PG_FREE_IF_COPY(pgraster, 0);
3878  if (!pgrtn)
3879  PG_RETURN_NULL();
3880 
3881  SET_VARSIZE(pgrtn, pgrtn->size);
3882  PG_RETURN_POINTER(pgrtn);
3883  }
3884  pixeltypetext = (text *) DatumGetPointer(tupv);
3885  if (NULL == pixeltypetext) {
3886  elog(NOTICE, "Invalid argument for reclassargset. Missing value of pixeltype for reclassarg of index %d . Returning original raster", i);
3887 
3888  pgrtn = rt_raster_serialize(raster);
3890  PG_FREE_IF_COPY(pgraster, 0);
3891  if (!pgrtn)
3892  PG_RETURN_NULL();
3893 
3894  SET_VARSIZE(pgrtn, pgrtn->size);
3895  PG_RETURN_POINTER(pgrtn);
3896  }
3897  pixeltype = text_to_cstring(pixeltypetext);
3898  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: pixeltype %s", pixeltype);
3899  pixtype = rt_pixtype_index_from_name(pixeltype);
3900 
3901  /* nodata */
3902  tupv = GetAttributeByName(tup, "nodataval", &isnull);
3903  if (isnull) {
3904  nodataval = 0;
3905  hasnodata = FALSE;
3906  }
3907  else {
3908  nodataval = DatumGetFloat8(tupv);
3909  hasnodata = TRUE;
3910  }
3911  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: nodataval %f", nodataval);
3912  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: hasnodata %d", hasnodata);
3913 
3914  /* do reclass */
3916  if (!band) {
3917  elog(NOTICE, "Could not find raster band of index %d. Returning original raster", nband);
3918  for (k = 0; k < j; k++) pfree(exprset[k]);
3919  pfree(exprset);
3920 
3921  pgrtn = rt_raster_serialize(raster);
3923  PG_FREE_IF_COPY(pgraster, 0);
3924  if (!pgrtn)
3925  PG_RETURN_NULL();
3926 
3927  SET_VARSIZE(pgrtn, pgrtn->size);
3928  PG_RETURN_POINTER(pgrtn);
3929  }
3930  newband = rt_band_reclass(band, pixtype, hasnodata, nodataval, exprset, j);
3931  if (!newband) {
3932  for (k = 0; k < j; k++) pfree(exprset[k]);
3933  pfree(exprset);
3934 
3936  PG_FREE_IF_COPY(pgraster, 0);
3937 
3938  elog(ERROR, "RASTER_reclass: Could not reclassify raster band of index %d", nband);
3939  PG_RETURN_NULL();
3940  }
3941 
3942  /* replace old band with new band */
3943  if (rt_raster_replace_band(raster, newband, nband - 1) == NULL) {
3944  for (k = 0; k < j; k++) pfree(exprset[k]);
3945  pfree(exprset);
3946 
3947  rt_band_destroy(newband);
3949  PG_FREE_IF_COPY(pgraster, 0);
3950 
3951  elog(ERROR, "RASTER_reclass: Could not replace raster band of index %d with reclassified band", nband);
3952  PG_RETURN_NULL();
3953  }
3954 
3955  /* old band is in the variable band */
3957 
3958  /* free exprset */
3959  for (k = 0; k < j; k++) pfree(exprset[k]);
3960  pfree(exprset);
3961  }
3962 
3963  pgrtn = rt_raster_serialize(raster);
3965  PG_FREE_IF_COPY(pgraster, 0);
3966  if (!pgrtn)
3967  PG_RETURN_NULL();
3968 
3969  POSTGIS_RT_DEBUG(3, "RASTER_reclass: Finished");
3970 
3971  SET_VARSIZE(pgrtn, pgrtn->size);
3972  PG_RETURN_POINTER(pgrtn);
3973 }
#define TRUE
Definition: dbfopen.c:73
#define FALSE
Definition: dbfopen.c:72
rt_band rt_band_reclass(rt_band srcband, rt_pixtype pixtype, uint32_t hasnodata, double nodataval, rt_reclassexpr *exprset, int exprcount)
Returns new band with values reclassified.
Definition: rt_mapalgebra.c:50
rt_pixtype rt_pixtype_index_from_name(const char *pixname)
Definition: rt_pixel.c:80
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:86
rt_pixtype
Definition: librtcore.h:187
@ PT_END
Definition: librtcore.h:199
void * rt_raster_serialize(rt_raster raster)
Return this raster in serialized form.
Definition: rt_serialize.c:521
rt_band rt_raster_replace_band(rt_raster raster, rt_band band, int index)
Replace band at provided index with new band.
Definition: rt_raster.c:1526
void rt_band_destroy(rt_band band)
Destroy a raster band.
Definition: rt_band.c:340
uint16_t rt_raster_get_num_bands(rt_raster raster)
Definition: rt_raster.c:376
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.
Definition: rt_serialize.c:725
rt_band rt_raster_get_band(rt_raster raster, int bandNum)
Return Nth band, or NULL if unavailable.
Definition: rt_raster.c:385
band
Definition: ovdump.py:58
nband
Definition: pixval.py:53
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
Definition: rtrowdump.py:121
char * rtpg_removespaces(char *str)
char * rtpg_chartrim(const char *input, char *remove)
char * rtpg_strrstr(const char *s1, const char *s2)
char ** rtpg_strsplit(const char *str, const char *delimiter, uint32_t *n)
#define POSTGIS_RT_DEBUG(level, msg)
Definition: rtpostgis.h:65
#define POSTGIS_RT_DEBUGF(level, msg,...)
Definition: rtpostgis.h:69
Struct definitions.
Definition: librtcore.h:2403
struct rt_reclassexpr_t::rt_reclassrange src
struct rt_reclassexpr_t::rt_reclassrange dst

References ovdump::band, rt_reclassexpr_t::dst, rt_reclassexpr_t::rt_reclassrange::exc_max, rt_reclassexpr_t::rt_reclassrange::exc_min, FALSE, rt_reclassexpr_t::rt_reclassrange::inc_max, rt_reclassexpr_t::rt_reclassrange::inc_min, rt_reclassexpr_t::rt_reclassrange::max, rt_reclassexpr_t::rt_reclassrange::min, pixval::nband, POSTGIS_RT_DEBUG, POSTGIS_RT_DEBUGF, PT_END, rtrowdump::raster, rt_band_destroy(), rt_band_reclass(), rt_pixtype_index_from_name(), rt_raster_deserialize(), rt_raster_destroy(), rt_raster_get_band(), rt_raster_get_num_bands(), rt_raster_replace_band(), rt_raster_serialize(), rtpg_chartrim(), rtpg_removespaces(), rtpg_strrstr(), rtpg_strsplit(), rt_raster_serialized_t::size, rt_reclassexpr_t::src, and TRUE.

Here is the call graph for this function: