PostGIS  3.0.0dev-r@@SVN_REVISION@@

◆ GEOSnoop()

Datum GEOSnoop ( PG_FUNCTION_ARGS  )

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

2810 {
2811  GSERIALIZED *geom;
2812  GEOSGeometry *geosgeom;
2813  GSERIALIZED *lwgeom_result;
2814 
2815  initGEOS(lwpgnotice, lwgeom_geos_error);
2816 
2817  geom = PG_GETARG_GSERIALIZED_P(0);
2818  geosgeom = POSTGIS2GEOS(geom);
2819  if ( ! geosgeom ) PG_RETURN_NULL();
2820 
2821  lwgeom_result = GEOS2POSTGIS(geosgeom, gserialized_has_z(geom));
2822  GEOSGeom_destroy(geosgeom);
2823 
2824  PG_FREE_IF_COPY(geom, 0);
2825 
2826  PG_RETURN_POINTER(lwgeom_result);
2827 }
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: