changeset

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

Documentation

Overview

Package changeset provides a parser for OSM changeset files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Changeset

type Changeset struct {
	Id         int       `xml:"id,attr"`
	CreatedAt  time.Time `xml:"created_at,attr"`
	ClosedAt   time.Time `xml:"closed_at,attr"`
	Open       bool      `xml:"open,attr"`
	User       string    `xml:"user,attr"`
	UserId     int       `xml:"uid,attr"`
	NumChanges int       `xml:"num_changes,attr"`
	MinLon     float64   `xml:"min_lon,attr"`
	MinLat     float64   `xml:"min_lat,attr"`
	MaxLon     float64   `xml:"max_lon,attr"`
	MaxLat     float64   `xml:"max_lat,attr"`
	Comments   []Comment `xml:"discussion>comment"`
	Tags       []Tag     `xml:"tag"`
}

func ParseAllOsmGz

func ParseAllOsmGz(change string) ([]Changeset, error)

ParseAllOsmGz parses all changesets from a .osm.gz file.

type Comment

type Comment struct {
	UserId int       `xml:"uid,attr"`
	User   string    `xml:"user,attr"`
	Date   time.Time `xml:"date,attr"`
	Text   string    `xml:"text"`
}

type Tag

type Tag struct {
	Key   string `xml:"k,attr"`
	Value string `xml:"v,attr"`
}

Jump to

Keyboard shortcuts

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