PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ RASTER_asRaster()

Datum RASTER_asRaster ( PG_FUNCTION_ARGS  )

Definition at line 726 of file rtpg_geometry.c.

727 {
728  GSERIALIZED *gser = NULL;
729 
730  LWGEOM *geom = NULL;
731  rt_raster rast = NULL;
732  rt_pgraster *pgrast = NULL;
733 
734  unsigned char *wkb;
735  size_t wkb_len = 0;
736  unsigned char variant = WKB_SFSQL;
737 
738  double scale[2] = {0};
739  double *scale_x = NULL;
740  double *scale_y = NULL;
741 
742  int dim[2] = {0};
743  int *dim_x = NULL;
744  int *dim_y = NULL;
745 
746  ArrayType *array;
747  Oid etype;
748  Datum *e;
749  bool *nulls;
750  int16 typlen;
751  bool typbyval;
752  char typalign;
753  int n = 0;
754  int i = 0;
755  int j = 0;
756  int haserr = 0;
757 
758  text *pixeltypetext = NULL;
759  char *pixeltype = NULL;
760  rt_pixtype pixtype = PT_END;
761  rt_pixtype *pixtypes = NULL;
762  uint32_t pixtypes_len = 0;
763 
764  double *values = NULL;
765  uint32_t values_len = 0;
766 
767  uint8_t *hasnodatas = NULL;
768  double *nodatavals = NULL;
769  uint32_t nodatavals_len = 0;
770 
771  double ulw[2] = {0};
772  double *ul_xw = NULL;
773  double *ul_yw = NULL;
774 
775  double gridw[2] = {0};
776  double *grid_xw = NULL;
777  double *grid_yw = NULL;
778 
779  double skew[2] = {0};
780  double *skew_x = NULL;
781  double *skew_y = NULL;
782 
783  char **options = NULL;
784  int options_len = 0;
785 
786  uint32_t num_bands = 0;
787 
788  int srid = SRID_UNKNOWN;
789  char *srs = NULL;
790 
791  POSTGIS_RT_DEBUG(3, "RASTER_asRaster: Starting");
792 
793  /* based upon LWGEOM_asBinary function in postgis/lwgeom_ogc.c */
794 
795  /* Get the geometry */
796  if (PG_ARGISNULL(0))
797  PG_RETURN_NULL();
798 
799  gser = PG_GETARG_GSERIALIZED_P(0);
800  geom = lwgeom_from_gserialized(gser);
801 
802  /* Get a 2D version of the geometry if necessary */
803  if (lwgeom_ndims(geom) > 2) {
804  LWGEOM *geom2d = lwgeom_force_2d(geom);
805  lwgeom_free(geom);
806  geom = geom2d;
807  }
808 
809  /* empty geometry, return empty raster */
810  if (lwgeom_is_empty(geom)) {
811  POSTGIS_RT_DEBUG(3, "Input geometry is empty. Returning empty raster");
812  lwgeom_free(geom);
813  PG_FREE_IF_COPY(gser, 0);
814 
815  rast = rt_raster_new(0, 0);
816  if (rast == NULL)
817  PG_RETURN_NULL();
818 
819  pgrast = rt_raster_serialize(rast);
821 
822  if (NULL == pgrast)
823  PG_RETURN_NULL();
824 
825  SET_VARSIZE(pgrast, pgrast->size);
826  PG_RETURN_POINTER(pgrast);
827  }
828 
829  /* scale x */
830  if (!PG_ARGISNULL(1)) {
831  scale[0] = PG_GETARG_FLOAT8(1);
832  if (FLT_NEQ(scale[0], 0)) scale_x = &scale[0];
833  }
834 
835  /* scale y */
836  if (!PG_ARGISNULL(2)) {
837  scale[1] = PG_GETARG_FLOAT8(2);
838  if (FLT_NEQ(scale[1], 0)) scale_y = &scale[1];
839  }
840  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: scale (x, y) = %f, %f", scale[0], scale[1]);
841 
842  /* width */
843  if (!PG_ARGISNULL(3)) {
844  dim[0] = PG_GETARG_INT32(3);
845  if (dim[0] < 0) dim[0] = 0;
846  if (dim[0] != 0) dim_x = &dim[0];
847  }
848 
849  /* height */
850  if (!PG_ARGISNULL(4)) {
851  dim[1] = PG_GETARG_INT32(4);
852  if (dim[1] < 0) dim[1] = 0;
853  if (dim[1] != 0) dim_y = &dim[1];
854  }
855  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: dim (x, y) = %d, %d", dim[0], dim[1]);
856 
857  /* pixeltype */
858  if (!PG_ARGISNULL(5)) {
859  array = PG_GETARG_ARRAYTYPE_P(5);
860  etype = ARR_ELEMTYPE(array);
861  get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign);
862 
863  switch (etype) {
864  case TEXTOID:
865  break;
866  default:
867 
868  lwgeom_free(geom);
869  PG_FREE_IF_COPY(gser, 0);
870 
871  elog(ERROR, "RASTER_asRaster: Invalid data type for pixeltype");
872  PG_RETURN_NULL();
873  break;
874  }
875 
876  deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
877  &nulls, &n);
878 
879  if (n) {
880  pixtypes = (rt_pixtype *) palloc(sizeof(rt_pixtype) * n);
881  /* clean each pixeltype */
882  for (i = 0, j = 0; i < n; i++) {
883  if (nulls[i]) {
884  pixtypes[j++] = PT_64BF;
885  continue;
886  }
887 
888  pixeltype = NULL;
889  switch (etype) {
890  case TEXTOID:
891  pixeltypetext = (text *) DatumGetPointer(e[i]);
892  if (NULL == pixeltypetext) break;
893  pixeltype = text_to_cstring(pixeltypetext);
894 
895  /* trim string */
896  pixeltype = rtpg_trim(pixeltype);
897  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: pixeltype is '%s'", pixeltype);
898  break;
899  }
900 
901  if (strlen(pixeltype)) {
902  pixtype = rt_pixtype_index_from_name(pixeltype);
903  if (pixtype == PT_END) {
904 
905  pfree(pixtypes);
906 
907  lwgeom_free(geom);
908  PG_FREE_IF_COPY(gser, 0);
909 
910  elog(ERROR, "RASTER_asRaster: Invalid pixel type provided: %s", pixeltype);
911  PG_RETURN_NULL();
912  }
913 
914  pixtypes[j] = pixtype;
915  j++;
916  }
917  }
918 
919  if (j > 0) {
920  /* trim allocation */
921  pixtypes = repalloc(pixtypes, j * sizeof(rt_pixtype));
922  pixtypes_len = j;
923  }
924  else {
925  pfree(pixtypes);
926  pixtypes = NULL;
927  pixtypes_len = 0;
928  }
929  }
930  }
931 #if POSTGIS_DEBUG_LEVEL > 0
932  for (i = 0; i < pixtypes_len; i++)
933  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: pixtypes[%d] = %d", i, (int) pixtypes[i]);
934 #endif
935 
936  /* value */
937  if (!PG_ARGISNULL(6)) {
938  array = PG_GETARG_ARRAYTYPE_P(6);
939  etype = ARR_ELEMTYPE(array);
940  get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign);
941 
942  switch (etype) {
943  case FLOAT4OID:
944  case FLOAT8OID:
945  break;
946  default:
947 
948  if (pixtypes_len) pfree(pixtypes);
949 
950  lwgeom_free(geom);
951  PG_FREE_IF_COPY(gser, 0);
952 
953  elog(ERROR, "RASTER_asRaster: Invalid data type for value");
954  PG_RETURN_NULL();
955  break;
956  }
957 
958  deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
959  &nulls, &n);
960 
961  if (n) {
962  values = (double *) palloc(sizeof(double) * n);
963  for (i = 0, j = 0; i < n; i++) {
964  if (nulls[i]) {
965  values[j++] = 1;
966  continue;
967  }
968 
969  switch (etype) {
970  case FLOAT4OID:
971  values[j] = (double) DatumGetFloat4(e[i]);
972  break;
973  case FLOAT8OID:
974  values[j] = (double) DatumGetFloat8(e[i]);
975  break;
976  }
977  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: values[%d] = %f", j, values[j]);
978 
979  j++;
980  }
981 
982  if (j > 0) {
983  /* trim allocation */
984  values = repalloc(values, j * sizeof(double));
985  values_len = j;
986  }
987  else {
988  pfree(values);
989  values = NULL;
990  values_len = 0;
991  }
992  }
993  }
994 #if POSTGIS_DEBUG_LEVEL > 0
995  for (i = 0; i < values_len; i++)
996  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: values[%d] = %f", i, values[i]);
997 #endif
998 
999  /* nodataval */
1000  if (!PG_ARGISNULL(7)) {
1001  array = PG_GETARG_ARRAYTYPE_P(7);
1002  etype = ARR_ELEMTYPE(array);
1003  get_typlenbyvalalign(etype, &typlen, &typbyval, &typalign);
1004 
1005  switch (etype) {
1006  case FLOAT4OID:
1007  case FLOAT8OID:
1008  break;
1009  default:
1010 
1011  if (pixtypes_len) pfree(pixtypes);
1012  if (values_len) pfree(values);
1013 
1014  lwgeom_free(geom);
1015  PG_FREE_IF_COPY(gser, 0);
1016 
1017  elog(ERROR, "RASTER_asRaster: Invalid data type for nodataval");
1018  PG_RETURN_NULL();
1019  break;
1020  }
1021 
1022  deconstruct_array(array, etype, typlen, typbyval, typalign, &e,
1023  &nulls, &n);
1024 
1025  if (n) {
1026  nodatavals = (double *) palloc(sizeof(double) * n);
1027  hasnodatas = (uint8_t *) palloc(sizeof(uint8_t) * n);
1028  for (i = 0, j = 0; i < n; i++) {
1029  if (nulls[i]) {
1030  hasnodatas[j] = 0;
1031  nodatavals[j] = 0;
1032  j++;
1033  continue;
1034  }
1035 
1036  hasnodatas[j] = 1;
1037  switch (etype) {
1038  case FLOAT4OID:
1039  nodatavals[j] = (double) DatumGetFloat4(e[i]);
1040  break;
1041  case FLOAT8OID:
1042  nodatavals[j] = (double) DatumGetFloat8(e[i]);
1043  break;
1044  }
1045  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: hasnodatas[%d] = %d", j, hasnodatas[j]);
1046  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: nodatavals[%d] = %f", j, nodatavals[j]);
1047 
1048  j++;
1049  }
1050 
1051  if (j > 0) {
1052  /* trim allocation */
1053  nodatavals = repalloc(nodatavals, j * sizeof(double));
1054  hasnodatas = repalloc(hasnodatas, j * sizeof(uint8_t));
1055  nodatavals_len = j;
1056  }
1057  else {
1058  pfree(nodatavals);
1059  pfree(hasnodatas);
1060  nodatavals = NULL;
1061  hasnodatas = NULL;
1062  nodatavals_len = 0;
1063  }
1064  }
1065  }
1066 #if POSTGIS_DEBUG_LEVEL > 0
1067  for (i = 0; i < nodatavals_len; i++) {
1068  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: hasnodatas[%d] = %d", i, hasnodatas[i]);
1069  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: nodatavals[%d] = %f", i, nodatavals[i]);
1070  }
1071 #endif
1072 
1073  /* upperleftx */
1074  if (!PG_ARGISNULL(8)) {
1075  ulw[0] = PG_GETARG_FLOAT8(8);
1076  ul_xw = &ulw[0];
1077  }
1078 
1079  /* upperlefty */
1080  if (!PG_ARGISNULL(9)) {
1081  ulw[1] = PG_GETARG_FLOAT8(9);
1082  ul_yw = &ulw[1];
1083  }
1084  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: upperleft (x, y) = %f, %f", ulw[0], ulw[1]);
1085 
1086  /* gridx */
1087  if (!PG_ARGISNULL(10)) {
1088  gridw[0] = PG_GETARG_FLOAT8(10);
1089  grid_xw = &gridw[0];
1090  }
1091 
1092  /* gridy */
1093  if (!PG_ARGISNULL(11)) {
1094  gridw[1] = PG_GETARG_FLOAT8(11);
1095  grid_yw = &gridw[1];
1096  }
1097  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: grid (x, y) = %f, %f", gridw[0], gridw[1]);
1098 
1099  /* check dependent variables */
1100  haserr = 0;
1101  do {
1102  /* only part of scale provided */
1103  if (
1104  (scale_x == NULL && scale_y != NULL) ||
1105  (scale_x != NULL && scale_y == NULL)
1106  ) {
1107  elog(NOTICE, "Values must be provided for both X and Y of scale if one is specified");
1108  haserr = 1;
1109  break;
1110  }
1111 
1112  /* only part of dimension provided */
1113  if (
1114  (dim_x == NULL && dim_y != NULL) ||
1115  (dim_x != NULL && dim_y == NULL)
1116  ) {
1117  elog(NOTICE, "Values must be provided for both width and height if one is specified");
1118  haserr = 1;
1119  break;
1120  }
1121 
1122  /* scale and dimension provided */
1123  if (
1124  (scale_x != NULL && scale_y != NULL) &&
1125  (dim_x != NULL && dim_y != NULL)
1126  ) {
1127  elog(NOTICE, "Values provided for X and Y of scale and width and height. Using the width and height");
1128  scale_x = NULL;
1129  scale_y = NULL;
1130  break;
1131  }
1132 
1133  /* neither scale or dimension provided */
1134  if (
1135  (scale_x == NULL && scale_y == NULL) &&
1136  (dim_x == NULL && dim_y == NULL)
1137  ) {
1138  elog(NOTICE, "Values must be provided for X and Y of scale or width and height");
1139  haserr = 1;
1140  break;
1141  }
1142 
1143  /* only part of upper-left provided */
1144  if (
1145  (ul_xw == NULL && ul_yw != NULL) ||
1146  (ul_xw != NULL && ul_yw == NULL)
1147  ) {
1148  elog(NOTICE, "Values must be provided for both X and Y when specifying the upper-left corner");
1149  haserr = 1;
1150  break;
1151  }
1152 
1153  /* only part of alignment provided */
1154  if (
1155  (grid_xw == NULL && grid_yw != NULL) ||
1156  (grid_xw != NULL && grid_yw == NULL)
1157  ) {
1158  elog(NOTICE, "Values must be provided for both X and Y when specifying the alignment");
1159  haserr = 1;
1160  break;
1161  }
1162 
1163  /* upper-left and alignment provided */
1164  if (
1165  (ul_xw != NULL && ul_yw != NULL) &&
1166  (grid_xw != NULL && grid_yw != NULL)
1167  ) {
1168  elog(NOTICE, "Values provided for both X and Y of upper-left corner and alignment. Using the values of upper-left corner");
1169  grid_xw = NULL;
1170  grid_yw = NULL;
1171  break;
1172  }
1173  }
1174  while (0);
1175 
1176  if (haserr) {
1177  if (pixtypes_len) pfree(pixtypes);
1178  if (values_len) pfree(values);
1179  if (nodatavals_len) {
1180  pfree(nodatavals);
1181  pfree(hasnodatas);
1182  }
1183 
1184  lwgeom_free(geom);
1185  PG_FREE_IF_COPY(gser, 0);
1186 
1187  PG_RETURN_NULL();
1188  }
1189 
1190  /* skewx */
1191  if (!PG_ARGISNULL(12)) {
1192  skew[0] = PG_GETARG_FLOAT8(12);
1193  if (FLT_NEQ(skew[0], 0)) skew_x = &skew[0];
1194  }
1195 
1196  /* skewy */
1197  if (!PG_ARGISNULL(13)) {
1198  skew[1] = PG_GETARG_FLOAT8(13);
1199  if (FLT_NEQ(skew[1], 0)) skew_y = &skew[1];
1200  }
1201  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: skew (x, y) = %f, %f", skew[0], skew[1]);
1202 
1203  /* all touched */
1204  if (!PG_ARGISNULL(14) && PG_GETARG_BOOL(14) == TRUE) {
1205  if (options_len == 0) {
1206  options_len = 1;
1207  options = (char **) palloc(sizeof(char *) * options_len);
1208  }
1209  else {
1210  options_len++;
1211  options = (char **) repalloc(options, sizeof(char *) * options_len);
1212  }
1213 
1214  options[options_len - 1] = palloc(sizeof(char*) * (strlen("ALL_TOUCHED=TRUE") + 1));
1215  strcpy(options[options_len - 1], "ALL_TOUCHED=TRUE");
1216  }
1217 
1218  if (options_len) {
1219  options_len++;
1220  options = (char **) repalloc(options, sizeof(char *) * options_len);
1221  options[options_len - 1] = NULL;
1222  }
1223 
1224  /* get geometry's srid */
1225  srid = gserialized_get_srid(gser);
1226 
1227  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: srid = %d", srid);
1228  if (clamp_srid(srid) != SRID_UNKNOWN) {
1229  srs = rtpg_getSR(srid);
1230  if (NULL == srs) {
1231 
1232  if (pixtypes_len) pfree(pixtypes);
1233  if (values_len) pfree(values);
1234  if (nodatavals_len) {
1235  pfree(hasnodatas);
1236  pfree(nodatavals);
1237  }
1238  if (options_len) pfree(options);
1239 
1240  lwgeom_free(geom);
1241  PG_FREE_IF_COPY(gser, 0);
1242 
1243  elog(ERROR, "RASTER_asRaster: Could not find srtext for SRID (%d)", srid);
1244  PG_RETURN_NULL();
1245  }
1246  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: srs is %s", srs);
1247  }
1248  else
1249  srs = NULL;
1250 
1251  /* determine number of bands */
1252  /* MIN macro is from GDAL's cpl_port.h */
1253  num_bands = MIN(pixtypes_len, values_len);
1254  num_bands = MIN(num_bands, nodatavals_len);
1255  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: pixtypes_len = %d", pixtypes_len);
1256  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: values_len = %d", values_len);
1257  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: nodatavals_len = %d", nodatavals_len);
1258  POSTGIS_RT_DEBUGF(3, "RASTER_asRaster: num_bands = %d", num_bands);
1259 
1260  /* warn of imbalanced number of band elements */
1261  if (!(
1262  (pixtypes_len == values_len) &&
1263  (values_len == nodatavals_len)
1264  )) {
1265  elog(
1266  NOTICE,
1267  "Imbalanced number of values provided for pixeltype (%d), value (%d) and nodataval (%d). Using the first %d values of each parameter",
1268  pixtypes_len,
1269  values_len,
1270  nodatavals_len,
1271  num_bands
1272  );
1273  }
1274 
1275  /* get wkb of geometry */
1276  POSTGIS_RT_DEBUG(3, "RASTER_asRaster: getting wkb of geometry");
1277  wkb = lwgeom_to_wkb(geom, variant, &wkb_len);
1278  lwgeom_free(geom);
1279  PG_FREE_IF_COPY(gser, 0);
1280 
1281  /* rasterize geometry */
1282  POSTGIS_RT_DEBUG(3, "RASTER_asRaster: rasterizing geometry");
1283  /* use nodatavals for the init parameter */
1285  (uint32_t) wkb_len, srs,
1286  num_bands, pixtypes,
1287  nodatavals, values,
1288  nodatavals, hasnodatas,
1289  dim_x, dim_y,
1290  scale_x, scale_y,
1291  ul_xw, ul_yw,
1292  grid_xw, grid_yw,
1293  skew_x, skew_y,
1294  options
1295  );
1296 
1297  if (pixtypes_len) pfree(pixtypes);
1298  if (values_len) pfree(values);
1299  if (nodatavals_len) {
1300  pfree(hasnodatas);
1301  pfree(nodatavals);
1302  }
1303  if (options_len) pfree(options);
1304 
1305  if (!rast) {
1306  elog(ERROR, "RASTER_asRaster: Could not rasterize geometry");
1307  PG_RETURN_NULL();
1308  }
1309 
1310  /* add target srid */
1311  rt_raster_set_srid(rast, srid);
1312 
1313  pgrast = rt_raster_serialize(rast);
1315 
1316  if (NULL == pgrast) PG_RETURN_NULL();
1317 
1318  POSTGIS_RT_DEBUG(3, "RASTER_asRaster: done");
1319 
1320  SET_VARSIZE(pgrast, pgrast->size);
1321  PG_RETURN_POINTER(pgrast);
1322 }
static uint8_t variant
Definition: cu_in_twkb.c:26
#define TRUE
Definition: dbfopen.c:169
int32_t gserialized_get_srid(const GSERIALIZED *s)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
Definition: g_serialized.c:100
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int lwgeom_ndims(const LWGEOM *geom)
Return the number of dimensions (2, 3, 4) in a geometry.
Definition: lwgeom.c:944
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
uint8_t * lwgeom_to_wkb(const LWGEOM *geom, uint8_t variant, size_t *size_out)
Convert LWGEOM to a char* in WKB format.
Definition: lwout_wkb.c:764
int clamp_srid(int srid)
Return a valid SRID from an arbitrary integer Raises a notice if what comes out is different from wha...
Definition: lwutil.c:347
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
Definition: lwgeom.c:1393
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:188
#define WKB_SFSQL
Definition: liblwgeom.h:2067
LWGEOM * lwgeom_force_2d(const LWGEOM *geom)
Strip out the Z/M components of an LWGEOM.
Definition: lwgeom.c:784
#define FLT_NEQ(x, y)
Definition: librtcore.h:2233
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
@ PT_64BF
Definition: librtcore.h:196
rt_raster rt_raster_new(uint32_t width, uint32_t height)
Construct a raster with given dimensions.
Definition: rt_raster.c:48
void * rt_raster_serialize(rt_raster raster)
Return this raster in serialized form.
Definition: rt_serialize.c:521
rt_raster rt_raster_gdal_rasterize(const unsigned char *wkb, uint32_t wkb_len, const char *srs, uint32_t num_bands, rt_pixtype *pixtype, double *init, double *value, double *nodata, uint8_t *hasnodata, int *width, int *height, double *scale_x, double *scale_y, double *ul_xw, double *ul_yw, double *grid_xw, double *grid_yw, double *skew_x, double *skew_y, char **options)
Return a raster of the provided geometry.
Definition: rt_raster.c:2509
void rt_raster_set_srid(rt_raster raster, int32_t srid)
Set raster's SRID.
Definition: rt_raster.c:363
char * text_to_cstring(const text *textptr)
char * rtpg_getSR(int srid)
char * rtpg_trim(const char *input)
#define POSTGIS_RT_DEBUG(level, msg)
Definition: rtpostgis.h:61
#define POSTGIS_RT_DEBUGF(level, msg,...)
Definition: rtpostgis.h:65
#define MIN(a, b)
Definition: shpopen.c:283
Struct definitions.
Definition: librtcore.h:2250
unsigned int uint32_t
Definition: uthash.h:78
unsigned char uint8_t
Definition: uthash.h:79

References clamp_srid(), FLT_NEQ, gserialized_get_srid(), lwgeom_force_2d(), lwgeom_free(), lwgeom_from_gserialized(), lwgeom_is_empty(), lwgeom_ndims(), lwgeom_to_wkb(), MIN, POSTGIS_RT_DEBUG, POSTGIS_RT_DEBUGF, PT_64BF, PT_END, rtpixdump::rast, rt_pixtype_index_from_name(), rt_raster_destroy(), rt_raster_gdal_rasterize(), rt_raster_new(), rt_raster_serialize(), rt_raster_set_srid(), rtpg_getSR(), rtpg_trim(), rt_raster_serialized_t::size, rt_raster_serialized_t::srid, SRID_UNKNOWN, text_to_cstring(), TRUE, variant, and WKB_SFSQL.

Here is the call graph for this function: