package gdal
Module Gdal.BandSource
Raster Bands
to_ba_kind t returns the Bigarray.kind matching t.
val get_data_type :
c ->
[ `byte
| `uint16
| `int16
| `uint32
| `int32
| `float32
| `float64
| `unknown
| `unhandled ]get_data_type t returns the data type of the given raster band.
get_band_number t returns the index of t in its dataset or None if the index is unknown.
val read :
?offset:(int * int) ->
?size:(int * int) ->
?pixel_spacing:int ->
?line_spacing:int ->
?buffer_size:(int * int) ->
(_, _) t ->
('v, 'e) Data.t ->
('v, 'e, Bigarray.c_layout) Bigarray.Array2.tread t kind reads the values from t as kind values.
val write :
?offset:(int * int) ->
?size:(int * int) ->
?pixel_spacing:int ->
?line_spacing:int ->
(_, _) t ->
('v, 'e) Data.t ->
('v, 'e, Bigarray.c_layout) Bigarray.Array2.t ->
unitwrite t kind data writes the values from t as kind values.
file ?imaginary t real sets all values in t to real. If t holds complex numbers then imaginary can be specified as well.
get_description t returns the description of the current band. If no description exists then the returned string will be empty.
get_no_data_value t returns the value representing no/missing data in band t, or None if no such value is set.
set_description t desc sets the description of t to desc.
set_no_data_value t x defines x as representing no/missing data in band t.
iter t f applies f to every value in t then assigns the result back to the same point in t.
iter_read t f calls f with every value in t.
iter_write t f calls f with every pixel offset in t. The result of f is written back to t at the current offset.
itera src dst f acts like iter except that it applies f to matching pixels in each raster in src and dst, writing the result of f back to dst. All bands in src and dst must have the same overall dimensions and the same block size.
val itera_read :
('v1, _) t array ->
('v2, _) t ->
(int -> int -> 'v1 array -> 'v2 -> unit) ->
unititera_read src dst f is like itera except that no values are written back to dst.
itera_write t f is like itera except that no values are read from dst.
fold t f init folds over the pixels in t with f.
copy ?options ~src ~dst copies the contents of src to dst. GDAL will perform any data conversion necessary.