示例#1
0
文件: osr.go 项目: sn-amber/gdal
// Set to Transverse Mercator
func (sr SpatialReference) SetTM(
	centerLat, centerLong, scale, falseEasting, falseNorthing float64,
) error {
	return C.OSRSetTM(
		sr.cval,
		C.double(centerLat),
		C.double(centerLong),
		C.double(scale),
		C.double(falseEasting),
		C.double(falseNorthing),
	).Err()
}
示例#2
0
文件: osr.go 项目: kikht/gdal
// Set to Transverse Mercator
func (sr SpatialReference) SetTM(
	centerLat, centerLong, scale, falseEasting, falseNorthing float64,
) error {
	err := C.OSRSetTM(
		sr.cval,
		C.double(centerLat),
		C.double(centerLong),
		C.double(scale),
		C.double(falseEasting),
		C.double(falseNorthing),
	)
	if err != 0 {
		return error(err)
	}

	return nil
}