示例#1
0
文件: gdal.go 项目: kikht/gdal
// Set unit type
func (rasterBand RasterBand) SetUnitType(unit string) error {
	cString := C.CString(unit)
	defer C.free(unsafe.Pointer(cString))

	err := C.GDALSetRasterUnitType(rasterBand.cval, cString)
	if err != 0 {
		return error(err)
	}

	return nil
}
示例#2
0
文件: gdal.go 项目: colek42/gdal
// Set unit type
func (rasterBand RasterBand) SetUnitType(unit string) error {
	cString := C.CString(unit)
	defer C.free(unsafe.Pointer(cString))

	return C.GDALSetRasterUnitType(rasterBand.cval, cString).Err()
}