Get raster's envelope.
The envelope is the minimum bounding rectangle of the raster
- Parameters
-
raster | : the raster to get envelope of |
env | : pointer to rt_envelope |
- Returns
- ES_NONE if success, ES_ERROR if error
Definition at line 873 of file rt_raster.c.
882 double _gt[6] = {0.};
889 for (i = 0; i < 4; i++) {
916 rterror(
"rt_raster_get_envelope: Could not compute spatial coordinates for raster pixel");
928 if (_w[0] < env->
MinX)
930 else if (_w[0] > env->
MaxX)
933 if (_w[1] < env->
MinY)
935 else if (_w[1] > env->
MaxY)
void rterror(const char *fmt,...)
Wrappers used for reporting errors and info.
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
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.
void rt_raster_get_geotransform_matrix(rt_raster raster, double *gt)
Get 6-element array of raster geotransform matrix.
References ES_ERROR, ES_NONE, rt_envelope::MaxX, rt_envelope::MaxY, rt_envelope::MinX, rt_envelope::MinY, rtrowdump::raster, rt_raster_cell_to_geopoint(), rt_raster_get_geotransform_matrix(), and rterror().
Referenced by rt_raster_get_envelope_geom(), and test_raster_envelope().