File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ LineDissolver::dissolve(const Geometry* g)
5050void
5151LineDissolver::add (const Geometry* geom)
5252{
53+ if (factory == nullptr ) {
54+ factory = geom->getFactory ();
55+ }
56+
5357 struct LineStringFilter : public GeometryComponentFilter {
5458
5559 LineDissolver *m_ld;
@@ -83,9 +87,6 @@ LineDissolver::add(std::vector<const Geometry*> geometries)
8387void
8488LineDissolver::add (const LineString* lineString)
8589{
86- if (factory == nullptr ) {
87- factory = lineString->getFactory ();
88- }
8990 const CoordinateSequence* seq = lineString->getCoordinatesRO ();
9091 bool doneStart = false ;
9192 for (std::size_t i = 1 ; i < seq->size (); i++) {
@@ -129,6 +130,7 @@ LineDissolver::computeResult()
129130 if (MarkHalfEdge::isMarked (e)) continue ;
130131 process (e);
131132 }
133+
132134 result = factory->buildGeometry (std::move (lines));
133135}
134136
You can’t perform that action at this time.
0 commit comments