PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ GEOSnoop()

Datum GEOSnoop ( PG_FUNCTION_ARGS  )

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

1956 {
1957  GSERIALIZED *geom;
1958  GEOSGeometry *geosgeom;
1959  GSERIALIZED *lwgeom_result;
1960 
1961  initGEOS(lwpgnotice, lwgeom_geos_error);
1962 
1963  geom = PG_GETARG_GSERIALIZED_P(0);
1964  geosgeom = POSTGIS2GEOS(geom);
1965  if ( ! geosgeom ) PG_RETURN_NULL();
1966 
1967  lwgeom_result = GEOS2POSTGIS(geosgeom, gserialized_has_z(geom));
1968  GEOSGeom_destroy(geosgeom);
1969 
1970  PG_FREE_IF_COPY(geom, 0);
1971 
1972  PG_RETURN_POINTER(lwgeom_result);
1973 }
int gserialized_has_z(const GSERIALIZED *g)
Check if a GSERIALIZED has a Z ordinate.
Definition: gserialized.c:203
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: