示例#1
0
文件: gdal.go 项目: kikht/gdal
// Read a block of image data efficiently
func (rasterBand RasterBand) ReadBlock(xOff, yOff int, dataPtr unsafe.Pointer) error {
	err := C.GDALReadBlock(rasterBand.cval, C.int(xOff), C.int(yOff), dataPtr)
	if err != 0 {
		return error(err)
	}

	return nil
}
示例#2
0
文件: gdal.go 项目: colek42/gdal
// Read a block of image data efficiently
func (rasterBand RasterBand) ReadBlock(xOff, yOff int, dataPtr unsafe.Pointer) error {
	return C.GDALReadBlock(rasterBand.cval, C.int(xOff), C.int(yOff), dataPtr).Err()
}