diff

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: 8 Imported by: 0

Documentation

Overview

Package diff provides a parser for OSM diff files (.osc).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element struct {
	Add  bool
	Mod  bool
	Del  bool
	Node *element.Node
	Way  *element.Way
	Rel  *element.Relation
}

type Parser

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

Parser is a stream based parser for OSM diff files (.osc). Parsing is handled in a background goroutine.

func NewOscGzParser

func NewOscGzParser(fname string) (*Parser, error)

NewOscGzParser returns a parser from a .osc.gz file

func NewParser

func NewParser(r io.Reader) *Parser

NewParser returns a parser from an io.Reader

func (*Parser) Next

func (p *Parser) Next() (Element, error)

Next returns the next Element of the .osc file. Returns io.EOF and an empty Element if the parser reached the end of the .osc file.

func (*Parser) SetWithMetadata

func (p *Parser) SetWithMetadata(metadata bool)

SetWithMetadata enables parsing of metadata

Jump to

Keyboard shortcuts

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