#NEWLINE# def write_boundingbox( bbox , nsmap ) : #NEWLINE# #INDENT# ' Generate ows:BoundingBox ' #NEWLINE# if ( bbox is not None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# bbox2 = util . wkt2geom ( bbox ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if ( len ( bbox2 ) == 4 ) : #NEWLINE# #INDENT# boundingbox = etree . Element ( util . nspath_eval ( 'ows:BoundingBox' , nsmap ) , crs = 'urn:x-ogc:def:crs:EPSG:6.11:4326' , dimensions = '2' ) #NEWLINE# etree . SubElement ( boundingbox , util . nspath_eval ( 'ows:LowerCorner' , nsmap ) ) . text = ( '%s %s' % ( bbox2 [ 1 ] , bbox2 [ 0 ] ) ) #NEWLINE# etree . SubElement ( boundingbox , util . nspath_eval ( 'ows:UpperCorner' , nsmap ) ) . text = ( '%s %s' % ( bbox2 [ 3 ] , bbox2 [ 2 ] ) ) #NEWLINE# return boundingbox #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return None