tonystone / geofeatures2

A lightweight, high performance geometry library in Swift.
Apache License 2.0
19 stars 4 forks source link

Intersection Matrix #193

Closed tonystone closed 5 years ago

tonystone commented 6 years ago

Adding a lot of code that will generate an intersection matrix for any two geometries. Also adding many unit tests. The geometries for which an intersection matrix can be created are: Point, MultiPoint, LineString, LinearRing, MultiLineString, Polygon and MultiPolygon. The intersection matrix is a three-by-three matrix whose definition can be found here: https://en.wikipedia.org/wiki/DE-9IM. The unit tests are not exhaustive in their coverage, but represent the bulk of cases that one would normally encounter. Note the definitions of the geometries may change, so the unit tests may have to be changed and expanded. Intersection geometries are not currently calculated or returned.

codecov[bot] commented 6 years ago

Codecov Report

Merging #193 into master will decrease coverage by 4.65%. The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #193      +/-   ##
==========================================
- Coverage   99.89%   95.23%   -4.66%     
==========================================
  Files          44       46       +2     
  Lines        1842     5377    +3535     
==========================================
+ Hits         1840     5121    +3281     
- Misses          2      256     +254
Impacted Files Coverage Δ
...urces/GeoFeatures/IntersectionMatrix+Helpers.swift 92.77% <ø> (ø)
Sources/GeoFeatures/Polygon+Geometry.swift 100% <100%> (ø) :arrow_up:
Sources/GeoFeatures/Segment.swift 100% <100%> (ø)
Sources/GeoFeatures/MultiPolygon+Geometry.swift 100% <100%> (ø) :arrow_up:
Sources/GeoFeatures/IntersectionMatrix.swift 100% <100%> (ø) :arrow_up:
tonystone commented 5 years ago

We are renaming the branch to intersection-matrix so closing this PR on the old branch.