A ConvexRegion on the unit sphere can be described by a small circle or by a set of points joined by arcs of great circles. The method addToRange returns an iterable HTMrange which contains the HTM ids of the trixels that fill up the ConvexRegion.
A nice property of these HTM ids is that at a specified level, the HTM id values for nearby trixels tend be be near each other. Thus, if you sort a set of locations on the unit sphere by their HTM id values at a specified level, searching for locations within a ConvexRegion can be reduced to searching for a modest set of HTM id ranges.
We have made substantial changes intended to simplify the code and improve reliability.
To read up on what the HTM Index is and what it is used for, please visit the HTM Home Page at the Johns Hopkins University.