vector-datasource icon indicating copy to clipboard operation
vector-datasource copied to clipboard

Add "direction" to viewpoint and other POIs

Open nvkelso opened this issue 9 years ago • 7 comments

OSM allows the direction to be set on viewpoints and other POIs, and Tangram can orient icons.

  • https://wiki.openstreetmap.org/wiki/Tag:tourism%3Dviewpoint
  • https://taginfo.openstreetmap.org/tags/?key=tourism&value=viewpoint
  • https://wiki.openstreetmap.org/wiki/Key:direction
  • https://taginfo.openstreetmap.org/keys/direction

nvkelso avatar Mar 13 '16 00:03 nvkelso

Looks like ~1000 of the 86,000 node features have direction, says TagInfo.

Direction values need to be normalized to degrees (°), sometimes they come in form of north or N or NE, see below.

Probably needs a TileStashe transform to ensure:

  • Number should be in range of 0-359, where 0 is equal to north, using a clockwise rotation.
  • Cardinal values (N, W, S, E, NE, NW, SE, and SW) are converted to their ° int values.

nvkelso avatar Apr 04 '16 04:04 nvkelso

Lookup for cardinal > degrees from OSM wiki:

600px-angles

nvkelso avatar Apr 04 '16 04:04 nvkelso

Tangram supports setting an angle on icons now, let's add this to tiles!

/cc @dmvaldman.

nvkelso avatar Mar 07 '17 23:03 nvkelso

Since Tangram support angles on icons, is the part that needs implementing on the Tangram side the conversion of cardinal values to degrees?

dmvaldman avatar Mar 08 '17 01:03 dmvaldman

I think that conversion should be on Tilezen, not Tangram. So as long as Tangram supports sourcing the angle value from a feature property, &/or a function, we should be good on your side.

On Tue, Mar 7, 2017 at 5:09 PM, David Valdman [email protected] wrote:

Since Tangram support angles on icons, is the part that needs implementing on the Tangram side the conversion of cardinal values to degrees?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tilezen/vector-datasource/issues/598#issuecomment-284913728, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0EOznTRXuzvTUWDshhvaojo876tf-gks5rjf_UgaJpZM4Hvbei .

nvkelso avatar Mar 08 '17 20:03 nvkelso

Let's use a consistent property name as https://github.com/tilezen/vector-datasource/issues/1219 (direction versus angle).

nvkelso avatar Feb 13 '19 22:02 nvkelso

Here's a fun one, backward pointing stop signs:

  • https://www.openstreetmap.org/node/3477023168

nvkelso avatar May 22 '19 00:05 nvkelso