PostGIS  2.5.0dev-r@@SVN_REVISION@@
rt_errorstate rt_raster_get_inverse_geotransform_matrix ( rt_raster  raster,
double *  gt,
double *  igt 
)

Get 6-element array of raster inverse geotransform matrix.

Parameters
raster: the raster to get matrix of
gt: optional input parameter, 6-element geotransform matrix
igt: output parameter, 6-element inverse geotransform matrix
Returns
ES_NONE if success, ES_ERROR if error

Definition at line 676 of file rt_raster.c.

References ES_ERROR, ES_NONE, rt_raster_get_geotransform_matrix(), and rterror().

Referenced by RASTER_setPixelValuesGeomval(), and rt_raster_geopoint_to_cell().

679  {
680  double _gt[6] = {0};
681 
682  assert((raster != NULL || gt != NULL));
683  assert(igt != NULL);
684 
685  if (gt == NULL)
687  else
688  memcpy(_gt, gt, sizeof(double) * 6);
689 
690  if (!GDALInvGeoTransform(_gt, igt)) {
691  rterror("rt_raster_get_inverse_geotransform_matrix: Could not compute inverse geotransform matrix");
692  return ES_ERROR;
693  }
694 
695  return ES_NONE;
696 }
tuple gt
Definition: window.py:77
void rterror(const char *fmt,...)
Wrappers used for reporting errors and info.
Definition: rt_context.c:199
void rt_raster_get_geotransform_matrix(rt_raster raster, double *gt)
Get 6-element array of raster geotransform matrix.
Definition: rt_raster.c:706

Here is the call graph for this function:

Here is the caller graph for this function: