#NEWLINE# def write_extent( bbox ) : #NEWLINE# #INDENT# ' Generate BBOX extent ' #NEWLINE# if ( bbox is not None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# bbox2 = util . wkt2geom ( bbox ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# spdom = etree . Element ( 'spdom' ) #NEWLINE# bounding = etree . SubElement ( spdom , 'bounding' ) #NEWLINE# etree . SubElement ( bounding , 'westbc' ) . text = str ( bbox2 [ 0 ] ) #NEWLINE# etree . SubElement ( bounding , 'eastbc' ) . text = str ( bbox2 [ 2 ] ) #NEWLINE# etree . SubElement ( bounding , 'northbc' ) . text = str ( bbox2 [ 3 ] ) #NEWLINE# etree . SubElement ( bounding , 'southbc' ) . text = str ( bbox2 [ 1 ] ) #NEWLINE# return spdom #NEWLINE# #UNINDENT# return None