geojson

package
v0.0.0-...-da8a40e Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2017 License: BSD-2-Clause Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(data []byte) (geom.T, error)

func Encode

func Encode(g geom.T) ([]byte, error)

func FromGeoJSON

func FromGeoJSON(geom Geometry) (g geom.T, err error)

func ToGeoJSON

func ToGeoJSON(t geom.T) (interface{}, error)

Types

type Feature

type Feature struct {
	Type       string `json:"type"`
	Geometry   `json:"geometry"`
	Properties interface{} `json:"properties,omitempty"`
}

type FeatureCollection

type FeatureCollection struct {
	Type       string      `json:"type"`
	Features   []Feature   `json:"features"`
	Properties interface{} `json:"properties,omitempty"`
}

type Geometry

type Geometry struct {
	Type        string      `json:"type"`
	Coordinates interface{} `json:"coordinates"`
}

type InsufficientElementsError

type InsufficientElementsError struct {
	ElementCount int
}

func (InsufficientElementsError) Error

type InsufficientPointsError

type InsufficientPointsError struct {
	PointCount int
}

func (InsufficientPointsError) Error

func (e InsufficientPointsError) Error() string

type InvalidGeometryError

type InvalidGeometryError struct{}

func (InvalidGeometryError) Error

func (e InvalidGeometryError) Error() string

type UnsupportedGeometryError

type UnsupportedGeometryError struct {
	Type string
}

func (UnsupportedGeometryError) Error

func (e UnsupportedGeometryError) Error() string

Jump to

Keyboard shortcuts

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