pbf

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package pbf provides a parser for OSM PBF files.

The subpackage osmpbf contains the generated code for the OSM .proto files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	Time     time.Time
	Sequence int64
	Filename string

	RequiredFeatures []string
	OptionalFeatures []string
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(
	filename string,
) (*Parser, error)

func (*Parser) Header

func (p *Parser) Header() Header

func (*Parser) Parse

func (p *Parser) Parse(
	coords chan []element.Node,
	nodes chan []element.Node,
	ways chan []element.Way,
	relations chan []element.Relation,
)

func (*Parser) RegisterFirstRelationCallback

func (p *Parser) RegisterFirstRelationCallback(cb func())

RegisterFirstRelationCallback registers a callback that gets called when the the first relation is parsed. The callback should block until it is safe to send relations to the relation channel. This only works when the PBF file is ordered by type (nodes before ways before relations).

func (*Parser) RegisterFirstWayCallback

func (p *Parser) RegisterFirstWayCallback(cb func())

RegisterFirstWayCallback registers a callback that gets called when the the first way is parsed. The callback should block until it is safe to send ways to the way channel. This only works when the PBF file is ordered by type (nodes before ways before relations).

Directories

Path Synopsis
internal
osmpbf
Package osmpbf is a generated protocol buffer package.
Package osmpbf is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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