Roof modelling

From OpenStreetMap Wiki
(Redirected from Mapping Buildings)
Jump to: navigation, search
Available languages — Roof modelling
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Basa Sunda · Baso Minangkabau · bosanski · brezhoneg · català · čeština · corsu · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tagalog · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · भोजपुरी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · བོད་ཡིག · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ‎ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 中文(繁體)‎ · 吴语 · 粵語 · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް

Notes for drawing buildings in Potlatch 2 and JOSM basing upon BING or other aerial imagery

This article refers using of Potlatch 2 and aerial images like Bing. Apart from details in the handling of Potlatch 2 are the discussed methods also applicable:

  • in other editors like JOSM and Merkaartor
  • with aerial images other than those of Bing.
Author: Marek Strassenburg-Kleciak


Don't forget to add (in the left panel) a building tag to the outline after drawing!

You should only use the most detailed zoom level when drawing buildings.

In Potlatch 2, the background imagery layer should not usually be "dimmed", as it can make interpreting the images harder. To turn it off, select Background and uncheck the "Dim" checkbox:

Potlatch 2 - Rysowanie budynków 01.png

Drawing of simple building outlines

The goal is to draw the geometry of the building outline as precisely as possible:

Potlatch 2 - Rysowanie budynków 01.jpg

These parts of the aerial image are helpful in the interpretation:

1. Drop shadow of the building - black color
2. Roof - light blue color

After the roof shape has been drawn as an outline, it should be moved to match the location on the ground level. To accomplish that, move the way until the corner of the roof touches the best visible corner (here: the lower left corner) of the drop shadow (white outline in the drawing):

3. The dark blue arrow shows how the vertical direction appears in the image. In this picture it is visible very well, but if it isn't, look at the neighboring buildings to define the direction

About the logic of building making

The building are often designed and built based on the right angle. Parallel and perpendicular walls simplify and cheapen the construction, they allow the use of standardized components and simpler manufacturing and installation (e.g. roof construction). It's also convenient for the tenant to have their squarish furniture fit the right angled corners. However, not all buildings are constructed on a right angle plan. Examples are old buildings, architect's choice to avoid the right angle for a more visually striking facade and limitations set by the surroundings; for example corner buildings when the streets are not at a right angle.

Therefore, when drawing buildings from poorer quality aerial images, it is wise to assess whether each building is likely to have right angles on the ground, or whether the corners possibly aren't such. Prior knowledge of the settlements history, and of the architect's style of choice can be valuable when making the assessment.

Please note: Buildings often have symmetry axes!


4x and 2x symmetry

Note: JOSM PlugIn CADTools has mirror copy function!

Function "make rectangular"

Potlatch 2 (and iD and JOSM) has a built-in function with which you can make the closed polygon perpendicular. For relatively simple building forms, you are very likely get good results with this feature, even for buildings with lots of corners:

Potlatch 2 - Rysowanie budynków 04.jpg
Note: JOSM shortcut for making rectangular is Q


Drawing of many identical buildings.

Potlatch2: has not yet the "copy" - "paste" function, but you can get this result: Just use option "create parallel way", and make a copy of drawn building outline. If you zoom highly on the building, you can draw a copy of which is practically identical to the original. In many settlements you can often see the buildings which have identical geometry and stand parallel to to each other. Is the quality of the aerial photographs partially not good enough, you can trace the best visible building as accurately as possible and work with this sample building.

JOSM: Ctrl+D. Using PlugIn CADtools are more copies, e.g. rotated possible.

B. Drawing of complicated building outlines.

Potlatch 2 still has not expanded CAD functions. But you can do good template for a relatively precise interpretation of the building outline through the drawing of many construction lines (using the command: "create parallel way, shortcut P"):

Potlatch 2 - Rysowanie budynków 05.jpg

Practical use: We draw a large outline along the longest sides of the building and convert it into a rectangle (option "make right angles") around. We copy the rectangle to as many construction lines (which by definition are parallel and perpendicular to each other) as necessary. The construction lines (rectangles), are moved to the outer edges of the roof surface to trace the outline shape:

Potlatch 2 - Rysowanie budynków 06.jpg

After tracing we remove of course all the construction lines...


Potlatch 2 - Rysowanie budynków 07.jpg
Potlatch 2 - Rysowanie budynków 08.jpg

B.2. "Straighten" neighboring exterior walls of buildings by using of command: "straighten way"

Situation: Some adjacent buildings (as an example here downtown, old buildings). We see the outer walls of the buildings are in fact a straight line, but in the drawing shape it is "almost" straight. To straighten these edges, we draw an auxiliary line, touching all points of this curve. It is necessary that at least one endpoint is outside this line to straighten the walls:

Use function: "straighten way" As a result, the outer edges of the houses are straightened.

Buildings after execute of order: "straighten way"


Result after deleting of helpline:

Note: the same function in JOSM is the shortcut: l

B.3. "Straighten" not neighboring exterior walls of buildings by using of command: "straighten way"

  • The problem is clear. Using of orthogonalization made one node wrong positioned:


  • Solution: Drawing of straighten line with begin AND end on the proper drawn corners of building:


  • Result after execute "straighten line":


C. Drawing of long "snake buildings" in Potlatch2

Tracing the long blocks of flats which are built along a polyline with many changes of direction, is often a source of error:

Many users zoom in so that you can see the whole building on the screen and draw the outline shape, making the accuracy low. It is especially difficult to draw the right angle on the short sides of the building.

You can work around it by drawing a double line in Potlatch 2:

We draw on the best long, side of the building and make a copy of the polyline with the command: "create parallel way", (shortcut P).


We get a second polyline that is "parallel" to the first. But above all relates to the corresponding endpoints of the two polylines at right angles. We extend the polylines so that they touch. By holding down the Ctrlkey we activate both polylines.


Then we click on the button "merge ways" Polaczdrogi.jpg

and both of the polylines connect to form a way which is then converted to a building:

Note: the same function in JOSM is the function: PlugIn Parallel way (Shift+P) makes parallel copies of ways

Drawing and rotation of ellipse with JOSM

For this purpose you have to load JOSM PlugIns CADTools and ShapeTools

PlugInCAD Tools allows generating of ellypse in that way:

1. Draw a rectangle describing an ellipse on the map. Activate this shape.

2. Start CADTools (Tools -> CADTools)

3. Click on the button: "From polygon to ellipse". Info: the number of segments (segments= <>)

will be four times larger. We put in the window as if the number of segments on a quarter of the ellipse. Click on OK.

The result is today saddled with programming error: ellipse will be drawn in a horizontal or vertical position. It should be now rotated on the correct angle.

4. Use for this the plugIn "Shape Tools" that can be find here: this PlugIn allows you to rotate any element of the specified angle.


Drawing midline of the ellipse


Drawing outline rectangle...


...finalize rectangle


Choose CAD Tools and put the number of segments. Enter.


Result has wrong rotation. You have to measure the angle ( steps 1,2,and 3=activating of "Shape Tools" )


Insert there the measured rotation angle value. Enter.


Result: Now you may add your key and values for the ellipse.


note: this is OSM way nr.

Typical errors in the interpretation of roof geometry from aerial images

Outline in wrong location

The user has drawn the roof shape carefully,

A drawing of outline.jpg

but has then moved the way to touch a wrong, false corner of the shadow of the building. (This is a quite common error.)

B bad moving of roof shape.jpg

The shape should have been moved all the way to touch the real intersection of the wall corner and the shadow edge, as in this drawing:

C good moving.jpg

Incorrect interpretation of double pitched roof

When the roof is sufficiently pitched, there can be a visible corner in the middle of one edge. The wall is nevertheless straight here - this corner does not exist in the building outline.

E don t use this point for drawing.jpg

Incorrect interpretation of pitched roof

Sloped roofs can be tricky even for an experienced mapper, because the angle of the roof can easily go unnoticed. If that happens, the building shape is drawn as follows:

K 6 Pitched roof bad interpretation.jpg

If one is not carefull and just selects the "make rectangular" function, the result looks like this:

K 7 Pitched roof bad interpretation by change to rectangle.jpg

Quite often this error is only evident only after the previous step, when the edge of the now oblong building shape, and the corresponding edge of the shadow aren't parallel - assuming the mapper is lucky enough to see the edge of the shadow well enough.

Correct procedure:

K8 Pitched roof interpretation with description.jpg
  • First draw the both visible edges of the walls at the ground level: a way connecting nodes A-B-C
  • Move this line "upward" along the building wall, until it touches the corner of the ceiling best visible in the image (Node F)
  • Now you can add the edge from F to G (the roof edge is horizontal there), and then from G to Y.
  • Finally, move the way back to A-B-C-D.

Modelling of outlines of building with different heights

The correct tracing of buildings with different height components is particularly problematic. This is is especially true if the plan is also covered by adjacent buildings or trees. Sometimes only a tedious procedure as described below is possible.

1. The highest part of the building is drawn.


2. The traced outline is moved downward so that it touches the adjacent lower-lying area.


3. The area, which was traced first, usually gives us the location of additional, hidden points P that we need for construction of the second surface.


4. After tracing, the two areas are merged and moved down based on a visible corner of the floor plan.


Drawing of building outlines of buildings on slope

If a building stands on very uneven terrain,


tracing the outlines of the buildings at the ground level leads to erroneous results, if used as a template for oblique aerial photographs:

Lterrain2.jpg Blue arrow: View direction of the camera.

In such cases only the roof shape should be drawn as the building outline and not the geometry of the intersection lines between the building outline and terrain:


After construction of roof outlines, move them so that the building is properly placed in relationship to the street.

In case of free-standing buildings without reference to the street, the position error is reduced by a shift of half the distance between the lowest and highest position one as the outline for on the aerial photograph visible corner building on the site selected.


Drawing of building outlines based on low resolution aerial images

If in the background of OSM there are only roughly detailed aerial photographs, the tracing of the buildings is difficult because the size of the building is nearly the size as the icons of the design tools. This is of the greatest difficulty, if one wants to draw precisely: The graphical representation of the tools and nodes is simply too large for the objects in the small scale. The approach described here deals with this problem in rectangular buildings. The technique is laborious and slow, but gives relatively good results.

Mareksmallb1.jpg - Traced, the L-shaped building in the middle.

In the first step, a long construction line is drawn which is parallel to the longest visible wall of the building. The line should be longer than the building. This allows better assessment of the building orientation.


Draw a second construction line parallel to the first (Potlatch2 shortcut "P" )


At the ends of the two parallel lines a straight line is drawn which connects the two endpoints of the lines. The line is perpendicular to both vectors previously drawn.


Use button "create parallel way" and draw another (necessarily for construction) lines perpendicular to the first two lines drawn and placed at the outer edges of the building.


Additional long construction line in the middle is drawn:


At points where the lines intersect with each other, nodes are added. With the tool "straight way" one line must be straightened after the other ... (a weakness of the potlatch is a slight displacement of the points which we have added to the nodes on the paths)




When all lines straightend, you can start drawing the outline of the building:






Correction of perspective distortion

On the buildings on aerial photographs from low altitude (usually higher resolution) perspective distortion is often seen. This means that the correctly-drawn outline of the roof is larger than the building outline.

At first glance, you hardly notice this:


Only the tracing of corresponding vertical outside edges of the perspective view (reduction to the ground plan) would make this visible:

MarekPerspKonstr2.jpg MarekPerspKonstr3.jpg

Since the building roof and floor plans are similar, you can use the tool "create parallel way" to create the right plan.

MarekPerspKonstr4.jpg MarekPerspKonstr5.jpg

Practical approach:

  • Trace roofline


  • The roof outline is moved to the ground plan
  • A matching corner (on this picture the lower left corner of the drawn polygon), is placed correctly on the aerial photograph.
  • A construction line parallel to the (right image in this example) the outer edge of the building is drawn and placed on the outside edge of building on the aerial photograph:


The outline polygon is drawn smaller with the "create parallel way" tool:


Thus, the degree of reduction is clearly visible, the detail being greatly magnified.

(Therefore, the temporary construction line is shown, at higher zoom levels the detail image disappears).

  • The newly drawn (except this picture right) outer edge of the polygon is copied

to lie on the half-way between the construction line and the source polygon.


  • The original polygon and line construction is deleted, and the new plan polygon shifted to the right place.



Attention! This method is an approximation. You get absolut accurate results only by construction of the central perspective:


Correcting wrongly assembled roof images

Apparently, the main objective when Bing combines its aerial photographs is the alignment of the streets. Therefore, combining multiple photographs taken from different angles into a single unit is done in such a way that the street is clearly visible. This means there are places where the roofs of buildings appear to be "coming apart":


The fact that one part of the roof does not fit into the other does not mean the land on which a building sits is not properly aligned. Therefore, individual roof sections are modeled separately and assembled in the ground plane.


  • Draw the construction lines of the first part of the roof. Make the construction lines a little bit longer


  • Move the construction lines to the ground level.


  • Draw the construction lines of the second part of the roof.


  • Move the second group of construction lines to the ground level:

You see that both groups of construction lines overlap, so You can combine them into an area.




Drawing of big, rasterized areas

MarekDuzyObszarNaRastrze1.jpg Existing OSM map - drawn without raster.

City Planners often use a grid: It makes planning and realization of construction projects in big areas easier. In OSM the reconstruction of the main construction grid helps with tracing of buildings, roads and parking lots. In this way one avoids the inaccuracy that arises when one works only with short construction lines. The redrawn maps look even more professional: People recognize with the eyes slight deviations from parallelism of the lines (some people perceive the little difference of 0.5 °!)

MarekDuzyObszarNaRastrze2.jpg First construction step: Identification and drawing of construction axis. This is question of practice: The longer the line, the more accurate it is.

MarekDuzyObszarNaRastrze3.jpg The axis should be duplicated to construct relevant bodies (roads, building edges), etc.

MarekDuzyObszarNaRastrze4.jpg Analogously to the previous step: drawing of axis perpendicular to the first construction axis..

MarekDuzyObszarNaRastrze5.jpg We see all the inaccuracies when zooming.

MarekDuzyObszarNaRastrze6.jpg The inaccuracies will be corrected

MarekDuzyObszarNaRastrze8.jpg Map before correction

Result after correction.

In the upper left corner of the picture below we see a building at the cross plan. This building was also drawn more precisely by using of construction raster ( due to a rotation of 45 ° to the construction grid).


Use of raster lines with auxiliary points

The technique described in the previous section is difficult, because You need to put manually at every point where two construction lines intersect an auxiliary point, or try to reach the intersection point of both lines at high zoom level.

It is smarter, after drawing of all construction lines with one direction, to draw the first "vertical" line with all intersection points. After drawing of this line, simply multiply them at all necessarily places and use for drawing of building outline.

MarekBardzoSkomplikowanyRzut1.jpg starting situation.

MarekBardzoSkomplikowanyRzut2.jpg First line construction.

MarekBardzoSkomplikowanyRzut3.jpg Last line construction.

MarekBardzoSkomplikowanyRzut4.jpg Begin with the first vertical construction line

MarekBardzoSkomplikowanyRzut5.jpg finished VERTICAL construction line





MarekBardzoSkomplikowanyRzut10.jpg drawing completed.

MarekBardzoSkomplikowanyRzut11.jpg rendering completed.