val t : t Ctypes.typ
val of_source : ?write:bool ‑> string ‑> [ `Error of [> `Invalid_source ] | `Ok of t ]
of_source ?write name
opens the source name
for access.
name
does not represent a valid data source.val of_source_exn : ?write:bool ‑> string ‑> t
Like of_source except that this function raises Invalid_source if there is an error.
val with_source : ?write:bool ‑> string ‑> (t ‑> [> `Error of [> `Invalid_source ] ] as a) ‑> 'a
with_source ?write name f
opens name
and calls f src
if name
is a
valid data source. The data source passed to f
will be closed if f
returns normally or raises an exception.
This is a wrapper around of_source. See its documentation for a description of the expected arguments.
val with_source_exn : ?write:bool ‑> string ‑> (t ‑> 'a) ‑> 'a
Like with_source except that this function raises Invalid_source if there is an error when trying to open the data source.
val get_projection : t ‑> string
get_projection t
returns a string representing the projection applied to
t
.
val get_x_size : t ‑> int
val get_band : t ‑> int ‑> ('v, 'e) Band.Data.t ‑> ('v, 'e) Band.t
get_band t i kind
returns the i
th raster band from t
.
kind
is not correctval get_band_data_type : t ‑> int ‑> [ `byte | `uint16 | `int16 | `uint32 | `int32 | `float32 | `float64 | `unknown | `unhandled ]
get_band_data_type t i
returns the native data type of the i
th band in
t
.
val add_band : ?options:string list ‑> t ‑> ('v, 'e) Band.Data.t ‑> unit
add_band ?options t kind
adds a band of type kind
to t
.
val create_copy : ?strict:bool ‑> ?options:string list ‑> t ‑> Driver.t ‑> string ‑> [ `Error of [ `Invalid_source ] | `Ok of t ]
create_copy ?strict ?options t driver name
creates a copy of t
.
Like create_copy except that the function raises Invalid_source if there is an error.
val create : ?options:string list ‑> ?bands:(int * (_, _) Band.Data.t) ‑> Driver.t ‑> string ‑> (int * int) ‑> [ `Error of [ `Invalid_source ] | `Ok of t ]
create ?options ?bands driver name size
creates a new t with the
given specifications.
(x, y)
dimensions of bands in pixelsval create_exn : ?options:string list ‑> ?bands:(int * (_, _) Band.Data.t) ‑> Driver.t ‑> string ‑> (int * int) ‑> t
Like create except that the function raises Invalid_source if there is an error.
copy ?options ~src ~dst
efficiently copies data from src
to dst
.
Number and dimensions of the included bands must match. The data types of
each band do not need to match.
val set_projection : t ‑> string ‑> unit
set_project t wkt_projection
sets the projection for t
. The projection
string should be in WKT format.
val build_overviews : ?bands:int list ‑> t ‑> int list ‑> string ‑> unit
build_overviews ?bands t factors resampling
builds overviews for t
on
bands bands
using decimation factors factors
with resampling method
resampling
.