PostGIS  2.1.10dev-r@@SVN_REVISION@@
void rt_raster_set_phys_params ( rt_raster  rast,
double  i_mag,
double  j_mag,
double  theta_i,
double  theta_ij 
)

Calculates the geotransform coefficients and applies them to the supplied raster.

The coefficients will not be applied if there was an error during the calculation.

This method affects only the scale and skew coefficients. The offset parameters are not changed.

Parameters
rastthe raster in which the geotransform will be stored.
i_magsize of a pixel along the transformed i axis
j_magsize of a pixel along the transformed j axis
theta_iangle by which the raster is rotated (radians positive clockwise)
theta_ijangle from transformed i axis to transformed j axis (radians positive counterclockwise)

Definition at line 5602 of file rt_api.c.

References return(), rt_raster_calc_gt_coeff(), rt_raster_set_scale(), and rt_raster_set_skews().

Referenced by RASTER_setGeotransform(), and RASTER_setRotation().

5603 {
5604  double o11, o12, o21, o22 ; /* calculated geotransform coefficients */
5605  int success ;
5606 
5607  if (rast == NULL) return ;
5608 
5609  success = rt_raster_calc_gt_coeff(i_mag, j_mag, theta_i, theta_ij,
5610  &o11, &o12, &o21, &o22) ;
5611 
5612  if (success) {
5613  rt_raster_set_scale(rast, o11, o22) ;
5614  rt_raster_set_skews(rast, o12, o21) ;
5615  }
5616 }
int rt_raster_calc_gt_coeff(double i_mag, double j_mag, double theta_i, double theta_ij, double *xscale, double *xskew, double *yskew, double *yscale)
Calculates the coefficients of a geotransform given the physically significant parameters describing ...
Definition: rt_api.c:5619
void rt_raster_set_skews(rt_raster raster, double skewX, double skewY)
Set skews about the X and Y axis.
Definition: rt_api.c:5473
void rt_raster_set_scale(rt_raster raster, double scaleX, double scaleY)
Set scale in projection units.
Definition: rt_api.c:5442
return(const char *)
Definition: dbfopen.c:1610

Here is the call graph for this function:

Here is the caller graph for this function: