#NEWLINE# def cascaded_union( self , geoms ) : #NEWLINE# #INDENT# 'Returns the union of a sequence of geometries\n\n        This is the most efficient method of dissolving many polygons.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# L = len ( geoms ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# geoms = [ geoms ] #NEWLINE# L = 1 #NEWLINE# #UNINDENT# subs = ( c_void_p * L ) ( ) #NEWLINE# for ( i , g ) in enumerate ( geoms ) : #NEWLINE# #INDENT# subs [ i ] = g . _geom #NEWLINE# #UNINDENT# collection = lgeos . GEOSGeom_createCollection ( 6 , subs , L ) #NEWLINE# return geom_factory ( lgeos . methods [ 'cascaded_union' ] ( collection ) )