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
"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

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