0

I have the following shape file: Screenshot of QGIS canvas

Each polygonal area (the lines are areas) is one feature in a single Shapefile.

Can anyone think of a simple method that can be implemented with qgis to separate the vertical lines from the horizontal ones, so that two separate shapefiles remain at the end?

7
  • Question is unclear. Each line is a separate file? What exactly do you want to achieve? Can you share sample data and add more details to your question?
    – Babel
    Commented Oct 3, 2023 at 13:25
  • Hey @Babel, sorry if its unclear. I have one shapefile. Each line is a single feature and I want to create information about each feature if its vertical or horizontal and export all verticals to one shape and all horizontals to one shapefile.
    – Mabignix
    Commented Oct 3, 2023 at 13:33
  • 3
    Select by azimuth, export to different files, tada.
    – Erik
    Commented Oct 3, 2023 at 13:49
  • 2
    Those are polygonal areas, correct? How would you want to sort ones that are square or circles? Commented Oct 3, 2023 at 13:49
  • @Erik great idea but unfortunately these are areas not lines :/ I changed the desciption
    – Mabignix
    Commented Oct 3, 2023 at 19:47

1 Answer 1

0
  1. Grass: v.voronoi.skeleton for "polygon to line"

  2. as @Erik mentioned, use calculate the azimuth of each line (field calculator): "azimuth" or "degrees(azimuth(start_point($geometry), end_point($geometry)))"

  3. filter expression for vertikal lines: "( 350 < "azimuth" or "azimuth" < 15) or (165 < "azimuth" and "azimuth" < 195)"

  4. buffer to create polygonal areas again

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