osm

package
v0.0.0-...-659ce9b Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

openstreetmap implementation

Index

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type GeoInfo

type GeoInfo struct {
	LatLngs []s2.LatLng
	Tags    map[string]string
}

type Item

type Item struct {
	LatLngs []s2.LatLng
}

type Osm

type Osm struct {
	*geo.SpatialGeo
	// contains filtered or unexported fields
}

func New

func New(opts ...spatial.Options) (o *Osm, err error)

func (*Osm) AsParser

func (this *Osm) AsParser(batchsize uint32) *OsmParser

func (*Osm) Close

func (this *Osm) Close()

func (*Osm) GetWayInfo

func (this *Osm) GetWayInfo(id int64) (v interface{}, err error)

func (*Osm) Search

func (this *Osm) Search(q string, from, limit int) (results *bleve.SearchResult, err error)

type OsmParser

type OsmParser struct {
	*Osm

	NodeCnt     uint64
	WayCnt      uint64
	RelationCnt uint64

	SkipNodes     uint64
	SkipWays      uint64
	SkipRelations uint64

	PreserveTmp bool

	MissedWays      uint64
	MissedRelations uint64
	// contains filtered or unexported fields
}

func (*OsmParser) Cleanup

func (this *OsmParser) Cleanup()

func (*OsmParser) Close

func (this *OsmParser) Close()

func (*OsmParser) CountNodesInTmpKV

func (this *OsmParser) CountNodesInTmpKV() int

func (*OsmParser) CountWaysInTmpKV

func (this *OsmParser) CountWaysInTmpKV() int

func (OsmParser) DbPath

func (this OsmParser) DbPath() string

func (*OsmParser) LoadTempKV

func (this *OsmParser) LoadTempKV() (err error)

func (OsmParser) MissedRelationsPercent

func (this OsmParser) MissedRelationsPercent() float64

func (OsmParser) MissedWaysPercent

func (this OsmParser) MissedWaysPercent() float64

func (*OsmParser) ParseFromTar

func (this *OsmParser) ParseFromTar(r io.Reader) error

func (*OsmParser) ParseFromTarBz2

func (this *OsmParser) ParseFromTarBz2(r io.Reader) error

func (*OsmParser) ParsePbf

func (this *OsmParser) ParsePbf(r io.Reader) error

func (*OsmParser) ReadNode

func (this *OsmParser) ReadNode(n gosmparse.Node)

func (*OsmParser) ReadRelation

func (this *OsmParser) ReadRelation(r gosmparse.Relation)

func (*OsmParser) ReadWay

func (this *OsmParser) ReadWay(w gosmparse.Way)

Directories

Path Synopsis
examples
osmcli command

Jump to

Keyboard shortcuts

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