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
-
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?Joseph– Joseph2016年03月11日 11:05:26 +00:00Commented 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.user69103– user691032016年03月11日 16:49:53 +00:00Commented 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.underdark– underdark2016年03月11日 20:41:44 +00:00Commented Mar 11, 2016 at 20:41
1 Answer 1
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:
- 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:
- 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:
Explore related questions
See similar questions with these tags.