handler

package
v0.0.0-...-04d4fff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2021 License: MIT Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteTags

func DeleteTags(elemTags map[string]string, blacklist map[string]bool)

DeleteTags - delete blacklisted tags from map

Types

type BitmaskBoundaries

type BitmaskBoundaries struct {
	Pass            int
	Mutex           *sync.Mutex
	Masks           *lib.BitmaskMap
	RelationMembers map[int64][]gosmparse.RelationMember
}

BitmaskBoundaries - Load all elements in to memory

func (*BitmaskBoundaries) ReadNode

func (b *BitmaskBoundaries) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*BitmaskBoundaries) ReadRelation

func (b *BitmaskBoundaries) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*BitmaskBoundaries) ReadWay

func (b *BitmaskBoundaries) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type BitmaskCustom

type BitmaskCustom struct {
	Masks    *lib.BitmaskMap
	Features *lib.FeatureSet
}

BitmaskCustom - Load all elements in to memory

func (*BitmaskCustom) ReadNode

func (b *BitmaskCustom) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*BitmaskCustom) ReadRelation

func (b *BitmaskCustom) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*BitmaskCustom) ReadWay

func (b *BitmaskCustom) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type BitmaskSuperRelations

type BitmaskSuperRelations struct {
	Masks *lib.BitmaskMap
}

BitmaskSuperRelations - Load all elements in to memory

func (*BitmaskSuperRelations) ReadNode

func (b *BitmaskSuperRelations) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*BitmaskSuperRelations) ReadRelation

func (b *BitmaskSuperRelations) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*BitmaskSuperRelations) ReadWay

func (b *BitmaskSuperRelations) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type Cypher

type Cypher struct {
	Mutex    *sync.Mutex
	KeyRegex *regexp.Regexp
}

Cypher - Cypher

func (*Cypher) ReadNode

func (d *Cypher) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*Cypher) ReadRelation

func (d *Cypher) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*Cypher) ReadWay

func (d *Cypher) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type DenormalizedJSON

type DenormalizedJSON struct {
	Writer          *lib.BufferedWriter
	Conn            *leveldb.Connection
	ComputeCentroid bool
	ComputeGeohash  bool
	ExportLatLons   bool
}

DenormalizedJSON - JSON

func (*DenormalizedJSON) ReadNode

func (d *DenormalizedJSON) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*DenormalizedJSON) ReadRelation

func (d *DenormalizedJSON) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*DenormalizedJSON) ReadWay

func (d *DenormalizedJSON) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type JSON

type JSON struct {
	Writer *lib.BufferedWriter
}

JSON - JSON

func (*JSON) ReadNode

func (d *JSON) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*JSON) ReadRelation

func (d *JSON) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*JSON) ReadWay

func (d *JSON) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type LevelDB

type LevelDB struct {
	Conn *leveldb.Connection
}

LevelDB - LevelDB

func (*LevelDB) ReadNode

func (s *LevelDB) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*LevelDB) ReadRelation

func (s *LevelDB) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*LevelDB) ReadWay

func (s *LevelDB) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type Nquad

type Nquad struct {
	Mutex *sync.Mutex
}

Nquad - Nquad

func (*Nquad) ReadNode

func (d *Nquad) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*Nquad) ReadRelation

func (d *Nquad) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*Nquad) ReadWay

func (d *Nquad) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type Null

type Null struct{}

Null - Null

func (*Null) ReadNode

func (n *Null) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*Null) ReadRelation

func (n *Null) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*Null) ReadWay

func (n *Null) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type OPL

type OPL struct {
	Mutex *sync.Mutex
}

OPL - OPL

func (*OPL) ReadNode

func (d *OPL) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*OPL) ReadRelation

func (d *OPL) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*OPL) ReadWay

func (d *OPL) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type ReadAll

type ReadAll struct {
	Mutex     *sync.Mutex
	DropTags  bool
	Nodes     map[int64]gosmparse.Node
	Ways      map[int64]gosmparse.Way
	Relations map[int64]gosmparse.Relation
}

ReadAll - Load all elements in to memory

func (*ReadAll) ReadNode

func (n *ReadAll) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*ReadAll) ReadRelation

func (n *ReadAll) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*ReadAll) ReadWay

func (n *ReadAll) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type Refs

type Refs struct {
	Counts map[int64]int
}

Refs - Refs

func (*Refs) ReadNode

func (s *Refs) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*Refs) ReadRelation

func (s *Refs) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*Refs) ReadWay

func (s *Refs) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type Sqlite3

type Sqlite3 struct {
	Conn *sqlite.Connection
}

Sqlite3 - Sqlite3

func (*Sqlite3) ReadNode

func (s *Sqlite3) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*Sqlite3) ReadRelation

func (s *Sqlite3) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*Sqlite3) ReadWay

func (s *Sqlite3) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type Stats

type Stats struct {
	Nodes                uint64
	Ways                 uint64
	Relations            uint64
	NodesWithName        int64
	WaysWithName         int64
	RelationsWithName    int64
	NodesWithAddress     int64
	WaysWithAddress      int64
	RelationsWithAddress int64
	NodesWithNoTags      int64
	WaysWithNoTags       int64
	RelationsWithNoTags  int64
	NodesAvgTagCount     float64
	WaysAvgTagCount      float64
	RelationsAvgTagCount float64
}

Stats - Stats

func (Stats) Print

func (s Stats) Print()

Print stats

func (*Stats) ReadNode

func (s *Stats) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*Stats) ReadRelation

func (s *Stats) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*Stats) ReadWay

func (s *Stats) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type Streets

type Streets struct {
	TagWhitelist map[string]bool
	DBHandler    *Sqlite3
	NodeMask     *lib.Bitmask
}

Streets - Streets

func (*Streets) ReadNode

func (s *Streets) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*Streets) ReadRelation

func (s *Streets) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*Streets) ReadWay

func (s *Streets) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type XML

type XML struct {
	Mutex *sync.Mutex
}

XML - XML

func (*XML) ReadNode

func (d *XML) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*XML) ReadRelation

func (d *XML) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*XML) ReadWay

func (d *XML) ReadWay(item gosmparse.Way)

ReadWay - called once per way

type Xroads

type Xroads struct {
	Pass           int64
	TagWhiteList   map[string]bool
	WayNodesMask   *lib.Bitmask // a mask of all node ids of all matching ways
	SharedNodeMask *lib.Bitmask // a mask of only node ids parented by more than one way
	WayNames       map[int64]string
	NodeMap        map[int64][]int64
	Coords         map[int64]*gosmparse.Node
	Mutex          *sync.Mutex
}

Xroads - Xroads

func (*Xroads) ReadNode

func (x *Xroads) ReadNode(item gosmparse.Node)

ReadNode - called once per node

func (*Xroads) ReadRelation

func (x *Xroads) ReadRelation(item gosmparse.Relation)

ReadRelation - called once per relation

func (*Xroads) ReadWay

func (x *Xroads) ReadWay(item gosmparse.Way)

ReadWay - called once per way

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL