3

I operate with QGIS. I have to split the shape files of the buildings and the roads of a city into a grid of 500x500m per square and into each square I have to obtain the total free area, the total area of the buildings and of the roads.

Can anyone help me?

I've tried to create a vector grid and merging the shape files with the intersection function but I've only multiplied the geometries.

  • 1
    Are your buildings and roads both polygons? – SaultDon Feb 18 '15 at 15:28
  • No, only the buildings, roads are just lines) – Fabio Giovanni Gazzada Feb 20 '15 at 6:39
1

I did something like this before. Assuming your road layer is a line as @SaultDon asked then you will need to use the buffer tool (use a very low value for buffer distance if you don't know the width of the road). If it's already a polygon then great! Now, with your 500x500m grid, use clip for both your building and the road(buffer) layers. The output of these are:

  • A building layer on a 500x500m grid. Open the Field Calculator and calculate a new field using the expression $area to find the total area of the buildings in each square. Create another field using the expression (500 * 500) - "total_area_for_buildings_field" to find the total free area.

  • A road(buffer) layer on a 500x500m grid. Similar to above, open the Field Calculator and calculate a new field using the expression $area to find the total area of the roads in each square. Create another field using the expression (500 * 500) - "total_area_for_roads_field" to find the total free area.

  • I'm trying this way. But how can it possible calculate the road's area if the roads are just lines? – Fabio Giovanni Gazzada Feb 20 '15 at 6:58
  • You can either use the Lines to polygon tool (Vector > Geometry Tools > Lines to polygon) or use the buffer tool (Vector > Geoprocessing Tools > Buffer(s)). – Joseph Feb 20 '15 at 10:26

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.