Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OverlayNG code #599

Merged
merged 366 commits into from
Sep 22, 2020
Merged
Changes from 1 commit
Commits
Show all changes
366 commits
Select commit Hold shift + click to select a range
91f118a
Add OverlayNG.reducePrecision
dr-jts Sep 27, 2019
9271f9d
Rename OverlayNGOp
dr-jts Sep 30, 2019
ea13873
Rename Edge.createLabel
dr-jts Sep 30, 2019
d76c639
Add line merging
dr-jts Oct 1, 2019
0bf18ed
Fix line merging to track input direction
dr-jts Oct 1, 2019
a1276d9
Rename back to OverlayNG
dr-jts Oct 1, 2019
79d903f
Code cleanup
dr-jts Oct 1, 2019
9bf170f
Add SegmentExtractingNoder
dr-jts Oct 2, 2019
b09296b
Add auto precision model
dr-jts Oct 2, 2019
a37c026
Improve doc
dr-jts Oct 2, 2019
9f20b89
minor format change
dr-jts Oct 2, 2019
dbfbd72
Add FastSnapRounder
dr-jts Oct 2, 2019
677a2b1
Code cleanup, doc
dr-jts Oct 2, 2019
fd6df35
Add differenceAuto function
dr-jts Oct 2, 2019
9e59d35
Move unionCoverage function
dr-jts Oct 3, 2019
c39e2d5
Fix OverlayNG functions
dr-jts Oct 3, 2019
4597d18
Add Scale class for auto-scaling
dr-jts Oct 5, 2019
b8ee7bd
Fix Scale inherent scale computation
dr-jts Oct 7, 2019
0a63179
Add Intersection disjoint optimization
dr-jts Oct 7, 2019
813fb13
Improve line clipping, with covers optimization
dr-jts Oct 7, 2019
763e4ee
Fix Scale to handle null B
dr-jts Oct 8, 2019
7acd986
Renaming
dr-jts Oct 8, 2019
2315bef
Add OverlayOpt test functions
dr-jts Oct 8, 2019
40edfb3
Fix rebase error
dr-jts Oct 8, 2019
db57b29
Code cleanup
dr-jts Oct 9, 2019
35ccb9c
Improve ONG perf test
dr-jts Oct 10, 2019
c900606
Refine ONG performance tests
dr-jts Oct 11, 2019
dacbdf6
Add FastOverlayFilter
dr-jts Oct 30, 2019
431ff13
Fix update sequence bug in Edge.merge
dr-jts Oct 31, 2019
68aa172
Refactoring and doc
dr-jts Oct 31, 2019
2b62593
Javadoc
dr-jts Oct 31, 2019
058b21d
Javadoc
dr-jts Oct 31, 2019
2ab2c1e
Refactor OverlayNG API
dr-jts Nov 1, 2019
f05afba
Add private constructors to function classes
dr-jts Nov 1, 2019
06f366d
Add/update unit tests
dr-jts Nov 2, 2019
3136159
Add PrecisionReducer unit test
dr-jts Nov 2, 2019
50e8d55
Reorder method params
dr-jts Nov 2, 2019
876aa53
Add UnaryUnionNG unit test
dr-jts Nov 2, 2019
45c56d5
Javadoc
dr-jts Nov 2, 2019
9b327ba
Javadoc
dr-jts Nov 2, 2019
eacb966
Renaming Overlay methods
dr-jts Nov 4, 2019
8d57d9e
Code clarifying
dr-jts Nov 4, 2019
b27e93f
Rework ring clipping
dr-jts Nov 6, 2019
1f93f3b
Add RingClipper tests
dr-jts Nov 6, 2019
1f2bc0e
Add RingClipper tests
dr-jts Nov 7, 2019
d2454ed
Clean up OverlayNGTest functions
dr-jts Nov 7, 2019
bfdceca
Minor refactor
dr-jts Nov 7, 2019
7f981c8
Refactoring, javadoc
dr-jts Nov 7, 2019
3d94e41
Add UnaryUnion test
dr-jts Nov 7, 2019
fd193ad
Add check for B edges
dr-jts Nov 7, 2019
d3539df
Remove obsolete OverlayEdge.setLocationLine method
dr-jts Nov 8, 2019
4442ff3
Refactoring- method name changes, param order
dr-jts Nov 8, 2019
763d391
Javadoc
dr-jts Nov 8, 2019
abfe50a
Refactoring
dr-jts Nov 8, 2019
6b48771
Refactoring
dr-jts Nov 8, 2019
7e3a32e
Minor changes to perf test
dr-jts Nov 8, 2019
6849c92
Renames, Javadoc
dr-jts Nov 12, 2019
ac17d93
Removed unused MaximalEdgeRing.isValid()
dr-jts Nov 12, 2019
bbc9b19
Javadoc
dr-jts Nov 12, 2019
69c3fdd
Refactor MaximalEdgeRing methods
dr-jts Nov 12, 2019
1d0bc6b
Refactor MaximalEdgeRing methods
dr-jts Nov 12, 2019
ccc6e14
Renaming, javadoc
dr-jts Nov 12, 2019
b84e997
Refactor overlay code
dr-jts Nov 13, 2019
554f22a
Javadoc
dr-jts Nov 13, 2019
a3b45a9
Refactor OverlayLabeller
dr-jts Nov 13, 2019
1008c82
Moving methods around
dr-jts Nov 14, 2019
27e5969
Javadoc
dr-jts Nov 14, 2019
1ed1d2d
Add LineLimiter to OverlayNoder for optimization
dr-jts Nov 14, 2019
01efe25
Remove unneeded unit test
dr-jts Nov 14, 2019
db8e6f1
Fix LineLimiter and add tests
dr-jts Nov 15, 2019
5e067ca
Javadoc
dr-jts Nov 15, 2019
0e8c7a2
Remove ring clipping #pts optimization, since it doesn't work
dr-jts Nov 15, 2019
83aa340
Javadoc
dr-jts Nov 15, 2019
9725f12
Package doc
dr-jts Nov 16, 2019
5417cec
Package doc
dr-jts Nov 18, 2019
da398dd
Javadoc, remove unused methods
dr-jts Nov 18, 2019
b829227
Package doc
dr-jts Nov 19, 2019
bc6b0dc
Refactoring of top-level overlay code
dr-jts Nov 19, 2019
6972258
Add OverlayPoints functionality
dr-jts Nov 19, 2019
a554a26
Javadoc
dr-jts Nov 21, 2019
5cca62f
Improve OverlayNGOptFunctions to remove slow autoPM
dr-jts Apr 23, 2020
2a72f62
Add test case
dr-jts Apr 23, 2020
a6823cc
Refactor AutoPM functions
dr-jts Apr 27, 2020
946271d
Renaming and Javadoc
dr-jts Apr 30, 2020
a0661fc
Javadoc
dr-jts Apr 30, 2020
63127c9
Add OverlayFuzzer
dr-jts Apr 30, 2020
51fef94
Javadoc
dr-jts Apr 30, 2020
d18058a
Javadoc
dr-jts Apr 30, 2020
522a0d7
Fix LineBuilder bug
dr-jts Apr 30, 2020
61f6e30
Improve LineBuilder logic
dr-jts May 1, 2020
4b839b5
Add IntersectionPointBuilder
dr-jts May 1, 2020
0ceeaae
Javadoc
dr-jts May 1, 2020
259c8d5
Refactor OverlayNG functions
dr-jts May 1, 2020
703240c
Code cleanup
dr-jts May 1, 2020
80f778e
Javadoc
dr-jts May 1, 2020
4855435
Javadoc
dr-jts May 2, 2020
90b59ab
Javadoc
dr-jts May 2, 2020
6c07abd
Javadoc
dr-jts May 4, 2020
80b59e1
Javadoc
dr-jts May 4, 2020
1766c0b
Rename method, Javadoc
dr-jts May 4, 2020
fec25bd
Fix OverlayEdge toString sym label
dr-jts May 4, 2020
fa0d423
Revert to fix problem with LineBuilder.
dr-jts May 4, 2020
9d87d8a
Code reorg
dr-jts May 4, 2020
10a1409
Refine LineBuilder logic
dr-jts May 5, 2020
98a08b1
Refactor and simplify LineBuilder logic
dr-jts May 5, 2020
f7c1e2d
Javadoc
dr-jts May 5, 2020
1280b47
Add function for intersection Floating PM with no validation
dr-jts May 7, 2020
3ee54c8
Add function for intersection with Float PM and post-validation
dr-jts May 7, 2020
09a2ae0
Refactor methods in OverlayNG
dr-jts May 8, 2020
505d03b
Javadoc and fix
dr-jts May 12, 2020
264e012
Rename RandomPolygonOverlayFuzzer
dr-jts May 13, 2020
f44ca89
javadoc
dr-jts May 13, 2020
f5ccde8
Add overlay for mixed inputs with points
dr-jts May 13, 2020
05dc31f
Fix handling of Intersection output
dr-jts May 13, 2020
cc42bb1
Javadoc
dr-jts May 13, 2020
6b5dd39
Javadoc
dr-jts May 14, 2020
5bc7bec
Add OverlaySnapIfNeeded
dr-jts May 14, 2020
e2071a3
Remove debug code
dr-jts May 14, 2020
8838904
Add XML tests
dr-jts May 15, 2020
d7e3602
Unit tests and bug fixes
dr-jts May 17, 2020
d0785a2
Fix issue with LineBuilding for Float PM
dr-jts May 17, 2020
a4434b6
Add L unit tests
dr-jts May 18, 2020
0f25921
Simplify OverlayEdgeRing point extraction
dr-jts May 18, 2020
f677396
Fix CoverageUnion overlay usage
dr-jts May 18, 2020
b25f59c
Fix index bug
dr-jts May 19, 2020
f605b69
Add A XML tests
dr-jts May 19, 2020
15891b8
Fix disjoint envelopes test to account for rounding
dr-jts May 20, 2020
10b9595
Add XML tests with precision
dr-jts May 20, 2020
7c3a14e
Add more XML tests
dr-jts May 21, 2020
a281f94
Javadoc
dr-jts May 21, 2020
772d35a
Change HotPixelIndex to use ItemVisitor
dr-jts May 21, 2020
06b6b54
Fix HotPixel intersection test to account for more cases
dr-jts May 21, 2020
225283a
HotPixel unit test - WIP
dr-jts May 22, 2020
0aaa185
Rename single test files to avoid running during build
dr-jts May 22, 2020
62a6915
Refine HotPixel intersection logic, add unit tests
dr-jts May 22, 2020
c1e6218
Refine HotPixel logic
dr-jts May 22, 2020
58e99ea
Refactor and refine HotPixel logic
dr-jts May 23, 2020
d12841b
Refine HotPixelIndex and HotPixel
dr-jts May 25, 2020
940c404
Add unrolled orientationIndex method and refactor
dr-jts May 25, 2020
1cba57d
Update OverlayNG perf test
dr-jts May 26, 2020
db2d633
Add SnappingNoder
dr-jts Oct 7, 2019
b5407fe
Add SnappingNoder
dr-jts May 27, 2020
4a6103c
Add more Snapping Functions
dr-jts May 27, 2020
43436f4
SnappingNoder refactoring
dr-jts May 27, 2020
572ddc1
Rename SnappingPointIndex
dr-jts May 27, 2020
506ae9e
Refactoring
dr-jts May 27, 2020
2181819
Code cleanup and Javadoc
dr-jts May 27, 2020
623dba1
Rename XML test functions to xxxSR
dr-jts May 27, 2020
99170a9
Organize imports
dr-jts May 27, 2020
26ca17b
Enhance RandomPolygonOverlayFuzzer
dr-jts May 27, 2020
37c4bbb
Support null PrecisionModel
dr-jts May 27, 2020
89d73ef
Javadoc
dr-jts May 27, 2020
6e852fd
Javadoc
dr-jts May 27, 2020
d1468ad
Javadoc
dr-jts May 28, 2020
079fd2d
Rename OverlayEdge setNextResult methods
dr-jts May 28, 2020
a92315b
Javadoc
dr-jts May 28, 2020
0b41ab9
Renaming to SnapRoundingNoder etc.
dr-jts May 28, 2020
7279a33
Javadoc
dr-jts May 28, 2020
269afe2
Add OverlayNGSnappingTest
dr-jts May 30, 2020
cfd3406
Add XML test descriptions
dr-jts May 30, 2020
72a5caf
Fix up SnapRounding unit tests
dr-jts May 31, 2020
eba69d7
Add TestBuilder snapping and snap-rounding functions
dr-jts May 31, 2020
84812ee
Add SnappingNoder unit tests
dr-jts May 31, 2020
f1d491b
Refactor Snap Rounding unit tests
dr-jts May 31, 2020
d6c918e
Add SnappingNoder unit test
dr-jts May 31, 2020
a328a25
Add SnappingNoder unit test
dr-jts May 31, 2020
ac2f216
Move Quadrant and Position
dr-jts Jun 1, 2020
3f1087b
Add OverlayNG function for custom noder with no precision model
dr-jts Jun 2, 2020
435b41f
Switch OverlaySnapIfNeeded to use SnappingNoder
dr-jts Jun 2, 2020
6118a45
Remove OverlayNGSnapIfNeeded debugging
dr-jts Jun 3, 2020
950197f
Refactor TestBuilder OverlayNGSnapIfNeeded functions
dr-jts Jun 3, 2020
aa0efca
Javadoc
dr-jts Jun 5, 2020
a46a526
Rename OverlayNGSNappingNoderTest
dr-jts Jun 5, 2020
1a2b961
Refactor clipping envelope support functions
dr-jts Jun 5, 2020
4ada973
Rename OverlayNGFoatingNoderTest
dr-jts Jun 5, 2020
c36ca57
Javadoc
dr-jts Jun 5, 2020
391a5bf
Fix method name typo
dr-jts Jun 5, 2020
8d4a19e
Add unit test for clippping robustness failure
dr-jts Jun 5, 2020
adc3dd4
Javadoc
dr-jts Jun 6, 2020
7eac189
Javadoc
dr-jts Jun 8, 2020
dc32f99
Add OverlaySnapIfNeeded areatest function
dr-jts Jun 9, 2020
2eb3aa3
Improve clipping heuristic to ensure robustness
dr-jts Jun 9, 2020
a28a4fb
Minor change to RandomPolygonOverlayFuzzer
dr-jts Jun 10, 2020
124cf3f
Improve OverlayNGSnapIfNeeded
dr-jts Jun 10, 2020
11a3a87
Fix OverlayNGSnapIfNeeded to allow single-argument union
dr-jts Jun 10, 2020
99335dc
Fix Overlay unit tests
dr-jts Jun 11, 2020
42427e1
Add OverlayCaseDumper utility
dr-jts Jun 11, 2020
3874813
Fix OverlayNG floating noder problem with repeated points
dr-jts Jun 11, 2020
8503d8d
Fix OverlayNG noding to remove repeated points from lines
dr-jts Jun 11, 2020
836693c
Javadoc
dr-jts Jun 12, 2020
bf3b9f2
Javadoc
dr-jts Jun 12, 2020
bf0eebf
Improve UnaryUnionOp code
dr-jts Jun 13, 2020
986427f
OverlayCaseDumper util now flattens inputs
dr-jts Jun 13, 2020
70b7130
Fix handling of empty GeometryCollections
dr-jts Jun 13, 2020
c27520b
Fix TestBuilder unaryUnion functions
dr-jts Jun 16, 2020
ac588e1
Javadoc
dr-jts Jun 16, 2020
0f177da
Javadoc
dr-jts Jun 16, 2020
48a6bc2
Fix handling of null PrecisionModels
dr-jts Jun 16, 2020
f63e761
Add TestBuilder OverlayNGSnapIfNeeded unary union function
dr-jts Jun 16, 2020
5d429bf
Remove obsolete TestBuilder functions
dr-jts Jun 16, 2020
4ef8467
Add SnapRoundingNoder simple test
dr-jts Jun 17, 2020
e91abf3
Move SegmentExtractingNoder to noding package
dr-jts Jun 18, 2020
c866b00
Make SegmentExtractingNoder public
dr-jts Jun 19, 2020
fbaff0c
Javadoc
dr-jts Jun 19, 2020
f3c59d7
Fix functions to use OverlayNGSnapIfNeeded
dr-jts Jun 26, 2020
8fc66dc
Add overlayAreaTest function (WIP)
dr-jts Jun 30, 2020
56eaffc
Update EPL license to 2.0
dr-jts Jun 30, 2020
02c66c3
Fix imports
dr-jts Jun 30, 2020
25a5d68
Javadoc
dr-jts Jun 30, 2020
64e0531
Minor code cleanup
dr-jts Jun 30, 2020
03289ca
Major refactoring of noding and edge building
dr-jts Jul 3, 2020
bd72cdc
Javadoc, remove unused methods
dr-jts Jul 6, 2020
9f73174
Javadoc
dr-jts Jul 13, 2020
196ed2b
Fix OverlayNG expected value for component ordering
dr-jts Jul 14, 2020
76eb9de
Refactor OverlayLabeller linear label propagation
dr-jts Jul 14, 2020
2b7236d
Javadoc
dr-jts Jul 14, 2020
d6b8ed8
Javadoc
dr-jts Jul 15, 2020
fe0f94d
Add OverlayNGSnapIfNeededFunctions unionArea and unionLength
dr-jts Jul 16, 2020
57b1100
Add TestRunner overlay robustness functions
dr-jts Jul 29, 2020
7c17983
Clean up TestBuilder OverlayNG functions
dr-jts Jul 30, 2020
bf23df9
Add Snap-Rounding tests
dr-jts Jul 30, 2020
5b086a1
Javadoc
dr-jts Jul 30, 2020
11b9094
Reorganize TestBuilder functions
dr-jts Jul 30, 2020
456acc5
Javadoc
dr-jts Jul 30, 2020
db15eac
Change line output behaviour to preserve noding
dr-jts Jul 31, 2020
072393a
Fix CoverageUnion unit test to account for non-merged lines
dr-jts Jul 31, 2020
3efff11
Javadoc
dr-jts Jul 31, 2020
c9cd451
Add SnapRoundingNoder unit test
dr-jts Aug 2, 2020
55a274b
Rename SnapRoundingNoderTest test
dr-jts Aug 4, 2020
cc00bd8
Add SnappingNoder tests
dr-jts Aug 7, 2020
4d987d8
Switch to outputting all components for intersection op
dr-jts Aug 7, 2020
1f41dd9
Add OverlayNG unit test for polygon with flat topology collapse
dr-jts Aug 28, 2020
feee233
Minor OverlayLabeller refactoring and improvement
dr-jts Sep 4, 2020
ea45557
Cleanup of mixed result logic
dr-jts Sep 4, 2020
959a61d
Add optimization for line building
dr-jts Sep 8, 2020
f65936b
Fix SnappingNoderTest method names
dr-jts Sep 10, 2020
764bb49
Allow result to include collapsed lines
dr-jts Sep 10, 2020
a3e5d17
Fix OverlayNG unit tests for collapses
dr-jts Sep 11, 2020
c6f2208
Enhance GeometryPrecisionReducer to use OverlayNG PrecisionReducer
dr-jts Sep 11, 2020
8a7f762
Remove overlay ops depending on slow robustScale heuristic
dr-jts Sep 14, 2020
a810785
Add Snap-Rounding fallback to OverlayNGSnapIfNeeded
dr-jts Sep 14, 2020
22cee2d
Javadoc
dr-jts Sep 15, 2020
c1277b0
Rename OverlayNGRobust
dr-jts Sep 15, 2020
0da1f61
Add OverlayNG strict mode
dr-jts Sep 16, 2020
dabe23c
Add TestBuilder OverlayNGStrictFunctions
dr-jts Sep 16, 2020
b0d6f03
Fix OverlayNG strict mode Union bug
dr-jts Sep 16, 2020
e07b6c0
Clean up OverlayNGRobust
dr-jts Sep 16, 2020
7687894
Add TestBuilder OverlayNGOpt difference function
dr-jts Sep 21, 2020
10719d9
Add unit test for a GEOS porting bug
dr-jts Sep 21, 2020
1def2ed
Javadoc, private method name change
dr-jts Sep 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix CoverageUnion overlay usage
Signed-off-by: Martin Davis <[email protected]>
dr-jts committed Aug 28, 2020
commit f6773966628dc0de4b036f9f4fd99b0a4bfbd10b
Original file line number Diff line number Diff line change
@@ -59,9 +59,8 @@ public class CoverageUnion
*/
public static Geometry union(Geometry coverage) {
Noder noder = new SegmentExtractingNoder();
Point emptyPoint = coverage.getFactory().createPoint();
// a precision model is not needed since no noding is done
return OverlayNG.overlay(coverage, emptyPoint, OverlayNG.UNION, null, noder );
return OverlayNG.union(coverage, null, noder );
}

private CoverageUnion() {
Original file line number Diff line number Diff line change
@@ -249,18 +249,35 @@ public static Geometry overlay(Geometry geom0, Geometry geom1, int opCode)
* @return the result of the union operation
*
* @see PrecisionReducer
* @see CoverageUnion
* @see UnaryUnionNG
*/
static Geometry union(Geometry geom, PrecisionModel pm)
{
// empty geometries are not included in the overlay
//Point emptyPoint = geom.getFactory().createPoint();
OverlayNG ov = new OverlayNG(geom, pm);
Geometry geomOv = ov.getResult();
return geomOv;
}

/**
* Computes a union of a single geometry using a custom noder.
* <p>
* The primary use of this is to support coverage union.
*
* @param geom the geometry to union
* @param pm the precision model to use (maybe be null)
* @param noder the noder to use
* @return the result geometry
*
* @see CoverageUnion
*/
static Geometry union(Geometry geom, PrecisionModel pm, Noder noder)
{
OverlayNG ov = new OverlayNG(geom, pm);
ov.setNoder(noder);
Geometry geomOv = ov.getResult();
return geomOv;
}

private int opCode;
private InputGeometry inputGeom;
private GeometryFactory geomFact;