1942 int SRID = GEOSGetSRID(
geom);
1948 hasZ = GEOSHasZ(
geom);
1950 LWDEBUG(3,
"Geometry has no Z, won't provide one");
1958 case GEOS_GEOMETRYCOLLECTION:
1959 LWDEBUG(4,
"lwgeom_from_geometry: it's a Collection or Multi");
1961 ngeoms = GEOSGetNumGeometries(
geom);
1964 geoms =
lwalloc(ngeoms *
sizeof *geoms);
1966 lwerror(
"lwtin_from_geos: can't allocate geoms");
1969 for (i=0; i<ngeoms; i++) {
1970 const GEOSGeometry *poly, *ring;
1971 const GEOSCoordSequence *cs;
1974 poly = GEOSGetGeometryN(
geom, i);
1975 ring = GEOSGetExteriorRing(poly);
1976 cs = GEOSGeom_getCoordSeq(ring);
1984 case GEOS_MULTIPOINT:
1985 case GEOS_MULTILINESTRING:
1986 case GEOS_MULTIPOLYGON:
1987 case GEOS_LINESTRING:
1988 case GEOS_LINEARRING:
1990 lwerror(
"lwtin_from_geos: invalid geometry type for tin: %d", type);
1994 lwerror(
"GEOS2LWGEOM: unknown geometry type: %d", type);
LWCOLLECTION * lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms)
#define LWDEBUG(level, msg)
#define SRID_UNKNOWN
Unknown SRID value.
LWTRIANGLE * lwtriangle_construct(int srid, GBOX *bbox, POINTARRAY *points)
void * lwalloc(size_t size)
POINTARRAY * ptarray_from_GEOSCoordSeq(const GEOSCoordSequence *cs, char want3d)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.