Something went wrong while setting issue due date.
Simplify Rectangle construction
Closed
Simplify Rectangle construction
Move Rectangle classes to take north, east, south, west, (start, end) as input arguments.
Current implementation is to provide the centre (in space and time) and then full width, height, time extent.
This isn't necessarily challenging for spatial arguments (although perhaps unintuitive), it is however difficult for the temporal arguments.
added REFACTOR label
@ricorne: Do you think this would be better
Current
Rectangle( lon: float, # Centre longitude lat: float, # Centre latitude datetime: datetime.datetime, # Centre datetime lon_range: float, # Full range (east - west) lat_range: float, # Full range (north - south) dt: datetime.timedelta, # Full time range (end - start) )
Calculating central datetime and timedelta ranges is not trivial
Proposed
Rectangle( west: float, east: float, south: float, north: float, start: datetime.datetime, end: datetime.datetime, )
Can then do
boundary = Rectangle(-180, 180, -90, 90, datetime(2009, 1, 1, 0, 0), datetime(2009, 12, 31, 23, 59)) ot = OctTree(boundary=boundary) ...
mentioned in merge request !9 (merged)
mentioned in commit 0f8df82e
closed via merge request !9 (merged)
Please register or sign in to reply