452 sfcgal_geometry_t *ret_geom = NULL;
462 return sfcgal_point_create();
472 return sfcgal_linestring_create();
482 return sfcgal_triangle_create();
490 uint32_t nrings = poly->
nrings - 1;
493 return sfcgal_polygon_create();
496 ret_geom = sfcgal_polygon_create_from_exterior_ring(exterior_ring);
498 for (i = 0; i < nrings; i++)
501 sfcgal_polygon_add_interior_ring(ret_geom, ring);
513 ret_geom = sfcgal_multi_point_create();
515 ret_geom = sfcgal_multi_linestring_create();
517 ret_geom = sfcgal_multi_polygon_create();
519 ret_geom = sfcgal_geometry_collection_create();
522 for (i = 0; i < lwc->
ngeoms; i++)
525 sfcgal_geometry_collection_add_geometry(ret_geom, g);
535 ret_geom = sfcgal_polyhedral_surface_create();
537 for (i = 0; i < lwp->
ngeoms; i++)
540 sfcgal_polyhedral_surface_add_polygon(ret_geom, g);
546 return sfcgal_solid_create_from_exterior_shell(ret_geom);
556 ret_geom = sfcgal_triangulated_surface_create();
558 for (i = 0; i < lwp->
ngeoms; i++)
561 sfcgal_triangulated_surface_add_triangle(ret_geom, g);
569 lwerror(
"LWGEOM2SFCGAL: Unknown geometry type !");
sfcgal_geometry_t * LWGEOM2SFCGAL(const LWGEOM *geom)
static sfcgal_geometry_t * ptarray_to_SFCGAL(const POINTARRAY *pa, int type)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define POLYHEDRALSURFACETYPE
#define FLAGS_GET_SOLID(flags)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)