sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
type ('v, 'e) t = c * ('v, 'e) Stdlib.Bigarray.kind
val t : c Ctypes.typ
val to_ba_kind : ('v, 'e) t -> ('v, 'e) Stdlib.Bigarray.kind
to_ba_kind t
returns the Bigarray.kind
matching t
.
module Data : sig ... end
val get_size : (_, _) t -> int * int
get_size t
returns the (x, y)
dimensions in pixels.
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.
val get_band_number : (_, _) t -> int option
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, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array2.t
read 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, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array2.t ->
unit
write t kind data
writes the values from t
as kind
values.
val fill : ?imaginary:float -> (_, _) t -> float -> unit
file ?imaginary t real
sets all values in t
to real
. If t
holds complex numbers then imaginary
can be specified as well.
val get_description : (_, _) t -> string
get_description t
returns the description of the current band. If no description exists then the returned string will be empty.
val get_no_data_value : (_, _) t -> float option
get_no_data_value t
returns the value representing no/missing data in band t
, or None
if no such value is set.
val set_description : (_, _) t -> string -> unit
set_description t desc
sets the description of t
to desc
.
val set_no_data_value : (_, _) t -> float -> unit
set_no_data_value t x
defines x
as representing no/missing data in band t
.
val iter : ('v, _) t -> (int -> int -> 'v -> 'v) -> unit
iter t f
applies f
to every value in t
then assigns the result back to the same point in t
.
val iter_read : ('v, _) t -> (int -> int -> 'v -> unit) -> unit
iter_read t f
calls f
with every value in t
.
val iter_write : ('v, _) t -> (int -> int -> 'v) -> unit
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.
itera_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
.
val fold : ('v, _) t -> (int -> int -> 'v -> 'accu -> 'accu) -> 'accu -> 'accu
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.
module Block : sig ... end