PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ GEOSnoop()

Datum GEOSnoop ( PG_FUNCTION_ARGS  )

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

2987 {
2988  GSERIALIZED *geom;
2989  GEOSGeometry *geosgeom;
2990  GSERIALIZED *lwgeom_result;
2991 
2992  initGEOS(lwpgnotice, lwgeom_geos_error);
2993 
2994  geom = PG_GETARG_GSERIALIZED_P(0);
2995  geosgeom = POSTGIS2GEOS(geom);
2996  if ( ! geosgeom ) PG_RETURN_NULL();
2997 
2998  lwgeom_result = GEOS2POSTGIS(geosgeom, gserialized_has_z(geom));
2999  GEOSGeom_destroy(geosgeom);
3000 
3001  PG_FREE_IF_COPY(geom, 0);
3002 
3003  PG_RETURN_POINTER(lwgeom_result);
3004 }
int gserialized_has_z(const GSERIALIZED *g)
Check if a GSERIALIZED has a Z ordinate.
Definition: gserialized.c:174
void lwgeom_geos_error(const char *fmt,...)
GSERIALIZED * GEOS2POSTGIS(GEOSGeom geom, char want3d)
GEOSGeometry * POSTGIS2GEOS(const GSERIALIZED *pglwgeom)

References GEOS2POSTGIS(), gserialized_has_z(), lwgeom_geos_error(), and POSTGIS2GEOS().

Here is the call graph for this function: