3

In QGIS 2.12.0 Lyon I have a problem while using the FlowMapper plugin. But I don't know why. This is the message:

Traceback (most recent call last):
File ".../python/plugins\FlowMapper\flowmapper.py", line 2656, in run
flowpyv07.shapefilemaker(FlowType,CreateShpNodes,IncludeNodeNames,str(SaveDirectory), str(SaveShpName),str(SaveShpNameNodes),str(InputMatrixName),str(InputNodesName),str(InputNodeNamesName),str(combotext))
File ".../python/plugins\FlowMapper\flowpyv07.py", line 51, in shapefilemaker
onevalue = float(separatestrings[columns])
IndexError: list index out of range
Python-Version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] 
QGIS-Version: 2.12.0-Lyon Lyon, cd9d645 
Taras
35.7k5 gold badges77 silver badges151 bronze badges
asked Mar 10, 2016 at 20:38
3
  • My guess is that you are using float values (numbers with a decimal) which it doesn't like. Perhaps try rounding these values to integers? Commented Mar 11, 2016 at 11:05
  • Thank you. I use float value for coordinates. This seems to be the problem (error in line 51). If I read coordinate file in libreoffice, there is no decimal separator. But in txt file there is one. Is this the problem? I will try later. Commented Mar 11, 2016 at 16:49
  • Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our faq. Commented Mar 11, 2016 at 20:41

1 Answer 1

2

I have recently faced the same problem and handled it.

Therefore, I am providing some hints for those who are still struggling:

  • Text file (.txt) that stores node coordinates should be in the following format:

    Proper_coordinates

    • No column titles, e.g. long, lat.
    • Coordinates go only with dots
    • Space in between long and lat, not TAB.
  • Text file (.txt) that defines flow matrix should look like:

    Proper_matrix

    • Space in between matrix values, not TAB.
    • All empty values are 0 (numbers zero), not NULL or Empty space.
    • Delete other empty columns and rows where data is not stored.

Then everything should work as intended.

I am using the Notepad++ for replacing: Ctrl+F


References:

answered May 28, 2018 at 14:57

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.