PostGIS  3.6.1dev-r@@SVN_REVISION@@

◆ GEOSnoop()

Datum GEOSnoop ( PG_FUNCTION_ARGS  )

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

1957 {
1958  GSERIALIZED *geom;
1959  GEOSGeometry *geosgeom;
1960  GSERIALIZED *lwgeom_result;
1961 
1962  initGEOS(lwpgnotice, lwgeom_geos_error);
1963 
1964  geom = PG_GETARG_GSERIALIZED_P(0);
1965  geosgeom = POSTGIS2GEOS(geom);
1966  if ( ! geosgeom ) PG_RETURN_NULL();
1967 
1968  lwgeom_result = GEOS2POSTGIS(geosgeom, gserialized_has_z(geom));
1969  GEOSGeom_destroy(geosgeom);
1970 
1971  PG_FREE_IF_COPY(geom, 0);
1972 
1973  PG_RETURN_POINTER(lwgeom_result);
1974 }
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: