I have one geopackage with lines of different types that overlap, 2 attribute types, the blue type and the red. As you can see they overlap.
I want the red lines to take priority, meaning where the red lines are the underlying blue lines should be remove so I only have 1 layer of polygons with the 2 types. Note that the length of the blue line doesn’t always match the length of the red so the underlying blue line have to be cut. I have filtrered them, tried line combiner, line on line overlay which generates INVALID_POLYGON_GEOMETRY_VERTICES error.
Reader polylines with attributes
TestFilter, filters and splits the 2 types I want based on the type name
???
Before reader im gonna do a snapper since dataset have some gaps some of the read doesnt reach the entire way to the blue in some instances.
Result example (also want snapper in the circle area so the gap is fixed but think I figured that out. )
Page 1 / 1
If you are getting INVALID_POLYGON_GEOMETRY_VERTICES, then either filter out areas (GeometryFilter), or turn them into lines (GeometryCoercer).
For the overlap, LineOnLineOverlayer should do the trick. You can either enable the option to ‘Separate Colinear Segments’, and follow that with a tester excluding all blue lines with an overlap. Or, set Accumulation Mode to Use From One, and use a FeatureHolder on the blue lines to ensure that they arrive in second and are not preferentially chosen.
You may need to snap the features all together either before or after the overlay, it depends on the sorts of gaps/misalignments you need to correct.
My suggestion.
1. Use a filter to separate the red lines and blue line (if the lines are on the same layer). 2. For the red lines create a buffer with a width that cover all the blue lines and the End cap style to be set as "None" 3. Use a clipper to clip the blue lines that are inside of the buffer polygons of the red lines. 4. Use Snapper Transformer to connect the lines with gaps.
If you are getting INVALID_POLYGON_GEOMETRY_VERTICES, then either filter out areas (GeometryFilter), or turn them into lines (GeometryCoercer).
For the overlap, LineOnLineOverlayer should do the trick. You can either enable the option to ‘Separate Colinear Segments’, and follow that with a tester excluding all blue lines with an overlap. Or, set Accumulation Mode to Use From One, and use a FeatureHolder on the blue lines to ensure that they arrive in second and are not preferentially chosen.
You may need to snap the features all together either before or after the overlay, it depends on the sorts of gaps/misalignments you need to correct.
unfortunetaly it still says invalid and rejected the transformer
If you are getting INVALID_POLYGON_GEOMETRY_VERTICES, then either filter out areas (GeometryFilter), or turn them into lines (GeometryCoercer).
For the overlap, LineOnLineOverlayer should do the trick. You can either enable the option to ‘Separate Colinear Segments’, and follow that with a tester excluding all blue lines with an overlap. Or, set Accumulation Mode to Use From One, and use a FeatureHolder on the blue lines to ensure that they arrive in second and are not preferentially chosen.
You may need to snap the features all together either before or after the overlay, it depends on the sorts of gaps/misalignments you need to correct.