SpatioTemporal / STARE

SpatioTemporal Adaptive Resolution Encoding, a unifying index for geo-located data.
Other
10 stars 7 forks source link

htmInterface::setPolyCorner doesn't correctly add points on edges #31

Closed michaelleerilee closed 4 years ago

michaelleerilee commented 5 years ago

htmInterface::setPolyCorner has trouble handling adding points to a hull that lie on an existing edge.

michaelleerilee commented 5 years ago

I've added code that checks to see if a new point is colinear with two others. If the new point is in between the other two, it is discarded. If it is outside, it is retained and another point is removed.

michaelleerilee commented 5 years ago

setPolyCorner is somewhat sensitive to error with colinear points. I've added a hard-coded tolerance which seems to help. I wonder how others handle this problem.

michaelleerilee commented 5 years ago

Added several unit tests for this.