original_docstring: 
      create a polygon geometry from bounding-box bbox, given by
      a set of two points, spanning a polygon area
  
      bbox : list
          list of coordinates representing the rectangle-region-of-interest
          in the format of [(left, lower), (right, upper)]
      osr_spref : OGRSpatialReference
          spatial reference of the coordinates in bbox
      segment : float
          for precision: distance of longest segment of the geometry polygon
          in units of input osr_spref
  
      Returns
      -------
      geom_area : OGRGeometry
          a geometry representing the input bbox as
          a) polygon-geometry when defined by a rectangle bbox
          b) point-geometry when defined by bbox through tuples of coordinates
      
docstring: create a polygon geometry from bounding-box bbox, given by
  a set of two points, spanning a polygon area
  
  bbox : list
  list of coordinates representing the rectangle-region-of-interest
  in the format of [(left, lower), (right, upper)]
  osr_spref : OGRSpatialReference
  spatial reference of the coordinates in bbox
  segment : float
  for precision: distance of longest segment of the geometry polygon
  in units of input osr_spref
  
  Returns
  
  geom_area : OGRGeometry
  a geometry representing the input bbox as
  a) polygon-geometry when defined by a rectangle bbox
  b) point-geometry when defined by bbox through tuples of coordinates
docstring_tokens: create a polygon geometry from bounding - box bbox given by a set of two points spanning a polygon area bbox : list list of coordinates representing the rectangle - region - of - interest in the format of [ ( left lower ) ( right upper ) ] osr_spref : OGRSpatialReference spatial reference of the coordinates in bbox segment : float for precision : distance of longest segment of the geometry polygon in units of input osr_spref Returns geom_area : OGRGeometry a geometry representing the input bbox as a ) polygon - geometry when defined by a rectangle bbox b ) point - geometry when defined by bbox through tuples of coordinates
code: def bbox2polygon(bbox, osr_spref, segment=None):
      """
      create a polygon geometry from bounding-box bbox, given by
      a set of two points, spanning a polygon area
  
      bbox : list
          list of coordinates representing the rectangle-region-of-interest
          in the format of [(left, lower), (right, upper)]
      osr_spref : OGRSpatialReference
          spatial reference of the coordinates in bbox
      segment : float
          for precision: distance of longest segment of the geometry polygon
          in units of input osr_spref
  
      Returns
      -------
      geom_area : OGRGeometry
          a geometry representing the input bbox as
          a) polygon-geometry when defined by a rectangle bbox
          b) point-geometry when defined by bbox through tuples of coordinates
      """
  
      bbox2 = deepcopy(bbox)
  
      # wrap around dateline (considering left-lower and right-upper logic).
      if bbox2[0][0] > bbox2[1][0]:
          bbox2[1] = (bbox2[1][0] + 360, bbox2[1][1])
  
      corners = [(float(bbox2[0][0]), float(bbox2[0][1])),
                 (float(bbox2[0][0]), float(bbox2[1][1])),
                 (float(bbox2[1][0]), float(bbox2[1][1])),
                 (float(bbox2[1][0]), float(bbox2[0][1]))]
  
      return create_polygon_geometry(corners, osr_spref, segment=segment)
code_tokens: def bbox2polygon ( bbox , osr_spref , segment = None ) : bbox2 = deepcopy ( bbox ) if bbox2 [ 0 ] [ 0 ] > bbox2 [ 1 ] [ 0 ] : bbox2 [ 1 ] = ( bbox2 [ 1 ] [ 0 ] + 360 , bbox2 [ 1 ] [ 1 ] ) corners = [ ( float ( bbox2 [ 0 ] [ 0 ] ) , float ( bbox2 [ 0 ] [ 1 ] ) ) , ( float ( bbox2 [ 0 ] [ 0 ] ) , float ( bbox2 [ 1 ] [ 1 ] ) ) , ( float ( bbox2 [ 1 ] [ 0 ] ) , float ( bbox2 [ 1 ] [ 1 ] ) ) , ( float ( bbox2 [ 1 ] [ 0 ] ) , float ( bbox2 [ 0 ] [ 1 ] ) ) ] return create_polygon_geometry ( corners , osr_spref , segment = segment )
short_docstring: create a polygon geometry from bounding-box bbox, given by
  a set of two points, spanning a polygon area
short_docstring_tokens: create a polygon geometry from bounding - box bbox given by a set of two points spanning a polygon area
comment: """
      create a polygon geometry from bounding-box bbox, given by
      a set of two points, spanning a polygon area
  
      bbox : list
          list of coordinates representing the rectangle-region-of-interest
          in the format of [(left, lower), (right, upper)]
      osr_spref : OGRSpatialReference
          spatial reference of the coordinates in bbox
      segment : float
          for precision: distance of longest segment of the geometry polygon
          in units of input osr_spref
  
      Returns
      -------
      geom_area : OGRGeometry
          a geometry representing the input bbox as
          a) polygon-geometry when defined by a rectangle bbox
          b) point-geometry when defined by bbox through tuples of coordinates
      """$SEP$# wrap around dateline (considering left-lower and right-upper logic).