package gdal
Module Band.BlockSource
Block IO
These functions should generally be faster than the more generic read and write functions.
pixel_of_block_offset t returns a function which may be used to convert offsets within a block to pixel offsets within the band t.
block_of_pixel_offset t returns a function which returns the block_offset_t matching the pixel offset provided.
get_block_count t returns (nx, ny) giving the number of blocks in the band's x direction (nx) and the number of blocks in the band's y direction (ny).
get_size t returns the native (x, y) dimensions of the individual blocks making up t.
val read :
?data:('v, 'e, Bigarray.c_layout) Bigarray.Array2.t ->
('v, 'e) t ->
column:int ->
row:int ->
('v, 'e, Bigarray.c_layout) Bigarray.Array2.tread ?data t ~column ~row returns the block at given offset in t.
val write :
('v, 'e) t ->
column:int ->
row:int ->
('v, 'e, Bigarray.c_layout) Bigarray.Array2.t ->
unitwrite t ~column ~row data writes data to the block at the given offset in t.
val iter :
('v, 'e) t ->
read:bool ->
write:bool ->
(int -> int -> ('v, 'e, Bigarray.c_layout) Bigarray.Array2.t -> unit) ->
unititer t ~read ~write f applies f to each block in t. The read and write arguments determine if values are from t, written to t or both.
val iter_read :
('v, 'e) t ->
(int -> int -> ('v, 'e, Bigarray.c_layout) Bigarray.Array2.t -> unit) ->
unititer_read t f applies f to each block in t.
val iter_write :
('v, 'e) t ->
(int -> int -> ('v, 'e, Bigarray.c_layout) Bigarray.Array2.t -> unit) ->
unititer_write t f applies f to each block in t.