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.
Motivation and Context
This PR adds functions to test for point-region membership and point collection-region membership with a weighting factor, to account for possibly nested regions. If a point is only found in a single region, its weighting in that region is 1.
Otherwise, each region is assigned a weighting that is inversely proportional to the area of a particular region containing the point. The weighting is calculated like so :
`
where
region_area` is the area of a specific region the point is found in and total_region_area is the total area of all regions that point is found in.For collections of points that are assumed to belong to the same construct, the region membership check has been modified to give
a weighting value only to the innermost (i.e. smallest area) region in nested regions. In other words, in the case of nested regions, a point is only considered found in the innermost region.the same weighting value to all regions containing a particular point. In the case of nested regions, this may result in an object being fully contained within the containing region, while only partially contained within the nested internal region.How Has This Been Tested
Locally c++ and python tests. Python test modified to verify that with non-nested regions it returns the same result as the non-weighted versions
Types of changes
Checklist