geojson

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: BSD-2-Clause Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

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

func Encode

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

func FromGeoJSON

func FromGeoJSON(geom *Geometry) (g geom.Geom, err error)

Types

type Geometry

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

func ToGeoJSON

func ToGeoJSON(g geom.Geom) (*Geometry, error)

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