PostGIS  2.1.10dev-r@@SVN_REVISION@@
Datum RASTER_getYScale ( PG_FUNCTION_ARGS  )

Definition at line 1746 of file rt_pg.c.

References rtrowdump::raster, rt_raster_deserialize(), rt_raster_destroy(), rt_raster_get_y_scale(), TRUE, and window::ysize.

1747 {
1748  rt_pgraster *pgraster;
1749  rt_raster raster;
1750  double ysize;
1751 
1752  if (PG_ARGISNULL(0)) PG_RETURN_NULL();
1753  pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t));
1754 
1755  raster = rt_raster_deserialize(pgraster, TRUE);
1756  if ( ! raster ) {
1757  PG_FREE_IF_COPY(pgraster, 0);
1758  elog(ERROR, "RASTER_getYScale: Could not deserialize raster");
1759  PG_RETURN_NULL();
1760  }
1761 
1762  ysize = rt_raster_get_y_scale(raster);
1763 
1764  rt_raster_destroy(raster);
1765  PG_FREE_IF_COPY(pgraster, 0);
1766 
1767  PG_RETURN_FLOAT8(ysize);
1768 }
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_api.c:5387
ysize
Definition: window.py:71
tuple raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
Definition: rtrowdump.py:123
Struct definitions.
Definition: rt_api.h:2175
double rt_raster_get_y_scale(rt_raster raster)
Get scale Y in projection units.
Definition: rt_api.c:5464
rt_raster rt_raster_deserialize(void *serialized, int header_only)
Return a raster from a serialized form.
Definition: rt_api.c:8350
#define TRUE
Definition: dbfopen.c:170

Here is the call graph for this function: