PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ rt_raster_set_phys_params()

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 301 of file rt_raster.c.

302{
303 double o11, o12, o21, o22 ; /* calculated geotransform coefficients */
304 int success ;
305
306 if (rast == NULL) return ;
307
308 success = rt_raster_calc_gt_coeff(i_mag, j_mag, theta_i, theta_ij,
309 &o11, &o12, &o21, &o22) ;
310
311 if (success) {
312 rt_raster_set_scale(rast, o11, o22) ;
313 rt_raster_set_skews(rast, o12, o21) ;
314 }
315}
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_raster.c:318
void rt_raster_set_scale(rt_raster raster, double scaleX, double scaleY)
Set scale in projection units.
Definition rt_raster.c:141
void rt_raster_set_skews(rt_raster raster, double skewX, double skewY)
Set skews about the X and Y axis.
Definition rt_raster.c:172
return(psObject)

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

Referenced by RASTER_setGeotransform(), and RASTER_setRotation().

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