PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_raster_compute_skewed_raster()

static void test_raster_compute_skewed_raster ( )
static

Definition at line 178 of file cu_raster_misc.c.

178  {
179  rt_envelope extent;
180  rt_raster rast;
181  double skew[2] = {0.25, 0.25};
182  double scale[2] = {1, -1};
183 
184  extent.MinX = 0;
185  extent.MaxY = 0;
186  extent.MaxX = 2;
187  extent.MinY = -2;
188  extent.UpperLeftX = extent.MinX;
189  extent.UpperLeftY = extent.MaxY;
190 
192  extent,
193  skew,
194  scale,
195  0
196  );
197 
198  CU_ASSERT(rast != NULL);
199  CU_ASSERT_EQUAL(rt_raster_get_width(rast), 2);
200  CU_ASSERT_EQUAL(rt_raster_get_height(rast), 3);
201  CU_ASSERT_DOUBLE_EQUAL(rt_raster_get_x_offset(rast), -0.5, DBL_EPSILON);
202  CU_ASSERT_DOUBLE_EQUAL(rt_raster_get_y_offset(rast), 0, DBL_EPSILON);
203 
205 }
double rt_raster_get_x_offset(rt_raster raster)
Get raster x offset, in projection units.
Definition: rt_raster.c:213
rt_raster rt_raster_compute_skewed_raster(rt_envelope extent, double *skew, double *scale, double tolerance)
Definition: rt_raster.c:960
uint16_t rt_raster_get_height(rt_raster raster)
Definition: rt_raster.c:129
uint16_t rt_raster_get_width(rt_raster raster)
Definition: rt_raster.c:121
double rt_raster_get_y_offset(rt_raster raster)
Get raster y offset, in projection units.
Definition: rt_raster.c:222
void cu_free_raster(rt_raster raster)
double MinX
Definition: librtcore.h:165
double UpperLeftY
Definition: librtcore.h:171
double UpperLeftX
Definition: librtcore.h:170
double MaxX
Definition: librtcore.h:166
double MinY
Definition: librtcore.h:167
double MaxY
Definition: librtcore.h:168

References cu_free_raster(), rt_envelope::MaxX, rt_envelope::MaxY, rt_envelope::MinX, rt_envelope::MinY, rtpixdump::rast, rt_raster_compute_skewed_raster(), rt_raster_get_height(), rt_raster_get_width(), rt_raster_get_x_offset(), rt_raster_get_y_offset(), rt_envelope::UpperLeftX, and rt_envelope::UpperLeftY.

Referenced by raster_misc_suite_setup().

Here is the call graph for this function:
Here is the caller graph for this function: