PostGIS  2.1.10dev-r@@SVN_REVISION@@
Datum RASTER_in ( PG_FUNCTION_ARGS  )

Definition at line 1114 of file rt_pg.c.

References POSTGIS_RT_DEBUG, rtrowdump::raster, result, rt_raster_destroy(), rt_raster_from_hexwkb(), and rt_raster_serialize().

1115 {
1116  rt_raster raster;
1117  char *hexwkb = PG_GETARG_CSTRING(0);
1118  void *result = NULL;
1119 
1120  POSTGIS_RT_DEBUG(3, "Starting");
1121 
1122  raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
1123  if (raster == NULL)
1124  PG_RETURN_NULL();
1125 
1126  result = rt_raster_serialize(raster);
1127  rt_raster_destroy(raster);
1128  if (result == NULL)
1129  PG_RETURN_NULL();
1130 
1131  SET_VARSIZE(result, ((rt_pgraster*)result)->size);
1132  PG_RETURN_POINTER(result);
1133 }
void * rt_raster_serialize(rt_raster raster)
Return this raster in serialized form.
Definition: rt_api.c:8158
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_api.c:5387
tuple raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
Definition: rtrowdump.py:123
char ** result
Definition: liblwgeom.h:218
rt_raster rt_raster_from_hexwkb(const char *hexwkb, uint32_t hexwkbsize)
Construct an rt_raster from a text HEXWKB representation.
Definition: rt_api.c:7799
#define POSTGIS_RT_DEBUG(level, msg)
Definition: rt_pg.h:58
Struct definitions.
Definition: rt_api.h:2175

Here is the call graph for this function: