Question: I have two layers, a line and a point layer.

I need to make a line layer which connects all the points to the nearest line feature. How can I do that?

Is there a plugin available for QGIS?
This is a very important tool which is missing in QGIS.

ArcView has this tool: ["Nearest Features"](http://www.jennessent.com/arcview/nearest_features.htm)

![](https://i.stack.imgur.com/nMzUe.jpg)

Answer: 
As an alternative, you could:

1. Use the **Convert Lines to Points** tool from:

*Processing Toolbox > SAGA > Shapes - Points > Convert Lines to Points*

(Add points over small distances. E.g. add a point every 1m if the overall line is 100m)

[![Convert lines to points](https://i.stack.imgur.com/izAtG.png)](https://i.stack.imgur.com/izAtG.png)
2. Use the **Distance to nearest hub** from:

*Processing Toolbox > QGIS geoalgorithms > Vector analysis tools > Distance to nearest hub*

(Set the parameters, using the output layer of the **Convert Lines to Points** tool as the *Destination hubs layer* and setting the *Output shape type* as **Line to hub**)

[![Distance to nearest hub](https://i.stack.imgur.com/wWZNN.png)](https://i.stack.imgur.com/wWZNN.png)
3. Final result should be a line layer which connects the original points layer with the original line layer (with line-converted points):

[![Final result with points](https://i.stack.imgur.com/OnmFA.png)](https://i.stack.imgur.com/OnmFA.png)

(without line-converted points):

[![Final result without points](https://i.stack.imgur.com/oGifH.png)](https://i.stack.imgur.com/oGifH.png)

I used QGIS 2.12.3-Lyon.
If you find the point over the line, the shortest point, with the coordinate 3D (X,Y,Z) you need an algorithm to calc the position over the shortest line. You can using this tool <https://github.com/rafaelduartenom/findpointonline>. You need postgres to execute this tool and shapefiles.