PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ GEOSnoop()

Datum GEOSnoop ( PG_FUNCTION_ARGS  )

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

References dumpnode::geom, GEOS2POSTGIS(), gserialized_has_z(), lwgeom_geos_error(), PG_FUNCTION_INFO_V1(), polygonize_garray(), and POSTGIS2GEOS().

Referenced by ARRAY2GEOS().

3352 {
3353  GSERIALIZED *geom;
3354  GEOSGeometry *geosgeom;
3355  GSERIALIZED *lwgeom_result;
3356 
3357  initGEOS(lwpgnotice, lwgeom_geos_error);
3358 
3359  geom = PG_GETARG_GSERIALIZED_P(0);
3360  geosgeom = (GEOSGeometry *)POSTGIS2GEOS(geom);
3361  if ( ! geosgeom ) PG_RETURN_NULL();
3362 
3363  lwgeom_result = GEOS2POSTGIS(geosgeom, gserialized_has_z(geom));
3364  GEOSGeom_destroy(geosgeom);
3365 
3366  PG_FREE_IF_COPY(geom, 0);
3367 
3368  PG_RETURN_POINTER(lwgeom_result);
3369 }
int gserialized_has_z(const GSERIALIZED *gser)
Check if a GSERIALIZED has a Z ordinate.
Definition: g_serialized.c:24
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:
Here is the caller graph for this function: