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
i use this to change gdal2tiles from python to rust,found no GDALAutoCreateWarpedVRT.
pub fn GDALAutoCreateWarpedVRT(src: &Dataset, wkt1:&str, wkt2: &str) -> GDALDatasetH {
let c_str_1 = CString::new(wkt1).unwrap();
let c_ptr_1: *const c_char = c_str_1.as_ptr();
let c_str_2 = CString::new(wkt2).unwrap();
let c_ptr_2: *const c_char = c_str_2.as_ptr();
let rv = unsafe {
gdal_sys::GDALAutoCreateWarpedVRT(
src.c_dataset(),
c_ptr_1,
c_ptr_2,
GDALResampleAlg::GRA_Bilinear,
0.0,
null_mut(),
)
};
rv
}
but this is unsafe,can add this wrapper?
The text was updated successfully, but these errors were encountered:
i use this to change gdal2tiles from python to rust,found no GDALAutoCreateWarpedVRT.
pub fn GDALAutoCreateWarpedVRT(src: &Dataset, wkt1:&str, wkt2: &str) -> GDALDatasetH {
let c_str_1 = CString::new(wkt1).unwrap();
let c_ptr_1: *const c_char = c_str_1.as_ptr();
let c_str_2 = CString::new(wkt2).unwrap();
let c_ptr_2: *const c_char = c_str_2.as_ptr();
let rv = unsafe {
gdal_sys::GDALAutoCreateWarpedVRT(
src.c_dataset(),
c_ptr_1,
c_ptr_2,
GDALResampleAlg::GRA_Bilinear,
0.0,
null_mut(),
)
};
rv
}
but this is unsafe,can add this wrapper?
The text was updated successfully, but these errors were encountered: