JOSM/Plugins/BuildingsTools

From OpenStreetMap Wiki
Jump to navigation Jump to search
BuildingsTools icon BuildingsTools
Plug-in for drawing rectangular or round/circular buildings

Buildingstools is plug-in for simple drawing of rectangular or round/circular buildings.

The problem it solves

Drawing many rectangular buildings in JOSM can be tedious. One needs to draw a rough rectangle in 5 mouse clicks, then use the Tools... "Orthogonalize Shape" function, then insert "building=yes" tag in the resulting polygon.

As an alternative, at the beginning of an editing session, you can activate angle-snap mode by pressing A. Then one needs to draw an exact rectangle in 5 mouse clicks. At the end of an editing session, press Ctrl+F to open the search dialogue. Type: new -closed untagged type:way to select rectangles that you failed to close due to misclicking, investigate them in the selection window and merge the end nodes and ortogonalize them (you may add temporary tags to mark them). Then search for new closed untagged type:way, tag them with "building=yes". This method is especially useful for multi-part buildings or those that are not a simple rectangle.

Due to improvements in JOSM, now it can be done somewhat quicker than before, for example using Extrude (instead of drawing and orthogonalizing the outline) which reduces the number of clicks, and then adding building=yes to all your buildings at once when you're finished drawing them. But even like that - it's still relatively complex and time consuming.

Here comes the BuildingsTools - the plugin which makes it all much faster and allows the mapper to add complete buildings in 3, or mostly just 2 mouse clicks!

Installation

Drawing a building over Bing Imagery

Install the plugin per the instructions at JOSM/Plugins#Installation. You can also Watch a demonstration video for a simple (while a relatively old) tutorial on how to install and also use the plugin.

Usage

The plugin adds a new "Draw buildings" button on the toolbar to the left, which you can then use by clicking on it, or just by pressing the B button.

Rectangular buildings mode (default): To automatically create a rectangular building object - you have to draw a line along one side of the building, then click on the opposite side. You can activate this mode by Alt+R, if circle buildings mode is active.

Circle buildings mode: From the More Tools -> Draw buildings modes -> Set building shape to circle menu or keyboard short cut Alt+Z (if you have NVIDIA Panel used by this shortcut, it will not work in JOSM) your can configure the plugin to draw round buildings. To then draw a round building click once on the outer edge of a round building and draw a line to the other side and click once on the edge of the building on the other side. You can return to rectangular buildings by typing Alt+R.

Two-click building drawing mode: If selected way is orthogonalized or drawn using BuildingTools, 2-click building drawing mode is enabled, which allows for an even quicker mapping of buildings sets by just clicking on two corners of the new building. Selecting "Auto-select building" option in settings helps to use it most effectively when mapping a lot of buildings.

! Probably outdated info, as nothing is snapping by default now: Temporarily disable all snaps by pressing Ctrl key. This helps when mapping an isolated house that isn't parallel to the nearby street.

Plugin options and additional features

To open plugin options, press Ctrl+Alt+B . Or another way, you can select More Tools -> Draw buildings modes -> Set buildings size in the JOSM menu on the top, which opens the same window.

  • Rectangle/Circle Selectors - here you can also switch between those modes mentioned above.
  • Building Width/Diameter (number value): When there are many buildings with the same width, you can set constant buildings width in meters here. Then the first click sets a corner/diameter position, the second is used only for the direction. So it will be sufficient to just draw a line along the wall of the building. 0 is a default value and disables the feature.
  • Length step (number value): Building length snaps to multiples of this length. Only effective with "Building Width/Diameter" set to 0.
  • Use Address Dialog: Plugin has built-in addressing dialog. It remembers the street name and automatically increments or decrements house numbers (+2 or -2).
  • Auto-select building: Select newly created building if nothing is currently selected. Works closely with 2-click drawing mode, as when a way is selected, BuildingTools snaps walls angle to each segment of that way. For example, after you drew one set of buildings, press Esc key to deselect currently selected building and draw a building from second series - then it will be automatically selected and next buildings now will be aligned to it.
  • Auto-select replaces existing selection - Causes every new added building to now be the one selected (and the next building aligned to it instead), instead of first one in the series.
  • Use address nodes under buildings - When there is a node with "building" tag with address information within a newly created building, add tags and relation memberships is copied to new building and original node is removed.

"Advanced..." submenu:

  • Building tags (key/value pairs): Add or modify the default building=yes tagging to whatever set of tags you desire. It doesn't even need to be buildings, you might find it useful for mapping other commonly rectangular features such as leisure=pitch and amenity=parking. The default tagging can be adjusted in the "Advanced Preferences": opening the menu JOSM -> Settings -> Advanced Preferences and then open the entry with key "buildings_tools.tags".
  • Big buildings mode: When mapping in two-clicks mode, you usually click the first corner of the building and move your mouse to another. If you see that the walls don't fit to what you see on WMS image, you are supposed to press Shift and draw one wall, clicking on the third corner afterwards. In big buildings mode, you just click on first corner, press Shift and click on the opposite corner, rotating the building outline afterwards. (This can be activated in the "Advanced" dialog.)
  • Rotate crosshair: When mapping in two-clicks mode, it's more useful to have cross-hair cursor rotated to be parallel to the walls of the newly created building.
  • Disable click+drag - ???
  • Switch between circle and rectangle modes - ???

Mapping with oblique corners

Drawing a building with oblique corners

In past there was a lot of problems with buildings with oblique corners because they cannot be orthogonalized. Now it's relatively easy to draw such buildings. One can set a constant width in Buildings size dialog, draw two intersecting buildings and then use tools... "Join overlapping areas" function ( Shift+J).

Developer

Created by User:Upliner. Please submit your bug reports and feature requests.

Source code: SVN (note: this repository was archived on Oct 14, 2022, so link probably needs updating).

See also

  • JOSM/Plugins/Terracer - another tool for tracing buildings, especially suited to terraced houses (townhouses, row house)