geojson

package
v0.0.0-...-b0a49f2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilPointer  = errors.New("geojson: nil pointer")
	ErrNoIndexData = errors.New("geojson: no index data")
)

Functions

func IndexToFeatureCollection

func IndexToFeatureCollection(index []h3.H3Index) *geojson.FeatureCollection

Types

type Distributed

type Distributed interface {
	Lookup(index h3.H3Index) (h3geodist.Cell, bool)
}

type Index

type Index struct {
	// contains filtered or unexported fields
}

func EnsureIndex

func EnsureIndex(object geojson.Object, dist Distributed, level int) (index *Index, err error)

func (*Index) ByHost

func (i *Index) ByHost(addr string) []h3.H3Index

func (*Index) Cells

func (i *Index) Cells() []h3.H3Index

func (*Index) ForEachHost

func (i *Index) ForEachHost(iter func(addr string, cells []h3.H3Index) error) (err error)

func (*Index) NumCells

func (i *Index) NumCells() int

Jump to

Keyboard shortcuts

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