void WktWriter::write( const MultiLineString & g ) { _s << "MULTILINESTRING" ; if ( g.isEmpty() ){ _s << " EMPTY" ; return ; } _s << "("; for ( size_t i = 0; i < g.numGeometries(); i++ ){ if ( i != 0 ) _s << "," ; writeInner( g.geometryN(i).as< LineString >() ); } _s << ")"; }
void BoundaryVisitor::visit( const MultiLineString& g ) { if ( g.isEmpty() ) { _boundary.reset(); return ; } /* * create a GeometryGraph and rely on vertex degree (1 means boundary) */ graph::GeometryGraph graph ; graph::GeometryGraphBuilder graphBuilder( graph ) ; for ( size_t i = 0; i < g.numGeometries(); i++ ) { graphBuilder.addLineString( g.lineStringN( i ) ); } getBoundaryFromLineStrings( graph ) ; }