Skip to content

correctness fixes

Latest
Compare
Choose a tag to compare
@jillesvangurp jillesvangurp released this 30 May 10:18
· 13 commits to master since this release

This release and the previous one tweaks a few of the algorithms for edge cases related to polygon containment and intersection:

  • intersects now handles fully contained shapes (whoops)
  • polygonContains now correctly handles points that are on the lines of the outer polygon, this is an edge case but a nice one
  • Geometry.contains now respects holes. This was never implemented

Other changes:

  • new randomPoints extension function on Geometry that may be used for testing. It produces a sequence of points.
  • equirectangular distance for when haversine is too slow. Fine over short distances but don't use over larger distances
  • one of the distance functions has been renamed to make it clear it measures distance to a line