mas_intersect_polygons() doesn't handle edge cases for time range overlaps
Closed this issue · 0 comments
edisonguo commented
PostgresSQL OVERLAPS bounds are non-inclusive at the top end: start <= time < end. The po_stamp_min and po_stamp_max columns form a range of [t_min, t_max) in the MAS database. Let [t0, t1) denote the requested time range from gsky. We have two possible edge cases for time range overlaps:
- t1 == t_min, therefore [t0, t1 + 1 second) will intersect [t_min, t_max) -> this is handled by the current mas_intersect_polygon() code
- t0 == t_max. mas_intersect_polygon() will not be able to handle this case because of the t_max is on the half-open side of the range therefore no overlapping.