OSM Mobile Binary Protocol/Relations Roles

From OpenStreetMap Wiki
Jump to: navigation, search

Enumeration for values assigned to roles associated with members of relations.

The type (Node/Way/Relation) is encoded by the range of the number.

  • Node (0-62)
  • Relation (63-127)
  • Way (128-191)
  • spare (192-255)

Within these two ranges the top values are reserved for types that need extra space to be defined.

""=>0,//63//128 //used when grouping items to give them common tags
"from"=>1,
"to"=>2,
"via"=>3,
"outer"=>4,
"inner"=>5,
"across"=>6,
"under"=>7,
"through"=>8,
"outline"=>9,
"edge"=>10,
"location_hint"=>11,
"pointer"=>12,
"target"=>13,
"forward"=>14,
"backward"=>15,
"spare"=>16,
"fence"=>17,
"entrance"=>18, //82//146

//divider 37-46/101-110/165-174/229-238 indicates a 32bit number is defined next

//divider 47-63/111-127/175-191/239-255 indicates a 16bit number is defined next
"stop"=>47,
"forward_stop"=>48,
"backward_stop"=>49,

These specifiers have to have the number encoded after the role:

stop_<number>
forward_stop_<number>
backward_stop_<number>