use named fields when initializing tagMatcher
parent
ee59cf2896
commit
6bdc6c84dd
|
@ -9,35 +9,60 @@ func (m *Mapping) PointMatcher() NodeMatcher {
|
||||||
mappings := make(TagTables)
|
mappings := make(TagTables)
|
||||||
m.mappings(PointTable, mappings)
|
m.mappings(PointTable, mappings)
|
||||||
filters := m.ElementFilters()
|
filters := m.ElementFilters()
|
||||||
return &tagMatcher{mappings, m.tables(PointTable), filters, false}
|
return &tagMatcher{
|
||||||
|
mappings: mappings,
|
||||||
|
tables: m.tables(PointTable),
|
||||||
|
filters: filters,
|
||||||
|
matchAreas: false,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Mapping) LineStringMatcher() WayMatcher {
|
func (m *Mapping) LineStringMatcher() WayMatcher {
|
||||||
mappings := make(TagTables)
|
mappings := make(TagTables)
|
||||||
m.mappings(LineStringTable, mappings)
|
m.mappings(LineStringTable, mappings)
|
||||||
filters := m.ElementFilters()
|
filters := m.ElementFilters()
|
||||||
return &tagMatcher{mappings, m.tables(LineStringTable), filters, false}
|
return &tagMatcher{
|
||||||
|
mappings: mappings,
|
||||||
|
tables: m.tables(LineStringTable),
|
||||||
|
filters: filters,
|
||||||
|
matchAreas: false,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Mapping) PolygonMatcher() RelWayMatcher {
|
func (m *Mapping) PolygonMatcher() RelWayMatcher {
|
||||||
mappings := make(TagTables)
|
mappings := make(TagTables)
|
||||||
m.mappings(PolygonTable, mappings)
|
m.mappings(PolygonTable, mappings)
|
||||||
filters := m.ElementFilters()
|
filters := m.ElementFilters()
|
||||||
return &tagMatcher{mappings, m.tables(PolygonTable), filters, true}
|
return &tagMatcher{
|
||||||
|
mappings: mappings,
|
||||||
|
tables: m.tables(PolygonTable),
|
||||||
|
filters: filters,
|
||||||
|
matchAreas: true,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Mapping) RelationMatcher() RelationMatcher {
|
func (m *Mapping) RelationMatcher() RelationMatcher {
|
||||||
mappings := make(TagTables)
|
mappings := make(TagTables)
|
||||||
m.mappings(RelationTable, mappings)
|
m.mappings(RelationTable, mappings)
|
||||||
filters := m.ElementFilters()
|
filters := m.ElementFilters()
|
||||||
return &tagMatcher{mappings, m.tables(RelationTable), filters, true}
|
return &tagMatcher{
|
||||||
|
mappings: mappings,
|
||||||
|
tables: m.tables(RelationTable),
|
||||||
|
filters: filters,
|
||||||
|
matchAreas: true,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Mapping) RelationMemberMatcher() RelationMatcher {
|
func (m *Mapping) RelationMemberMatcher() RelationMatcher {
|
||||||
mappings := make(TagTables)
|
mappings := make(TagTables)
|
||||||
m.mappings(RelationMemberTable, mappings)
|
m.mappings(RelationMemberTable, mappings)
|
||||||
filters := m.ElementFilters()
|
filters := m.ElementFilters()
|
||||||
return &tagMatcher{mappings, m.tables(RelationMemberTable), filters, true}
|
return &tagMatcher{
|
||||||
|
mappings: mappings,
|
||||||
|
tables: m.tables(RelationMemberTable),
|
||||||
|
filters: filters,
|
||||||
|
matchAreas: true,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type Match struct {
|
type Match struct {
|
||||||
|
|
Loading…
Reference in New Issue