xcoord

package
v1.14.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EllipsoidParameter

type EllipsoidParameter struct {
	A   float64
	B   float64
	F   float64
	E2  float64
	EP2 float64
	C   float64
	A0  float64
	A2  float64
	A4  float64
	A6  float64
}

EllipsoidParameter 椭球体参数

func NewWGS84Parameter

func NewWGS84Parameter() *EllipsoidParameter

NewWGS84Parameter 生成 WGS84 椭球体参数

type Location

type Location struct {
	// contains filtered or unexported fields
}

Location 地理位置(经纬度)

func NewLocation

func NewLocation(lng, lat float64) *Location

NewLocation 生成一个Location

func (*Location) Azimuth

func (l *Location) Azimuth(t *Location) float64

Azimuth 根据经纬度计算方位角(0 ~ 360)

func (*Location) Distance

func (l *Location) Distance(t *Location) float64

Distance 根据经纬度计算距离(单位:m)

func (*Location) Latitude

func (l *Location) Latitude() float64

Latitude 返回维度

func (*Location) Longtitude

func (l *Location) Longtitude() float64

Longtitude 返回经度

func (*Location) String

func (l *Location) String() string

String 实现 Stringer 接口

type Point

type Point struct {
	// contains filtered or unexported fields
}

Point 直角坐标系点

func NewPoint

func NewPoint(x, y float64, ml ...int) *Point

NewPoint 生成一个直角坐标系的点; 可选参数 `ml` 是用于大地平面直角坐标系间转经纬度的子午线值

func (*Point) MLine

func (p *Point) MLine() int

MLine 返回用于大地平面直角坐标系间转经纬度的子午线值

func (*Point) String

func (p *Point) String() string

String 实现 Stringer 接口

func (*Point) X

func (p *Point) X() float64

X 返回x坐标

func (*Point) Y

func (p *Point) Y() float64

Y 返回y坐标

type ProjType

type ProjType int

ProjType 投影类型

const (
	GK  ProjType = iota // 高斯-克吕格(Gauss-Kruger)投影
	UTM                 // UTM投影
)

type ZtGeoCoordTransform

type ZtGeoCoordTransform struct {
	// contains filtered or unexported fields
}

ZtGeoCoordTransform 经纬度与大地平面直角坐标系间的转换; [翻译自C++代码](https://www.cnblogs.com/xingzhensun/p/11377963.html)

func NewZtGeoCoordTransform

func NewZtGeoCoordTransform(ml int, pt ProjType) *ZtGeoCoordTransform

NewZtGeoCoordTransform 返回经纬度与大地平面直角坐标系间的转换器; [示例] zgct := yiigo.NewZtGeoCoordTransform(-360, yiigo.GK)

func (*ZtGeoCoordTransform) BL2XY

func (zgct *ZtGeoCoordTransform) BL2XY(loc *Location) *Point

BL2XY 经纬度转大地平面直角坐标系点

func (*ZtGeoCoordTransform) XY2BL

func (zgct *ZtGeoCoordTransform) XY2BL(p *Point) *Location

XY2BL 大地平面直角坐标系点转经纬度

Jump to

Keyboard shortcuts

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