osm

package
v0.0.9-a Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddrHouseNum = "addr:housenumber"
	AddrStreet   = "addr:street"
	AddrCity     = "addr:city"
	AddrCountry  = "addr:country"
	AddrPostcode = "addr:postcode"
	AdminLevel   = "admin_level"
	Boundary     = "boundary"

	AddrPrefix  = "addr:"
	GnisPrefix  = "gnis:"
	TigerPrefix = "tiger:"
	BlockSize   = 8000

	RoleOuter = "outer"
	RoleInner = "inner"
)

TODO split types into their own module

Variables

View Source
var (
	NodeType     = osmpbf.NodeType
	WayType      = osmpbf.WayType
	RelationType = osmpbf.RelationType
)

Functions

func MarshalAddrIndex

func MarshalAddrIndex(idx string, nodeIDs []int64) (k, v []byte)

func MarshalID

func MarshalID(id int64) ([]byte, error)

func UnmarshalNids

func UnmarshalNids(b []byte) (nids []int64)

Types

type Excavator

type Excavator struct {
	NodeCourier     func(<-chan *Node)
	WayCourier      func(<-chan *Way)
	RelationCourier func(<-chan *Relation)
	// contains filtered or unexported fields
}

func NewExcavator

func NewExcavator(pbfpath string) (ex *Excavator, err error)

func (*Excavator) Close

func (ex *Excavator) Close()

func (*Excavator) Errors

func (ex *Excavator) Errors() <-chan error

func (*Excavator) Reset

func (ex *Excavator) Reset() (err error)

func (*Excavator) Restart

func (ex *Excavator) Restart(workers int) (err error)

func (*Excavator) Start

func (ex *Excavator) Start(workers int) (err error)

type Node

type Node struct {
	*osmpbf.Node
}

func UnmarshalNode

func UnmarshalNode(b []byte) (o *Node, err error)

func (*Node) GetID

func (o *Node) GetID() int64

func (*Node) IsAddressable

func (o *Node) IsAddressable() bool

func (*Node) Key

func (o *Node) Key() string

func (*Node) Keyed

func (o *Node) Keyed() (k, v []byte)

func (*Node) String

func (o *Node) String() string

func (*Node) Valid

func (o *Node) Valid() bool

type Relation

type Relation struct {
	*osmpbf.Relation
}

func UnmarshalRelation

func UnmarshalRelation(b []byte) (o *Relation, err error)

func (*Relation) IsSubregionBoundary

func (o *Relation) IsSubregionBoundary() bool

func (*Relation) Key

func (o *Relation) Key() string

func (*Relation) Keyed

func (o *Relation) Keyed() (k, v []byte)

func (*Relation) String

func (o *Relation) String() string

func (*Relation) Valid

func (o *Relation) Valid() bool

type Way

type Way struct {
	*osmpbf.Way
}

func UnmarshalWay

func UnmarshalWay(b []byte) (o *Way, err error)

func (*Way) IsAddressable

func (o *Way) IsAddressable() bool

func (*Way) IsSubregionBoundary

func (o *Way) IsSubregionBoundary() bool

func (*Way) Key

func (o *Way) Key() string

func (*Way) Keyed

func (o *Way) Keyed() (k, v []byte)

func (*Way) String

func (o *Way) String() string

func (*Way) Valid

func (o *Way) Valid() bool

Jump to

Keyboard shortcuts

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