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

Definition at line 1991 of file rt_pg.c.

References rtrowdump::raster, rt_raster_deserialize(), rt_raster_destroy(), rt_raster_get_y_offset(), and TRUE.

1992 {
1993  rt_pgraster *pgraster;
1994  rt_raster raster;
1995  double yul;
1996 
1997  if (PG_ARGISNULL(0)) PG_RETURN_NULL();
1998  pgraster = (rt_pgraster *) PG_DETOAST_DATUM_SLICE(PG_GETARG_DATUM(0), 0, sizeof(struct rt_raster_serialized_t));
1999 
2000  raster = rt_raster_deserialize(pgraster, TRUE);
2001  if ( ! raster ) {
2002  PG_FREE_IF_COPY(pgraster, 0);
2003  elog(ERROR, "RASTER_getYUpperLeft: Could not deserialize raster");
2004  PG_RETURN_NULL();
2005  }
2006 
2007  yul = rt_raster_get_y_offset(raster);
2008 
2009  rt_raster_destroy(raster);
2010  PG_FREE_IF_COPY(pgraster, 0);
2011 
2012  PG_RETURN_FLOAT8(yul);
2013 }
double rt_raster_get_y_offset(rt_raster raster)
Get raster y offset, in projection units.
Definition: rt_api.c:5527
void rt_raster_destroy(rt_raster raster)
Release memory associated to a raster.
Definition: rt_api.c:5387
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
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: