PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ GEOSnoop()

Datum GEOSnoop ( PG_FUNCTION_ARGS  )

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

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