#NEWLINE# def load_polygons( geom_files ) : #NEWLINE# #INDENT# '\n    Loads WKT polygons from one or more text files.\n    \n    Returns a Shapely MultiPolygon with\n    the loaded geometries.\n    ' #NEWLINE# polygons = [ ] #NEWLINE# if isinstance ( geom_files , basestring ) : #NEWLINE# #INDENT# geom_files = [ geom_files ] #NEWLINE# #UNINDENT# for geom_file in geom_files : #NEWLINE# #INDENT# with codecs . open ( geom_files , encoding = 'utf-8-sig' ) as f : #NEWLINE# #INDENT# polygons . extend ( load_polygon_lines ( f , source = geom_files ) ) #NEWLINE# #UNINDENT# #UNINDENT# return polygons