I am trying to connect source and destination points with the hub lines tool in MMQGIS. I have gone through the other posts on this subject but couldn't figure out what I am doing wrong.

I have succeeded doing so before in a different school project and I can't understand why it is not working now. The tables have pretty much the same fields as the last time.

The 2 tables are the same, but saved once as source and once as a destination. I will add screen shots of the fields and the hub lines application window and maybe someone will see what am I doing wrong.

source layer destination layer hub lines application window the error

  • You might have a Null geometry.Are your inputs Point Shapefiles? I would save a few Points with the same ID from each shapefile to a temporary shapefile for testing.
    – klewis
    Aug 20 '16 at 13:50
  • Welcome to gis.stackexchange! Please edit the title of your question to include enough information for future visitors to be able to find this thread when looking for the same problem.
    – underdark
    Aug 20 '16 at 21:13
  • 3
    Could you upload your shapefiles to a public server so that others could test this? Your process seems correct so perhaps could be a platform or MMQGIS version issue...
    – Joseph
    Aug 25 '16 at 12:10

The question hasn't been active in a while, but I will still post an answer as this is pretty high up in the QGIS questions.

Firstly I would say that rather than using the MMQGIS plugin you can use the core processing functionality in QGIS called Join by Lines (Hub Lines). In general that is a good practice in all QGIS work (prefer core over plugins) as it is easier to get support and debug problems.

I had a layer of public transport stops. I first ran Nearest Neighbour analysis for the layer to find out the nearest other points (this is not necessary if your data is like in the original post). After this I made a copy of the layer (right click --> Duplicate Layer).

Then you can open the algorithm and set the parameters as follows (give the connecting ID's to the correct fields):

Screenshot of the processing algorithm

The result will be a line layer connecting the points with the ID's given earlier:

enter image description here


I think your mistake is that you have the columns of numbers in text format, as it looks to the left side instead of being on the right side of the cell

  • 1
    Welcome to GIS SE. Please note this is an English language site (I used Google Translate).
    – Aaron
    Apr 17 '19 at 3:33

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.