0

I've a set of street data from OSM loaded into a QGIS layer. A lot of the street names have multiple features (where OSM shows a road in a number of line segments).

I then use Geoprocessing Tools, Dissolve using name of feature and end up with each street having a unique name. Each street name is now a single feature.

I now want to run the GDAL Points along lines to find the mid point of each street (and with the mid point lying on the street - as opposed to what you would get with Analysis Tools, Mean coordinates tool).

The GDAL Points along lines process fails (with a message saying look at the log, but I can't find any meaningful messages in the log). I suspect that it is failing because a few of the street features are not connected lines - but are multiple lines that are not connected. The most obvious case is where the many features are un-named are joined together, but there are a small number of other features contain more than one line that is not connected. I can see several, but there are some I can't find.

Is there any way of finding the number of separated multiple lines per feature? If there was, then I could exclude these features from the Points along lines and I suspect it would then work.

Fairly new to QGIS, and part of my problem in searching for a solution is understanding what the right terminology would be.

The log in the Points Along Lines is on Dropbox here

It ends

The following layers were not correctly generated.

  • /Users/david/Dropbox/@Islington/Mapping/OSM Clerkenwell Highway Points Dissolved.shp
You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

The main log only has

2020-06-29T17:22:51 INFO ogr2ogr "/Users/david/Dropbox/@Islington/Mapping/OSM Clerkenwell Highway Points Dissolved.shp" "/Users/david/Dropbox/@Islington/Mapping/OSM Clerkenwell Highways Dissolved.shp" -dialect sqlite -sql "SELECT ST_Line_Interpolate_Point(geometry, 0.5) AS geometry,* FROM 'OSM Clerkenwell Highways Dissolved'" -f "ESRI Shapefile" 2020-06-29T17:22:51 INFO GDAL execution console output

Thanks for any help you can provide.

3
  • In general it is worth clearing the log, running the processes and then adding what ever is in the log (whether you think it is relevant or not) so other people can see if it's relevant
    – Ian Turton
    Jun 28 '20 at 15:34
  • Good idea. Anyone know how to clear the log? The QGIS 3.10 documentation at docs.qgis.org/3.10/en/docs/training_manual/processing/… suggests that there should be a clear button, but the QGIS 3.6 log interface looks different and I can't find a clear log option. Jun 29 '20 at 16:10
  • Added the logs. Jun 29 '20 at 16:30
1

The tool should work also with multipart linestrings as documented in the help screen of the tool:

If a multipart geometry is encountered, only the first part is considered when interpolating the point.

The result might not be just what you would like to get but the process should succeed without preprocessing the data. Try to isolate some geometry that triggers the error and write mail to QGIS users mailing list. You may have found a bug. If you can't catch the exact geometry write down all the steps that you have done with so much details that it is possible to reproduce the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.