PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ sfcgal_from_ewkt()

Datum sfcgal_from_ewkt ( PG_FUNCTION_ARGS  )

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

References PG_FUNCTION_INFO_V1(), sfcgal_area(), sfcgal_postgis_init(), SFCGALPreparedGeometry2POSTGIS(), and text2cstring().

Referenced by SFCGALPreparedGeometry2POSTGIS().

131 {
132  GSERIALIZED* result;
133  sfcgal_prepared_geometry_t* g;
134  text *wkttext = PG_GETARG_TEXT_P(0);
135  char *cstring = text2cstring(wkttext);
136 
138 
139  g = sfcgal_io_read_ewkt( cstring, strlen(cstring) );
140 
141  result = SFCGALPreparedGeometry2POSTGIS( g, 0 );
142  sfcgal_prepared_geometry_delete( g );
143  PG_RETURN_POINTER(result);
144 }
GSERIALIZED * SFCGALPreparedGeometry2POSTGIS(const sfcgal_prepared_geometry_t *geom, int force3D)
char * text2cstring(const text *textptr)
void sfcgal_postgis_init(void)
Here is the call graph for this function:
Here is the caller graph for this function: