How can we create points perpendicularly on a line with QGis ?
Otherwise, how can we draw a line between one point and a line ?
Here is a picture to show what we want :
If you only need to show these lines/points, you can do this with a geometry generator marker style. This is a fairly new feature in QGIS, and it makes it easy to do things that would have needed a database before. I did this in QGIS 2.18
I assume you have a line layer called "ligne", with a unique id field. I called this "unid", and set to 1
then use the following formula on your points layer in the geometry generator. Make sure you set the output type to be "linestring". If it's not, nothing will appear.
Here's an example. I've using a normal dot symbol and a generator on the points layer
To show the points projected onto the line, add another geometry generator marker, this time make it a POINT
closest_point( geometry(get_feature('ligne','unid',1)), $geometry)
This is not guaranteed to be perpendicular to the line, for example:-
If a point is quite close to the line, the shortest line is likely to be perpendicular.