MapMathConversion

package
v5.1.37 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XPi    = math.Pi * 3000.0 / 180.0
	OFFSET = 0.00669342162296594323
	AXIS   = 6378245.0
)

Variables

This section is empty.

Functions

func BD09toGCJ02

func BD09toGCJ02(lon, lat float64) (float64, float64)

BD09toGCJ02 百度坐标系->火星坐标系

func BD09toWGS84

func BD09toWGS84(lon, lat float64) (float64, float64)

BD09toWGS84 百度坐标系->WGS84坐标系

func ConversionMapType

func ConversionMapType(mapType int) string

ConversionMapType 转化mapType 0 / 1 / 2 WGS-84 / GCJ-02 / BD-09

func GCJ02toBD09

func GCJ02toBD09(lon, lat float64) (float64, float64)

GCJ02toBD09 火星坐标系->百度坐标系

func GCJ02toWGS84

func GCJ02toWGS84(lon, lat float64) (float64, float64)

GCJ02toWGS84 火星坐标系->WGS84坐标系

func WGS84toBD09

func WGS84toBD09(lon, lat float64) (float64, float64)

WGS84toBD09 WGS84坐标系->百度坐标系

func WGS84toGCJ02

func WGS84toGCJ02(lon, lat float64) (float64, float64)

WGS84toGCJ02 WGS84坐标系->火星坐标系

Types

type ArgsConversion

type ArgsConversion struct {
	//源格式
	// WGS-84\GCJ-02\BD-09
	SrcType string `json:"srcType"`
	//目标格式
	// WGS-84\GCJ-02\BD-09
	DestType string `json:"destType"`
	//原数据
	Data []ArgsConversionGPS `json:"data"`
}

ArgsConversion 快速转化函数处理模块

type ArgsConversionGPS

type ArgsConversionGPS struct {
	Longitude float64 `json:"longitude"`
	Latitude  float64 `json:"latitude"`
}

func Conversion

func Conversion(args *ArgsConversion) (result []ArgsConversionGPS, err error)

func ConversionMapTypeInt

func ConversionMapTypeInt(args *ArgsConversionMapTypeInt) (result []ArgsConversionGPS, err error)

type ArgsConversionMapTypeInt

type ArgsConversionMapTypeInt struct {
	//源格式
	// 0 / 1 / 2
	// WGS-84 / GCJ-02 / BD-09
	SrcType int `json:"srcType"`
	//目标格式
	// 0 / 1 / 2
	// WGS-84 / GCJ-02 / BD-09
	DestType int `json:"destType"`
	//原数据
	Data []ArgsConversionGPS `json:"data"`
}

Jump to

Keyboard shortcuts

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