Documentation ¶
Overview ¶
Package mapping provides functions for defining and executing the database schema.
Index ¶
- Variables
- func Bool(val string, elem *element.OSMElem, match Match) interface{}
- func BoolInt(val string, elem *element.OSMElem, match Match) interface{}
- func Direction(val string, elem *element.OSMElem, match Match) interface{}
- func Geometry(val string, elem *element.OSMElem, match Match) interface{}
- func HstoreString(val string, elem *element.OSMElem, match Match) interface{}
- func Id(val string, elem *element.OSMElem, match Match) interface{}
- func Int64(val string, elem *element.OSMElem, match Match) interface{}
- func Integer(val string, elem *element.OSMElem, match Match) interface{}
- func KeyName(val string, elem *element.OSMElem, match Match) interface{}
- func MemberString(val string, elem *element.OSMElem, match Match) interface{}
- func PseudoArea(val string, elem *element.OSMElem, match Match) interface{}
- func SelectRelationPolygons(polygonTagMatcher RelWayMatcher, rel *element.Relation) []element.Member
- func String(val string, elem *element.OSMElem, match Match) interface{}
- func ValueName(val string, elem *element.OSMElem, match Match) interface{}
- func WayZOrder(val string, elem *element.OSMElem, match Match) interface{}
- type DestTable
- type ElementFilter
- type ExcludeFilter
- type Field
- type FieldSpec
- type FieldType
- type Filters
- type GeneralizedTable
- type GeneralizedTables
- type Key
- type MakeMakeValue
- type MakeValue
- type Mapping
- func (m *Mapping) ElementFilters() map[string][]ElementFilter
- func (m *Mapping) LineStringMatcher() WayMatcher
- func (m *Mapping) NodeTagFilter() TagFilterer
- func (m *Mapping) PointMatcher() NodeMatcher
- func (m *Mapping) PolygonMatcher() RelWayMatcher
- func (m *Mapping) RelationTagFilter() TagFilterer
- func (m *Mapping) StreetMatcher() RelWayMatcher
- func (m *Mapping) WayTagFilter() TagFilterer
- type Match
- type NodeMatcher
- type RelWayMatcher
- type RelationMatcher
- type RelationTagFilter
- type SubMapping
- type Table
- type TableFields
- type TableType
- type Tables
- type TagFilter
- type TagFilterer
- type TagTables
- type Tags
- type TypeMappings
- type Value
- type WayMatcher
Constants ¶
This section is empty.
Variables ¶
View Source
var AvailableFieldTypes map[string]FieldType
Functions ¶
func SelectRelationPolygons ¶
func SelectRelationPolygons(polygonTagMatcher RelWayMatcher, rel *element.Relation) []element.Member
SelectRelationPolygons returns a slice of all members that are already imported with a relation with tags.
Types ¶
type ElementFilter ¶
type ExcludeFilter ¶
type ExcludeFilter struct {
// contains filtered or unexported fields
}
type Field ¶
type FieldType ¶
type FieldType struct { Name string GoType string Func MakeValue MakeFunc MakeMakeValue }
type GeneralizedTable ¶
type GeneralizedTables ¶
type GeneralizedTables map[string]*GeneralizedTable
type MakeValue ¶
func MakeSuffixReplace ¶
type Mapping ¶
type Mapping struct { Tables Tables `json:"tables"` GeneralizedTables GeneralizedTables `json:"generalized_tables"` Tags Tags `json:"tags"` // SingleIdSpace mangles the overlapping node/way/relation IDs // to be unique (nodes positive, ways negative, relations negative -1e17) SingleIdSpace bool `json:"use_single_id_space"` }
func NewMapping ¶
func (*Mapping) ElementFilters ¶
func (m *Mapping) ElementFilters() map[string][]ElementFilter
func (*Mapping) LineStringMatcher ¶
func (m *Mapping) LineStringMatcher() WayMatcher
func (*Mapping) NodeTagFilter ¶
func (m *Mapping) NodeTagFilter() TagFilterer
func (*Mapping) PointMatcher ¶
func (m *Mapping) PointMatcher() NodeMatcher
func (*Mapping) PolygonMatcher ¶
func (m *Mapping) PolygonMatcher() RelWayMatcher
func (*Mapping) RelationTagFilter ¶
func (m *Mapping) RelationTagFilter() TagFilterer
func (*Mapping) StreetMatcher ¶
func (m *Mapping) StreetMatcher() RelWayMatcher
func (*Mapping) WayTagFilter ¶
func (m *Mapping) WayTagFilter() TagFilterer
type Match ¶
type NodeMatcher ¶
type RelWayMatcher ¶
type RelWayMatcher interface { WayMatcher RelationMatcher }
type RelationMatcher ¶
type RelationTagFilter ¶
type RelationTagFilter struct {
TagFilter
}
type SubMapping ¶
type Table ¶
type Table struct { Name string Type TableType `json:"type"` Mapping map[Key][]Value `json:"mapping"` Mappings map[string]SubMapping `json:"mappings"` TypeMappings TypeMappings `json:"type_mappings"` Fields []*Field `json:"columns"` // TODO rename Fields internaly to Columns OldFields []*Field `json:"fields"` Filters *Filters `json:"filters"` }
func (*Table) TableFields ¶
func (t *Table) TableFields() *TableFields
type TableFields ¶
type TableFields struct {
// contains filtered or unexported fields
}
type TagFilterer ¶
type TypeMappings ¶
type WayMatcher ¶
Click to show internal directories.
Click to hide internal directories.