Bbox#
- class core.bbox.Bbox(ll, ur)[source]#
Bases:
objectClass to represent a boundary box
Methods:
__init__(ll, ur)Constructor of
Bbox__str__()String representation of
Bboxcopy()Copy the current object
getSrid()Return the lower-left coordinates of
BboxReturn the upper-right coordinates of
BboxgetXmin()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, append])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.ECEFCoordstoGeoCoords([base])Coordinate transformation to
core.Coords.GeoCoordstoENUCoords([base])Coordinate transformation to
core.Coords.ENUCoordsaddMargin([margin])Adding margin (relative float) to bounding box
asTuple()Transform the Bbox object in a tuple of coordinates
- __init__(ll, ur)[source]#
Constructor of
Bbox- Parameters:
ll (
Union[ENUCoords,ECEFCoords,GeoCoords]) – lower left pointur (
Union[ENUCoords,ECEFCoords,GeoCoords]) – upper right point
- __str__()[source]#
String representation of
Bbox- Return type:
str- Returns:
String representation of bbox
- getLowerLeft()[source]#
Return the lower-left coordinates of
Bbox- Return type:
Union[ENUCoords,ECEFCoords,GeoCoords]- Returns:
Lower-left coordinates
- getUpperRight()[source]#
Return the upper-right coordinates of
Bbox- Return type:
Union[ENUCoords,ECEFCoords,GeoCoords]- Returns:
Upper-right coordinates
- getDimensions()[source]#
Return Dx and Dy
- Return type:
tuple[float,float]- Returns:
Tuple with structure : (Dx, Dy)
- plot(sym='b-', append=<module 'matplotlib.pyplot' from '/usr/lib/python3/dist-packages/matplotlib/pyplot.py'>)[source]#
TODO
- translate(dx, dy)[source]#
Translation (2D) of shape
- Parameters:
dx (
float) – dx in ground unitsdy (
float) – dy in ground units
- toECEFCoords(base=None)[source]#
Coordinate transformation to
core.Coords.ECEFCoords- Parameters:
base (
Union[ENUCoords,ECEFCoords,GeoCoords,None]) – base coordinates, defaults to None
- toGeoCoords(base=None)[source]#
Coordinate transformation to
core.Coords.GeoCoords- Parameters:
base (
Union[ENUCoords,ECEFCoords,GeoCoords,None]) – base coordinates, defaults to None
- toENUCoords(base=None)[source]#
Coordinate transformation to
core.Coords.ENUCoords- Parameters:
base (
Union[ENUCoords,ECEFCoords,GeoCoords,None]) – base coordinates, defaults to None