(ob)
return (lgeos.GEOSGeom_createCollection(7, subs, L), N)
Creates a GEOS GeometryCollection from a list of geometries
Creates a GEOS GeometryCollection from a list of geometries
Creates a GEOS GeometryCollection from a list of geometries
def geos_geometrycollection_from_py(ob):
    """Creates a GEOS GeometryCollection from a list of geometries"""
    L = len(ob)
    N = 2
    subs = (c_void_p * L)()
    for l in range(L):
        assert(isinstance(ob[l], BaseGeometry))
        if ob[l].has_z:
            N = 3
        geom, n = geos_geom_from_py(ob[l])
        subs[l] = geom
    
    return (lgeos.GEOSGeom_createCollection(7, subs, L), N)
def geos_geometrycollection_from_py ( ob ) : L = len ( ob ) N = 2 subs = ( c_void_p * L ) ( ) for l in range ( L ) : assert ( isinstance ( ob [ l ] , BaseGeometry ) ) if ob [ l ] . has_z : N = 3 geom , n = geos_geom_from_py ( ob [ l ] ) subs [ l ] = geom return ( lgeos . GEOSGeom_createCollection ( 7 , subs , L ) , N )