You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let ccall get the pointers using unsafe_convert (#349)
* fix undefined ArchGDAL in tests
* unsafe_convert to Ptr{Cvoid} for all wrapper types
* pass wrapper types to gdal, not pointers
* remove a few more pointer calls
* Reduce scope of for-loop
* Reverse order of nested for-loops
There isn't any logical changes here; just refactoring.
* Using let-block to contain scope of variables
* Pull createlinearring functions out of inner for-loop
They do not follow the patterns for the other geometry types.
* Some bugfixes
Namely (i) to finalize the internal geometries that were cloned and (ii) to appropriately parameterize the geometries returned.
* Remove outdated tests of internal methods
`_infergeomtype(...)` should be operating on pointers and not geometries.
Co-authored-by: Yeesian Ng <[email protected]>
Copy file name to clipboardExpand all lines: src/dataset.jl
+51-51Lines changed: 51 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,8 @@ function copywholeraster!(
28
28
progressdata::Any=C_NULL,
29
29
)::Dwhere {D<:AbstractDataset}
30
30
result = GDAL.gdaldatasetcopywholeraster(
31
-
source.ptr,
32
-
dest.ptr,
31
+
source,
32
+
dest,
33
33
options,
34
34
@cplprogress(progressfunc),
35
35
progressdata,
@@ -98,9 +98,9 @@ function unsafe_copy(
98
98
)::Dataset
99
99
returnDataset(
100
100
GDAL.gdalcreatecopy(
101
-
driver.ptr,
101
+
driver,
102
102
filename,
103
-
dataset.ptr,
103
+
dataset,
104
104
strict,
105
105
options,
106
106
@cplprogress(progressfunc),
@@ -157,9 +157,9 @@ function copy(
157
157
)::IDataset
158
158
returnIDataset(
159
159
GDAL.gdalcreatecopy(
160
-
driver.ptr,
160
+
driver,
161
161
filename,
162
-
dataset.ptr,
162
+
dataset,
163
163
strict,
164
164
options,
165
165
@cplprogress(progressfunc),
@@ -178,21 +178,21 @@ Writes the dataset to the designated filename.
178
178
* `filename`: The filename, UTF-8 encoded.
179
179
180
180
### Keyword Arguments
181
-
* `driver` (ArchGDAL.Driver): The driver to use, you have to manually select the right driver via `getdriver(drivername)` matching the file extension you wish.
181
+
* `driver` (ArchGDAL.Driver): The driver to use, you have to manually select the right driver via `getdriver(drivername)` matching the file extension you wish.
182
182
Otherwise the driver of the source dataset will be used.
183
183
* `options` (Vector{String}): A vector of strings containing KEY=VALUE pairs for driver-specific creation options.
184
184
* `layer_options`: Driver specific options for layer creation. The options can either be a Vector{String} to provide the
185
-
same options for each layer, or a Vector{Vector{String}} to provide individual options per layer, in the order of their
186
-
appearance in the dataset. The strings have to be KEY=VALUE pairs. If you give less individual options than there are layers,
187
-
the remaining layers use the default creation options. An example for two layers:
185
+
same options for each layer, or a Vector{Vector{String}} to provide individual options per layer, in the order of their
186
+
appearance in the dataset. The strings have to be KEY=VALUE pairs. If you give less individual options than there are layers,
187
+
the remaining layers use the default creation options. An example for two layers:
188
188
`[["FORMAT=WKT", "LAUNDER=NO"], ["STRICT=NO"]]`
189
-
* `use_gdal_copy` (Bool): Set this to false (default is true) to achieve higher write speeds at the cost of possible errors.
189
+
* `use_gdal_copy` (Bool): Set this to false (default is true) to achieve higher write speeds at the cost of possible errors.
190
190
Note that when set to true, no coordinate transformations are possible while writing the features.
191
-
* `chunksize` (Integer): Number of features to write in one database transaction. Neglected when `use_gdal_copy` is true.
191
+
* `chunksize` (Integer): Number of features to write in one database transaction. Neglected when `use_gdal_copy` is true.
192
192
Default is 20000.
193
193
* `strict` (Bool): Set this to `true` if the written dataset should be a 1:1 copy of the source data, default is `false`,
0 commit comments