56{
57 uint16 width = 0, height = 0;
58 double ipx = 0, ipy = 0, scalex = 0, scaley = 0, skewx = 0, skewy = 0;
62
63 if (PG_NARGS() < 9) {
64 elog(ERROR, "RASTER_makeEmpty: ST_MakeEmptyRaster requires 9 args");
65 PG_RETURN_NULL();
66 }
67
68 if (!PG_ARGISNULL(0))
69 width = PG_GETARG_UINT16(0);
70
71 if (!PG_ARGISNULL(1))
72 height = PG_GETARG_UINT16(1);
73
74 if (!PG_ARGISNULL(2))
75 ipx = PG_GETARG_FLOAT8(2);
76
77 if (!PG_ARGISNULL(3))
78 ipy = PG_GETARG_FLOAT8(3);
79
80 if (!PG_ARGISNULL(4))
81 scalex = PG_GETARG_FLOAT8(4);
82
83 if (!PG_ARGISNULL(5))
84 scaley = PG_GETARG_FLOAT8(5);
85
86 if (!PG_ARGISNULL(6))
87 skewx = PG_GETARG_FLOAT8(6);
88
89 if (!PG_ARGISNULL(7))
90 skewy = PG_GETARG_FLOAT8(7);
91
92 if (!PG_ARGISNULL(8))
93 srid = PG_GETARG_INT32(8);
94
96 width, height, ipx, ipy, scalex, scaley,
97 skewx, skewy, srid);
98
100 if (raster == NULL)
101 PG_RETURN_NULL();
102
107
110 if (!pgraster)
111 PG_RETURN_NULL();
112
113 SET_VARSIZE(pgraster, pgraster->
size);
114 PG_RETURN_POINTER(pgraster);
115}
#define SRID_UNKNOWN
Unknown SRID value.
void rt_raster_set_scale(rt_raster raster, double scaleX, double scaleY)
Set scale in projection units.
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
void rt_raster_set_skews(rt_raster raster, double skewX, double skewY)
Set skews about the X and Y axis.
rt_raster rt_raster_new(uint32_t width, uint32_t height)
Construct a raster with given dimensions.
void rt_raster_set_srid(rt_raster raster, int32_t srid)
Set raster's SRID.
void * rt_raster_serialize(rt_raster raster)
Return this raster in serialized form.
void rt_raster_set_offsets(rt_raster raster, double x, double y)
Set insertion points in projection units.
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
#define POSTGIS_RT_DEBUGF(level, msg,...)