PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ RASTER_in()

Datum RASTER_in ( PG_FUNCTION_ARGS  )

Definition at line 62 of file rtpg_inout.c.

63 {
65  char *hexwkb = PG_GETARG_CSTRING(0);
66  void *result = NULL;
67 
68  POSTGIS_RT_DEBUG(3, "Starting");
69 
70  raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
71  if (raster == NULL)
72  PG_RETURN_NULL();
73 
74  result = rt_raster_serialize(raster);
76  if (result == NULL)
77  PG_RETURN_NULL();
78 
79  SET_VARSIZE(result, ((rt_pgraster*)result)->size);
80  PG_RETURN_POINTER(result);
81 }
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:82
void * rt_raster_serialize(rt_raster raster)
Return this raster in serialized form.
Definition: rt_serialize.c:521
rt_raster rt_raster_from_hexwkb(const char *hexwkb, uint32_t hexwkbsize)
Construct an rt_raster from a text HEXWKB representation.
Definition: rt_wkb.c:406
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
Definition: rtrowdump.py:121
#define POSTGIS_RT_DEBUG(level, msg)
Definition: rtpostgis.h:61
Struct definitions.
Definition: librtcore.h:2250

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

Here is the call graph for this function: