PostGIS  2.5.0beta1dev-r@@SVN_REVISION@@

◆ RASTER_getYScale()

Datum RASTER_getYScale ( PG_FUNCTION_ARGS  )

Definition at line 224 of file rtpg_raster_properties.c.

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

Referenced by RASTER_getXScale().

225 {
226  rt_pgraster *pgraster;
228  double ysize;
229 
230  if (PG_ARGISNULL(0)) PG_RETURN_NULL();
231  pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t));
232 
233  raster = rt_raster_deserialize(pgraster, TRUE);
234  if ( ! raster ) {
235  PG_FREE_IF_COPY(pgraster, 0);
236  elog(ERROR, "RASTER_getYScale: Could not deserialize raster");
237  PG_RETURN_NULL();
238  }
239 
240  ysize = rt_raster_get_y_scale(raster);
241 
242  rt_raster_destroy(raster);
243  PG_FREE_IF_COPY(pgraster, 0);
244 
245  PG_RETURN_FLOAT8(ysize);
246 }
raster
Be careful!! Zeros function's input parameter can be a (height x width) array, not (width x height): ...
Definition: rtrowdump.py:121
ysize
Definition: window.py:69
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_raster.c:82
double rt_raster_get_y_scale(rt_raster raster)
Get scale Y in projection units.
Definition: rt_raster.c:159
Struct definitions.
Definition: librtcore.h:2250
#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: