Skip to content

Can add wrapper for GDALAutoCreateWarpedVRT? #549

@z954134

Description

@z954134

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions