3

I'm working on animating lines that grow to its full length and this error message

Not a line layer:

keeps popping up while attempting to use the MMQGIS function.

File used is a feature line generated from ArcMap. MMQGIS plugin was run in QGIS 2.8.3.

Just wondering if I've missed some vital step(s) or do I have to convert my feature line (shp file) into another format.

6
  • Plugin works fine for me with QGIS 2.16.0 although I don't have a feature line created from ArcMap. You could try installing the latest QGIS version and see if the problem still persists :)
    – Joseph
    Commented Aug 11, 2016 at 8:42
  • Hi, Joseph. I've installed latest QGIS version. Plugin works fine for QGIS 2.16.0 and 2.8.3 but it seems that the "Animate Lines" function of MMQGIS plugin cannot read line feature as animation layer (at least on my end). Sorry for bothering but any idea if I have to convert my line feature (shp file) to another format? Thanks in advance:) Commented Aug 12, 2016 at 7:29
  • The "Animate Lines" tool accepts shapefiles so you shouldn't need to convert to another format but you can search for the tool in the MMQGIS Homepage which mentions that you can also use CSV format.
    – Joseph
    Commented Aug 12, 2016 at 8:46
  • Hi. Sorry for the late update on this one. Plugin does not recognize shp file I've loaded in QGIS. "Not a line layer" error message is generated on each attempt to run the Animate Lines function of MMQGIS. Tried running it with my line feature data and a line feature created in QGIS, both with the same outcome. Just like to ask for any ideas on how to resolve this one. Thank you for responding :) Commented Sep 18, 2016 at 4:33
  • Annoying problem! Are you using Windows? Could you upload a line shapefile (one which doesn't work) to a public server so that others could test it?
    – Joseph
    Commented Sep 19, 2016 at 10:16

2 Answers 2

2

There seems to be an issue with a few of the latest versions of the MMQGIS plugin. If you revert back to version 2016.1.31, the Animate Lines tool works fine on line layers. Here is your sample:

Animate lines

1
  • @sonnetsocket - Most welcome, glad it was helpful =)
    – Joseph
    Commented Sep 30, 2016 at 12:41
2

There's a typo in the latest version of the latest version of mmqgis_library.py around line 1148. The if statement:

if (layer.type() != QgsMapLayer.VectorLayer) or\
   (layer.wkbType() in [QGis.WKBLineString, QGis.WKBLineString25D, \
            QGis.WKBMultiLineString, QGis.WKBMultiLineString25D]):

Should read:

if (layer.type() != QgsMapLayer.VectorLayer) and\
   (layer.wkbType() in [QGis.WKBLineString, QGis.WKBLineString25D, \
            QGis.WKBMultiLineString, QGis.WKBMultiLineString25D]):

If you make the change, everything should work.

The line can be found in:

/<user folder>/.qgis2/python/plugins/mmqgis/mmqgis_library.py

Your Answer

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

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