PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ GEOSnoop()

Datum GEOSnoop ( PG_FUNCTION_ARGS  )

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

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