Exemple #1
0
// 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
}
Exemple #2
0
// 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()
}