PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ GEOSnoop()

Datum GEOSnoop ( PG_FUNCTION_ARGS  )

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

3041 {
3042  GSERIALIZED *geom;
3043  GEOSGeometry *geosgeom;
3044  GSERIALIZED *lwgeom_result;
3045 
3046  initGEOS(lwpgnotice, lwgeom_geos_error);
3047 
3048  geom = PG_GETARG_GSERIALIZED_P(0);
3049  geosgeom = (GEOSGeometry *)POSTGIS2GEOS(geom);
3050  if ( ! geosgeom ) PG_RETURN_NULL();
3051 
3052  lwgeom_result = GEOS2POSTGIS(geosgeom, gserialized_has_z(geom));
3053  GEOSGeom_destroy(geosgeom);
3054 
3055  PG_FREE_IF_COPY(geom, 0);
3056 
3057  PG_RETURN_POINTER(lwgeom_result);
3058 }
int gserialized_has_z(const GSERIALIZED *gser)
Check if a GSERIALIZED has a Z ordinate.
Definition: g_serialized.c:38
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: