Why not ask your question on the new OpenStreetMap Community Forum?

Can a way contain the same node more than once and not be a simple loop?

I know the following is possible: 1-2-3-4-5-1

But can you do this? (The following could, for example, produce a P-shaped way) 1-2-3-1-4-5

Thankyou Gary

asked 12 Jul '10, 13:01

gsteinert's gravatar image

accept rate: 0%

Yes, that is possible in the OSM API.

Nodes can appear as many times as you like within the same way. You can even do figure of 8 ways that join in the middle.

These are most useful for lines like roads, rather than areas, as for areas what's inside and outside can become confusing.

Of course there's no guarantee that all tools out there will support every configuration of way you create, and just because you can doesn't mean that you should :-) So keep it simple. I've used P-shaped ways before but nothing more complicated.

permanent link

answered 12 Jul '10, 13:23

randomjunk's gravatar image

accept rate: 75%


I think we should distinguish between "crossing" and "touching". "Touching", like in the "P" case is ok and there are good uses for that, for instance a road ending in a turning circle. But I haven't come across any case where it actually makes sense for a way to cross itself. A closed way (for instance a roundabout or an area) is just a form of a way touching itself.

(16 Jul '10, 09:33) Jochen Topf

Indeed. The question was specifically about using the same node more than once in a way.

(16 Jul '10, 10:35) randomjunk

Here's a case where it would make sense for a trunk_link to cross itself. It doesn't because I had to break it to add a turn restriction.

(16 Jul '10, 10:47) NE2

As already stated it's technically possible to create a way in OSM that contains a node more than once.

It's usually considered faulty and tools like JOSM validator or the numerous quality check tools will report such self-intersecting ways.

That relates to constructions like a 'P' or '8'. It does not apply to closed ways creating areas. That is a way where the first and last node are the same. You will use the later to map buildings or lakes.

Some quality checks that list self-intersections are:



permanent link

answered 12 Jul '10, 20:14

Stephan%20Knauss's gravatar image

Stephan Knauss
accept rate: 0%

edited 12 Jul '10, 20:24

randomjunk's gravatar image


Yes thats possible but in my Opinion there are very few cases where this makes sense. in my opinion it is better to split the way.

permanent link

answered 12 Jul '10, 13:11

Islanit's gravatar image

accept rate: 0%

edited 12 Jul '10, 13:11

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 12 Jul '10, 13:01

question was seen: 10,679 times

last updated: 16 Jul '10, 10:47

powered by OSQA