Creating a Landuse Map (QGIS3)

Zoning designations define and regulate what kinds of uses are allowed on specific parcels and outline design and development requirements and guidelines. In this tutorial you will learn how to access parcel datasets, style them according to zoning attributes and create a map.

Overview of the task

You will work with a land parcels dataset with zoning information and create a map showing zoning pattern across the CBD region of Cape Town.


Other skills you will learn

  • How to access and download data from ArcGIS REST in QGIS.

  • How to extract features from a layer that intersect a boundary layer.

  • How to merge different sub-categories from Categorized renderer.

Get the data

You can find the data for the tutorial from Cape Town Open Data Portal - We will be importing data from the portal using ArcGIS REST server URL and will be preparing three layers mentioned below .

  1. Zoning layer: A polygon shapefile with zoning code and description for land parcels having a single zoning - clipped to the Cape Town CBD area.

  2. Split-zoning layer: A polygon shapefile with zoning code and description for land parcels having multiple zoning - with each polygon split into single zones polygons.

  3. Cape Town CDB Area: A polygon demarcating the Cape Town CBD area.

Let’s see the step wise to prepare the dataset for this tutorial.

  1. Go to the Data Portal - We will search for the Cape Town CBD data in the search bar and click to browse further.

  2. Click on View Full Details to explore services available to get the data.

  3. Scroll down to find View Data Source and click on the it.

  4. On the ArcGIS REST Services Directory , Go to Home and copy the URL of that page. The copied URL looks like -

  5. Now, Open QGIS and go to Open Data Source Manager.

  6. The list of data sources is seen in the left panel. Scroll down to find ArcGIS REST Server. Click on new to create new server connection.

  7. In the Connection Details, give the Name Cape Town Open Data Portal and paste the copied url as an input for URL.

  8. Click Ok and then Connect to see the data folders available in the server.

  9. Now we will search for all three layers required for the tutorial from the database. Firstly, we will open Cape Town CBD layer in the QGIS. Expand folders to browse to the layers. Full path to the layer is Theme_Based ‣ Open_Data_Service ‣ Cape Town CBD. Select the layer and click Add.

  10. Close the Data Source Manager to see the layer added to the QGIS. Click on Zoom to Layer to centre and display the layer on the canvas.

  11. Now, will add the Zoning layer using Data Source Manager.Connect to Cape Town Open Data Portal and browse to Zoning layer. The full path is Theme_Based ‣ Open_Data_Service_Zoning ‣ Zoning. This is a very large layer, so make sure to check the box Only request features overlapping the current view extent to avoid loading all the features available in the layer. If you forget this, loading of the layer may take a long time. Click Add to open in the QGIS.

  12. Similarly add Split_Zoning layer. The full path is - Theme_Based ‣ Land_Parcel_Zoning ‣ Split Zoning.

  13. We can see all three source layers are open in QGIS. We want to clip the Zoning and Split Zoning layers to the Cape Town CBD boundary layer. Firstly, let’s save all three layers locally as shapefiles. Right click on the Cape Town CBD layer. Look for Export and click on Save Features As.

  14. Set the format ESRI Shapefile and browse to the local folder where you want to save the shapefiles. We will save all the layers related to this tutorial in a single data folder. Save the layer as cbd. Keep all other options default and click OK. Similarly export other two layers as Zoning.shp and Split Zoning to the same folder.

  15. Remove the layers loaded from server. Select all three layers, and click on Remove Layer/Group icon. We want to extract features from Zoning and Split Zoning layers intersecting with cbd boundary.

  16. Go to Processing ‣ Toolbox from the menubar.

  17. In the toolbax, search for Intersection algorithm and double-click to open.

  18. Select Zoning as Input layer and cbd as Overlay layer. Keep other options default and proceed to save output to file.

  19. Save the output layer as zoning_cbd in the data folder and click Run.

  20. Depending on your Processing settings, you will see some errors or warnings displayed in Log tab. The input layer has some invalid geometries and it is being skipped while running intersection. We will fix geometries of Zoning and Split Zoning layers before taking the intersection to extract all geometries.

  21. Remove the intersection output from QGIS and data folder. Search for Fix geometries tool in the processing toolbox. Double-click to open.

  22. Select Zoning as Input layer. Keep all the other inputs as default and save the output layer as zoning_fixed.shp in the data folder by clicking Save to File. Click Run. Repeat the process for fixing geometries on Split Zoning layer and save the layer with fixed geometries as split_zoning_fixed.shp.

  23. Remove Zoning and Split Zoning layers. We will move ahead with extracting features from zoning_fixed and split_zoning_fixed layers which intersect cbd. Search for Intersection from the processing toolbox and double-click to open.


24.Select Zoning_fixed as Input layer and cbd as Overlay layer to perform intersection as described in steps 18 and 19. Save the output as zoning_cbd and repeat the same for split_zoning_fixed layer and save the output layer as split_zoning_cbd.


For convenience, you may directly download a copy of all three pre-processed layers from the links below:





  1. Open QGIS. Click Open Data Source Manager icon to add layers to work on for the tutorial.

  1. Switch to the Vector tab and use the browsing button to navigate to the folder where you have kept the processed shapefiles.

  1. Select cbd.shp, zoning_cbd.shp and split_zoning_cbd.shp files and click Open.

  1. You will see all three file paths in the text box beside Vector Dataset. Click Add followed by Close.

  1. As we work on the exercise, it is important to save our work. Go to Project ‣ Save.

  1. Save the project to the data directory as landuse_map.qgz file. The QGIS Project file contains references to the data layers and saves styles, map templates etc.

  1. Select the zoning_cbd layer and click the Open Attribute Table button in the Attributes Toolbar. Note that the attribute INT_ZONE_C has the zoning codes and INT_ZONE_D has the zoning description. Close the attribute table.

  1. Now let’s style the layer based on these attributes, so the parcels with the same zoning codes are styles in the same color. Click the Open the Layer Styling panel button in the Layers panel. Click the dropdown button next to Single Symbol.

  1. Select Categorized as the renderer. Select INT_ZONE_C as the Value. Click Classify.

  2. You will see a series of symbols appear. There is a different color symbol assigned for every unique code in the layer.

  3. Notice that each zoning category has sub-categories. The General Business (GB) category has further sub-divisions like GB1, GB2, and so on. For the purpose of this map, we can merge all the sub-categories to a single top-level category. Hold the Shift key and select all sub-categories. Right-click and select Merge Categories.

  4. Repeat the process for MU and TR categories. Once merged, we can now change the Legend label to be more descriptive. Click on the Legend label to rename a class.

  5. Enter descriptions of each zoning category based on the values given in the INR_ZONE_D column. As you enter those description, you will see the legend of the layer in the Layers panel also updates.

  6. Now we can update the colors and symbology of each category. Click on the Symbol for a category.

  7. Change the Fill color and Stroke color of the symbol to a color of your choice.

  8. Repeat the process for each category. The last category is all other values. This category contains all parcels which have NULL values. This is because those parcels have multiple zoning categories attached to them and are represented in the split_zoning_cbd.shp layer. We do not need them in this layer. Select it and click the - icon to remove that category.

  9. Next, select the cbd layer. Change the symbol to Simple Line and increase the Stroke width.

  10. The split_zoning_cbd.shp layer contains all parcels that were missing zoning codes in the zoning_cbd layer. The attribute table and values for the zones in the split_zoning_cbd are the same as the zoning_cbd layer. Instead of configuring the symbology for this layer manually, we can copy/paste the styles. Select the zoning_cbd layer, right-click and select Styles ‣ Copy Style ‣ Symbology.

  11. Now select the newly added split_zoning_cbd layer, right-click and select Styles ‣ Paste Style ‣ Symbology.

  12. You will see the same symbology being applied to the polygons in the split_zoning_cbd layer. The styling and legend are complete now.

  13. We have our layers styled and legend labels created. Now let’s create a map using these styled layers along with map elements like, scale bar, north arrow, labels etc. QGIS comes with a Print Layout that allows composing maps. Go to Project ‣ New Print Layout. When prompted for a name, you can leave it blank and click OK.

  14. In the Print Layout window, you will see a canvas. Right-click and select Page Properties.

  15. Set the Orientation to Portrait. Next, go to Add Item ‣ Add Map.

  16. Hold the left mouse button and draw a rectangle on the canvas. This is the map frame which will contain the map from the main QGIS window. In the Item Properties tab, use the Interactively Edit Map Extent icon to pan/zoom the content of the map frame.

  17. Scroll down in the Item Properties tab and check the Frame option. Expand it and select a Color for the frame border. You can also increase the Thickness.

  18. The map frame is now ready. Let’s add other elements. Go to Add Item ‣ Add Legend.

  19. Drag a rectangle where you want to place the legend. Once added, scroll down in the Item Properties tab and un-check the Auto update button so we can manually edit the legend items.

  20. We have 2 layers with identical legends, so we can remove one of them. Select the split_zoning_cbd layer and click the Remove selected item(s) from legend icon. Similarly remove cbd layer from the legend.

  21. Right-click the zoning_cbd layer and check the Hidden option.

  22. Scroll down and expand the Columns section. Check the Split layers option and increase the Count to 2.

  23. Scroll down further to the Spacing section. Adjust the spacing between different elements till the legend is clearly legible.

  24. You can change style and size of the fonts in legend from Fonts and Text Formatting properties. When done, go to Add Item ‣ Add North Arrow. Drag a rectangle where you want to place the element on the map.

  25. Pick a symbol of your choice. Scroll down and expand the SVG Parameters. Change the Fill color and Stroke color as per your choice.

  26. Now we will add a Scale Bar. Go to Add Item ‣ Add Scale Bar. Drag a rectangle where you want to place the element on the map. Adjust the Style and Segments parameters for the scale bar.

  27. Our map needs a title and other information labels. Go to Add Item ‣ Add Label.

  28. Enter a map title in the Main Properties section. Click the Font button under Appearance section to adjust the font size and style.

  29. Add other labels indicating the data source and your name. Lastly we will finish our map by adding a frame around the label block. Go to Add Item ‣ Add Shape ‣ Add Rectangle.

  30. Draw a rectangle. Click the symbol for Style and set the Fill Color to transparent and Stroke color to match other frames.

  31. Once you are satisfied with your composition, you can export the result. Go to Layout ‣ Export as PDF. Save the PDF in your data folder as capetown_zoning_map.pdf.


If you want to give feedback or share your experience with this tutorial, please comment below. (requires GitHub account)