SpatioTemporal / pystare

The Python interface for the SpatioTemporal Adaptive Resolution Encoding (STARE), a unified indexing for geolocated data.
https://pystare.readthedocs.io/en/latest/
12 stars 2 forks source link

Temporal update - intersection/union if overlap routines fixed. #116

Closed michaelleerilee closed 1 year ago

michaelleerilee commented 1 year ago

The PySTARE.cpp wrapper used in temporal_value_intersection_if_overlap() and temporal_value_union_if_overlap() did not correctly handle the exceptions thrown when there was no overlap. As a hack, these functions now return a -1 (an invalid TIV) when two TIVs do not overlap.

As an aside, these routines return temporal covers for their intersection and unions, which may be a larger temporal interval than we'd naively expect just by combining the temporal interval. That is because the resolutions change by a factor of 2 for each increase or decrease in their (integer) value.

NiklasPhabian commented 1 year ago

Let me see whats up with the failed test. I might have introduced the problem.

NiklasPhabian commented 1 year ago

curious. GH seems to now install STARE at /home/runner/g/include/ and /home/runner/g/lib/. It was previously installed to /home/runner/stare/. Need to verify if this was a GH update or if we messed around with our prebuild script. We might use this opportunity to install STARE from conda-forge rather than have GH build it.

NiklasPhabian commented 1 year ago

so odd. I must have accidentially replaced "stare" with "g" in https://github.com/SpatioTemporal/pystare/commit/3c8c46a7bfb1cc1526cd0c3e3917e5a9e28400cd

NiklasPhabian commented 1 year ago

@michaelleerilee , do you have 5 lines of python code that used to trigger the error before the fix? Would love to include a test before closing this