1

I have Roads shapefile which are denoted by lines.

I want to create another shapefile of roads as polygons, by adding 10-meter buffer on line.

How do I do this using QGIS?

3

QGIS should be able to do that easily without any plugins.

First, you will need to make sure you are using the correct projections. You may already be doing this, and setting projections can be cumbersome depending on where your shapefile is located in the world, what projection it is in etc.

In QGIS, go to the "Vector" menu, choose "Geoprocessing Tools", and "Fixed distance buffer".

  • set your Input Layer to be your "Roads" line layer
  • set the Distance to 10. This is where your projection is important, as it is important you've projected into a coordinate system that uses metres. Also, bear in mind that this is 10 metres on either side of the line (so your road is 20 metres thick). If you want it to be 10 metres thick, set your Distance to 5 metres
  • Segments controls how complex, or curved, your resulting shape is. During the process curves may develop. The higher the Segments, the less jagged the curve is. I usually select 25
  • Dissolve result. Do you want to keep the individual roads, or do you want them merged? If you want them merged, use Dissolve Result

You can then also choose whether you want the result to be a temporary layer (you will lose it when you close QGIS), or if you want to save it elsewhere. Note that you can still save the resulting layer afterwards by right-clicking it in the layers panel and using "Save As".

The above is for QGIS 2.18, but the same basics should apply for all versions of QGIS.

If you want them to be of varying thickness, you could always specify the thickness in a field in your Roads line shapefile, then use the "Variable distance buffer".

  • Thanks @user25730. I tried your solution , QGIS is showing units for buffer in degrees. As you said I need to convert into another projection system which uses as meter. I couldn't find any projection system for India / Indian subcontinent which measures in meter. I tries EPSG:24048 , but it is still showing units in degrees. – Hariom Ahlawat Oct 2 at 11:37
  • @HariomAhlawat Are you reprojecting correctly? It can be a pain. I would normally right-click the layer and "Save As", reprojecting it into the correct system as a new copy (if it isn't already in that system). Then create a new QGIS project and import that layer ONLY, as QGIS itself may be set to a different coordinate system. That or, in the bottom-right of QGIS, you will see what coordinate system it is using. You may have to look at that and enable On-The-Fly (OTF) reprojection. Projection issues can be very hit-and-miss. – user25730 Oct 2 at 22:29
  • Thanks, that worked. Another issue I am facing now is that when I created a buffer for 10 meters, it seems like quite large. May be in kilometres. Is there any issue with units when creating buffer in QGIS? – Hariom Ahlawat Oct 4 at 7:17
  • @HariomAhlawat This is to do with the coordinate system, and finding the correct one. Do you know what coordinate system your road layer is in? You can find this in QGIS by hovering over it in the layers panel (it will say something like (EPSG:4283) with the 4283 being the coordinate system). Also, have a look at the coordinate system your map uses and whether On-The-Fly (OTF) is enabled (in the bottom-right of QGIS - e,g, EPSG:4283 (OTF)). If you can give us those details, it will be easier to remedy. – user25730 Oct 8 at 21:44

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.