0

I'm fairly experienced in both python and QGIS but not so much together.

I have a series of vector lines I need to run the very useful QChainage plug-in on to get points every 1000m. I have about 200 of these .shp files and have already written a rough script to reproject and dissolve them using the processing module, but I am not sure how to do that in the script. I am guessing the code would look something like this:

Qchainage.run(input='input.shp', distance=1000, output='output.shp')

But obviously that doesn't seem to be working. I cna't find any documentation on running qchainage from python either.

0

1 Answer 1

1

Figured it out, the important parts are:

from qchainage import chainagetool

to import the necessary function, and:

    chainagetool.points_along_line(layerout='Output_name',
              startpoint=,
              endpoint=,
              distance=,
              label=,
              layer=layer,
              selected_only=False,
              force=False,
              fo_fila=False,
              divide=0,
              decimal=2)

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.