Skip to content

l-we/transform

Repository files navigation

transform

坐标系转换

Installation

go get github.com/l-we/transform

Quick Start

package main

import (
	"fmt"

	"github.com/l-we/transform"
)

func main() {
	fmt.Println(transform.BD09toGCJ02(121.5272106, 31.1774276))
	fmt.Println(transform.GCJ02toBD09(121.5272106, 31.1774276))
	fmt.Println(transform.WGS84toGCJ02(121.5272106, 31.1774276))
	fmt.Println(transform.GCJ02toWGS84(121.5272106, 31.1774276))
	fmt.Println(transform.GCJ02toWGS84Exact(121.5272106, 31.1774276))
	fmt.Println(transform.BD09toWGS84(121.5272106, 31.1774276))
	fmt.Println(transform.WGS84toBD09(121.5272106, 31.1774276))

	fmt.Println(transform.WGS84toWebMC(121.5272106, 31.1774276))
	fmt.Println(transform.BD09toBD09MC(121.5272106, 31.1774276))

	fmt.Println(transform.WebMCtoWGS84(13529697, 3633994))
	fmt.Println(transform.BD09MCtoBD09(13529697, 3633994))
	fmt.Println(transform.BD09MCtoWGS84(13529697, 3633994))

	fmt.Println(transform.ZXYtoWebMCBound(12, 3429, 1673))
	fmt.Println(transform.ZXYtoWGS84Bound(12, 3429, 1673))
}

About

坐标系转换

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages