geo

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EncodingWKB = "WKB"
	EncodingWKT = "WKT"
)

Variables

This section is empty.

Functions

func DecodeGeometry

func DecodeGeometry(value any, encoding string) (*orbjson.Geometry, error)

Types

type DatasetStats

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

func NewDatasetStats

func NewDatasetStats(concurrent bool) *DatasetStats

func (*DatasetStats) AddBounds

func (i *DatasetStats) AddBounds(name string, bounds *orb.Bound)

func (*DatasetStats) AddCollection

func (i *DatasetStats) AddCollection(name string)

func (*DatasetStats) AddTypes

func (i *DatasetStats) AddTypes(name string, types []string)

func (*DatasetStats) Bounds

func (i *DatasetStats) Bounds(name string) *orb.Bound

func (*DatasetStats) HasCollection

func (i *DatasetStats) HasCollection(name string) bool

func (*DatasetStats) NumCollections

func (i *DatasetStats) NumCollections() int

func (*DatasetStats) Types

func (i *DatasetStats) Types(name string) []string

type Feature

type Feature struct {
	Id         any            `json:"id,omitempty"`
	Type       string         `json:"type"`
	Geometry   orb.Geometry   `json:"geometry"`
	Properties map[string]any `json:"properties"`
}

func (*Feature) MarshalJSON

func (f *Feature) MarshalJSON() ([]byte, error)

func (*Feature) UnmarshalJSON

func (f *Feature) UnmarshalJSON(data []byte) error

type FeatureCollection

type FeatureCollection struct {
	Type     string     `json:"type"`
	Features []*Feature `json:"features"`
}

func (*FeatureCollection) MarshalJSON

func (c *FeatureCollection) MarshalJSON() ([]byte, error)

type GeometryStats

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

func NewGeometryStats

func NewGeometryStats(concurrent bool) *GeometryStats

func (*GeometryStats) AddBounds

func (i *GeometryStats) AddBounds(bounds *orb.Bound)

func (*GeometryStats) AddType

func (i *GeometryStats) AddType(typ string)

func (*GeometryStats) AddTypes

func (i *GeometryStats) AddTypes(types []string)

func (*GeometryStats) Bounds

func (i *GeometryStats) Bounds() *orb.Bound

func (*GeometryStats) Types

func (i *GeometryStats) Types() []string

Jump to

Keyboard shortcuts

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