osmx

package module
v0.0.0-...-ae8fcd9 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package osmx is a parsing extension for OpenStreetMap XML data

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRelations = errors.New("osmx: map contains no relations")

ErrNoRelations is returned on map without relations decoding/wrapping.

Functions

This section is empty.

Types

type Map

type Map struct {
	*osm.Map
	// contains filtered or unexported fields
}

Map wraps osm.Map.

func Decode

func Decode(r io.Reader) (*Map, error)

Decode decodes a Map.

func WrapMap

func WrapMap(parent *osm.Map) (*Map, error)

WrapMap initialises Map and sorts indexes for further processing.

func (*Map) ExtractLoops

func (m *Map) ExtractLoops() ([]*s2.Loop, error)

ExtractLoops extracts and generates (outer) loops from the map.

func (*Map) FindNode

func (m *Map) FindNode(id int64) (*osm.Node, error)

FindNode finds and returns a node by its ID.

func (*Map) FindWay

func (m *Map) FindWay(id int64) (*osm.Way, error)

FindWay finds and returns a way by its ID.

func (*Map) Rel

func (m *Map) Rel() *osm.Relation

Rel returns the primary relation in Map.

func (*Map) Tag

func (m *Map) Tag(key string) string

Tag returns the value if a particular tag.

Jump to

Keyboard shortcuts

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