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

Definition at line 3218 of file postgis/lwgeom_geos.c.

References GEOS2POSTGIS(), gserialized_has_z(), lwgeom_geos_error(), lwnotice(), POSTGIS2GEOS(), and result.

3219 {
3220  GSERIALIZED *geom;
3221  GEOSGeometry *geosgeom;
3222  GSERIALIZED *lwgeom_result;
3223 #if POSTGIS_DEBUG_LEVEL > 0
3224  int result;
3225  LWGEOM_UNPARSER_RESULT lwg_unparser_result;
3226 #endif
3227 
3228  initGEOS(lwnotice, lwgeom_geos_error);
3229 
3230  geom = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
3231 
3232 
3233  geosgeom = (GEOSGeometry *)POSTGIS2GEOS(geom);
3234  if ( ! geosgeom ) PG_RETURN_NULL();
3235 
3236  lwgeom_result = GEOS2POSTGIS(geosgeom, gserialized_has_z(geom));
3237  GEOSGeom_destroy(geosgeom);
3238 
3239 
3240  PG_FREE_IF_COPY(geom, 0);
3241 
3242  PG_RETURN_POINTER(lwgeom_result);
3243 }
int gserialized_has_z(const GSERIALIZED *gser)
Check if a GSERIALIZED has a Z ordinate.
Definition: g_serialized.c:25
char ** result
Definition: liblwgeom.h:218
void lwnotice(const char *fmt,...)
Write a notice out to the notice handler.
Definition: lwutil.c:54
LWGEOM * geom
void lwgeom_geos_error(const char *fmt,...)
GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *pglwgeom)
GSERIALIZED * GEOS2POSTGIS(GEOSGeom geom, char want3d)

Here is the call graph for this function: