@@ -51,7 +51,7 @@ pub struct Gdal {
5151}
5252
5353impl Gdal {
54- /// Create a new `Gdal` instance wrapping the given API reference.
54+ /// Create a `Gdal` wrapper for the given API reference.
5555 pub ( crate ) fn new ( api : & ' static GdalApi ) -> Self {
5656 Self { api }
5757 }
@@ -63,26 +63,21 @@ impl Gdal {
6363 self . api . name ( )
6464 }
6565
66- /// Query GDAL version information.
67- ///
68- /// `request` is one of the standard `GDALVersionInfo` keys:
69- /// - `"RELEASE_NAME"` — e.g. `"3.8.4"`
70- /// - `"VERSION_NUM"` — e.g. `"3080400"`
71- /// - `"BUILD_INFO"` — multi-line build details
66+ /// Fetch GDAL version information for a standard request key.
7267 pub fn version_info ( & self , request : & str ) -> String {
7368 self . api . version_info ( request)
7469 }
7570
7671 // -- Config --------------------------------------------------------------
7772
78- /// Set a GDAL library configuration option with **thread-local** scope .
73+ /// Set a thread-local GDAL configuration option.
7974 pub fn set_thread_local_config_option ( & self , key : & str , value : & str ) -> Result < ( ) > {
8075 config:: set_thread_local_config_option ( self . api , key, value)
8176 }
8277
8378 // -- Driver --------------------------------------------------------------
8479
85- /// Look up a GDAL driver by its short name (e.g. `"GTiff"`, `"MEM"`) .
80+ /// Fetch a GDAL driver by its short name.
8681 pub fn get_driver_by_name ( & self , name : & str ) -> Result < Driver > {
8782 DriverManager :: get_driver_by_name ( self . api , name)
8883 }
@@ -108,21 +103,21 @@ impl Gdal {
108103 )
109104 }
110105
111- /// Open a dataset using a [`DatasetOptions`] struct (georust-compatible convenience) .
106+ /// Open a dataset using a [`DatasetOptions`] struct.
112107 pub fn open_ex_with_options ( & self , path : & str , options : DatasetOptions < ' _ > ) -> Result < Dataset > {
113108 Dataset :: open_ex_with_options ( self . api , path, options)
114109 }
115110
116111 // -- Spatial Reference ---------------------------------------------------
117112
118- /// Create a new [`SpatialRef`] from a WKT string.
113+ /// Create a spatial reference from a WKT string.
119114 pub fn spatial_ref_from_wkt ( & self , wkt : & str ) -> Result < SpatialRef > {
120115 SpatialRef :: from_wkt ( self . api , wkt)
121116 }
122117
123118 // -- VRT -----------------------------------------------------------------
124119
125- /// Create a new empty VRT dataset with the given dimensions .
120+ /// Create an empty VRT dataset with the given raster size .
126121 pub fn create_vrt ( & self , x_size : usize , y_size : usize ) -> Result < VrtDataset > {
127122 VrtDataset :: create ( self . api , x_size, y_size)
128123 }
@@ -141,40 +136,32 @@ impl Gdal {
141136
142137 // -- Vector --------------------------------------------------------------
143138
144- /// Create a new OGR field definition.
139+ /// Create an OGR field definition.
145140 pub fn create_field_defn ( & self , name : & str , field_type : OGRFieldType ) -> Result < FieldDefn > {
146141 FieldDefn :: new ( self . api , name, field_type)
147142 }
148143
149144 // -- VSI (Virtual File System) -------------------------------------------
150145
151- /// Create a new VSI in-memory file from a given buffer .
152- pub fn create_mem_file ( & self , file_name : & str , data : Vec < u8 > ) -> Result < ( ) > {
146+ /// Create a VSI in-memory file from the given bytes .
147+ pub fn create_mem_file ( & self , file_name : & str , data : & [ u8 ] ) -> Result < ( ) > {
153148 vsi:: create_mem_file ( self . api , file_name, data)
154149 }
155150
156- /// Unlink (delete) a VSI in-memory file.
151+ /// Delete a VSI in-memory file.
157152 pub fn unlink_mem_file ( & self , file_name : & str ) -> Result < ( ) > {
158153 vsi:: unlink_mem_file ( self . api , file_name)
159154 }
160155
161- /// Copy the bytes of a VSI in-memory file, taking ownership and freeing the
162- /// GDAL memory.
156+ /// Copy the bytes of a VSI in-memory file, taking ownership of the GDAL buffer.
163157 pub fn get_vsi_mem_file_bytes_owned ( & self , file_name : & str ) -> Result < Vec < u8 > > {
164158 vsi:: get_vsi_mem_file_bytes_owned ( self . api , file_name)
165159 }
166160
167161 // -- Raster operations ---------------------------------------------------
168162
169- /// Create a bare in-memory (MEM) GDAL dataset via `MEMDataset::Create`.
170- ///
171- /// This bypasses GDAL's open-dataset-list mutex for better concurrency.
172- /// The returned dataset has `n_owned_bands` bands of type
173- /// `owned_bands_data_type` whose pixel data is owned by GDAL.
174- ///
175- /// For a higher-level builder that also attaches zero-copy external bands,
176- /// geo-transforms, projections, and nodata values, see
177- /// [`MemDatasetBuilder`].
163+ /// Create a bare in-memory MEM dataset with GDAL-owned bands.
164+ /// For a higher-level builder with external bands and metadata, use `MemDatasetBuilder`.
178165 pub fn create_mem_dataset (
179166 & self ,
180167 width : usize ,
@@ -191,8 +178,7 @@ impl Gdal {
191178 )
192179 }
193180
194- /// Rasterize geometries with an affine transformer derived from the
195- /// destination dataset.
181+ /// Rasterize geometries using the dataset geotransform as the transformer.
196182 pub fn rasterize_affine (
197183 & self ,
198184 dataset : & Dataset ,
@@ -211,7 +197,7 @@ impl Gdal {
211197 )
212198 }
213199
214- /// Rasterize geometries onto a dataset.
200+ /// Rasterize geometries into the selected dataset bands .
215201 pub fn rasterize (
216202 & self ,
217203 dataset : & Dataset ,
0 commit comments