PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ RASTER_reclass()

Datum RASTER_reclass ( PG_FUNCTION_ARGS  )

Definition at line 3501 of file rtpg_mapalgebra.c.

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

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, text_to_cstring(), and TRUE.

Here is the call graph for this function: