New answers tagged line
I feel your question is poorly titled. Your features are labeled but you are concerned that at certain scales the labels are suppressed. The common way that this is acheived (to prevent clutter like @Hornbydd says) is by setting minimum and maximum scales at which those labels are displayed:
You can force all labels to display by changing the placement properties. Go to layer properties > Labels Tab > Placement Properties > Conflict Detection and tick on Place overlapping labels It will look a mess when you zoom out but then you get all labels.
If your license level allows it, use the Erase Tool. If you license level will not allow it, you can use a reverse mask and then Clip.
There is a tool in the Processing toolbox called 'Polygonize' which will do what you want. It needs shapely to run. The tool used to be called the 'Polygonizer', there is a note on it here: http://confound.me.uk/maps/ppv4.pdf N.
One of the easier ways to do this is with a spatial database such as PostGIS. Load your raster into the database using raster2pgsql (which is installed with PostGIS) and then load your rivers with shp2pgsql (also installed with PostGIS). Then, you can run a simple query that samples the elevation model at the end points of all your lines: select ...
(1) Your plot shows the points as small circles. In the computation, they are considered as real, zero-area points, and the lines are considered as zero-width lines. If the plot suggests they intersect, this may be because the lines have a certain width and points a certain area, but that their mathematical representations do not intersect. You could compute ...
Just a little bit more of the Lunar Sea answer. Your query it's ok. The problem is that you didn't gave a nome to the geometry column so qgis don't like it. Specify ::geometry ecc... is important but not essential if you know what is it inside your table. It could be possible that you have to specify Multilinestring instead of Linestring. CREATE VIEW ...
EDIT: The geom column needs registering in the view public.geometry_columns. This is done by adding '::geometry(linestring, SRID)' to the query: ST_MakeLine(point1.geom, point2.geom)::geometry(linestring, SRID) Thanks @user30184 for the link to the docs
Top 50 recent answers are included