NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the 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

gsteinert
74115
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

randomjunk
1.5k91518
accept rate: 75%

1

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
1

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

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

Islanit
4413
accept rate: 0%

edited 12 Jul '10, 13:11

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:

http://wiki.openstreetmap.org/wiki/Self_intersecting_way_reports

http://wiki.openstreetmap.org/wiki/OSM_Inspector/Views/Geometry#Fix_self-intersecting_ways

permanent link

answered 12 Jul '10, 20:14

Stephan%20Knauss's gravatar image

Stephan Knauss
4501311
accept rate: 0%

edited 12 Jul '10, 20:24

randomjunk's gravatar image

randomjunk
1.5k91518

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:

×193
×167

question asked: 12 Jul '10, 13:01

question was seen: 11,471 times

last updated: 16 Jul '10, 10:47

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