I wanted to know how could I do a offset line of one layer in a new layer.
I take my layers, even if I only have one active (streets)
canvas = iface.mapCanvas() layers = canvas.layers()
In my case, layers is just one layer, and this layer have 600 lines. After that I don't know first create a new layer where put the result (the offsets) and the other problem create the offset ( -2 and 2). I saw other post trying to resolv my problem, but I tried to do that but didn't work.
I did that manually, but I want that in python.
Manually, I had this:
And after offset I got this:
But I tried to write several codes and all codes didn't work.