Versions in this module Expand all Collapse all v0 v0.1.5 Jun 14, 2020 v0.1.4 Jun 14, 2020 v0.1.3 Jun 14, 2020 v0.1.2 Jun 14, 2020 v0.1.1 Jun 14, 2020 Changes in this version type Bounds + func (b *Bounds) ObjectID() ObjectID type Type + const TypeBounds type WayNodes + func (wn WayNodes) Bound() orb.Bound v0.0.1 Oct 6, 2018 Changes in this version + const Attribution + const Copyright + const License + var CommitInfoStart = time.Date(2012, 9, 12, 9, 30, 3, 0, time.UTC) + var ErrScannerClosed = errors.New("osm: scanner closed by user") + var UninterestingTags = map[string]bool + type Action struct + New *OSM + Old *OSM + Type ActionType + func (a *Action) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (a Action) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type ActionType string + const ActionCreate + const ActionDelete + const ActionModify + type Actions []Action + type Bounds struct + MaxLat float64 + MaxLon float64 + MinLat float64 + MinLon float64 + func NewBoundsFromTile(t maptile.Tile) (*Bounds, error) + func (b *Bounds) ContainsNode(n *Node) bool + type Change struct + Attribution string + Copyright string + Create *OSM + Delete *OSM + Generator string + License string + Modify *OSM + Version float64 + func UnmarshalChange(data []byte) (*Change, error) + func (c *Change) AppendCreate(o Object) + func (c *Change) AppendDelete(o Object) + func (c *Change) AppendModify(o Object) + func (c *Change) HistoryDatasource() *HistoryDatasource + func (c *Change) Marshal() ([]byte, error) + func (c Change) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type Changeset struct + Change *Change + ChangesCount int + ClosedAt time.Time + CommentsCount int + CreatedAt time.Time + Discussion *ChangesetDiscussion + ID ChangesetID + MaxLat float64 + MaxLon float64 + MinLat float64 + MinLon float64 + Open bool + Tags Tags + User string + UserID UserID + XMLName xmlNameJSONTypeCS + func UnmarshalChangeset(data []byte) (*Changeset, error) + func (c *Changeset) Bot() bool + func (c *Changeset) Bounds() *Bounds + func (c *Changeset) Comment() string + func (c *Changeset) CreatedBy() string + func (c *Changeset) Host() string + func (c *Changeset) ImageryUsed() string + func (c *Changeset) Locale() string + func (c *Changeset) Marshal() ([]byte, error) + func (c *Changeset) ObjectID() ObjectID + func (c *Changeset) Source() string + type ChangesetComment struct + Text string + Timestamp time.Time + User string + UserID UserID + type ChangesetDiscussion struct + Comments []*ChangesetComment + func (csd ChangesetDiscussion) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type ChangesetID int64 + func (id ChangesetID) ObjectID() ObjectID + type Changesets []*Changeset + func (cs Changesets) IDs() []ChangesetID + type Date struct + func (d *Date) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error + func (d Date) MarshalJSON() ([]byte, error) + func (d Date) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type Diff struct + Actions Actions + Changesets Changesets + XMLName xml.Name + type Element interface + ElementID func() ElementID + FeatureID func() FeatureID + TagMap func() map[string]string + type ElementID int64 + func ParseElementID(s string) (ElementID, error) + func (id ElementID) FeatureID() FeatureID + func (id ElementID) NodeID() NodeID + func (id ElementID) ObjectID() ObjectID + func (id ElementID) Ref() int64 + func (id ElementID) RelationID() RelationID + func (id ElementID) String() string + func (id ElementID) Type() Type + func (id ElementID) Version() int + func (id ElementID) WayID() WayID + type ElementIDs []ElementID + func (ids ElementIDs) Counts() (nodes, ways, relations int) + func (ids ElementIDs) Sort() + type Elements []Element + func (es Elements) ElementIDs() ElementIDs + func (es Elements) FeatureIDs() FeatureIDs + func (es Elements) Sort() + type FeatureID int64 + func ParseFeatureID(s string) (FeatureID, error) + func (id FeatureID) ElementID(v int) ElementID + func (id FeatureID) NodeID() NodeID + func (id FeatureID) ObjectID(v int) ObjectID + func (id FeatureID) Ref() int64 + func (id FeatureID) RelationID() RelationID + func (id FeatureID) String() string + func (id FeatureID) Type() Type + func (id FeatureID) WayID() WayID + type FeatureIDs []FeatureID + func (ids FeatureIDs) Counts() (nodes, ways, relations int) + func (ids FeatureIDs) Sort() + type HistoryDatasource struct + Nodes map[NodeID]Nodes + Relations map[RelationID]Relations + Ways map[WayID]Ways + func (ds *HistoryDatasource) NodeHistory(ctx context.Context, id NodeID) (Nodes, error) + func (ds *HistoryDatasource) NotFound(err error) bool + func (ds *HistoryDatasource) RelationHistory(ctx context.Context, id RelationID) (Relations, error) + func (ds *HistoryDatasource) WayHistory(ctx context.Context, id WayID) (Ways, error) + type HistoryDatasourcer interface + NodeHistory func(context.Context, NodeID) (Nodes, error) + NotFound func(error) bool + RelationHistory func(context.Context, RelationID) (Relations, error) + WayHistory func(context.Context, WayID) (Ways, error) + type Member struct + ChangesetID ChangesetID + Lat float64 + Lon float64 + Orientation orb.Orientation + Ref int64 + Role string + Type Type + Version int + func (m Member) ElementID() ElementID + func (m Member) FeatureID() FeatureID + func (m Member) Point() orb.Point + type Members []Member + func (ms Members) ElementIDs() ElementIDs + func (ms Members) FeatureIDs() FeatureIDs + func (ms Members) MarshalJSON() ([]byte, error) + type Node struct + ChangesetID ChangesetID + Committed *time.Time + ID NodeID + Lat float64 + Lon float64 + Tags Tags + Timestamp time.Time + User string + UserID UserID + Version int + Visible bool + XMLName xmlNameJSONTypeNode + func (n *Node) CommittedAt() time.Time + func (n *Node) ElementID() ElementID + func (n *Node) FeatureID() FeatureID + func (n *Node) ObjectID() ObjectID + func (n *Node) Point() orb.Point + func (n *Node) TagMap() map[string]string + type NodeID int64 + func (id NodeID) ElementID(v int) ElementID + func (id NodeID) FeatureID() FeatureID + func (id NodeID) ObjectID(v int) ObjectID + type Nodes []*Node + func UnmarshalNodes(data []byte) (Nodes, error) + func (ns Nodes) ElementIDs() ElementIDs + func (ns Nodes) FeatureIDs() FeatureIDs + func (ns Nodes) IDs() []NodeID + func (ns Nodes) Marshal() ([]byte, error) + func (ns Nodes) SortByIDVersion() + type Note struct + CloseURL string + CommentURL string + Comments []*NoteComment + DateClosed Date + DateCreated Date + ID NoteID + Lat float64 + Lon float64 + ReopenURL string + Status NoteStatus + URL string + XMLName xmlNameJSONTypeNote + func (n *Note) ObjectID() ObjectID + type NoteComment struct + Action NoteCommentAction + Date Date + HTML string + Text string + User string + UserID UserID + UserURL string + XMLName xml.Name + type NoteCommentAction string + var NoteCommentClosed NoteCommentAction = "closed" + var NoteCommentComment NoteCommentAction = "commented" + var NoteCommentOpened NoteCommentAction = "opened" + type NoteID int64 + func (id NoteID) ObjectID() ObjectID + type NoteStatus string + var NoteClosed NoteStatus = "closed" + var NoteOpen NoteStatus = "open" + type Notes []*Note + type OSM struct + Attribution string + Bounds *Bounds + Changesets Changesets + Copyright string + Generator string + License string + Nodes Nodes + Notes Notes + Relations Relations + Users Users + Version float64 + Ways Ways + func UnmarshalOSM(data []byte) (*OSM, error) + func (o *OSM) Append(obj Object) + func (o *OSM) ElementIDs() ElementIDs + func (o *OSM) Elements() Elements + func (o *OSM) FeatureIDs() FeatureIDs + func (o *OSM) HistoryDatasource() *HistoryDatasource + func (o *OSM) Marshal() ([]byte, error) + func (o *OSM) Objects() Objects + func (o OSM) MarshalJSON() ([]byte, error) + func (o OSM) MarshalXML(e *xml.Encoder, start xml.StartElement) error + type Object interface + ObjectID func() ObjectID + type ObjectID int64 + func ParseObjectID(s string) (ObjectID, error) + func (id ObjectID) Ref() int64 + func (id ObjectID) String() string + func (id ObjectID) Type() Type + func (id ObjectID) Version() int + type ObjectIDs []ObjectID + type Objects []Object + func (os Objects) ObjectIDs() ObjectIDs + type Relation struct + Bounds *Bounds + ChangesetID ChangesetID + Committed *time.Time + ID RelationID + Members Members + Tags Tags + Timestamp time.Time + Updates Updates + User string + UserID UserID + Version int + Visible bool + XMLName xmlNameJSONTypeRel + func (r *Relation) ApplyUpdatesUpTo(t time.Time) error + func (r *Relation) CommittedAt() time.Time + func (r *Relation) ElementID() ElementID + func (r *Relation) FeatureID() FeatureID + func (r *Relation) ObjectID() ObjectID + func (r *Relation) Polygon() bool + func (r *Relation) TagMap() map[string]string + type RelationID int64 + func (id RelationID) ElementID(v int) ElementID + func (id RelationID) FeatureID() FeatureID + func (id RelationID) ObjectID(v int) ObjectID + type Relations []*Relation + func UnmarshalRelations(data []byte) (Relations, error) + func (rs Relations) ElementIDs() ElementIDs + func (rs Relations) FeatureIDs() FeatureIDs + func (rs Relations) IDs() []RelationID + func (rs Relations) Marshal() ([]byte, error) + func (rs Relations) SortByIDVersion() + type Scanner interface + Close func() error + Err func() error + Object func() Object + Scan func() bool + type Tag struct + Key string + Value string + type Tags []Tag + func (ts *Tags) UnmarshalJSON(data []byte) error + func (ts Tags) AnyInteresting() bool + func (ts Tags) Find(k string) string + func (ts Tags) Map() map[string]string + func (ts Tags) MarshalJSON() ([]byte, error) + func (ts Tags) SortByKeyValue() + type Type string + const TypeChangeset + const TypeNode + const TypeNote + const TypeRelation + const TypeUser + const TypeWay + func (t Type) FeatureID(ref int64) (FeatureID, error) + type Update struct + ChangesetID ChangesetID + Index int + Lat float64 + Lon float64 + Reverse bool + Timestamp time.Time + Version int + type UpdateIndexOutOfRangeError struct + Index int + func (e *UpdateIndexOutOfRangeError) Error() string + type Updates []Update + func (us Updates) SortByIndex() + func (us Updates) SortByTimestamp() + func (us Updates) UpTo(t time.Time) Updates + type User struct + Blocks struct{ ... } + Changesets struct{ ... } + CreatedAt time.Time + Description string + Home struct{ ... } + ID UserID + Img struct{ ... } + Languages []string + Messages struct{ ... } + Name string + Traces struct{ ... } + XMLName xmlNameJSONTypeUser + func (u *User) ObjectID() ObjectID + type UserID int64 + func (id UserID) ObjectID() ObjectID + type Users []*User + type Way struct + Bounds *Bounds + ChangesetID ChangesetID + Committed *time.Time + ID WayID + Nodes WayNodes + Tags Tags + Timestamp time.Time + Updates Updates + User string + UserID UserID + Version int + Visible bool + XMLName xmlNameJSONTypeWay + func (w *Way) ApplyUpdatesUpTo(t time.Time) error + func (w *Way) CommittedAt() time.Time + func (w *Way) ElementID() ElementID + func (w *Way) FeatureID() FeatureID + func (w *Way) LineString() orb.LineString + func (w *Way) LineStringAt(t time.Time) orb.LineString + func (w *Way) ObjectID() ObjectID + func (w *Way) Polygon() bool + func (w *Way) TagMap() map[string]string + type WayID int64 + func (id WayID) ElementID(v int) ElementID + func (id WayID) FeatureID() FeatureID + func (id WayID) ObjectID(v int) ObjectID + type WayNode struct + ChangesetID ChangesetID + ID NodeID + Lat float64 + Lon float64 + Version int + func (wn WayNode) ElementID() ElementID + func (wn WayNode) FeatureID() FeatureID + func (wn WayNode) Point() orb.Point + type WayNodes []WayNode + func (wn *WayNodes) UnmarshalJSON(data []byte) error + func (wn WayNodes) Bounds() *Bounds + func (wn WayNodes) ElementIDs() ElementIDs + func (wn WayNodes) FeatureIDs() FeatureIDs + func (wn WayNodes) MarshalJSON() ([]byte, error) + func (wn WayNodes) NodeIDs() []NodeID + type Ways []*Way + func UnmarshalWays(data []byte) (Ways, error) + func (ws Ways) ElementIDs() ElementIDs + func (ws Ways) FeatureIDs() FeatureIDs + func (ws Ways) IDs() []WayID + func (ws Ways) Marshal() ([]byte, error) + func (ws Ways) SortByIDVersion()