Skip to content

Add tests for 5 nearest/point-on algorithms (#20)#83

Open
trasch wants to merge 2 commits into
mainfrom
20_multiple_tests
Open

Add tests for 5 nearest/point-on algorithms (#20)#83
trasch wants to merge 2 commits into
mainfrom
20_multiple_tests

Conversation

@trasch
Copy link
Copy Markdown
Contributor

@trasch trasch commented May 8, 2026

Summary

21 tests across 5 suites for previously untested algorithms.

NearestPointTests (4 tests)

  • nearestPointLineString — nearest coordinate to reference
  • nearestPointMultiPoint — nearest among multipoint
  • nearestPointFeature — nearest point via Feature
  • nearestPointEmpty — empty geometry → nil

NearestPointOnFeatureTests (5 tests)

  • nearestOnLineString — nearest on line segment surface
  • nearestOnPolygonInside — inside → distance 0
  • nearestOnPolygonOutside — nearest on boundary
  • nearestOnFeature — via Feature wrapper
  • nearestOnMultiPoint — nearest point among set

NearestPointToLineTests (3 tests)

  • nearestCoordinateOutOf — closest candidate to line
  • nearestPointAndDistance — Point variant
  • nearestCoordinateOutOfEmpty — empty candidates → nil

PointOnFeatureTests (5 tests)

  • pointOnPoint — returns the point itself
  • pointOnLineString — centroid on segment
  • pointOnPolygon — point on polygon surface
  • pointOnMultiPolygon — point on multipolygon surface
  • pointOnFeature — via Feature wrapper

PointsWithinPolygonTests (4 tests)

  • coordinatesWithin — filter with inside/outside/mixed
  • pointsWithin — Point variant
  • pointsWithinMultiPolygon — MultiPolygon
  • coordinatesWithinEmpty — empty candidates

Test results

287 tests pass across 64 suites (+21 new).


Closes #20

trasch added 2 commits May 8, 2026 18:41
…to-line, point-on-feature, points-within-polygon (#20)

21 tests across 5 suites. Covers nearest coordinate/point
lookup, nearest point on feature boundary, nearest candidate
to line, point guaranteed on feature surface, and filtering
points within polygon boundaries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for nearest-point, nearest-point-on-feature, nearest-point-to-line, point-on-feature and points-within-polygon

1 participant