entity

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	// contains filtered or unexported fields
}

func NewEntity

func NewEntity(id int64) *Entity

func (*Entity) GetChangesetId

func (e *Entity) GetChangesetId() int64

func (*Entity) GetGeometry

func (e *Entity) GetGeometry() geom.T

func (*Entity) GetId

func (e *Entity) GetId() int64

func (*Entity) GetTags

func (e *Entity) GetTags() map[string]interface{}

func (*Entity) GetTimestamp

func (e *Entity) GetTimestamp() int64

func (*Entity) GetUid

func (e *Entity) GetUid() int32

func (*Entity) GetUser

func (e *Entity) GetUser() string

func (*Entity) GetVersion

func (e *Entity) GetVersion() int32

func (*Entity) GetVisible

func (e *Entity) GetVisible() bool

func (*Entity) SetChangesetId

func (e *Entity) SetChangesetId(changesetId int64)

func (*Entity) SetGeometry

func (e *Entity) SetGeometry(getGeometry func() geom.T)

func (*Entity) SetId

func (e *Entity) SetId(id int64)

func (*Entity) SetTags

func (e *Entity) SetTags(tags map[string]interface{})

func (*Entity) SetTimestamp

func (e *Entity) SetTimestamp(timestamp int64)

func (*Entity) SetUid

func (e *Entity) SetUid(uid int32)

func (*Entity) SetUser

func (e *Entity) SetUser(user string)

func (*Entity) SetVersion

func (e *Entity) SetVersion(version int32)

func (*Entity) SetVisible

func (e *Entity) SetVisible(visible bool)

func (*Entity) ToJSON

func (e *Entity) ToJSON() (string, error)

func (*Entity) ToWKT

func (e *Entity) ToWKT() (string, error)

type Exporter

type Exporter interface {
	GetVisible() bool
	GetVersion() int32
	GetUid() int32
	GetId() int64
	GetChangesetId() int64
	GetTimestamp() int64
	GetUser() string
	GetTags() map[string]interface{}
	GetGeometry() geom.T

	ToWKT() (string, error)
	ToJSON() (string, error)
}

type Node

type Node struct {
	*Entity
	// contains filtered or unexported fields
}

func NewNode

func NewNode(id int64) *Node

func (*Node) GetLat

func (n *Node) GetLat() float64

func (*Node) GetLon

func (n *Node) GetLon() float64

func (*Node) SetLat

func (n *Node) SetLat(lat float64)

func (*Node) SetLon

func (n *Node) SetLon(lon float64)

type Relation

type Relation struct {
	*Entity
	// contains filtered or unexported fields
}

func NewRelation

func NewRelation(id int64) *Relation

func (*Relation) GetRelationMembers

func (r *Relation) GetRelationMembers() []*RelationMember

func (*Relation) SetRelationMembers

func (r *Relation) SetRelationMembers(relationMembers []*RelationMember)

type RelationMember

type RelationMember struct {
	Exporter
	// contains filtered or unexported fields
}

func NewRelationMember

func NewRelationMember(exp Exporter, r string) *RelationMember

func (*RelationMember) GetRole

func (rm *RelationMember) GetRole() string

func (*RelationMember) SetRole

func (rm *RelationMember) SetRole(role string)

type Way

type Way struct {
	*Entity
	// contains filtered or unexported fields
}

func NewWay

func NewWay(id int64) *Way

func (*Way) GetNodes

func (w *Way) GetNodes() []*Node

func (*Way) SetNodes

func (w *Way) SetNodes(nodes []*Node)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL