PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ GEOSnoop()

Datum GEOSnoop ( PG_FUNCTION_ARGS  )

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

2809 {
2810  GSERIALIZED *geom;
2811  GEOSGeometry *geosgeom;
2812  GSERIALIZED *lwgeom_result;
2813 
2814  initGEOS(lwpgnotice, lwgeom_geos_error);
2815 
2816  geom = PG_GETARG_GSERIALIZED_P(0);
2817  geosgeom = POSTGIS2GEOS(geom);
2818  if ( ! geosgeom ) PG_RETURN_NULL();
2819 
2820  lwgeom_result = GEOS2POSTGIS(geosgeom, gserialized_has_z(geom));
2821  GEOSGeom_destroy(geosgeom);
2822 
2823  PG_FREE_IF_COPY(geom, 0);
2824 
2825  PG_RETURN_POINTER(lwgeom_result);
2826 }
int gserialized_has_z(const GSERIALIZED *gser)
Check if a GSERIALIZED has a Z ordinate.
Definition: g_serialized.c:45
void lwgeom_geos_error(const char *fmt,...)
GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *pglwgeom)
GSERIALIZED * GEOS2POSTGIS(GEOSGeom geom, char want3d)

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

Here is the call graph for this function: