You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JTS provides the LineMerger class to merge contiguous LineStrings together. It treats the lines as an undirected graph, and flips the direction of lines if needed to merge them.
PostGIS-4939 requests an "directional" form of line merging which respects line direction (i.e. treats the input lines as a directed graph). Only lines which can be joined with no change in direction are merged.
This will likely use a simpler algorithm than the existing LineMerger. So it may make sense to implement as a separate class, rather than as an option to the existing class. Perhaps LineMergerDirected?
JTS provides the
LineMerger
class to merge contiguous LineStrings together. It treats the lines as an undirected graph, and flips the direction of lines if needed to merge them.PostGIS-4939 requests an "directional" form of line merging which respects line direction (i.e. treats the input lines as a directed graph). Only lines which can be joined with no change in direction are merged.
This will likely use a simpler algorithm than the existing
LineMerger
. So it may make sense to implement as a separate class, rather than as an option to the existing class. PerhapsLineMergerDirected
?Example
MULTILINESTRING((-29 -27,1 2),(-29 -27,-45 -33),(-45 -33,-46 -32))
LINESTRING(1 2,-29 -27,-45 -33,-46 -32)
MULTILINESTRING((-29 -27,1 2),(-29 -27,-45 -33,-46 -32))
The text was updated successfully, but these errors were encountered: