PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_raster_cell_to_geopoint()

static void test_raster_cell_to_geopoint ( )
static

Definition at line 27 of file cu_raster_misc.c.

27  {
29  int rtn;
30  double xw, yw;
31  double gt[6] = {-128.604911499087763, 0.002424431085498, 0, 53.626968388905752, 0, -0.002424431085498};
32 
33  raster = rt_raster_new(1, 1);
34  CU_ASSERT(raster != NULL); /* or we're out of virtual memory */
37 
38  rtn = rt_raster_cell_to_geopoint(raster, 0, 0, &xw, &yw, NULL);
39  CU_ASSERT_EQUAL(rtn, ES_NONE);
40  CU_ASSERT_DOUBLE_EQUAL(xw, gt[0], DBL_EPSILON);
41  CU_ASSERT_DOUBLE_EQUAL(yw, gt[3], DBL_EPSILON);
42 
44 }
rt_errorstate rt_raster_cell_to_geopoint(rt_raster raster, double xr, double yr, double *xw, double *yw, double *gt)
Convert an xr, yr raster point to an xw, yw point on map.
Definition: rt_raster.c:755
void rt_raster_set_geotransform_matrix(rt_raster raster, double *gt)
Set raster's geotransform using 6-element array.
Definition: rt_raster.c:727
rt_raster rt_raster_new(uint32_t width, uint32_t height)
Construct a raster with given dimensions.
Definition: rt_raster.c:48
@ ES_NONE
Definition: librtcore.h:180
void rt_raster_set_srid(rt_raster raster, int32_t srid)
Set raster's SRID.
Definition: rt_raster.c:363
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
Definition: rtrowdump.py:121
gt
Definition: window.py:77
void cu_free_raster(rt_raster raster)

References cu_free_raster(), ES_NONE, window::gt, rtrowdump::raster, rt_raster_cell_to_geopoint(), rt_raster_new(), rt_raster_set_geotransform_matrix(), and rt_raster_set_srid().

Referenced by raster_misc_suite_setup().

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