Documentation
¶
Index ¶
- Constants
- func BD09toGCJ02(lon, lat float64) (float64, float64)
- func BD09toWGS84(lon, lat float64) (float64, float64)
- func ConversionMapType(mapType int) string
- func GCJ02toBD09(lon, lat float64) (float64, float64)
- func GCJ02toWGS84(lon, lat float64) (float64, float64)
- func WGS84toBD09(lon, lat float64) (float64, float64)
- func WGS84toGCJ02(lon, lat float64) (float64, float64)
- type ArgsConversion
- type ArgsConversionGPS
- type ArgsConversionMapTypeInt
Constants ¶
View Source
const ( XPi = math.Pi * 3000.0 / 180.0 OFFSET = 0.00669342162296594323 AXIS = 6378245.0 )
Variables ¶
This section is empty.
Functions ¶
func BD09toWGS84 ¶
BD09toWGS84 百度坐标系->WGS84坐标系
func ConversionMapType ¶
ConversionMapType 转化mapType 0 / 1 / 2 WGS-84 / GCJ-02 / BD-09
func GCJ02toWGS84 ¶
GCJ02toWGS84 火星坐标系->WGS84坐标系
func WGS84toBD09 ¶
WGS84toBD09 WGS84坐标系->百度坐标系
func WGS84toGCJ02 ¶
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"`
}
Click to show internal directories.
Click to hide internal directories.