PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ RASTER_reclass()

Datum RASTER_reclass ( PG_FUNCTION_ARGS  )

Definition at line 3506 of file rtpg_mapalgebra.c.

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