Bbox#
- class tracklib.core.Bbox.Bbox(ll, ur)[source]#
Bases:
object
Class to represent a boundary box
Methods:
__init__
(ll, ur)Constructor of
Bbox
__str__
()String representation of
Bbox
copy
()Copy the current object
Return the lower-left coordinates of
Bbox
Return the upper-right coordinates of
Bbox
getXmin
()Return the min X coordinate
getYmin
()Return the min Y coordinate
getXmax
()Return the max X coordinate
getYmax
()Return the max Y coordinate
getDx
()Return the difference of X coordinates
getDy
()Return the difference of Y coordinates
Return Dx and Dy
setXmin
(xmin)Set Xmin coordinate
setYmin
(ymin)Set Ymin coordinate
setXmax
(xmax)Set Xmax coordinate
setYmax
(ymax)Set Ymax coordinate
plot
([sym])TODO
contains
(point)Check if a point is in the bbox
translate
(dx, dy)Translation (2D) of shape
rotate
(theta)Rotation (2D) of shape
scale
(h)Homothetic transformation (2D) of shape
geom
()Convert to Geometrics (Polygon)
toECEFCoords
([base])Coordinate transformation to
core.Coords.ECEFCoords
toGeoCoords
([base])Coordinate transformation to
core.Coords.GeoCoords
toENUCoords
([base])Coordinate transformation to
core.Coords.ENUCoords
addMargin
([margin])Adding margin (relative float) to bounding box
asTuple
()Transform the Bbox object in a tuple of coordinates
- __str__()[source]#
String representation of
Bbox
- Return type
str
- Returns
String representation of bbox
- getDimensions()[source]#
Return Dx and Dy
- Return type
tuple
[float
,float
]- Returns
Tuple with structure : (Dx, Dy)
- translate(dx, dy)[source]#
Translation (2D) of shape
- Parameters
dx (
float
) – dx in ground unitsdy (
float
) – dy in ground units