Skip to main content
3 of 5
edited body
Matthias Kuhn
  • 28.1k
  • 3
  • 89
  • 130

I was still using version 2.2.0 when I posted this question, I've since upgraded to 2.8.1.

What follows is a little bit of a tutorial for those folks who might be looking to tackle the same problem.

The solution for me was a plug-in called cadinput by Oliver Dlang, I'd installed this quite sometime ago, but never actually looked at what it did.

Then I stumbled across this documentation:

https://github.com/olivierdalang/CadInput

and a video about it on Vimeo.

https://vimeo.com/85052231

Wondering where I could find the plugin, I looked in my plugins manager, only to find that I already had it installed, so I set about learning how to use it. I later found out, that from version 2.8.0 of QGis on-wards, this plug in is actually built into the core under the advanced digitizing tools.

How to use Cad Input

The documentation doesn't really go into any detail, and there's no commentary on the video, essentially it all boils down to the following shortcut keys however:

  • A : angle
  • D : distance
  • X : x coordinate
  • Y : y coordinate
  • Combine those with "shift" to toggle absolute/relative mode
  • Combine those with "alt" or "ctrl" to toggle locked mode.
  • C : construction mode
  • P : parallel / perpendicular to a segment
  • ESC : unlock all locked parameters

Pick the feature you wish to digitize, and put your layer into editing mode as usual, in my case this is what I'm digitizing.

enter image description here

Once your in editing mode, click on your add new feature icon (again standard stuff) and then look for and activate either the advanced digitizing tools or the cad-input plugin (the icon is the same for both of them)

enter image description here

It looks like a set square with a ruler behind it.

A word of warning here though, if your using a newer QGis Don't Install the Cad-Input plugin. I found that with the plug-in installed, and a version of QGis that included the built in version, the short-cut keys stopped working.

Once I uninstalled the plug-in the shortcut keys started working again, and they are the key to using this tool effectively.

Once you activate the cad-input tool, you should find you have a panel that looks like the following:

enter image description here

(I've drawn some highlights on it...)

  • You have your main enable/disable button (Red rectangle)
  • A construction mode button (Green Rectangle)
  • Parallel and Perpendicular mode buttons (Blue rectangle)

Looking at the shortcut-keys, C turns the construction mode button on/off, P toggles the parallel mode buttons, press it once to get perpendicular, press it twice to select parallel lines.

I'm not going to go fully into the parallel modes here, as the only one I was using was angle lock.

With the new feature tool active, and advanced digitizing enabled, draw the first two points of your rectangle, along one edge of the feature you wish to digitize.

enter image description here

You'll see once you get the second point clicked down, that a thin green construction line protrudes from the end of the line you created.

This is a construction line for the advanced digitizing tools. If you move your mouse downwards, to do the second face, you should find that your cad-input will start to show the angle your moving at.

It's at this point where there's a bit of a difference between the two versions.

In the built-in version, by default, the tool will automatically snap to 90 degree angles (Although you can change this in the options), if this happens you'll see the following:

enter image description here

Notice the blue line at a right angle to the bright green one?

In your digitizing panel, you'll see the angle should be at 90 degrees. If your using the plug-in version, you'll not see this blue line however, but you should still press ctrl+a to lock the angle in the tolls panel.

IN the plug-in version, if you press ctrl+a even with an angle that's not 90 degrees, you'll find that you can mouse over to the panel and type in 90 manually with out affecting your digitizing process, getting 90 in the box and locking it down, is what makes the rest of the process simple.

Continue to add points at the corners of your building, remembering to press ctrl+a after each point you add, this will ensure that your next point is always drawn at 90 degrees to the previous one.

enter image description here

Once you get to the last point, line it up by hand (Unfortunately the tool has no help here..) click to add the last point, then right click to close the polygon as normal.

There's a ton more functionality in the tools too, but no space to document it all here.

My final 100ft view however:

enter image description here

Wouldn't have been possible without it.

shawty
  • 1.7k
  • 2
  • 19
  • 34