sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
These are bindings and wrappers around the OGR_DS_*
API.
val get_driver_by_name : string -> driver_t option
val get_driver_by_name_exn : string -> driver_t
get_driver_by_name name
returns the driver associated with name
.
copy ?options driver src name
creates a copy of src
using driver
.
val of_source : ?write:bool -> string -> [ `Invalid_source | `Ok of t ]
of_source ?write name
opens the source name
for access.
val of_source_exn : ?write:bool -> string -> t
Like of_source
but raises Invalid_source
if there is an error with the data source.
val destroy : t -> unit
destroy t
releases the resources associated with t
.
val with_source :
?write:bool ->
string ->
(t -> 'a) ->
[ `Invalid_source | `Ok of '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
but raises Invalid_source
if there is an error with the data source.
val get_layer_count : t -> int
get_layer_count src
returns the number of layers in src
.
val create_layer :
?spatial_reference:Spatial_reference.t ->
?geometry_type:Geometry.wkb_t ->
?options:string list ->
t ->
string ->
Layer.t option
create_layer ?spatial_reference ?geometry_type ?options ds name
creates a layer named name
in ds
.
val create_layer_exn :
?spatial_reference:Spatial_reference.t ->
?geometry_type:Geometry.wkb_t ->
?options:string list ->
t ->
string ->
Layer.t
create_layer_exn ?spatial_reference ?geometry_type ?options ds name
is like create_layer
except that it raises Data_source_error
if the layer can not be created.
copy_layer ?options ds src name
copies src
to a layer named name
in ds
.
copy_layer_exn ?options ds src name
is like copy_layer
except that it raises Data_source_error
if the layer can not be copied.