osm

package
v0.0.0-...-8d1fdb3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2016 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package osm extracts and manipulates OpenStreetMap (OSM) data. Refer to openstreetmap.org for more information about OSM data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Nodes     map[int64]*osmpbf.Node
	Ways      map[int64]*osmpbf.Way
	Relations map[int64]*osmpbf.Relation
	// contains filtered or unexported fields
}

Data holds OpenStreetMap data and relationships.

func ExtractTag

func ExtractTag(rs io.ReadSeeker, tag string, values ...string) (*Data, error)

ExtractTag extracts OpenStreetMap data with the given tag set to one of the given values.

func (*Data) Check

func (o *Data) Check() error

Check checks OSM data to ensure that all necessary components are present.

func (*Data) Geom

func (o *Data) Geom() ([]*GeomTags, error)

Geom converts the OSM data to geometry objects, keeping the tag information.

type GeomTags

type GeomTags struct {
	geom.Geom
	Tags map[string]string
}

GeomTags holds a geometry object and the tags that apply to it.

Jump to

Keyboard shortcuts

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