PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ RASTER_reclass()

Datum RASTER_reclass ( PG_FUNCTION_ARGS  )

Definition at line 3485 of file rtpg_mapalgebra.c.

3485  {
3486  rt_pgraster *pgraster = NULL;
3487  rt_pgraster *pgrtn = NULL;
3488  rt_raster raster = NULL;
3489  rt_band band = NULL;
3490  rt_band newband = NULL;
3491  uint32_t numBands = 0;
3492 
3493  ArrayType *array;
3494  Oid etype;
3495  Datum *e;
3496  bool *nulls;
3497  int16 typlen;
3498  bool typbyval;
3499  char typalign;
3500  int n = 0;
3501 
3502  int i = 0;
3503  int j = 0;
3504  int k = 0;
3505 
3506  uint32_t a = 0;
3507  uint32_t b = 0;
3508  uint32_t c = 0;
3509 
3510  rt_reclassexpr *exprset = NULL;
3511  HeapTupleHeader tup;
3512  bool isnull;
3513  Datum tupv;
3514  uint32_t nband = 0;
3515  char *expr = NULL;
3516  text *exprtext = NULL;
3517  double val = 0;
3518  char *junk = NULL;
3519  int inc_val = 0;
3520  int exc_val = 0;
3521  char *pixeltype = NULL;
3522  text *pixeltypetext = NULL;
3523  rt_pixtype pixtype = PT_END;
3524  double nodataval = 0;
3525  bool hasnodata = FALSE;
3526 
3527  char **comma_set = NULL;
3528  uint32_t comma_n = 0;
3529  char **colon_set = NULL;
3530  uint32_t colon_n = 0;
3531  char **dash_set = NULL;
3532  uint32_t dash_n = 0;
3533 
3534  POSTGIS_RT_DEBUG(3, "RASTER_reclass: Starting");
3535 
3536  /* pgraster is null, return null */
3537  if (PG_ARGISNULL(0))
3538  PG_RETURN_NULL();
3539  pgraster = (rt_pgraster *) PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
3540 
3541  /* raster */
3542  raster = rt_raster_deserialize(pgraster, FALSE);
3543  if (!raster) {
3544  PG_FREE_IF_COPY(pgraster, 0);
3545  elog(ERROR, "RASTER_reclass: Could not deserialize raster");
3546  PG_RETURN_NULL();
3547  }
3548  numBands = rt_raster_get_num_bands(raster);
3549  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: %d possible bands to be reclassified", numBands);
3550 
3551  /* process set of reclassarg */
3552  POSTGIS_RT_DEBUG(3, "RASTER_reclass: Processing Arg 1 (reclassargset)");
3553  array = PG_GETARG_ARRAYTYPE_P(1);
3554  etype = ARR_ELEMTYPE(array);
3555  get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign);
3556 
3557  deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
3558  &nulls, &n);
3559 
3560  if (!n) {
3561  elog(NOTICE, "Invalid argument for reclassargset. Returning original raster");
3562 
3563  pgrtn = rt_raster_serialize(raster);
3565  PG_FREE_IF_COPY(pgraster, 0);
3566  if (!pgrtn)
3567  PG_RETURN_NULL();
3568 
3569  SET_VARSIZE(pgrtn, pgrtn->size);
3570  PG_RETURN_POINTER(pgrtn);
3571  }
3572 
3573  /*
3574  process each element of reclassarg
3575  each element is the index of the band to process, the set
3576  of reclass ranges and the output band's pixeltype
3577  */
3578  for (i = 0; i < n; i++) {
3579  if (nulls[i]) continue;
3580 
3581  /* each element is a tuple */
3582  tup = (HeapTupleHeader) DatumGetPointer(e[i]);
3583  if (NULL == tup) {
3584  elog(NOTICE, "Invalid argument for reclassargset. Returning original raster");
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 
3596  /* band index (1-based) */
3597  tupv = GetAttributeByName(tup, "nband", &isnull);
3598  if (isnull) {
3599  elog(NOTICE, "Invalid argument for reclassargset. Missing value of nband for reclassarg of index %d . Returning original raster", i);
3600 
3601  pgrtn = rt_raster_serialize(raster);
3603  PG_FREE_IF_COPY(pgraster, 0);
3604  if (!pgrtn)
3605  PG_RETURN_NULL();
3606 
3607  SET_VARSIZE(pgrtn, pgrtn->size);
3608  PG_RETURN_POINTER(pgrtn);
3609  }
3610  nband = DatumGetInt32(tupv);
3611  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: expression for band %d", nband);
3612 
3613  /* valid band index? */
3614  if (nband < 1 || nband > numBands) {
3615  elog(NOTICE, "Invalid argument for reclassargset. Invalid band index (must use 1-based) for reclassarg of index %d . Returning original raster", i);
3616 
3617  pgrtn = rt_raster_serialize(raster);
3619  PG_FREE_IF_COPY(pgraster, 0);
3620  if (!pgrtn)
3621  PG_RETURN_NULL();
3622 
3623  SET_VARSIZE(pgrtn, pgrtn->size);
3624  PG_RETURN_POINTER(pgrtn);
3625  }
3626 
3627  /* reclass expr */
3628  tupv = GetAttributeByName(tup, "reclassexpr", &isnull);
3629  if (isnull) {
3630  elog(NOTICE, "Invalid argument for reclassargset. Missing value of reclassexpr for reclassarg of index %d . Returning original raster", i);
3631 
3632  pgrtn = rt_raster_serialize(raster);
3634  PG_FREE_IF_COPY(pgraster, 0);
3635  if (!pgrtn)
3636  PG_RETURN_NULL();
3637 
3638  SET_VARSIZE(pgrtn, pgrtn->size);
3639  PG_RETURN_POINTER(pgrtn);
3640  }
3641  exprtext = (text *) DatumGetPointer(tupv);
3642  if (NULL == exprtext) {
3643  elog(NOTICE, "Invalid argument for reclassargset. Missing value of reclassexpr for reclassarg of index %d . Returning original raster", i);
3644 
3645  pgrtn = rt_raster_serialize(raster);
3647  PG_FREE_IF_COPY(pgraster, 0);
3648  if (!pgrtn)
3649  PG_RETURN_NULL();
3650 
3651  SET_VARSIZE(pgrtn, pgrtn->size);
3652  PG_RETURN_POINTER(pgrtn);
3653  }
3654  expr = text_to_cstring(exprtext);
3655  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: expr (raw) %s", expr);
3656  expr = rtpg_removespaces(expr);
3657  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: expr (clean) %s", expr);
3658 
3659  /* split string to its components */
3660  /* comma (,) separating rangesets */
3661  comma_set = rtpg_strsplit(expr, ",", &comma_n);
3662  if (comma_n < 1) {
3663  elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i);
3664 
3665  pgrtn = rt_raster_serialize(raster);
3667  PG_FREE_IF_COPY(pgraster, 0);
3668  if (!pgrtn)
3669  PG_RETURN_NULL();
3670 
3671  SET_VARSIZE(pgrtn, pgrtn->size);
3672  PG_RETURN_POINTER(pgrtn);
3673  }
3674 
3675  /* set of reclass expressions */
3676  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: %d possible expressions", comma_n);
3677  exprset = palloc(comma_n * sizeof(rt_reclassexpr));
3678 
3679  for (a = 0, j = 0; a < comma_n; a++) {
3680  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: map %s", comma_set[a]);
3681 
3682  /* colon (:) separating range "src" and "dst" */
3683  colon_set = rtpg_strsplit(comma_set[a], ":", &colon_n);
3684  if (colon_n != 2) {
3685  elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i);
3686  for (k = 0; k < j; k++) pfree(exprset[k]);
3687  pfree(exprset);
3688 
3689  pgrtn = rt_raster_serialize(raster);
3691  PG_FREE_IF_COPY(pgraster, 0);
3692  if (!pgrtn)
3693  PG_RETURN_NULL();
3694 
3695  SET_VARSIZE(pgrtn, pgrtn->size);
3696  PG_RETURN_POINTER(pgrtn);
3697  }
3698 
3699  /* allocate mem for reclass expression */
3700  exprset[j] = palloc(sizeof(struct rt_reclassexpr_t));
3701 
3702  for (b = 0; b < colon_n; b++) {
3703  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: range %s", colon_set[b]);
3704 
3705  /* dash (-) separating "min" and "max" */
3706  dash_set = rtpg_strsplit(colon_set[b], "-", &dash_n);
3707  if (dash_n < 1 || dash_n > 3) {
3708  elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i);
3709  for (k = 0; k < j; k++) pfree(exprset[k]);
3710  pfree(exprset);
3711 
3712  pgrtn = rt_raster_serialize(raster);
3714  PG_FREE_IF_COPY(pgraster, 0);
3715  if (!pgrtn)
3716  PG_RETURN_NULL();
3717 
3718  SET_VARSIZE(pgrtn, pgrtn->size);
3719  PG_RETURN_POINTER(pgrtn);
3720  }
3721 
3722  for (c = 0; c < dash_n; c++) {
3723  /* need to handle: (-9999-100 -> "(", "9999", "100" */
3724  if (
3725  c < 1 &&
3726  strlen(dash_set[c]) == 1 && (
3727  strchr(dash_set[c], '(') != NULL ||
3728  strchr(dash_set[c], '[') != NULL ||
3729  strchr(dash_set[c], ')') != NULL ||
3730  strchr(dash_set[c], ']') != NULL
3731  )
3732  ) {
3733  uint32_t dash_it;
3734  junk = palloc(sizeof(char) * (strlen(dash_set[c + 1]) + 2));
3735  if (NULL == junk) {
3736  for (k = 0; k <= j; k++) pfree(exprset[k]);
3737  pfree(exprset);
3739  PG_FREE_IF_COPY(pgraster, 0);
3740 
3741  elog(ERROR, "RASTER_reclass: Could not allocate memory");
3742  PG_RETURN_NULL();
3743  }
3744 
3745  sprintf(junk, "%s%s", dash_set[c], dash_set[c + 1]);
3746  c++;
3747  dash_set[c] = repalloc(dash_set[c], sizeof(char) * (strlen(junk) + 1));
3748  strcpy(dash_set[c], junk);
3749  pfree(junk);
3750 
3751  /* rebuild dash_set */
3752  for (dash_it = 1; dash_it < dash_n; dash_it++) {
3753  dash_set[dash_it - 1] = repalloc(dash_set[dash_it - 1], (strlen(dash_set[dash_it]) + 1) * sizeof(char));
3754  strcpy(dash_set[dash_it - 1], dash_set[dash_it]);
3755  }
3756  dash_n--;
3757  c--;
3758  pfree(dash_set[dash_n]);
3759  dash_set = repalloc(dash_set, sizeof(char *) * dash_n);
3760  }
3761 
3762  /* there shouldn't be more than two in dash_n */
3763  if (c < 1 && dash_n > 2) {
3764  elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i);
3765  for (k = 0; k < j; k++) pfree(exprset[k]);
3766  pfree(exprset);
3767 
3768  pgrtn = rt_raster_serialize(raster);
3770  PG_FREE_IF_COPY(pgraster, 0);
3771  if (!pgrtn)
3772  PG_RETURN_NULL();
3773 
3774  SET_VARSIZE(pgrtn, pgrtn->size);
3775  PG_RETURN_POINTER(pgrtn);
3776  }
3777 
3778  /* check interval flags */
3779  exc_val = 0;
3780  inc_val = 1;
3781  /* range */
3782  if (dash_n != 1) {
3783  /* min */
3784  if (c < 1) {
3785  if (
3786  strchr(dash_set[c], ')') != NULL ||
3787  strchr(dash_set[c], ']') != NULL
3788  ) {
3789  exc_val = 1;
3790  inc_val = 1;
3791  }
3792  else if (strchr(dash_set[c], '(') != NULL){
3793  inc_val = 0;
3794  }
3795  else {
3796  inc_val = 1;
3797  }
3798  }
3799  /* max */
3800  else {
3801  if (
3802  strrchr(dash_set[c], '(') != NULL ||
3803  strrchr(dash_set[c], '[') != NULL
3804  ) {
3805  exc_val = 1;
3806  inc_val = 0;
3807  }
3808  else if (strrchr(dash_set[c], ']') != NULL) {
3809  inc_val = 1;
3810  }
3811  else {
3812  inc_val = 0;
3813  }
3814  }
3815  }
3816  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: exc_val %d inc_val %d", exc_val, inc_val);
3817 
3818  /* remove interval flags */
3819  dash_set[c] = rtpg_chartrim(dash_set[c], "()[]");
3820  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: min/max (char) %s", dash_set[c]);
3821 
3822  /* value from string to double */
3823  errno = 0;
3824  val = strtod(dash_set[c], &junk);
3825  if (errno != 0 || dash_set[c] == junk) {
3826  elog(NOTICE, "Invalid argument for reclassargset. Invalid expression of reclassexpr for reclassarg of index %d . Returning original raster", i);
3827  for (k = 0; k < j; k++) pfree(exprset[k]);
3828  pfree(exprset);
3829 
3830  pgrtn = rt_raster_serialize(raster);
3832  PG_FREE_IF_COPY(pgraster, 0);
3833  if (!pgrtn)
3834  PG_RETURN_NULL();
3835 
3836  SET_VARSIZE(pgrtn, pgrtn->size);
3837  PG_RETURN_POINTER(pgrtn);
3838  }
3839  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: min/max (double) %f", val);
3840 
3841  /* strsplit removes dash (a.k.a. negative sign), compare now to restore */
3842  if (c < 1)
3843  junk = strstr(colon_set[b], dash_set[c]);
3844  else
3845  junk = rtpg_strrstr(colon_set[b], dash_set[c]);
3847  4,
3848  "(colon_set[%d], dash_set[%d], junk) = (%s, %s, %s)",
3849  b, c, colon_set[b], dash_set[c], junk
3850  );
3851  /* not beginning of string */
3852  if (junk != colon_set[b]) {
3853  /* prior is a dash */
3854  if (*(junk - 1) == '-') {
3855  /* prior is beginning of string or prior - 1 char is dash, negative number */
3856  if (
3857  ((junk - 1) == colon_set[b]) ||
3858  (*(junk - 2) == '-') ||
3859  (*(junk - 2) == '[') ||
3860  (*(junk - 2) == '(')
3861  ) {
3862  val *= -1.;
3863  }
3864  }
3865  }
3866  POSTGIS_RT_DEBUGF(4, "RASTER_reclass: min/max (double) %f", val);
3867 
3868  /* src */
3869  if (b < 1) {
3870  /* singular value */
3871  if (dash_n == 1) {
3872  exprset[j]->src.exc_min = exprset[j]->src.exc_max = exc_val;
3873  exprset[j]->src.inc_min = exprset[j]->src.inc_max = inc_val;
3874  exprset[j]->src.min = exprset[j]->src.max = val;
3875  }
3876  /* min */
3877  else if (c < 1) {
3878  exprset[j]->src.exc_min = exc_val;
3879  exprset[j]->src.inc_min = inc_val;
3880  exprset[j]->src.min = val;
3881  }
3882  /* max */
3883  else {
3884  exprset[j]->src.exc_max = exc_val;
3885  exprset[j]->src.inc_max = inc_val;
3886  exprset[j]->src.max = val;
3887  }
3888  }
3889  /* dst */
3890  else {
3891  /* singular value */
3892  if (dash_n == 1)
3893  exprset[j]->dst.min = exprset[j]->dst.max = val;
3894  /* min */
3895  else if (c < 1)
3896  exprset[j]->dst.min = val;
3897  /* max */
3898  else
3899  exprset[j]->dst.max = val;
3900  }
3901  }
3902  pfree(dash_set);
3903  }
3904  pfree(colon_set);
3905 
3906  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: or: %f - %f nr: %f - %f"
3907  , exprset[j]->src.min
3908  , exprset[j]->src.max
3909  , exprset[j]->dst.min
3910  , exprset[j]->dst.max
3911  );
3912  j++;
3913  }
3914  pfree(comma_set);
3915 
3916  /* pixel type */
3917  tupv = GetAttributeByName(tup, "pixeltype", &isnull);
3918  if (isnull) {
3919  elog(NOTICE, "Invalid argument for reclassargset. Missing value of pixeltype for reclassarg of index %d . Returning original raster", i);
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  pixeltypetext = (text *) DatumGetPointer(tupv);
3931  if (NULL == pixeltypetext) {
3932  elog(NOTICE, "Invalid argument for reclassargset. Missing value of pixeltype for reclassarg of index %d . Returning original raster", i);
3933 
3934  pgrtn = rt_raster_serialize(raster);
3936  PG_FREE_IF_COPY(pgraster, 0);
3937  if (!pgrtn)
3938  PG_RETURN_NULL();
3939 
3940  SET_VARSIZE(pgrtn, pgrtn->size);
3941  PG_RETURN_POINTER(pgrtn);
3942  }
3943  pixeltype = text_to_cstring(pixeltypetext);
3944  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: pixeltype %s", pixeltype);
3945  pixtype = rt_pixtype_index_from_name(pixeltype);
3946 
3947  /* nodata */
3948  tupv = GetAttributeByName(tup, "nodataval", &isnull);
3949  if (isnull) {
3950  nodataval = 0;
3951  hasnodata = FALSE;
3952  }
3953  else {
3954  nodataval = DatumGetFloat8(tupv);
3955  hasnodata = TRUE;
3956  }
3957  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: nodataval %f", nodataval);
3958  POSTGIS_RT_DEBUGF(3, "RASTER_reclass: hasnodata %d", hasnodata);
3959 
3960  /* do reclass */
3962  if (!band) {
3963  elog(NOTICE, "Could not find raster band of index %d. Returning original raster", nband);
3964  for (k = 0; k < j; k++) pfree(exprset[k]);
3965  pfree(exprset);
3966 
3967  pgrtn = rt_raster_serialize(raster);
3969  PG_FREE_IF_COPY(pgraster, 0);
3970  if (!pgrtn)
3971  PG_RETURN_NULL();
3972 
3973  SET_VARSIZE(pgrtn, pgrtn->size);
3974  PG_RETURN_POINTER(pgrtn);
3975  }
3976  newband = rt_band_reclass(band, pixtype, hasnodata, nodataval, exprset, j);
3977  if (!newband) {
3978  for (k = 0; k < j; k++) pfree(exprset[k]);
3979  pfree(exprset);
3980 
3982  PG_FREE_IF_COPY(pgraster, 0);
3983 
3984  elog(ERROR, "RASTER_reclass: Could not reclassify raster band of index %d", nband);
3985  PG_RETURN_NULL();
3986  }
3987 
3988  /* replace old band with new band */
3989  if (rt_raster_replace_band(raster, newband, nband - 1) == NULL) {
3990  for (k = 0; k < j; k++) pfree(exprset[k]);
3991  pfree(exprset);
3992 
3993  rt_band_destroy(newband);
3995  PG_FREE_IF_COPY(pgraster, 0);
3996 
3997  elog(ERROR, "RASTER_reclass: Could not replace raster band of index %d with reclassified band", nband);
3998  PG_RETURN_NULL();
3999  }
4000 
4001  /* old band is in the variable band */
4003 
4004  /* free exprset */
4005  for (k = 0; k < j; k++) pfree(exprset[k]);
4006  pfree(exprset);
4007  }
4008 
4009  pgrtn = rt_raster_serialize(raster);
4011  PG_FREE_IF_COPY(pgraster, 0);
4012  if (!pgrtn)
4013  PG_RETURN_NULL();
4014 
4015  POSTGIS_RT_DEBUG(3, "RASTER_reclass: Finished");
4016 
4017  SET_VARSIZE(pgrtn, pgrtn->size);
4018  PG_RETURN_POINTER(pgrtn);
4019 }
#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:69
#define POSTGIS_RT_DEBUGF(level, msg,...)
Definition: rtpostgis.h:73
Struct definitions.
Definition: librtcore.h:2396
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: