mapindex

package
v0.0.0-...-69178d2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeInterlacedString

func DeInterlacedString(in string) (string, string)

func FloatToConstantLengthFloat

func FloatToConstantLengthFloat(input float64) string

func InterlacedString

func InterlacedString(a, b string) string

func Store

func Store(index MapIndex) (string, []byte)

Types

type FeatureIDSlice

type FeatureIDSlice []osm.FeatureID

func (FeatureIDSlice) Len

func (p FeatureIDSlice) Len() int

func (FeatureIDSlice) Less

func (p FeatureIDSlice) Less(i, j int) bool

func (FeatureIDSlice) Swap

func (p FeatureIDSlice) Swap(i, j int)

type FeatureIDWithLocation

type FeatureIDWithLocation struct {
	osm.FeatureIDs
	Lat float64
	Lon float64

	SignificantRelations osm.FeatureIDs
}

type Map

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

func NewMap

func NewMap(db *badger.DB) *Map

func (*Map) ConstructIndex

func (m *Map) ConstructIndex(path string) error

func (*Map) ConstructIndexSecondPass

func (m *Map) ConstructIndexSecondPass(path string, resolver interfacew.MapResolver) error

func (Map) GetFeatureByID

func (m Map) GetFeatureByID(FeatureID string, file *os.File) *osm.Object

func (Map) GetMapIndexByName

func (m Map) GetMapIndexByName(name string) MapIndex

func (Map) GetRelationByFeature

func (m Map) GetRelationByFeature(FeatureID string) osm.FeatureIDs

func (Map) ScanRegion

func (m Map) ScanRegion(Lat, Lon float64, mask int) (osm.ObjectIDs, osm.FeatureIDs, []FeatureIDWithLocation)

func (Map) SearchByName

func (m Map) SearchByName(Name string) (osm.FeatureIDs, uint32)

func (Map) SearchByNamePrefix

func (m Map) SearchByNamePrefix(Name string) []string

type MapFTS

type MapFTS struct {
	Name string

	Refs  osm.FeatureIDs
	Count uint32
}

func (MapFTS) Install

func (m MapFTS) Install(oldVal MapIndex) MapIndex

func (MapFTS) ToIndexKey

func (m MapFTS) ToIndexKey() string

type MapFeatureID2CurrentObjectIDEntry

type MapFeatureID2CurrentObjectIDEntry struct {
	ID         osm.ObjectID
	SkipLength int64

	CachedData []byte

	IDFeat osm.FeatureID
}

func (MapFeatureID2CurrentObjectIDEntry) Install

func (MapFeatureID2CurrentObjectIDEntry) ToIndexKey

type MapFeatureID2Refs

type MapFeatureID2Refs struct {
	IDElem osm.FeatureID

	Refs osm.FeatureIDs
}

func (MapFeatureID2Refs) Install

func (m MapFeatureID2Refs) Install(oldVal MapIndex) MapIndex

func (MapFeatureID2Refs) ToIndexKey

func (m MapFeatureID2Refs) ToIndexKey() string

type MapID2ItemEntry

type MapID2ItemEntry struct {
	ID         osm.ObjectID
	SkipLength int64
}

func (MapID2ItemEntry) Install

func (m MapID2ItemEntry) Install(oldVal MapIndex) MapIndex

func (MapID2ItemEntry) ToIndexKey

func (m MapID2ItemEntry) ToIndexKey() string

type MapIndex

type MapIndex interface {
	//returned value should be prefixed with type
	ToIndexKey() string
	Install(oldVal MapIndex) MapIndex
}

func ConstructIndexForObject

func ConstructIndexForObject(object osm.Object, skipLen int64) []MapIndex

func ConstructIndexForObjectSecondPass

func ConstructIndexForObjectSecondPass(object osm.Object, skipLen int64, m interfacew.MapResolver) []MapIndex

func Load

func Load(keyMame string, data []byte) MapIndex

type MapRegion2IDEntry

type MapRegion2IDEntry struct {
	IDs  osm.ObjectIDs
	FIDs osm.FeatureIDs
	Lat  float64
	Lon  float64

	Significant osm.FeatureIDs
}

func (MapRegion2IDEntry) Install

func (m MapRegion2IDEntry) Install(oldVal MapIndex) MapIndex

func (MapRegion2IDEntry) ToIndexKey

func (m MapRegion2IDEntry) ToIndexKey() string

type ObjectIDSlice

type ObjectIDSlice []osm.ObjectID

func (ObjectIDSlice) Len

func (p ObjectIDSlice) Len() int

func (ObjectIDSlice) Less

func (p ObjectIDSlice) Less(i, j int) bool

func (ObjectIDSlice) Swap

func (p ObjectIDSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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