New JOSM style to show direction cones

Want to see the direction=* of a feature at a glance? Try my new map style, “Direction Cones”!

It’s inspired by the very similar direction cones which iD has had for quite a while now.

How to install:

  • F12 (Settings)
  • Map paint styles
  • choose “Direction Cones”,
  • Click the :play_button: button to add it to “Active styles” on the right
  • OK

The source code is available on GitHub.

37 Likes

Excellent. Already had since longer a little style add-in that showed the cones on yield/stop and traffic signals. https://gitlab.com/cartocite/josm-style-traffic-signs-orientation/-/raw/main/traffic_sign_orientation_style.zip

A drag around which I think ID has to adjust the viewing direction on e.g. benches would be super.

Edit: Also forgot about ‘direction’ which I had somehow de-selected. It shows on this city limit sign the viewing direction as an arrow

Would it be possible to add support for railway signals (railway:signal:direction)? This style seems not to support those, while iD does. Eg.

1 Like

I created a PR which adds support for forward/backward directions, along with new keys including railway:signal:direction.

Feel free to leave any comments or suggestions.

https://github.com/tordanik/direction-cones-style/pull/1

4 Likes

Thanks to the PR by @NieWnen, the style now supports forward/backward values and the railway:signal:direction, stop_position:direction and traffic_signals:direction keys. :tada:

Additionally, I’ve added support for light:direction, camera:direction and traffic_sign:direction and published an updated version 1.2.0.

6 Likes

I implemented it yesterday for the OpenRailwayMap MapCSS style for JOSM.

This is excellent; I was looking for a better alternative to existing styles just a few weeks ago. Thank you.

1 Like

An easy way to set the direction key is to use KindaHackedInUtils, select the node, point the mouse in the direction to set and press H on the keyboard. It’s not as easy as dragging around but easier than entering the value manually.

1 Like

Great, no restart needed after installing. First time around did till now, select the sign, from there drew a line to where the viewer would approach from and read the degrees in the status bar… 112 as per the screen shot. Your H requires to point 180 degrees past the sign, first time getting a warning, it inserting 292 degrees.

My eyesight not the best, as one grows older, color blindness takes ahold, which makes the present incarnation of the new style direction cones near impossible to see for me. Selecting a sign does tell me the cone is there, but it’s like the little yellow nodes on ways, difficult for me to see.

Selecting a sign does tell me the cone is there i.e. the style does work, but it’s like the little yellow nodes on ways, difficult for me to see. It’s why I like the blunt black cones of the ‘orientation for traffic signs’ style, but this one only works for yield, stop and traffic signals tagged on the road itself.

If you prefer it the other way around you can disable natural direction for traffic signs in the preferences.

I’ve recently added a help page with descriptions of the functions and the options to the wiki:

1 Like

Most magnificent. This might work for buildings roof:direction tag too. Tried a roughed out building where the roof:direction was 182, and it actually entered with alt-shift+h 182 but on the node selected and got a direction cone.

Well I could add the handling of roof:direction, so that when a building is selected and H is pressed it automatically uses that key instead of direction. There would only be the question if that is the only direction key that corresponds to buildings?

Think so yes. It is AFAIK only needed on buildings with a particular one-way roof type like skillion/sloped. All the other roof types use along/across on the roof:orientation tag and when omitted and you specify e.g. roof:shape gabled or hipped, the data consumers will assume an along posture for 3D rendering purpose which is augmented with roof:direction, e.g. a gabled_height_moved or gabled_irregular needs to be told which way the lower/long side tilts towards.
(Others may want to chime in, and think this roof bit would better be broken out from this thread).

roof:shape=side_hipped or =side_half-hipped (and probably others too) use roof:direction to show where the hipped side is, e.g. roof:direction=90 means hipped side is showing to the east.

Well that is not a problem since it’s still the same key. I’ve added handling of roof:direction to the plugin. How this works is described on the wiki page.

1 Like

May I ask the style of the roads here?

Using 2 styles, Color Ways and ColouredStreets, in that order. Latter is not currently active, so it will be ColorWays. Been using it since years.

Agree. I think the cones look great on the defaul black (no imagery) background, but are very hard to spot when imagery is enabled and/or map paint styles with larger arrows pointing to the next node.

A higher contrast version would be great (especially if it could be toggled as a Style Setting). Perhaps a white border wth a slightly transparent black fill?

For a quick fix, bumping the z-index for the cone icon up a bit makes it more visible when hovered over.

Is it possible to run an overpass turbo query that will include directional cone details if you, say, wanted to isolate one of those types of map objects? Can directional cones be downloaded as a .gpx file for reference on a map app?