Documentation ¶
Overview ¶
Package binary is a generated protocol buffer package. It is generated from these files:
cache/binary/messages.proto
It has these top-level messages:
Node Way Relation DeltaCoords
Index ¶
- Constants
- Variables
- func CoordToInt(coord float64) uint32
- func IntToCoord(coord uint32) float64
- func MarshalCoords(node structures.Node) ([]byte, error)
- func MarshalNode(node *structures.Node) ([]byte, error)
- func MarshalRelation(relation *structures.Relation) ([]byte, error)
- func MarshalWay(way *structures.Way) ([]byte, error)
- func UnmarshalNode(data []byte) (node *structures.Node, err error)
- func UnmarshalRelation(data []byte) (relation *structures.Relation, err error)
- func UnmarshalWay(data []byte) (way *structures.Way, err error)
- func UnmarshallCoord(buf []byte, node structures.Node) structures.Node
- type DeltaCoords
- type Node
- type Relation
- type Relation_MemberType
- type Way
Constants ¶
View Source
const COORD_FACTOR float64 = 11930464.7083 // ((2<<31)-1)/360.0
Variables ¶
View Source
var Relation_MemberType_name = map[int32]string{
0: "NODE",
1: "WAY",
2: "RELATION",
}
View Source
var Relation_MemberType_value = map[string]int32{
"NODE": 0,
"WAY": 1,
"RELATION": 2,
}
Functions ¶
func CoordToInt ¶
func IntToCoord ¶
func MarshalCoords ¶
func MarshalCoords(node structures.Node) ([]byte, error)
func MarshalNode ¶
func MarshalNode(node *structures.Node) ([]byte, error)
func MarshalRelation ¶
func MarshalRelation(relation *structures.Relation) ([]byte, error)
func MarshalWay ¶
func MarshalWay(way *structures.Way) ([]byte, error)
func UnmarshalNode ¶
func UnmarshalNode(data []byte) (node *structures.Node, err error)
func UnmarshalRelation ¶
func UnmarshalRelation(data []byte) (relation *structures.Relation, err error)
func UnmarshalWay ¶
func UnmarshalWay(data []byte) (way *structures.Way, err error)
func UnmarshallCoord ¶
func UnmarshallCoord(buf []byte, node structures.Node) structures.Node
Types ¶
type DeltaCoords ¶
type DeltaCoords struct { Ids []int64 `protobuf:"zigzag64,1,rep,packed,name=ids" json:"ids,omitempty"` Lats []int64 `protobuf:"zigzag64,2,rep,packed,name=lats" json:"lats,omitempty"` Lons []int64 `protobuf:"zigzag64,3,rep,packed,name=lons" json:"lons,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*DeltaCoords) GetIds ¶
func (m *DeltaCoords) GetIds() []int64
func (*DeltaCoords) GetLats ¶
func (m *DeltaCoords) GetLats() []int64
func (*DeltaCoords) GetLons ¶
func (m *DeltaCoords) GetLons() []int64
func (*DeltaCoords) ProtoMessage ¶
func (*DeltaCoords) ProtoMessage()
func (*DeltaCoords) Reset ¶
func (m *DeltaCoords) Reset()
func (*DeltaCoords) String ¶
func (m *DeltaCoords) String() string
type Node ¶
type Node struct { Long *uint32 `protobuf:"varint,1,req,name=long" json:"long,omitempty"` Lat *uint32 `protobuf:"varint,2,req,name=lat" json:"lat,omitempty"` Tags []string `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
type Relation ¶
type Relation struct { Tags []string `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"` MemberIds []int64 `protobuf:"varint,2,rep,name=member_ids" json:"member_ids,omitempty"` MemberTypes []Relation_MemberType `protobuf:"varint,3,rep,name=member_types,enum=binary.Relation_MemberType" json:"member_types,omitempty"` MemberRoles []string `protobuf:"bytes,4,rep,name=member_roles" json:"member_roles,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Relation) GetMemberIds ¶
func (*Relation) GetMemberRoles ¶
func (*Relation) GetMemberTypes ¶
func (m *Relation) GetMemberTypes() []Relation_MemberType
func (*Relation) ProtoMessage ¶
func (*Relation) ProtoMessage()
type Relation_MemberType ¶
type Relation_MemberType int32
const ( Relation_NODE Relation_MemberType = 0 Relation_WAY Relation_MemberType = 1 Relation_RELATION Relation_MemberType = 2 )
func (Relation_MemberType) Enum ¶
func (x Relation_MemberType) Enum() *Relation_MemberType
func (Relation_MemberType) String ¶
func (x Relation_MemberType) String() string
func (*Relation_MemberType) UnmarshalJSON ¶
func (x *Relation_MemberType) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.