PostGIS  2.1.10dev-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 5975 of file rt_api.c.

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

Referenced by RASTER_setPixelValuesGeomval(), and rt_raster_geopoint_to_cell().

5978  {
5979  double _gt[6] = {0};
5980 
5981  assert((raster != NULL || gt != NULL));
5982  assert(igt != NULL);
5983 
5984  if (gt == NULL)
5985  rt_raster_get_geotransform_matrix(raster, _gt);
5986  else
5987  memcpy(_gt, gt, sizeof(double) * 6);
5988 
5989  if (!GDALInvGeoTransform(_gt, igt)) {
5990  rterror("rt_raster_get_inverse_geotransform_matrix: Could not compute inverse geotransform matrix");
5991  return ES_ERROR;
5992  }
5993 
5994  return ES_NONE;
5995 }
tuple gt
Definition: window.py:79
void rt_raster_get_geotransform_matrix(rt_raster raster, double *gt)
Get 6-element array of raster geotransform matrix.
Definition: rt_api.c:6005
void rterror(const char *fmt,...)
Raster core error and info handlers.
Definition: rt_api.c:895

Here is the call graph for this function:

Here is the caller graph for this function: