1

In QGIS 3.28.8 I have downloaded the data for power lines in different parts of Germany from OSM. Some of these lines and cables have different voltages (see below). I can filter those with several voltages quite easily.

The current data that I have

What I want to do next is to duplicate these features and have one per voltage. So to have two identical geometric features with one different attribute. I could duplicate the feature and then change the voltage attribute manually. The only issue is I have thousands of such power lines and cables, and this would take me a very long time.

Is there a way to do this automatically? I thought of maybe exporting the database and manipulating it in Excel or R, but I'd have to change the shape files concurrently to make sure the file is still readable.

1
  • 1
    Upload that layer to a PostgreSQL/PostGIS database and then you can easily manipulate your data spatial and alphanumerical there.
    – Pepe N O
    Commented Jul 5, 2023 at 18:12

1 Answer 1

4

Use the "Split features by character" tool from the Processing Toolbox (Ctrl+Alt+T).

Sample dummy data, similar to yours as follows:

enter image description here

Below are the key parameters in the tool.

enter image description here

Here is the output:

enter image description here

1
  • Thank you! This saved me possibly several days of work.
    – eafwnrg
    Commented Jul 17, 2023 at 11:55

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.