Thursday, July 28, 2011

Improved Polygon Capturing 1.0 is released

I'm pleased to announce version 1.0 of the Improved Polygon Capturing plugin for QGIS!

Until now I didn't want to give version 1.0 to this plugin since one important feature was still missing: After digitizing a new geometry the feature form was not opened like it is the usual behavior of the standard editing tools. But today I discovered very coincidentally the openFeatureForm method in the QgisInterface class. It wasn't a big deal to integrate it and now the feature form is opened and the plugin gets to version 1.0.
Feedback is highly appreciated!

From the help file (last update 8.8.2011):

Improved Polygon Capturing is a QGIS Python plugin, that allows to digitize new polygons or lines with predefined edge lengths. Point layers are not handled.

The plugin is available in the QGIS contributed repository. Please see the official QGIS manuals to get further information about plugin repositories.

How to use

The plugin adds a new icon and a spin box to the digitizing toolbar. The icons are derived from the gis icon theme and look as follows:

Editing a polygon layer:Editing a line layer:

The digitizing toolbar with added plugin:
Select a polygon or a line layer and toggle editing. After setting the first vertex the next vertices are added in the direction of the mouse pointer with the predefined length set in the spin box. Similar to the standard editing tools left mouse clicks add a new vertex while right mouse clicks finish the geometry.
After finishing a new geometry the feature form opens and attributes can be entered.

While digitizing new vertices the snapping properties from the current project settings are considered as well as the avoiding intersection properties.
If the distance in the spin box is set to 0 (zero), new vertices are set at the mouse position.


The plugin calculates the distance in plain trigonometry. Thus it is not recommended to use it in unprojected systems like EPSG:4326.


Improved polygon capturing plugin has been developed in June 2010 for a land management and registration project in the Lao PDR. It is used to digitize land parcels with known edge lengths from high-resolution satellite images. The parcel edges have been measured a priori in the field.
  • Version 0.8 (June 2010): first published version
  • Version 0.9 (February 2011): added support for polyline layers
    and bug fixing
  • Version 1.0 (July 2011): feature form opens in editing
    mode after finishing a new feature
  • Version 1.0.1 (August 2011): plugin gets an icon in the plugin manager and rubber band line width and color settings are considered


  1. Hi, I have just found your blog. Nice posts indeed! It would be great to see this blog in Planet OSGeo aggregator - see on instructions how to add it.

    Additionally, would you be interested to contribute a case study of QGIS usage in your project in Lao PDR? Several studies have been contributed already:

  2. I'm not sure if this is the right place to ask or not, but I'm having trouble with getting Improved Polygon Capturing to work. I can't get the spin box or the "capture polygon with preset edge lengths" to work. They never give me the option to change what the spin box says even though I'm in edit mode. Am I just slow? lol. Both buttons are dark and no matter what I do or what mode I'm in they won't become usable.

    1. Yes, first you start editing a line or polygon layer, then you use the "Capture Line with preset Edge Lengths" tool instead of "Capture Line".
      What do you mean by both buttons are dark? Are they inactive?

    2. I was just being slow. Stupid mistake on that one.

  3. What measurement system is being used in the spin box? And is there any way to make it work with things like feet, meters and so on?

    1. The measurement works always in the project CRS. If you want to work it in feet or meters change the CRS in the project properties and enable on the fly transformation if your data are in a different CRS.
      To use this tool I strongly recommend to use a projected reference system.

    2. I'm in the middle of the States...any tips on which one would be right? I had no idea there were so many different options.

    3. Awesome!!! You Sir, are a lifesaver! Had to do some serious, serious digging to find the right one, but with much trial and error, it's working!!! This is an AMAZING tool! Thanks!

  4. May I suggest in future version to auto add the vertex instead of clicking.So user only need to hold down the left mouse button.Thanks for the great apps.

    1. I'm glad to hear that this plugin is useful for you!
      Thanks for your suggestion, I'll try it out to see if that could improve the user-friendliness.

  5. Hi there,
    thanx a lot for your plugin.

    I dare to post some requests here, maybe you are able to do one or the the other ...

    1. Can you maybe commit your plugin to the official repository? I found it only in the contributed, and since qgis 1.8 all other repositories are not available so easily anymore (in the really scattered qgis web-environment there is only little to no chance for newbies to find anything else than the official ones).

    2. follows 1: would be nice if you then had your plugin in the tracker at

    3. now, my actual request;)
    I get informations for new transects somemwhere in the wilderness from field surveyors, with the starting point coordinates, the lenghts and the direction angle.
    Even with your plugin, i have no real chance to set those transect lines easily, cause i can only set the starting point and the line with the fixed lenght, but have no idea how to determin the direction.

    I had to help myself with a plastic triangle holding to the screen. This is of course possible, but wrenches my poor geographers heart.

    Do you see a possibility to add a display of the current angle of the line while moving it?

    I wouldn't ask you directly if a similar feature request on the qgis tracker wasn't postponed to an undefined future version ... so maybe never.(

    I think such an addtion would help many people a lot! (at leat me ;) )

    Thanx for reading

  6. Hello mate,
    I noticed that, in some of the computers I install the plugin (always 1.8 version of qgis), the ANGLE AND DISTANCE box doesn´t show up and I don´t get it to work.

    What´s going on?

  7. El plugin para la captura de poligono mejorada para la version qgis 2.0 tiene muchos problemas, arroja errores y no aparece el recuadro con la distancia y ángulo

  8. Funciona solo una vez y luego presenta error