Get the bounding box (bottom left and top right coordinates) for a net;
        Coordinates are in X and Y (not Lat and Lon)

        :return [(bottom_left_X, bottom_left_Y), (top_right_X, top_right_Y)]
484824
def getBBoxXY(self):
        
        return [(self._ranges[0][0], self._ranges[1][0]),
                (self._ranges[0][1], self._ranges[1][1])]
234913
def boundingRect( self ):
        
        rect = super(XNode, self).boundingRect()
        
        pad = self.highlightPadding()
        x = rect.x() - pad / 2.0
        y = rect.y() - pad / 2.0
        w = rect.width() + pad
        h = rect.height() + pad
        
        return QRectF( x, y, w, h )
825502
def bounding_box(self):
        

        # We use the solution described in http://stackoverflow.com/a/88020
        # which is to use the parametric equation of an ellipse and to find
        # when dx/dt or dy/dt=0.

        cos_angle = np.cos(self.angle)
        sin_angle = np.sin(self.angle)
        tan_angle = np.tan(self.angle)

        t1 = np.arctan(-self.height * tan_angle / self.width)
        t2 = t1 + np.pi * u.rad

        dx1 = 0.5 * self.width * cos_angle * np.cos(t1) - 0.5 * self.height * sin_angle * np.sin(t1)
        dx2 = 0.5 * self.width * cos_angle * np.cos(t2) - 0.5 * self.height * sin_angle * np.sin(t2)

        if dx1 > dx2:
            dx1, dx2 = dx2, dx1

        t1 = np.arctan(self.height / tan_angle / self.width)
        t2 = t1 + np.pi * u.rad

        dy1 = 0.5 * self.height * cos_angle * np.sin(t1) + 0.5 * self.width * sin_angle * np.cos(t1)
        dy2 = 0.5 * self.height * cos_angle * np.sin(t2) + 0.5 * self.width * sin_angle * np.cos(t2)

        if dy1 > dy2:
            dy1, dy2 = dy2, dy1

        xmin = self.center.x + dx1
        xmax = self.center.x + dx2
        ymin = self.center.y + dy1
        ymax = self.center.y + dy2

        return BoundingBox.from_float(xmin, xmax, ymin, ymax)
1368741
def bounds (self):
    
    if self._dirty:
      min = self.vertices[0].copy()
      max = self.vertices[0].copy()
      for point in self.vertices[1:]:
        if point.x < min.x: min.x = point.x
        if point.y < min.y: min.y = point.y
        if point.x > max.x: max.x = point.x
        if point.y > max.y: max.y = point.y

      self._bounds = Rect(min, max)
    self._dirty  = False

    return self._bounds
18286
def get_bounding_box(self):
        
        if len(self.elements) == 0:
            return None
        if not (self._bb_valid and
                all(ref._bb_valid for ref in self.get_dependencies(True))):
            bb = numpy.array(((1e300, 1e300), (-1e300, -1e300)))
            all_polygons = []
            for element in self.elements:
                if isinstance(element, PolygonSet):
                    all_polygons.extend(element.polygons)
                elif isinstance(element, CellReference) or isinstance(
                        element, CellArray):
                    element_bb = element.get_bounding_box()
                    if element_bb is not None:
                        bb[0, 0] = min(bb[0, 0], element_bb[0, 0])
                        bb[0, 1] = min(bb[0, 1], element_bb[0, 1])
                        bb[1, 0] = max(bb[1, 0], element_bb[1, 0])
                        bb[1, 1] = max(bb[1, 1], element_bb[1, 1])
            if len(all_polygons) > 0:
                all_points = numpy.concatenate(all_polygons).transpose()
                bb[0, 0] = min(bb[0, 0], all_points[0].min())
                bb[0, 1] = min(bb[0, 1], all_points[1].min())
                bb[1, 0] = max(bb[1, 0], all_points[0].max())
                bb[1, 1] = max(bb[1, 1], all_points[1].max())
            self._bb_valid = True
            _bounding_boxes[self] = bb
        return _bounding_boxes[self]
384426
def get_bounds(locations, lonlat=False):
    
    bounds = [[None, None], [None, None]]
    for point in iter_coords(locations):
        bounds = [
            [
                none_min(bounds[0][0], point[0]),
                none_min(bounds[0][1], point[1]),
            ],
            [
                none_max(bounds[1][0], point[0]),
                none_max(bounds[1][1], point[1]),
            ],
        ]
    if lonlat:
        bounds = _locations_mirror(bounds)
    return bounds
700057
def get_bbox(self):
        """"""

        x_min = self.x
        x_max = x_min + self.width
        y_min = self.y
        y_max = self.y + self.height

        return x_min, x_max, y_min, y_max
388241
def bounding_box(self):
        
        if self.world_coords:
            return self.world_obj.findSolid().BoundingBox()
        return self.local_obj.findSolid().BoundingBox()
734716
private int[] getIntBounds(BoundingBox coordbounds) {
		int[] bs = new int[6];
		bs[0] = getFloor(coordbounds.xmin);
		bs[1] = getFloor(coordbounds.ymin);
		bs[2] = getFloor(coordbounds.zmin);
		bs[3] = getFloor(coordbounds.xmax);
		bs[4] = getFloor(coordbounds.ymax);
		bs[5] = getFloor(coordbounds.zmax);
		return bs;
	}
771310
def bounding_box(lat, lng, zoom)
      top, left = MapKit.shift_latlng(lat, lng, @shift_x - @peak_x, @shift_y - @peak_y, zoom)
      bottom, right = MapKit.shift_latlng(top, left, @width, @height, zoom)
      MapKit::BoundingBox.new(top, left, bottom, right, zoom)
    end
427481
def bounding_boxes(self):
        

        cos_theta = np.cos(self.theta)
        sin_theta = np.sin(self.theta)
        ax = self.a_out * cos_theta
        ay = self.a_out * sin_theta
        bx = self.b_out * -sin_theta
        by = self.b_out * cos_theta
        dx = np.sqrt(ax*ax + bx*bx)
        dy = np.sqrt(ay*ay + by*by)

        xmin = self.positions[:, 0] - dx
        xmax = self.positions[:, 0] + dx
        ymin = self.positions[:, 1] - dy
        ymax = self.positions[:, 1] + dy

        return [BoundingBox._from_float(x0, x1, y0, y1)
                for x0, x1, y0, y1 in zip(xmin, xmax, ymin, ymax)]
499596
def bounding_box(dset):
    ''''''
    o = nl.run(["3dAutobox","-input",dset])
    ijk_coords = re.findall(r'[xyz]=(\d+)\.\.(\d+)',o.output)
    from_rai = ijk_to_xyz(dset,[float(x[0]) for x in ijk_coords])
    to_rai = ijk_to_xyz(dset,[float(x[1]) for x in ijk_coords])
    return (from_rai,to_rai)
190917
function BoundingBox2D( xMin , yMin , xMax , yMax ) {
	this.min = new Vector2D( xMin , yMin ) ;
	this.max = new Vector2D( xMax , yMax ) ;
}
618455
def in?(bounding_box)
      top, left, bottom, right = bounding_box.coords
      (left..right) === @lng && (top..bottom) === @lat
    end
282630
def bounding_box(obj):
    '''
    '''
    return np.array([np.min(obj.points[:, 0:3], axis=0),
                     np.max(obj.points[:, 0:3], axis=0)])
809942
def bounding_box
      unless @bbox
        p = @points[0]
        minX = p[0]
        maxX = p[0]
        minY = p[1]
        maxY = p[1]
        minZ = p[2]
        maxZ = p[2]
        @points.each{|p|
          minX = p[0] if p[0] < minX  
          maxX = p[0] if p[0] > maxX  
          minY = p[1] if p[1] < minY  
          maxY = p[1] if p[1] > maxY  
          minZ = p[2] if p[2] < minZ  
          maxZ = p[2] if p[2] > maxZ  
        }
        @max = Vector[maxX, maxY,maxZ]
        @min = Vector[minX, minY, minZ]
        @bbox = Volume.new([Plane.new(-1,0,0, minX, minY, minZ), 
                           Plane.new(0,-1,0, minX, minY, minZ),
                           Plane.new(0,0,-1, minX, minY, minZ),
                           Plane.new(1,0,0, maxX, maxY, maxZ),
                           Plane.new(0,1,0, maxX, maxY, maxZ), 
                           Plane.new(0,0,1, maxX, maxY, maxZ)])
      end
      @bbox
    end
592597
def GetStopsInBoundingBox(self, north, east, south, west, n):
    """"""
    stop_list = []
    for s in self.stops.values():
      if (s.stop_lat <= north and s.stop_lat >= south and
          s.stop_lon <= east and s.stop_lon >= west):
        stop_list.append(s)
        if len(stop_list) == n:
          break
    return stop_list