OpenStreetMap

Node gluttony for areas

Posted by HannesHH on 21 September 2008 in English. Last updated on 29 March 2012.

Please be aware that this is a quite heatedly discussed subject. One side says "yes, this is how to do it", the other "no, that is just wrong". So please decide for yourself what "side" to choose (and of course decide case by case).

Many people map areas using new nodes. This might be the (seemingly) most easy way but it has several disadvantages when the area in fact is "attached" to nearby streets in the real world:

a) When moving the streetnodes around, the area has to be adjusted by hand. That's unnecessary extra work.
b) It's gluttony, the right nodes already exist.
c) Due to not connecting street and area there might un-intended gaps when rendered.

How to map:
Simply start your area and click on the already existing nodes, it's like magic!

How to edit:
If you have an area like above there is no "free" side of it to click on, if you want to select it. No idea about Potlatch here. In JOSM press and hold middleclick on any side, then press and hold CTRL, leftclick on the desired way in the popup.

How to fix:
Enter The Great Merge Tool (M in JOSM). It seems to be rather dick-headed in its behaviour though... If it merges to the wrong node just undo, zoom in a lot and try to place both points just above each other. Maybe there is a way to tell it how to merge, but shouting at it is quite satisfying.

And now shout at me!

Discussion

Comment from ablansinger on 21 September 2008 at 20:07

Have you tried to validate the above with the JOSM validation plugin ?
My experience is the the validator will flag this with a warning about overlapping highway and area. If this is the correct way of mapping these cases, I would suggest that the validation plugin is changed.

Comment from walky on 21 September 2008 at 20:27

how can i do this in merkaartor?

Comment from HannesHH on 21 September 2008 at 20:29

Yes, the JOSM validator always nags but I am very sure this is a good mapping technique. I am not sure who recommended it to me at first, probably it was deelkar.

No idea about merkaartor, sorry.

Comment from Breezer on 21 September 2008 at 20:56

I do remember an OSM team member posting something about this shortly after I signed up but I didn't understand areas then (and just about ways); thanks, I really wanted something like this to apply to some edits I did recently so I'll try to fix them.

Thanks for the tip!

Comment from ColinMarquardt on 21 September 2008 at 22:34

walky: In Merkaartor, you use Node > Merge (Alt+M).

Comment from LivingWithDragons on 21 September 2008 at 23:24

I'm currently learning how to middle click, I think my mouse doesn't recognise it every time.
Is there an alternative, like alt+click? This would be important for laptops.

Comment from ipofanes on 22 September 2008 at 08:29

How do I align an already existing path to another already existing path?

The use case:
Somebody drew district lines from a very coarse map. Having better map materialavailable, I am adding points and dragging them to refine the border. Sometimes, the border is supposed to run along another geographic feature, such as a road or a river, which has been meticulously drawn before by somebody else. Now, I would like to copy the part of the river which the border aligns to to my border path. Shift-clicking the bordr path, moving the points to the vicinity of the river points and then start a merge orgy sems the correct thing to do, but is a usability PITA. Can you suggest a better way?

Comment from HannesHH on 22 September 2008 at 10:02

If I understood you: I would delete the part of the part you want to connect to the existing way and then "re-node" from there. To automate something like this you would need the exact same number of nodes for both way segments I guess.

If you want to copy some part of a way you could split it first, the select and copy the segment to the new way and combine the old again. But I think that was not what you asked.

Comment from Andrew Chadwick on 22 September 2008 at 13:50

Given that this is Just Plain Wrong :) [1] some JOSM tools for those trying to fix messes like the one above and work with correctly-laid-out areas:

* Drag-select with shift to select multiple nearby nodes before moving,

* Node unGlue, now built in to JOSM. Hit the G key when a single node is selected to split it into /n/ nodes, one per way. And then you can position the nodes correctly. Lovely!

[1] It *is* plain wrong for buildings, which have definite shapes and do not terminate at the centreline of roads. It's less clear for landuse, which is at least in part a notional, balance-of-use-based distinction (along the lines of "this road is residential" vs. "this road is tertiary/unclassified", in fact. Especially for landuse=residential)

Comment from Mappo on 22 September 2008 at 14:47

I'm glad someone posted this. I had thought this was the way to go, but had some strange feeling that it wasn't considered correct (e.g. I knew that JOSM would complain and had read some confusing discussion on the wiki) and so have being doing it the messy way for fear of breaking some unwritten rule of OSM.

Regarding Andrew's comment about buildings. Why would a building be different from a grassy common, car park or other area? If they adjoin a road (i.e. there's no garden between the building and pavement) then they both end at the inside edge of the pavement, which is included in the road way (at least in the UK by default). If the roads the wrong width then that seems equally problematic to the building being mispositioned.

Comment from HannesHH on 22 September 2008 at 16:49

Of course you have to adapt or ignore this technique depending on what you are mapping. I often see places like this however where (to me) it seems obvious that the mapper tried emulating mapping like described.

Also it depends on your very own motivation and idea about OSM. If you mapping for a virtual image of the world, then this might not be accurate enough for your taste. But if you are mapping to create a nice map, then I say this is sufficient in most cases.

I am just another user, this is be no means officially good. ;)

PS: Node unglue is amazing, thanks!

Comment from ipofanes on 22 September 2008 at 17:38

Landuse: When a road separates a forest from a town, I would definitely let both end at the "middle of the road", since the road is the separator. By the same token, I would never split a wood into two landuse areas just because a road runs through it. As for buildings, your point is taken.

Comment from Mungewell on 22 September 2008 at 21:17

On thing not mentioned in routing.... If an area is of a suitable type then it could be used for routing, such as walking across a park or via a parking area.

This 'use the same nodes' approach would have to take care to ensure that the whole shared boundary is indeed routable, and does not contain a boundary such as a fence. Maybe careful placement of shared nodes would be able to indicate entry points to a park.

That said I am in favour of this approach as it produces neater looking maps.

Comment from ipofanes on 22 September 2008 at 22:20

Mungewell: yes, in this case you need additional points. See my attempt on starting a discussion in http://wiki.openstreetmap.org/index.php/Talk:Tag:highway%3Dgate or note how I made the gates part of the interior of the cemetery in http://www.openstreetmap.org/?lat=49.39664&lon=8.69293&zoom=16&layers=B000FTF.

Comment from Andy Allan on 23 September 2008 at 15:28

I'll just point out to anyone else reading this that the method described is highly frowned apon by many people in openstreetmap. If you are wondering why, then there's plenty of stuff on the mailing lists about it, and I'm not going to rehash it all here.

Comment from HannesHH on 23 September 2008 at 16:14

Uh-oh. :(
Care to leave some pointers or links?

Comment from HannesHH on 28 September 2008 at 09:52

Right, I just spent an hour browsing and searching the mailing lists and read up on this.
This seems to be the "best" discussion of it http://lists.openstreetmap.org/pipermail/talk/2008-May/026305.html

It all boils down to this: http://lists.openstreetmap.org/pipermail/talk/2008-May/026326.html
"This is one of religious discussions - both sides KNOW they are right,
and no amount of discussion is going to change things. Unless we have
a central decision making force of some sort lay down the law, (in OSM
- hah!) you'll continue to see things mapped both ways."

So I will add an disclaimer to my post and happily continue mapping and advertising to map like this.

Comment from slashme on 2 November 2009 at 19:18

Wow, after reading that discussion, I was first convinced that your way was better, than than it was all wrong, and then that it is quite subtle and depends on context. Near where I live, there's a housing estate surrounded by a fence, with a grassy area separating it from the highway. Clearly, that is an example where the highway is not the border of the estate. However, if I were to map a farm that goes up to the highway (i.e. the highway is the border of the farm) I can on one side argue that it is cleanest and simplest to re-use the highway nodes, or on the other side argue that there is 5 metres from the centreline of the highway to the farm fence, so one should map the two separately. I won't shoot anyone on either side of this argument. As soon as we have the whole world mapped to the satisfaction of the keepright tool, we can start fighting about stuff like this.

Log in to leave a comment