Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedRandomAccessParser ¶
type CachedRandomAccessParser struct { Parser Index *gosmparse.BlobIndex Mutex *sync.Mutex Cache *CoordCache Handler *CoordCacheHandler }
CachedRandomAccessParser - struct to handle random access lookups to a pbf
func NewCachedRandomAccessParser ¶
func NewCachedRandomAccessParser(path string, idxPath string) *CachedRandomAccessParser
NewCachedRandomAccessParser -
type CoordCache ¶
type CoordCache struct { Mutex *sync.Mutex Size int ClearRatio float64 Coords map[int64]*gosmparse.Node Fifo []int64 SeenMask *lib.Bitmask DuplicatesMask *lib.Bitmask }
CoordCache - in-memory element cache
type CoordCacheHandler ¶
type CoordCacheHandler struct { Cache *CoordCache Mask *lib.Bitmask }
CoordCacheHandler - CoordCacheHandler
func (*CoordCacheHandler) ReadNode ¶
func (h *CoordCacheHandler) ReadNode(item gosmparse.Node)
ReadNode - called once per node
func (*CoordCacheHandler) ReadRelation ¶
func (h *CoordCacheHandler) ReadRelation(item gosmparse.Relation)
ReadRelation - called once per relation
func (*CoordCacheHandler) ReadWay ¶
func (h *CoordCacheHandler) ReadWay(item gosmparse.Way)
ReadWay - called once per way
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser - PBF Parser
func NewParserFromArgs ¶
NewParserFromArgs - Create a new parser for file at argv position
func (*Parser) GetDecoder ¶
GetDecoder - return decoder object
type RandomAccessParser ¶
RandomAccessParser - struct to handle random access lookups to a pbf
func NewRandomAccessParser ¶
func NewRandomAccessParser(path string, idxPath string) *RandomAccessParser
NewRandomAccessParser -
func (*RandomAccessParser) GetNode ¶
func (p *RandomAccessParser) GetNode(osmID int64) (gosmparse.Node, error)
GetNode - fetch a single record from the file
func (*RandomAccessParser) GetRelation ¶
func (p *RandomAccessParser) GetRelation(osmID int64) (gosmparse.Relation, error)
GetRelation - fetch a single record from the file
Click to show internal directories.
Click to hide internal directories.