MapMathArea

package
v5.1.45 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckXYInArea

func CheckXYInArea(args *ArgsCheckXYInArea) bool

func GetAreaCenter

func GetAreaCenter(data *ParamsArea) (float64, float64, error)

GetAreaCenter 获取中心点

Types

type ArgsCheckXYInArea

type ArgsCheckXYInArea struct {
	//点坐标
	Point MapMathArgs.ParamsPoint
	//分区范围
	Area ParamsArea
}

ArgsCheckXYInArea 检查点和面的数学问题,点是否在面内 采用矩阵关系处理 测试耗时:10,000次 / 0.038秒

type ArgsCheckXYInAreaList

type ArgsCheckXYInAreaList struct {
	//检查的点
	CheckPoint MapMathArgs.ParamsPoint
	//分区数据
	AreaDataList []ParamsArea
}

type ArgsGetCircleByPoint

type ArgsGetCircleByPoint struct {
	//圆心
	Point ParamsAreaPoint
	//半径
	Radius float64
}

ArgsGetCircleByPoint 给予一个点坐标和半径,计算圆的范围点数据参数

type ParamsArea

type ParamsArea struct {
	//锁定ID
	ID int64 `json:"id"`
	//坐标制式
	// WGS-84\GCJ-02\BD-09
	PointType string `json:"pointType"`
	//划区
	Points []ParamsAreaPoint `json:"points"`
}

func CheckXYInAreaList

func CheckXYInAreaList(args *ArgsCheckXYInAreaList) ([]ParamsArea, error)

type ParamsAreaPoint

type ParamsAreaPoint struct {
	//坐标位置
	Longitude float64 `json:"longitude"`
	Latitude  float64 `json:"latitude"`
}

ParamsAreaPoint 分区专用坐标点

func GetCircleByPoint

func GetCircleByPoint(args *ArgsGetCircleByPoint) (area []ParamsAreaPoint)

GetCircleByPoint 给予一个点坐标和半径,计算圆的范围点数据

Jump to

Keyboard shortcuts

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