Definition at line 445 of file liblwgeom/lwgeom_sfcgal.c.
References COLLECTIONTYPE, LWPSURFACE::flags, FLAGS_GET_SOLID, LWCOLLECTION::geoms, LWPSURFACE::geoms, LWTIN::geoms, LINETYPE, lwerror(), LWGEOM2SFCGAL(), lwgeom_is_empty(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, LWCOLLECTION::ngeoms, LWPSURFACE::ngeoms, LWTIN::ngeoms, LWPOLY::nrings, LWPOINT::point, LWLINE::points, LWTRIANGLE::points, POINTTYPE, POLYGONTYPE, POLYHEDRALSURFACETYPE, ptarray_to_SFCGAL(), LWPOLY::rings, TINTYPE, TRIANGLETYPE, and LWGEOM::type.
Referenced by LWGEOM2SFCGAL(), lwgeom_sfcgal_noop(), POSTGIS2SFCGALGeometry(), and POSTGIS2SFCGALPreparedGeometry().
448 sfcgal_geometry_t* ret_geom = NULL;
488 ret_geom = sfcgal_polygon_create_from_exterior_ring(exterior_ring);
490 for (i = 0; i < nrings; i++)
493 sfcgal_polygon_add_interior_ring(ret_geom, ring);
505 else if (geom->
type ==
MULTILINETYPE) ret_geom = sfcgal_multi_linestring_create();
507 else ret_geom = sfcgal_geometry_collection_create();
510 for (i = 0; i < lwc->
ngeoms; i++)
513 sfcgal_geometry_collection_add_geometry(ret_geom, g);
523 ret_geom = sfcgal_polyhedral_surface_create();
525 for (i = 0; i < lwp->
ngeoms; i++)
528 sfcgal_polyhedral_surface_add_polygon(ret_geom, g);
534 return sfcgal_solid_create_from_exterior_shell(ret_geom);
544 ret_geom = sfcgal_triangulated_surface_create();
546 for (i = 0; i < lwp->
ngeoms; i++)
549 sfcgal_triangulated_surface_add_triangle(ret_geom, g);
557 lwerror(
"LWGEOM2SFCGAL: Unknown geometry type !");
static sfcgal_geometry_t * ptarray_to_SFCGAL(const POINTARRAY *pa, int type)
#define POLYHEDRALSURFACETYPE
#define FLAGS_GET_SOLID(flags)
sfcgal_geometry_t * LWGEOM2SFCGAL(const LWGEOM *geom)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members) ...
void lwerror(const char *fmt,...)
Write a notice out to the error handler.