json

package
v0.0.0-...-04d4fff Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coords

type Coords struct {
	ID   int64   `json:"id"`
	Type string  `json:"type"`
	Lat  float64 `json:"lat"`
	Lon  float64 `json:"lon"`
}

Coords struct

func (Coords) Bytes

func (coords Coords) Bytes() []byte

Bytes - return json

func (Coords) Print

func (coords Coords) Print()

Print json

type DenormalizedWay

type DenormalizedWay struct {
	ID       int64             `json:"id"`
	Type     string            `json:"type"`
	Hash     string            `json:"hash,omitempty"`
	Tags     map[string]string `json:"tags,omitempty"`
	Centroid *LatLon           `json:"centroid,omitempty"`
	LatLons  []*LatLon         `json:"nodes,omitempty"`
}

DenormalizedWay struct

func (DenormalizedWay) Bytes

func (way DenormalizedWay) Bytes() []byte

Bytes - return json

func (DenormalizedWay) Print

func (way DenormalizedWay) Print()

Print json

func (DenormalizedWay) PrintIndent

func (way DenormalizedWay) PrintIndent()

PrintIndent json indented

type LatLon

type LatLon struct {
	Lat float64 `json:"lat"`
	Lon float64 `json:"lon"`
}

LatLon struct

func NewLatLon

func NewLatLon(lat float64, lon float64) *LatLon

NewLatLon - generate a new JSON struct based off a parse struct

func (LatLon) Bytes

func (ll LatLon) Bytes() []byte

Bytes - return json

func (LatLon) Print

func (ll LatLon) Print()

Print json

type Member

type Member struct {
	ID   int64  `json:"ref"`
	Type string `json:"type"`
	Role string `json:"role"`
}

Member struct

func (Member) Bytes

func (member Member) Bytes() []byte

Bytes - return json

func (Member) Print

func (member Member) Print()

Print json

type Node

type Node struct {
	ID   int64             `json:"id"`
	Type string            `json:"type"`
	Hash string            `json:"hash,omitempty"`
	Lat  float64           `json:"lat"`
	Lon  float64           `json:"lon"`
	Tags map[string]string `json:"tags,omitempty"`
}

Node struct

func NodeFromParser

func NodeFromParser(item gosmparse.Node) *Node

NodeFromParser - generate a new JSON struct based off a parse struct

func (Node) Bytes

func (node Node) Bytes() []byte

Bytes - return json

func (Node) Print

func (node Node) Print()

Print json

type Relation

type Relation struct {
	ID      int64             `json:"id"`
	Type    string            `json:"type"`
	Hash    string            `json:"hash,omitempty"`
	Tags    map[string]string `json:"tags,omitempty"`
	Members []Member          `json:"members"`
}

Relation struct

func RelationFromParser

func RelationFromParser(item gosmparse.Relation) *Relation

RelationFromParser - generate a new JSON struct based off a parse struct

func (Relation) Bytes

func (relation Relation) Bytes() []byte

Bytes - return json

func (Relation) Print

func (relation Relation) Print()

Print json

type Way

type Way struct {
	ID   int64             `json:"id"`
	Type string            `json:"type"`
	Hash string            `json:"hash,omitempty"`
	Tags map[string]string `json:"tags,omitempty"`
	Refs []int64           `json:"nodes"`
}

Way struct

func DenormalizedWayFromParser

func DenormalizedWayFromParser(item gosmparse.Way) *Way

DenormalizedWayFromParser - generate a new JSON struct based off a parse struct

func WayFromParser

func WayFromParser(item gosmparse.Way) *Way

WayFromParser - generate a new JSON struct based off a parse struct

func (Way) Bytes

func (way Way) Bytes() []byte

Bytes - return json

func (Way) Print

func (way Way) Print()

Print json

Jump to

Keyboard shortcuts

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