geo

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	Properties map[string]any `json:"properties"`
	Geometry   any            `json:"geometry"`
	Type       Type           `json:"type"`
}

func NewFeature

func NewFeature(geometry any, properties map[string]any) Feature

type Point

type Point struct {
	Type        Type     `json:"type"`
	Coordinates Position `json:"coordinates"`
}

func NewPoint

func NewPoint(position Position) Point

type Position

type Position struct {
	Longitude float64
	Latitude  float64
}

func NewPosition

func NewPosition(lon, lat float64) Position

func (Position) MarshalJSON

func (p Position) MarshalJSON() ([]byte, error)

type Type

type Type string
const (
	// TypeFeature as defined in https://datatracker.ietf.org/doc/html/rfc7946#section-1.4
	TypeFeature Type = "Feature"
	// TypePoint as defined in https://datatracker.ietf.org/doc/html/rfc7946#section-1.4
	TypePoint Type = "Point"
)

Jump to

Keyboard shortcuts

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