point

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinarySearch

func BinarySearch(dataSet []float64, findNum float64, midIndex int, lOrRight string) ([]int, error)

*

  • @description: 二分查找坐标对应的索引
  • @param {[]float64} dataSet: 数据集
  • @param {float64} findNum 需要查找的经纬度
  • @param {int} midIndex 中间索引 传0
  • @param {string} lOrRight 数据集是降序还是升序 desc or asc
  • @return {*}
  • @author: liqiyuWorks

func ConverMfwamPointToIndex

func ConverMfwamPointToIndex(lonPoints, latPoints []string, lon float64, lat float64) ([]int, []int, error)

*

  • @description: ConverMfwamPointToIndex
  • @param {*} lonPoints
  • @param {[]string} latPoints
  • @param {float64} lon
  • @param {float64} lat
  • @return {*}
  • @author: liqiyuWorks

Types

type Point

type Point struct {
	Lon float64 `json:"lon,omitempty"`
	Lat float64 `json:"lat,omitempty"`
}

type PointIndex

type PointIndex struct {
	Ilon int `json:"lon,omitempty"`
	Ilat int `json:"lat,omitempty"`
}

Jump to

Keyboard shortcuts

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