PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ POSTGIS2SFCGALPreparedGeometry()

sfcgal_prepared_geometry_t* POSTGIS2SFCGALPreparedGeometry ( GSERIALIZED pglwgeom)

Definition at line 99 of file postgis/lwgeom_sfcgal.c.

100 {
101  sfcgal_geometry_t* g;
102  LWGEOM *lwgeom = lwgeom_from_gserialized(pglwgeom);
103 
104  if (!lwgeom)
105  {
106  lwpgerror("POSTGIS2SFCGALPreparedGeometry: Unable to deserialize input");
107  }
108  g = LWGEOM2SFCGAL(lwgeom);
109 
110  lwgeom_free(lwgeom);
111 
112  return sfcgal_prepared_geometry_create_from_geometry(g, gserialized_get_srid(pglwgeom));
113 }
int32_t gserialized_get_srid(const GSERIALIZED *s)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
Definition: g_serialized.c:100
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
sfcgal_geometry_t * LWGEOM2SFCGAL(const LWGEOM *geom)
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144

References gserialized_get_srid(), LWGEOM2SFCGAL(), lwgeom_free(), and lwgeom_from_gserialized().

Here is the call graph for this function: