Add tests for 5 nearest/point-on algorithms (#20)#83
Open
trasch wants to merge 2 commits into
Open
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
21 tests across 5 suites for previously untested algorithms.
NearestPointTests (4 tests)
nearestPointLineString— nearest coordinate to referencenearestPointMultiPoint— nearest among multipointnearestPointFeature— nearest point via FeaturenearestPointEmpty— empty geometry → nilNearestPointOnFeatureTests (5 tests)
nearestOnLineString— nearest on line segment surfacenearestOnPolygonInside— inside → distance 0nearestOnPolygonOutside— nearest on boundarynearestOnFeature— via Feature wrappernearestOnMultiPoint— nearest point among setNearestPointToLineTests (3 tests)
nearestCoordinateOutOf— closest candidate to linenearestPointAndDistance— Point variantnearestCoordinateOutOfEmpty— empty candidates → nilPointOnFeatureTests (5 tests)
pointOnPoint— returns the point itselfpointOnLineString— centroid on segmentpointOnPolygon— point on polygon surfacepointOnMultiPolygon— point on multipolygon surfacepointOnFeature— via Feature wrapperPointsWithinPolygonTests (4 tests)
coordinatesWithin— filter with inside/outside/mixedpointsWithin— Point variantpointsWithinMultiPolygon— MultiPolygoncoordinatesWithinEmpty— empty candidatesTest results
287 tests pass across 64 suites (+21 new).
Closes #20