public static MultiLineString convert ( MultiLineString multiLineString , int dimension ) { int nb = multiLineString . getNumGeometries ( ) ; final LineString [ ] ls = new LineString [ nb ] ; for ( int i = 0 ; i < nb ; i ++ ) { ls [ i ] = GeometryCoordinateDimension . convert ( ( LineString ) multiLineString . getGeometryN ( i ) , dimension ) ; } return gf . createMultiLineString ( ls ) ; }
Force the dimension of the MultiLineString and update correctly the coordinate dimension