PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ GEOS2POSTGIS()

GSERIALIZED* GEOS2POSTGIS ( GEOSGeom  geom,
char  want3d 
)

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

1798 {
1799  LWGEOM *lwgeom;
1801 
1802  lwgeom = GEOS2LWGEOM(geom, want3d);
1803  if ( ! lwgeom )
1804  {
1805  lwpgerror("%s: GEOS2LWGEOM returned NULL", __func__);
1806  return NULL;
1807  }
1808 
1809  POSTGIS_DEBUGF(4, "%s: GEOS2LWGEOM returned a %s", __func__, lwgeom_summary(lwgeom, 0));
1810 
1811  if (lwgeom_needs_bbox(lwgeom)) lwgeom_add_bbox(lwgeom);
1812 
1813  result = geometry_serialize(lwgeom);
1814  lwgeom_free(lwgeom);
1815 
1816  return result;
1817 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:267
void(*) LWGEOM GEOS2LWGEOM)(const GEOSGeometry *geom, uint8_t want3d)
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1218
int lwgeom_needs_bbox(const LWGEOM *geom)
Check whether or not a lwgeom is big enough to warrant a bounding box.
Definition: lwgeom.c:1271
char * lwgeom_summary(const LWGEOM *lwgeom, int offset)
Definition: lwgeom_debug.c:166
void lwgeom_add_bbox(LWGEOM *lwgeom)
Compute a bbox if not already computed.
Definition: lwgeom.c:695

References lwgeom_add_bbox(), lwgeom_free(), lwgeom_needs_bbox(), lwgeom_summary(), and result.

Referenced by buffer(), clusterintersecting_garray(), GEOSnoop(), pgis_union_geometry_array(), polygonize_garray(), ST_CoverageUnion(), ST_LargestEmptyCircle(), ST_MaximumInscribedCircle(), ST_MinimumClearanceLine(), ST_OrientedEnvelope(), and topologypreservesimplify().

Here is the call graph for this function:
Here is the caller graph for this function: