I am new to QGIS and I am wondering whether there is a plugin which automatically recognises the borders on a map and converts the areas into polygons?

Edit: I am using QGIS 2.14.1. It is a picture of an old map with specific borders which don't exist anymore: enter image description here

I was wondering whether there is a plugin that can automatically detect all of the borders so that each area is then transformed into a polygon.

So far I have only found plugins like autotrace and QGIS' advanced trace digitizing option where I would have to do it manually for each area.

  • 3
    what sort of map and what sort of borders? – Ian Turton Apr 28 '16 at 10:58
  • 1
    what version of QGIS are you using? – Shahzad Bacha Apr 28 '16 at 11:52
  • By boarder, do you mean the initial bounding extent of the map when it opens? – artwork21 Apr 28 '16 at 12:19
  • 1
    Please include a screenshot or image of what exactly you mean, this should help potential answerers =) – Joseph Apr 28 '16 at 13:31
  • 1
    I don't think if there is any tool in QGIS that will automatically detect all borders. You will have to digitize it manually. Advance Digitizing tool 'Enable Trace' will be the best option for you. After digitizing each polygon you can simply add 'area' field and calculate area using 'Field Calculator' – Shahzad Bacha Apr 29 '16 at 11:24

I suppose this is an old map that you scanned and want to convert the polygonal borders into vectors. What you're looking for are raster to vector converters. I'm not sure if QGIS has a plugin to do that, or maybe GRASS. There are some standalone tools to do that, have tried them in the past and even tried an ArcGIS feature, but all to a somewhat limited success. I can't give names cause I don't remember them, but I'm sure a quick Google search will yield some results. AutoDesk Raster Design, which works on top of AutoCAD can do that but in a semi-automatic way.

What all these tools do is detect black pixels on a white background and trace along the line. So a key deciding factor for a good result is to have a clean raster. In order for all these tools to work, you will have to remove speckles and unwanted lines from your image before running it through any of these tools. I can also see there are dashed lines in your map, and these can create issues because of the blanks. So it goes down to how much time you're willing to put on either cleaning the raster first, cleaning the vectors later on, or maybe a balance of both.

The nice thing about Raster Design is that it traces along the line automatically until it reaches an intersection, where it stops and waits for an input from the user on which way to go. It also has a setting that will allow it to jump the blanks, and you can control how big the blank has to be before the tracer stops. Of course, the downside is that it's not open source.


If I understand you correctly, you may be able to get what you're after by using the "Polygon from Layer Extent" tool.

Location of "Polygon from Layer Extent" Tool

It will let you pick one of your layers and export a bounding polygon.

Hope that's what you're looking for. If not, please add more detail and we'll see what we can do!

  • Hi JohnR, thanks a lot for the suggestion. I don't think this can work though since I don't have any layers yet apart from the actual initial picture. So what I want is in a way QGIS to create this layer for me. When I try I simply get a layer covering my entire picture. – Per Apr 29 '16 at 8:13
  • Since its supposed to " export a bounding polygon", thats what you will get. – Hasan Mustafa Apr 29 '16 at 13:10

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.