Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
podcast
Filter by Categories
ArcGIS Pro
GDAL
GeoJson
Map
Python
QGIS
Uncategorized

How to create a polygon QGIS

Polygonizing Your Data: The QGIS Guide

In this blog post, we will explore the process of digitizing in QGIS, including how to create polygon features, convert points, lines, or raster data into polygon data, buffer points or lines, and edit polygon vertices. Whether you are a seasoned GIS professional or just starting out, this post will provide you with a comprehensive guide to digitizing in QGIS.

Want to stay ahead of the GIS curve? Listen to our podcast!

Drawing polygons in QGIS

Here are the steps to draw a polygon in QGIS

  1. Open QGIS software and add a vector layer to the map canvas.
  2. Select the “Create a New Layer” option from the Layer menu, or use the keyboard shortcut “Ctrl + Shift + N”.
  3. Choose the Polygon layer type, name the layer, and select the appropriate CRS (Coordinate Reference System).
  4. In the Layer panel, right-click on the newly created polygon layer and select “Toggle Editing.”
  5. Use the “Add Feature” button to start creating your polygon.
  6. Select the “Add Ring” button to create a hole in the polygon, if needed.
  7. Continue drawing the polygon by clicking on the map canvas to set vertices.
  8. Double-click to finish drawing the polygon, and save the changes by clicking on “Save Changes”.
  9. Turn off the editing mode by right-clicking on the polygon layer and selecting “Toggle Editing.”

Not happy with how your polygon turned out? you can always edit the vertices!

How to edit polygon vertices in QGIS

To edit the vertices of a polygon in QGIS, follow these steps:

  1. Open QGIS and add the polygon layer to the map canvas that you want to edit.
  2. Right-click on the polygon layer in the Layer panel and select “Toggle Editing.”
  3. Select the “Vertex Tool” from the Digitizing toolbar.
  4. Click on the vertex you want to move to select it.
  5. Drag the vertex to its new location.
  6. Repeat the process for any additional vertices you want to move.
  7. Turn off the editing mode by right-clicking on the polygon layer and selecting “Toggle Editing.”
  8. Save the changes by clicking on “Save Changes”.

Note: You can also add or delete vertices using the “Add Vertex” and “Delete Vertex” tools in the Digitizing toolbar. These tools allow you to make further changes to the shape of the polygon.

Importing polygon data into QGIS

But maybe you already have polygons that you just need to import into QGIS?

In that case, here is the process for importing a vector file into QGIS:

  1. Open QGIS and go to the “Layer” menu and select “Add Layer” and then “Add Vector Layer”.
  2. In the “Add Vector Layer” dialog, click the “File” tab and browse to the location of the vector file you want to import.
  3. Select the vector file and click “Open”.
  4. In the next dialog, you can select the encoding and coordinate reference system (CRS) for the layer. If you’re unsure, leave the default options.
  5. Click “OK” to add the vector layer to the map canvas.
  6. You can now visualize and edit the imported vector data.

Note: The exact steps may vary based on the version of QGIS you are using. You can also import vector data using the “Add Delimited Text Layer” or “Add WFS Layer” options if the vector data is in a different format. Additionally, you can also drag and drop vector files into the map canvas in QGIS to import them.

Another option for creating polygons in QGIS is to convert existing geometries ( points and lines ) into polygons

Converting points and lines into polygons in QGIS

In QGIS, there are several options for converting points and lines features into polygon features:

  1. “Polygonize” tool: This tool converts raster data into polygon features by defining the boundaries of contiguous regions with the same value.
  2. “Points to Paths” tool: This tool converts a set of points into a polyline feature. This can be useful for creating linear features such as roads, streams, and coastlines, which can then be converted into a polygon.
  3. “Lines to Polygons” tool: This tool converts polyline features into polygon features by closing the lines to form the boundaries of a polygon. This can be useful for creating areas such as lakes or building footprints.
  4. “Buffer” tool: This tool creates a polygon feature by buffering a point or line feature at a specified distance. This can be useful for creating areas around a feature for analysis or display purposes.
  5. “Voronoi Diagram” tool: This tool creates a polygon feature for each input point, representing the area closest to that point. This can be useful for creating areas around points for analysis or display purposes.
  6. “Delaunay Triangulation”: This tool creates a set of interconnected triangles to form a polygon feature. This can be useful for creating tessellated polygons for analysis or display purposes.
  7. “Convex Hull”: This function creates a polygon feature that encloses all input points in the smallest convex polygon possible. The result is a polygon that has no indentations or concave sections.
  8. “Concave Hull”: This function creates a polygon feature that encloses all input points in a more compact shape. The result is a polygon that has indentations or concave sections, making it a more accurate representation of the input points.
  9. Bounding Box” tool is also an option in QGIS for creating polygon features from line features. This tool creates a rectangle polygon that covers the extent of the input feature(s). The result is a polygon with four straight sides that covers the minimum area necessary to enclose the input feature(s).

These tools can be found in the “Processing” toolbox in QGIS. Note that the exact steps and options may vary based on the version of QGIS you are using.

But what if you have raster data?

Converting raster data into polygons in QGIS

In QGIS, there are several options for converting raster data into polygon features:

  1. “Polygonize” tool ( GDAL): This tool converts raster data into polygon features by defining the boundaries of contiguous regions with the same value.
  2. “Raster pixels to polygons” tool: This tool converts raster data into vector data, including polygon features. The tool can convert the raster data into polygon features based on the input parameters.
  3. “Contour” tool: This tool creates a set of polyline or polygon features from a raster by tracing along constant values, such as elevation or temperature.

These tools can be found in the “Processing” toolbox in QGIS. Note that the exact steps and options may vary based on the version of QGIS you are using.

About the Author
I'm Daniel O'Donohue, the voice and creator behind The MapScaping Podcast ( A podcast for the geospatial community ). With a professional background as a geospatial specialist, I've spent years harnessing the power of spatial to unravel the complexities of our world, one layer at a time.

Leave a Reply