geoparser

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytePoint

func BytePoint(b []byte) (x, y float64)

func NodeIdKey

func NodeIdKey(id int64) []byte

func NodePointByte

func NodePointByte(x, y float64) []byte

func Polylabel

func Polylabel(ring orb.Ring, precision float64) (x, y float64)

Types

type Cell

type Cell struct {
	X   float64 // Cell center X
	Y   float64 // Cell center Y
	H   float64 // Half cell size
	D   float64 // Distance from cell center to polygon
	Max float64 // max distance to polygon within a cell
}

func NewCell

func NewCell(x float64, y float64, h float64, p orb.Ring) *Cell

type GeoGen

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

func NewGeoGen

func NewGeoGen(cachePath string, threads int, preferredLocalization string) (*GeoGen, error)

func (*GeoGen) Close

func (f *GeoGen) Close()

func (*GeoGen) OpenCache

func (f *GeoGen) OpenCache() error

func (*GeoGen) ParseOSMFile

func (f *GeoGen) ParseOSMFile(ctx context.Context, base string) error

func (*GeoGen) SavePointsToFile

func (f *GeoGen) SavePointsToFile(file string) error

type Stage

type Stage[D any] struct {
	// contains filtered or unexported fields
}

func (*Stage[D]) SetHandler

func (s *Stage[D]) SetHandler(h func(data D) error)

func (*Stage[D]) Submit

func (s *Stage[D]) Submit(data D)

func (*Stage[D]) WaitAndClose

func (s *Stage[D]) WaitAndClose()

type Stager

type Stager[D any] struct {
	// contains filtered or unexported fields
}

func NewStager

func NewStager[D any](filter func(D) int, handlers []func(data D) error) *Stager[D]

func (*Stager[D]) NewStage

func (s *Stager[D]) NewStage() *Stage[D]

func (*Stager[D]) Run

func (s *Stager[D]) Run()

func (*Stager[D]) Submit

func (s *Stager[D]) Submit(data D)

func (*Stager[D]) WaitAndClose

func (s *Stager[D]) WaitAndClose()

Jump to

Keyboard shortcuts

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