I'm new to using QGIS (2.0).

I'm trying to calculate the sidewalk area of a city.

For that I have some shapes, extracted from Bentley Microstation, with the topology (facades, fords, fences, etc...), but they are in line shapes.

I have merged them in only two shapes: exterior line and interior line limits.

I've tried to convert them to polygon, with the idea to use the "difference" tool after that, but I wasn't able to do it.

I tried to use: "Geometry tools --> Lines to polygon" but it doesn't work, causing lots of holes and mistakes. "Geoprocessing tools --> Convex hull(s)" is not the way because I will need to do so many polygons and it will be an incredible waste of time.

Any ideas?

enter image description here

  • Here's an extract of the shapes. What I'm looking is to calculate the area between "interior" and "exterior" which are in line format (there are some pedestrian cross lines that are not useful and will be removed).
    – NandoSC
    Feb 27, 2014 at 13:17

2 Answers 2


I am not sure I've understood quite correctly, but I imagine you want to calculate the area between these two lines :

enter image description here

If that is the case, why won't you realize two buffers on both lines (with a buffer-distance equal to that of the distance between the two lines) and then have them intersected, the resulting polygone will give you an approximate area.

There will be a problem if the distance between the two lines varies a lot (they're not parallele).

I made a test where :

  1. I created a line layer (and made sure it turns out ill-drawn) and added two lines to it (1),
  2. I then mesured the distance between the two lines and made buffers on both entities with that distance (2),
  3. lastly, I made the intersection of these buffers (3).

If your lines are better-drawn, you can expect a much neater result.

  • Thanks for your help Gloserio, you've understood what I'm looking for, but I need something more "automatic" than your propossal. Most of the blocks I have are very irregular, with several distances between facade lines (interior) and the roadway around (exterior), so it would be impossible to create the buffers that way with the accuracy I need for the project.
    – NandoSC
    Feb 28, 2014 at 7:45
  • Ok, so what's stopping your from making the conversion, topological errors ?
    – Akheloes
    Feb 28, 2014 at 9:14
  • Probably. I have just tried to use polygonizer plugin, witch runs only under QGIS 1.8 or previous, and only creates a few polygons (the ones with no dangles). Now I'm finding the way to solve those dangles, more than 6000 only in the example part I'm using for trying options. Thanks for your help, you gave me an start to find the way :). If I find the process I would paste it here
    – NandoSC
    Feb 28, 2014 at 9:35
  • Ok, make sure you do, best of luck :) !
    – Akheloes
    Feb 28, 2014 at 10:33

I've been working those days in this theme and I finally found a solution (maybe not the best but it works). More or less this is the sequence. Please if anyone founds a possible mistake tell me.

**QGIS (2.0)**

Settings  Snapping options  activate shape to modify  Tolerance = 1 Enable topological editing Enable snapping on intersection

**GRASS (under QGIS 2.0)**

File management  Import to grass  Advanced options  Snapping threshold = 1 or 2 Minimum size area = 1

Vector  Develop map  Toolset for cleaning topology  v.clean.snap  Thershold = 1  v.clean.rmdangles  Thershold = 1

File management  Export from GRASS

**QGIS 1.8 (Polygonizer pluggin only runs under version 1.8 or older)**

Polygonizer  Use new created and cleaned vector shape and transform to polygon.

**QGIS (2.0)**

Vector  Geoprocessing tools  Difference: Input vector = Exterior Difference layer = Interior

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.