Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Child ¶
type Child interface { ID() osm.FeatureID ChangesetID() osm.ChangesetID // VersionIndex is the index of the version if sorted from lowest to highest. // This is necessary since version don't have to start at 1 or be sequential. VersionIndex() int Visible() bool Timestamp() time.Time Committed() time.Time Update() osm.Update }
A Child a thing contained by parents such as nodes for ways or nodes, ways and/or relations for relations.
type ChildList ¶
type ChildList []Child
A ChildList is a set
func (ChildList) FindVisible ¶
FindVisible locates the child visible at the given time. If 'at' is on or after osm.CommitInfoStart the committed time is used to determine visiblity. If 'at' is before, a range +-eps around the give time. Will return the closes visible node within that range, or the previous node if visible. Children after 'at' but within the eps must have the same changeset id as provided (the parent's). If the previous node is not visible, or does not exits will return nil.
type Datasourcer ¶
type Datasourcer interface { Get(ctx context.Context, id osm.FeatureID) (ChildList, error) NotFound(err error) bool }
A Datasourcer is something that acts like a datasource allowing us to fetch children as needed.
type NoHistoryError ¶
NoHistoryError is returned if there is no entry in the history map for a specific child.
func (*NoHistoryError) Error ¶
func (e *NoHistoryError) Error() string
Error returns a pretty string of the error.
type NoVisibleChildError ¶
NoVisibleChildError is returned if there are no visible children for a parent at a given time.
func (*NoVisibleChildError) Error ¶
func (e *NoVisibleChildError) Error() string
Error returns a pretty string of the error.
type Options ¶
type Options struct { Threshold time.Duration IgnoreInconsistency bool IgnoreMissingChildren bool ChildFilter func(osm.FeatureID) bool }
Options allow for passing som parameters to the matching process.
type Parent ¶
type Parent interface { ID() osm.FeatureID // used for logging ChangesetID() osm.ChangesetID Version() int Visible() bool Timestamp() time.Time Committed() time.Time // Refs returns normalized information about the children. // Currently this is the feature ids and if it is already annotated. // Note: we auto-annotate all unannotated children if they would have // been filtered out. Refs() (osm.FeatureIDs, []bool) SetChild(idx int, c Child) }
A Parent is something that holds children. ie. ways have nodes as children and relations can have nodes, ways and relations as children.