I'm new to the graphical modeller of QGIS, and was wondering how to keep a line shapefile which has been edited and some of its parts deleted? For example, I have a country polygon that I have changed into lines using the vector > geometry tools > polygons to lines. The country investigated being a coastal country, I edited the line layer, split it, keeping only the coast line.

enter image description here

Then I use the SAGA tool to convert lines to points. However, when running the model from the beginning, it will transform all the lines into points, including the ones I don't need. Is there a way to keep the newly edited line layer in the model and then run the lines to points tool on it?

  • 1
    When do you edit the layer? Do you do it manually, or is it part of the model?
    – Erik
    Mar 2 '20 at 12:05
  • I do it just after the lines are created, and I do it manually.
    – Tim56
    Mar 2 '20 at 12:11
  • 1
    Then how should this model work with the edited data? You need two models, one for alle steps up to polygons to lines and one for the final step.
    – Erik
    Mar 2 '20 at 12:13
  • @Erik, yes that's what I thought, but was hoping for a possible alternative. Thanks for your input.
    – Tim56
    Mar 2 '20 at 12:14
  • Are you saving the edits in the edit session before starting the line to point process?
    – artwork21
    Mar 2 '20 at 13:11

I managed to figure out something very basic. I followed the process set in my model, then, once the line layer is generated, toggle editing mode, carry on with the split features tool, delete the unneeded parts and save your line layer under a specific name (MOZ_Coastline here). Then, in the model, use the newly saved line layer (yellow box) as a a basis for the lines to points tool:

enter image description here

When running the model, the wizard will ask you what layer to chose for the lines to point conversion: select the edited layer. Select corresponding parent algorithms beforehand so that the process of line to points creation is done at the end. enter image description here

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.