PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ GEOSnoop()

Datum GEOSnoop ( PG_FUNCTION_ARGS  )

Definition at line 3111 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().

3112 {
3113  GSERIALIZED *geom;
3114  GEOSGeometry *geosgeom;
3115  GSERIALIZED *lwgeom_result;
3116 
3117  initGEOS(lwpgnotice, lwgeom_geos_error);
3118 
3119  geom = PG_GETARG_GSERIALIZED_P(0);
3120  geosgeom = (GEOSGeometry *)POSTGIS2GEOS(geom);
3121  if ( ! geosgeom ) PG_RETURN_NULL();
3122 
3123  lwgeom_result = GEOS2POSTGIS(geosgeom, gserialized_has_z(geom));
3124  GEOSGeom_destroy(geosgeom);
3125 
3126  PG_FREE_IF_COPY(geom, 0);
3127 
3128  PG_RETURN_POINTER(lwgeom_result);
3129 }
int gserialized_has_z(const GSERIALIZED *gser)
Check if a GSERIALIZED has a Z ordinate.
Definition: g_serialized.c:45
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: