Documentation
¶
Overview ¶
Package mapping provides functions for defining and executing the database schema.
Index ¶
- Variables
- func Bool(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func BoolInt(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func Direction(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func Geometry(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func HstoreString(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func Id(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func Integer(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func KeyName(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func PseudoArea(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func SelectRelationPolygons(polygonTagMatcher RelWayMatcher, rel *element.Relation) []element.Member
- func String(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func ValueName(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- func WayZOrder(val string, elem *element.OSMElem, geom *geom.Geometry, match Match) interface{}
- type DestTable
- type ElementFilter
- type ExcludeFilter
- type Field
- type FieldSpec
- type FieldType
- type Filters
- type GeneralizedTable
- type GeneralizedTables
- type Key
- type KeyValues
- 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) WayTagFilter() TagFilterer
- type Match
- type NodeMatcher
- type OrderedDestTable
- 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 HstoreString ¶
func PseudoArea ¶
func SelectRelationPolygons ¶
func SelectRelationPolygons(polygonTagMatcher RelWayMatcher, rel *element.Relation) []element.Member
SelectRelationPolygons returns a slice of all members that are already imported as part of the relation. Outer members are "imported" if they share the same destination table. Inner members are "imported" when they also share the same key/value.
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 Mapping ¶
type Mapping struct { Tables Tables `yaml:"tables"` GeneralizedTables GeneralizedTables `yaml:"generalized_tables"` Tags Tags `yaml:"tags"` // SingleIdSpace mangles the overlapping node/way/relation IDs // to be unique (nodes positive, ways negative, relations negative -1e17) SingleIdSpace bool `yaml:"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) WayTagFilter ¶
func (m *Mapping) WayTagFilter() TagFilterer
type Match ¶
type NodeMatcher ¶
type OrderedDestTable ¶
type OrderedDestTable struct { DestTable // contains filtered or unexported fields }
type RelWayMatcher ¶
type RelWayMatcher interface { WayMatcher RelationMatcher }
type RelationMatcher ¶
type RelationTagFilter ¶
type RelationTagFilter struct {
TagFilter
}
type SubMapping ¶
type SubMapping struct {
Mapping KeyValues
}
type Table ¶
type Table struct { Name string Type TableType `yaml:"type"` Mapping KeyValues `yaml:"mapping"` Mappings map[string]SubMapping `yaml:"mappings"` TypeMappings TypeMappings `yaml:"type_mappings"` Fields []*Field `yaml:"columns"` // TODO rename Fields internaly to Columns OldFields []*Field `yaml:"fields"` Filters *Filters `yaml:"filters"` }
func (*Table) TableFields ¶
func (t *Table) TableFields() *TableFields
type TableFields ¶
type TableFields struct {
// contains filtered or unexported fields
}
type TagFilterer ¶
type TagTables ¶
type TagTables map[Key]map[Value][]OrderedDestTable
type TypeMappings ¶
type WayMatcher ¶
Click to show internal directories.
Click to hide internal directories.