PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ RASTER_getYSkew()

Datum RASTER_getYSkew ( PG_FUNCTION_ARGS  )

Definition at line 278 of file rtpg_raster_properties.c.

References PG_FUNCTION_INFO_V1(), rtrowdump::raster, RASTER_getXUpperLeft(), rt_raster_deserialize(), rt_raster_destroy(), rt_raster_get_y_skew(), and TRUE.

Referenced by RASTER_getXSkew().

279 {
280  rt_pgraster *pgraster;
282  double yskew;
283 
284  if (PG_ARGISNULL(0)) PG_RETURN_NULL();
285  pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t));
286 
287  raster = rt_raster_deserialize(pgraster, TRUE);
288  if ( ! raster ) {
289  PG_FREE_IF_COPY(pgraster, 0);
290  elog(ERROR, "RASTER_getYSkew: Could not deserialize raster");
291  PG_RETURN_NULL();
292  }
293 
294  yskew = rt_raster_get_y_skew(raster);
295 
296  rt_raster_destroy(raster);
297  PG_FREE_IF_COPY(pgraster, 0);
298 
299  PG_RETURN_FLOAT8(yskew);
300 }
double rt_raster_get_y_skew(rt_raster raster)
Get skew about the Y axis.
Definition: rt_raster.c:190
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
Definition: rtrowdump.py:121
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:82
Struct definitions.
Definition: librtcore.h:2201
#define TRUE
Definition: dbfopen.c:169
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.
Definition: rt_serialize.c:717
Here is the call graph for this function:
Here is the caller graph for this function: