Documentation
¶
Index ¶
- func ChildFilter(filter func(osm.FeatureID) bool) annotate.Option
- func Convert(ovp *Overpass, opts ...annotate.Option) (*osm.OSM, error)
- func IgnoreInconsistency(yes bool) annotate.Option
- func IgnoreMissingChildren(yes bool) annotate.Option
- func Threshold(t time.Duration) annotate.Option
- type Element
- type Member
- type Members
- type Option
- type Overpass
- type Tags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IgnoreInconsistency ¶
func IgnoreMissingChildren ¶
Types ¶
type Element ¶
type Element struct {
Type string `json:"type,attr,omitempty"`
ID int `json:"id,attr,omitempty"`
Nodes []int `json:"nodes,attr,omitempty"`
Ways []int `json:"ways,attr,omitempty"`
Tags Tags `json:"tags,attr,omitempty"`
Lat float64 `json:"lat,attr,omitempty"`
Lon float64 `json:"lon,attr,omitempty"`
Members Members `json:"members,attr,omitempty`
}
Element represents a generalized OSM type (node, way or relation) that's listed in an Overpass response.
type Member ¶
type Member struct {
Type string `json:"type,attr,omitempty"`
Ref int `json:"ref,attr,omitempty"`
Role string `json:"role,attr,omitempty"`
}
Member represents a single relation member.
type Members ¶
type Members []Member
Members represents a set of relation members from an Overpass response element.
type Overpass ¶
type Overpass struct {
Version float64 `json:"version,attr,omitempty"`
Generator string `json:"generator,attr,omitempty"`
OSM3S struct {
TimeStampOSMBase string `json:"timestamp_osm_base,attr,omitempty"`
Copyright string `json:"copyright,attr,omitempty"`
}
Elements []Element `json:"elements,attr,omitempty"`
}
Overpass represents the response from an Overpass query (JSON only).
func UnmarshalOverpass ¶
UnmarshalOverpass will unmarshal the JSON data into an Overpass object.
Click to show internal directories.
Click to hide internal directories.