NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

0
1

I want to draw two adjacent areas that share a common boundary using JOSM, or more generally, an area that is divided into two or more sub-areas. How do I do this?

asked 07 Aug '11, 22:25

ceperman's gravatar image

ceperman
2917817
accept rate: 0%


Let's say you have two adjacent areas a bit like the geometry formed by the letters "CD".

You would create three ways; one for the "C", one for the "D"'s belly, and one for the line that separates them (let's call it "I" because it looks like one). These ways would go untagged, or maybe tagged boundary=administrative so that people know what they are. Then you would create two relations, one containing the "C" way and the "I" way, and one containing the "I" and the "D" way. The relations should be tagged type=multipolygon, boundary=administrative, admin_level=x (whatever level it is), and name=y (each with its own name).

Some people also use type=boundary but multipolygon is more commonly understood.

The above is the "proper" method that can be used for any number of adjacent areas - if you have a mesh of areas then your relations will often have more than two members. In its relation editor, JOSM provides a visual clue as to whether all the ways you have assembled in that relation really form a closed ring or not.

There is also a simpler method that you can use if the "I" way is rather short and has few nodes only. In that case, you can simply draw both areas as a closed way - two ways only, no relations - and have them share the nodes of the "I" way. This is perfectly ok for small stretches of coincidence. It avoids the relations which are difficult for many newcomers, but at the same time modifications to the shared "I" border will often be more difficult.

permanent link

answered 07 Aug '11, 23:14

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thanks for that. In my typical cases the areas are small and simple, so the second method would be OK. But how do I share the nodes - that's the bit I'm missing. Once the common nodes belong to one closed way, say D in your example, they aren't available to close the C way.

(10 Aug '11, 16:23) ceperman

The two nodes of the I part are available to close the C way: simply use them to close the C way. Avoid pressing any of the modifiers key (CTRL, SHIFT, ALT) while clicking on these nodes (see JOSM Help, http://josm.openstreetmap.de/wiki/Help/Action/Draw).

The simple method works very well to draw a pair of semi-detached houses: first draw the first house, then draw the second house using the two common nodes from the first.

(10 Aug '11, 21:08) mmehl

In my case the I part is not a simple straight line, but a squiggly way with multiple nodes. When I try this, a segment is drawn between the two common end nodes, ignoring the way between them. It seems that what you're suggesting only works for common nodes that are adjacent. Or am I just being a newbie?

(11 Aug '11, 08:45) ceperman

If the "I" has more then two nodes, then you have to add every node to share these in the second way.

If the "I" has too many nodes, you may consider the approach with relations.

(12 Aug '11, 22:17) mmehl

You can use the "Follow" feature in JOSM. ie draw the way, connecting to the first two shared nodes. Then press F for as many times as is needed. The way will continue along the way, sharing nodes. See http://josm.openstreetmap.de/wiki/Help/Action/FollowLine

(12 Aug '11, 22:53) Vclaw

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×622
×92
×15
×7

question asked: 07 Aug '11, 22:25

question was seen: 9,720 times

last updated: 12 Aug '11, 22:53

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum