diff --git a/CHANGES.md b/CHANGES.md index e9f7c305..7694df7b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,10 @@ ## Unreleased +- **Breaking**: Drop pre-build bindings for GDAL versions < 2.4. The bindgen feature can be used to generate bindings for older versions. +- Fix memory leaks reported by Valgrind. This required re-generation of the pre-build bindings. + - + - **Breaking**: Implement `TryFrom` instead of `From` to convert from gdal geometries to `geo-types`. This avoids a possible panic on unsupported geometries and returns an error instead. - Add `Feature::c_feature` that returns the OGR feature handle. - diff --git a/gdal-sys/build.rs b/gdal-sys/build.rs index 21d82f62..9c9ebbd5 100644 --- a/gdal-sys/build.rs +++ b/gdal-sys/build.rs @@ -14,6 +14,7 @@ pub fn write_bindings(include_paths: Vec, out_path: &Path) { .constified_enum_module(".*") .ctypes_prefix("libc") .allowlist_function("CPL.*") + .allowlist_function("CSL.*") .allowlist_function("GDAL.*") .allowlist_function("OGR.*") .allowlist_function("OSR.*") diff --git a/gdal-sys/prebuilt-bindings/gdal_1.11.rs b/gdal-sys/prebuilt-bindings/gdal_1.11.rs deleted file mode 100644 index fb404c9b..00000000 --- a/gdal-sys/prebuilt-bindings/gdal_1.11.rs +++ /dev/null @@ -1,8121 +0,0 @@ -/* automatically generated by rust-bindgen */ - -pub type __dev_t = libc::c_ulong; -pub type __uid_t = libc::c_uint; -pub type __gid_t = libc::c_uint; -pub type __ino_t = libc::c_ulong; -pub type __mode_t = libc::c_uint; -pub type __nlink_t = libc::c_ulong; -pub type __off_t = libc::c_long; -pub type __off64_t = libc::c_long; -pub type __time_t = libc::c_long; -pub type __blksize_t = libc::c_long; -pub type __blkcnt_t = libc::c_long; -pub type __syscall_slong_t = libc::c_long; -pub type FILE = _IO_FILE; -pub type va_list = __builtin_va_list; -pub type _IO_lock_t = libc::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_marker { - pub _next: *mut _IO_marker, - pub _sbuf: *mut _IO_FILE, - pub _pos: libc::c_int, -} -#[test] -fn bindgen_test_layout__IO_marker() { - assert_eq!( - ::std::mem::size_of::<_IO_marker>(), - 24usize, - concat!("Size of: ", stringify!(_IO_marker)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_marker>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_marker)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._next as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._sbuf as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_sbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._pos as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_pos) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_FILE { - pub _flags: libc::c_int, - pub _IO_read_ptr: *mut libc::c_char, - pub _IO_read_end: *mut libc::c_char, - pub _IO_read_base: *mut libc::c_char, - pub _IO_write_base: *mut libc::c_char, - pub _IO_write_ptr: *mut libc::c_char, - pub _IO_write_end: *mut libc::c_char, - pub _IO_buf_base: *mut libc::c_char, - pub _IO_buf_end: *mut libc::c_char, - pub _IO_save_base: *mut libc::c_char, - pub _IO_backup_base: *mut libc::c_char, - pub _IO_save_end: *mut libc::c_char, - pub _markers: *mut _IO_marker, - pub _chain: *mut _IO_FILE, - pub _fileno: libc::c_int, - pub _flags2: libc::c_int, - pub _old_offset: __off_t, - pub _cur_column: libc::c_ushort, - pub _vtable_offset: libc::c_schar, - pub _shortbuf: [libc::c_char; 1usize], - pub _lock: *mut _IO_lock_t, - pub _offset: __off64_t, - pub __pad1: *mut libc::c_void, - pub __pad2: *mut libc::c_void, - pub __pad3: *mut libc::c_void, - pub __pad4: *mut libc::c_void, - pub __pad5: usize, - pub _mode: libc::c_int, - pub _unused2: [libc::c_char; 20usize], -} -#[test] -fn bindgen_test_layout__IO_FILE() { - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad1 as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad2 as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad3 as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad4 as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad4) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} -pub type time_t = __time_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __time_t, - pub tv_nsec: __syscall_slong_t, -} -#[test] -fn bindgen_test_layout_timespec() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tm { - pub tm_sec: libc::c_int, - pub tm_min: libc::c_int, - pub tm_hour: libc::c_int, - pub tm_mday: libc::c_int, - pub tm_mon: libc::c_int, - pub tm_year: libc::c_int, - pub tm_wday: libc::c_int, - pub tm_yday: libc::c_int, - pub tm_isdst: libc::c_int, - pub tm_gmtoff: libc::c_long, - pub tm_zone: *const libc::c_char, -} -#[test] -fn bindgen_test_layout_tm() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tm)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_min as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_hour as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_mday as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_mon as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_year as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_wday as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_yday as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_isdst as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_gmtoff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_zone as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) - ); -} -pub type GInt32 = libc::c_int; -pub type GUInt32 = libc::c_uint; -pub type GInt16 = libc::c_short; -pub type GByte = libc::c_uchar; -pub type GIntBig = libc::c_longlong; -pub type GUIntBig = libc::c_ulonglong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stat { - pub st_dev: __dev_t, - pub st_ino: __ino_t, - pub st_nlink: __nlink_t, - pub st_mode: __mode_t, - pub st_uid: __uid_t, - pub st_gid: __gid_t, - pub __pad0: libc::c_int, - pub st_rdev: __dev_t, - pub st_size: __off_t, - pub st_blksize: __blksize_t, - pub st_blocks: __blkcnt_t, - pub st_atim: timespec, - pub st_mtim: timespec, - pub st_ctim: timespec, - pub __glibc_reserved: [__syscall_slong_t; 3usize], -} -#[test] -fn bindgen_test_layout_stat() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(stat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(stat)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_dev as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_dev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_ino as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_ino) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_nlink as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_nlink) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_mode as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_uid as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_uid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_gid as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_gid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__pad0 as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(__pad0) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_rdev as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_rdev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_size as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_blksize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_blksize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_blocks as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_blocks) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_atim as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_atim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_mtim as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_mtim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_ctim as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_ctim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__glibc_reserved as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(__glibc_reserved) - ) - ); -} -extern "C" { - pub fn VSIFOpen(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut FILE; -} -extern "C" { - pub fn VSIFClose(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFSeek(arg1: *mut FILE, arg2: libc::c_long, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn VSIFTell(arg1: *mut FILE) -> libc::c_long; -} -extern "C" { - pub fn VSIRewind(arg1: *mut FILE); -} -extern "C" { - pub fn VSIFFlush(arg1: *mut FILE); -} -extern "C" { - pub fn VSIFRead(arg1: *mut libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) -> usize; -} -extern "C" { - pub fn VSIFWrite(arg1: *const libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) - -> usize; -} -extern "C" { - pub fn VSIFGets( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *mut FILE, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn VSIFPuts(arg1: *const libc::c_char, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPrintf(arg1: *mut FILE, arg2: *const libc::c_char, ...) -> libc::c_int; -} -extern "C" { - pub fn VSIFGetc(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPutc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIUngetc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFEof(arg1: *mut FILE) -> libc::c_int; -} -pub type VSIStatBuf = stat; -extern "C" { - pub fn VSIStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; -} -pub type vsi_l_offset = GUIntBig; -pub type VSILFILE = FILE; -extern "C" { - pub fn VSIFOpenL(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut VSILFILE; -} -extern "C" { - pub fn VSIFCloseL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFSeekL(arg1: *mut VSILFILE, arg2: vsi_l_offset, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn VSIFTellL(arg1: *mut VSILFILE) -> vsi_l_offset; -} -extern "C" { - pub fn VSIRewindL(arg1: *mut VSILFILE); -} -extern "C" { - pub fn VSIFReadL( - arg1: *mut libc::c_void, - arg2: usize, - arg3: usize, - arg4: *mut VSILFILE, - ) -> usize; -} -extern "C" { - pub fn VSIFReadMultiRangeL( - nRanges: libc::c_int, - ppData: *mut *mut libc::c_void, - panOffsets: *const vsi_l_offset, - panSizes: *const usize, - arg1: *mut VSILFILE, - ) -> libc::c_int; -} -extern "C" { - pub fn VSIFWriteL( - arg1: *const libc::c_void, - arg2: usize, - arg3: usize, - arg4: *mut VSILFILE, - ) -> usize; -} -extern "C" { - pub fn VSIFEofL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFTruncateL(arg1: *mut VSILFILE, arg2: vsi_l_offset) -> libc::c_int; -} -extern "C" { - pub fn VSIFFlushL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPrintfL(arg1: *mut VSILFILE, arg2: *const libc::c_char, ...) -> libc::c_int; -} -extern "C" { - pub fn VSIFPutcL(arg1: libc::c_int, arg2: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIIngestFile( - fp: *mut VSILFILE, - pszFilename: *const libc::c_char, - ppabyRet: *mut *mut GByte, - pnSize: *mut vsi_l_offset, - nMaxSize: GIntBig, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stat64 { - _unused: [u8; 0], -} -pub type VSIStatBufL = stat64; -extern "C" { - pub fn VSIStatL(arg1: *const libc::c_char, arg2: *mut VSIStatBufL) -> libc::c_int; -} -extern "C" { - pub fn VSIStatExL( - pszFilename: *const libc::c_char, - psStatBuf: *mut VSIStatBufL, - nFlags: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn VSIIsCaseSensitiveFS(pszFilename: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIFGetNativeFileDescriptorL(arg1: *mut VSILFILE) -> *mut libc::c_void; -} -extern "C" { - pub fn VSICalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIFree(arg1: *mut libc::c_void); -} -extern "C" { - pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - /// VSIMalloc2 allocates (nSize1 * nSize2) bytes. - /// In case of overflow of the multiplication, or if memory allocation fails, a - /// NULL pointer is returned and a CE_Failure error is raised with CPLError(). - /// If nSize1 == 0 || nSize2 == 0, a NULL pointer will also be returned. - /// CPLFree() or VSIFree() can be used to free memory allocated by this function. - pub fn VSIMalloc2(nSize1: usize, nSize2: usize) -> *mut libc::c_void; -} -extern "C" { - /// VSIMalloc3 allocates (nSize1 * nSize2 * nSize3) bytes. - /// In case of overflow of the multiplication, or if memory allocation fails, a - /// NULL pointer is returned and a CE_Failure error is raised with CPLError(). - /// If nSize1 == 0 || nSize2 == 0 || nSize3 == 0, a NULL pointer will also be returned. - /// CPLFree() or VSIFree() can be used to free memory allocated by this function. - pub fn VSIMalloc3(nSize1: usize, nSize2: usize, nSize3: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIReadDir(arg1: *const libc::c_char) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn VSIReadDirRecursive(pszPath: *const libc::c_char) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn VSIMkdir(pathname: *const libc::c_char, mode: libc::c_long) -> libc::c_int; -} -extern "C" { - pub fn VSIRmdir(pathname: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIUnlink(pathname: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIRename(oldpath: *const libc::c_char, newpath: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIStrerror(arg1: libc::c_int) -> *mut libc::c_char; -} -extern "C" { - pub fn VSIInstallMemFileHandler(); -} -extern "C" { - pub fn VSIInstallLargeFileHandler(); -} -extern "C" { - pub fn VSIInstallSubFileHandler(); -} -extern "C" { - pub fn VSIInstallCurlFileHandler(); -} -extern "C" { - pub fn VSIInstallCurlStreamingFileHandler(); -} -extern "C" { - pub fn VSIInstallGZipFileHandler(); -} -extern "C" { - pub fn VSIInstallZipFileHandler(); -} -extern "C" { - pub fn VSIInstallStdinHandler(); -} -extern "C" { - pub fn VSIInstallStdoutHandler(); -} -extern "C" { - pub fn VSIInstallSparseFileHandler(); -} -extern "C" { - pub fn VSIInstallTarFileHandler(); -} -extern "C" { - pub fn VSICleanupFileManager(); -} -extern "C" { - pub fn VSIFileFromMemBuffer( - pszFilename: *const libc::c_char, - pabyData: *mut GByte, - nDataLength: vsi_l_offset, - bTakeOwnership: libc::c_int, - ) -> *mut VSILFILE; -} -extern "C" { - pub fn VSIGetMemFileBuffer( - pszFilename: *const libc::c_char, - pnDataLength: *mut vsi_l_offset, - bUnlinkAndSeize: libc::c_int, - ) -> *mut GByte; -} -extern "C" { - pub fn VSITime(arg1: *mut libc::c_ulong) -> libc::c_ulong; -} -extern "C" { - pub fn VSICTime(arg1: libc::c_ulong) -> *const libc::c_char; -} -extern "C" { - pub fn VSIGMTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; -} -extern "C" { - pub fn VSILocalTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; -} -pub mod CPLErr { - /// \file cpl_error.h - /// - /// CPL error handling services. - pub type Type = u32; - pub const CE_None: Type = 0; - pub const CE_Debug: Type = 1; - pub const CE_Warning: Type = 2; - pub const CE_Failure: Type = 3; - pub const CE_Fatal: Type = 4; -} -extern "C" { - pub fn CPLError(eErrClass: CPLErr::Type, err_no: libc::c_int, fmt: *const libc::c_char, ...); -} -extern "C" { - pub fn CPLErrorV( - arg1: CPLErr::Type, - arg2: libc::c_int, - arg3: *const libc::c_char, - arg4: *mut __va_list_tag, - ); -} -extern "C" { - pub fn CPLEmergencyError(arg1: *const libc::c_char); -} -extern "C" { - pub fn CPLErrorReset(); -} -extern "C" { - pub fn CPLGetLastErrorNo() -> libc::c_int; -} -extern "C" { - pub fn CPLGetLastErrorType() -> CPLErr::Type; -} -extern "C" { - pub fn CPLGetLastErrorMsg() -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetErrorHandlerUserData() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCleanupErrorMutex(); -} -pub type CPLErrorHandler = ::std::option::Option< - unsafe extern "C" fn(arg1: CPLErr::Type, arg2: libc::c_int, arg3: *const libc::c_char), ->; -extern "C" { - pub fn CPLLoggingErrorHandler(arg1: CPLErr::Type, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLDefaultErrorHandler(arg1: CPLErr::Type, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLQuietErrorHandler(arg1: CPLErr::Type, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLTurnFailureIntoWarning(bOn: libc::c_int); -} -extern "C" { - pub fn CPLSetErrorHandler(arg1: CPLErrorHandler) -> CPLErrorHandler; -} -extern "C" { - pub fn CPLSetErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void) -> CPLErrorHandler; -} -extern "C" { - pub fn CPLPushErrorHandler(arg1: CPLErrorHandler); -} -extern "C" { - pub fn CPLPushErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void); -} -extern "C" { - pub fn CPLPopErrorHandler(); -} -extern "C" { - pub fn CPLDebug(arg1: *const libc::c_char, arg2: *const libc::c_char, ...); -} -extern "C" { - /// \file cpl_conv.h - /// - /// Various convenience functions for CPL. - /// - pub fn CPLVerifyConfiguration(); -} -extern "C" { - pub fn CPLGetConfigOption( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLSetConfigOption(arg1: *const libc::c_char, arg2: *const libc::c_char); -} -extern "C" { - pub fn CPLSetThreadLocalConfigOption( - pszKey: *const libc::c_char, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn CPLFreeConfig(); -} -extern "C" { - pub fn CPLMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLStrlwr(arg1: *mut libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLFGets( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *mut FILE, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLReadLine(arg1: *mut FILE) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLineL(arg1: *mut VSILFILE) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLine2L( - arg1: *mut VSILFILE, - nMaxCols: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLAtof(arg1: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLAtofDelim(arg1: *const libc::c_char, arg2: libc::c_char) -> f64; -} -extern "C" { - pub fn CPLStrtod(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn CPLStrtodDelim( - arg1: *const libc::c_char, - arg2: *mut *mut libc::c_char, - arg3: libc::c_char, - ) -> f64; -} -extern "C" { - pub fn CPLStrtof(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f32; -} -extern "C" { - pub fn CPLStrtofDelim( - arg1: *const libc::c_char, - arg2: *mut *mut libc::c_char, - arg3: libc::c_char, - ) -> f32; -} -extern "C" { - pub fn CPLAtofM(arg1: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLScanString( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLScanDouble(arg1: *const libc::c_char, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn CPLScanLong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_long; -} -extern "C" { - pub fn CPLScanULong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_ulong; -} -extern "C" { - pub fn CPLScanUIntBig(arg1: *const libc::c_char, arg2: libc::c_int) -> GUIntBig; -} -extern "C" { - pub fn CPLScanPointer(arg1: *const libc::c_char, arg2: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLPrintString( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintStringFill( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintInt32(arg1: *mut libc::c_char, arg2: GInt32, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintUIntBig( - arg1: *mut libc::c_char, - arg2: GUIntBig, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintDouble( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: f64, - arg4: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintTime( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *const libc::c_char, - arg4: *const tm, - arg5: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintPointer( - arg1: *mut libc::c_char, - arg2: *mut libc::c_void, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLGetSymbol(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLGetExecPath(pszPathBuf: *mut libc::c_char, nMaxLength: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn CPLGetPath(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetDirname(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetFilename(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetBasename(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetExtension(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetCurrentDir() -> *mut libc::c_char; -} -extern "C" { - pub fn CPLFormFilename( - pszPath: *const libc::c_char, - pszBasename: *const libc::c_char, - pszExtension: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLFormCIFilename( - pszPath: *const libc::c_char, - pszBasename: *const libc::c_char, - pszExtension: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLResetExtension( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLProjectRelativeFilename( - pszProjectDir: *const libc::c_char, - pszSecondaryFilename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLIsFilenameRelative(pszFilename: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn CPLExtractRelativePath( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCleanTrailingSlash(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCorrespondingPaths( - pszOldFilename: *const libc::c_char, - pszNewFilename: *const libc::c_char, - papszFileList: *mut *mut libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn CPLCheckForFile( - pszFilename: *mut libc::c_char, - papszSiblingList: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLGenerateTempFilename(pszStem: *const libc::c_char) -> *const libc::c_char; -} -pub type CPLFileFinder = ::std::option::Option< - unsafe extern "C" fn(arg1: *const libc::c_char, arg2: *const libc::c_char) - -> *const libc::c_char, ->; -extern "C" { - pub fn CPLFindFile( - pszClass: *const libc::c_char, - pszBasename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLDefaultFindFile( - pszClass: *const libc::c_char, - pszBasename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLPushFileFinder(pfnFinder: CPLFileFinder); -} -extern "C" { - pub fn CPLPopFileFinder() -> CPLFileFinder; -} -extern "C" { - pub fn CPLPushFinderLocation(arg1: *const libc::c_char); -} -extern "C" { - pub fn CPLPopFinderLocation(); -} -extern "C" { - pub fn CPLFinderClean(); -} -extern "C" { - pub fn CPLStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLSharedFileInfo { - pub fp: *mut FILE, - pub nRefCount: libc::c_int, - pub bLarge: libc::c_int, - pub pszFilename: *mut libc::c_char, - pub pszAccess: *mut libc::c_char, -} -#[test] -fn bindgen_test_layout_CPLSharedFileInfo() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLSharedFileInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLSharedFileInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(fp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nRefCount as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(nRefCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bLarge as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(bLarge) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszFilename as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(pszFilename) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAccess as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(pszAccess) - ) - ); -} -extern "C" { - pub fn CPLOpenShared( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *mut FILE; -} -extern "C" { - pub fn CPLCloseShared(arg1: *mut FILE); -} -extern "C" { - pub fn CPLGetSharedList(arg1: *mut libc::c_int) -> *mut CPLSharedFileInfo; -} -extern "C" { - pub fn CPLDumpSharedList(arg1: *mut FILE); -} -extern "C" { - pub fn CPLCleanupSharedFileMutex(); -} -extern "C" { - pub fn CPLDMSToDec(is: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLDecToDMS( - dfAngle: f64, - pszAxis: *const libc::c_char, - nPrecision: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLPackedDMSToDec(arg1: f64) -> f64; -} -extern "C" { - pub fn CPLDecToPackedDMS(dfDec: f64) -> f64; -} -extern "C" { - pub fn CPLStringToComplex(pszString: *const libc::c_char, pdfReal: *mut f64, pdfImag: *mut f64); -} -extern "C" { - pub fn CPLUnlinkTree(arg1: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn CPLCopyFile( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLMoveFile( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLCreateZip( - pszZipFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateFileInZip( - hZip: *mut libc::c_void, - pszFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn CPLWriteFileInZip( - hZip: *mut libc::c_void, - pBuffer: *const libc::c_void, - nBufferSize: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn CPLCloseFileInZip(hZip: *mut libc::c_void) -> CPLErr::Type; -} -extern "C" { - pub fn CPLCloseZip(hZip: *mut libc::c_void) -> CPLErr::Type; -} -extern "C" { - pub fn CPLZLibDeflate( - ptr: *const libc::c_void, - nBytes: usize, - nLevel: libc::c_int, - outptr: *mut libc::c_void, - nOutAvailableBytes: usize, - pnOutBytes: *mut usize, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLZLibInflate( - ptr: *const libc::c_void, - nBytes: usize, - outptr: *mut libc::c_void, - nOutAvailableBytes: usize, - pnOutBytes: *mut usize, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLValidateXML( - pszXMLFilename: *const libc::c_char, - pszXSDFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLsetlocale(category: libc::c_int, locale: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLCleanupSetlocaleMutex(); -} -pub type GDALProgressFunc = ::std::option::Option< - unsafe extern "C" fn( - dfComplete: f64, - pszMessage: *const libc::c_char, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALDummyProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTermProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALScaledProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateScaledProgress( - arg1: f64, - arg2: f64, - arg3: GDALProgressFunc, - arg4: *mut libc::c_void, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyScaledProgress(arg1: *mut libc::c_void); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLVirtualMem { - _unused: [u8; 0], -} -/// Callback triggered when a still unmapped page of virtual memory is accessed. -/// The callback has the responsibility of filling the page with relevant values -/// -/// @param ctxt virtual memory handle. -/// @param nOffset offset of the page in the memory mapping. -/// @param pPageToFill address of the page to fill. Note that the address might -/// be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset. -/// @param nToFill number of bytes of the page. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToFill: *mut libc::c_void, - nToFill: usize, - pUserData: *mut libc::c_void, - ), ->; -/// Callback triggered when a dirty mapped page is going to be freed. -/// (saturation of cache, or termination of the virtual memory mapping). -/// -/// @param ctxt virtual memory handle. -/// @param nOffset offset of the page in the memory mapping. -/// @param pPageToBeEvicted address of the page that will be flushed. Note that the address might -/// be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset. -/// @param nToBeEvicted number of bytes of the page. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToBeEvicted: *const libc::c_void, - nToBeEvicted: usize, - pUserData: *mut libc::c_void, - ), ->; -/// Callback triggered when a virtual memory mapping is destroyed. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemFreeUserData = - ::std::option::Option; -pub mod CPLVirtualMemAccessMode { - /// Access mode of a virtual memory mapping. - pub type Type = u32; - /// The mapping is meant at being read-only, but writes will not be prevented. - /// Note that any content written will be lost. - pub const VIRTUALMEM_READONLY: Type = 0; - /// The mapping is meant at being read-only, and this will be enforced - /// through the operating system page protection mechanism. - pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; - /// The mapping is meant at being read-write, and modified pages can be saved - /// thanks to the pfnUnCachePage callback - pub const VIRTUALMEM_READWRITE: Type = 2; -} -extern "C" { - /// Return the size of a page of virtual memory. - /// - /// @return the page size. - /// - /// @since GDAL 2.0 - pub fn CPLGetPageSize() -> usize; -} -extern "C" { - /// Create a new virtual memory mapping. - /// - /// This will reserve an area of virtual memory of size nSize, whose size - /// might be potentially much larger than the physical memory available. Initially, - /// no physical memory will be allocated. As soon as memory pages will be accessed, - /// they will be allocated transparently and filled with the pfnCachePage callback. - /// When the allowed cache size is reached, the least recently used pages will - /// be unallocated. - /// - /// On Linux AMD64 platforms, the maximum value for nSize is 128 TB. - /// On Linux x86 platforms, the maximum value for nSize is 2 GB. - /// - /// Only supported on Linux for now. - /// - /// Note that on Linux, this function will install a SIGSEGV handler. The - /// original handler will be restored by CPLVirtualMemManagerTerminate(). - /// - /// @param nSize size in bytes of the virtual memory mapping. - /// @param nCacheSize size in bytes of the maximum memory that will be really - /// allocated (must ideally fit into RAM). - /// @param nPageSizeHint hint for the page size. Must be a multiple of the - /// system page size, returned by CPLGetPageSize(). - /// Minimum value is generally 4096. Might be set to 0 to - /// let the function determine a default page size. - /// @param bSingleThreadUsage set to TRUE if there will be no concurrent threads - /// that will access the virtual memory mapping. This can - /// optimize performance a bit. - /// @param eAccessMode permission to use for the virtual memory mapping. - /// @param pfnCachePage callback triggered when a still unmapped page of virtual - /// memory is accessed. The callback has the responsibility - /// of filling the page with relevant values. - /// @param pfnUnCachePage callback triggered when a dirty mapped page is going to - /// be freed (saturation of cache, or termination of the - /// virtual memory mapping). Might be NULL. - /// @param pfnFreeUserData callback that can be used to free pCbkUserData. Might be - /// NULL - /// @param pCbkUserData user data passed to pfnCachePage and pfnUnCachePage. - /// - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemNew( - nSize: usize, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnCachePage: CPLVirtualMemCachePageCbk, - pfnUnCachePage: CPLVirtualMemUnCachePageCbk, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Return if virtual memory mapping of a file is available. - /// - /// @return TRUE if virtual memory mapping of a file is available. - /// @since GDAL 2.0 - pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; -} -extern "C" { - /// Create a new virtual memory mapping from a file. - /// - /// The file must be a "real" file recognized by the operating system, and not - /// a VSI extended virtual file. - /// - /// In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written - /// in the file. - /// - /// On Linux AMD64 platforms, the maximum value for nLength is 128 TB. - /// On Linux x86 platforms, the maximum value for nLength is 2 GB. - /// - /// Only supported on Linux for now. - /// - /// @param fp Virtual file handle. - /// @param nOffset Offset in the file to start the mapping from. - /// @param nLength Length of the portion of the file to map into memory. - /// @param eAccessMode Permission to use for the virtual memory mapping. This must - /// be consistant with how the file has been opened. - /// @param pfnFreeUserData callback that is called when the object is destroyed. - /// @param pCbkUserData user data passed to pfnFreeUserData. - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemFileMapNew( - fp: *mut VSILFILE, - nOffset: vsi_l_offset, - nLength: vsi_l_offset, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Create a new virtual memory mapping derived from an other virtual memory - /// mapping. - /// - /// This may be usefull in case of creating mapping for pixel interleaved data. - /// - /// The new mapping takes a reference on the base mapping. - /// - /// @param pVMemBase Base virtual memory mapping - /// @param nOffset Offset in the base virtual memory mapping from which to start - /// the new mapping. - /// @param nSize Size of the base virtual memory mapping to expose in the - /// the new mapping. - /// @param pfnFreeUserData callback that is called when the object is destroyed. - /// @param pCbkUserData user data passed to pfnFreeUserData. - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemDerivedNew( - pVMemBase: *mut CPLVirtualMem, - nOffset: vsi_l_offset, - nSize: vsi_l_offset, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Free a virtual memory mapping. - /// - /// The pointer returned by CPLVirtualMemGetAddr() will no longer be valid. - /// If the virtual memory mapping was created with read/write permissions and that - /// they are dirty (i.e. modified) pages, they will be flushed through the - /// pfnUnCachePage callback before being freed. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Return the pointer to the start of a virtual memory mapping. - /// - /// The bytes in the range [p:p+CPLVirtualMemGetSize()-1] where p is the pointer - /// returned by this function will be valid, until CPLVirtualMemFree() is called. - /// - /// Note that if a range of bytes used as an argument of a system call - /// (such as read() or write()) contains pages that have not been "realized", the - /// system call will fail with EFAULT. CPLVirtualMemPin() can be used to work - /// around this issue. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the pointer to the start of a virtual memory mapping. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; -} -extern "C" { - /// Return the size of the virtual memory mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the size of the virtual memory mapping. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; -} -extern "C" { - /// Return if the virtal memory mapping is a direct file mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return TRUE if the virtal memory mapping is a direct file mapping. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; -} -extern "C" { - /// Return the access mode of the virtual memory mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the access mode of the virtual memory mapping. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; -} -extern "C" { - /// Return the page size associated to a virtual memory mapping. - /// - /// The value returned will be at least CPLGetPageSize(), but potentially - /// larger. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the page size - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; -} -extern "C" { - /// Return TRUE if this memory mapping can be accessed safely from concurrent - /// threads. - /// - /// The situation that can cause problems is when several threads try to access - /// a page of the mapping that is not yet mapped. - /// - /// The return value of this function depends on whether bSingleThreadUsage has - /// been set of not in CPLVirtualMemNew() and/or the implementation. - /// - /// On Linux, this will always return TRUE if bSingleThreadUsage = FALSE. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return TRUE if this memory mapping can be accessed safely from concurrent - /// threads. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; -} -extern "C" { - /// Declare that a thread will access a virtual memory mapping. - /// - /// This function must be called by a thread that wants to access the - /// content of a virtual memory mapping, except if the virtual memory mapping has - /// been created with bSingleThreadUsage = TRUE. - /// - /// This function must be paired with CPLVirtualMemUnDeclareThread(). - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Declare that a thread will stop accessing a virtual memory mapping. - /// - /// This function must be called by a thread that will no longer access the - /// content of a virtual memory mapping, except if the virtual memory mapping has - /// been created with bSingleThreadUsage = TRUE. - /// - /// This function must be paired with CPLVirtualMemDeclareThread(). - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Make sure that a region of virtual memory will be realized. - /// - /// Calling this function is not required, but might be usefull when debugging - /// a process with tools like gdb or valgrind that do not naturally like - /// segmentation fault signals. - /// - /// It is also needed when wanting to provide part of virtual memory mapping - /// to a system call such as read() or write(). If read() or write() is called - /// on a memory region not yet realized, the call will fail with EFAULT. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @param pAddr the memory region to pin. - /// @param nSize the size of the memory region. - /// @param bWriteOp set to TRUE if the memory are will be accessed in write mode. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemPin( - ctxt: *mut CPLVirtualMem, - pAddr: *mut libc::c_void, - nSize: usize, - bWriteOp: libc::c_int, - ); -} -extern "C" { - /// Cleanup any resource and handlers related to virtual memory. - /// - /// This function must be called after the last CPLVirtualMem object has - /// been freed. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemManagerTerminate(); -} -pub mod GDALDataType { - /// Pixel data types - pub type Type = u32; - /// Unknown or unspecified type - pub const GDT_Unknown: Type = 0; - /// Eight bit unsigned integer - pub const GDT_Byte: Type = 1; - /// Sixteen bit unsigned integer - pub const GDT_UInt16: Type = 2; - /// Sixteen bit signed integer - pub const GDT_Int16: Type = 3; - /// Thirty two bit unsigned integer - pub const GDT_UInt32: Type = 4; - /// Thirty two bit signed integer - pub const GDT_Int32: Type = 5; - /// Thirty two bit floating point - pub const GDT_Float32: Type = 6; - /// Sixty four bit floating point - pub const GDT_Float64: Type = 7; - /// Complex Int16 - pub const GDT_CInt16: Type = 8; - /// Complex Int32 - pub const GDT_CInt32: Type = 9; - /// Complex Float32 - pub const GDT_CFloat32: Type = 10; - /// Complex Float64 - pub const GDT_CFloat64: Type = 11; - /// Complex Float64 - pub const GDT_TypeCount: Type = 12; -} -extern "C" { - pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; -} -extern "C" { - pub fn GDALDataTypeUnion( - arg1: GDALDataType::Type, - arg2: GDALDataType::Type, - ) -> GDALDataType::Type; -} -pub mod GDALAsyncStatusType { - /// status of the asynchronous stream - pub type Type = u32; - pub const GARIO_PENDING: Type = 0; - pub const GARIO_UPDATE: Type = 1; - pub const GARIO_ERROR: Type = 2; - pub const GARIO_COMPLETE: Type = 3; - pub const GARIO_TypeCount: Type = 4; -} -extern "C" { - pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; -} -pub mod GDALAccess { - /// Flag indicating read/write, or read-only access to data. - pub type Type = u32; - /// Read only (no update) access - pub const GA_ReadOnly: Type = 0; - /// Read/write access. - pub const GA_Update: Type = 1; -} -pub mod GDALRWFlag { - /// Read/Write flag for RasterIO() method - pub type Type = u32; - /// Read data - pub const GF_Read: Type = 0; - /// Write data - pub const GF_Write: Type = 1; -} -pub mod GDALColorInterp { - /// Types of color interpretation for raster bands. - pub type Type = u32; - pub const GCI_Undefined: Type = 0; - /// Greyscale - pub const GCI_GrayIndex: Type = 1; - /// Paletted (see associated color table) - pub const GCI_PaletteIndex: Type = 2; - /// Red band of RGBA image - pub const GCI_RedBand: Type = 3; - /// Green band of RGBA image - pub const GCI_GreenBand: Type = 4; - /// Blue band of RGBA image - pub const GCI_BlueBand: Type = 5; - /// Alpha (0=transparent, 255=opaque) - pub const GCI_AlphaBand: Type = 6; - /// Hue band of HLS image - pub const GCI_HueBand: Type = 7; - /// Saturation band of HLS image - pub const GCI_SaturationBand: Type = 8; - /// Lightness band of HLS image - pub const GCI_LightnessBand: Type = 9; - /// Cyan band of CMYK image - pub const GCI_CyanBand: Type = 10; - /// Magenta band of CMYK image - pub const GCI_MagentaBand: Type = 11; - /// Yellow band of CMYK image - pub const GCI_YellowBand: Type = 12; - /// Black band of CMLY image - pub const GCI_BlackBand: Type = 13; - /// Y Luminance - pub const GCI_YCbCr_YBand: Type = 14; - /// Cb Chroma - pub const GCI_YCbCr_CbBand: Type = 15; - /// Cr Chroma - pub const GCI_YCbCr_CrBand: Type = 16; - /// Max current value - pub const GCI_Max: Type = 16; -} -extern "C" { - pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; -} -pub mod GDALPaletteInterp { - /// Types of color interpretations for a GDALColorTable. - pub type Type = u32; - /// Grayscale (in GDALColorEntry.c1) - pub const GPI_Gray: Type = 0; - /// Red, Green, Blue and Alpha in (in c1, c2, c3 and c4) - pub const GPI_RGB: Type = 1; - /// Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4) - pub const GPI_CMYK: Type = 2; - /// Hue, Lightness and Saturation (in c1, c2, and c3) - pub const GPI_HLS: Type = 3; -} -extern "C" { - pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; -} -/// Opaque type used for the C bindings of the C++ GDALMajorObject class -pub type GDALMajorObjectH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALDataset class -pub type GDALDatasetH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALRasterBand class -pub type GDALRasterBandH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALDriver class -pub type GDALDriverH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALColorTable class -pub type GDALColorTableH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class -pub type GDALRasterAttributeTableH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALAsyncReader class -pub type GDALAsyncReaderH = *mut libc::c_void; -extern "C" { - pub fn GDALAllRegister(); -} -extern "C" { - pub fn GDALCreate( - hDriver: GDALDriverH, - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: GDALDataType::Type, - arg6: *mut *mut libc::c_char, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALCreateCopy( - arg1: GDALDriverH, - arg2: *const libc::c_char, - arg3: GDALDatasetH, - arg4: libc::c_int, - arg5: *mut *mut libc::c_char, - arg6: GDALProgressFunc, - arg7: *mut libc::c_void, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALIdentifyDriver( - pszFilename: *const libc::c_char, - papszFileList: *mut *mut libc::c_char, - ) -> GDALDriverH; -} -extern "C" { - pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; -} -extern "C" { - pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; -} -extern "C" { - pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; -} -extern "C" { - pub fn GDALGetDriverCount() -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; -} -extern "C" { - pub fn GDALDestroyDriver(arg1: GDALDriverH); -} -extern "C" { - pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; -} -extern "C" { - pub fn GDALDeregisterDriver(arg1: GDALDriverH); -} -extern "C" { - pub fn GDALDestroyDriverManager(); -} -extern "C" { - pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRenameDataset( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALCopyDatasetFiles( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALValidateCreationOptions( - arg1: GDALDriverH, - papszCreationOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; -} -/// Ground Control Point -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDAL_GCP { - /// Unique identifier, often numeric - pub pszId: *mut libc::c_char, - /// Informational message or "" - pub pszInfo: *mut libc::c_char, - /// Pixel (x) location of GCP on raster - pub dfGCPPixel: f64, - /// Line (y) location of GCP on raster - pub dfGCPLine: f64, - /// X position of GCP in georeferenced space - pub dfGCPX: f64, - /// Y position of GCP in georeferenced space - pub dfGCPY: f64, - /// Elevation of GCP, or zero if not known - pub dfGCPZ: f64, -} -#[test] -fn bindgen_test_layout_GDAL_GCP() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(GDAL_GCP)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDAL_GCP)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszId) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszInfo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPPixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPLine) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPZ) - ) - ); -} -extern "C" { - pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); -} -extern "C" { - pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); -} -extern "C" { - pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; -} -extern "C" { - pub fn GDALGCPsToGeoTransform( - nGCPCount: libc::c_int, - pasGCPs: *const GDAL_GCP, - padfGeoTransform: *mut f64, - bApproxOK: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALInvGeoTransform( - padfGeoTransformIn: *mut f64, - padfInvGeoTransformOut: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALApplyGeoTransform( - arg1: *mut f64, - arg2: f64, - arg3: f64, - arg4: *mut f64, - arg5: *mut f64, - ); -} -extern "C" { - pub fn GDALComposeGeoTransforms( - padfGeoTransform1: *const f64, - padfGeoTransform2: *const f64, - padfGeoTransformOut: *mut f64, - ); -} -extern "C" { - pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALGetMetadata( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALSetMetadata( - arg1: GDALMajorObjectH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); -} -extern "C" { - pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; -} -extern "C" { - pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALClose(arg1: GDALDatasetH); -} -extern "C" { - pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALAddBand( - hDS: GDALDatasetH, - eType: GDALDataType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALBeginAsyncReader( - hDS: GDALDatasetH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - pBuf: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> GDALAsyncReaderH; -} -extern "C" { - pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); -} -extern "C" { - pub fn GDALDatasetRasterIO( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetAdviseRead( - hDS: GDALDatasetH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; -} -extern "C" { - pub fn GDALSetGCPs( - arg1: GDALDatasetH, - arg2: libc::c_int, - arg3: *const GDAL_GCP, - arg4: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetInternalHandle( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALBuildOverviews( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: libc::c_int, - arg4: *mut libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_int, - arg7: GDALProgressFunc, - arg8: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); -} -extern "C" { - pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALFlushCache(hDS: GDALDatasetH); -} -extern "C" { - pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetCopyWholeRaster( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterBandCopyWholeRaster( - hSrcBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRegenerateOverviews( - hSrcBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviewBands: *mut GDALRasterBandH, - pszResampling: *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub type GDALDerivedPixelFunc = ::std::option::Option< - unsafe extern "C" fn( - papoSources: *mut *mut libc::c_void, - nSources: libc::c_int, - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eSrcType: GDALDataType::Type, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type, ->; -extern "C" { - pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; -} -extern "C" { - pub fn GDALGetBlockSize( - arg1: GDALRasterBandH, - pnXSize: *mut libc::c_int, - pnYSize: *mut libc::c_int, - ); -} -extern "C" { - pub fn GDALRasterAdviseRead( - hRB: GDALRasterBandH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterIO( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALReadBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWriteBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; -} -extern "C" { - pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; -} -extern "C" { - pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; -} -extern "C" { - pub fn GDALSetRasterColorInterpretation( - arg1: GDALRasterBandH, - arg2: GDALColorInterp::Type, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; -} -extern "C" { - pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALSetRasterCategoryNames( - arg1: GDALRasterBandH, - arg2: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALGetRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - bForce: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetRasterStatistics( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - dfMean: f64, - dfStdDev: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetRasterUnitType( - hBand: GDALRasterBandH, - pszNewValue: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeRasterMinMax( - hBand: GDALRasterBandH, - bApproxOK: libc::c_int, - adfMinMax: *mut f64, - ); -} -extern "C" { - pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultHistogram( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut libc::c_int, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetDefaultHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRandomRasterSample( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: *mut f32, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) - -> GDALRasterBandH; -} -extern "C" { - pub fn GDALFillRaster( - hBand: GDALRasterBandH, - dfRealValue: f64, - dfImaginaryValue: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeBandStats( - hBand: GDALRasterBandH, - nSampleStep: libc::c_int, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALOverviewMagnitudeCorrection( - hBaseBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviews: *mut GDALRasterBandH, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALSetDefaultRAT( - arg1: GDALRasterBandH, - arg2: GDALRasterAttributeTableH, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALAddDerivedBandPixelFunc( - pszName: *const libc::c_char, - pfnPixelFunc: GDALDerivedPixelFunc, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; -} -extern "C" { - pub fn GDALARGetNextUpdatedRegion( - hARIO: GDALAsyncReaderH, - dfTimeout: f64, - pnXBufOff: *mut libc::c_int, - pnYBufOff: *mut libc::c_int, - pnXBufSize: *mut libc::c_int, - pnYBufSize: *mut libc::c_int, - ) -> GDALAsyncStatusType::Type; -} -extern "C" { - pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; -} -extern "C" { - pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); -} -extern "C" { - pub fn GDALGeneralCmdLineProcessor( - nArgc: libc::c_int, - ppapszArgv: *mut *mut *mut libc::c_char, - nOptions: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSwapWords( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: libc::c_int, - nWordSkip: libc::c_int, - ); -} -extern "C" { - pub fn GDALCopyWords( - pSrcData: *mut libc::c_void, - eSrcType: GDALDataType::Type, - nSrcPixelOffset: libc::c_int, - pDstData: *mut libc::c_void, - eDstType: GDALDataType::Type, - nDstPixelOffset: libc::c_int, - nWordCount: libc::c_int, - ); -} -extern "C" { - pub fn GDALCopyBits( - pabySrcData: *const GByte, - nSrcOffset: libc::c_int, - nSrcStep: libc::c_int, - pabyDstData: *mut GByte, - nDstOffset: libc::c_int, - nDstStep: libc::c_int, - nBitCount: libc::c_int, - nStepCount: libc::c_int, - ); -} -extern "C" { - pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; -} -extern "C" { - pub fn GDALReadWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALWriteWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALLoadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALReadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALLoadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALReadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALLoadRPBFile( - pszFilename: *const libc::c_char, - papszSiblingFiles: *mut *mut libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALLoadRPCFile( - pszFilename: *const libc::c_char, - papszSiblingFiles: *mut *mut libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALWriteRPBFile( - pszFilename: *const libc::c_char, - papszMD: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALLoadIMDFile( - pszFilename: *const libc::c_char, - papszSiblingFiles: *mut *mut libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALWriteIMDFile( - pszFilename: *const libc::c_char, - papszMD: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDecToDMS( - arg1: f64, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALPackedDMSToDec(arg1: f64) -> f64; -} -extern "C" { - pub fn GDALDecToPackedDMS(arg1: f64) -> f64; -} -extern "C" { - pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn GDALCheckVersion( - nVersionMajor: libc::c_int, - nVersionMinor: libc::c_int, - pszCallingComponentName: *const libc::c_char, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRPCInfo { - pub dfLINE_OFF: f64, - pub dfSAMP_OFF: f64, - pub dfLAT_OFF: f64, - pub dfLONG_OFF: f64, - pub dfHEIGHT_OFF: f64, - pub dfLINE_SCALE: f64, - pub dfSAMP_SCALE: f64, - pub dfLAT_SCALE: f64, - pub dfLONG_SCALE: f64, - pub dfHEIGHT_SCALE: f64, - pub adfLINE_NUM_COEFF: [f64; 20usize], - pub adfLINE_DEN_COEFF: [f64; 20usize], - pub adfSAMP_NUM_COEFF: [f64; 20usize], - pub adfSAMP_DEN_COEFF: [f64; 20usize], - pub dfMIN_LONG: f64, - pub dfMIN_LAT: f64, - pub dfMAX_LONG: f64, - pub dfMAX_LAT: f64, -} -#[test] -fn bindgen_test_layout_GDALRPCInfo() { - assert_eq!( - ::std::mem::size_of::(), - 752usize, - concat!("Size of: ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LAT) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, - 744usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LAT) - ) - ); -} -extern "C" { - pub fn GDALExtractRPCInfo(arg1: *mut *mut libc::c_char, arg2: *mut GDALRPCInfo) -> libc::c_int; -} -/// Color tuple -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALColorEntry { - /// gray, red, cyan or hue - pub c1: libc::c_short, - /// green, magenta, or lightness - pub c2: libc::c_short, - /// blue, yellow, or saturation - pub c3: libc::c_short, - /// alpha or blackband - pub c4: libc::c_short, -} -#[test] -fn bindgen_test_layout_GDALColorEntry() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(GDALColorEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(GDALColorEntry)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c4) - ) - ); -} -extern "C" { - pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; -} -extern "C" { - pub fn GDALDestroyColorTable(arg1: GDALColorTableH); -} -extern "C" { - pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; -} -extern "C" { - pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; -} -extern "C" { - pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; -} -extern "C" { - pub fn GDALGetColorEntryAsRGB( - arg1: GDALColorTableH, - arg2: libc::c_int, - arg3: *mut GDALColorEntry, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); -} -extern "C" { - pub fn GDALCreateColorRamp( - hTable: GDALColorTableH, - nStartIndex: libc::c_int, - psStartColor: *const GDALColorEntry, - nEndIndex: libc::c_int, - psEndColor: *const GDALColorEntry, - ); -} -pub mod GDALRATFieldType { - /// Field type of raster attribute table - pub type Type = u32; - /// Integer field - pub const GFT_Integer: Type = 0; - /// Floating point (double) field - pub const GFT_Real: Type = 1; - /// String field - pub const GFT_String: Type = 2; -} -pub mod GDALRATFieldUsage { - /// Field usage of raster attribute table - pub type Type = u32; - /// General purpose field. - pub const GFU_Generic: Type = 0; - /// Histogram pixel count - pub const GFU_PixelCount: Type = 1; - /// Class name - pub const GFU_Name: Type = 2; - /// Class range minimum - pub const GFU_Min: Type = 3; - /// Class range maximum - pub const GFU_Max: Type = 4; - /// Class value (min=max) - pub const GFU_MinMax: Type = 5; - /// Red class color (0-255) - pub const GFU_Red: Type = 6; - /// Green class color (0-255) - pub const GFU_Green: Type = 7; - /// Blue class color (0-255) - pub const GFU_Blue: Type = 8; - /// Alpha (0=transparent,255=opaque) - pub const GFU_Alpha: Type = 9; - /// Color Range Red Minimum - pub const GFU_RedMin: Type = 10; - /// Color Range Green Minimum - pub const GFU_GreenMin: Type = 11; - /// Color Range Blue Minimum - pub const GFU_BlueMin: Type = 12; - /// Color Range Alpha Minimum - pub const GFU_AlphaMin: Type = 13; - /// Color Range Red Maximum - pub const GFU_RedMax: Type = 14; - /// Color Range Green Maximum - pub const GFU_GreenMax: Type = 15; - /// Color Range Blue Maximum - pub const GFU_BlueMax: Type = 16; - /// Color Range Alpha Maximum - pub const GFU_AlphaMax: Type = 17; - /// Maximum GFU value - pub const GFU_MaxCount: Type = 18; -} -extern "C" { - pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); -} -extern "C" { - pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetNameOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALRATGetUsageOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldUsage::Type; -} -extern "C" { - pub fn GDALRATGetTypeOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldType::Type; -} -extern "C" { - pub fn GDALRATGetColOfUsage( - arg1: GDALRasterAttributeTableH, - arg2: GDALRATFieldUsage::Type, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALRATGetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> f64; -} -extern "C" { - pub fn GDALRATSetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_char, - ); -} -extern "C" { - pub fn GDALRATSetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ); -} -extern "C" { - pub fn GDALRATSetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: f64, - ); -} -extern "C" { - pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATValuesIOAsDouble( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pdfData: *mut f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATValuesIOAsInteger( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pnData: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATValuesIOAsString( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - papszStrList: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); -} -extern "C" { - pub fn GDALRATCreateColumn( - arg1: GDALRasterAttributeTableH, - arg2: *const libc::c_char, - arg3: GDALRATFieldType::Type, - arg4: GDALRATFieldUsage::Type, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATSetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: f64, - arg3: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATGetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: *mut f64, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATInitializeFromColorTable( - arg1: GDALRasterAttributeTableH, - arg2: GDALColorTableH, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATTranslateToColorTable( - arg1: GDALRasterAttributeTableH, - nEntryCount: libc::c_int, - ) -> GDALColorTableH; -} -extern "C" { - pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); -} -extern "C" { - pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; -} -extern "C" { - pub fn GDALSetCacheMax(nBytes: libc::c_int); -} -extern "C" { - pub fn GDALGetCacheMax() -> libc::c_int; -} -extern "C" { - pub fn GDALGetCacheUsed() -> libc::c_int; -} -extern "C" { - pub fn GDALSetCacheMax64(nBytes: GIntBig); -} -extern "C" { - pub fn GDALGetCacheMax64() -> GIntBig; -} -extern "C" { - pub fn GDALGetCacheUsed64() -> GIntBig; -} -extern "C" { - pub fn GDALFlushCacheBlock() -> libc::c_int; -} -extern "C" { - pub fn GDALDatasetGetVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nBandSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALRasterBandGetVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALGetVirtualMemAuto( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - pnPixelSpace: *mut libc::c_int, - pnLineSpace: *mut GIntBig, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -pub mod GDALTileOrganization { - pub type Type = u32; - /// Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ... - pub const GTO_TIP: Type = 0; - /// Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of fisrt band, tile (1,0) of second band, ... - pub const GTO_BIT: Type = 1; - /// Band SeQuential : all the tiles of first band, all the tiles of following band... - pub const GTO_BSQ: Type = 2; -} -extern "C" { - pub fn GDALDatasetGetTiledVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - eTileOrganization: GDALTileOrganization::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALRasterBandGetTiledVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -pub mod CPLXMLNodeType { - /// \file cpl_minixml.h - /// - /// Definitions for CPL mini XML Parser/Serializer. - pub type Type = u32; - /// Node is an element - pub const CXT_Element: Type = 0; - /// Node is a raw text value - pub const CXT_Text: Type = 1; - /// Node is attribute - pub const CXT_Attribute: Type = 2; - /// Node is an XML comment. - pub const CXT_Comment: Type = 3; - /// Node is a special literal - pub const CXT_Literal: Type = 4; -} -/// Document node structure. -/// -/// This C structure is used to hold a single text fragment representing a -/// component of the document when parsed. It should be allocated with the -/// appropriate CPL function, and freed with CPLDestroyXMLNode(). The structure -/// contents should not normally be altered by application code, but may be -/// freely examined by application code. -/// -/// Using the psChild and psNext pointers, a heirarchical tree structure -/// for a document can be represented as a tree of CPLXMLNode structures. -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLXMLNode { - /// \brief Node type - /// - /// One of CXT_Element, CXT_Text, CXT_Attribute, CXT_Comment, - /// or CXT_Literal. - pub eType: CPLXMLNodeType::Type, - /// \brief Node value - /// - /// For CXT_Element this is the name of the element, without the angle - /// brackets. Note there is a single CXT_Element even when the document - /// contains a start and end element tag. The node represents the pair. - /// All text or other elements between the start and end tag will appear - /// as children nodes of this CXT_Element node. - /// - /// For CXT_Attribute the pszValue is the attribute name. The value of - /// the attribute will be a CXT_Text child. - /// - /// For CXT_Text this is the text itself (value of an attribute, or a - /// text fragment between an element start and end tags. - /// - /// For CXT_Literal it is all the literal text. Currently this is just - /// used for !DOCTYPE lines, and the value would be the entire line. - /// - /// For CXT_Comment the value is all the literal text within the comment, - /// but not including the comment start/end indicators ("<--" and "-->"). - pub pszValue: *mut libc::c_char, - /// \brief Next sibling. - /// - /// Pointer to next sibling, that is the next node appearing after this - /// one that has the same parent as this node. NULL if this node is the - /// last child of the parent element. - pub psNext: *mut CPLXMLNode, - /// \brief Child node. - /// - /// Pointer to first child node, if any. Only CXT_Element and CXT_Attribute - /// nodes should have children. For CXT_Attribute it should be a single - /// CXT_Text value node, while CXT_Element can have any kind of child. - /// The full list of children for a node are identified by walking the - /// psNext's starting with the psChild node. - pub psChild: *mut CPLXMLNode, -} -#[test] -fn bindgen_test_layout_CPLXMLNode() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLXMLNode)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLXMLNode)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(eType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(pszValue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psNext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psChild) - ) - ); -} -extern "C" { - pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSearchXMLNode( - poRoot: *mut CPLXMLNode, - pszTarget: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLGetXMLValue( - poRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszDefault: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCreateXMLNode( - poParent: *mut CPLXMLNode, - eType: CPLXMLNodeType::Type, - pszText: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; -} -extern "C" { - pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLCreateXMLElementAndValue( - psParent: *mut CPLXMLNode, - pszName: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLCloneXMLTree(psTree: *mut CPLXMLNode) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSetXMLValue( - psRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLStripXMLNamespace( - psRoot: *mut CPLXMLNode, - pszNameSpace: *const libc::c_char, - bRecurse: libc::c_int, - ); -} -extern "C" { - pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); -} -extern "C" { - pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSerializeXMLTreeToFile( - psTree: *const CPLXMLNode, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, -} -#[test] -fn bindgen_test_layout_OGREnvelope() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(OGREnvelope)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxY) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope3D { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, - pub MinZ: f64, - pub MaxZ: f64, -} -#[test] -fn bindgen_test_layout_OGREnvelope3D() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(OGREnvelope3D)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope3D)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxZ) - ) - ); -} -extern "C" { - pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn OGRFree(arg1: *mut libc::c_void); -} -pub mod OGRwkbGeometryType { - /// List of well known binary geometry types. These are used within the BLOBs - /// but are also returned from OGRGeometry::getGeometryType() to identify the - /// type of a geometry object. - pub type Type = u32; - /// < unknown type, non-standard - pub const wkbUnknown: Type = 0; - /// < 0-dimensional geometric object, standard WKB - pub const wkbPoint: Type = 1; - /// < 1-dimensional geometric object with linear - /// interpolation between Points, standard WKB - pub const wkbLineString: Type = 2; - /// < planar 2-dimensional geometric object defined - /// by 1 exterior boundary and 0 or more interior - /// boundaries, standard WKB - pub const wkbPolygon: Type = 3; - /// < GeometryCollection of Points, standard WKB - pub const wkbMultiPoint: Type = 4; - /// < GeometryCollection of LineStrings, standard WKB - pub const wkbMultiLineString: Type = 5; - /// < GeometryCollection of Polygons, standard WKB - pub const wkbMultiPolygon: Type = 6; - /// < geometric object that is a collection of 1 - /// or more geometric objects, standard WKB - pub const wkbGeometryCollection: Type = 7; - /// < non-standard, for pure attribute records - pub const wkbNone: Type = 100; - /// < non-standard, just for createGeometry() - pub const wkbLinearRing: Type = 101; - /// < 2.5D extension as per 99-402 - pub const wkbPoint25D: Type = 2147483649; - /// < 2.5D extension as per 99-402 - pub const wkbLineString25D: Type = 2147483650; - /// < 2.5D extension as per 99-402 - pub const wkbPolygon25D: Type = 2147483651; - /// < 2.5D extension as per 99-402 - pub const wkbMultiPoint25D: Type = 2147483652; - /// < 2.5D extension as per 99-402 - pub const wkbMultiLineString25D: Type = 2147483653; - /// < 2.5D extension as per 99-402 - pub const wkbMultiPolygon25D: Type = 2147483654; - /// < 2.5D extension as per 99-402 - pub const wkbGeometryCollection25D: Type = 2147483655; -} -extern "C" { - pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGRMergeGeometryTypes( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - ) -> OGRwkbGeometryType::Type; -} -pub mod OGRwkbByteOrder { - pub type Type = u32; - pub const wkbXDR: Type = 0; - pub const wkbNDR: Type = 1; -} -pub mod OGRFieldType { - /// List of feature field types. This list is likely to be extended in the - /// future ... avoid coding applications based on the assumption that all - /// field types can be known. - pub type Type = u32; - /// Simple 32bit integer - pub const OFTInteger: Type = 0; - /// List of 32bit integers - pub const OFTIntegerList: Type = 1; - /// Double Precision floating point - pub const OFTReal: Type = 2; - /// List of doubles - pub const OFTRealList: Type = 3; - /// String of ASCII chars - pub const OFTString: Type = 4; - /// Array of strings - pub const OFTStringList: Type = 5; - /// deprecated - pub const OFTWideString: Type = 6; - /// deprecated - pub const OFTWideStringList: Type = 7; - /// Raw Binary data - pub const OFTBinary: Type = 8; - /// Date - pub const OFTDate: Type = 9; - /// Time - pub const OFTTime: Type = 10; - /// Date and Time - pub const OFTDateTime: Type = 11; - /// Date and Time - pub const OFTMaxType: Type = 11; -} -pub mod OGRJustification { - /// Display justification for field values. - pub type Type = u32; - pub const OJUndefined: Type = 0; - pub const OJLeft: Type = 1; - pub const OJRight: Type = 2; -} -/// OGRFeature field attribute value union. -#[repr(C)] -#[derive(Copy, Clone)] -pub union OGRField { - pub Integer: libc::c_int, - pub Real: f64, - pub String: *mut libc::c_char, - pub IntegerList: OGRField__bindgen_ty_1, - pub RealList: OGRField__bindgen_ty_2, - pub StringList: OGRField__bindgen_ty_3, - pub Binary: OGRField__bindgen_ty_4, - pub Set: OGRField__bindgen_ty_5, - pub Date: OGRField__bindgen_ty_6, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_1 { - pub nCount: libc::c_int, - pub paList: *mut libc::c_int, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_2 { - pub nCount: libc::c_int, - pub paList: *mut f64, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_3 { - pub nCount: libc::c_int, - pub paList: *mut *mut libc::c_char, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_4 { - pub nCount: libc::c_int, - pub paData: *mut GByte, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_4() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(paData) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_5 { - pub nMarker1: libc::c_int, - pub nMarker2: libc::c_int, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_5() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(nMarker1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(nMarker2) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_6 { - pub Year: GInt16, - pub Month: GByte, - pub Day: GByte, - pub Hour: GByte, - pub Minute: GByte, - pub Second: GByte, - pub TZFlag: GByte, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_6() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(Year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(Month) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(Day) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(Hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(Minute) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(Second) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(TZFlag) - ) - ); -} -#[test] -fn bindgen_test_layout_OGRField() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Real) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(String) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(IntegerList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(RealList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(StringList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Binary) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Set) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Date) - ) - ); -} -extern "C" { - pub fn OGRParseDate( - pszInput: *const libc::c_char, - psOutput: *mut OGRField, - nOptions: libc::c_int, - ) -> libc::c_int; -} -pub mod ogr_style_tool_class_id { - /// OGRStyleTool derived class types (returned by GetType()). - pub type Type = u32; - pub const OGRSTCNone: Type = 0; - pub const OGRSTCPen: Type = 1; - pub const OGRSTCBrush: Type = 2; - pub const OGRSTCSymbol: Type = 3; - pub const OGRSTCLabel: Type = 4; - pub const OGRSTCVector: Type = 5; -} -pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; -pub mod ogr_style_tool_units_id { - /// List of units supported by OGRStyleTools. - pub type Type = u32; - pub const OGRSTUGround: Type = 0; - pub const OGRSTUPixel: Type = 1; - pub const OGRSTUPoints: Type = 2; - pub const OGRSTUMM: Type = 3; - pub const OGRSTUCM: Type = 4; - pub const OGRSTUInches: Type = 5; -} -pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; -pub type OGRGeometryH = *mut libc::c_void; -pub type OGRSpatialReferenceH = *mut libc::c_void; -pub type OGRCoordinateTransformationH = *mut libc::c_void; -extern "C" { - pub fn OGR_G_CreateFromWkb( - arg1: *mut libc::c_uchar, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromWkt( - arg1: *mut *mut libc::c_char, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromFgf( - arg1: *mut libc::c_uchar, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - arg5: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ApproximateArcAngles( - dfCenterX: f64, - dfCenterY: f64, - dfZ: f64, - dfPrimaryRadius: f64, - dfSecondaryAxis: f64, - dfRotation: f64, - dfStartAngle: f64, - dfEndAngle: f64, - dfMaxAngleStepSizeDegrees: f64, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); -} -extern "C" { - pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); -} -extern "C" { - pub fn OGR_G_ImportFromWkb( - arg1: OGRGeometryH, - arg2: *mut libc::c_uchar, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CloseRings(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToGMLEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; -} -extern "C" { - pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; -} -extern "C" { - pub fn OGR_G_ExportToKML( - arg1: OGRGeometryH, - pszAltitudeMode: *const libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToJsonEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); -} -extern "C" { - pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Segmentize(hGeom: OGRGeometryH, dfMaxLength: f64); -} -extern "C" { - pub fn OGR_G_Intersects(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Equals(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Disjoint(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Touches(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Crosses(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Within(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Contains(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Overlaps(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Boundary(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ConvexHull(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Buffer(arg1: OGRGeometryH, arg2: f64, arg3: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Intersection(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Union(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_UnionCascaded(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_PointOnSurface(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Difference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_SymDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Distance(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Length(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Area(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Centroid(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Empty(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_IsEmpty(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsValid(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsSimple(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsRing(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Equal(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SymmetricDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetArea(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetPoints( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetX(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetY(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetZ(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetPoint( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, - ); -} -extern "C" { - pub fn OGR_G_SetPointCount(hGeom: OGRGeometryH, nNewPointCount: libc::c_int); -} -extern "C" { - pub fn OGR_G_SetPoint(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_SetPoint_2D(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_AddPoint(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_AddPoint_2D(arg1: OGRGeometryH, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_SetPoints( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - ); -} -extern "C" { - pub fn OGR_G_GetGeometryCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetGeometryRef(arg1: OGRGeometryH, arg2: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AddGeometry(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_AddGeometryDirectly(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_RemoveGeometry( - arg1: OGRGeometryH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGRBuildPolygonFromEdges( - hLinesAsCollection: OGRGeometryH, - bBestEffort: libc::c_int, - bAutoClose: libc::c_int, - dfTolerance: f64, - peErr: *mut OGRErr::Type, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( - bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; -} -pub type OGRFieldDefnH = *mut libc::c_void; -pub type OGRFeatureDefnH = *mut libc::c_void; -pub type OGRFeatureH = *mut libc::c_void; -pub type OGRStyleTableH = *mut libc::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRGeomFieldDefnHS { - _unused: [u8; 0], -} -pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; -extern "C" { - pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_Fld_Destroy(arg1: OGRFieldDefnH); -} -extern "C" { - pub fn OGR_Fld_SetName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_Fld_GetNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Fld_GetType(arg1: OGRFieldDefnH) -> OGRFieldType::Type; -} -extern "C" { - pub fn OGR_Fld_SetType(arg1: OGRFieldDefnH, arg2: OGRFieldType::Type); -} -extern "C" { - pub fn OGR_Fld_GetJustify(arg1: OGRFieldDefnH) -> OGRJustification::Type; -} -extern "C" { - pub fn OGR_Fld_SetJustify(arg1: OGRFieldDefnH, arg2: OGRJustification::Type); -} -extern "C" { - pub fn OGR_Fld_GetWidth(arg1: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetWidth(arg1: OGRFieldDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_GetPrecision(arg1: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetPrecision(arg1: OGRFieldDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_Set( - arg1: OGRFieldDefnH, - arg2: *const libc::c_char, - arg3: OGRFieldType::Type, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: OGRJustification::Type, - ); -} -extern "C" { - pub fn OGR_Fld_IsIgnored(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetIgnored(hDefn: OGRFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_GetFieldTypeName(arg1: OGRFieldType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_GFld_Create( - arg1: *const libc::c_char, - arg2: OGRwkbGeometryType::Type, - ) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_GFld_Destroy(arg1: OGRGeomFieldDefnH); -} -extern "C" { - pub fn OGR_GFld_SetName(arg1: OGRGeomFieldDefnH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_GFld_GetNameRef(arg1: OGRGeomFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_GFld_GetType(arg1: OGRGeomFieldDefnH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GFld_SetType(arg1: OGRGeomFieldDefnH, arg2: OGRwkbGeometryType::Type); -} -extern "C" { - pub fn OGR_GFld_GetSpatialRef(arg1: OGRGeomFieldDefnH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_GFld_SetSpatialRef(arg1: OGRGeomFieldDefnH, hSRS: OGRSpatialReferenceH); -} -extern "C" { - pub fn OGR_GFld_IsIgnored(hDefn: OGRGeomFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_GFld_SetIgnored(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_FD_Create(arg1: *const libc::c_char) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_FD_Destroy(arg1: OGRFeatureDefnH); -} -extern "C" { - pub fn OGR_FD_Release(arg1: OGRFeatureDefnH); -} -extern "C" { - pub fn OGR_FD_GetName(arg1: OGRFeatureDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_FD_GetFieldCount(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetFieldDefn(arg1: OGRFeatureDefnH, arg2: libc::c_int) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_FD_GetFieldIndex(arg1: OGRFeatureDefnH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_AddFieldDefn(arg1: OGRFeatureDefnH, arg2: OGRFieldDefnH); -} -extern "C" { - pub fn OGR_FD_DeleteFieldDefn(hDefn: OGRFeatureDefnH, iField: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_ReorderFieldDefns( - hDefn: OGRFeatureDefnH, - panMap: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_GetGeomType(arg1: OGRFeatureDefnH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_FD_SetGeomType(arg1: OGRFeatureDefnH, arg2: OGRwkbGeometryType::Type); -} -extern "C" { - pub fn OGR_FD_IsGeometryIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_SetGeometryIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_FD_IsStyleIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_SetStyleIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_FD_Reference(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_Dereference(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetReferenceCount(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldCount(hFDefn: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldDefn(hFDefn: OGRFeatureDefnH, i: libc::c_int) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldIndex( - hFDefn: OGRFeatureDefnH, - pszName: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_AddGeomFieldDefn(hFDefn: OGRFeatureDefnH, hGFldDefn: OGRGeomFieldDefnH); -} -extern "C" { - pub fn OGR_FD_DeleteGeomFieldDefn( - hFDefn: OGRFeatureDefnH, - iGeomField: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_IsSame(hFDefn: OGRFeatureDefnH, hOtherFDefn: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_Create(arg1: OGRFeatureDefnH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_F_Destroy(arg1: OGRFeatureH); -} -extern "C" { - pub fn OGR_F_GetDefnRef(arg1: OGRFeatureH) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_F_SetGeometryDirectly(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetGeometry(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetGeometryRef(arg1: OGRFeatureH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_StealGeometry(arg1: OGRFeatureH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_Clone(arg1: OGRFeatureH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_F_Equal(arg1: OGRFeatureH, arg2: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldCount(arg1: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldDefnRef(arg1: OGRFeatureH, arg2: libc::c_int) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_F_GetFieldIndex(arg1: OGRFeatureH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_IsFieldSet(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_UnsetField(arg1: OGRFeatureH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_F_GetRawFieldRef(arg1: OGRFeatureH, arg2: libc::c_int) -> *mut OGRField; -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsDouble(arg1: OGRFeatureH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_F_GetFieldAsString(arg1: OGRFeatureH, arg2: libc::c_int) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_GetFieldAsIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const f64; -} -extern "C" { - pub fn OGR_F_GetFieldAsStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn OGR_F_GetFieldAsBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *mut GByte; -} -extern "C" { - pub fn OGR_F_GetFieldAsDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - arg4: *mut libc::c_int, - arg5: *mut libc::c_int, - arg6: *mut libc::c_int, - arg7: *mut libc::c_int, - arg8: *mut libc::c_int, - arg9: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_SetFieldInteger(arg1: OGRFeatureH, arg2: libc::c_int, arg3: libc::c_int); -} -extern "C" { - pub fn OGR_F_SetFieldDouble(arg1: OGRFeatureH, arg2: libc::c_int, arg3: f64); -} -extern "C" { - pub fn OGR_F_SetFieldString(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_SetFieldIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut f64, - ); -} -extern "C" { - pub fn OGR_F_SetFieldStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut *mut libc::c_char, - ); -} -extern "C" { - pub fn OGR_F_SetFieldRaw(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *mut OGRField); -} -extern "C" { - pub fn OGR_F_SetFieldBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut GByte, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_GetGeomFieldCount(hFeat: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetGeomFieldDefnRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_F_GetGeomFieldIndex(hFeat: OGRFeatureH, pszName: *const libc::c_char) - -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetGeomFieldRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_SetGeomFieldDirectly( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetGeomField( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetFID(arg1: OGRFeatureH) -> libc::c_long; -} -extern "C" { - pub fn OGR_F_SetFID(arg1: OGRFeatureH, arg2: libc::c_long) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_DumpReadable(arg1: OGRFeatureH, arg2: *mut FILE); -} -extern "C" { - pub fn OGR_F_SetFrom(arg1: OGRFeatureH, arg2: OGRFeatureH, arg3: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetFromWithMap( - arg1: OGRFeatureH, - arg2: OGRFeatureH, - arg3: libc::c_int, - arg4: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetStyleString(arg1: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_SetStyleString(arg1: OGRFeatureH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); -} -extern "C" { - pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); -} -pub type OGRLayerH = *mut libc::c_void; -pub type OGRDataSourceH = *mut libc::c_void; -pub type OGRSFDriverH = *mut libc::c_void; -extern "C" { - pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetGeomType(arg1: OGRLayerH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_L_GetSpatialFilter(arg1: OGRLayerH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_L_SetSpatialFilter(arg1: OGRLayerH, arg2: OGRGeometryH); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterRect(arg1: OGRLayerH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterEx(arg1: OGRLayerH, iGeomField: libc::c_int, hGeom: OGRGeometryH); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterRectEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - dfMinX: f64, - dfMinY: f64, - dfMaxX: f64, - dfMaxY: f64, - ); -} -extern "C" { - pub fn OGR_L_SetAttributeFilter(arg1: OGRLayerH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ResetReading(arg1: OGRLayerH); -} -extern "C" { - pub fn OGR_L_GetNextFeature(arg1: OGRLayerH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_L_SetNextByIndex(arg1: OGRLayerH, arg2: libc::c_long) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetFeature(arg1: OGRLayerH, arg2: libc::c_long) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_L_SetFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CreateFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_DeleteFeature(arg1: OGRLayerH, arg2: libc::c_long) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetLayerDefn(arg1: OGRLayerH) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_L_GetSpatialRef(arg1: OGRLayerH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_L_FindFieldIndex( - arg1: OGRLayerH, - arg2: *const libc::c_char, - bExactMatch: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_GetFeatureCount(arg1: OGRLayerH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_GetExtent( - arg1: OGRLayerH, - arg2: *mut OGREnvelope, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetExtentEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - psExtent: *mut OGREnvelope, - bForce: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_TestCapability(arg1: OGRLayerH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_CreateField( - arg1: OGRLayerH, - arg2: OGRFieldDefnH, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CreateGeomField( - hLayer: OGRLayerH, - hFieldDefn: OGRGeomFieldDefnH, - bForce: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_DeleteField(arg1: OGRLayerH, iField: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ReorderFields(arg1: OGRLayerH, panMap: *mut libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ReorderField( - arg1: OGRLayerH, - iOldFieldPos: libc::c_int, - iNewFieldPos: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_AlterFieldDefn( - arg1: OGRLayerH, - iField: libc::c_int, - hNewFieldDefn: OGRFieldDefnH, - nFlags: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_StartTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CommitTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_Dereference(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; -} -extern "C" { - pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_L_SetIgnoredFields(arg1: OGRLayerH, arg2: *mut *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Intersection( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Union( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_SymDifference( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Identity( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Update( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Clip( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Erase( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_Destroy(arg1: OGRDataSourceH); -} -extern "C" { - pub fn OGR_DS_GetName(arg1: OGRDataSourceH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_DS_GetLayerCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_GetLayerByName(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_DeleteLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_GetDriver(arg1: OGRDataSourceH) -> OGRSFDriverH; -} -extern "C" { - pub fn OGR_DS_CreateLayer( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_CopyLayer( - arg1: OGRDataSourceH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_TestCapability(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_ExecuteSQL( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); -} -extern "C" { - pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_Dereference(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetRefCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_Dr_GetName(arg1: OGRSFDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Dr_Open( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_TestCapability(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_Dr_CreateDataSource( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_CopyDataSource( - arg1: OGRSFDriverH, - arg2: OGRDataSourceH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGROpen( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGROpenShared( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; -} -extern "C" { - pub fn OGRRegisterDriver(arg1: OGRSFDriverH); -} -extern "C" { - pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); -} -extern "C" { - pub fn OGRGetDriverCount() -> libc::c_int; -} -extern "C" { - pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; -} -extern "C" { - pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; -} -extern "C" { - pub fn OGRGetOpenDSCount() -> libc::c_int; -} -extern "C" { - pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; -} -extern "C" { - pub fn OGRRegisterAll(); -} -extern "C" { - pub fn OGRCleanupAll(); -} -pub type OGRStyleMgrH = *mut libc::c_void; -pub type OGRStyleToolH = *mut libc::c_void; -extern "C" { - pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; -} -extern "C" { - pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); -} -extern "C" { - pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_SM_InitStyleString( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_GetPartCount( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_GetPart( - hSM: OGRStyleMgrH, - nPartId: libc::c_int, - pszStyleString: *const libc::c_char, - ) -> OGRStyleToolH; -} -extern "C" { - pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_AddStyle( - hSM: OGRStyleMgrH, - pszStyleName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; -} -extern "C" { - pub fn OGR_ST_Destroy(hST: OGRStyleToolH); -} -extern "C" { - pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; -} -extern "C" { - pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; -} -extern "C" { - pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); -} -extern "C" { - pub fn OGR_ST_GetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_ST_GetParamNum( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_ST_GetParamDbl( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> f64; -} -extern "C" { - pub fn OGR_ST_SetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); -} -extern "C" { - pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); -} -extern "C" { - pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_ST_GetRGBFromString( - hST: OGRStyleToolH, - pszColor: *const libc::c_char, - pnRed: *mut libc::c_int, - pnGreen: *mut libc::c_int, - pnBlue: *mut libc::c_int, - pnAlpha: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_Create() -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); -} -extern "C" { - pub fn OGR_STBL_AddStyle( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_SaveStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_LoadStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_Find( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); -} -extern "C" { - pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALComputeMedianCutPCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - pfnIncludePixel: ::std::option::Option< - unsafe extern "C" fn(arg1: libc::c_int, arg2: libc::c_int, arg3: *mut libc::c_void) - -> libc::c_int, - >, - nColors: libc::c_int, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALDitherRGB2PCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - hTarget: GDALRasterBandH, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALChecksumImage( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALComputeProximity( - hSrcBand: GDALRasterBandH, - hProximityBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALFillNodata( - hTargetBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - dfMaxSearchDist: f64, - bDeprecatedOption: libc::c_int, - nSmoothingIterations: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALFPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSieveFilter( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - nSizeThreshold: libc::c_int, - nConnectedness: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub type GDALTransformerFunc = ::std::option::Option< - unsafe extern "C" fn( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALUseTransformer( - pTranformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - bGCPUseOK: libc::c_int, - dfGCPErrorThreshold: f64, - nOrder: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer2( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer3( - pszSrcWKT: *const libc::c_char, - padfSrcGeoTransform: *const f64, - pszDstWKT: *const libc::c_char, - padfDstGeoTransform: *const f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); -} -extern "C" { - pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); -} -extern "C" { - pub fn GDALGenImgProjTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateReprojectionTransformer( - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); -} -extern "C" { - pub fn GDALReprojectionTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateGCPTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGCPRefineTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - tolerance: f64, - minimumGcps: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALGCPTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateTPSTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALTPSTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateRPCTransformer( - psRPC: *mut GDALRPCInfo, - bReversed: libc::c_int, - dfPixErrThreshold: f64, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALRPCTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateGeoLocTransformer( - hBaseDS: GDALDatasetH, - papszGeolocationInfo: *mut *mut libc::c_char, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALGeoLocTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateApproxTransformer( - pfnRawTransformer: GDALTransformerFunc, - pRawTransformerArg: *mut libc::c_void, - dfMaxError: f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALApproxTransformerOwnsSubtransformer( - pCBData: *mut libc::c_void, - bOwnFlag: libc::c_int, - ); -} -extern "C" { - pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALApproxTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSimpleImageWarp( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - pfnTransform: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszWarpOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSuggestedWarpOutput( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSuggestedWarpOutput2( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - padfExtents: *mut f64, - nOptions: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSerializeTransformer( - pfnFunc: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALDeserializeTransformer( - psTree: *mut CPLXMLNode, - ppfnFunc: *mut GDALTransformerFunc, - ppTransformArg: *mut *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALTransformGeolocations( - hXBand: GDALRasterBandH, - hYBand: GDALRasterBandH, - hZBand: GDALRasterBandH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -pub type GDALContourWriter = ::std::option::Option< - unsafe extern "C" fn( - dfLevel: f64, - nPoints: libc::c_int, - padfX: *mut f64, - padfY: *mut f64, - arg1: *mut libc::c_void, - ) -> CPLErr::Type, ->; -pub type GDALContourGeneratorH = *mut libc::c_void; -extern "C" { - pub fn GDAL_CG_Create( - nWidth: libc::c_int, - nHeight: libc::c_int, - bNoDataSet: libc::c_int, - dfNoDataValue: f64, - dfContourInterval: f64, - dfContourBase: f64, - pfnWriter: GDALContourWriter, - pCBData: *mut libc::c_void, - ) -> GDALContourGeneratorH; -} -extern "C" { - pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); -} -extern "C" { - pub fn OGRContourWriter( - arg1: f64, - arg2: libc::c_int, - arg3: *mut f64, - arg4: *mut f64, - pInfo: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALContourGenerate( - hBand: GDALRasterBandH, - dfContourInterval: f64, - dfContourBase: f64, - nFixedLevelCount: libc::c_int, - padfFixedLevels: *mut f64, - bUseNoData: libc::c_int, - dfNoDataValue: f64, - hLayer: *mut libc::c_void, - iIDField: libc::c_int, - iElevField: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - - pub fn GDALRasterizeGeometries( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nGeomCount: libc::c_int, - pahGeometries: *mut OGRGeometryH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeomBurnValue: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterizeLayers( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfLayerBurnValues: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterizeLayersBuf( - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pszDstProjection: *const libc::c_char, - padfDstGeoTransform: *mut f64, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - dfBurnValue: f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub mod GDALGridAlgorithm { - /// Gridding Algorithms - pub type Type = u32; - /// Inverse distance to a power - pub const GGA_InverseDistanceToAPower: Type = 1; - /// Moving Average - pub const GGA_MovingAverage: Type = 2; - /// Nearest Neighbor - pub const GGA_NearestNeighbor: Type = 3; - /// Minimum Value (Data Metric) - pub const GGA_MetricMinimum: Type = 4; - /// Maximum Value (Data Metric) - pub const GGA_MetricMaximum: Type = 5; - /// Data Range (Data Metric) - pub const GGA_MetricRange: Type = 6; - /// Number of Points (Data Metric) - pub const GGA_MetricCount: Type = 7; - /// Average Distance (Data Metric) - pub const GGA_MetricAverageDistance: Type = 8; - /// Average Distance Between Data Points (Data Metric) - pub const GGA_MetricAverageDistancePts: Type = 9; -} -extern "C" { - pub fn GDALGridCreate( - arg1: GDALGridAlgorithm::Type, - arg2: *const libc::c_void, - arg3: GUInt32, - arg4: *const f64, - arg5: *const f64, - arg6: *const f64, - arg7: f64, - arg8: f64, - arg9: f64, - arg10: f64, - arg11: GUInt32, - arg12: GUInt32, - arg13: GDALDataType::Type, - arg14: *mut libc::c_void, - arg15: GDALProgressFunc, - arg16: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeMatchingPoints( - hFirstImage: GDALDatasetH, - hSecondImage: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pnGCPCount: *mut libc::c_int, - ) -> *mut GDAL_GCP; -} -pub mod GDALResampleAlg { - /// Warp Resampling Algorithm - pub type Type = u32; - /// Nearest neighbour (select on one input pixel) - pub const GRA_NearestNeighbour: Type = 0; - /// Bilinear (2x2 kernel) - pub const GRA_Bilinear: Type = 1; - /// Cubic Convolution Approximation (4x4 kernel) - pub const GRA_Cubic: Type = 2; - /// Cubic B-Spline Approximation (4x4 kernel) - pub const GRA_CubicSpline: Type = 3; - /// Lanczos windowed sinc interpolation (6x6 kernel) - pub const GRA_Lanczos: Type = 4; - /// Average (computes the average of all non-NODATA contributing pixels) - pub const GRA_Average: Type = 5; - /// Mode (selects the value which appears most often of all the sampled points) - pub const GRA_Mode: Type = 6; -} -pub type GDALMaskFunc = ::std::option::Option< - unsafe extern "C" fn( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pMask: *mut libc::c_void, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALWarpNoDataMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpDstAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpSrcAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpSrcMaskMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpCutlineMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -/// Warp control options for use with GDALWarpOperation::Initialize() -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALWarpOptions { - pub papszWarpOptions: *mut *mut libc::c_char, - /// In bytes, 0.0 for internal default - pub dfWarpMemoryLimit: f64, - /// Resampling algorithm to use - pub eResampleAlg: GDALResampleAlg::Type, - /// data type to use during warp operation, GDT_Unknown lets the algorithm - /// select the type - pub eWorkingDataType: GDALDataType::Type, - /// Source image dataset. - pub hSrcDS: GDALDatasetH, - /// Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer(). - pub hDstDS: GDALDatasetH, - /// Number of bands to process, may be 0 to select all bands. - pub nBandCount: libc::c_int, - /// The band numbers for the source bands to process (1 based) - pub panSrcBands: *mut libc::c_int, - /// The band numbers for the destination bands to process (1 based) - pub panDstBands: *mut libc::c_int, - /// The source band so use as an alpha (transparency) value, 0=disabled - pub nSrcAlphaBand: libc::c_int, - /// The dest. band so use as an alpha (transparency) value, 0=disabled - pub nDstAlphaBand: libc::c_int, - /// The "nodata" value real component for each input band, if NULL there isn't one - pub padfSrcNoDataReal: *mut f64, - /// The "nodata" value imaginary component - may be NULL even if real - /// component is provided. - pub padfSrcNoDataImag: *mut f64, - /// The "nodata" value real component for each output band, if NULL there isn't one - pub padfDstNoDataReal: *mut f64, - /// The "nodata" value imaginary component - may be NULL even if real - /// component is provided. - pub padfDstNoDataImag: *mut f64, - /// GDALProgressFunc() compatible progress reporting function, or NULL - /// if there isn't one. - pub pfnProgress: GDALProgressFunc, - /// Callback argument to be passed to pfnProgress. - pub pProgressArg: *mut libc::c_void, - /// Type of spatial point transformer function - pub pfnTransformer: GDALTransformerFunc, - /// Handle to image transformer setup structure - pub pTransformerArg: *mut libc::c_void, - pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, - pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, - pub pfnSrcValidityMaskFunc: GDALMaskFunc, - pub pSrcValidityMaskFuncArg: *mut libc::c_void, - pub pfnSrcDensityMaskFunc: GDALMaskFunc, - pub pSrcDensityMaskFuncArg: *mut libc::c_void, - pub pfnDstDensityMaskFunc: GDALMaskFunc, - pub pDstDensityMaskFuncArg: *mut libc::c_void, - pub pfnDstValidityMaskFunc: GDALMaskFunc, - pub pDstValidityMaskFuncArg: *mut libc::c_void, - pub pfnPreWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - pub pPreWarpProcessorArg: *mut libc::c_void, - pub pfnPostWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - pub pPostWarpProcessorArg: *mut libc::c_void, - /// Optional OGRPolygonH for a masking cutline. - pub hCutline: *mut libc::c_void, - /// Optional blending distance to apply across cutline in pixels, default is zero. - pub dfCutlineBlendDist: f64, -} -#[test] -fn bindgen_test_layout_GDALWarpOptions() { - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papszWarpOptions) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfWarpMemoryLimit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eWorkingDataType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hSrcDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hDstDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nBandCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panSrcBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panDstBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nSrcAlphaBand) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nDstAlphaBand) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataImag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataImag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pProgressArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnTransformer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pTransformerArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ - as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papfnSrcPerBandValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ - as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papSrcPerBandValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ - as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPreWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPreWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ - as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPostWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPostWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hCutline) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfCutlineBlendDist) - ) - ); -} -extern "C" { - pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; -} -extern "C" { - pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); -} -extern "C" { - pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; -} -extern "C" { - pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; -} -extern "C" { - - pub fn GDALReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALCreateAndReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstFilename: *const libc::c_char, - pszDstWKT: *const libc::c_char, - hDstDriver: GDALDriverH, - papszCreateOptions: *mut *mut libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; -} -extern "C" { - - pub fn GDALAutoCreateWarpedVRT( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfMaxError: f64, - psOptions: *const GDALWarpOptions, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALCreateWarpedVRT( - hSrcDS: GDALDatasetH, - nPixels: libc::c_int, - nLines: libc::c_int, - padfGeoTransform: *mut f64, - psOptions: *mut GDALWarpOptions, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; -} -pub type GDALWarpOperationH = *mut libc::c_void; -extern "C" { - pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; -} -extern "C" { - pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); -} -extern "C" { - pub fn GDALChunkAndWarpImage( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALChunkAndWarpMulti( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpRegion( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpRegionToBuffer( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_void, - arg7: GDALDataType::Type, - arg8: libc::c_int, - arg9: libc::c_int, - arg10: libc::c_int, - arg11: libc::c_int, - ) -> CPLErr::Type; -} -pub mod OGRAxisOrientation { - /// \file ogr_srs_api.h - /// - /// C spatial reference system services and defines. - /// - /// See also: ogr_spatialref.h - pub type Type = u32; - pub const OAO_Other: Type = 0; - pub const OAO_North: Type = 1; - pub const OAO_South: Type = 2; - pub const OAO_East: Type = 3; - pub const OAO_West: Type = 4; - pub const OAO_Up: Type = 5; - pub const OAO_Down: Type = 6; -} -extern "C" { - pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); -} -extern "C" { - pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRRelease(arg1: OGRSpatialReferenceH); -} -extern "C" { - pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRFixupOrdering(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRFixup(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRStripCTParms(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromProj4( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromESRI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromPCI( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromUSGS( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: *mut f64, - arg5: libc::c_long, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromDict( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromPanorama( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: libc::c_long, - arg5: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromOzi( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromERM( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) - -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPrettyWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToProj4( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPCI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *mut *mut libc::c_char, - arg4: *mut *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToUSGS( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut *mut f64, - arg5: *mut libc::c_long, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToXML( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPanorama( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut libc::c_long, - arg5: *mut libc::c_long, - arg6: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToERM( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_char, - arg3: *mut libc::c_char, - arg4: *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetAttrValue( - hSRS: OGRSpatialReferenceH, - pszNodePath: *const libc::c_char, - pszNewNodeValue: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAttrValue( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - iChild: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetAngularUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRSetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetLinearUnitsAndUpdateParameters( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRGetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> f64; -} -extern "C" { - pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetWellKnownGeogCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetFromUserInput( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRCopyGeogCSFrom( - hSRS: OGRSpatialReferenceH, - hSrcSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: f64, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - arg6: f64, - arg7: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: *mut f64, - arg2: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetCompoundCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - hHorizSRS: OGRSpatialReferenceH, - hVertSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetGeogCS( - hSRS: OGRSpatialReferenceH, - pszGeogName: *const libc::c_char, - pszDatumName: *const libc::c_char, - pszEllipsoidName: *const libc::c_char, - dfSemiMajor: f64, - dfInvFlattening: f64, - pszPMName: *const libc::c_char, - dfPMOffset: f64, - pszUnits: *const libc::c_char, - dfConvertToRadians: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetVertCS( - hSRS: OGRSpatialReferenceH, - pszVertCSName: *const libc::c_char, - pszVertDatumName: *const libc::c_char, - nVertDatumType: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRSetAuthority( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszAuthority: *const libc::c_char, - nCode: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAuthorityCode( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRGetAuthorityName( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; -} -extern "C" { - pub fn OSRSetNormProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetNormProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; -} -extern "C" { - pub fn OSRSetUTM( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNorth: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OSRSetStatePlane( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetStatePlaneWithUnits( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - pszOverrideUnitName: *const libc::c_char, - dfOverrideUnit: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRGetAxis( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - iAxis: libc::c_int, - peOrientation: *mut OGRAxisOrientation::Type, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetAxes( - pszTargetKey: *const libc::c_char, - pszXAxisName: *const libc::c_char, - eXAxisOrientation: OGRAxisOrientation::Type, - pszYAxisName: *const libc::c_char, - eYAxisOrientation: OGRAxisOrientation::Type, - ) -> OGRErr::Type; -} -extern "C" { - /// Albers Conic Equal Area - pub fn OSRSetACEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Azimuthal Equidistant - pub fn OSRSetAE( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Bonne - pub fn OSRSetBonne( - hSRS: OGRSpatialReferenceH, - dfStandardParallel: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Cylindrical Equal Area - pub fn OSRSetCEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Cassini-Soldner - pub fn OSRSetCS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equidistant Conic - pub fn OSRSetEC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert I-VI - pub fn OSRSetEckert( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert IV - pub fn OSRSetEckertIV( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert VI - pub fn OSRSetEckertVI( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equirectangular - pub fn OSRSetEquirectangular( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equirectangular generalized form - pub fn OSRSetEquirectangular2( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfPseudoStdParallel1: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gall Stereograpic - pub fn OSRSetGS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Goode Homolosine - pub fn OSRSetGH( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Interrupted Goode Homolosine - pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - /// GEOS - Geostationary Satellite View - pub fn OSRSetGEOS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfSatelliteHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gauss Schreiber Transverse Mercator - pub fn OSRSetGaussSchreiberTMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gnomonic - pub fn OSRSetGnomonic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Oblique Mercator (aka HOM (variant B) - pub fn OSRSetOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Hotine Oblique Mercator using azimuth angle - pub fn OSRSetHOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Hotine Oblique Mercator using two points on centerline - pub fn OSRSetHOM2PNO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// International Map of the World Polyconic - pub fn OSRSetIWMPolyconic( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLat2: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Krovak Oblique Conic Conformal - pub fn OSRSetKrovak( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfPseudoStdParallelLat: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Azimuthal Equal-Area - pub fn OSRSetLAEA( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic - pub fn OSRSetLCC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic 1SP - pub fn OSRSetLCC1SP( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic (Belgium) - pub fn OSRSetLCCB( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Miller Cylindrical - pub fn OSRSetMC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Mercator - pub fn OSRSetMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Mollweide - pub fn OSRSetMollweide( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// New Zealand Map Grid - pub fn OSRSetNZMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Oblique Stereographic - pub fn OSRSetOS( - hSRS: OGRSpatialReferenceH, - dfOriginLat: f64, - dfCMeridian: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Orthographic - pub fn OSRSetOrthographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Polyconic - pub fn OSRSetPolyconic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Polar Stereographic - pub fn OSRSetPS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Robinson - pub fn OSRSetRobinson( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Sinusoidal - pub fn OSRSetSinusoidal( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Stereographic - pub fn OSRSetStereographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Swiss Oblique Cylindrical - pub fn OSRSetSOC( - hSRS: OGRSpatialReferenceH, - dfLatitudeOfOrigin: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator - /// - /// Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 : - /// see OGRSpatialReference::exportToProj4(). - pub fn OSRSetTM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator variant - pub fn OSRSetTMVariant( - hSRS: OGRSpatialReferenceH, - pszVariantName: *const libc::c_char, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Tunesia Mining Grid - pub fn OSRSetTMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator (South Oriented) - pub fn OSRSetTMSO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// VanDerGrinten - pub fn OSRSetVDG( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Wagner I -- VII - pub fn OSRSetWagner( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRCleanup(); -} -extern "C" { - pub fn OCTNewCoordinateTransformation( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - ) -> OGRCoordinateTransformationH; -} -extern "C" { - pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); -} -extern "C" { - pub fn OCTTransform( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn OCTTransformEx( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OCTProj4Normalize(pszProj4Src: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn OCTCleanupProjMutex(); -} -pub mod OGRErr { - /// Type for a OGR error - /// - ///
- pub type Type = u32; - /// Success - /// - ///
- pub const OGRERR_NONE: Type = 0; - /// Not enough data to deserialize - /// - ///
- pub const OGRERR_NOT_ENOUGH_DATA: Type = 1; - /// Not enough memory - /// - ///
- pub const OGRERR_NOT_ENOUGH_MEMORY: Type = 2; - /// Unsupported geometry type - /// - ///
- pub const OGRERR_UNSUPPORTED_GEOMETRY_TYPE: Type = 3; - /// Unsupported operation - /// - ///
- pub const OGRERR_UNSUPPORTED_OPERATION: Type = 4; - /// Corrupt data - /// - ///
- pub const OGRERR_CORRUPT_DATA: Type = 5; - /// Failure - /// - ///
- pub const OGRERR_FAILURE: Type = 6; - /// Unsupported SRS - /// - ///
- pub const OGRERR_UNSUPPORTED_SRS: Type = 7; - /// Invalid handle - /// - ///
- pub const INVALID_HANDLE: Type = 8; -} -pub type __builtin_va_list = [__va_list_tag; 1usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __va_list_tag { - pub gp_offset: libc::c_uint, - pub fp_offset: libc::c_uint, - pub overflow_arg_area: *mut libc::c_void, - pub reg_save_area: *mut libc::c_void, -} -#[test] -fn bindgen_test_layout___va_list_tag() { - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} diff --git a/gdal-sys/prebuilt-bindings/gdal_2.0.rs b/gdal-sys/prebuilt-bindings/gdal_2.0.rs deleted file mode 100644 index 6444ca66..00000000 --- a/gdal-sys/prebuilt-bindings/gdal_2.0.rs +++ /dev/null @@ -1,8968 +0,0 @@ -/* automatically generated by rust-bindgen */ - -pub type __dev_t = libc::c_ulong; -pub type __uid_t = libc::c_uint; -pub type __gid_t = libc::c_uint; -pub type __ino_t = libc::c_ulong; -pub type __mode_t = libc::c_uint; -pub type __nlink_t = libc::c_ulong; -pub type __off_t = libc::c_long; -pub type __off64_t = libc::c_long; -pub type __time_t = libc::c_long; -pub type __blksize_t = libc::c_long; -pub type __blkcnt_t = libc::c_long; -pub type __syscall_slong_t = libc::c_long; -pub type FILE = _IO_FILE; -pub type va_list = __builtin_va_list; -pub type _IO_lock_t = libc::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_marker { - pub _next: *mut _IO_marker, - pub _sbuf: *mut _IO_FILE, - pub _pos: libc::c_int, -} -#[test] -fn bindgen_test_layout__IO_marker() { - assert_eq!( - ::std::mem::size_of::<_IO_marker>(), - 24usize, - concat!("Size of: ", stringify!(_IO_marker)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_marker>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_marker)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._next as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._sbuf as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_sbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._pos as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_pos) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_FILE { - pub _flags: libc::c_int, - pub _IO_read_ptr: *mut libc::c_char, - pub _IO_read_end: *mut libc::c_char, - pub _IO_read_base: *mut libc::c_char, - pub _IO_write_base: *mut libc::c_char, - pub _IO_write_ptr: *mut libc::c_char, - pub _IO_write_end: *mut libc::c_char, - pub _IO_buf_base: *mut libc::c_char, - pub _IO_buf_end: *mut libc::c_char, - pub _IO_save_base: *mut libc::c_char, - pub _IO_backup_base: *mut libc::c_char, - pub _IO_save_end: *mut libc::c_char, - pub _markers: *mut _IO_marker, - pub _chain: *mut _IO_FILE, - pub _fileno: libc::c_int, - pub _flags2: libc::c_int, - pub _old_offset: __off_t, - pub _cur_column: libc::c_ushort, - pub _vtable_offset: libc::c_schar, - pub _shortbuf: [libc::c_char; 1usize], - pub _lock: *mut _IO_lock_t, - pub _offset: __off64_t, - pub __pad1: *mut libc::c_void, - pub __pad2: *mut libc::c_void, - pub __pad3: *mut libc::c_void, - pub __pad4: *mut libc::c_void, - pub __pad5: usize, - pub _mode: libc::c_int, - pub _unused2: [libc::c_char; 20usize], -} -#[test] -fn bindgen_test_layout__IO_FILE() { - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad1 as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad2 as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad3 as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad4 as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad4) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} -pub type time_t = __time_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __time_t, - pub tv_nsec: __syscall_slong_t, -} -#[test] -fn bindgen_test_layout_timespec() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tm { - pub tm_sec: libc::c_int, - pub tm_min: libc::c_int, - pub tm_hour: libc::c_int, - pub tm_mday: libc::c_int, - pub tm_mon: libc::c_int, - pub tm_year: libc::c_int, - pub tm_wday: libc::c_int, - pub tm_yday: libc::c_int, - pub tm_isdst: libc::c_int, - pub tm_gmtoff: libc::c_long, - pub tm_zone: *const libc::c_char, -} -#[test] -fn bindgen_test_layout_tm() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tm)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_min as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_hour as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_mday as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_mon as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_year as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_wday as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_yday as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_isdst as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_gmtoff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_zone as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) - ); -} -pub type GInt32 = libc::c_int; -pub type GUInt32 = libc::c_uint; -pub type GInt16 = libc::c_short; -pub type GByte = libc::c_uchar; -pub type GIntBig = libc::c_longlong; -pub type GUIntBig = libc::c_ulonglong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stat { - pub st_dev: __dev_t, - pub st_ino: __ino_t, - pub st_nlink: __nlink_t, - pub st_mode: __mode_t, - pub st_uid: __uid_t, - pub st_gid: __gid_t, - pub __pad0: libc::c_int, - pub st_rdev: __dev_t, - pub st_size: __off_t, - pub st_blksize: __blksize_t, - pub st_blocks: __blkcnt_t, - pub st_atim: timespec, - pub st_mtim: timespec, - pub st_ctim: timespec, - pub __glibc_reserved: [__syscall_slong_t; 3usize], -} -#[test] -fn bindgen_test_layout_stat() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(stat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(stat)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_dev as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_dev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_ino as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_ino) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_nlink as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_nlink) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_mode as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_uid as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_uid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_gid as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_gid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__pad0 as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(__pad0) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_rdev as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_rdev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_size as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_blksize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_blksize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_blocks as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_blocks) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_atim as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_atim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_mtim as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_mtim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_ctim as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_ctim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__glibc_reserved as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(__glibc_reserved) - ) - ); -} -extern "C" { - pub fn VSIFOpen(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut FILE; -} -extern "C" { - pub fn VSIFClose(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFSeek(arg1: *mut FILE, arg2: libc::c_long, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn VSIFTell(arg1: *mut FILE) -> libc::c_long; -} -extern "C" { - pub fn VSIRewind(arg1: *mut FILE); -} -extern "C" { - pub fn VSIFFlush(arg1: *mut FILE); -} -extern "C" { - pub fn VSIFRead(arg1: *mut libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) -> usize; -} -extern "C" { - pub fn VSIFWrite(arg1: *const libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) - -> usize; -} -extern "C" { - pub fn VSIFGets( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *mut FILE, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn VSIFPuts(arg1: *const libc::c_char, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPrintf(arg1: *mut FILE, arg2: *const libc::c_char, ...) -> libc::c_int; -} -extern "C" { - pub fn VSIFGetc(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPutc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIUngetc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFEof(arg1: *mut FILE) -> libc::c_int; -} -pub type VSIStatBuf = stat; -extern "C" { - pub fn VSIStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; -} -pub type vsi_l_offset = GUIntBig; -pub type VSILFILE = FILE; -extern "C" { - pub fn VSIFOpenL(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut VSILFILE; -} -extern "C" { - pub fn VSIFCloseL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFSeekL(arg1: *mut VSILFILE, arg2: vsi_l_offset, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn VSIFTellL(arg1: *mut VSILFILE) -> vsi_l_offset; -} -extern "C" { - pub fn VSIRewindL(arg1: *mut VSILFILE); -} -extern "C" { - pub fn VSIFReadL( - arg1: *mut libc::c_void, - arg2: usize, - arg3: usize, - arg4: *mut VSILFILE, - ) -> usize; -} -extern "C" { - pub fn VSIFReadMultiRangeL( - nRanges: libc::c_int, - ppData: *mut *mut libc::c_void, - panOffsets: *const vsi_l_offset, - panSizes: *const usize, - arg1: *mut VSILFILE, - ) -> libc::c_int; -} -extern "C" { - pub fn VSIFWriteL( - arg1: *const libc::c_void, - arg2: usize, - arg3: usize, - arg4: *mut VSILFILE, - ) -> usize; -} -extern "C" { - pub fn VSIFEofL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFTruncateL(arg1: *mut VSILFILE, arg2: vsi_l_offset) -> libc::c_int; -} -extern "C" { - pub fn VSIFFlushL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPrintfL(arg1: *mut VSILFILE, arg2: *const libc::c_char, ...) -> libc::c_int; -} -extern "C" { - pub fn VSIFPutcL(arg1: libc::c_int, arg2: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIIngestFile( - fp: *mut VSILFILE, - pszFilename: *const libc::c_char, - ppabyRet: *mut *mut GByte, - pnSize: *mut vsi_l_offset, - nMaxSize: GIntBig, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stat64 { - _unused: [u8; 0], -} -pub type VSIStatBufL = stat64; -extern "C" { - pub fn VSIStatL(arg1: *const libc::c_char, arg2: *mut VSIStatBufL) -> libc::c_int; -} -extern "C" { - pub fn VSIStatExL( - pszFilename: *const libc::c_char, - psStatBuf: *mut VSIStatBufL, - nFlags: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn VSIIsCaseSensitiveFS(pszFilename: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIFGetNativeFileDescriptorL(arg1: *mut VSILFILE) -> *mut libc::c_void; -} -extern "C" { - pub fn VSICalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIFree(arg1: *mut libc::c_void); -} -extern "C" { - pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - /// VSIMalloc2 allocates (nSize1 * nSize2) bytes. - /// In case of overflow of the multiplication, or if memory allocation fails, a - /// NULL pointer is returned and a CE_Failure error is raised with CPLError(). - /// If nSize1 == 0 || nSize2 == 0, a NULL pointer will also be returned. - /// CPLFree() or VSIFree() can be used to free memory allocated by this function. - pub fn VSIMalloc2(nSize1: usize, nSize2: usize) -> *mut libc::c_void; -} -extern "C" { - /// VSIMalloc3 allocates (nSize1 * nSize2 * nSize3) bytes. - /// In case of overflow of the multiplication, or if memory allocation fails, a - /// NULL pointer is returned and a CE_Failure error is raised with CPLError(). - /// If nSize1 == 0 || nSize2 == 0 || nSize3 == 0, a NULL pointer will also be returned. - /// CPLFree() or VSIFree() can be used to free memory allocated by this function. - pub fn VSIMalloc3(nSize1: usize, nSize2: usize, nSize3: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLGetPhysicalRAM() -> GIntBig; -} -extern "C" { - pub fn CPLGetUsablePhysicalRAM() -> GIntBig; -} -extern "C" { - pub fn VSIReadDir(arg1: *const libc::c_char) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn VSIReadDirRecursive(pszPath: *const libc::c_char) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn VSIMkdir(pathname: *const libc::c_char, mode: libc::c_long) -> libc::c_int; -} -extern "C" { - pub fn VSIRmdir(pathname: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIUnlink(pathname: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIRename(oldpath: *const libc::c_char, newpath: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIStrerror(arg1: libc::c_int) -> *mut libc::c_char; -} -extern "C" { - pub fn VSIInstallMemFileHandler(); -} -extern "C" { - pub fn VSIInstallLargeFileHandler(); -} -extern "C" { - pub fn VSIInstallSubFileHandler(); -} -extern "C" { - pub fn VSIInstallCurlFileHandler(); -} -extern "C" { - pub fn VSIInstallCurlStreamingFileHandler(); -} -extern "C" { - pub fn VSIInstallGZipFileHandler(); -} -extern "C" { - pub fn VSIInstallZipFileHandler(); -} -extern "C" { - pub fn VSIInstallStdinHandler(); -} -extern "C" { - pub fn VSIInstallStdoutHandler(); -} -extern "C" { - pub fn VSIInstallSparseFileHandler(); -} -extern "C" { - pub fn VSIInstallTarFileHandler(); -} -extern "C" { - pub fn VSICleanupFileManager(); -} -extern "C" { - pub fn VSIFileFromMemBuffer( - pszFilename: *const libc::c_char, - pabyData: *mut GByte, - nDataLength: vsi_l_offset, - bTakeOwnership: libc::c_int, - ) -> *mut VSILFILE; -} -extern "C" { - pub fn VSIGetMemFileBuffer( - pszFilename: *const libc::c_char, - pnDataLength: *mut vsi_l_offset, - bUnlinkAndSeize: libc::c_int, - ) -> *mut GByte; -} -pub type VSIWriteFunction = ::std::option::Option< - unsafe extern "C" fn(ptr: *const libc::c_void, size: usize, nmemb: usize, stream: *mut FILE) - -> usize, ->; -extern "C" { - pub fn VSIStdoutSetRedirection(pFct: VSIWriteFunction, stream: *mut FILE); -} -extern "C" { - pub fn VSITime(arg1: *mut libc::c_ulong) -> libc::c_ulong; -} -extern "C" { - pub fn VSICTime(arg1: libc::c_ulong) -> *const libc::c_char; -} -extern "C" { - pub fn VSIGMTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; -} -extern "C" { - pub fn VSILocalTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; -} -pub mod CPLErr { - /// \file cpl_error.h - /// - /// CPL error handling services. - pub type Type = u32; - pub const CE_None: Type = 0; - pub const CE_Debug: Type = 1; - pub const CE_Warning: Type = 2; - pub const CE_Failure: Type = 3; - pub const CE_Fatal: Type = 4; -} -extern "C" { - pub fn CPLError(eErrClass: CPLErr::Type, err_no: libc::c_int, fmt: *const libc::c_char, ...); -} -extern "C" { - pub fn CPLErrorV( - arg1: CPLErr::Type, - arg2: libc::c_int, - arg3: *const libc::c_char, - arg4: *mut __va_list_tag, - ); -} -extern "C" { - pub fn CPLEmergencyError(arg1: *const libc::c_char); -} -extern "C" { - pub fn CPLErrorReset(); -} -extern "C" { - pub fn CPLGetLastErrorNo() -> libc::c_int; -} -extern "C" { - pub fn CPLGetLastErrorType() -> CPLErr::Type; -} -extern "C" { - pub fn CPLGetLastErrorMsg() -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetErrorHandlerUserData() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLErrorSetState( - eErrClass: CPLErr::Type, - err_no: libc::c_int, - pszMsg: *const libc::c_char, - ); -} -extern "C" { - pub fn CPLCleanupErrorMutex(); -} -pub type CPLErrorHandler = ::std::option::Option< - unsafe extern "C" fn(arg1: CPLErr::Type, arg2: libc::c_int, arg3: *const libc::c_char), ->; -extern "C" { - pub fn CPLLoggingErrorHandler(arg1: CPLErr::Type, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLDefaultErrorHandler(arg1: CPLErr::Type, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLQuietErrorHandler(arg1: CPLErr::Type, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLTurnFailureIntoWarning(bOn: libc::c_int); -} -extern "C" { - pub fn CPLSetErrorHandler(arg1: CPLErrorHandler) -> CPLErrorHandler; -} -extern "C" { - pub fn CPLSetErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void) -> CPLErrorHandler; -} -extern "C" { - pub fn CPLPushErrorHandler(arg1: CPLErrorHandler); -} -extern "C" { - pub fn CPLPushErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void); -} -extern "C" { - pub fn CPLPopErrorHandler(); -} -extern "C" { - pub fn CPLDebug(arg1: *const libc::c_char, arg2: *const libc::c_char, ...); -} -extern "C" { - /// \file cpl_conv.h - /// - /// Various convenience functions for CPL. - /// - pub fn CPLVerifyConfiguration(); -} -extern "C" { - pub fn CPLGetConfigOption( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLSetConfigOption(arg1: *const libc::c_char, arg2: *const libc::c_char); -} -extern "C" { - pub fn CPLSetThreadLocalConfigOption( - pszKey: *const libc::c_char, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn CPLFreeConfig(); -} -extern "C" { - pub fn CPLMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLStrlwr(arg1: *mut libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLFGets( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *mut FILE, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLReadLine(arg1: *mut FILE) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLineL(arg1: *mut VSILFILE) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLine2L( - arg1: *mut VSILFILE, - nMaxCols: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLAtof(arg1: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLAtofDelim(arg1: *const libc::c_char, arg2: libc::c_char) -> f64; -} -extern "C" { - pub fn CPLStrtod(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn CPLStrtodDelim( - arg1: *const libc::c_char, - arg2: *mut *mut libc::c_char, - arg3: libc::c_char, - ) -> f64; -} -extern "C" { - pub fn CPLStrtof(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f32; -} -extern "C" { - pub fn CPLStrtofDelim( - arg1: *const libc::c_char, - arg2: *mut *mut libc::c_char, - arg3: libc::c_char, - ) -> f32; -} -extern "C" { - pub fn CPLAtofM(arg1: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLScanString( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLScanDouble(arg1: *const libc::c_char, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn CPLScanLong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_long; -} -extern "C" { - pub fn CPLScanULong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_ulong; -} -extern "C" { - pub fn CPLScanUIntBig(arg1: *const libc::c_char, arg2: libc::c_int) -> GUIntBig; -} -extern "C" { - pub fn CPLAtoGIntBig(pszString: *const libc::c_char) -> GIntBig; -} -extern "C" { - pub fn CPLAtoGIntBigEx( - pszString: *const libc::c_char, - bWarn: libc::c_int, - pbOverflow: *mut libc::c_int, - ) -> GIntBig; -} -extern "C" { - pub fn CPLScanPointer(arg1: *const libc::c_char, arg2: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLPrintString( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintStringFill( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintInt32(arg1: *mut libc::c_char, arg2: GInt32, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintUIntBig( - arg1: *mut libc::c_char, - arg2: GUIntBig, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintDouble( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: f64, - arg4: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintTime( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *const libc::c_char, - arg4: *const tm, - arg5: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintPointer( - arg1: *mut libc::c_char, - arg2: *mut libc::c_void, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLGetSymbol(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLGetExecPath(pszPathBuf: *mut libc::c_char, nMaxLength: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn CPLGetPath(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetDirname(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetFilename(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetBasename(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetExtension(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetCurrentDir() -> *mut libc::c_char; -} -extern "C" { - pub fn CPLFormFilename( - pszPath: *const libc::c_char, - pszBasename: *const libc::c_char, - pszExtension: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLFormCIFilename( - pszPath: *const libc::c_char, - pszBasename: *const libc::c_char, - pszExtension: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLResetExtension( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLProjectRelativeFilename( - pszProjectDir: *const libc::c_char, - pszSecondaryFilename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLIsFilenameRelative(pszFilename: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn CPLExtractRelativePath( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCleanTrailingSlash(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCorrespondingPaths( - pszOldFilename: *const libc::c_char, - pszNewFilename: *const libc::c_char, - papszFileList: *mut *mut libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn CPLCheckForFile( - pszFilename: *mut libc::c_char, - papszSiblingList: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLGenerateTempFilename(pszStem: *const libc::c_char) -> *const libc::c_char; -} -pub type CPLFileFinder = ::std::option::Option< - unsafe extern "C" fn(arg1: *const libc::c_char, arg2: *const libc::c_char) - -> *const libc::c_char, ->; -extern "C" { - pub fn CPLFindFile( - pszClass: *const libc::c_char, - pszBasename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLDefaultFindFile( - pszClass: *const libc::c_char, - pszBasename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLPushFileFinder(pfnFinder: CPLFileFinder); -} -extern "C" { - pub fn CPLPopFileFinder() -> CPLFileFinder; -} -extern "C" { - pub fn CPLPushFinderLocation(arg1: *const libc::c_char); -} -extern "C" { - pub fn CPLPopFinderLocation(); -} -extern "C" { - pub fn CPLFinderClean(); -} -extern "C" { - pub fn CPLStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLSharedFileInfo { - pub fp: *mut FILE, - pub nRefCount: libc::c_int, - pub bLarge: libc::c_int, - pub pszFilename: *mut libc::c_char, - pub pszAccess: *mut libc::c_char, -} -#[test] -fn bindgen_test_layout_CPLSharedFileInfo() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLSharedFileInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLSharedFileInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(fp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nRefCount as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(nRefCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bLarge as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(bLarge) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszFilename as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(pszFilename) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAccess as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(pszAccess) - ) - ); -} -extern "C" { - pub fn CPLOpenShared( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *mut FILE; -} -extern "C" { - pub fn CPLCloseShared(arg1: *mut FILE); -} -extern "C" { - pub fn CPLGetSharedList(arg1: *mut libc::c_int) -> *mut CPLSharedFileInfo; -} -extern "C" { - pub fn CPLDumpSharedList(arg1: *mut FILE); -} -extern "C" { - pub fn CPLCleanupSharedFileMutex(); -} -extern "C" { - pub fn CPLDMSToDec(is: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLDecToDMS( - dfAngle: f64, - pszAxis: *const libc::c_char, - nPrecision: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLPackedDMSToDec(arg1: f64) -> f64; -} -extern "C" { - pub fn CPLDecToPackedDMS(dfDec: f64) -> f64; -} -extern "C" { - pub fn CPLStringToComplex(pszString: *const libc::c_char, pdfReal: *mut f64, pdfImag: *mut f64); -} -extern "C" { - pub fn CPLUnlinkTree(arg1: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn CPLCopyFile( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLCopyTree( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLMoveFile( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLCreateZip( - pszZipFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateFileInZip( - hZip: *mut libc::c_void, - pszFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn CPLWriteFileInZip( - hZip: *mut libc::c_void, - pBuffer: *const libc::c_void, - nBufferSize: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn CPLCloseFileInZip(hZip: *mut libc::c_void) -> CPLErr::Type; -} -extern "C" { - pub fn CPLCloseZip(hZip: *mut libc::c_void) -> CPLErr::Type; -} -extern "C" { - pub fn CPLZLibDeflate( - ptr: *const libc::c_void, - nBytes: usize, - nLevel: libc::c_int, - outptr: *mut libc::c_void, - nOutAvailableBytes: usize, - pnOutBytes: *mut usize, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLZLibInflate( - ptr: *const libc::c_void, - nBytes: usize, - outptr: *mut libc::c_void, - nOutAvailableBytes: usize, - pnOutBytes: *mut usize, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLValidateXML( - pszXMLFilename: *const libc::c_char, - pszXSDFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLsetlocale(category: libc::c_int, locale: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLCleanupSetlocaleMutex(); -} -pub type GDALProgressFunc = ::std::option::Option< - unsafe extern "C" fn( - dfComplete: f64, - pszMessage: *const libc::c_char, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALDummyProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTermProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALScaledProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateScaledProgress( - arg1: f64, - arg2: f64, - arg3: GDALProgressFunc, - arg4: *mut libc::c_void, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyScaledProgress(arg1: *mut libc::c_void); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLVirtualMem { - _unused: [u8; 0], -} -/// Callback triggered when a still unmapped page of virtual memory is accessed. -/// The callback has the responsibility of filling the page with relevant values -/// -/// @param ctxt virtual memory handle. -/// @param nOffset offset of the page in the memory mapping. -/// @param pPageToFill address of the page to fill. Note that the address might -/// be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset. -/// @param nToFill number of bytes of the page. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToFill: *mut libc::c_void, - nToFill: usize, - pUserData: *mut libc::c_void, - ), ->; -/// Callback triggered when a dirty mapped page is going to be freed. -/// (saturation of cache, or termination of the virtual memory mapping). -/// -/// @param ctxt virtual memory handle. -/// @param nOffset offset of the page in the memory mapping. -/// @param pPageToBeEvicted address of the page that will be flushed. Note that the address might -/// be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset. -/// @param nToBeEvicted number of bytes of the page. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToBeEvicted: *const libc::c_void, - nToBeEvicted: usize, - pUserData: *mut libc::c_void, - ), ->; -/// Callback triggered when a virtual memory mapping is destroyed. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemFreeUserData = - ::std::option::Option; -pub mod CPLVirtualMemAccessMode { - /// Access mode of a virtual memory mapping. - pub type Type = u32; - /// The mapping is meant at being read-only, but writes will not be prevented. - /// Note that any content written will be lost. - pub const VIRTUALMEM_READONLY: Type = 0; - /// The mapping is meant at being read-only, and this will be enforced - /// through the operating system page protection mechanism. - pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; - /// The mapping is meant at being read-write, and modified pages can be saved - /// thanks to the pfnUnCachePage callback - pub const VIRTUALMEM_READWRITE: Type = 2; -} -extern "C" { - /// Return the size of a page of virtual memory. - /// - /// @return the page size. - /// - /// @since GDAL 1.11 - pub fn CPLGetPageSize() -> usize; -} -extern "C" { - /// Create a new virtual memory mapping. - /// - /// This will reserve an area of virtual memory of size nSize, whose size - /// might be potentially much larger than the physical memory available. Initially, - /// no physical memory will be allocated. As soon as memory pages will be accessed, - /// they will be allocated transparently and filled with the pfnCachePage callback. - /// When the allowed cache size is reached, the least recently used pages will - /// be unallocated. - /// - /// On Linux AMD64 platforms, the maximum value for nSize is 128 TB. - /// On Linux x86 platforms, the maximum value for nSize is 2 GB. - /// - /// Only supported on Linux for now. - /// - /// Note that on Linux, this function will install a SIGSEGV handler. The - /// original handler will be restored by CPLVirtualMemManagerTerminate(). - /// - /// @param nSize size in bytes of the virtual memory mapping. - /// @param nCacheSize size in bytes of the maximum memory that will be really - /// allocated (must ideally fit into RAM). - /// @param nPageSizeHint hint for the page size. Must be a multiple of the - /// system page size, returned by CPLGetPageSize(). - /// Minimum value is generally 4096. Might be set to 0 to - /// let the function determine a default page size. - /// @param bSingleThreadUsage set to TRUE if there will be no concurrent threads - /// that will access the virtual memory mapping. This can - /// optimize performance a bit. - /// @param eAccessMode permission to use for the virtual memory mapping. - /// @param pfnCachePage callback triggered when a still unmapped page of virtual - /// memory is accessed. The callback has the responsibility - /// of filling the page with relevant values. - /// @param pfnUnCachePage callback triggered when a dirty mapped page is going to - /// be freed (saturation of cache, or termination of the - /// virtual memory mapping). Might be NULL. - /// @param pfnFreeUserData callback that can be used to free pCbkUserData. Might be - /// NULL - /// @param pCbkUserData user data passed to pfnCachePage and pfnUnCachePage. - /// - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemNew( - nSize: usize, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnCachePage: CPLVirtualMemCachePageCbk, - pfnUnCachePage: CPLVirtualMemUnCachePageCbk, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Return if virtual memory mapping of a file is available. - /// - /// @return TRUE if virtual memory mapping of a file is available. - /// @since GDAL 1.11 - pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; -} -extern "C" { - /// Create a new virtual memory mapping from a file. - /// - /// The file must be a "real" file recognized by the operating system, and not - /// a VSI extended virtual file. - /// - /// In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written - /// in the file. - /// - /// On Linux AMD64 platforms, the maximum value for nLength is 128 TB. - /// On Linux x86 platforms, the maximum value for nLength is 2 GB. - /// - /// Only supported on Linux for now. - /// - /// @param fp Virtual file handle. - /// @param nOffset Offset in the file to start the mapping from. - /// @param nLength Length of the portion of the file to map into memory. - /// @param eAccessMode Permission to use for the virtual memory mapping. This must - /// be consistent with how the file has been opened. - /// @param pfnFreeUserData callback that is called when the object is destroyed. - /// @param pCbkUserData user data passed to pfnFreeUserData. - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemFileMapNew( - fp: *mut VSILFILE, - nOffset: vsi_l_offset, - nLength: vsi_l_offset, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Create a new virtual memory mapping derived from an other virtual memory - /// mapping. - /// - /// This may be useful in case of creating mapping for pixel interleaved data. - /// - /// The new mapping takes a reference on the base mapping. - /// - /// @param pVMemBase Base virtual memory mapping - /// @param nOffset Offset in the base virtual memory mapping from which to start - /// the new mapping. - /// @param nSize Size of the base virtual memory mapping to expose in the - /// the new mapping. - /// @param pfnFreeUserData callback that is called when the object is destroyed. - /// @param pCbkUserData user data passed to pfnFreeUserData. - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemDerivedNew( - pVMemBase: *mut CPLVirtualMem, - nOffset: vsi_l_offset, - nSize: vsi_l_offset, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Free a virtual memory mapping. - /// - /// The pointer returned by CPLVirtualMemGetAddr() will no longer be valid. - /// If the virtual memory mapping was created with read/write permissions and that - /// they are dirty (i.e. modified) pages, they will be flushed through the - /// pfnUnCachePage callback before being freed. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Return the pointer to the start of a virtual memory mapping. - /// - /// The bytes in the range [p:p+CPLVirtualMemGetSize()-1] where p is the pointer - /// returned by this function will be valid, until CPLVirtualMemFree() is called. - /// - /// Note that if a range of bytes used as an argument of a system call - /// (such as read() or write()) contains pages that have not been "realized", the - /// system call will fail with EFAULT. CPLVirtualMemPin() can be used to work - /// around this issue. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the pointer to the start of a virtual memory mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; -} -extern "C" { - /// Return the size of the virtual memory mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the size of the virtual memory mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; -} -extern "C" { - /// Return if the virtal memory mapping is a direct file mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return TRUE if the virtal memory mapping is a direct file mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; -} -extern "C" { - /// Return the access mode of the virtual memory mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the access mode of the virtual memory mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; -} -extern "C" { - /// Return the page size associated to a virtual memory mapping. - /// - /// The value returned will be at least CPLGetPageSize(), but potentially - /// larger. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the page size - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; -} -extern "C" { - /// Return TRUE if this memory mapping can be accessed safely from concurrent - /// threads. - /// - /// The situation that can cause problems is when several threads try to access - /// a page of the mapping that is not yet mapped. - /// - /// The return value of this function depends on whether bSingleThreadUsage has - /// been set of not in CPLVirtualMemNew() and/or the implementation. - /// - /// On Linux, this will always return TRUE if bSingleThreadUsage = FALSE. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return TRUE if this memory mapping can be accessed safely from concurrent - /// threads. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; -} -extern "C" { - /// Declare that a thread will access a virtual memory mapping. - /// - /// This function must be called by a thread that wants to access the - /// content of a virtual memory mapping, except if the virtual memory mapping has - /// been created with bSingleThreadUsage = TRUE. - /// - /// This function must be paired with CPLVirtualMemUnDeclareThread(). - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Declare that a thread will stop accessing a virtual memory mapping. - /// - /// This function must be called by a thread that will no longer access the - /// content of a virtual memory mapping, except if the virtual memory mapping has - /// been created with bSingleThreadUsage = TRUE. - /// - /// This function must be paired with CPLVirtualMemDeclareThread(). - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Make sure that a region of virtual memory will be realized. - /// - /// Calling this function is not required, but might be useful when debugging - /// a process with tools like gdb or valgrind that do not naturally like - /// segmentation fault signals. - /// - /// It is also needed when wanting to provide part of virtual memory mapping - /// to a system call such as read() or write(). If read() or write() is called - /// on a memory region not yet realized, the call will fail with EFAULT. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @param pAddr the memory region to pin. - /// @param nSize the size of the memory region. - /// @param bWriteOp set to TRUE if the memory are will be accessed in write mode. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemPin( - ctxt: *mut CPLVirtualMem, - pAddr: *mut libc::c_void, - nSize: usize, - bWriteOp: libc::c_int, - ); -} -extern "C" { - /// Cleanup any resource and handlers related to virtual memory. - /// - /// This function must be called after the last CPLVirtualMem object has - /// been freed. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemManagerTerminate(); -} -pub mod CPLXMLNodeType { - /// \file cpl_minixml.h - /// - /// Definitions for CPL mini XML Parser/Serializer. - pub type Type = u32; - /// Node is an element - pub const CXT_Element: Type = 0; - /// Node is a raw text value - pub const CXT_Text: Type = 1; - /// Node is attribute - pub const CXT_Attribute: Type = 2; - /// Node is an XML comment. - pub const CXT_Comment: Type = 3; - /// Node is a special literal - pub const CXT_Literal: Type = 4; -} -/// Document node structure. -/// -/// This C structure is used to hold a single text fragment representing a -/// component of the document when parsed. It should be allocated with the -/// appropriate CPL function, and freed with CPLDestroyXMLNode(). The structure -/// contents should not normally be altered by application code, but may be -/// freely examined by application code. -/// -/// Using the psChild and psNext pointers, a heirarchical tree structure -/// for a document can be represented as a tree of CPLXMLNode structures. -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLXMLNode { - /// \brief Node type - /// - /// One of CXT_Element, CXT_Text, CXT_Attribute, CXT_Comment, - /// or CXT_Literal. - pub eType: CPLXMLNodeType::Type, - /// \brief Node value - /// - /// For CXT_Element this is the name of the element, without the angle - /// brackets. Note there is a single CXT_Element even when the document - /// contains a start and end element tag. The node represents the pair. - /// All text or other elements between the start and end tag will appear - /// as children nodes of this CXT_Element node. - /// - /// For CXT_Attribute the pszValue is the attribute name. The value of - /// the attribute will be a CXT_Text child. - /// - /// For CXT_Text this is the text itself (value of an attribute, or a - /// text fragment between an element start and end tags. - /// - /// For CXT_Literal it is all the literal text. Currently this is just - /// used for !DOCTYPE lines, and the value would be the entire line. - /// - /// For CXT_Comment the value is all the literal text within the comment, - /// but not including the comment start/end indicators ("<--" and "-->"). - pub pszValue: *mut libc::c_char, - /// \brief Next sibling. - /// - /// Pointer to next sibling, that is the next node appearing after this - /// one that has the same parent as this node. NULL if this node is the - /// last child of the parent element. - pub psNext: *mut CPLXMLNode, - /// \brief Child node. - /// - /// Pointer to first child node, if any. Only CXT_Element and CXT_Attribute - /// nodes should have children. For CXT_Attribute it should be a single - /// CXT_Text value node, while CXT_Element can have any kind of child. - /// The full list of children for a node are identified by walking the - /// psNext's starting with the psChild node. - pub psChild: *mut CPLXMLNode, -} -#[test] -fn bindgen_test_layout_CPLXMLNode() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLXMLNode)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLXMLNode)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(eType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(pszValue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psNext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psChild) - ) - ); -} -extern "C" { - pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSearchXMLNode( - poRoot: *mut CPLXMLNode, - pszTarget: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLGetXMLValue( - poRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszDefault: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCreateXMLNode( - poParent: *mut CPLXMLNode, - eType: CPLXMLNodeType::Type, - pszText: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; -} -extern "C" { - pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLCreateXMLElementAndValue( - psParent: *mut CPLXMLNode, - pszName: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLAddXMLAttributeAndValue( - psParent: *mut CPLXMLNode, - pszName: *const libc::c_char, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn CPLCloneXMLTree(psTree: *mut CPLXMLNode) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSetXMLValue( - psRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLStripXMLNamespace( - psRoot: *mut CPLXMLNode, - pszNameSpace: *const libc::c_char, - bRecurse: libc::c_int, - ); -} -extern "C" { - pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); -} -extern "C" { - pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSerializeXMLTreeToFile( - psTree: *const CPLXMLNode, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, -} -#[test] -fn bindgen_test_layout_OGREnvelope() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(OGREnvelope)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxY) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope3D { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, - pub MinZ: f64, - pub MaxZ: f64, -} -#[test] -fn bindgen_test_layout_OGREnvelope3D() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(OGREnvelope3D)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope3D)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxZ) - ) - ); -} -extern "C" { - pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn OGRFree(arg1: *mut libc::c_void); -} -pub mod OGRwkbGeometryType { - /// List of well known binary geometry types. These are used within the BLOBs - /// but are also returned from OGRGeometry::getGeometryType() to identify the - /// type of a geometry object. - pub type Type = u32; - /// < unknown type, non-standard - pub const wkbUnknown: Type = 0; - /// < 0-dimensional geometric object, standard WKB - pub const wkbPoint: Type = 1; - /// < 1-dimensional geometric object with linear - /// interpolation between Points, standard WKB - pub const wkbLineString: Type = 2; - /// < planar 2-dimensional geometric object defined - /// by 1 exterior boundary and 0 or more interior - /// boundaries, standard WKB - pub const wkbPolygon: Type = 3; - /// < GeometryCollection of Points, standard WKB - pub const wkbMultiPoint: Type = 4; - /// < GeometryCollection of LineStrings, standard WKB - pub const wkbMultiLineString: Type = 5; - /// < GeometryCollection of Polygons, standard WKB - pub const wkbMultiPolygon: Type = 6; - /// < geometric object that is a collection of 1 - /// or more geometric objects, standard WKB - pub const wkbGeometryCollection: Type = 7; - /// < one or more circular arc segments connected end to end, - /// ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCircularString: Type = 8; - /// < sequence of contiguous curves, ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCompoundCurve: Type = 9; - /// < planar surface, defined by 1 exterior boundary - /// and zero or more interior boundaries, that are curves. - /// ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCurvePolygon: Type = 10; - /// < GeometryCollection of Curves, ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiCurve: Type = 11; - /// < GeometryCollection of Surfaces, ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiSurface: Type = 12; - /// < non-standard, for pure attribute records - pub const wkbNone: Type = 100; - /// < non-standard, just for createGeometry() - pub const wkbLinearRing: Type = 101; - /// < wkbCircularString with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCircularStringZ: Type = 1008; - /// < wkbCompoundCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCompoundCurveZ: Type = 1009; - /// < wkbCurvePolygon with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCurvePolygonZ: Type = 1010; - /// < wkbMultiCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiCurveZ: Type = 1011; - /// < wkbMultiSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiSurfaceZ: Type = 1012; - /// < 2.5D extension as per 99-402 - pub const wkbPoint25D: Type = 2147483649; - /// < 2.5D extension as per 99-402 - pub const wkbLineString25D: Type = 2147483650; - /// < 2.5D extension as per 99-402 - pub const wkbPolygon25D: Type = 2147483651; - /// < 2.5D extension as per 99-402 - pub const wkbMultiPoint25D: Type = 2147483652; - /// < 2.5D extension as per 99-402 - pub const wkbMultiLineString25D: Type = 2147483653; - /// < 2.5D extension as per 99-402 - pub const wkbMultiPolygon25D: Type = 2147483654; - /// < 2.5D extension as per 99-402 - pub const wkbGeometryCollection25D: Type = 2147483655; -} -extern "C" { - pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGRMergeGeometryTypes( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGRMergeGeometryTypesEx( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - bAllowPromotingToCurves: libc::c_int, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetModifier( - eType: OGRwkbGeometryType::Type, - bSetZ: libc::c_int, - bSetM: libc::c_int, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsSubClassOf( - eType: OGRwkbGeometryType::Type, - eSuperType: OGRwkbGeometryType::Type, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -pub mod OGRwkbByteOrder { - pub type Type = u32; - pub const wkbXDR: Type = 0; - pub const wkbNDR: Type = 1; -} -pub mod OGRFieldType { - /// List of feature field types. This list is likely to be extended in the - /// future ... avoid coding applications based on the assumption that all - /// field types can be known. - pub type Type = u32; - /// Simple 32bit integer - pub const OFTInteger: Type = 0; - /// List of 32bit integers - pub const OFTIntegerList: Type = 1; - /// Double Precision floating point - pub const OFTReal: Type = 2; - /// List of doubles - pub const OFTRealList: Type = 3; - /// String of ASCII chars - pub const OFTString: Type = 4; - /// Array of strings - pub const OFTStringList: Type = 5; - /// deprecated - pub const OFTWideString: Type = 6; - /// deprecated - pub const OFTWideStringList: Type = 7; - /// Raw Binary data - pub const OFTBinary: Type = 8; - /// Date - pub const OFTDate: Type = 9; - /// Time - pub const OFTTime: Type = 10; - /// Date and Time - pub const OFTDateTime: Type = 11; - /// Single 64bit integer - pub const OFTInteger64: Type = 12; - /// List of 64bit integers - pub const OFTInteger64List: Type = 13; - /// List of 64bit integers - pub const OFTMaxType: Type = 13; -} -pub mod OGRFieldSubType { - /// List of field subtypes. A subtype represents a hint, a restriction of the - /// main type, that is not strictly necessary to consult. - /// This list is likely to be extended in the - /// future ... avoid coding applications based on the assumption that all - /// field types can be known. - /// Most subtypes only make sense for a restricted set of main types. - /// @since GDAL 2.0 - pub type Type = u32; - /// No subtype. This is the default value - pub const OFSTNone: Type = 0; - /// Boolean integer. Only valid for OFTInteger and OFTIntegerList. - pub const OFSTBoolean: Type = 1; - /// Signed 16-bit integer. Only valid for OFTInteger and OFTIntegerList. - pub const OFSTInt16: Type = 2; - /// Single precision (32 bit) floatint point. Only valid for OFTReal and OFTRealList. - pub const OFSTFloat32: Type = 3; - /// Single precision (32 bit) floatint point. Only valid for OFTReal and OFTRealList. - pub const OFSTMaxSubType: Type = 3; -} -pub mod OGRJustification { - /// Display justification for field values. - pub type Type = u32; - pub const OJUndefined: Type = 0; - pub const OJLeft: Type = 1; - pub const OJRight: Type = 2; -} -/// OGRFeature field attribute value union. -#[repr(C)] -#[derive(Copy, Clone)] -pub union OGRField { - pub Integer: libc::c_int, - pub Integer64: GIntBig, - pub Real: f64, - pub String: *mut libc::c_char, - pub IntegerList: OGRField__bindgen_ty_1, - pub Integer64List: OGRField__bindgen_ty_2, - pub RealList: OGRField__bindgen_ty_3, - pub StringList: OGRField__bindgen_ty_4, - pub Binary: OGRField__bindgen_ty_5, - pub Set: OGRField__bindgen_ty_6, - pub Date: OGRField__bindgen_ty_7, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_1 { - pub nCount: libc::c_int, - pub paList: *mut libc::c_int, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_2 { - pub nCount: libc::c_int, - pub paList: *mut GIntBig, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_3 { - pub nCount: libc::c_int, - pub paList: *mut f64, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_4 { - pub nCount: libc::c_int, - pub paList: *mut *mut libc::c_char, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_4() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_5 { - pub nCount: libc::c_int, - pub paData: *mut GByte, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_5() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(paData) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_6 { - pub nMarker1: libc::c_int, - pub nMarker2: libc::c_int, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_6() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker2) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_7 { - pub Year: GInt16, - pub Month: GByte, - pub Day: GByte, - pub Hour: GByte, - pub Minute: GByte, - pub TZFlag: GByte, - pub Reserved: GByte, - pub Second: f32, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_7() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Month) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Day) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Minute) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(TZFlag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Reserved) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Second) - ) - ); -} -#[test] -fn bindgen_test_layout_OGRField() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Real) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(String) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(IntegerList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64List) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(RealList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(StringList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Binary) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Set) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Date) - ) - ); -} -extern "C" { - pub fn OGRParseDate( - pszInput: *const libc::c_char, - psOutput: *mut OGRField, - nOptions: libc::c_int, - ) -> libc::c_int; -} -pub mod ogr_style_tool_class_id { - /// OGRStyleTool derived class types (returned by GetType()). - pub type Type = u32; - pub const OGRSTCNone: Type = 0; - pub const OGRSTCPen: Type = 1; - pub const OGRSTCBrush: Type = 2; - pub const OGRSTCSymbol: Type = 3; - pub const OGRSTCLabel: Type = 4; - pub const OGRSTCVector: Type = 5; -} -pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; -pub mod ogr_style_tool_units_id { - /// List of units supported by OGRStyleTools. - pub type Type = u32; - pub const OGRSTUGround: Type = 0; - pub const OGRSTUPixel: Type = 1; - pub const OGRSTUPoints: Type = 2; - pub const OGRSTUMM: Type = 3; - pub const OGRSTUCM: Type = 4; - pub const OGRSTUInches: Type = 5; -} -pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; -extern "C" { - pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - /// Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor. - /// - /// The purpose of this method is to ensure that calling code will run with the GDAL - /// version it is compiled for. It is primarly intented for external plugins. - /// - /// @param nVersionMajor Major version to be tested against - /// @param nVersionMinor Minor version to be tested against - /// @param pszCallingComponentName If not NULL, in case of version mismatch, the method - /// will issue a failure mentionning the name of - /// the calling component. - pub fn GDALCheckVersion( - nVersionMajor: libc::c_int, - nVersionMinor: libc::c_int, - pszCallingComponentName: *const libc::c_char, - ) -> libc::c_int; -} -pub type OGRGeometryH = *mut libc::c_void; -pub type OGRSpatialReferenceH = *mut libc::c_void; -pub type OGRCoordinateTransformationH = *mut libc::c_void; -extern "C" { - pub fn OGR_G_CreateFromWkb( - arg1: *mut libc::c_uchar, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromWkt( - arg1: *mut *mut libc::c_char, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromFgf( - arg1: *mut libc::c_uchar, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - arg5: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ApproximateArcAngles( - dfCenterX: f64, - dfCenterY: f64, - dfZ: f64, - dfPrimaryRadius: f64, - dfSecondaryAxis: f64, - dfRotation: f64, - dfStartAngle: f64, - dfEndAngle: f64, - dfMaxAngleStepSizeDegrees: f64, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceTo( - hGeom: OGRGeometryH, - eTargetType: OGRwkbGeometryType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); -} -extern "C" { - pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); -} -extern "C" { - pub fn OGR_G_ImportFromWkb( - arg1: OGRGeometryH, - arg2: *mut libc::c_uchar, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToIsoWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CloseRings(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToGMLEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; -} -extern "C" { - pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; -} -extern "C" { - pub fn OGR_G_ExportToKML( - arg1: OGRGeometryH, - pszAltitudeMode: *const libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToJsonEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); -} -extern "C" { - pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Segmentize(hGeom: OGRGeometryH, dfMaxLength: f64); -} -extern "C" { - pub fn OGR_G_Intersects(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Equals(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Disjoint(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Touches(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Crosses(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Within(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Contains(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Overlaps(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Boundary(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ConvexHull(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Buffer(arg1: OGRGeometryH, arg2: f64, arg3: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Intersection(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Union(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_UnionCascaded(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_PointOnSurface(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Difference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_SymDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Distance(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Length(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Area(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Centroid(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Value(arg1: OGRGeometryH, dfDistance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Empty(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_IsEmpty(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsValid(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsSimple(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsRing(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Equal(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SymmetricDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetArea(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetPoints( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetX(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetY(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetZ(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetPoint( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, - ); -} -extern "C" { - pub fn OGR_G_SetPointCount(hGeom: OGRGeometryH, nNewPointCount: libc::c_int); -} -extern "C" { - pub fn OGR_G_SetPoint(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_SetPoint_2D(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_AddPoint(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_AddPoint_2D(arg1: OGRGeometryH, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_SetPoints( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - ); -} -extern "C" { - pub fn OGR_G_GetGeometryCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetGeometryRef(arg1: OGRGeometryH, arg2: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AddGeometry(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_AddGeometryDirectly(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_RemoveGeometry( - arg1: OGRGeometryH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_HasCurveGeometry( - arg1: OGRGeometryH, - bLookForNonLinear: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetLinearGeometry( - hGeom: OGRGeometryH, - dfMaxAngleStepSizeDegrees: f64, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetCurveGeometry( - hGeom: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGRBuildPolygonFromEdges( - hLinesAsCollection: OGRGeometryH, - bBestEffort: libc::c_int, - bAutoClose: libc::c_int, - dfTolerance: f64, - peErr: *mut OGRErr::Type, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( - bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; -} -extern "C" { - pub fn OGRSetNonLinearGeometriesEnabledFlag(bFlag: libc::c_int); -} -extern "C" { - pub fn OGRGetNonLinearGeometriesEnabledFlag() -> libc::c_int; -} -pub type OGRFieldDefnH = *mut libc::c_void; -pub type OGRFeatureDefnH = *mut libc::c_void; -pub type OGRFeatureH = *mut libc::c_void; -pub type OGRStyleTableH = *mut libc::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRGeomFieldDefnHS { - _unused: [u8; 0], -} -pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; -extern "C" { - pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_Fld_Destroy(arg1: OGRFieldDefnH); -} -extern "C" { - pub fn OGR_Fld_SetName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_Fld_GetNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Fld_GetType(arg1: OGRFieldDefnH) -> OGRFieldType::Type; -} -extern "C" { - pub fn OGR_Fld_SetType(arg1: OGRFieldDefnH, arg2: OGRFieldType::Type); -} -extern "C" { - pub fn OGR_Fld_GetSubType(arg1: OGRFieldDefnH) -> OGRFieldSubType::Type; -} -extern "C" { - pub fn OGR_Fld_SetSubType(arg1: OGRFieldDefnH, arg2: OGRFieldSubType::Type); -} -extern "C" { - pub fn OGR_Fld_GetJustify(arg1: OGRFieldDefnH) -> OGRJustification::Type; -} -extern "C" { - pub fn OGR_Fld_SetJustify(arg1: OGRFieldDefnH, arg2: OGRJustification::Type); -} -extern "C" { - pub fn OGR_Fld_GetWidth(arg1: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetWidth(arg1: OGRFieldDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_GetPrecision(arg1: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetPrecision(arg1: OGRFieldDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_Set( - arg1: OGRFieldDefnH, - arg2: *const libc::c_char, - arg3: OGRFieldType::Type, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: OGRJustification::Type, - ); -} -extern "C" { - pub fn OGR_Fld_IsIgnored(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetIgnored(hDefn: OGRFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_IsNullable(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetNullable(hDefn: OGRFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_GetDefault(hDefn: OGRFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Fld_SetDefault(hDefn: OGRFieldDefnH, arg1: *const libc::c_char); -} -extern "C" { - pub fn OGR_Fld_IsDefaultDriverSpecific(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_GetFieldTypeName(arg1: OGRFieldType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_GetFieldSubTypeName(arg1: OGRFieldSubType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_AreTypeSubTypeCompatible( - eType: OGRFieldType::Type, - eSubType: OGRFieldSubType::Type, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_GFld_Create( - arg1: *const libc::c_char, - arg2: OGRwkbGeometryType::Type, - ) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_GFld_Destroy(arg1: OGRGeomFieldDefnH); -} -extern "C" { - pub fn OGR_GFld_SetName(arg1: OGRGeomFieldDefnH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_GFld_GetNameRef(arg1: OGRGeomFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_GFld_GetType(arg1: OGRGeomFieldDefnH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GFld_SetType(arg1: OGRGeomFieldDefnH, arg2: OGRwkbGeometryType::Type); -} -extern "C" { - pub fn OGR_GFld_GetSpatialRef(arg1: OGRGeomFieldDefnH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_GFld_SetSpatialRef(arg1: OGRGeomFieldDefnH, hSRS: OGRSpatialReferenceH); -} -extern "C" { - pub fn OGR_GFld_IsNullable(hDefn: OGRGeomFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_GFld_SetNullable(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_GFld_IsIgnored(hDefn: OGRGeomFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_GFld_SetIgnored(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_FD_Create(arg1: *const libc::c_char) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_FD_Destroy(arg1: OGRFeatureDefnH); -} -extern "C" { - pub fn OGR_FD_Release(arg1: OGRFeatureDefnH); -} -extern "C" { - pub fn OGR_FD_GetName(arg1: OGRFeatureDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_FD_GetFieldCount(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetFieldDefn(arg1: OGRFeatureDefnH, arg2: libc::c_int) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_FD_GetFieldIndex(arg1: OGRFeatureDefnH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_AddFieldDefn(arg1: OGRFeatureDefnH, arg2: OGRFieldDefnH); -} -extern "C" { - pub fn OGR_FD_DeleteFieldDefn(hDefn: OGRFeatureDefnH, iField: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_ReorderFieldDefns( - hDefn: OGRFeatureDefnH, - panMap: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_GetGeomType(arg1: OGRFeatureDefnH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_FD_SetGeomType(arg1: OGRFeatureDefnH, arg2: OGRwkbGeometryType::Type); -} -extern "C" { - pub fn OGR_FD_IsGeometryIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_SetGeometryIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_FD_IsStyleIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_SetStyleIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_FD_Reference(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_Dereference(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetReferenceCount(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldCount(hFDefn: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldDefn(hFDefn: OGRFeatureDefnH, i: libc::c_int) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldIndex( - hFDefn: OGRFeatureDefnH, - pszName: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_AddGeomFieldDefn(hFDefn: OGRFeatureDefnH, hGFldDefn: OGRGeomFieldDefnH); -} -extern "C" { - pub fn OGR_FD_DeleteGeomFieldDefn( - hFDefn: OGRFeatureDefnH, - iGeomField: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_IsSame(hFDefn: OGRFeatureDefnH, hOtherFDefn: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_Create(arg1: OGRFeatureDefnH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_F_Destroy(arg1: OGRFeatureH); -} -extern "C" { - pub fn OGR_F_GetDefnRef(arg1: OGRFeatureH) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_F_SetGeometryDirectly(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetGeometry(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetGeometryRef(arg1: OGRFeatureH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_StealGeometry(arg1: OGRFeatureH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_Clone(arg1: OGRFeatureH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_F_Equal(arg1: OGRFeatureH, arg2: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldCount(arg1: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldDefnRef(arg1: OGRFeatureH, arg2: libc::c_int) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_F_GetFieldIndex(arg1: OGRFeatureH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_IsFieldSet(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_UnsetField(arg1: OGRFeatureH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_F_GetRawFieldRef(arg1: OGRFeatureH, arg2: libc::c_int) -> *mut OGRField; -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger64(arg1: OGRFeatureH, arg2: libc::c_int) -> GIntBig; -} -extern "C" { - pub fn OGR_F_GetFieldAsDouble(arg1: OGRFeatureH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_F_GetFieldAsString(arg1: OGRFeatureH, arg2: libc::c_int) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_GetFieldAsIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const GIntBig; -} -extern "C" { - pub fn OGR_F_GetFieldAsDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const f64; -} -extern "C" { - pub fn OGR_F_GetFieldAsStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn OGR_F_GetFieldAsBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *mut GByte; -} -extern "C" { - pub fn OGR_F_GetFieldAsDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - arg4: *mut libc::c_int, - arg5: *mut libc::c_int, - arg6: *mut libc::c_int, - arg7: *mut libc::c_int, - arg8: *mut libc::c_int, - arg9: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsDateTimeEx( - hFeat: OGRFeatureH, - iField: libc::c_int, - pnYear: *mut libc::c_int, - pnMonth: *mut libc::c_int, - pnDay: *mut libc::c_int, - pnHour: *mut libc::c_int, - pnMinute: *mut libc::c_int, - pfSecond: *mut f32, - pnTZFlag: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_SetFieldInteger(arg1: OGRFeatureH, arg2: libc::c_int, arg3: libc::c_int); -} -extern "C" { - pub fn OGR_F_SetFieldInteger64(arg1: OGRFeatureH, arg2: libc::c_int, arg3: GIntBig); -} -extern "C" { - pub fn OGR_F_SetFieldDouble(arg1: OGRFeatureH, arg2: libc::c_int, arg3: f64); -} -extern "C" { - pub fn OGR_F_SetFieldString(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_SetFieldIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_SetFieldInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const GIntBig, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut f64, - ); -} -extern "C" { - pub fn OGR_F_SetFieldStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut *mut libc::c_char, - ); -} -extern "C" { - pub fn OGR_F_SetFieldRaw(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *mut OGRField); -} -extern "C" { - pub fn OGR_F_SetFieldBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut GByte, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDateTimeEx( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: f32, - arg9: libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_GetGeomFieldCount(hFeat: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetGeomFieldDefnRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_F_GetGeomFieldIndex(hFeat: OGRFeatureH, pszName: *const libc::c_char) - -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetGeomFieldRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_SetGeomFieldDirectly( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetGeomField( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetFID(arg1: OGRFeatureH) -> GIntBig; -} -extern "C" { - pub fn OGR_F_SetFID(arg1: OGRFeatureH, arg2: GIntBig) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_DumpReadable(arg1: OGRFeatureH, arg2: *mut FILE); -} -extern "C" { - pub fn OGR_F_SetFrom(arg1: OGRFeatureH, arg2: OGRFeatureH, arg3: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetFromWithMap( - arg1: OGRFeatureH, - arg2: OGRFeatureH, - arg3: libc::c_int, - arg4: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetStyleString(arg1: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_SetStyleString(arg1: OGRFeatureH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); -} -extern "C" { - pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_F_FillUnsetWithDefault( - hFeat: OGRFeatureH, - bNotNullableOnly: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ); -} -extern "C" { - pub fn OGR_F_Validate( - arg1: OGRFeatureH, - nValidateFlags: libc::c_int, - bEmitError: libc::c_int, - ) -> libc::c_int; -} -pub type OGRLayerH = *mut libc::c_void; -pub type OGRDataSourceH = *mut libc::c_void; -pub type OGRSFDriverH = *mut libc::c_void; -extern "C" { - pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetGeomType(arg1: OGRLayerH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_L_GetSpatialFilter(arg1: OGRLayerH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_L_SetSpatialFilter(arg1: OGRLayerH, arg2: OGRGeometryH); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterRect(arg1: OGRLayerH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterEx(arg1: OGRLayerH, iGeomField: libc::c_int, hGeom: OGRGeometryH); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterRectEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - dfMinX: f64, - dfMinY: f64, - dfMaxX: f64, - dfMaxY: f64, - ); -} -extern "C" { - pub fn OGR_L_SetAttributeFilter(arg1: OGRLayerH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ResetReading(arg1: OGRLayerH); -} -extern "C" { - pub fn OGR_L_GetNextFeature(arg1: OGRLayerH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_L_SetNextByIndex(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_L_SetFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CreateFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_DeleteFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetLayerDefn(arg1: OGRLayerH) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_L_GetSpatialRef(arg1: OGRLayerH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_L_FindFieldIndex( - arg1: OGRLayerH, - arg2: *const libc::c_char, - bExactMatch: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_GetFeatureCount(arg1: OGRLayerH, arg2: libc::c_int) -> GIntBig; -} -extern "C" { - pub fn OGR_L_GetExtent( - arg1: OGRLayerH, - arg2: *mut OGREnvelope, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetExtentEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - psExtent: *mut OGREnvelope, - bForce: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_TestCapability(arg1: OGRLayerH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_CreateField( - arg1: OGRLayerH, - arg2: OGRFieldDefnH, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CreateGeomField( - hLayer: OGRLayerH, - hFieldDefn: OGRGeomFieldDefnH, - bForce: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_DeleteField(arg1: OGRLayerH, iField: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ReorderFields(arg1: OGRLayerH, panMap: *mut libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ReorderField( - arg1: OGRLayerH, - iOldFieldPos: libc::c_int, - iNewFieldPos: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_AlterFieldDefn( - arg1: OGRLayerH, - iField: libc::c_int, - hNewFieldDefn: OGRFieldDefnH, - nFlags: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_StartTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CommitTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_Dereference(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; -} -extern "C" { - pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_L_SetIgnoredFields(arg1: OGRLayerH, arg2: *mut *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Intersection( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Union( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_SymDifference( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Identity( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Update( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Clip( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Erase( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_Destroy(arg1: OGRDataSourceH); -} -extern "C" { - pub fn OGR_DS_GetName(arg1: OGRDataSourceH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_DS_GetLayerCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_GetLayerByName(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_DeleteLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_GetDriver(arg1: OGRDataSourceH) -> OGRSFDriverH; -} -extern "C" { - pub fn OGR_DS_CreateLayer( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_CopyLayer( - arg1: OGRDataSourceH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_TestCapability(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_ExecuteSQL( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); -} -extern "C" { - pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_Dereference(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetRefCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_Dr_GetName(arg1: OGRSFDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Dr_Open( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_TestCapability(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_Dr_CreateDataSource( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_CopyDataSource( - arg1: OGRSFDriverH, - arg2: OGRDataSourceH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGROpen( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGROpenShared( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; -} -extern "C" { - pub fn OGRRegisterDriver(arg1: OGRSFDriverH); -} -extern "C" { - pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); -} -extern "C" { - pub fn OGRGetDriverCount() -> libc::c_int; -} -extern "C" { - pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; -} -extern "C" { - pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; -} -extern "C" { - pub fn OGRGetOpenDSCount() -> libc::c_int; -} -extern "C" { - pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; -} -extern "C" { - pub fn OGRRegisterAll(); -} -extern "C" { - pub fn OGRCleanupAll(); -} -pub type OGRStyleMgrH = *mut libc::c_void; -pub type OGRStyleToolH = *mut libc::c_void; -extern "C" { - pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; -} -extern "C" { - pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); -} -extern "C" { - pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_SM_InitStyleString( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_GetPartCount( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_GetPart( - hSM: OGRStyleMgrH, - nPartId: libc::c_int, - pszStyleString: *const libc::c_char, - ) -> OGRStyleToolH; -} -extern "C" { - pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_AddStyle( - hSM: OGRStyleMgrH, - pszStyleName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; -} -extern "C" { - pub fn OGR_ST_Destroy(hST: OGRStyleToolH); -} -extern "C" { - pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; -} -extern "C" { - pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; -} -extern "C" { - pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); -} -extern "C" { - pub fn OGR_ST_GetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_ST_GetParamNum( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_ST_GetParamDbl( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> f64; -} -extern "C" { - pub fn OGR_ST_SetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); -} -extern "C" { - pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); -} -extern "C" { - pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_ST_GetRGBFromString( - hST: OGRStyleToolH, - pszColor: *const libc::c_char, - pnRed: *mut libc::c_int, - pnGreen: *mut libc::c_int, - pnBlue: *mut libc::c_int, - pnAlpha: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_Create() -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); -} -extern "C" { - pub fn OGR_STBL_AddStyle( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_SaveStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_LoadStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_Find( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); -} -extern "C" { - pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -pub mod GDALDataType { - /// Pixel data types - pub type Type = u32; - /// Unknown or unspecified type - pub const GDT_Unknown: Type = 0; - /// Eight bit unsigned integer - pub const GDT_Byte: Type = 1; - /// Sixteen bit unsigned integer - pub const GDT_UInt16: Type = 2; - /// Sixteen bit signed integer - pub const GDT_Int16: Type = 3; - /// Thirty two bit unsigned integer - pub const GDT_UInt32: Type = 4; - /// Thirty two bit signed integer - pub const GDT_Int32: Type = 5; - /// Thirty two bit floating point - pub const GDT_Float32: Type = 6; - /// Sixty four bit floating point - pub const GDT_Float64: Type = 7; - /// Complex Int16 - pub const GDT_CInt16: Type = 8; - /// Complex Int32 - pub const GDT_CInt32: Type = 9; - /// Complex Float32 - pub const GDT_CFloat32: Type = 10; - /// Complex Float64 - pub const GDT_CFloat64: Type = 11; - /// Complex Float64 - pub const GDT_TypeCount: Type = 12; -} -extern "C" { - pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; -} -extern "C" { - pub fn GDALDataTypeUnion( - arg1: GDALDataType::Type, - arg2: GDALDataType::Type, - ) -> GDALDataType::Type; -} -pub mod GDALAsyncStatusType { - /// status of the asynchronous stream - pub type Type = u32; - pub const GARIO_PENDING: Type = 0; - pub const GARIO_UPDATE: Type = 1; - pub const GARIO_ERROR: Type = 2; - pub const GARIO_COMPLETE: Type = 3; - pub const GARIO_TypeCount: Type = 4; -} -extern "C" { - pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; -} -pub mod GDALAccess { - /// Flag indicating read/write, or read-only access to data. - pub type Type = u32; - /// Read only (no update) access - pub const GA_ReadOnly: Type = 0; - /// Read/write access. - pub const GA_Update: Type = 1; -} -pub mod GDALRWFlag { - /// Read/Write flag for RasterIO() method - pub type Type = u32; - /// Read data - pub const GF_Read: Type = 0; - /// Write data - pub const GF_Write: Type = 1; -} -pub mod GDALRIOResampleAlg { - /// RasterIO() resampling method. - /// @since GDAL 2.0 - pub type Type = u32; - /// Nearest neighbour - pub const GRIORA_NearestNeighbour: Type = 0; - /// Bilinear (2x2 kernel) - pub const GRIORA_Bilinear: Type = 1; - /// Cubic Convolution Approximation (4x4 kernel) - pub const GRIORA_Cubic: Type = 2; - /// Cubic B-Spline Approximation (4x4 kernel) - pub const GRIORA_CubicSpline: Type = 3; - /// Lanczos windowed sinc interpolation (6x6 kernel) - pub const GRIORA_Lanczos: Type = 4; - /// Average - pub const GRIORA_Average: Type = 5; - /// Mode (selects the value which appears most often of all the sampled points) - pub const GRIORA_Mode: Type = 6; - /// Gauss blurring - pub const GRIORA_Gauss: Type = 7; -} -/// Structure to pass extra arguments to RasterIO() method -/// @since GDAL 2.0 -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRasterIOExtraArg { - /// Version of structure (to allow future extensions of the structure) - pub nVersion: libc::c_int, - /// Resampling algorithm - pub eResampleAlg: GDALRIOResampleAlg::Type, - /// Progress callback - pub pfnProgress: GDALProgressFunc, - /// Progress callback user data - pub pProgressData: *mut libc::c_void, - /// Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set. - /// Mostly reserved from the VRT driver to communicate a more precise - /// source window. Must be such that dfXOff - nXOff < 1.0 and - /// dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize < 1.0 - pub bFloatingPointWindowValidity: libc::c_int, - /// Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE - pub dfXOff: f64, - /// Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE - pub dfYOff: f64, - /// Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE - pub dfXSize: f64, - /// Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE - pub dfYSize: f64, -} -#[test] -fn bindgen_test_layout_GDALRasterIOExtraArg() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(nVersion) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnProgress as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pProgressData as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pProgressData) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bFloatingPointWindowValidity - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(bFloatingPointWindowValidity) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYSize) - ) - ); -} -pub mod GDALColorInterp { - /// Types of color interpretation for raster bands. - pub type Type = u32; - pub const GCI_Undefined: Type = 0; - /// Greyscale - pub const GCI_GrayIndex: Type = 1; - /// Paletted (see associated color table) - pub const GCI_PaletteIndex: Type = 2; - /// Red band of RGBA image - pub const GCI_RedBand: Type = 3; - /// Green band of RGBA image - pub const GCI_GreenBand: Type = 4; - /// Blue band of RGBA image - pub const GCI_BlueBand: Type = 5; - /// Alpha (0=transparent, 255=opaque) - pub const GCI_AlphaBand: Type = 6; - /// Hue band of HLS image - pub const GCI_HueBand: Type = 7; - /// Saturation band of HLS image - pub const GCI_SaturationBand: Type = 8; - /// Lightness band of HLS image - pub const GCI_LightnessBand: Type = 9; - /// Cyan band of CMYK image - pub const GCI_CyanBand: Type = 10; - /// Magenta band of CMYK image - pub const GCI_MagentaBand: Type = 11; - /// Yellow band of CMYK image - pub const GCI_YellowBand: Type = 12; - /// Black band of CMLY image - pub const GCI_BlackBand: Type = 13; - /// Y Luminance - pub const GCI_YCbCr_YBand: Type = 14; - /// Cb Chroma - pub const GCI_YCbCr_CbBand: Type = 15; - /// Cr Chroma - pub const GCI_YCbCr_CrBand: Type = 16; - /// Max current value - pub const GCI_Max: Type = 16; -} -extern "C" { - pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; -} -pub mod GDALPaletteInterp { - /// Types of color interpretations for a GDALColorTable. - pub type Type = u32; - /// Grayscale (in GDALColorEntry.c1) - pub const GPI_Gray: Type = 0; - /// Red, Green, Blue and Alpha in (in c1, c2, c3 and c4) - pub const GPI_RGB: Type = 1; - /// Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4) - pub const GPI_CMYK: Type = 2; - /// Hue, Lightness and Saturation (in c1, c2, and c3) - pub const GPI_HLS: Type = 3; -} -extern "C" { - pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; -} -/// Opaque type used for the C bindings of the C++ GDALMajorObject class -pub type GDALMajorObjectH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALDataset class -pub type GDALDatasetH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALRasterBand class -pub type GDALRasterBandH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALDriver class -pub type GDALDriverH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALColorTable class -pub type GDALColorTableH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class -pub type GDALRasterAttributeTableH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALAsyncReader class -pub type GDALAsyncReaderH = *mut libc::c_void; -/// Type to express pixel, line or band spacing. Signed 64 bit integer. -pub type GSpacing = GIntBig; -extern "C" { - pub fn GDALAllRegister(); -} -extern "C" { - pub fn GDALCreate( - hDriver: GDALDriverH, - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: GDALDataType::Type, - arg6: *mut *mut libc::c_char, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALCreateCopy( - arg1: GDALDriverH, - arg2: *const libc::c_char, - arg3: GDALDatasetH, - arg4: libc::c_int, - arg5: *mut *mut libc::c_char, - arg6: GDALProgressFunc, - arg7: *mut libc::c_void, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALIdentifyDriver( - pszFilename: *const libc::c_char, - papszFileList: *mut *mut libc::c_char, - ) -> GDALDriverH; -} -extern "C" { - pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; -} -extern "C" { - pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; -} -extern "C" { - pub fn GDALOpenEx( - pszFilename: *const libc::c_char, - nOpenFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszOpenOptions: *const *const libc::c_char, - papszSiblingFiles: *const *const libc::c_char, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; -} -extern "C" { - pub fn GDALGetDriverCount() -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; -} -extern "C" { - pub fn GDALDestroyDriver(arg1: GDALDriverH); -} -extern "C" { - pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; -} -extern "C" { - pub fn GDALDeregisterDriver(arg1: GDALDriverH); -} -extern "C" { - pub fn GDALDestroyDriverManager(); -} -extern "C" { - pub fn GDALDestroy(); -} -extern "C" { - pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRenameDataset( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALCopyDatasetFiles( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALValidateCreationOptions( - arg1: GDALDriverH, - papszCreationOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; -} -/// Ground Control Point -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDAL_GCP { - /// Unique identifier, often numeric - pub pszId: *mut libc::c_char, - /// Informational message or "" - pub pszInfo: *mut libc::c_char, - /// Pixel (x) location of GCP on raster - pub dfGCPPixel: f64, - /// Line (y) location of GCP on raster - pub dfGCPLine: f64, - /// X position of GCP in georeferenced space - pub dfGCPX: f64, - /// Y position of GCP in georeferenced space - pub dfGCPY: f64, - /// Elevation of GCP, or zero if not known - pub dfGCPZ: f64, -} -#[test] -fn bindgen_test_layout_GDAL_GCP() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(GDAL_GCP)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDAL_GCP)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszId) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszInfo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPPixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPLine) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPZ) - ) - ); -} -extern "C" { - pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); -} -extern "C" { - pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); -} -extern "C" { - pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; -} -extern "C" { - pub fn GDALGCPsToGeoTransform( - nGCPCount: libc::c_int, - pasGCPs: *const GDAL_GCP, - padfGeoTransform: *mut f64, - bApproxOK: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALInvGeoTransform( - padfGeoTransformIn: *mut f64, - padfInvGeoTransformOut: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALApplyGeoTransform( - arg1: *mut f64, - arg2: f64, - arg3: f64, - arg4: *mut f64, - arg5: *mut f64, - ); -} -extern "C" { - pub fn GDALComposeGeoTransforms( - padfGeoTransform1: *const f64, - padfGeoTransform2: *const f64, - padfGeoTransformOut: *mut f64, - ); -} -extern "C" { - pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALGetMetadata( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALSetMetadata( - arg1: GDALMajorObjectH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); -} -extern "C" { - pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; -} -extern "C" { - pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALClose(arg1: GDALDatasetH); -} -extern "C" { - pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALAddBand( - hDS: GDALDatasetH, - eType: GDALDataType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALBeginAsyncReader( - hDS: GDALDatasetH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - pBuf: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> GDALAsyncReaderH; -} -extern "C" { - pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); -} -extern "C" { - pub fn GDALDatasetRasterIO( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetRasterIOEx( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - nBandSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetAdviseRead( - hDS: GDALDatasetH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; -} -extern "C" { - pub fn GDALSetGCPs( - arg1: GDALDatasetH, - arg2: libc::c_int, - arg3: *const GDAL_GCP, - arg4: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetInternalHandle( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALBuildOverviews( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: libc::c_int, - arg4: *mut libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_int, - arg7: GDALProgressFunc, - arg8: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); -} -extern "C" { - pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALFlushCache(hDS: GDALDatasetH); -} -extern "C" { - pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetCopyWholeRaster( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterBandCopyWholeRaster( - hSrcBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRegenerateOverviews( - hSrcBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviewBands: *mut GDALRasterBandH, - pszResampling: *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn GDALDatasetCreateLayer( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetCopyLayer( - arg1: GDALDatasetH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn GDALDatasetExecuteSQL( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); -} -extern "C" { - pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; -} -extern "C" { - pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; -} -extern "C" { - pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; -} -pub type GDALDerivedPixelFunc = ::std::option::Option< - unsafe extern "C" fn( - papoSources: *mut *mut libc::c_void, - nSources: libc::c_int, - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eSrcType: GDALDataType::Type, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type, ->; -extern "C" { - pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; -} -extern "C" { - pub fn GDALGetBlockSize( - arg1: GDALRasterBandH, - pnXSize: *mut libc::c_int, - pnYSize: *mut libc::c_int, - ); -} -extern "C" { - pub fn GDALRasterAdviseRead( - hRB: GDALRasterBandH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterIO( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterIOEx( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALReadBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWriteBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; -} -extern "C" { - pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; -} -extern "C" { - pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; -} -extern "C" { - pub fn GDALSetRasterColorInterpretation( - arg1: GDALRasterBandH, - arg2: GDALColorInterp::Type, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; -} -extern "C" { - pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALSetRasterCategoryNames( - arg1: GDALRasterBandH, - arg2: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALGetRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - bForce: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetRasterStatistics( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - dfMean: f64, - dfStdDev: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetRasterUnitType( - hBand: GDALRasterBandH, - pszNewValue: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeRasterMinMax( - hBand: GDALRasterBandH, - bApproxOK: libc::c_int, - adfMinMax: *mut f64, - ); -} -extern "C" { - pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultHistogram( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut libc::c_int, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultHistogramEx( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut GUIntBig, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetDefaultHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetDefaultHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRandomRasterSample( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: *mut f32, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) - -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALFillRaster( - hBand: GDALRasterBandH, - dfRealValue: f64, - dfImaginaryValue: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeBandStats( - hBand: GDALRasterBandH, - nSampleStep: libc::c_int, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALOverviewMagnitudeCorrection( - hBaseBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviews: *mut GDALRasterBandH, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALSetDefaultRAT( - arg1: GDALRasterBandH, - arg2: GDALRasterAttributeTableH, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALAddDerivedBandPixelFunc( - pszName: *const libc::c_char, - pfnPixelFunc: GDALDerivedPixelFunc, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; -} -extern "C" { - pub fn GDALARGetNextUpdatedRegion( - hARIO: GDALAsyncReaderH, - dfTimeout: f64, - pnXBufOff: *mut libc::c_int, - pnYBufOff: *mut libc::c_int, - pnXBufSize: *mut libc::c_int, - pnYBufSize: *mut libc::c_int, - ) -> GDALAsyncStatusType::Type; -} -extern "C" { - pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; -} -extern "C" { - pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); -} -extern "C" { - pub fn GDALGeneralCmdLineProcessor( - nArgc: libc::c_int, - ppapszArgv: *mut *mut *mut libc::c_char, - nOptions: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSwapWords( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: libc::c_int, - nWordSkip: libc::c_int, - ); -} -extern "C" { - pub fn GDALCopyWords( - pSrcData: *mut libc::c_void, - eSrcType: GDALDataType::Type, - nSrcPixelOffset: libc::c_int, - pDstData: *mut libc::c_void, - eDstType: GDALDataType::Type, - nDstPixelOffset: libc::c_int, - nWordCount: libc::c_int, - ); -} -extern "C" { - pub fn GDALCopyBits( - pabySrcData: *const GByte, - nSrcOffset: libc::c_int, - nSrcStep: libc::c_int, - pabyDstData: *mut GByte, - nDstOffset: libc::c_int, - nDstStep: libc::c_int, - nBitCount: libc::c_int, - nStepCount: libc::c_int, - ); -} -extern "C" { - pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; -} -extern "C" { - pub fn GDALReadWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALWriteWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALLoadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALReadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALLoadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALReadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALDecToDMS( - arg1: f64, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALPackedDMSToDec(arg1: f64) -> f64; -} -extern "C" { - pub fn GDALDecToPackedDMS(arg1: f64) -> f64; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRPCInfo { - pub dfLINE_OFF: f64, - pub dfSAMP_OFF: f64, - pub dfLAT_OFF: f64, - pub dfLONG_OFF: f64, - pub dfHEIGHT_OFF: f64, - pub dfLINE_SCALE: f64, - pub dfSAMP_SCALE: f64, - pub dfLAT_SCALE: f64, - pub dfLONG_SCALE: f64, - pub dfHEIGHT_SCALE: f64, - pub adfLINE_NUM_COEFF: [f64; 20usize], - pub adfLINE_DEN_COEFF: [f64; 20usize], - pub adfSAMP_NUM_COEFF: [f64; 20usize], - pub adfSAMP_DEN_COEFF: [f64; 20usize], - pub dfMIN_LONG: f64, - pub dfMIN_LAT: f64, - pub dfMAX_LONG: f64, - pub dfMAX_LAT: f64, -} -#[test] -fn bindgen_test_layout_GDALRPCInfo() { - assert_eq!( - ::std::mem::size_of::(), - 752usize, - concat!("Size of: ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LAT) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, - 744usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LAT) - ) - ); -} -extern "C" { - pub fn GDALExtractRPCInfo(arg1: *mut *mut libc::c_char, arg2: *mut GDALRPCInfo) -> libc::c_int; -} -/// Color tuple -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALColorEntry { - /// gray, red, cyan or hue - pub c1: libc::c_short, - /// green, magenta, or lightness - pub c2: libc::c_short, - /// blue, yellow, or saturation - pub c3: libc::c_short, - /// alpha or blackband - pub c4: libc::c_short, -} -#[test] -fn bindgen_test_layout_GDALColorEntry() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(GDALColorEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(GDALColorEntry)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c4) - ) - ); -} -extern "C" { - pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; -} -extern "C" { - pub fn GDALDestroyColorTable(arg1: GDALColorTableH); -} -extern "C" { - pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; -} -extern "C" { - pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; -} -extern "C" { - pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; -} -extern "C" { - pub fn GDALGetColorEntryAsRGB( - arg1: GDALColorTableH, - arg2: libc::c_int, - arg3: *mut GDALColorEntry, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); -} -extern "C" { - pub fn GDALCreateColorRamp( - hTable: GDALColorTableH, - nStartIndex: libc::c_int, - psStartColor: *const GDALColorEntry, - nEndIndex: libc::c_int, - psEndColor: *const GDALColorEntry, - ); -} -pub mod GDALRATFieldType { - /// Field type of raster attribute table - pub type Type = u32; - /// Integer field - pub const GFT_Integer: Type = 0; - /// Floating point (double) field - pub const GFT_Real: Type = 1; - /// String field - pub const GFT_String: Type = 2; -} -pub mod GDALRATFieldUsage { - /// Field usage of raster attribute table - pub type Type = u32; - /// General purpose field. - pub const GFU_Generic: Type = 0; - /// Histogram pixel count - pub const GFU_PixelCount: Type = 1; - /// Class name - pub const GFU_Name: Type = 2; - /// Class range minimum - pub const GFU_Min: Type = 3; - /// Class range maximum - pub const GFU_Max: Type = 4; - /// Class value (min=max) - pub const GFU_MinMax: Type = 5; - /// Red class color (0-255) - pub const GFU_Red: Type = 6; - /// Green class color (0-255) - pub const GFU_Green: Type = 7; - /// Blue class color (0-255) - pub const GFU_Blue: Type = 8; - /// Alpha (0=transparent,255=opaque) - pub const GFU_Alpha: Type = 9; - /// Color Range Red Minimum - pub const GFU_RedMin: Type = 10; - /// Color Range Green Minimum - pub const GFU_GreenMin: Type = 11; - /// Color Range Blue Minimum - pub const GFU_BlueMin: Type = 12; - /// Color Range Alpha Minimum - pub const GFU_AlphaMin: Type = 13; - /// Color Range Red Maximum - pub const GFU_RedMax: Type = 14; - /// Color Range Green Maximum - pub const GFU_GreenMax: Type = 15; - /// Color Range Blue Maximum - pub const GFU_BlueMax: Type = 16; - /// Color Range Alpha Maximum - pub const GFU_AlphaMax: Type = 17; - /// Maximum GFU value - pub const GFU_MaxCount: Type = 18; -} -extern "C" { - pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); -} -extern "C" { - pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetNameOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALRATGetUsageOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldUsage::Type; -} -extern "C" { - pub fn GDALRATGetTypeOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldType::Type; -} -extern "C" { - pub fn GDALRATGetColOfUsage( - arg1: GDALRasterAttributeTableH, - arg2: GDALRATFieldUsage::Type, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALRATGetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> f64; -} -extern "C" { - pub fn GDALRATSetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_char, - ); -} -extern "C" { - pub fn GDALRATSetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ); -} -extern "C" { - pub fn GDALRATSetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: f64, - ); -} -extern "C" { - pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATValuesIOAsDouble( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pdfData: *mut f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATValuesIOAsInteger( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pnData: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATValuesIOAsString( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - papszStrList: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); -} -extern "C" { - pub fn GDALRATCreateColumn( - arg1: GDALRasterAttributeTableH, - arg2: *const libc::c_char, - arg3: GDALRATFieldType::Type, - arg4: GDALRATFieldUsage::Type, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATSetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: f64, - arg3: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATGetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: *mut f64, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATInitializeFromColorTable( - arg1: GDALRasterAttributeTableH, - arg2: GDALColorTableH, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATTranslateToColorTable( - arg1: GDALRasterAttributeTableH, - nEntryCount: libc::c_int, - ) -> GDALColorTableH; -} -extern "C" { - pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); -} -extern "C" { - pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; -} -extern "C" { - pub fn GDALSetCacheMax(nBytes: libc::c_int); -} -extern "C" { - pub fn GDALGetCacheMax() -> libc::c_int; -} -extern "C" { - pub fn GDALGetCacheUsed() -> libc::c_int; -} -extern "C" { - pub fn GDALSetCacheMax64(nBytes: GIntBig); -} -extern "C" { - pub fn GDALGetCacheMax64() -> GIntBig; -} -extern "C" { - pub fn GDALGetCacheUsed64() -> GIntBig; -} -extern "C" { - pub fn GDALFlushCacheBlock() -> libc::c_int; -} -extern "C" { - pub fn GDALDatasetGetVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nBandSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALRasterBandGetVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALGetVirtualMemAuto( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - pnPixelSpace: *mut libc::c_int, - pnLineSpace: *mut GIntBig, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -pub mod GDALTileOrganization { - pub type Type = u32; - /// Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ... - pub const GTO_TIP: Type = 0; - /// Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of fisrt band, tile (1,0) of second band, ... - pub const GTO_BIT: Type = 1; - /// Band SeQuential : all the tiles of first band, all the tiles of following band... - pub const GTO_BSQ: Type = 2; -} -extern "C" { - pub fn GDALDatasetGetTiledVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - eTileOrganization: GDALTileOrganization::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALRasterBandGetTiledVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALGetJPEG2000Structure( - pszFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALComputeMedianCutPCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - pfnIncludePixel: ::std::option::Option< - unsafe extern "C" fn(arg1: libc::c_int, arg2: libc::c_int, arg3: *mut libc::c_void) - -> libc::c_int, - >, - nColors: libc::c_int, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALDitherRGB2PCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - hTarget: GDALRasterBandH, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALChecksumImage( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALComputeProximity( - hSrcBand: GDALRasterBandH, - hProximityBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALFillNodata( - hTargetBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - dfMaxSearchDist: f64, - bDeprecatedOption: libc::c_int, - nSmoothingIterations: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALFPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSieveFilter( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - nSizeThreshold: libc::c_int, - nConnectedness: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub type GDALTransformerFunc = ::std::option::Option< - unsafe extern "C" fn( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALUseTransformer( - pTranformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateSimilarTransformer( - psTransformerArg: *mut libc::c_void, - dfSrcRatioX: f64, - dfSrcRatioY: f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - bGCPUseOK: libc::c_int, - dfGCPErrorThreshold: f64, - nOrder: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer2( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer3( - pszSrcWKT: *const libc::c_char, - padfSrcGeoTransform: *const f64, - pszDstWKT: *const libc::c_char, - padfDstGeoTransform: *const f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); -} -extern "C" { - pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); -} -extern "C" { - pub fn GDALGenImgProjTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); -} -extern "C" { - pub fn GDALCreateReprojectionTransformer( - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); -} -extern "C" { - pub fn GDALReprojectionTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateGCPTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGCPRefineTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - tolerance: f64, - minimumGcps: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALGCPTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateTPSTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALTPSTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateRPCTransformer( - psRPC: *mut GDALRPCInfo, - bReversed: libc::c_int, - dfPixErrThreshold: f64, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALRPCTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateGeoLocTransformer( - hBaseDS: GDALDatasetH, - papszGeolocationInfo: *mut *mut libc::c_char, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALGeoLocTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateApproxTransformer( - pfnRawTransformer: GDALTransformerFunc, - pRawTransformerArg: *mut libc::c_void, - dfMaxError: f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALApproxTransformerOwnsSubtransformer( - pCBData: *mut libc::c_void, - bOwnFlag: libc::c_int, - ); -} -extern "C" { - pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALApproxTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSimpleImageWarp( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - pfnTransform: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszWarpOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSuggestedWarpOutput( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSuggestedWarpOutput2( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - padfExtents: *mut f64, - nOptions: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSerializeTransformer( - pfnFunc: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALDeserializeTransformer( - psTree: *mut CPLXMLNode, - ppfnFunc: *mut GDALTransformerFunc, - ppTransformArg: *mut *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALTransformGeolocations( - hXBand: GDALRasterBandH, - hYBand: GDALRasterBandH, - hZBand: GDALRasterBandH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -pub type GDALContourWriter = ::std::option::Option< - unsafe extern "C" fn( - dfLevel: f64, - nPoints: libc::c_int, - padfX: *mut f64, - padfY: *mut f64, - arg1: *mut libc::c_void, - ) -> CPLErr::Type, ->; -pub type GDALContourGeneratorH = *mut libc::c_void; -extern "C" { - pub fn GDAL_CG_Create( - nWidth: libc::c_int, - nHeight: libc::c_int, - bNoDataSet: libc::c_int, - dfNoDataValue: f64, - dfContourInterval: f64, - dfContourBase: f64, - pfnWriter: GDALContourWriter, - pCBData: *mut libc::c_void, - ) -> GDALContourGeneratorH; -} -extern "C" { - pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); -} -extern "C" { - pub fn OGRContourWriter( - arg1: f64, - arg2: libc::c_int, - arg3: *mut f64, - arg4: *mut f64, - pInfo: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALContourGenerate( - hBand: GDALRasterBandH, - dfContourInterval: f64, - dfContourBase: f64, - nFixedLevelCount: libc::c_int, - padfFixedLevels: *mut f64, - bUseNoData: libc::c_int, - dfNoDataValue: f64, - hLayer: *mut libc::c_void, - iIDField: libc::c_int, - iElevField: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - - pub fn GDALRasterizeGeometries( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nGeomCount: libc::c_int, - pahGeometries: *mut OGRGeometryH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeomBurnValue: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterizeLayers( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfLayerBurnValues: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterizeLayersBuf( - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pszDstProjection: *const libc::c_char, - padfDstGeoTransform: *mut f64, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - dfBurnValue: f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub mod GDALGridAlgorithm { - /// Gridding Algorithms - pub type Type = u32; - /// Inverse distance to a power - pub const GGA_InverseDistanceToAPower: Type = 1; - /// Moving Average - pub const GGA_MovingAverage: Type = 2; - /// Nearest Neighbor - pub const GGA_NearestNeighbor: Type = 3; - /// Minimum Value (Data Metric) - pub const GGA_MetricMinimum: Type = 4; - /// Maximum Value (Data Metric) - pub const GGA_MetricMaximum: Type = 5; - /// Data Range (Data Metric) - pub const GGA_MetricRange: Type = 6; - /// Number of Points (Data Metric) - pub const GGA_MetricCount: Type = 7; - /// Average Distance (Data Metric) - pub const GGA_MetricAverageDistance: Type = 8; - /// Average Distance Between Data Points (Data Metric) - pub const GGA_MetricAverageDistancePts: Type = 9; -} -extern "C" { - pub fn GDALGridCreate( - arg1: GDALGridAlgorithm::Type, - arg2: *const libc::c_void, - arg3: GUInt32, - arg4: *const f64, - arg5: *const f64, - arg6: *const f64, - arg7: f64, - arg8: f64, - arg9: f64, - arg10: f64, - arg11: GUInt32, - arg12: GUInt32, - arg13: GDALDataType::Type, - arg14: *mut libc::c_void, - arg15: GDALProgressFunc, - arg16: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeMatchingPoints( - hFirstImage: GDALDatasetH, - hSecondImage: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pnGCPCount: *mut libc::c_int, - ) -> *mut GDAL_GCP; -} -pub type CPLThreadFunc = ::std::option::Option; -extern "C" { - pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLUnlockFile(hLock: *mut libc::c_void); -} -extern "C" { - pub fn CPLCreateMutex() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateOrAcquireMutex( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLCreateOrAcquireMutexEx( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - nOptions: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; -} -extern "C" { - pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); -} -extern "C" { - pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); -} -extern "C" { - pub fn CPLCleanupMasterMutex(); -} -extern "C" { - pub fn CPLCreateCond() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); -} -extern "C" { - pub fn CPLCondSignal(hCond: *mut libc::c_void); -} -extern "C" { - pub fn CPLCondBroadcast(hCond: *mut libc::c_void); -} -extern "C" { - pub fn CPLDestroyCond(hCond: *mut libc::c_void); -} -extern "C" { - pub fn CPLGetPID() -> GIntBig; -} -extern "C" { - pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; -} -extern "C" { - pub fn CPLCreateJoinableThread( - pfnMain: CPLThreadFunc, - pArg: *mut libc::c_void, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); -} -extern "C" { - pub fn CPLSleep(dfWaitInSeconds: f64); -} -extern "C" { - pub fn CPLGetThreadingModel() -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetNumCPUs() -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CPLLock { - _unused: [u8; 0], -} -pub type CPLLock = _CPLLock; -pub mod CPLLockType { - pub type Type = u32; - pub const LOCK_RECURSIVE_MUTEX: Type = 0; - pub const LOCK_ADAPTIVE_MUTEX: Type = 1; - pub const LOCK_SPIN: Type = 2; -} -extern "C" { - pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; -} -extern "C" { - pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) - -> libc::c_int; -} -extern "C" { - pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; -} -extern "C" { - pub fn CPLReleaseLock(arg1: *mut CPLLock); -} -extern "C" { - pub fn CPLDestroyLock(arg1: *mut CPLLock); -} -extern "C" { - pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); -} -extern "C" { - pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); -} -pub type CPLTLSFreeFunc = ::std::option::Option; -extern "C" { - pub fn CPLSetTLSWithFreeFunc( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - ); -} -extern "C" { - pub fn CPLCleanupTLS(); -} -pub mod GDALResampleAlg { - /// Warp Resampling Algorithm - pub type Type = u32; - /// Nearest neighbour (select on one input pixel) - pub const GRA_NearestNeighbour: Type = 0; - /// Bilinear (2x2 kernel) - pub const GRA_Bilinear: Type = 1; - /// Cubic Convolution Approximation (4x4 kernel) - pub const GRA_Cubic: Type = 2; - /// Cubic B-Spline Approximation (4x4 kernel) - pub const GRA_CubicSpline: Type = 3; - /// Lanczos windowed sinc interpolation (6x6 kernel) - pub const GRA_Lanczos: Type = 4; - /// Average (computes the average of all non-NODATA contributing pixels) - pub const GRA_Average: Type = 5; - /// Mode (selects the value which appears most often of all the sampled points) - pub const GRA_Mode: Type = 6; - /// Max (selects maximum of all non-NODATA contributing pixels) - pub const GRA_Max: Type = 8; - /// Min (selects minimum of all non-NODATA contributing pixels) - pub const GRA_Min: Type = 9; - /// Med (selects median of all non-NODATA contributing pixels) - pub const GRA_Med: Type = 10; - /// Q1 (selects first quartile of all non-NODATA contributing pixels) - pub const GRA_Q1: Type = 11; - /// Q3 (selects third quartile of all non-NODATA contributing pixels) - pub const GRA_Q3: Type = 12; -} -pub type GDALMaskFunc = ::std::option::Option< - unsafe extern "C" fn( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pMask: *mut libc::c_void, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALWarpNoDataMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllValid: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpDstAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpSrcAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllOpaque: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpSrcMaskMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpCutlineMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -/// Warp control options for use with GDALWarpOperation::Initialize() -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALWarpOptions { - pub papszWarpOptions: *mut *mut libc::c_char, - /// In bytes, 0.0 for internal default - pub dfWarpMemoryLimit: f64, - /// Resampling algorithm to use - pub eResampleAlg: GDALResampleAlg::Type, - /// data type to use during warp operation, GDT_Unknown lets the algorithm - /// select the type - pub eWorkingDataType: GDALDataType::Type, - /// Source image dataset. - pub hSrcDS: GDALDatasetH, - /// Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer(). - pub hDstDS: GDALDatasetH, - /// Number of bands to process, may be 0 to select all bands. - pub nBandCount: libc::c_int, - /// The band numbers for the source bands to process (1 based) - pub panSrcBands: *mut libc::c_int, - /// The band numbers for the destination bands to process (1 based) - pub panDstBands: *mut libc::c_int, - /// The source band so use as an alpha (transparency) value, 0=disabled - pub nSrcAlphaBand: libc::c_int, - /// The dest. band so use as an alpha (transparency) value, 0=disabled - pub nDstAlphaBand: libc::c_int, - /// The "nodata" value real component for each input band, if NULL there isn't one - pub padfSrcNoDataReal: *mut f64, - /// The "nodata" value imaginary component - may be NULL even if real - /// component is provided. - pub padfSrcNoDataImag: *mut f64, - /// The "nodata" value real component for each output band, if NULL there isn't one - pub padfDstNoDataReal: *mut f64, - /// The "nodata" value imaginary component - may be NULL even if real - /// component is provided. - pub padfDstNoDataImag: *mut f64, - /// GDALProgressFunc() compatible progress reporting function, or NULL - /// if there isn't one. - pub pfnProgress: GDALProgressFunc, - /// Callback argument to be passed to pfnProgress. - pub pProgressArg: *mut libc::c_void, - /// Type of spatial point transformer function - pub pfnTransformer: GDALTransformerFunc, - /// Handle to image transformer setup structure - pub pTransformerArg: *mut libc::c_void, - pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, - pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, - pub pfnSrcValidityMaskFunc: GDALMaskFunc, - pub pSrcValidityMaskFuncArg: *mut libc::c_void, - pub pfnSrcDensityMaskFunc: GDALMaskFunc, - pub pSrcDensityMaskFuncArg: *mut libc::c_void, - pub pfnDstDensityMaskFunc: GDALMaskFunc, - pub pDstDensityMaskFuncArg: *mut libc::c_void, - pub pfnDstValidityMaskFunc: GDALMaskFunc, - pub pDstValidityMaskFuncArg: *mut libc::c_void, - pub pfnPreWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - pub pPreWarpProcessorArg: *mut libc::c_void, - pub pfnPostWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - pub pPostWarpProcessorArg: *mut libc::c_void, - /// Optional OGRPolygonH for a masking cutline. - pub hCutline: *mut libc::c_void, - /// Optional blending distance to apply across cutline in pixels, default is zero. - pub dfCutlineBlendDist: f64, -} -#[test] -fn bindgen_test_layout_GDALWarpOptions() { - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papszWarpOptions) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfWarpMemoryLimit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eWorkingDataType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hSrcDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hDstDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nBandCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panSrcBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panDstBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nSrcAlphaBand) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nDstAlphaBand) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataImag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataImag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pProgressArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnTransformer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pTransformerArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ - as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papfnSrcPerBandValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ - as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papSrcPerBandValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ - as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPreWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPreWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ - as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPostWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPostWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hCutline) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfCutlineBlendDist) - ) - ); -} -extern "C" { - pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; -} -extern "C" { - pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); -} -extern "C" { - pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; -} -extern "C" { - pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; -} -extern "C" { - - pub fn GDALReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALCreateAndReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstFilename: *const libc::c_char, - pszDstWKT: *const libc::c_char, - hDstDriver: GDALDriverH, - papszCreateOptions: *mut *mut libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; -} -extern "C" { - - pub fn GDALAutoCreateWarpedVRT( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfMaxError: f64, - psOptions: *const GDALWarpOptions, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALCreateWarpedVRT( - hSrcDS: GDALDatasetH, - nPixels: libc::c_int, - nLines: libc::c_int, - padfGeoTransform: *mut f64, - psOptions: *mut GDALWarpOptions, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; -} -pub type GDALWarpOperationH = *mut libc::c_void; -extern "C" { - pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; -} -extern "C" { - pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); -} -extern "C" { - pub fn GDALChunkAndWarpImage( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALChunkAndWarpMulti( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpRegion( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpRegionToBuffer( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_void, - arg7: GDALDataType::Type, - arg8: libc::c_int, - arg9: libc::c_int, - arg10: libc::c_int, - arg11: libc::c_int, - ) -> CPLErr::Type; -} -pub mod OGRAxisOrientation { - /// \file ogr_srs_api.h - /// - /// C spatial reference system services and defines. - /// - /// See also: ogr_spatialref.h - pub type Type = u32; - pub const OAO_Other: Type = 0; - pub const OAO_North: Type = 1; - pub const OAO_South: Type = 2; - pub const OAO_East: Type = 3; - pub const OAO_West: Type = 4; - pub const OAO_Up: Type = 5; - pub const OAO_Down: Type = 6; -} -extern "C" { - pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); -} -extern "C" { - pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRRelease(arg1: OGRSpatialReferenceH); -} -extern "C" { - pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRFixupOrdering(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRFixup(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRStripCTParms(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromProj4( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromESRI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromPCI( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromUSGS( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: *mut f64, - arg5: libc::c_long, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromDict( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromPanorama( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: libc::c_long, - arg5: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromOzi( - arg1: OGRSpatialReferenceH, - arg2: *const *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromERM( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) - -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPrettyWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToProj4( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPCI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *mut *mut libc::c_char, - arg4: *mut *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToUSGS( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut *mut f64, - arg5: *mut libc::c_long, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToXML( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPanorama( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut libc::c_long, - arg5: *mut libc::c_long, - arg6: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToERM( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_char, - arg3: *mut libc::c_char, - arg4: *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetAttrValue( - hSRS: OGRSpatialReferenceH, - pszNodePath: *const libc::c_char, - pszNewNodeValue: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAttrValue( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - iChild: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetAngularUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRSetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetLinearUnitsAndUpdateParameters( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRGetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> f64; -} -extern "C" { - pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetWellKnownGeogCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetFromUserInput( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRCopyGeogCSFrom( - hSRS: OGRSpatialReferenceH, - hSrcSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: f64, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - arg6: f64, - arg7: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: *mut f64, - arg2: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetCompoundCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - hHorizSRS: OGRSpatialReferenceH, - hVertSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetGeogCS( - hSRS: OGRSpatialReferenceH, - pszGeogName: *const libc::c_char, - pszDatumName: *const libc::c_char, - pszEllipsoidName: *const libc::c_char, - dfSemiMajor: f64, - dfInvFlattening: f64, - pszPMName: *const libc::c_char, - dfPMOffset: f64, - pszUnits: *const libc::c_char, - dfConvertToRadians: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetVertCS( - hSRS: OGRSpatialReferenceH, - pszVertCSName: *const libc::c_char, - pszVertDatumName: *const libc::c_char, - nVertDatumType: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRSetAuthority( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszAuthority: *const libc::c_char, - nCode: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAuthorityCode( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRGetAuthorityName( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; -} -extern "C" { - pub fn OSRSetNormProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetNormProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; -} -extern "C" { - pub fn OSRSetUTM( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNorth: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OSRSetStatePlane( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetStatePlaneWithUnits( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - pszOverrideUnitName: *const libc::c_char, - dfOverrideUnit: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRGetAxis( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - iAxis: libc::c_int, - peOrientation: *mut OGRAxisOrientation::Type, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetAxes( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszXAxisName: *const libc::c_char, - eXAxisOrientation: OGRAxisOrientation::Type, - pszYAxisName: *const libc::c_char, - eYAxisOrientation: OGRAxisOrientation::Type, - ) -> OGRErr::Type; -} -extern "C" { - /// Albers Conic Equal Area - pub fn OSRSetACEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Azimuthal Equidistant - pub fn OSRSetAE( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Bonne - pub fn OSRSetBonne( - hSRS: OGRSpatialReferenceH, - dfStandardParallel: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Cylindrical Equal Area - pub fn OSRSetCEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Cassini-Soldner - pub fn OSRSetCS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equidistant Conic - pub fn OSRSetEC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert I-VI - pub fn OSRSetEckert( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert IV - pub fn OSRSetEckertIV( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert VI - pub fn OSRSetEckertVI( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equirectangular - pub fn OSRSetEquirectangular( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equirectangular generalized form - pub fn OSRSetEquirectangular2( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfPseudoStdParallel1: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gall Stereograpic - pub fn OSRSetGS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Goode Homolosine - pub fn OSRSetGH( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Interrupted Goode Homolosine - pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - /// GEOS - Geostationary Satellite View - pub fn OSRSetGEOS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfSatelliteHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gauss Schreiber Transverse Mercator - pub fn OSRSetGaussSchreiberTMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gnomonic - pub fn OSRSetGnomonic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Oblique Mercator (aka HOM (variant B) - pub fn OSRSetOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Hotine Oblique Mercator using azimuth angle - pub fn OSRSetHOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetHOMAC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Hotine Oblique Mercator using two points on centerline - pub fn OSRSetHOM2PNO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// International Map of the World Polyconic - pub fn OSRSetIWMPolyconic( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLat2: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Krovak Oblique Conic Conformal - pub fn OSRSetKrovak( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfPseudoStdParallelLat: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Azimuthal Equal-Area - pub fn OSRSetLAEA( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic - pub fn OSRSetLCC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic 1SP - pub fn OSRSetLCC1SP( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic (Belgium) - pub fn OSRSetLCCB( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Miller Cylindrical - pub fn OSRSetMC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Mercator - pub fn OSRSetMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetMercator2SP( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Mollweide - pub fn OSRSetMollweide( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// New Zealand Map Grid - pub fn OSRSetNZMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Oblique Stereographic - pub fn OSRSetOS( - hSRS: OGRSpatialReferenceH, - dfOriginLat: f64, - dfCMeridian: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Orthographic - pub fn OSRSetOrthographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Polyconic - pub fn OSRSetPolyconic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Polar Stereographic - pub fn OSRSetPS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Robinson - pub fn OSRSetRobinson( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Sinusoidal - pub fn OSRSetSinusoidal( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Stereographic - pub fn OSRSetStereographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Swiss Oblique Cylindrical - pub fn OSRSetSOC( - hSRS: OGRSpatialReferenceH, - dfLatitudeOfOrigin: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator - /// - /// Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 : - /// see OGRSpatialReference::exportToProj4(). - pub fn OSRSetTM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator variant - pub fn OSRSetTMVariant( - hSRS: OGRSpatialReferenceH, - pszVariantName: *const libc::c_char, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Tunesia Mining Grid - pub fn OSRSetTMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator (South Oriented) - pub fn OSRSetTMSO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetTPED( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// VanDerGrinten - pub fn OSRSetVDG( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Wagner I -- VII - pub fn OSRSetWagner( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCenterLat: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Quadrilateralized Spherical Cube - pub fn OSRSetQSC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; -} -extern "C" { - pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; -} -extern "C" { - pub fn OSRCleanup(); -} -extern "C" { - pub fn OCTNewCoordinateTransformation( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - ) -> OGRCoordinateTransformationH; -} -extern "C" { - pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); -} -extern "C" { - pub fn OCTTransform( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn OCTTransformEx( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OCTProj4Normalize(pszProj4Src: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn OCTCleanupProjMutex(); -} -pub mod OGRErr { - /// Type for a OGR error - /// - ///
- pub type Type = u32; - /// Success - /// - ///
- pub const OGRERR_NONE: Type = 0; - /// Not enough data to deserialize - /// - ///
- pub const OGRERR_NOT_ENOUGH_DATA: Type = 1; - /// Not enough memory - /// - ///
- pub const OGRERR_NOT_ENOUGH_MEMORY: Type = 2; - /// Unsupported geometry type - /// - ///
- pub const OGRERR_UNSUPPORTED_GEOMETRY_TYPE: Type = 3; - /// Unsupported operation - /// - ///
- pub const OGRERR_UNSUPPORTED_OPERATION: Type = 4; - /// Corrupt data - /// - ///
- pub const OGRERR_CORRUPT_DATA: Type = 5; - /// Failure - /// - ///
- pub const OGRERR_FAILURE: Type = 6; - /// Unsupported SRS - /// - ///
- pub const OGRERR_UNSUPPORTED_SRS: Type = 7; - /// Invalid handle - /// - ///
- pub const INVALID_HANDLE: Type = 8; - /// Non existing feature. Added in GDAL 2.0 - /// - ///
- pub const NON_EXISTING_FEATURE: Type = 9; -} -pub type __builtin_va_list = [__va_list_tag; 1usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __va_list_tag { - pub gp_offset: libc::c_uint, - pub fp_offset: libc::c_uint, - pub overflow_arg_area: *mut libc::c_void, - pub reg_save_area: *mut libc::c_void, -} -#[test] -fn bindgen_test_layout___va_list_tag() { - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} diff --git a/gdal-sys/prebuilt-bindings/gdal_2.1.rs b/gdal-sys/prebuilt-bindings/gdal_2.1.rs deleted file mode 100644 index 62613f7b..00000000 --- a/gdal-sys/prebuilt-bindings/gdal_2.1.rs +++ /dev/null @@ -1,9592 +0,0 @@ -/* automatically generated by rust-bindgen */ - -pub type __dev_t = libc::c_ulong; -pub type __uid_t = libc::c_uint; -pub type __gid_t = libc::c_uint; -pub type __ino_t = libc::c_ulong; -pub type __mode_t = libc::c_uint; -pub type __nlink_t = libc::c_ulong; -pub type __off_t = libc::c_long; -pub type __off64_t = libc::c_long; -pub type __time_t = libc::c_long; -pub type __blksize_t = libc::c_long; -pub type __blkcnt_t = libc::c_long; -pub type __syscall_slong_t = libc::c_long; -pub type FILE = _IO_FILE; -pub type va_list = __builtin_va_list; -pub type _IO_lock_t = libc::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_marker { - pub _next: *mut _IO_marker, - pub _sbuf: *mut _IO_FILE, - pub _pos: libc::c_int, -} -#[test] -fn bindgen_test_layout__IO_marker() { - assert_eq!( - ::std::mem::size_of::<_IO_marker>(), - 24usize, - concat!("Size of: ", stringify!(_IO_marker)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_marker>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_marker)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._next as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._sbuf as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_sbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._pos as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_pos) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_FILE { - pub _flags: libc::c_int, - pub _IO_read_ptr: *mut libc::c_char, - pub _IO_read_end: *mut libc::c_char, - pub _IO_read_base: *mut libc::c_char, - pub _IO_write_base: *mut libc::c_char, - pub _IO_write_ptr: *mut libc::c_char, - pub _IO_write_end: *mut libc::c_char, - pub _IO_buf_base: *mut libc::c_char, - pub _IO_buf_end: *mut libc::c_char, - pub _IO_save_base: *mut libc::c_char, - pub _IO_backup_base: *mut libc::c_char, - pub _IO_save_end: *mut libc::c_char, - pub _markers: *mut _IO_marker, - pub _chain: *mut _IO_FILE, - pub _fileno: libc::c_int, - pub _flags2: libc::c_int, - pub _old_offset: __off_t, - pub _cur_column: libc::c_ushort, - pub _vtable_offset: libc::c_schar, - pub _shortbuf: [libc::c_char; 1usize], - pub _lock: *mut _IO_lock_t, - pub _offset: __off64_t, - pub __pad1: *mut libc::c_void, - pub __pad2: *mut libc::c_void, - pub __pad3: *mut libc::c_void, - pub __pad4: *mut libc::c_void, - pub __pad5: usize, - pub _mode: libc::c_int, - pub _unused2: [libc::c_char; 20usize], -} -#[test] -fn bindgen_test_layout__IO_FILE() { - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad1 as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad2 as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad3 as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad4 as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad4) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} -pub type time_t = __time_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __time_t, - pub tv_nsec: __syscall_slong_t, -} -#[test] -fn bindgen_test_layout_timespec() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tm { - pub tm_sec: libc::c_int, - pub tm_min: libc::c_int, - pub tm_hour: libc::c_int, - pub tm_mday: libc::c_int, - pub tm_mon: libc::c_int, - pub tm_year: libc::c_int, - pub tm_wday: libc::c_int, - pub tm_yday: libc::c_int, - pub tm_isdst: libc::c_int, - pub tm_gmtoff: libc::c_long, - pub tm_zone: *const libc::c_char, -} -#[test] -fn bindgen_test_layout_tm() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tm)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_min as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_hour as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_mday as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_mon as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_year as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_wday as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_yday as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_isdst as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_gmtoff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_zone as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) - ); -} -pub type GInt32 = libc::c_int; -pub type GUInt32 = libc::c_uint; -pub type GInt16 = libc::c_short; -pub type GByte = libc::c_uchar; -pub type GIntBig = libc::c_longlong; -pub type GUIntBig = libc::c_ulonglong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stat { - pub st_dev: __dev_t, - pub st_ino: __ino_t, - pub st_nlink: __nlink_t, - pub st_mode: __mode_t, - pub st_uid: __uid_t, - pub st_gid: __gid_t, - pub __pad0: libc::c_int, - pub st_rdev: __dev_t, - pub st_size: __off_t, - pub st_blksize: __blksize_t, - pub st_blocks: __blkcnt_t, - pub st_atim: timespec, - pub st_mtim: timespec, - pub st_ctim: timespec, - pub __glibc_reserved: [__syscall_slong_t; 3usize], -} -#[test] -fn bindgen_test_layout_stat() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(stat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(stat)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_dev as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_dev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_ino as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_ino) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_nlink as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_nlink) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_mode as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_uid as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_uid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_gid as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_gid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__pad0 as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(__pad0) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_rdev as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_rdev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_size as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_blksize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_blksize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_blocks as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_blocks) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_atim as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_atim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_mtim as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_mtim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_ctim as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_ctim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__glibc_reserved as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(__glibc_reserved) - ) - ); -} -extern "C" { - pub fn VSIFOpen(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut FILE; -} -extern "C" { - pub fn VSIFClose(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFSeek(arg1: *mut FILE, arg2: libc::c_long, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn VSIFTell(arg1: *mut FILE) -> libc::c_long; -} -extern "C" { - pub fn VSIRewind(arg1: *mut FILE); -} -extern "C" { - pub fn VSIFFlush(arg1: *mut FILE); -} -extern "C" { - pub fn VSIFRead(arg1: *mut libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) -> usize; -} -extern "C" { - pub fn VSIFWrite(arg1: *const libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) - -> usize; -} -extern "C" { - pub fn VSIFGets( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *mut FILE, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn VSIFPuts(arg1: *const libc::c_char, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPrintf(arg1: *mut FILE, arg2: *const libc::c_char, ...) -> libc::c_int; -} -extern "C" { - pub fn VSIFGetc(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPutc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIUngetc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFEof(arg1: *mut FILE) -> libc::c_int; -} -pub type VSIStatBuf = stat; -extern "C" { - pub fn VSIStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; -} -pub type vsi_l_offset = GUIntBig; -pub type VSILFILE = FILE; -extern "C" { - pub fn VSIFOpenL(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut VSILFILE; -} -extern "C" { - pub fn VSIFOpenExL( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *mut VSILFILE; -} -extern "C" { - pub fn VSIFCloseL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFSeekL(arg1: *mut VSILFILE, arg2: vsi_l_offset, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn VSIFTellL(arg1: *mut VSILFILE) -> vsi_l_offset; -} -extern "C" { - pub fn VSIRewindL(arg1: *mut VSILFILE); -} -extern "C" { - pub fn VSIFReadL( - arg1: *mut libc::c_void, - arg2: usize, - arg3: usize, - arg4: *mut VSILFILE, - ) -> usize; -} -extern "C" { - pub fn VSIFReadMultiRangeL( - nRanges: libc::c_int, - ppData: *mut *mut libc::c_void, - panOffsets: *const vsi_l_offset, - panSizes: *const usize, - arg1: *mut VSILFILE, - ) -> libc::c_int; -} -extern "C" { - pub fn VSIFWriteL( - arg1: *const libc::c_void, - arg2: usize, - arg3: usize, - arg4: *mut VSILFILE, - ) -> usize; -} -extern "C" { - pub fn VSIFEofL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFTruncateL(arg1: *mut VSILFILE, arg2: vsi_l_offset) -> libc::c_int; -} -extern "C" { - pub fn VSIFFlushL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPrintfL(arg1: *mut VSILFILE, arg2: *const libc::c_char, ...) -> libc::c_int; -} -extern "C" { - pub fn VSIFPutcL(arg1: libc::c_int, arg2: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIIngestFile( - fp: *mut VSILFILE, - pszFilename: *const libc::c_char, - ppabyRet: *mut *mut GByte, - pnSize: *mut vsi_l_offset, - nMaxSize: GIntBig, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stat64 { - _unused: [u8; 0], -} -pub type VSIStatBufL = stat64; -extern "C" { - pub fn VSIStatL(arg1: *const libc::c_char, arg2: *mut VSIStatBufL) -> libc::c_int; -} -extern "C" { - pub fn VSIStatExL( - pszFilename: *const libc::c_char, - psStatBuf: *mut VSIStatBufL, - nFlags: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn VSIIsCaseSensitiveFS(pszFilename: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIFGetNativeFileDescriptorL(arg1: *mut VSILFILE) -> *mut libc::c_void; -} -extern "C" { - pub fn VSICalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIFree(arg1: *mut libc::c_void); -} -extern "C" { - pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - /// VSIMalloc2 allocates (nSize1 * nSize2) bytes. - /// In case of overflow of the multiplication, or if memory allocation fails, a - /// NULL pointer is returned and a CE_Failure error is raised with CPLError(). - /// If nSize1 == 0 || nSize2 == 0, a NULL pointer will also be returned. - /// CPLFree() or VSIFree() can be used to free memory allocated by this function. - pub fn VSIMalloc2(nSize1: usize, nSize2: usize) -> *mut libc::c_void; -} -extern "C" { - /// VSIMalloc3 allocates (nSize1 * nSize2 * nSize3) bytes. - /// In case of overflow of the multiplication, or if memory allocation fails, a - /// NULL pointer is returned and a CE_Failure error is raised with CPLError(). - /// If nSize1 == 0 || nSize2 == 0 || nSize3 == 0, a NULL pointer will also be returned. - /// CPLFree() or VSIFree() can be used to free memory allocated by this function. - pub fn VSIMalloc3(nSize1: usize, nSize2: usize, nSize3: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIMallocVerbose( - nSize: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIMalloc2Verbose( - nSize1: usize, - nSize2: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIMalloc3Verbose( - nSize1: usize, - nSize2: usize, - nSize3: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn VSICallocVerbose( - nCount: usize, - nSize: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIReallocVerbose( - pOldPtr: *mut libc::c_void, - nNewSize: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIStrdupVerbose( - pszStr: *const libc::c_char, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLGetPhysicalRAM() -> GIntBig; -} -extern "C" { - pub fn CPLGetUsablePhysicalRAM() -> GIntBig; -} -extern "C" { - pub fn VSIReadDir(arg1: *const libc::c_char) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn VSIReadDirRecursive(pszPath: *const libc::c_char) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn VSIReadDirEx( - pszPath: *const libc::c_char, - nMaxFiles: libc::c_int, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn VSIMkdir(pathname: *const libc::c_char, mode: libc::c_long) -> libc::c_int; -} -extern "C" { - pub fn VSIRmdir(pathname: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIUnlink(pathname: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIRename(oldpath: *const libc::c_char, newpath: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIStrerror(arg1: libc::c_int) -> *mut libc::c_char; -} -extern "C" { - pub fn VSIGetDiskFreeSpace(pszDirname: *const libc::c_char) -> GIntBig; -} -extern "C" { - pub fn VSIInstallMemFileHandler(); -} -extern "C" { - pub fn VSIInstallLargeFileHandler(); -} -extern "C" { - pub fn VSIInstallSubFileHandler(); -} -extern "C" { - pub fn VSIInstallCurlFileHandler(); -} -extern "C" { - pub fn VSIInstallCurlStreamingFileHandler(); -} -extern "C" { - pub fn VSIInstallS3FileHandler(); -} -extern "C" { - pub fn VSIInstallS3StreamingFileHandler(); -} -extern "C" { - pub fn VSIInstallGZipFileHandler(); -} -extern "C" { - pub fn VSIInstallZipFileHandler(); -} -extern "C" { - pub fn VSIInstallStdinHandler(); -} -extern "C" { - pub fn VSIInstallStdoutHandler(); -} -extern "C" { - pub fn VSIInstallSparseFileHandler(); -} -extern "C" { - pub fn VSIInstallTarFileHandler(); -} -extern "C" { - pub fn VSIInstallCryptFileHandler(); -} -extern "C" { - pub fn VSISetCryptKey(pabyKey: *const GByte, nKeySize: libc::c_int); -} -extern "C" { - pub fn VSICleanupFileManager(); -} -extern "C" { - pub fn VSIFileFromMemBuffer( - pszFilename: *const libc::c_char, - pabyData: *mut GByte, - nDataLength: vsi_l_offset, - bTakeOwnership: libc::c_int, - ) -> *mut VSILFILE; -} -extern "C" { - pub fn VSIGetMemFileBuffer( - pszFilename: *const libc::c_char, - pnDataLength: *mut vsi_l_offset, - bUnlinkAndSeize: libc::c_int, - ) -> *mut GByte; -} -pub type VSIWriteFunction = ::std::option::Option< - unsafe extern "C" fn(ptr: *const libc::c_void, size: usize, nmemb: usize, stream: *mut FILE) - -> usize, ->; -extern "C" { - pub fn VSIStdoutSetRedirection(pFct: VSIWriteFunction, stream: *mut FILE); -} -extern "C" { - pub fn VSITime(arg1: *mut libc::c_ulong) -> libc::c_ulong; -} -extern "C" { - pub fn VSICTime(arg1: libc::c_ulong) -> *const libc::c_char; -} -extern "C" { - pub fn VSIGMTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; -} -extern "C" { - pub fn VSILocalTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; -} -pub mod CPLErr { - /// \file cpl_error.h - /// - /// CPL error handling services. - pub type Type = u32; - pub const CE_None: Type = 0; - pub const CE_Debug: Type = 1; - pub const CE_Warning: Type = 2; - pub const CE_Failure: Type = 3; - pub const CE_Fatal: Type = 4; -} -pub type CPLErrorNum = libc::c_int; -extern "C" { - pub fn CPLError(eErrClass: CPLErr::Type, err_no: CPLErrorNum, fmt: *const libc::c_char, ...); -} -extern "C" { - pub fn CPLErrorV( - arg1: CPLErr::Type, - arg2: CPLErrorNum, - arg3: *const libc::c_char, - arg4: *mut __va_list_tag, - ); -} -extern "C" { - pub fn CPLEmergencyError(arg1: *const libc::c_char); -} -extern "C" { - pub fn CPLErrorReset(); -} -extern "C" { - pub fn CPLGetLastErrorNo() -> CPLErrorNum; -} -extern "C" { - pub fn CPLGetLastErrorType() -> CPLErr::Type; -} -extern "C" { - pub fn CPLGetLastErrorMsg() -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetErrorHandlerUserData() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLErrorSetState( - eErrClass: CPLErr::Type, - err_no: CPLErrorNum, - pszMsg: *const libc::c_char, - ); -} -extern "C" { - pub fn CPLCleanupErrorMutex(); -} -pub type CPLErrorHandler = ::std::option::Option< - unsafe extern "C" fn(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char), ->; -extern "C" { - pub fn CPLLoggingErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLDefaultErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLQuietErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLTurnFailureIntoWarning(bOn: libc::c_int); -} -extern "C" { - pub fn CPLSetErrorHandler(arg1: CPLErrorHandler) -> CPLErrorHandler; -} -extern "C" { - pub fn CPLSetErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void) -> CPLErrorHandler; -} -extern "C" { - pub fn CPLPushErrorHandler(arg1: CPLErrorHandler); -} -extern "C" { - pub fn CPLPushErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void); -} -extern "C" { - pub fn CPLSetCurrentErrorHandlerCatchDebug(bCatchDebug: libc::c_int); -} -extern "C" { - pub fn CPLPopErrorHandler(); -} -extern "C" { - pub fn CPLDebug(arg1: *const libc::c_char, arg2: *const libc::c_char, ...); -} -extern "C" { - /// \file cpl_conv.h - /// - /// Various convenience functions for CPL. - /// - pub fn CPLVerifyConfiguration(); -} -extern "C" { - pub fn CPLGetConfigOption( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetThreadLocalConfigOption( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLSetConfigOption(arg1: *const libc::c_char, arg2: *const libc::c_char); -} -extern "C" { - pub fn CPLSetThreadLocalConfigOption( - pszKey: *const libc::c_char, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn CPLFreeConfig(); -} -extern "C" { - pub fn CPLMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLStrlwr(arg1: *mut libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLFGets( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *mut FILE, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLReadLine(arg1: *mut FILE) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLineL(arg1: *mut VSILFILE) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLine2L( - arg1: *mut VSILFILE, - nMaxCols: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLAtof(arg1: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLAtofDelim(arg1: *const libc::c_char, arg2: libc::c_char) -> f64; -} -extern "C" { - pub fn CPLStrtod(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn CPLStrtodDelim( - arg1: *const libc::c_char, - arg2: *mut *mut libc::c_char, - arg3: libc::c_char, - ) -> f64; -} -extern "C" { - pub fn CPLStrtof(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f32; -} -extern "C" { - pub fn CPLStrtofDelim( - arg1: *const libc::c_char, - arg2: *mut *mut libc::c_char, - arg3: libc::c_char, - ) -> f32; -} -extern "C" { - pub fn CPLAtofM(arg1: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLScanString( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLScanDouble(arg1: *const libc::c_char, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn CPLScanLong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_long; -} -extern "C" { - pub fn CPLScanULong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_ulong; -} -extern "C" { - pub fn CPLScanUIntBig(arg1: *const libc::c_char, arg2: libc::c_int) -> GUIntBig; -} -extern "C" { - pub fn CPLAtoGIntBig(pszString: *const libc::c_char) -> GIntBig; -} -extern "C" { - pub fn CPLAtoGIntBigEx( - pszString: *const libc::c_char, - bWarn: libc::c_int, - pbOverflow: *mut libc::c_int, - ) -> GIntBig; -} -extern "C" { - pub fn CPLScanPointer(arg1: *const libc::c_char, arg2: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLPrintString( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintStringFill( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintInt32(arg1: *mut libc::c_char, arg2: GInt32, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintUIntBig( - arg1: *mut libc::c_char, - arg2: GUIntBig, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintDouble( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: f64, - arg4: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintTime( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *const libc::c_char, - arg4: *const tm, - arg5: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintPointer( - arg1: *mut libc::c_char, - arg2: *mut libc::c_void, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLGetSymbol(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLGetExecPath(pszPathBuf: *mut libc::c_char, nMaxLength: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn CPLGetPath(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetDirname(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetFilename(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetBasename(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetExtension(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetCurrentDir() -> *mut libc::c_char; -} -extern "C" { - pub fn CPLFormFilename( - pszPath: *const libc::c_char, - pszBasename: *const libc::c_char, - pszExtension: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLFormCIFilename( - pszPath: *const libc::c_char, - pszBasename: *const libc::c_char, - pszExtension: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLResetExtension( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLProjectRelativeFilename( - pszProjectDir: *const libc::c_char, - pszSecondaryFilename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLIsFilenameRelative(pszFilename: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn CPLExtractRelativePath( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCleanTrailingSlash(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCorrespondingPaths( - pszOldFilename: *const libc::c_char, - pszNewFilename: *const libc::c_char, - papszFileList: *mut *mut libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn CPLCheckForFile( - pszFilename: *mut libc::c_char, - papszSiblingList: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLGenerateTempFilename(pszStem: *const libc::c_char) -> *const libc::c_char; -} -pub type CPLFileFinder = ::std::option::Option< - unsafe extern "C" fn(arg1: *const libc::c_char, arg2: *const libc::c_char) - -> *const libc::c_char, ->; -extern "C" { - pub fn CPLFindFile( - pszClass: *const libc::c_char, - pszBasename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLDefaultFindFile( - pszClass: *const libc::c_char, - pszBasename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLPushFileFinder(pfnFinder: CPLFileFinder); -} -extern "C" { - pub fn CPLPopFileFinder() -> CPLFileFinder; -} -extern "C" { - pub fn CPLPushFinderLocation(arg1: *const libc::c_char); -} -extern "C" { - pub fn CPLPopFinderLocation(); -} -extern "C" { - pub fn CPLFinderClean(); -} -extern "C" { - pub fn CPLStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLSharedFileInfo { - pub fp: *mut FILE, - pub nRefCount: libc::c_int, - pub bLarge: libc::c_int, - pub pszFilename: *mut libc::c_char, - pub pszAccess: *mut libc::c_char, -} -#[test] -fn bindgen_test_layout_CPLSharedFileInfo() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLSharedFileInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLSharedFileInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(fp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nRefCount as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(nRefCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bLarge as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(bLarge) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszFilename as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(pszFilename) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAccess as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(pszAccess) - ) - ); -} -extern "C" { - pub fn CPLOpenShared( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *mut FILE; -} -extern "C" { - pub fn CPLCloseShared(arg1: *mut FILE); -} -extern "C" { - pub fn CPLGetSharedList(arg1: *mut libc::c_int) -> *mut CPLSharedFileInfo; -} -extern "C" { - pub fn CPLDumpSharedList(arg1: *mut FILE); -} -extern "C" { - pub fn CPLCleanupSharedFileMutex(); -} -extern "C" { - pub fn CPLDMSToDec(is: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLDecToDMS( - dfAngle: f64, - pszAxis: *const libc::c_char, - nPrecision: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLPackedDMSToDec(arg1: f64) -> f64; -} -extern "C" { - pub fn CPLDecToPackedDMS(dfDec: f64) -> f64; -} -extern "C" { - pub fn CPLStringToComplex(pszString: *const libc::c_char, pdfReal: *mut f64, pdfImag: *mut f64); -} -extern "C" { - pub fn CPLUnlinkTree(arg1: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn CPLCopyFile( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLCopyTree( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLMoveFile( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLSymlink( - pszOldPath: *const libc::c_char, - pszNewPath: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLCreateZip( - pszZipFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateFileInZip( - hZip: *mut libc::c_void, - pszFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn CPLWriteFileInZip( - hZip: *mut libc::c_void, - pBuffer: *const libc::c_void, - nBufferSize: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn CPLCloseFileInZip(hZip: *mut libc::c_void) -> CPLErr::Type; -} -extern "C" { - pub fn CPLCloseZip(hZip: *mut libc::c_void) -> CPLErr::Type; -} -extern "C" { - pub fn CPLZLibDeflate( - ptr: *const libc::c_void, - nBytes: usize, - nLevel: libc::c_int, - outptr: *mut libc::c_void, - nOutAvailableBytes: usize, - pnOutBytes: *mut usize, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLZLibInflate( - ptr: *const libc::c_void, - nBytes: usize, - outptr: *mut libc::c_void, - nOutAvailableBytes: usize, - pnOutBytes: *mut usize, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLValidateXML( - pszXMLFilename: *const libc::c_char, - pszXSDFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLsetlocale(category: libc::c_int, locale: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLCleanupSetlocaleMutex(); -} -pub type GDALProgressFunc = ::std::option::Option< - unsafe extern "C" fn( - dfComplete: f64, - pszMessage: *const libc::c_char, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALDummyProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTermProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALScaledProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateScaledProgress( - arg1: f64, - arg2: f64, - arg3: GDALProgressFunc, - arg4: *mut libc::c_void, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyScaledProgress(arg1: *mut libc::c_void); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLVirtualMem { - _unused: [u8; 0], -} -/// Callback triggered when a still unmapped page of virtual memory is accessed. -/// The callback has the responsibility of filling the page with relevant values -/// -/// @param ctxt virtual memory handle. -/// @param nOffset offset of the page in the memory mapping. -/// @param pPageToFill address of the page to fill. Note that the address might -/// be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset. -/// @param nToFill number of bytes of the page. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToFill: *mut libc::c_void, - nToFill: usize, - pUserData: *mut libc::c_void, - ), ->; -/// Callback triggered when a dirty mapped page is going to be freed. -/// (saturation of cache, or termination of the virtual memory mapping). -/// -/// @param ctxt virtual memory handle. -/// @param nOffset offset of the page in the memory mapping. -/// @param pPageToBeEvicted address of the page that will be flushed. Note that the address might -/// be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset. -/// @param nToBeEvicted number of bytes of the page. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToBeEvicted: *const libc::c_void, - nToBeEvicted: usize, - pUserData: *mut libc::c_void, - ), ->; -/// Callback triggered when a virtual memory mapping is destroyed. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemFreeUserData = - ::std::option::Option; -pub mod CPLVirtualMemAccessMode { - /// Access mode of a virtual memory mapping. - pub type Type = u32; - /// The mapping is meant at being read-only, but writes will not be prevented. - /// Note that any content written will be lost. - pub const VIRTUALMEM_READONLY: Type = 0; - /// The mapping is meant at being read-only, and this will be enforced - /// through the operating system page protection mechanism. - pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; - /// The mapping is meant at being read-write, and modified pages can be saved - /// thanks to the pfnUnCachePage callback - pub const VIRTUALMEM_READWRITE: Type = 2; -} -extern "C" { - /// Return the size of a page of virtual memory. - /// - /// @return the page size. - /// - /// @since GDAL 1.11 - pub fn CPLGetPageSize() -> usize; -} -extern "C" { - /// Create a new virtual memory mapping. - /// - /// This will reserve an area of virtual memory of size nSize, whose size - /// might be potentially much larger than the physical memory available. Initially, - /// no physical memory will be allocated. As soon as memory pages will be accessed, - /// they will be allocated transparently and filled with the pfnCachePage callback. - /// When the allowed cache size is reached, the least recently used pages will - /// be unallocated. - /// - /// On Linux AMD64 platforms, the maximum value for nSize is 128 TB. - /// On Linux x86 platforms, the maximum value for nSize is 2 GB. - /// - /// Only supported on Linux for now. - /// - /// Note that on Linux, this function will install a SIGSEGV handler. The - /// original handler will be restored by CPLVirtualMemManagerTerminate(). - /// - /// @param nSize size in bytes of the virtual memory mapping. - /// @param nCacheSize size in bytes of the maximum memory that will be really - /// allocated (must ideally fit into RAM). - /// @param nPageSizeHint hint for the page size. Must be a multiple of the - /// system page size, returned by CPLGetPageSize(). - /// Minimum value is generally 4096. Might be set to 0 to - /// let the function determine a default page size. - /// @param bSingleThreadUsage set to TRUE if there will be no concurrent threads - /// that will access the virtual memory mapping. This can - /// optimize performance a bit. - /// @param eAccessMode permission to use for the virtual memory mapping. - /// @param pfnCachePage callback triggered when a still unmapped page of virtual - /// memory is accessed. The callback has the responsibility - /// of filling the page with relevant values. - /// @param pfnUnCachePage callback triggered when a dirty mapped page is going to - /// be freed (saturation of cache, or termination of the - /// virtual memory mapping). Might be NULL. - /// @param pfnFreeUserData callback that can be used to free pCbkUserData. Might be - /// NULL - /// @param pCbkUserData user data passed to pfnCachePage and pfnUnCachePage. - /// - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemNew( - nSize: usize, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnCachePage: CPLVirtualMemCachePageCbk, - pfnUnCachePage: CPLVirtualMemUnCachePageCbk, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Return if virtual memory mapping of a file is available. - /// - /// @return TRUE if virtual memory mapping of a file is available. - /// @since GDAL 1.11 - pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; -} -extern "C" { - /// Create a new virtual memory mapping from a file. - /// - /// The file must be a "real" file recognized by the operating system, and not - /// a VSI extended virtual file. - /// - /// In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written - /// in the file. - /// - /// On Linux AMD64 platforms, the maximum value for nLength is 128 TB. - /// On Linux x86 platforms, the maximum value for nLength is 2 GB. - /// - /// Supported on Linux only in GDAL <= 2.0, and all POSIX systems supporting - /// mmap() in GDAL >= 2.1 - /// - /// @param fp Virtual file handle. - /// @param nOffset Offset in the file to start the mapping from. - /// @param nLength Length of the portion of the file to map into memory. - /// @param eAccessMode Permission to use for the virtual memory mapping. This must - /// be consistent with how the file has been opened. - /// @param pfnFreeUserData callback that is called when the object is destroyed. - /// @param pCbkUserData user data passed to pfnFreeUserData. - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemFileMapNew( - fp: *mut VSILFILE, - nOffset: vsi_l_offset, - nLength: vsi_l_offset, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Create a new virtual memory mapping derived from an other virtual memory - /// mapping. - /// - /// This may be useful in case of creating mapping for pixel interleaved data. - /// - /// The new mapping takes a reference on the base mapping. - /// - /// @param pVMemBase Base virtual memory mapping - /// @param nOffset Offset in the base virtual memory mapping from which to start - /// the new mapping. - /// @param nSize Size of the base virtual memory mapping to expose in the - /// the new mapping. - /// @param pfnFreeUserData callback that is called when the object is destroyed. - /// @param pCbkUserData user data passed to pfnFreeUserData. - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemDerivedNew( - pVMemBase: *mut CPLVirtualMem, - nOffset: vsi_l_offset, - nSize: vsi_l_offset, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Free a virtual memory mapping. - /// - /// The pointer returned by CPLVirtualMemGetAddr() will no longer be valid. - /// If the virtual memory mapping was created with read/write permissions and that - /// they are dirty (i.e. modified) pages, they will be flushed through the - /// pfnUnCachePage callback before being freed. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Return the pointer to the start of a virtual memory mapping. - /// - /// The bytes in the range [p:p+CPLVirtualMemGetSize()-1] where p is the pointer - /// returned by this function will be valid, until CPLVirtualMemFree() is called. - /// - /// Note that if a range of bytes used as an argument of a system call - /// (such as read() or write()) contains pages that have not been "realized", the - /// system call will fail with EFAULT. CPLVirtualMemPin() can be used to work - /// around this issue. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the pointer to the start of a virtual memory mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; -} -extern "C" { - /// Return the size of the virtual memory mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the size of the virtual memory mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; -} -extern "C" { - /// Return if the virtual memory mapping is a direct file mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return TRUE if the virtual memory mapping is a direct file mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; -} -extern "C" { - /// Return the access mode of the virtual memory mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the access mode of the virtual memory mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; -} -extern "C" { - /// Return the page size associated to a virtual memory mapping. - /// - /// The value returned will be at least CPLGetPageSize(), but potentially - /// larger. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the page size - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; -} -extern "C" { - /// Return TRUE if this memory mapping can be accessed safely from concurrent - /// threads. - /// - /// The situation that can cause problems is when several threads try to access - /// a page of the mapping that is not yet mapped. - /// - /// The return value of this function depends on whether bSingleThreadUsage has - /// been set of not in CPLVirtualMemNew() and/or the implementation. - /// - /// On Linux, this will always return TRUE if bSingleThreadUsage = FALSE. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return TRUE if this memory mapping can be accessed safely from concurrent - /// threads. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; -} -extern "C" { - /// Declare that a thread will access a virtual memory mapping. - /// - /// This function must be called by a thread that wants to access the - /// content of a virtual memory mapping, except if the virtual memory mapping has - /// been created with bSingleThreadUsage = TRUE. - /// - /// This function must be paired with CPLVirtualMemUnDeclareThread(). - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Declare that a thread will stop accessing a virtual memory mapping. - /// - /// This function must be called by a thread that will no longer access the - /// content of a virtual memory mapping, except if the virtual memory mapping has - /// been created with bSingleThreadUsage = TRUE. - /// - /// This function must be paired with CPLVirtualMemDeclareThread(). - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Make sure that a region of virtual memory will be realized. - /// - /// Calling this function is not required, but might be useful when debugging - /// a process with tools like gdb or valgrind that do not naturally like - /// segmentation fault signals. - /// - /// It is also needed when wanting to provide part of virtual memory mapping - /// to a system call such as read() or write(). If read() or write() is called - /// on a memory region not yet realized, the call will fail with EFAULT. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @param pAddr the memory region to pin. - /// @param nSize the size of the memory region. - /// @param bWriteOp set to TRUE if the memory are will be accessed in write mode. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemPin( - ctxt: *mut CPLVirtualMem, - pAddr: *mut libc::c_void, - nSize: usize, - bWriteOp: libc::c_int, - ); -} -extern "C" { - /// Cleanup any resource and handlers related to virtual memory. - /// - /// This function must be called after the last CPLVirtualMem object has - /// been freed. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemManagerTerminate(); -} -pub mod CPLXMLNodeType { - /// \file cpl_minixml.h - /// - /// Definitions for CPL mini XML Parser/Serializer. - pub type Type = u32; - /// Node is an element - pub const CXT_Element: Type = 0; - /// Node is a raw text value - pub const CXT_Text: Type = 1; - /// Node is attribute - pub const CXT_Attribute: Type = 2; - /// Node is an XML comment. - pub const CXT_Comment: Type = 3; - /// Node is a special literal - pub const CXT_Literal: Type = 4; -} -/// Document node structure. -/// -/// This C structure is used to hold a single text fragment representing a -/// component of the document when parsed. It should be allocated with the -/// appropriate CPL function, and freed with CPLDestroyXMLNode(). The structure -/// contents should not normally be altered by application code, but may be -/// freely examined by application code. -/// -/// Using the psChild and psNext pointers, a hierarchical tree structure -/// for a document can be represented as a tree of CPLXMLNode structures. -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLXMLNode { - /// \brief Node type - /// - /// One of CXT_Element, CXT_Text, CXT_Attribute, CXT_Comment, - /// or CXT_Literal. - pub eType: CPLXMLNodeType::Type, - /// \brief Node value - /// - /// For CXT_Element this is the name of the element, without the angle - /// brackets. Note there is a single CXT_Element even when the document - /// contains a start and end element tag. The node represents the pair. - /// All text or other elements between the start and end tag will appear - /// as children nodes of this CXT_Element node. - /// - /// For CXT_Attribute the pszValue is the attribute name. The value of - /// the attribute will be a CXT_Text child. - /// - /// For CXT_Text this is the text itself (value of an attribute, or a - /// text fragment between an element start and end tags. - /// - /// For CXT_Literal it is all the literal text. Currently this is just - /// used for !DOCTYPE lines, and the value would be the entire line. - /// - /// For CXT_Comment the value is all the literal text within the comment, - /// but not including the comment start/end indicators ("<--" and "-->"). - pub pszValue: *mut libc::c_char, - /// \brief Next sibling. - /// - /// Pointer to next sibling, that is the next node appearing after this - /// one that has the same parent as this node. NULL if this node is the - /// last child of the parent element. - pub psNext: *mut CPLXMLNode, - /// \brief Child node. - /// - /// Pointer to first child node, if any. Only CXT_Element and CXT_Attribute - /// nodes should have children. For CXT_Attribute it should be a single - /// CXT_Text value node, while CXT_Element can have any kind of child. - /// The full list of children for a node are identified by walking the - /// psNext's starting with the psChild node. - pub psChild: *mut CPLXMLNode, -} -#[test] -fn bindgen_test_layout_CPLXMLNode() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLXMLNode)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLXMLNode)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(eType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(pszValue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psNext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psChild) - ) - ); -} -extern "C" { - pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSearchXMLNode( - poRoot: *mut CPLXMLNode, - pszTarget: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLGetXMLValue( - poRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszDefault: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCreateXMLNode( - poParent: *mut CPLXMLNode, - eType: CPLXMLNodeType::Type, - pszText: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; -} -extern "C" { - pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLCreateXMLElementAndValue( - psParent: *mut CPLXMLNode, - pszName: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLAddXMLAttributeAndValue( - psParent: *mut CPLXMLNode, - pszName: *const libc::c_char, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn CPLCloneXMLTree(psTree: *mut CPLXMLNode) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSetXMLValue( - psRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLStripXMLNamespace( - psRoot: *mut CPLXMLNode, - pszNameSpace: *const libc::c_char, - bRecurse: libc::c_int, - ); -} -extern "C" { - pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); -} -extern "C" { - pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSerializeXMLTreeToFile( - psTree: *const CPLXMLNode, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, -} -#[test] -fn bindgen_test_layout_OGREnvelope() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(OGREnvelope)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxY) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope3D { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, - pub MinZ: f64, - pub MaxZ: f64, -} -#[test] -fn bindgen_test_layout_OGREnvelope3D() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(OGREnvelope3D)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope3D)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxZ) - ) - ); -} -extern "C" { - pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn OGRFree(arg1: *mut libc::c_void); -} -pub mod OGRwkbGeometryType { - /// List of well known binary geometry types. These are used within the BLOBs - /// but are also returned from OGRGeometry::getGeometryType() to identify the - /// type of a geometry object. - pub type Type = u32; - /// < unknown type, non-standard - pub const wkbUnknown: Type = 0; - /// < 0-dimensional geometric object, standard WKB - pub const wkbPoint: Type = 1; - /// < 1-dimensional geometric object with linear - /// interpolation between Points, standard WKB - pub const wkbLineString: Type = 2; - /// < planar 2-dimensional geometric object defined - /// by 1 exterior boundary and 0 or more interior - /// boundaries, standard WKB - pub const wkbPolygon: Type = 3; - /// < GeometryCollection of Points, standard WKB - pub const wkbMultiPoint: Type = 4; - /// < GeometryCollection of LineStrings, standard WKB - pub const wkbMultiLineString: Type = 5; - /// < GeometryCollection of Polygons, standard WKB - pub const wkbMultiPolygon: Type = 6; - /// < geometric object that is a collection of 1 - /// or more geometric objects, standard WKB - pub const wkbGeometryCollection: Type = 7; - /// < one or more circular arc segments connected end to end, - /// ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCircularString: Type = 8; - /// < sequence of contiguous curves, ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCompoundCurve: Type = 9; - /// < planar surface, defined by 1 exterior boundary - /// and zero or more interior boundaries, that are curves. - /// ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCurvePolygon: Type = 10; - /// < GeometryCollection of Curves, ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiCurve: Type = 11; - /// < GeometryCollection of Surfaces, ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiSurface: Type = 12; - /// < Curve (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurve: Type = 13; - /// < Surface (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbSurface: Type = 14; - /// < a contiguous collection of polygons, which share common boundary segments, - /// ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbPolyhedralSurface: Type = 15; - /// < a PolyhedralSurface consisting only of Triangle patches - /// ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTIN: Type = 16; - pub const wkbTriangle: Type = 17; - /// < non-standard, for pure attribute records - pub const wkbNone: Type = 100; - /// < non-standard, just for createGeometry() - pub const wkbLinearRing: Type = 101; - /// < wkbCircularString with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCircularStringZ: Type = 1008; - /// < wkbCompoundCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCompoundCurveZ: Type = 1009; - /// < wkbCurvePolygon with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCurvePolygonZ: Type = 1010; - /// < wkbMultiCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiCurveZ: Type = 1011; - /// < wkbMultiSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiSurfaceZ: Type = 1012; - /// < wkbCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurveZ: Type = 1013; - /// < wkbSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbSurfaceZ: Type = 1014; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbPolyhedralSurfaceZ: Type = 1015; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTINZ: Type = 1016; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTriangleZ: Type = 1017; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbPointM: Type = 2001; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbLineStringM: Type = 2002; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbPolygonM: Type = 2003; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiPointM: Type = 2004; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiLineStringM: Type = 2005; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiPolygonM: Type = 2006; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbGeometryCollectionM: Type = 2007; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCircularStringM: Type = 2008; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCompoundCurveM: Type = 2009; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurvePolygonM: Type = 2010; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiCurveM: Type = 2011; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiSurfaceM: Type = 2012; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurveM: Type = 2013; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbSurfaceM: Type = 2014; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbPolyhedralSurfaceM: Type = 2015; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTINM: Type = 2016; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTriangleM: Type = 2017; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbPointZM: Type = 3001; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbLineStringZM: Type = 3002; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbPolygonZM: Type = 3003; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiPointZM: Type = 3004; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiLineStringZM: Type = 3005; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiPolygonZM: Type = 3006; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbGeometryCollectionZM: Type = 3007; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCircularStringZM: Type = 3008; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCompoundCurveZM: Type = 3009; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurvePolygonZM: Type = 3010; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiCurveZM: Type = 3011; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiSurfaceZM: Type = 3012; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurveZM: Type = 3013; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbSurfaceZM: Type = 3014; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbPolyhedralSurfaceZM: Type = 3015; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTINZM: Type = 3016; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTriangleZM: Type = 3017; - /// < 2.5D extension as per 99-402 - pub const wkbPoint25D: Type = 2147483649; - /// < 2.5D extension as per 99-402 - pub const wkbLineString25D: Type = 2147483650; - /// < 2.5D extension as per 99-402 - pub const wkbPolygon25D: Type = 2147483651; - /// < 2.5D extension as per 99-402 - pub const wkbMultiPoint25D: Type = 2147483652; - /// < 2.5D extension as per 99-402 - pub const wkbMultiLineString25D: Type = 2147483653; - /// < 2.5D extension as per 99-402 - pub const wkbMultiPolygon25D: Type = 2147483654; - /// < 2.5D extension as per 99-402 - pub const wkbGeometryCollection25D: Type = 2147483655; -} -extern "C" { - pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGRMergeGeometryTypes( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGRMergeGeometryTypesEx( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - bAllowPromotingToCurves: libc::c_int, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetModifier( - eType: OGRwkbGeometryType::Type, - bSetZ: libc::c_int, - bSetM: libc::c_int, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsSubClassOf( - eType: OGRwkbGeometryType::Type, - eSuperType: OGRwkbGeometryType::Type, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -pub mod OGRwkbByteOrder { - pub type Type = u32; - pub const wkbXDR: Type = 0; - pub const wkbNDR: Type = 1; -} -pub mod OGRFieldType { - /// List of feature field types. This list is likely to be extended in the - /// future ... avoid coding applications based on the assumption that all - /// field types can be known. - pub type Type = u32; - /// Simple 32bit integer - pub const OFTInteger: Type = 0; - /// List of 32bit integers - pub const OFTIntegerList: Type = 1; - /// Double Precision floating point - pub const OFTReal: Type = 2; - /// List of doubles - pub const OFTRealList: Type = 3; - /// String of ASCII chars - pub const OFTString: Type = 4; - /// Array of strings - pub const OFTStringList: Type = 5; - /// deprecated - pub const OFTWideString: Type = 6; - /// deprecated - pub const OFTWideStringList: Type = 7; - /// Raw Binary data - pub const OFTBinary: Type = 8; - /// Date - pub const OFTDate: Type = 9; - /// Time - pub const OFTTime: Type = 10; - /// Date and Time - pub const OFTDateTime: Type = 11; - /// Single 64bit integer - pub const OFTInteger64: Type = 12; - /// List of 64bit integers - pub const OFTInteger64List: Type = 13; - /// List of 64bit integers - pub const OFTMaxType: Type = 13; -} -pub mod OGRFieldSubType { - /// List of field subtypes. A subtype represents a hint, a restriction of the - /// main type, that is not strictly necessary to consult. - /// This list is likely to be extended in the - /// future ... avoid coding applications based on the assumption that all - /// field types can be known. - /// Most subtypes only make sense for a restricted set of main types. - /// @since GDAL 2.0 - pub type Type = u32; - /// No subtype. This is the default value - pub const OFSTNone: Type = 0; - /// Boolean integer. Only valid for OFTInteger and OFTIntegerList. - pub const OFSTBoolean: Type = 1; - /// Signed 16-bit integer. Only valid for OFTInteger and OFTIntegerList. - pub const OFSTInt16: Type = 2; - /// Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList. - pub const OFSTFloat32: Type = 3; - /// Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList. - pub const OFSTMaxSubType: Type = 3; -} -pub mod OGRJustification { - /// Display justification for field values. - pub type Type = u32; - pub const OJUndefined: Type = 0; - pub const OJLeft: Type = 1; - pub const OJRight: Type = 2; -} -/// OGRFeature field attribute value union. -#[repr(C)] -#[derive(Copy, Clone)] -pub union OGRField { - pub Integer: libc::c_int, - pub Integer64: GIntBig, - pub Real: f64, - pub String: *mut libc::c_char, - pub IntegerList: OGRField__bindgen_ty_1, - pub Integer64List: OGRField__bindgen_ty_2, - pub RealList: OGRField__bindgen_ty_3, - pub StringList: OGRField__bindgen_ty_4, - pub Binary: OGRField__bindgen_ty_5, - pub Set: OGRField__bindgen_ty_6, - pub Date: OGRField__bindgen_ty_7, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_1 { - pub nCount: libc::c_int, - pub paList: *mut libc::c_int, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_2 { - pub nCount: libc::c_int, - pub paList: *mut GIntBig, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_3 { - pub nCount: libc::c_int, - pub paList: *mut f64, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_4 { - pub nCount: libc::c_int, - pub paList: *mut *mut libc::c_char, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_4() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_5 { - pub nCount: libc::c_int, - pub paData: *mut GByte, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_5() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(paData) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_6 { - pub nMarker1: libc::c_int, - pub nMarker2: libc::c_int, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_6() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker2) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_7 { - pub Year: GInt16, - pub Month: GByte, - pub Day: GByte, - pub Hour: GByte, - pub Minute: GByte, - pub TZFlag: GByte, - pub Reserved: GByte, - pub Second: f32, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_7() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Month) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Day) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Minute) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(TZFlag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Reserved) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Second) - ) - ); -} -#[test] -fn bindgen_test_layout_OGRField() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Real) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(String) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(IntegerList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64List) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(RealList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(StringList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Binary) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Set) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Date) - ) - ); -} -extern "C" { - pub fn OGRParseDate( - pszInput: *const libc::c_char, - psOutput: *mut OGRField, - nOptions: libc::c_int, - ) -> libc::c_int; -} -pub mod ogr_style_tool_class_id { - /// OGRStyleTool derived class types (returned by GetType()). - pub type Type = u32; - pub const OGRSTCNone: Type = 0; - pub const OGRSTCPen: Type = 1; - pub const OGRSTCBrush: Type = 2; - pub const OGRSTCSymbol: Type = 3; - pub const OGRSTCLabel: Type = 4; - pub const OGRSTCVector: Type = 5; -} -pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; -pub mod ogr_style_tool_units_id { - /// List of units supported by OGRStyleTools. - pub type Type = u32; - pub const OGRSTUGround: Type = 0; - pub const OGRSTUPixel: Type = 1; - pub const OGRSTUPoints: Type = 2; - pub const OGRSTUMM: Type = 3; - pub const OGRSTUCM: Type = 4; - pub const OGRSTUInches: Type = 5; -} -pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; -extern "C" { - pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - /// Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor. - /// - /// The purpose of this method is to ensure that calling code will run with the GDAL - /// version it is compiled for. It is primarily indented for external plugins. - /// - /// @param nVersionMajor Major version to be tested against - /// @param nVersionMinor Minor version to be tested against - /// @param pszCallingComponentName If not NULL, in case of version mismatch, the method - /// will issue a failure mentioning the name of - /// the calling component. - pub fn GDALCheckVersion( - nVersionMajor: libc::c_int, - nVersionMinor: libc::c_int, - pszCallingComponentName: *const libc::c_char, - ) -> libc::c_int; -} -pub type OGRGeometryH = *mut libc::c_void; -pub type OGRSpatialReferenceH = *mut libc::c_void; -pub type OGRCoordinateTransformationH = *mut libc::c_void; -extern "C" { - pub fn OGR_G_CreateFromWkb( - arg1: *mut libc::c_uchar, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromWkt( - arg1: *mut *mut libc::c_char, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromFgf( - arg1: *mut libc::c_uchar, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - arg5: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ApproximateArcAngles( - dfCenterX: f64, - dfCenterY: f64, - dfZ: f64, - dfPrimaryRadius: f64, - dfSecondaryAxis: f64, - dfRotation: f64, - dfStartAngle: f64, - dfEndAngle: f64, - dfMaxAngleStepSizeDegrees: f64, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceTo( - hGeom: OGRGeometryH, - eTargetType: OGRwkbGeometryType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsMeasured(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Set3D(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_SetMeasured(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); -} -extern "C" { - pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); -} -extern "C" { - pub fn OGR_G_ImportFromWkb( - arg1: OGRGeometryH, - arg2: *mut libc::c_uchar, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToIsoWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CloseRings(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToGMLEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; -} -extern "C" { - pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; -} -extern "C" { - pub fn OGR_G_ExportToKML( - arg1: OGRGeometryH, - pszAltitudeMode: *const libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToJsonEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); -} -extern "C" { - pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_DelaunayTriangulation( - hThis: OGRGeometryH, - dfTolerance: f64, - bOnlyEdges: libc::c_int, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Segmentize(hGeom: OGRGeometryH, dfMaxLength: f64); -} -extern "C" { - pub fn OGR_G_Intersects(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Equals(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Disjoint(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Touches(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Crosses(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Within(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Contains(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Overlaps(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Boundary(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ConvexHull(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Buffer(arg1: OGRGeometryH, arg2: f64, arg3: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Intersection(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Union(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_UnionCascaded(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_PointOnSurface(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Difference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_SymDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Distance(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Length(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Area(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Centroid(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Value(arg1: OGRGeometryH, dfDistance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Empty(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_IsEmpty(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsValid(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsSimple(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsRing(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Equal(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SymmetricDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetArea(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetPoints( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetPointsZM( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - pabyM: *mut libc::c_void, - nMStride: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetX(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetY(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetZ(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetM(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetPoint( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, - ); -} -extern "C" { - pub fn OGR_G_GetPointZM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, - arg5: *mut f64, - ); -} -extern "C" { - pub fn OGR_G_SetPointCount(hGeom: OGRGeometryH, nNewPointCount: libc::c_int); -} -extern "C" { - pub fn OGR_G_SetPoint(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_SetPoint_2D(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_SetPointM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: f64, - arg3: f64, - arg4: f64, - ); -} -extern "C" { - pub fn OGR_G_SetPointZM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - ); -} -extern "C" { - pub fn OGR_G_AddPoint(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_AddPoint_2D(arg1: OGRGeometryH, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_AddPointM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_AddPointZM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); -} -extern "C" { - pub fn OGR_G_SetPoints( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - ); -} -extern "C" { - pub fn OGR_G_SetPointsZM( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - pabyM: *mut libc::c_void, - nMStride: libc::c_int, - ); -} -extern "C" { - pub fn OGR_G_GetGeometryCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetGeometryRef(arg1: OGRGeometryH, arg2: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AddGeometry(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_AddGeometryDirectly(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_RemoveGeometry( - arg1: OGRGeometryH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_HasCurveGeometry( - arg1: OGRGeometryH, - bLookForNonLinear: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetLinearGeometry( - hGeom: OGRGeometryH, - dfMaxAngleStepSizeDegrees: f64, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetCurveGeometry( - hGeom: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGRBuildPolygonFromEdges( - hLinesAsCollection: OGRGeometryH, - bBestEffort: libc::c_int, - bAutoClose: libc::c_int, - dfTolerance: f64, - peErr: *mut OGRErr::Type, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( - bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; -} -extern "C" { - pub fn OGRSetNonLinearGeometriesEnabledFlag(bFlag: libc::c_int); -} -extern "C" { - pub fn OGRGetNonLinearGeometriesEnabledFlag() -> libc::c_int; -} -pub type OGRFieldDefnH = *mut libc::c_void; -pub type OGRFeatureDefnH = *mut libc::c_void; -pub type OGRFeatureH = *mut libc::c_void; -pub type OGRStyleTableH = *mut libc::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRGeomFieldDefnHS { - _unused: [u8; 0], -} -pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; -extern "C" { - pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_Fld_Destroy(arg1: OGRFieldDefnH); -} -extern "C" { - pub fn OGR_Fld_SetName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_Fld_GetNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Fld_GetType(arg1: OGRFieldDefnH) -> OGRFieldType::Type; -} -extern "C" { - pub fn OGR_Fld_SetType(arg1: OGRFieldDefnH, arg2: OGRFieldType::Type); -} -extern "C" { - pub fn OGR_Fld_GetSubType(arg1: OGRFieldDefnH) -> OGRFieldSubType::Type; -} -extern "C" { - pub fn OGR_Fld_SetSubType(arg1: OGRFieldDefnH, arg2: OGRFieldSubType::Type); -} -extern "C" { - pub fn OGR_Fld_GetJustify(arg1: OGRFieldDefnH) -> OGRJustification::Type; -} -extern "C" { - pub fn OGR_Fld_SetJustify(arg1: OGRFieldDefnH, arg2: OGRJustification::Type); -} -extern "C" { - pub fn OGR_Fld_GetWidth(arg1: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetWidth(arg1: OGRFieldDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_GetPrecision(arg1: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetPrecision(arg1: OGRFieldDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_Set( - arg1: OGRFieldDefnH, - arg2: *const libc::c_char, - arg3: OGRFieldType::Type, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: OGRJustification::Type, - ); -} -extern "C" { - pub fn OGR_Fld_IsIgnored(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetIgnored(hDefn: OGRFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_IsNullable(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetNullable(hDefn: OGRFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_GetDefault(hDefn: OGRFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Fld_SetDefault(hDefn: OGRFieldDefnH, arg1: *const libc::c_char); -} -extern "C" { - pub fn OGR_Fld_IsDefaultDriverSpecific(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_GetFieldTypeName(arg1: OGRFieldType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_GetFieldSubTypeName(arg1: OGRFieldSubType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_AreTypeSubTypeCompatible( - eType: OGRFieldType::Type, - eSubType: OGRFieldSubType::Type, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_GFld_Create( - arg1: *const libc::c_char, - arg2: OGRwkbGeometryType::Type, - ) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_GFld_Destroy(arg1: OGRGeomFieldDefnH); -} -extern "C" { - pub fn OGR_GFld_SetName(arg1: OGRGeomFieldDefnH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_GFld_GetNameRef(arg1: OGRGeomFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_GFld_GetType(arg1: OGRGeomFieldDefnH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GFld_SetType(arg1: OGRGeomFieldDefnH, arg2: OGRwkbGeometryType::Type); -} -extern "C" { - pub fn OGR_GFld_GetSpatialRef(arg1: OGRGeomFieldDefnH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_GFld_SetSpatialRef(arg1: OGRGeomFieldDefnH, hSRS: OGRSpatialReferenceH); -} -extern "C" { - pub fn OGR_GFld_IsNullable(hDefn: OGRGeomFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_GFld_SetNullable(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_GFld_IsIgnored(hDefn: OGRGeomFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_GFld_SetIgnored(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_FD_Create(arg1: *const libc::c_char) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_FD_Destroy(arg1: OGRFeatureDefnH); -} -extern "C" { - pub fn OGR_FD_Release(arg1: OGRFeatureDefnH); -} -extern "C" { - pub fn OGR_FD_GetName(arg1: OGRFeatureDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_FD_GetFieldCount(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetFieldDefn(arg1: OGRFeatureDefnH, arg2: libc::c_int) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_FD_GetFieldIndex(arg1: OGRFeatureDefnH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_AddFieldDefn(arg1: OGRFeatureDefnH, arg2: OGRFieldDefnH); -} -extern "C" { - pub fn OGR_FD_DeleteFieldDefn(hDefn: OGRFeatureDefnH, iField: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_ReorderFieldDefns( - hDefn: OGRFeatureDefnH, - panMap: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_GetGeomType(arg1: OGRFeatureDefnH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_FD_SetGeomType(arg1: OGRFeatureDefnH, arg2: OGRwkbGeometryType::Type); -} -extern "C" { - pub fn OGR_FD_IsGeometryIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_SetGeometryIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_FD_IsStyleIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_SetStyleIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_FD_Reference(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_Dereference(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetReferenceCount(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldCount(hFDefn: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldDefn(hFDefn: OGRFeatureDefnH, i: libc::c_int) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldIndex( - hFDefn: OGRFeatureDefnH, - pszName: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_AddGeomFieldDefn(hFDefn: OGRFeatureDefnH, hGFldDefn: OGRGeomFieldDefnH); -} -extern "C" { - pub fn OGR_FD_DeleteGeomFieldDefn( - hFDefn: OGRFeatureDefnH, - iGeomField: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_IsSame(hFDefn: OGRFeatureDefnH, hOtherFDefn: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_Create(arg1: OGRFeatureDefnH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_F_Destroy(arg1: OGRFeatureH); -} -extern "C" { - pub fn OGR_F_GetDefnRef(arg1: OGRFeatureH) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_F_SetGeometryDirectly(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetGeometry(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetGeometryRef(arg1: OGRFeatureH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_StealGeometry(arg1: OGRFeatureH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_Clone(arg1: OGRFeatureH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_F_Equal(arg1: OGRFeatureH, arg2: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldCount(arg1: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldDefnRef(arg1: OGRFeatureH, arg2: libc::c_int) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_F_GetFieldIndex(arg1: OGRFeatureH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_IsFieldSet(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_UnsetField(arg1: OGRFeatureH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_F_GetRawFieldRef(arg1: OGRFeatureH, arg2: libc::c_int) -> *mut OGRField; -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger64(arg1: OGRFeatureH, arg2: libc::c_int) -> GIntBig; -} -extern "C" { - pub fn OGR_F_GetFieldAsDouble(arg1: OGRFeatureH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_F_GetFieldAsString(arg1: OGRFeatureH, arg2: libc::c_int) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_GetFieldAsIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const GIntBig; -} -extern "C" { - pub fn OGR_F_GetFieldAsDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const f64; -} -extern "C" { - pub fn OGR_F_GetFieldAsStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn OGR_F_GetFieldAsBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *mut GByte; -} -extern "C" { - pub fn OGR_F_GetFieldAsDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - arg4: *mut libc::c_int, - arg5: *mut libc::c_int, - arg6: *mut libc::c_int, - arg7: *mut libc::c_int, - arg8: *mut libc::c_int, - arg9: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsDateTimeEx( - hFeat: OGRFeatureH, - iField: libc::c_int, - pnYear: *mut libc::c_int, - pnMonth: *mut libc::c_int, - pnDay: *mut libc::c_int, - pnHour: *mut libc::c_int, - pnMinute: *mut libc::c_int, - pfSecond: *mut f32, - pnTZFlag: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_SetFieldInteger(arg1: OGRFeatureH, arg2: libc::c_int, arg3: libc::c_int); -} -extern "C" { - pub fn OGR_F_SetFieldInteger64(arg1: OGRFeatureH, arg2: libc::c_int, arg3: GIntBig); -} -extern "C" { - pub fn OGR_F_SetFieldDouble(arg1: OGRFeatureH, arg2: libc::c_int, arg3: f64); -} -extern "C" { - pub fn OGR_F_SetFieldString(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_SetFieldIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_SetFieldInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const GIntBig, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut f64, - ); -} -extern "C" { - pub fn OGR_F_SetFieldStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut *mut libc::c_char, - ); -} -extern "C" { - pub fn OGR_F_SetFieldRaw(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *mut OGRField); -} -extern "C" { - pub fn OGR_F_SetFieldBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut GByte, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDateTimeEx( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: f32, - arg9: libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_GetGeomFieldCount(hFeat: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetGeomFieldDefnRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_F_GetGeomFieldIndex(hFeat: OGRFeatureH, pszName: *const libc::c_char) - -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetGeomFieldRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_SetGeomFieldDirectly( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetGeomField( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetFID(arg1: OGRFeatureH) -> GIntBig; -} -extern "C" { - pub fn OGR_F_SetFID(arg1: OGRFeatureH, arg2: GIntBig) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_DumpReadable(arg1: OGRFeatureH, arg2: *mut FILE); -} -extern "C" { - pub fn OGR_F_SetFrom(arg1: OGRFeatureH, arg2: OGRFeatureH, arg3: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetFromWithMap( - arg1: OGRFeatureH, - arg2: OGRFeatureH, - arg3: libc::c_int, - arg4: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetStyleString(arg1: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_SetStyleString(arg1: OGRFeatureH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); -} -extern "C" { - pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_F_GetNativeData(arg1: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_SetNativeData(arg1: OGRFeatureH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_GetNativeMediaType(arg1: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_SetNativeMediaType(arg1: OGRFeatureH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_FillUnsetWithDefault( - hFeat: OGRFeatureH, - bNotNullableOnly: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ); -} -extern "C" { - pub fn OGR_F_Validate( - arg1: OGRFeatureH, - nValidateFlags: libc::c_int, - bEmitError: libc::c_int, - ) -> libc::c_int; -} -pub type OGRLayerH = *mut libc::c_void; -pub type OGRDataSourceH = *mut libc::c_void; -pub type OGRSFDriverH = *mut libc::c_void; -extern "C" { - pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetGeomType(arg1: OGRLayerH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_L_GetSpatialFilter(arg1: OGRLayerH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_L_SetSpatialFilter(arg1: OGRLayerH, arg2: OGRGeometryH); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterRect(arg1: OGRLayerH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterEx(arg1: OGRLayerH, iGeomField: libc::c_int, hGeom: OGRGeometryH); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterRectEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - dfMinX: f64, - dfMinY: f64, - dfMaxX: f64, - dfMaxY: f64, - ); -} -extern "C" { - pub fn OGR_L_SetAttributeFilter(arg1: OGRLayerH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ResetReading(arg1: OGRLayerH); -} -extern "C" { - pub fn OGR_L_GetNextFeature(arg1: OGRLayerH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_L_SetNextByIndex(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_L_SetFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CreateFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_DeleteFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetLayerDefn(arg1: OGRLayerH) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_L_GetSpatialRef(arg1: OGRLayerH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_L_FindFieldIndex( - arg1: OGRLayerH, - arg2: *const libc::c_char, - bExactMatch: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_GetFeatureCount(arg1: OGRLayerH, arg2: libc::c_int) -> GIntBig; -} -extern "C" { - pub fn OGR_L_GetExtent( - arg1: OGRLayerH, - arg2: *mut OGREnvelope, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetExtentEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - psExtent: *mut OGREnvelope, - bForce: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_TestCapability(arg1: OGRLayerH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_CreateField( - arg1: OGRLayerH, - arg2: OGRFieldDefnH, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CreateGeomField( - hLayer: OGRLayerH, - hFieldDefn: OGRGeomFieldDefnH, - bForce: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_DeleteField(arg1: OGRLayerH, iField: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ReorderFields(arg1: OGRLayerH, panMap: *mut libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ReorderField( - arg1: OGRLayerH, - iOldFieldPos: libc::c_int, - iNewFieldPos: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_AlterFieldDefn( - arg1: OGRLayerH, - iField: libc::c_int, - hNewFieldDefn: OGRFieldDefnH, - nFlags: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_StartTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CommitTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_Dereference(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; -} -extern "C" { - pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_L_SetIgnoredFields(arg1: OGRLayerH, arg2: *mut *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Intersection( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Union( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_SymDifference( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Identity( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Update( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Clip( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Erase( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_Destroy(arg1: OGRDataSourceH); -} -extern "C" { - pub fn OGR_DS_GetName(arg1: OGRDataSourceH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_DS_GetLayerCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_GetLayerByName(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_DeleteLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_GetDriver(arg1: OGRDataSourceH) -> OGRSFDriverH; -} -extern "C" { - pub fn OGR_DS_CreateLayer( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_CopyLayer( - arg1: OGRDataSourceH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_TestCapability(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_ExecuteSQL( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); -} -extern "C" { - pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_Dereference(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetRefCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_Dr_GetName(arg1: OGRSFDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Dr_Open( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_TestCapability(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_Dr_CreateDataSource( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_CopyDataSource( - arg1: OGRSFDriverH, - arg2: OGRDataSourceH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGROpen( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGROpenShared( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; -} -extern "C" { - pub fn OGRRegisterDriver(arg1: OGRSFDriverH); -} -extern "C" { - pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); -} -extern "C" { - pub fn OGRGetDriverCount() -> libc::c_int; -} -extern "C" { - pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; -} -extern "C" { - pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; -} -extern "C" { - pub fn OGRGetOpenDSCount() -> libc::c_int; -} -extern "C" { - pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; -} -extern "C" { - pub fn OGRRegisterAll(); -} -extern "C" { - pub fn OGRCleanupAll(); -} -pub type OGRStyleMgrH = *mut libc::c_void; -pub type OGRStyleToolH = *mut libc::c_void; -extern "C" { - pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; -} -extern "C" { - pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); -} -extern "C" { - pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_SM_InitStyleString( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_GetPartCount( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_GetPart( - hSM: OGRStyleMgrH, - nPartId: libc::c_int, - pszStyleString: *const libc::c_char, - ) -> OGRStyleToolH; -} -extern "C" { - pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_AddStyle( - hSM: OGRStyleMgrH, - pszStyleName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; -} -extern "C" { - pub fn OGR_ST_Destroy(hST: OGRStyleToolH); -} -extern "C" { - pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; -} -extern "C" { - pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; -} -extern "C" { - pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); -} -extern "C" { - pub fn OGR_ST_GetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_ST_GetParamNum( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_ST_GetParamDbl( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> f64; -} -extern "C" { - pub fn OGR_ST_SetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); -} -extern "C" { - pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); -} -extern "C" { - pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_ST_GetRGBFromString( - hST: OGRStyleToolH, - pszColor: *const libc::c_char, - pnRed: *mut libc::c_int, - pnGreen: *mut libc::c_int, - pnBlue: *mut libc::c_int, - pnAlpha: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_Create() -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); -} -extern "C" { - pub fn OGR_STBL_AddStyle( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_SaveStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_LoadStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_Find( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); -} -extern "C" { - pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -pub mod GDALDataType { - /// Pixel data types - pub type Type = u32; - /// Unknown or unspecified type - pub const GDT_Unknown: Type = 0; - /// Eight bit unsigned integer - pub const GDT_Byte: Type = 1; - /// Sixteen bit unsigned integer - pub const GDT_UInt16: Type = 2; - /// Sixteen bit signed integer - pub const GDT_Int16: Type = 3; - /// Thirty two bit unsigned integer - pub const GDT_UInt32: Type = 4; - /// Thirty two bit signed integer - pub const GDT_Int32: Type = 5; - /// Thirty two bit floating point - pub const GDT_Float32: Type = 6; - /// Sixty four bit floating point - pub const GDT_Float64: Type = 7; - /// Complex Int16 - pub const GDT_CInt16: Type = 8; - /// Complex Int32 - pub const GDT_CInt32: Type = 9; - /// Complex Float32 - pub const GDT_CFloat32: Type = 10; - /// Complex Float64 - pub const GDT_CFloat64: Type = 11; - /// Complex Float64 - pub const GDT_TypeCount: Type = 12; -} -extern "C" { - pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDataTypeSizeBits(eDataType: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDataTypeSizeBytes(arg1: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; -} -extern "C" { - pub fn GDALDataTypeUnion( - arg1: GDALDataType::Type, - arg2: GDALDataType::Type, - ) -> GDALDataType::Type; -} -extern "C" { - pub fn GDALAdjustValueToDataType( - eDT: GDALDataType::Type, - dfValue: f64, - pbClamped: *mut libc::c_int, - pbRounded: *mut libc::c_int, - ) -> f64; -} -pub mod GDALAsyncStatusType { - /// status of the asynchronous stream - pub type Type = u32; - pub const GARIO_PENDING: Type = 0; - pub const GARIO_UPDATE: Type = 1; - pub const GARIO_ERROR: Type = 2; - pub const GARIO_COMPLETE: Type = 3; - pub const GARIO_TypeCount: Type = 4; -} -extern "C" { - pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; -} -pub mod GDALAccess { - /// Flag indicating read/write, or read-only access to data. - pub type Type = u32; - /// Read only (no update) access - pub const GA_ReadOnly: Type = 0; - /// Read/write access. - pub const GA_Update: Type = 1; -} -pub mod GDALRWFlag { - /// Read/Write flag for RasterIO() method - pub type Type = u32; - /// Read data - pub const GF_Read: Type = 0; - /// Write data - pub const GF_Write: Type = 1; -} -pub mod GDALRIOResampleAlg { - /// RasterIO() resampling method. - /// @since GDAL 2.0 - pub type Type = u32; - /// Nearest neighbour - pub const GRIORA_NearestNeighbour: Type = 0; - /// Bilinear (2x2 kernel) - pub const GRIORA_Bilinear: Type = 1; - /// Cubic Convolution Approximation (4x4 kernel) - pub const GRIORA_Cubic: Type = 2; - /// Cubic B-Spline Approximation (4x4 kernel) - pub const GRIORA_CubicSpline: Type = 3; - /// Lanczos windowed sinc interpolation (6x6 kernel) - pub const GRIORA_Lanczos: Type = 4; - /// Average - pub const GRIORA_Average: Type = 5; - /// Mode (selects the value which appears most often of all the sampled points) - pub const GRIORA_Mode: Type = 6; - /// Gauss blurring - pub const GRIORA_Gauss: Type = 7; -} -/// Structure to pass extra arguments to RasterIO() method -/// @since GDAL 2.0 -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRasterIOExtraArg { - /// Version of structure (to allow future extensions of the structure) - pub nVersion: libc::c_int, - /// Resampling algorithm - pub eResampleAlg: GDALRIOResampleAlg::Type, - /// Progress callback - pub pfnProgress: GDALProgressFunc, - /// Progress callback user data - pub pProgressData: *mut libc::c_void, - /// Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set. - /// Mostly reserved from the VRT driver to communicate a more precise - /// source window. Must be such that dfXOff - nXOff < 1.0 and - /// dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize < 1.0 - pub bFloatingPointWindowValidity: libc::c_int, - /// Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE - pub dfXOff: f64, - /// Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE - pub dfYOff: f64, - /// Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE - pub dfXSize: f64, - /// Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE - pub dfYSize: f64, -} -#[test] -fn bindgen_test_layout_GDALRasterIOExtraArg() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(nVersion) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnProgress as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pProgressData as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pProgressData) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bFloatingPointWindowValidity - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(bFloatingPointWindowValidity) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYSize) - ) - ); -} -pub mod GDALColorInterp { - /// Types of color interpretation for raster bands. - pub type Type = u32; - pub const GCI_Undefined: Type = 0; - /// Greyscale - pub const GCI_GrayIndex: Type = 1; - /// Paletted (see associated color table) - pub const GCI_PaletteIndex: Type = 2; - /// Red band of RGBA image - pub const GCI_RedBand: Type = 3; - /// Green band of RGBA image - pub const GCI_GreenBand: Type = 4; - /// Blue band of RGBA image - pub const GCI_BlueBand: Type = 5; - /// Alpha (0=transparent, 255=opaque) - pub const GCI_AlphaBand: Type = 6; - /// Hue band of HLS image - pub const GCI_HueBand: Type = 7; - /// Saturation band of HLS image - pub const GCI_SaturationBand: Type = 8; - /// Lightness band of HLS image - pub const GCI_LightnessBand: Type = 9; - /// Cyan band of CMYK image - pub const GCI_CyanBand: Type = 10; - /// Magenta band of CMYK image - pub const GCI_MagentaBand: Type = 11; - /// Yellow band of CMYK image - pub const GCI_YellowBand: Type = 12; - /// Black band of CMLY image - pub const GCI_BlackBand: Type = 13; - /// Y Luminance - pub const GCI_YCbCr_YBand: Type = 14; - /// Cb Chroma - pub const GCI_YCbCr_CbBand: Type = 15; - /// Cr Chroma - pub const GCI_YCbCr_CrBand: Type = 16; - /// Max current value - pub const GCI_Max: Type = 16; -} -extern "C" { - pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; -} -pub mod GDALPaletteInterp { - /// Types of color interpretations for a GDALColorTable. - pub type Type = u32; - /// Grayscale (in GDALColorEntry.c1) - pub const GPI_Gray: Type = 0; - /// Red, Green, Blue and Alpha in (in c1, c2, c3 and c4) - pub const GPI_RGB: Type = 1; - /// Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4) - pub const GPI_CMYK: Type = 2; - /// Hue, Lightness and Saturation (in c1, c2, and c3) - pub const GPI_HLS: Type = 3; -} -extern "C" { - pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; -} -/// Opaque type used for the C bindings of the C++ GDALMajorObject class -pub type GDALMajorObjectH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALDataset class -pub type GDALDatasetH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALRasterBand class -pub type GDALRasterBandH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALDriver class -pub type GDALDriverH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALColorTable class -pub type GDALColorTableH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class -pub type GDALRasterAttributeTableH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALAsyncReader class -pub type GDALAsyncReaderH = *mut libc::c_void; -/// Type to express pixel, line or band spacing. Signed 64 bit integer. -pub type GSpacing = GIntBig; -extern "C" { - pub fn GDALAllRegister(); -} -extern "C" { - pub fn GDALCreate( - hDriver: GDALDriverH, - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: GDALDataType::Type, - arg6: *mut *mut libc::c_char, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALCreateCopy( - arg1: GDALDriverH, - arg2: *const libc::c_char, - arg3: GDALDatasetH, - arg4: libc::c_int, - arg5: *mut *mut libc::c_char, - arg6: GDALProgressFunc, - arg7: *mut libc::c_void, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALIdentifyDriver( - pszFilename: *const libc::c_char, - papszFileList: *mut *mut libc::c_char, - ) -> GDALDriverH; -} -extern "C" { - pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; -} -extern "C" { - pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; -} -extern "C" { - pub fn GDALOpenEx( - pszFilename: *const libc::c_char, - nOpenFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszOpenOptions: *const *const libc::c_char, - papszSiblingFiles: *const *const libc::c_char, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; -} -extern "C" { - pub fn GDALGetDriverCount() -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; -} -extern "C" { - pub fn GDALDestroyDriver(arg1: GDALDriverH); -} -extern "C" { - pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; -} -extern "C" { - pub fn GDALDeregisterDriver(arg1: GDALDriverH); -} -extern "C" { - pub fn GDALDestroyDriverManager(); -} -extern "C" { - pub fn GDALDestroy(); -} -extern "C" { - pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRenameDataset( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALCopyDatasetFiles( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALValidateCreationOptions( - arg1: GDALDriverH, - papszCreationOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; -} -/// Ground Control Point -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDAL_GCP { - /// Unique identifier, often numeric - pub pszId: *mut libc::c_char, - /// Informational message or "" - pub pszInfo: *mut libc::c_char, - /// Pixel (x) location of GCP on raster - pub dfGCPPixel: f64, - /// Line (y) location of GCP on raster - pub dfGCPLine: f64, - /// X position of GCP in georeferenced space - pub dfGCPX: f64, - /// Y position of GCP in georeferenced space - pub dfGCPY: f64, - /// Elevation of GCP, or zero if not known - pub dfGCPZ: f64, -} -#[test] -fn bindgen_test_layout_GDAL_GCP() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(GDAL_GCP)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDAL_GCP)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszId) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszInfo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPPixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPLine) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPZ) - ) - ); -} -extern "C" { - pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); -} -extern "C" { - pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); -} -extern "C" { - pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; -} -extern "C" { - pub fn GDALGCPsToGeoTransform( - nGCPCount: libc::c_int, - pasGCPs: *const GDAL_GCP, - padfGeoTransform: *mut f64, - bApproxOK: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALInvGeoTransform( - padfGeoTransformIn: *mut f64, - padfInvGeoTransformOut: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALApplyGeoTransform( - arg1: *mut f64, - arg2: f64, - arg3: f64, - arg4: *mut f64, - arg5: *mut f64, - ); -} -extern "C" { - pub fn GDALComposeGeoTransforms( - padfGeoTransform1: *const f64, - padfGeoTransform2: *const f64, - padfGeoTransformOut: *mut f64, - ); -} -extern "C" { - pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALGetMetadata( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALSetMetadata( - arg1: GDALMajorObjectH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); -} -extern "C" { - pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; -} -extern "C" { - pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALClose(arg1: GDALDatasetH); -} -extern "C" { - pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALAddBand( - hDS: GDALDatasetH, - eType: GDALDataType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALBeginAsyncReader( - hDS: GDALDatasetH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - pBuf: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> GDALAsyncReaderH; -} -extern "C" { - pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); -} -extern "C" { - pub fn GDALDatasetRasterIO( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetRasterIOEx( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - nBandSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetAdviseRead( - hDS: GDALDatasetH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; -} -extern "C" { - pub fn GDALSetGCPs( - arg1: GDALDatasetH, - arg2: libc::c_int, - arg3: *const GDAL_GCP, - arg4: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetInternalHandle( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALBuildOverviews( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: libc::c_int, - arg4: *mut libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_int, - arg7: GDALProgressFunc, - arg8: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); -} -extern "C" { - pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALFlushCache(hDS: GDALDatasetH); -} -extern "C" { - pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetCopyWholeRaster( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterBandCopyWholeRaster( - hSrcBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRegenerateOverviews( - hSrcBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviewBands: *mut GDALRasterBandH, - pszResampling: *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn GDALDatasetCreateLayer( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetCopyLayer( - arg1: GDALDatasetH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn GDALDatasetExecuteSQL( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); -} -extern "C" { - pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; -} -extern "C" { - pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; -} -extern "C" { - pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; -} -pub type GDALDerivedPixelFunc = ::std::option::Option< - unsafe extern "C" fn( - papoSources: *mut *mut libc::c_void, - nSources: libc::c_int, - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eSrcType: GDALDataType::Type, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type, ->; -extern "C" { - pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; -} -extern "C" { - pub fn GDALGetBlockSize( - arg1: GDALRasterBandH, - pnXSize: *mut libc::c_int, - pnYSize: *mut libc::c_int, - ); -} -extern "C" { - pub fn GDALRasterAdviseRead( - hRB: GDALRasterBandH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterIO( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterIOEx( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALReadBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWriteBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; -} -extern "C" { - pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; -} -extern "C" { - pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; -} -extern "C" { - pub fn GDALSetRasterColorInterpretation( - arg1: GDALRasterBandH, - arg2: GDALColorInterp::Type, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; -} -extern "C" { - pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDeleteRasterNoDataValue(arg1: GDALRasterBandH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALSetRasterCategoryNames( - arg1: GDALRasterBandH, - arg2: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALGetRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - bForce: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetRasterStatistics( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - dfMean: f64, - dfStdDev: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetRasterUnitType( - hBand: GDALRasterBandH, - pszNewValue: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeRasterMinMax( - hBand: GDALRasterBandH, - bApproxOK: libc::c_int, - adfMinMax: *mut f64, - ); -} -extern "C" { - pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultHistogram( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut libc::c_int, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultHistogramEx( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut GUIntBig, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetDefaultHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetDefaultHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRandomRasterSample( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: *mut f32, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) - -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALFillRaster( - hBand: GDALRasterBandH, - dfRealValue: f64, - dfImaginaryValue: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeBandStats( - hBand: GDALRasterBandH, - nSampleStep: libc::c_int, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALOverviewMagnitudeCorrection( - hBaseBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviews: *mut GDALRasterBandH, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALSetDefaultRAT( - arg1: GDALRasterBandH, - arg2: GDALRasterAttributeTableH, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALAddDerivedBandPixelFunc( - pszName: *const libc::c_char, - pfnPixelFunc: GDALDerivedPixelFunc, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; -} -extern "C" { - pub fn GDALARGetNextUpdatedRegion( - hARIO: GDALAsyncReaderH, - dfTimeout: f64, - pnXBufOff: *mut libc::c_int, - pnYBufOff: *mut libc::c_int, - pnXBufSize: *mut libc::c_int, - pnYBufSize: *mut libc::c_int, - ) -> GDALAsyncStatusType::Type; -} -extern "C" { - pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; -} -extern "C" { - pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); -} -extern "C" { - pub fn GDALGeneralCmdLineProcessor( - nArgc: libc::c_int, - ppapszArgv: *mut *mut *mut libc::c_char, - nOptions: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSwapWords( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: libc::c_int, - nWordSkip: libc::c_int, - ); -} -extern "C" { - pub fn GDALSwapWordsEx( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: usize, - nWordSkip: libc::c_int, - ); -} -extern "C" { - pub fn GDALCopyWords( - pSrcData: *const libc::c_void, - eSrcType: GDALDataType::Type, - nSrcPixelOffset: libc::c_int, - pDstData: *mut libc::c_void, - eDstType: GDALDataType::Type, - nDstPixelOffset: libc::c_int, - nWordCount: libc::c_int, - ); -} -extern "C" { - pub fn GDALCopyBits( - pabySrcData: *const GByte, - nSrcOffset: libc::c_int, - nSrcStep: libc::c_int, - pabyDstData: *mut GByte, - nDstOffset: libc::c_int, - nDstStep: libc::c_int, - nBitCount: libc::c_int, - nStepCount: libc::c_int, - ); -} -extern "C" { - pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; -} -extern "C" { - pub fn GDALReadWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALWriteWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALLoadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALReadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALLoadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALReadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALDecToDMS( - arg1: f64, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALPackedDMSToDec(arg1: f64) -> f64; -} -extern "C" { - pub fn GDALDecToPackedDMS(arg1: f64) -> f64; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRPCInfo { - pub dfLINE_OFF: f64, - pub dfSAMP_OFF: f64, - pub dfLAT_OFF: f64, - pub dfLONG_OFF: f64, - pub dfHEIGHT_OFF: f64, - pub dfLINE_SCALE: f64, - pub dfSAMP_SCALE: f64, - pub dfLAT_SCALE: f64, - pub dfLONG_SCALE: f64, - pub dfHEIGHT_SCALE: f64, - pub adfLINE_NUM_COEFF: [f64; 20usize], - pub adfLINE_DEN_COEFF: [f64; 20usize], - pub adfSAMP_NUM_COEFF: [f64; 20usize], - pub adfSAMP_DEN_COEFF: [f64; 20usize], - pub dfMIN_LONG: f64, - pub dfMIN_LAT: f64, - pub dfMAX_LONG: f64, - pub dfMAX_LAT: f64, -} -#[test] -fn bindgen_test_layout_GDALRPCInfo() { - assert_eq!( - ::std::mem::size_of::(), - 752usize, - concat!("Size of: ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LAT) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, - 744usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LAT) - ) - ); -} -extern "C" { - pub fn GDALExtractRPCInfo(arg1: *mut *mut libc::c_char, arg2: *mut GDALRPCInfo) -> libc::c_int; -} -/// Color tuple -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALColorEntry { - /// gray, red, cyan or hue - pub c1: libc::c_short, - /// green, magenta, or lightness - pub c2: libc::c_short, - /// blue, yellow, or saturation - pub c3: libc::c_short, - /// alpha or blackband - pub c4: libc::c_short, -} -#[test] -fn bindgen_test_layout_GDALColorEntry() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(GDALColorEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(GDALColorEntry)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c4) - ) - ); -} -extern "C" { - pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; -} -extern "C" { - pub fn GDALDestroyColorTable(arg1: GDALColorTableH); -} -extern "C" { - pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; -} -extern "C" { - pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; -} -extern "C" { - pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; -} -extern "C" { - pub fn GDALGetColorEntryAsRGB( - arg1: GDALColorTableH, - arg2: libc::c_int, - arg3: *mut GDALColorEntry, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); -} -extern "C" { - pub fn GDALCreateColorRamp( - hTable: GDALColorTableH, - nStartIndex: libc::c_int, - psStartColor: *const GDALColorEntry, - nEndIndex: libc::c_int, - psEndColor: *const GDALColorEntry, - ); -} -pub mod GDALRATFieldType { - /// Field type of raster attribute table - pub type Type = u32; - /// Integer field - pub const GFT_Integer: Type = 0; - /// Floating point (double) field - pub const GFT_Real: Type = 1; - /// String field - pub const GFT_String: Type = 2; -} -pub mod GDALRATFieldUsage { - /// Field usage of raster attribute table - pub type Type = u32; - /// General purpose field. - pub const GFU_Generic: Type = 0; - /// Histogram pixel count - pub const GFU_PixelCount: Type = 1; - /// Class name - pub const GFU_Name: Type = 2; - /// Class range minimum - pub const GFU_Min: Type = 3; - /// Class range maximum - pub const GFU_Max: Type = 4; - /// Class value (min=max) - pub const GFU_MinMax: Type = 5; - /// Red class color (0-255) - pub const GFU_Red: Type = 6; - /// Green class color (0-255) - pub const GFU_Green: Type = 7; - /// Blue class color (0-255) - pub const GFU_Blue: Type = 8; - /// Alpha (0=transparent,255=opaque) - pub const GFU_Alpha: Type = 9; - /// Color Range Red Minimum - pub const GFU_RedMin: Type = 10; - /// Color Range Green Minimum - pub const GFU_GreenMin: Type = 11; - /// Color Range Blue Minimum - pub const GFU_BlueMin: Type = 12; - /// Color Range Alpha Minimum - pub const GFU_AlphaMin: Type = 13; - /// Color Range Red Maximum - pub const GFU_RedMax: Type = 14; - /// Color Range Green Maximum - pub const GFU_GreenMax: Type = 15; - /// Color Range Blue Maximum - pub const GFU_BlueMax: Type = 16; - /// Color Range Alpha Maximum - pub const GFU_AlphaMax: Type = 17; - /// Maximum GFU value - pub const GFU_MaxCount: Type = 18; -} -extern "C" { - pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); -} -extern "C" { - pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetNameOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALRATGetUsageOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldUsage::Type; -} -extern "C" { - pub fn GDALRATGetTypeOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldType::Type; -} -extern "C" { - pub fn GDALRATGetColOfUsage( - arg1: GDALRasterAttributeTableH, - arg2: GDALRATFieldUsage::Type, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALRATGetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> f64; -} -extern "C" { - pub fn GDALRATSetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_char, - ); -} -extern "C" { - pub fn GDALRATSetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ); -} -extern "C" { - pub fn GDALRATSetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: f64, - ); -} -extern "C" { - pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATValuesIOAsDouble( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pdfData: *mut f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATValuesIOAsInteger( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pnData: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATValuesIOAsString( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - papszStrList: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); -} -extern "C" { - pub fn GDALRATCreateColumn( - arg1: GDALRasterAttributeTableH, - arg2: *const libc::c_char, - arg3: GDALRATFieldType::Type, - arg4: GDALRATFieldUsage::Type, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATSetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: f64, - arg3: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATGetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: *mut f64, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATInitializeFromColorTable( - arg1: GDALRasterAttributeTableH, - arg2: GDALColorTableH, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATTranslateToColorTable( - arg1: GDALRasterAttributeTableH, - nEntryCount: libc::c_int, - ) -> GDALColorTableH; -} -extern "C" { - pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); -} -extern "C" { - pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; -} -extern "C" { - pub fn GDALSetCacheMax(nBytes: libc::c_int); -} -extern "C" { - pub fn GDALGetCacheMax() -> libc::c_int; -} -extern "C" { - pub fn GDALGetCacheUsed() -> libc::c_int; -} -extern "C" { - pub fn GDALSetCacheMax64(nBytes: GIntBig); -} -extern "C" { - pub fn GDALGetCacheMax64() -> GIntBig; -} -extern "C" { - pub fn GDALGetCacheUsed64() -> GIntBig; -} -extern "C" { - pub fn GDALFlushCacheBlock() -> libc::c_int; -} -extern "C" { - pub fn GDALDatasetGetVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nBandSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALRasterBandGetVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALGetVirtualMemAuto( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - pnPixelSpace: *mut libc::c_int, - pnLineSpace: *mut GIntBig, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -pub mod GDALTileOrganization { - pub type Type = u32; - /// Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ... - pub const GTO_TIP: Type = 0; - /// Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ... - pub const GTO_BIT: Type = 1; - /// Band SeQuential : all the tiles of first band, all the tiles of following band... - pub const GTO_BSQ: Type = 2; -} -extern "C" { - pub fn GDALDatasetGetTiledVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - eTileOrganization: GDALTileOrganization::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALRasterBandGetTiledVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALCreatePansharpenedVRT( - pszXML: *const libc::c_char, - hPanchroBand: GDALRasterBandH, - nInputSpectralBands: libc::c_int, - pahInputSpectralBands: *mut GDALRasterBandH, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALGetJPEG2000Structure( - pszFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALComputeMedianCutPCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - pfnIncludePixel: ::std::option::Option< - unsafe extern "C" fn(arg1: libc::c_int, arg2: libc::c_int, arg3: *mut libc::c_void) - -> libc::c_int, - >, - nColors: libc::c_int, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALDitherRGB2PCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - hTarget: GDALRasterBandH, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALChecksumImage( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALComputeProximity( - hSrcBand: GDALRasterBandH, - hProximityBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALFillNodata( - hTargetBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - dfMaxSearchDist: f64, - bDeprecatedOption: libc::c_int, - nSmoothingIterations: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALFPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSieveFilter( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - nSizeThreshold: libc::c_int, - nConnectedness: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub type GDALTransformerFunc = ::std::option::Option< - unsafe extern "C" fn( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALUseTransformer( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateSimilarTransformer( - psTransformerArg: *mut libc::c_void, - dfSrcRatioX: f64, - dfSrcRatioY: f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - bGCPUseOK: libc::c_int, - dfGCPErrorThreshold: f64, - nOrder: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer2( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer3( - pszSrcWKT: *const libc::c_char, - padfSrcGeoTransform: *const f64, - pszDstWKT: *const libc::c_char, - padfDstGeoTransform: *const f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); -} -extern "C" { - pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); -} -extern "C" { - pub fn GDALGenImgProjTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); -} -extern "C" { - pub fn GDALCreateReprojectionTransformer( - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); -} -extern "C" { - pub fn GDALReprojectionTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateGCPTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGCPRefineTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - tolerance: f64, - minimumGcps: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALGCPTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateTPSTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALTPSTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateRPCTransformer( - psRPC: *mut GDALRPCInfo, - bReversed: libc::c_int, - dfPixErrThreshold: f64, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALRPCTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateGeoLocTransformer( - hBaseDS: GDALDatasetH, - papszGeolocationInfo: *mut *mut libc::c_char, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALGeoLocTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateApproxTransformer( - pfnRawTransformer: GDALTransformerFunc, - pRawTransformerArg: *mut libc::c_void, - dfMaxError: f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALApproxTransformerOwnsSubtransformer( - pCBData: *mut libc::c_void, - bOwnFlag: libc::c_int, - ); -} -extern "C" { - pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALApproxTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSimpleImageWarp( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - pfnTransform: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszWarpOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSuggestedWarpOutput( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSuggestedWarpOutput2( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - padfExtents: *mut f64, - nOptions: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSerializeTransformer( - pfnFunc: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALDeserializeTransformer( - psTree: *mut CPLXMLNode, - ppfnFunc: *mut GDALTransformerFunc, - ppTransformArg: *mut *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALTransformGeolocations( - hXBand: GDALRasterBandH, - hYBand: GDALRasterBandH, - hZBand: GDALRasterBandH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -pub type GDALContourWriter = ::std::option::Option< - unsafe extern "C" fn( - dfLevel: f64, - nPoints: libc::c_int, - padfX: *mut f64, - padfY: *mut f64, - arg1: *mut libc::c_void, - ) -> CPLErr::Type, ->; -pub type GDALContourGeneratorH = *mut libc::c_void; -extern "C" { - pub fn GDAL_CG_Create( - nWidth: libc::c_int, - nHeight: libc::c_int, - bNoDataSet: libc::c_int, - dfNoDataValue: f64, - dfContourInterval: f64, - dfContourBase: f64, - pfnWriter: GDALContourWriter, - pCBData: *mut libc::c_void, - ) -> GDALContourGeneratorH; -} -extern "C" { - pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); -} -extern "C" { - pub fn OGRContourWriter( - arg1: f64, - arg2: libc::c_int, - arg3: *mut f64, - arg4: *mut f64, - pInfo: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALContourGenerate( - hBand: GDALRasterBandH, - dfContourInterval: f64, - dfContourBase: f64, - nFixedLevelCount: libc::c_int, - padfFixedLevels: *mut f64, - bUseNoData: libc::c_int, - dfNoDataValue: f64, - hLayer: *mut libc::c_void, - iIDField: libc::c_int, - iElevField: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - - pub fn GDALRasterizeGeometries( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nGeomCount: libc::c_int, - pahGeometries: *mut OGRGeometryH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeomBurnValue: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterizeLayers( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfLayerBurnValues: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterizeLayersBuf( - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pszDstProjection: *const libc::c_char, - padfDstGeoTransform: *mut f64, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - dfBurnValue: f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub mod GDALGridAlgorithm { - /// Gridding Algorithms - pub type Type = u32; - /// Inverse distance to a power - pub const GGA_InverseDistanceToAPower: Type = 1; - /// Moving Average - pub const GGA_MovingAverage: Type = 2; - /// Nearest Neighbor - pub const GGA_NearestNeighbor: Type = 3; - /// Minimum Value (Data Metric) - pub const GGA_MetricMinimum: Type = 4; - /// Maximum Value (Data Metric) - pub const GGA_MetricMaximum: Type = 5; - /// Data Range (Data Metric) - pub const GGA_MetricRange: Type = 6; - /// Number of Points (Data Metric) - pub const GGA_MetricCount: Type = 7; - /// Average Distance (Data Metric) - pub const GGA_MetricAverageDistance: Type = 8; - /// Average Distance Between Data Points (Data Metric) - pub const GGA_MetricAverageDistancePts: Type = 9; - /// Linear interpolation (from Delaunay triangulation. Since GDAL 2.1 - pub const GGA_Linear: Type = 10; - /// Inverse distance to a power with nearest neighbor search for max points - pub const GGA_InverseDistanceToAPowerNearestNeighbor: Type = 11; -} -extern "C" { - pub fn GDALGridCreate( - arg1: GDALGridAlgorithm::Type, - arg2: *const libc::c_void, - arg3: GUInt32, - arg4: *const f64, - arg5: *const f64, - arg6: *const f64, - arg7: f64, - arg8: f64, - arg9: f64, - arg10: f64, - arg11: GUInt32, - arg12: GUInt32, - arg13: GDALDataType::Type, - arg14: *mut libc::c_void, - arg15: GDALProgressFunc, - arg16: *mut libc::c_void, - ) -> CPLErr::Type; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALGridContext { - _unused: [u8; 0], -} -extern "C" { - pub fn GDALGridContextCreate( - eAlgorithm: GDALGridAlgorithm::Type, - poOptions: *const libc::c_void, - nPoints: GUInt32, - padfX: *const f64, - padfY: *const f64, - padfZ: *const f64, - bCallerWillKeepPointArraysAlive: libc::c_int, - ) -> *mut GDALGridContext; -} -extern "C" { - pub fn GDALGridContextFree(psContext: *mut GDALGridContext); -} -extern "C" { - pub fn GDALGridContextProcess( - psContext: *mut GDALGridContext, - dfXMin: f64, - dfXMax: f64, - dfYMin: f64, - dfYMax: f64, - nXSize: GUInt32, - nYSize: GUInt32, - eType: GDALDataType::Type, - pData: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeMatchingPoints( - hFirstImage: GDALDatasetH, - hSecondImage: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pnGCPCount: *mut libc::c_int, - ) -> *mut GDAL_GCP; -} - -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriFacet { - pub anVertexIdx: [libc::c_int; 3usize], - pub anNeighborIdx: [libc::c_int; 3usize], -} -#[test] -fn bindgen_test_layout_GDALTriFacet() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriFacet)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(GDALTriFacet)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).anVertexIdx as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriFacet), - "::", - stringify!(anVertexIdx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).anNeighborIdx as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(GDALTriFacet), - "::", - stringify!(anNeighborIdx) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriBarycentricCoefficients { - pub dfMul1X: f64, - pub dfMul1Y: f64, - pub dfMul2X: f64, - pub dfMul2Y: f64, - pub dfCstX: f64, - pub dfCstY: f64, -} -#[test] -fn bindgen_test_layout_GDALTriBarycentricCoefficients() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(GDALTriBarycentricCoefficients)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriBarycentricCoefficients)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1X as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul1X) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1Y as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul1Y) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2X as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul2X) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2Y as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul2Y) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstX as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfCstX) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstY as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfCstY) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriangulation { - pub nFacets: libc::c_int, - pub pasFacets: *mut GDALTriFacet, - pub pasFacetCoefficients: *mut GDALTriBarycentricCoefficients, -} -#[test] -fn bindgen_test_layout_GDALTriangulation() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriangulation)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriangulation)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nFacets as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), - "::", - stringify!(nFacets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pasFacets as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), - "::", - stringify!(pasFacets) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pasFacetCoefficients as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), - "::", - stringify!(pasFacetCoefficients) - ) - ); -} -extern "C" { - pub fn GDALHasTriangulation() -> libc::c_int; -} -extern "C" { - pub fn GDALTriangulationCreateDelaunay( - nPoints: libc::c_int, - padfX: *const f64, - padfY: *const f64, - ) -> *mut GDALTriangulation; -} -extern "C" { - pub fn GDALTriangulationComputeBarycentricCoefficients( - psDT: *mut GDALTriangulation, - padfX: *const f64, - padfY: *const f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTriangulationComputeBarycentricCoordinates( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - pdfL1: *mut f64, - pdfL2: *mut f64, - pdfL3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTriangulationFindFacetBruteForce( - psDT: *const GDALTriangulation, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTriangulationFindFacetDirected( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTriangulationFree(psDT: *mut GDALTriangulation); -} -extern "C" { - pub fn GDALTriangulationTerminate(); -} -pub type CPLThreadFunc = ::std::option::Option; -extern "C" { - pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLUnlockFile(hLock: *mut libc::c_void); -} -extern "C" { - pub fn CPLCreateMutex() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateOrAcquireMutex( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLCreateOrAcquireMutexEx( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - nOptions: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; -} -extern "C" { - pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); -} -extern "C" { - pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); -} -extern "C" { - pub fn CPLCleanupMasterMutex(); -} -extern "C" { - pub fn CPLCreateCond() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); -} -extern "C" { - pub fn CPLCondSignal(hCond: *mut libc::c_void); -} -extern "C" { - pub fn CPLCondBroadcast(hCond: *mut libc::c_void); -} -extern "C" { - pub fn CPLDestroyCond(hCond: *mut libc::c_void); -} -extern "C" { - /// Contrary to what its name suggests, CPLGetPID() actually returns the thread id - pub fn CPLGetPID() -> GIntBig; -} -extern "C" { - pub fn CPLGetCurrentProcessID() -> libc::c_int; -} -extern "C" { - pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; -} -extern "C" { - pub fn CPLCreateJoinableThread( - pfnMain: CPLThreadFunc, - pArg: *mut libc::c_void, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); -} -extern "C" { - pub fn CPLSleep(dfWaitInSeconds: f64); -} -extern "C" { - pub fn CPLGetThreadingModel() -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetNumCPUs() -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CPLLock { - _unused: [u8; 0], -} -pub type CPLLock = _CPLLock; -pub mod CPLLockType { - pub type Type = u32; - pub const LOCK_RECURSIVE_MUTEX: Type = 0; - pub const LOCK_ADAPTIVE_MUTEX: Type = 1; - pub const LOCK_SPIN: Type = 2; -} -extern "C" { - pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; -} -extern "C" { - pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) - -> libc::c_int; -} -extern "C" { - pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; -} -extern "C" { - pub fn CPLReleaseLock(arg1: *mut CPLLock); -} -extern "C" { - pub fn CPLDestroyLock(arg1: *mut CPLLock); -} -extern "C" { - pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); -} -extern "C" { - pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLGetTLSEx( - nIndex: libc::c_int, - pbMemoryErrorOccurred: *mut libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); -} -pub type CPLTLSFreeFunc = ::std::option::Option; -extern "C" { - pub fn CPLSetTLSWithFreeFunc( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - ); -} -extern "C" { - pub fn CPLSetTLSWithFreeFuncEx( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - pbMemoryErrorOccurred: *mut libc::c_int, - ); -} -extern "C" { - pub fn CPLCleanupTLS(); -} -pub mod GDALResampleAlg { - /// Warp Resampling Algorithm - pub type Type = u32; - /// Nearest neighbour (select on one input pixel) - pub const GRA_NearestNeighbour: Type = 0; - /// Bilinear (2x2 kernel) - pub const GRA_Bilinear: Type = 1; - /// Cubic Convolution Approximation (4x4 kernel) - pub const GRA_Cubic: Type = 2; - /// Cubic B-Spline Approximation (4x4 kernel) - pub const GRA_CubicSpline: Type = 3; - /// Lanczos windowed sinc interpolation (6x6 kernel) - pub const GRA_Lanczos: Type = 4; - /// Average (computes the average of all non-NODATA contributing pixels) - pub const GRA_Average: Type = 5; - /// Mode (selects the value which appears most often of all the sampled points) - pub const GRA_Mode: Type = 6; - /// Max (selects maximum of all non-NODATA contributing pixels) - pub const GRA_Max: Type = 8; - /// Min (selects minimum of all non-NODATA contributing pixels) - pub const GRA_Min: Type = 9; - /// Med (selects median of all non-NODATA contributing pixels) - pub const GRA_Med: Type = 10; - /// Q1 (selects first quartile of all non-NODATA contributing pixels) - pub const GRA_Q1: Type = 11; - /// Q3 (selects third quartile of all non-NODATA contributing pixels) - pub const GRA_Q3: Type = 12; -} -pub type GDALMaskFunc = ::std::option::Option< - unsafe extern "C" fn( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pMask: *mut libc::c_void, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALWarpNoDataMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllValid: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpDstAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpSrcAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllOpaque: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpSrcMaskMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpCutlineMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -/// Warp control options for use with GDALWarpOperation::Initialize() -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALWarpOptions { - pub papszWarpOptions: *mut *mut libc::c_char, - /// In bytes, 0.0 for internal default - pub dfWarpMemoryLimit: f64, - /// Resampling algorithm to use - pub eResampleAlg: GDALResampleAlg::Type, - /// data type to use during warp operation, GDT_Unknown lets the algorithm - /// select the type - pub eWorkingDataType: GDALDataType::Type, - /// Source image dataset. - pub hSrcDS: GDALDatasetH, - /// Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer(). - pub hDstDS: GDALDatasetH, - /// Number of bands to process, may be 0 to select all bands. - pub nBandCount: libc::c_int, - /// The band numbers for the source bands to process (1 based) - pub panSrcBands: *mut libc::c_int, - /// The band numbers for the destination bands to process (1 based) - pub panDstBands: *mut libc::c_int, - /// The source band so use as an alpha (transparency) value, 0=disabled - pub nSrcAlphaBand: libc::c_int, - /// The dest. band so use as an alpha (transparency) value, 0=disabled - pub nDstAlphaBand: libc::c_int, - /// The "nodata" value real component for each input band, if NULL there isn't one - pub padfSrcNoDataReal: *mut f64, - /// The "nodata" value imaginary component - may be NULL even if real - /// component is provided. - pub padfSrcNoDataImag: *mut f64, - /// The "nodata" value real component for each output band, if NULL there isn't one - pub padfDstNoDataReal: *mut f64, - /// The "nodata" value imaginary component - may be NULL even if real - /// component is provided. - pub padfDstNoDataImag: *mut f64, - /// GDALProgressFunc() compatible progress reporting function, or NULL - /// if there isn't one. - pub pfnProgress: GDALProgressFunc, - /// Callback argument to be passed to pfnProgress. - pub pProgressArg: *mut libc::c_void, - /// Type of spatial point transformer function - pub pfnTransformer: GDALTransformerFunc, - /// Handle to image transformer setup structure - pub pTransformerArg: *mut libc::c_void, - pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, - pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, - pub pfnSrcValidityMaskFunc: GDALMaskFunc, - pub pSrcValidityMaskFuncArg: *mut libc::c_void, - pub pfnSrcDensityMaskFunc: GDALMaskFunc, - pub pSrcDensityMaskFuncArg: *mut libc::c_void, - pub pfnDstDensityMaskFunc: GDALMaskFunc, - pub pDstDensityMaskFuncArg: *mut libc::c_void, - pub pfnDstValidityMaskFunc: GDALMaskFunc, - pub pDstValidityMaskFuncArg: *mut libc::c_void, - pub pfnPreWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - pub pPreWarpProcessorArg: *mut libc::c_void, - pub pfnPostWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - pub pPostWarpProcessorArg: *mut libc::c_void, - /// Optional OGRPolygonH for a masking cutline. - pub hCutline: *mut libc::c_void, - /// Optional blending distance to apply across cutline in pixels, default is zero. - pub dfCutlineBlendDist: f64, -} -#[test] -fn bindgen_test_layout_GDALWarpOptions() { - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papszWarpOptions) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfWarpMemoryLimit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eWorkingDataType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hSrcDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hDstDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nBandCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panSrcBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panDstBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nSrcAlphaBand) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nDstAlphaBand) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataImag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataImag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pProgressArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnTransformer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pTransformerArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ - as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papfnSrcPerBandValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ - as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papSrcPerBandValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ - as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPreWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPreWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ - as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPostWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPostWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hCutline) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfCutlineBlendDist) - ) - ); -} -extern "C" { - pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; -} -extern "C" { - pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); -} -extern "C" { - pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; -} -extern "C" { - pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; -} -extern "C" { - - pub fn GDALReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALCreateAndReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstFilename: *const libc::c_char, - pszDstWKT: *const libc::c_char, - hDstDriver: GDALDriverH, - papszCreateOptions: *mut *mut libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; -} -extern "C" { - - pub fn GDALAutoCreateWarpedVRT( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfMaxError: f64, - psOptions: *const GDALWarpOptions, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALCreateWarpedVRT( - hSrcDS: GDALDatasetH, - nPixels: libc::c_int, - nLines: libc::c_int, - padfGeoTransform: *mut f64, - psOptions: *mut GDALWarpOptions, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; -} -pub type GDALWarpOperationH = *mut libc::c_void; -extern "C" { - pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; -} -extern "C" { - pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); -} -extern "C" { - pub fn GDALChunkAndWarpImage( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALChunkAndWarpMulti( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpRegion( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpRegionToBuffer( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_void, - arg7: GDALDataType::Type, - arg8: libc::c_int, - arg9: libc::c_int, - arg10: libc::c_int, - arg11: libc::c_int, - ) -> CPLErr::Type; -} -pub mod OGRAxisOrientation { - /// \file ogr_srs_api.h - /// - /// C spatial reference system services and defines. - /// - /// See also: ogr_spatialref.h - pub type Type = u32; - pub const OAO_Other: Type = 0; - pub const OAO_North: Type = 1; - pub const OAO_South: Type = 2; - pub const OAO_East: Type = 3; - pub const OAO_West: Type = 4; - pub const OAO_Up: Type = 5; - pub const OAO_Down: Type = 6; -} -extern "C" { - pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); -} -extern "C" { - pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRRelease(arg1: OGRSpatialReferenceH); -} -extern "C" { - pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRFixupOrdering(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRFixup(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRStripCTParms(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromProj4( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromESRI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromPCI( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromUSGS( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: *mut f64, - arg5: libc::c_long, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromDict( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromPanorama( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: libc::c_long, - arg5: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromOzi( - arg1: OGRSpatialReferenceH, - arg2: *const *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromERM( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) - -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPrettyWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToProj4( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPCI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *mut *mut libc::c_char, - arg4: *mut *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToUSGS( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut *mut f64, - arg5: *mut libc::c_long, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToXML( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPanorama( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut libc::c_long, - arg5: *mut libc::c_long, - arg6: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToERM( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_char, - arg3: *mut libc::c_char, - arg4: *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetAttrValue( - hSRS: OGRSpatialReferenceH, - pszNodePath: *const libc::c_char, - pszNewNodeValue: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAttrValue( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - iChild: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetAngularUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRSetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetLinearUnitsAndUpdateParameters( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRGetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> f64; -} -extern "C" { - pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetWellKnownGeogCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetFromUserInput( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRCopyGeogCSFrom( - hSRS: OGRSpatialReferenceH, - hSrcSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: f64, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - arg6: f64, - arg7: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: *mut f64, - arg2: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetCompoundCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - hHorizSRS: OGRSpatialReferenceH, - hVertSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetGeogCS( - hSRS: OGRSpatialReferenceH, - pszGeogName: *const libc::c_char, - pszDatumName: *const libc::c_char, - pszEllipsoidName: *const libc::c_char, - dfSemiMajor: f64, - dfInvFlattening: f64, - pszPMName: *const libc::c_char, - dfPMOffset: f64, - pszUnits: *const libc::c_char, - dfConvertToRadians: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetVertCS( - hSRS: OGRSpatialReferenceH, - pszVertCSName: *const libc::c_char, - pszVertDatumName: *const libc::c_char, - nVertDatumType: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRSetAuthority( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszAuthority: *const libc::c_char, - nCode: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAuthorityCode( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRGetAuthorityName( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; -} -extern "C" { - pub fn OSRSetNormProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetNormProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; -} -extern "C" { - pub fn OSRSetUTM( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNorth: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OSRSetStatePlane( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetStatePlaneWithUnits( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - pszOverrideUnitName: *const libc::c_char, - dfOverrideUnit: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRGetAxis( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - iAxis: libc::c_int, - peOrientation: *mut OGRAxisOrientation::Type, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetAxes( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszXAxisName: *const libc::c_char, - eXAxisOrientation: OGRAxisOrientation::Type, - pszYAxisName: *const libc::c_char, - eYAxisOrientation: OGRAxisOrientation::Type, - ) -> OGRErr::Type; -} -extern "C" { - /// Albers Conic Equal Area - pub fn OSRSetACEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Azimuthal Equidistant - pub fn OSRSetAE( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Bonne - pub fn OSRSetBonne( - hSRS: OGRSpatialReferenceH, - dfStandardParallel: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Cylindrical Equal Area - pub fn OSRSetCEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Cassini-Soldner - pub fn OSRSetCS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equidistant Conic - pub fn OSRSetEC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert I-VI - pub fn OSRSetEckert( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert IV - pub fn OSRSetEckertIV( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert VI - pub fn OSRSetEckertVI( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equirectangular - pub fn OSRSetEquirectangular( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equirectangular generalized form - pub fn OSRSetEquirectangular2( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfPseudoStdParallel1: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gall Stereograpic - pub fn OSRSetGS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Goode Homolosine - pub fn OSRSetGH( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Interrupted Goode Homolosine - pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - /// GEOS - Geostationary Satellite View - pub fn OSRSetGEOS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfSatelliteHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gauss Schreiber Transverse Mercator - pub fn OSRSetGaussSchreiberTMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gnomonic - pub fn OSRSetGnomonic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Oblique Mercator (aka HOM (variant B) - pub fn OSRSetOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Hotine Oblique Mercator using azimuth angle - pub fn OSRSetHOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetHOMAC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Hotine Oblique Mercator using two points on centerline - pub fn OSRSetHOM2PNO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// International Map of the World Polyconic - pub fn OSRSetIWMPolyconic( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLat2: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Krovak Oblique Conic Conformal - pub fn OSRSetKrovak( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfPseudoStdParallelLat: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Azimuthal Equal-Area - pub fn OSRSetLAEA( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic - pub fn OSRSetLCC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic 1SP - pub fn OSRSetLCC1SP( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic (Belgium) - pub fn OSRSetLCCB( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Miller Cylindrical - pub fn OSRSetMC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Mercator - pub fn OSRSetMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetMercator2SP( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Mollweide - pub fn OSRSetMollweide( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// New Zealand Map Grid - pub fn OSRSetNZMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Oblique Stereographic - pub fn OSRSetOS( - hSRS: OGRSpatialReferenceH, - dfOriginLat: f64, - dfCMeridian: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Orthographic - pub fn OSRSetOrthographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Polyconic - pub fn OSRSetPolyconic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Polar Stereographic - pub fn OSRSetPS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Robinson - pub fn OSRSetRobinson( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Sinusoidal - pub fn OSRSetSinusoidal( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Stereographic - pub fn OSRSetStereographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Swiss Oblique Cylindrical - pub fn OSRSetSOC( - hSRS: OGRSpatialReferenceH, - dfLatitudeOfOrigin: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator - /// - /// Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 : - /// see OGRSpatialReference::exportToProj4(). - pub fn OSRSetTM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator variant - pub fn OSRSetTMVariant( - hSRS: OGRSpatialReferenceH, - pszVariantName: *const libc::c_char, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Tunesia Mining Grid - pub fn OSRSetTMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator (South Oriented) - pub fn OSRSetTMSO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetTPED( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// VanDerGrinten - pub fn OSRSetVDG( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Wagner I -- VII - pub fn OSRSetWagner( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCenterLat: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Quadrilateralized Spherical Cube - pub fn OSRSetQSC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Spherical, Cross-track, Height - pub fn OSRSetSCH( - hSRS: OGRSpatialReferenceH, - dfPegLat: f64, - dfPegLong: f64, - dfPegHeading: f64, - dfPegHgt: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; -} -extern "C" { - pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; -} -extern "C" { - pub fn OSRCleanup(); -} -extern "C" { - pub fn OCTNewCoordinateTransformation( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - ) -> OGRCoordinateTransformationH; -} -extern "C" { - pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); -} -extern "C" { - pub fn OCTTransform( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn OCTTransformEx( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OCTProj4Normalize(pszProj4Src: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn OCTCleanupProjMutex(); -} -pub mod OGRErr { - /// Type for a OGR error - /// - ///
- pub type Type = u32; - /// Success - /// - ///
- pub const OGRERR_NONE: Type = 0; - /// Not enough data to deserialize - /// - ///
- pub const OGRERR_NOT_ENOUGH_DATA: Type = 1; - /// Not enough memory - /// - ///
- pub const OGRERR_NOT_ENOUGH_MEMORY: Type = 2; - /// Unsupported geometry type - /// - ///
- pub const OGRERR_UNSUPPORTED_GEOMETRY_TYPE: Type = 3; - /// Unsupported operation - /// - ///
- pub const OGRERR_UNSUPPORTED_OPERATION: Type = 4; - /// Corrupt data - /// - ///
- pub const OGRERR_CORRUPT_DATA: Type = 5; - /// Failure - /// - ///
- pub const OGRERR_FAILURE: Type = 6; - /// Unsupported SRS - /// - ///
- pub const OGRERR_UNSUPPORTED_SRS: Type = 7; - /// Invalid handle - /// - ///
- pub const INVALID_HANDLE: Type = 8; - /// Non existing feature. Added in GDAL 2.0 - /// - ///
- pub const NON_EXISTING_FEATURE: Type = 9; -} -pub type __builtin_va_list = [__va_list_tag; 1usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __va_list_tag { - pub gp_offset: libc::c_uint, - pub fp_offset: libc::c_uint, - pub overflow_arg_area: *mut libc::c_void, - pub reg_save_area: *mut libc::c_void, -} -#[test] -fn bindgen_test_layout___va_list_tag() { - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} diff --git a/gdal-sys/prebuilt-bindings/gdal_2.2.rs b/gdal-sys/prebuilt-bindings/gdal_2.2.rs deleted file mode 100644 index 7b00e579..00000000 --- a/gdal-sys/prebuilt-bindings/gdal_2.2.rs +++ /dev/null @@ -1,9922 +0,0 @@ -/* automatically generated by rust-bindgen */ - -pub type __dev_t = libc::c_ulong; -pub type __uid_t = libc::c_uint; -pub type __gid_t = libc::c_uint; -pub type __ino_t = libc::c_ulong; -pub type __mode_t = libc::c_uint; -pub type __nlink_t = libc::c_ulong; -pub type __off_t = libc::c_long; -pub type __off64_t = libc::c_long; -pub type __time_t = libc::c_long; -pub type __blksize_t = libc::c_long; -pub type __blkcnt_t = libc::c_long; -pub type __syscall_slong_t = libc::c_long; -pub type FILE = _IO_FILE; -pub type va_list = __builtin_va_list; -pub type _IO_lock_t = libc::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_marker { - pub _next: *mut _IO_marker, - pub _sbuf: *mut _IO_FILE, - pub _pos: libc::c_int, -} -#[test] -fn bindgen_test_layout__IO_marker() { - assert_eq!( - ::std::mem::size_of::<_IO_marker>(), - 24usize, - concat!("Size of: ", stringify!(_IO_marker)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_marker>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_marker)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._next as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._sbuf as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_sbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._pos as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_pos) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_FILE { - pub _flags: libc::c_int, - pub _IO_read_ptr: *mut libc::c_char, - pub _IO_read_end: *mut libc::c_char, - pub _IO_read_base: *mut libc::c_char, - pub _IO_write_base: *mut libc::c_char, - pub _IO_write_ptr: *mut libc::c_char, - pub _IO_write_end: *mut libc::c_char, - pub _IO_buf_base: *mut libc::c_char, - pub _IO_buf_end: *mut libc::c_char, - pub _IO_save_base: *mut libc::c_char, - pub _IO_backup_base: *mut libc::c_char, - pub _IO_save_end: *mut libc::c_char, - pub _markers: *mut _IO_marker, - pub _chain: *mut _IO_FILE, - pub _fileno: libc::c_int, - pub _flags2: libc::c_int, - pub _old_offset: __off_t, - pub _cur_column: libc::c_ushort, - pub _vtable_offset: libc::c_schar, - pub _shortbuf: [libc::c_char; 1usize], - pub _lock: *mut _IO_lock_t, - pub _offset: __off64_t, - pub __pad1: *mut libc::c_void, - pub __pad2: *mut libc::c_void, - pub __pad3: *mut libc::c_void, - pub __pad4: *mut libc::c_void, - pub __pad5: usize, - pub _mode: libc::c_int, - pub _unused2: [libc::c_char; 20usize], -} -#[test] -fn bindgen_test_layout__IO_FILE() { - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad1 as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad2 as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad3 as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad4 as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad4) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} -pub type time_t = __time_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __time_t, - pub tv_nsec: __syscall_slong_t, -} -#[test] -fn bindgen_test_layout_timespec() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tm { - pub tm_sec: libc::c_int, - pub tm_min: libc::c_int, - pub tm_hour: libc::c_int, - pub tm_mday: libc::c_int, - pub tm_mon: libc::c_int, - pub tm_year: libc::c_int, - pub tm_wday: libc::c_int, - pub tm_yday: libc::c_int, - pub tm_isdst: libc::c_int, - pub tm_gmtoff: libc::c_long, - pub tm_zone: *const libc::c_char, -} -#[test] -fn bindgen_test_layout_tm() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(tm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tm)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_min as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_hour as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_mday as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_mon as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_year as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_wday as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_yday as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_isdst as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_gmtoff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tm_zone as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) - ); -} -/// Int32 type -pub type GInt32 = libc::c_int; -/// Unsigned int32 type -pub type GUInt32 = libc::c_uint; -/// Int16 type -pub type GInt16 = libc::c_short; -/// Unsigned byte type -pub type GByte = libc::c_uchar; -/// Large signed integer type (generally 64-bit integer type). -/// Use GInt64 when exactly 64 bit is needed -pub type GIntBig = libc::c_longlong; -/// Large unsigned integer type (generally 64-bit unsigned integer type). -/// Use GUInt64 when exactly 64 bit is needed -pub type GUIntBig = libc::c_ulonglong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stat { - pub st_dev: __dev_t, - pub st_ino: __ino_t, - pub st_nlink: __nlink_t, - pub st_mode: __mode_t, - pub st_uid: __uid_t, - pub st_gid: __gid_t, - pub __pad0: libc::c_int, - pub st_rdev: __dev_t, - pub st_size: __off_t, - pub st_blksize: __blksize_t, - pub st_blocks: __blkcnt_t, - pub st_atim: timespec, - pub st_mtim: timespec, - pub st_ctim: timespec, - pub __glibc_reserved: [__syscall_slong_t; 3usize], -} -#[test] -fn bindgen_test_layout_stat() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(stat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(stat)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_dev as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_dev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_ino as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_ino) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_nlink as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_nlink) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_mode as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_uid as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_uid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_gid as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_gid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__pad0 as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(__pad0) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_rdev as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_rdev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_size as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_blksize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_blksize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_blocks as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_blocks) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_atim as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_atim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_mtim as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_mtim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_ctim as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_ctim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__glibc_reserved as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(__glibc_reserved) - ) - ); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn VSIFOpen(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut FILE; -} -extern "C" { - pub fn VSIFClose(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFSeek(arg1: *mut FILE, arg2: libc::c_long, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn VSIFTell(arg1: *mut FILE) -> libc::c_long; -} -extern "C" { - pub fn VSIRewind(arg1: *mut FILE); -} -extern "C" { - pub fn VSIFFlush(arg1: *mut FILE); -} -extern "C" { - pub fn VSIFRead(arg1: *mut libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) -> usize; -} -extern "C" { - pub fn VSIFWrite(arg1: *const libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) - -> usize; -} -extern "C" { - pub fn VSIFGets( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *mut FILE, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn VSIFPuts(arg1: *const libc::c_char, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPrintf(arg1: *mut FILE, arg2: *const libc::c_char, ...) -> libc::c_int; -} -extern "C" { - pub fn VSIFGetc(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPutc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIUngetc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFEof(arg1: *mut FILE) -> libc::c_int; -} -/// @cond Doxygen_Suppress -pub type VSIStatBuf = stat; -extern "C" { - pub fn VSIStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; -} -/// Type for a file offset -pub type vsi_l_offset = GUIntBig; -/// Opaque type for a FILE that implements the VSIVirtualHandle API -pub type VSILFILE = FILE; -extern "C" { - pub fn VSIFOpenL(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut VSILFILE; -} -extern "C" { - pub fn VSIFOpenExL( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *mut VSILFILE; -} -extern "C" { - pub fn VSIFCloseL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFSeekL(arg1: *mut VSILFILE, arg2: vsi_l_offset, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn VSIFTellL(arg1: *mut VSILFILE) -> vsi_l_offset; -} -extern "C" { - pub fn VSIRewindL(arg1: *mut VSILFILE); -} -extern "C" { - pub fn VSIFReadL( - arg1: *mut libc::c_void, - arg2: usize, - arg3: usize, - arg4: *mut VSILFILE, - ) -> usize; -} -extern "C" { - pub fn VSIFReadMultiRangeL( - nRanges: libc::c_int, - ppData: *mut *mut libc::c_void, - panOffsets: *const vsi_l_offset, - panSizes: *const usize, - arg1: *mut VSILFILE, - ) -> libc::c_int; -} -extern "C" { - pub fn VSIFWriteL( - arg1: *const libc::c_void, - arg2: usize, - arg3: usize, - arg4: *mut VSILFILE, - ) -> usize; -} -extern "C" { - pub fn VSIFEofL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFTruncateL(arg1: *mut VSILFILE, arg2: vsi_l_offset) -> libc::c_int; -} -extern "C" { - pub fn VSIFFlushL(arg1: *mut VSILFILE) -> libc::c_int; -} -extern "C" { - pub fn VSIFPrintfL(arg1: *mut VSILFILE, arg2: *const libc::c_char, ...) -> libc::c_int; -} -extern "C" { - pub fn VSIFPutcL(arg1: libc::c_int, arg2: *mut VSILFILE) -> libc::c_int; -} -pub mod VSIRangeStatus { - /// Range status - pub type Type = u32; - /// < Unknown - pub const VSI_RANGE_STATUS_UNKNOWN: Type = 0; - /// < Data present - pub const VSI_RANGE_STATUS_DATA: Type = 1; - /// < Hole - pub const VSI_RANGE_STATUS_HOLE: Type = 2; -} -extern "C" { - pub fn VSIFGetRangeStatusL( - fp: *mut VSILFILE, - nStart: vsi_l_offset, - nLength: vsi_l_offset, - ) -> VSIRangeStatus::Type; -} -extern "C" { - pub fn VSIIngestFile( - fp: *mut VSILFILE, - pszFilename: *const libc::c_char, - ppabyRet: *mut *mut GByte, - pnSize: *mut vsi_l_offset, - nMaxSize: GIntBig, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stat64 { - _unused: [u8; 0], -} -/// Type for VSIStatL() -pub type VSIStatBufL = stat64; -extern "C" { - pub fn VSIStatL(arg1: *const libc::c_char, arg2: *mut VSIStatBufL) -> libc::c_int; -} -extern "C" { - pub fn VSIStatExL( - pszFilename: *const libc::c_char, - psStatBuf: *mut VSIStatBufL, - nFlags: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn VSIIsCaseSensitiveFS(pszFilename: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSISupportsSparseFiles(pszPath: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIFGetNativeFileDescriptorL(arg1: *mut VSILFILE) -> *mut libc::c_void; -} -extern "C" { - pub fn VSICalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIFree(arg1: *mut libc::c_void); -} -extern "C" { - pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn VSIMallocAligned(nAlignment: usize, nSize: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIMallocAlignedAuto(nSize: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn VSIFreeAligned(ptr: *mut libc::c_void); -} -extern "C" { - pub fn VSIMallocAlignedAutoVerbose( - nSize: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - /// VSIMalloc2 allocates (nSize1 * nSize2) bytes. - /// In case of overflow of the multiplication, or if memory allocation fails, a - /// NULL pointer is returned and a CE_Failure error is raised with CPLError(). - /// If nSize1 == 0 || nSize2 == 0, a NULL pointer will also be returned. - /// CPLFree() or VSIFree() can be used to free memory allocated by this function. - pub fn VSIMalloc2(nSize1: usize, nSize2: usize) -> *mut libc::c_void; -} -extern "C" { - /// VSIMalloc3 allocates (nSize1 * nSize2 * nSize3) bytes. - /// In case of overflow of the multiplication, or if memory allocation fails, a - /// NULL pointer is returned and a CE_Failure error is raised with CPLError(). - /// If nSize1 == 0 || nSize2 == 0 || nSize3 == 0, a NULL pointer will also be returned. - /// CPLFree() or VSIFree() can be used to free memory allocated by this function. - pub fn VSIMalloc3(nSize1: usize, nSize2: usize, nSize3: usize) -> *mut libc::c_void; -} -extern "C" { - /// VSIMallocVerbose - pub fn VSIMallocVerbose( - nSize: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - /// VSIMalloc2Verbose - pub fn VSIMalloc2Verbose( - nSize1: usize, - nSize2: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - /// VSIMalloc3Verbose - pub fn VSIMalloc3Verbose( - nSize1: usize, - nSize2: usize, - nSize3: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - /// VSICallocVerbose - pub fn VSICallocVerbose( - nCount: usize, - nSize: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - /// VSIReallocVerbose - pub fn VSIReallocVerbose( - pOldPtr: *mut libc::c_void, - nNewSize: usize, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - /// VSIStrdupVerbose - pub fn VSIStrdupVerbose( - pszStr: *const libc::c_char, - pszFile: *const libc::c_char, - nLine: libc::c_int, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLGetPhysicalRAM() -> GIntBig; -} -extern "C" { - pub fn CPLGetUsablePhysicalRAM() -> GIntBig; -} -extern "C" { - pub fn VSIReadDir(arg1: *const libc::c_char) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn VSIReadDirRecursive(pszPath: *const libc::c_char) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn VSIReadDirEx( - pszPath: *const libc::c_char, - nMaxFiles: libc::c_int, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn VSIMkdir(pathname: *const libc::c_char, mode: libc::c_long) -> libc::c_int; -} -extern "C" { - pub fn VSIRmdir(pathname: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIUnlink(pathname: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIRename(oldpath: *const libc::c_char, newpath: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn VSIStrerror(arg1: libc::c_int) -> *mut libc::c_char; -} -extern "C" { - pub fn VSIGetDiskFreeSpace(pszDirname: *const libc::c_char) -> GIntBig; -} -extern "C" { - pub fn VSIInstallMemFileHandler(); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn VSIInstallLargeFileHandler(); -} -extern "C" { - /// @endcond - pub fn VSIInstallSubFileHandler(); -} -extern "C" { - pub fn VSIInstallCurlFileHandler(); -} -extern "C" { - pub fn VSICurlClearCache(); -} -extern "C" { - pub fn VSIInstallCurlStreamingFileHandler(); -} -extern "C" { - pub fn VSIInstallS3FileHandler(); -} -extern "C" { - pub fn VSIInstallS3StreamingFileHandler(); -} -extern "C" { - pub fn VSIInstallGSFileHandler(); -} -extern "C" { - pub fn VSIInstallGSStreamingFileHandler(); -} -extern "C" { - pub fn VSIInstallGZipFileHandler(); -} -extern "C" { - pub fn VSIInstallZipFileHandler(); -} -extern "C" { - pub fn VSIInstallStdinHandler(); -} -extern "C" { - pub fn VSIInstallStdoutHandler(); -} -extern "C" { - pub fn VSIInstallSparseFileHandler(); -} -extern "C" { - pub fn VSIInstallTarFileHandler(); -} -extern "C" { - pub fn VSIInstallCryptFileHandler(); -} -extern "C" { - pub fn VSISetCryptKey(pabyKey: *const GByte, nKeySize: libc::c_int); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn VSICleanupFileManager(); -} -extern "C" { - /// @endcond - pub fn VSIFileFromMemBuffer( - pszFilename: *const libc::c_char, - pabyData: *mut GByte, - nDataLength: vsi_l_offset, - bTakeOwnership: libc::c_int, - ) -> *mut VSILFILE; -} -extern "C" { - pub fn VSIGetMemFileBuffer( - pszFilename: *const libc::c_char, - pnDataLength: *mut vsi_l_offset, - bUnlinkAndSeize: libc::c_int, - ) -> *mut GByte; -} -/// Callback used by VSIStdoutSetRedirection() -pub type VSIWriteFunction = ::std::option::Option< - unsafe extern "C" fn(ptr: *const libc::c_void, size: usize, nmemb: usize, stream: *mut FILE) - -> usize, ->; -extern "C" { - pub fn VSIStdoutSetRedirection(pFct: VSIWriteFunction, stream: *mut FILE); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn VSITime(arg1: *mut libc::c_ulong) -> libc::c_ulong; -} -extern "C" { - pub fn VSICTime(arg1: libc::c_ulong) -> *const libc::c_char; -} -extern "C" { - pub fn VSIGMTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; -} -extern "C" { - pub fn VSILocalTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; -} -pub mod CPLErr { - /// Error category - pub type Type = u32; - pub const CE_None: Type = 0; - pub const CE_Debug: Type = 1; - pub const CE_Warning: Type = 2; - pub const CE_Failure: Type = 3; - pub const CE_Fatal: Type = 4; -} -/// Error number -pub type CPLErrorNum = libc::c_int; -extern "C" { - pub fn CPLError(eErrClass: CPLErr::Type, err_no: CPLErrorNum, fmt: *const libc::c_char, ...); -} -extern "C" { - pub fn CPLErrorV( - arg1: CPLErr::Type, - arg2: CPLErrorNum, - arg3: *const libc::c_char, - arg4: *mut __va_list_tag, - ); -} -extern "C" { - pub fn CPLEmergencyError(arg1: *const libc::c_char); -} -extern "C" { - pub fn CPLErrorReset(); -} -extern "C" { - pub fn CPLGetLastErrorNo() -> CPLErrorNum; -} -extern "C" { - pub fn CPLGetLastErrorType() -> CPLErr::Type; -} -extern "C" { - pub fn CPLGetLastErrorMsg() -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetErrorHandlerUserData() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLErrorSetState( - eErrClass: CPLErr::Type, - err_no: CPLErrorNum, - pszMsg: *const libc::c_char, - ); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn CPLCleanupErrorMutex(); -} -/// Callback for a custom error handler -pub type CPLErrorHandler = ::std::option::Option< - unsafe extern "C" fn(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char), ->; -extern "C" { - pub fn CPLLoggingErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLDefaultErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLQuietErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLTurnFailureIntoWarning(bOn: libc::c_int); -} -extern "C" { - pub fn CPLSetErrorHandler(arg1: CPLErrorHandler) -> CPLErrorHandler; -} -extern "C" { - pub fn CPLSetErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void) -> CPLErrorHandler; -} -extern "C" { - pub fn CPLPushErrorHandler(arg1: CPLErrorHandler); -} -extern "C" { - pub fn CPLPushErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void); -} -extern "C" { - pub fn CPLSetCurrentErrorHandlerCatchDebug(bCatchDebug: libc::c_int); -} -extern "C" { - pub fn CPLPopErrorHandler(); -} -extern "C" { - pub fn CPLDebug(arg1: *const libc::c_char, arg2: *const libc::c_char, ...); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn CPLVerifyConfiguration(); -} -extern "C" { - /// @endcond - pub fn CPLGetConfigOption( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetThreadLocalConfigOption( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLSetConfigOption(arg1: *const libc::c_char, arg2: *const libc::c_char); -} -extern "C" { - pub fn CPLSetThreadLocalConfigOption( - pszKey: *const libc::c_char, - pszValue: *const libc::c_char, - ); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn CPLFreeConfig(); -} -extern "C" { - /// @endcond - pub fn CPLGetConfigOptions() -> *mut *mut libc::c_char; -} -extern "C" { - pub fn CPLSetConfigOptions(papszConfigOptions: *const *const libc::c_char); -} -extern "C" { - pub fn CPLGetThreadLocalConfigOptions() -> *mut *mut libc::c_char; -} -extern "C" { - pub fn CPLSetThreadLocalConfigOptions(papszConfigOptions: *const *const libc::c_char); -} -extern "C" { - pub fn CPLMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLStrlwr(arg1: *mut libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLFGets( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *mut FILE, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLReadLine(arg1: *mut FILE) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLineL(arg1: *mut VSILFILE) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLine2L( - arg1: *mut VSILFILE, - nMaxCols: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLAtof(arg1: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLAtofDelim(arg1: *const libc::c_char, arg2: libc::c_char) -> f64; -} -extern "C" { - pub fn CPLStrtod(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn CPLStrtodDelim( - arg1: *const libc::c_char, - arg2: *mut *mut libc::c_char, - arg3: libc::c_char, - ) -> f64; -} -extern "C" { - pub fn CPLStrtof(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f32; -} -extern "C" { - pub fn CPLStrtofDelim( - arg1: *const libc::c_char, - arg2: *mut *mut libc::c_char, - arg3: libc::c_char, - ) -> f32; -} -extern "C" { - pub fn CPLAtofM(arg1: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLScanString( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLScanDouble(arg1: *const libc::c_char, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn CPLScanLong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_long; -} -extern "C" { - pub fn CPLScanULong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_ulong; -} -extern "C" { - pub fn CPLScanUIntBig(arg1: *const libc::c_char, arg2: libc::c_int) -> GUIntBig; -} -extern "C" { - pub fn CPLAtoGIntBig(pszString: *const libc::c_char) -> GIntBig; -} -extern "C" { - pub fn CPLAtoGIntBigEx( - pszString: *const libc::c_char, - bWarn: libc::c_int, - pbOverflow: *mut libc::c_int, - ) -> GIntBig; -} -extern "C" { - pub fn CPLScanPointer(arg1: *const libc::c_char, arg2: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLPrintString( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintStringFill( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintInt32(arg1: *mut libc::c_char, arg2: GInt32, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintUIntBig( - arg1: *mut libc::c_char, - arg2: GUIntBig, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintDouble( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: f64, - arg4: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintTime( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *const libc::c_char, - arg4: *const tm, - arg5: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintPointer( - arg1: *mut libc::c_char, - arg2: *mut libc::c_void, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLGetSymbol(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLGetExecPath(pszPathBuf: *mut libc::c_char, nMaxLength: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn CPLGetPath(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetDirname(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetFilename(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetBasename(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetExtension(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetCurrentDir() -> *mut libc::c_char; -} -extern "C" { - pub fn CPLFormFilename( - pszPath: *const libc::c_char, - pszBasename: *const libc::c_char, - pszExtension: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLFormCIFilename( - pszPath: *const libc::c_char, - pszBasename: *const libc::c_char, - pszExtension: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLResetExtension( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLProjectRelativeFilename( - pszProjectDir: *const libc::c_char, - pszSecondaryFilename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLIsFilenameRelative(pszFilename: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn CPLExtractRelativePath( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCleanTrailingSlash(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCorrespondingPaths( - pszOldFilename: *const libc::c_char, - pszNewFilename: *const libc::c_char, - papszFileList: *mut *mut libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn CPLCheckForFile( - pszFilename: *mut libc::c_char, - papszSiblingList: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLGenerateTempFilename(pszStem: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLExpandTilde(pszFilename: *const libc::c_char) -> *const libc::c_char; -} -/// Callback for CPLPushFileFinder -pub type CPLFileFinder = ::std::option::Option< - unsafe extern "C" fn(arg1: *const libc::c_char, arg2: *const libc::c_char) - -> *const libc::c_char, ->; -extern "C" { - pub fn CPLFindFile( - pszClass: *const libc::c_char, - pszBasename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLDefaultFindFile( - pszClass: *const libc::c_char, - pszBasename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLPushFileFinder(pfnFinder: CPLFileFinder); -} -extern "C" { - pub fn CPLPopFileFinder() -> CPLFileFinder; -} -extern "C" { - pub fn CPLPushFinderLocation(arg1: *const libc::c_char); -} -extern "C" { - pub fn CPLPopFinderLocation(); -} -extern "C" { - pub fn CPLFinderClean(); -} -extern "C" { - pub fn CPLStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; -} -/// Information on a shared file -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLSharedFileInfo { - /// < File pointer - pub fp: *mut FILE, - /// < Reference counter - pub nRefCount: libc::c_int, - /// < Whether fp must be interpreted as VSIFILE* - pub bLarge: libc::c_int, - /// < Filename - pub pszFilename: *mut libc::c_char, - /// < Access mode - pub pszAccess: *mut libc::c_char, -} -#[test] -fn bindgen_test_layout_CPLSharedFileInfo() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLSharedFileInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLSharedFileInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(fp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nRefCount as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(nRefCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bLarge as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(bLarge) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszFilename as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(pszFilename) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAccess as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLSharedFileInfo), - "::", - stringify!(pszAccess) - ) - ); -} -extern "C" { - pub fn CPLOpenShared( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *mut FILE; -} -extern "C" { - pub fn CPLCloseShared(arg1: *mut FILE); -} -extern "C" { - pub fn CPLGetSharedList(arg1: *mut libc::c_int) -> *mut CPLSharedFileInfo; -} -extern "C" { - pub fn CPLDumpSharedList(arg1: *mut FILE); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn CPLCleanupSharedFileMutex(); -} -extern "C" { - /// @endcond - pub fn CPLDMSToDec(is: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLDecToDMS( - dfAngle: f64, - pszAxis: *const libc::c_char, - nPrecision: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLPackedDMSToDec(arg1: f64) -> f64; -} -extern "C" { - pub fn CPLDecToPackedDMS(dfDec: f64) -> f64; -} -extern "C" { - pub fn CPLStringToComplex(pszString: *const libc::c_char, pdfReal: *mut f64, pdfImag: *mut f64); -} -extern "C" { - pub fn CPLUnlinkTree(arg1: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn CPLCopyFile( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLCopyTree( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLMoveFile( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLSymlink( - pszOldPath: *const libc::c_char, - pszNewPath: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - /// @endcond - pub fn CPLCreateZip( - pszZipFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateFileInZip( - hZip: *mut libc::c_void, - pszFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn CPLWriteFileInZip( - hZip: *mut libc::c_void, - pBuffer: *const libc::c_void, - nBufferSize: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn CPLCloseFileInZip(hZip: *mut libc::c_void) -> CPLErr::Type; -} -extern "C" { - pub fn CPLCloseZip(hZip: *mut libc::c_void) -> CPLErr::Type; -} -extern "C" { - pub fn CPLZLibDeflate( - ptr: *const libc::c_void, - nBytes: usize, - nLevel: libc::c_int, - outptr: *mut libc::c_void, - nOutAvailableBytes: usize, - pnOutBytes: *mut usize, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLZLibInflate( - ptr: *const libc::c_void, - nBytes: usize, - outptr: *mut libc::c_void, - nOutAvailableBytes: usize, - pnOutBytes: *mut usize, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLValidateXML( - pszXMLFilename: *const libc::c_char, - pszXSDFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLsetlocale(category: libc::c_int, locale: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn CPLCleanupSetlocaleMutex(); -} -pub type GDALProgressFunc = ::std::option::Option< - unsafe extern "C" fn( - dfComplete: f64, - pszMessage: *const libc::c_char, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALDummyProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTermProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALScaledProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateScaledProgress( - arg1: f64, - arg2: f64, - arg3: GDALProgressFunc, - arg4: *mut libc::c_void, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyScaledProgress(arg1: *mut libc::c_void); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLVirtualMem { - _unused: [u8; 0], -} -/// Callback triggered when a still unmapped page of virtual memory is accessed. -/// The callback has the responsibility of filling the page with relevant values -/// -/// @param ctxt virtual memory handle. -/// @param nOffset offset of the page in the memory mapping. -/// @param pPageToFill address of the page to fill. Note that the address might -/// be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset. -/// @param nToFill number of bytes of the page. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToFill: *mut libc::c_void, - nToFill: usize, - pUserData: *mut libc::c_void, - ), ->; -/// Callback triggered when a dirty mapped page is going to be freed. -/// (saturation of cache, or termination of the virtual memory mapping). -/// -/// @param ctxt virtual memory handle. -/// @param nOffset offset of the page in the memory mapping. -/// @param pPageToBeEvicted address of the page that will be flushed. Note that the address might -/// be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset. -/// @param nToBeEvicted number of bytes of the page. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToBeEvicted: *const libc::c_void, - nToBeEvicted: usize, - pUserData: *mut libc::c_void, - ), ->; -/// Callback triggered when a virtual memory mapping is destroyed. -/// @param pUserData user data that was passed to CPLVirtualMemNew(). -pub type CPLVirtualMemFreeUserData = - ::std::option::Option; -pub mod CPLVirtualMemAccessMode { - /// Access mode of a virtual memory mapping. - pub type Type = u32; - /// The mapping is meant at being read-only, but writes will not be prevented. - /// Note that any content written will be lost. - pub const VIRTUALMEM_READONLY: Type = 0; - /// The mapping is meant at being read-only, and this will be enforced - /// through the operating system page protection mechanism. - pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; - /// The mapping is meant at being read-write, and modified pages can be saved - /// thanks to the pfnUnCachePage callback - pub const VIRTUALMEM_READWRITE: Type = 2; -} -extern "C" { - /// Return the size of a page of virtual memory. - /// - /// @return the page size. - /// - /// @since GDAL 1.11 - pub fn CPLGetPageSize() -> usize; -} -extern "C" { - /// Create a new virtual memory mapping. - /// - /// This will reserve an area of virtual memory of size nSize, whose size - /// might be potentially much larger than the physical memory available. Initially, - /// no physical memory will be allocated. As soon as memory pages will be accessed, - /// they will be allocated transparently and filled with the pfnCachePage callback. - /// When the allowed cache size is reached, the least recently used pages will - /// be unallocated. - /// - /// On Linux AMD64 platforms, the maximum value for nSize is 128 TB. - /// On Linux x86 platforms, the maximum value for nSize is 2 GB. - /// - /// Only supported on Linux for now. - /// - /// Note that on Linux, this function will install a SIGSEGV handler. The - /// original handler will be restored by CPLVirtualMemManagerTerminate(). - /// - /// @param nSize size in bytes of the virtual memory mapping. - /// @param nCacheSize size in bytes of the maximum memory that will be really - /// allocated (must ideally fit into RAM). - /// @param nPageSizeHint hint for the page size. Must be a multiple of the - /// system page size, returned by CPLGetPageSize(). - /// Minimum value is generally 4096. Might be set to 0 to - /// let the function determine a default page size. - /// @param bSingleThreadUsage set to TRUE if there will be no concurrent threads - /// that will access the virtual memory mapping. This can - /// optimize performance a bit. - /// @param eAccessMode permission to use for the virtual memory mapping. - /// @param pfnCachePage callback triggered when a still unmapped page of virtual - /// memory is accessed. The callback has the responsibility - /// of filling the page with relevant values. - /// @param pfnUnCachePage callback triggered when a dirty mapped page is going to - /// be freed (saturation of cache, or termination of the - /// virtual memory mapping). Might be NULL. - /// @param pfnFreeUserData callback that can be used to free pCbkUserData. Might be - /// NULL - /// @param pCbkUserData user data passed to pfnCachePage and pfnUnCachePage. - /// - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemNew( - nSize: usize, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnCachePage: CPLVirtualMemCachePageCbk, - pfnUnCachePage: CPLVirtualMemUnCachePageCbk, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Return if virtual memory mapping of a file is available. - /// - /// @return TRUE if virtual memory mapping of a file is available. - /// @since GDAL 1.11 - pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; -} -extern "C" { - /// Create a new virtual memory mapping from a file. - /// - /// The file must be a "real" file recognized by the operating system, and not - /// a VSI extended virtual file. - /// - /// In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written - /// in the file. - /// - /// On Linux AMD64 platforms, the maximum value for nLength is 128 TB. - /// On Linux x86 platforms, the maximum value for nLength is 2 GB. - /// - /// Supported on Linux only in GDAL <= 2.0, and all POSIX systems supporting - /// mmap() in GDAL >= 2.1 - /// - /// @param fp Virtual file handle. - /// @param nOffset Offset in the file to start the mapping from. - /// @param nLength Length of the portion of the file to map into memory. - /// @param eAccessMode Permission to use for the virtual memory mapping. This must - /// be consistent with how the file has been opened. - /// @param pfnFreeUserData callback that is called when the object is destroyed. - /// @param pCbkUserData user data passed to pfnFreeUserData. - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemFileMapNew( - fp: *mut VSILFILE, - nOffset: vsi_l_offset, - nLength: vsi_l_offset, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Create a new virtual memory mapping derived from an other virtual memory - /// mapping. - /// - /// This may be useful in case of creating mapping for pixel interleaved data. - /// - /// The new mapping takes a reference on the base mapping. - /// - /// @param pVMemBase Base virtual memory mapping - /// @param nOffset Offset in the base virtual memory mapping from which to start - /// the new mapping. - /// @param nSize Size of the base virtual memory mapping to expose in the - /// the new mapping. - /// @param pfnFreeUserData callback that is called when the object is destroyed. - /// @param pCbkUserData user data passed to pfnFreeUserData. - /// @return a virtual memory object that must be freed by CPLVirtualMemFree(), - /// or NULL in case of failure. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemDerivedNew( - pVMemBase: *mut CPLVirtualMem, - nOffset: vsi_l_offset, - nSize: vsi_l_offset, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; -} -extern "C" { - /// Free a virtual memory mapping. - /// - /// The pointer returned by CPLVirtualMemGetAddr() will no longer be valid. - /// If the virtual memory mapping was created with read/write permissions and that - /// they are dirty (i.e. modified) pages, they will be flushed through the - /// pfnUnCachePage callback before being freed. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Return the pointer to the start of a virtual memory mapping. - /// - /// The bytes in the range [p:p+CPLVirtualMemGetSize()-1] where p is the pointer - /// returned by this function will be valid, until CPLVirtualMemFree() is called. - /// - /// Note that if a range of bytes used as an argument of a system call - /// (such as read() or write()) contains pages that have not been "realized", the - /// system call will fail with EFAULT. CPLVirtualMemPin() can be used to work - /// around this issue. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the pointer to the start of a virtual memory mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; -} -extern "C" { - /// Return the size of the virtual memory mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the size of the virtual memory mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; -} -extern "C" { - /// Return if the virtual memory mapping is a direct file mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return TRUE if the virtual memory mapping is a direct file mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; -} -extern "C" { - /// Return the access mode of the virtual memory mapping. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the access mode of the virtual memory mapping. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; -} -extern "C" { - /// Return the page size associated to a virtual memory mapping. - /// - /// The value returned will be at least CPLGetPageSize(), but potentially - /// larger. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return the page size - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; -} -extern "C" { - /// Return TRUE if this memory mapping can be accessed safely from concurrent - /// threads. - /// - /// The situation that can cause problems is when several threads try to access - /// a page of the mapping that is not yet mapped. - /// - /// The return value of this function depends on whether bSingleThreadUsage has - /// been set of not in CPLVirtualMemNew() and/or the implementation. - /// - /// On Linux, this will always return TRUE if bSingleThreadUsage = FALSE. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @return TRUE if this memory mapping can be accessed safely from concurrent - /// threads. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; -} -extern "C" { - /// Declare that a thread will access a virtual memory mapping. - /// - /// This function must be called by a thread that wants to access the - /// content of a virtual memory mapping, except if the virtual memory mapping has - /// been created with bSingleThreadUsage = TRUE. - /// - /// This function must be paired with CPLVirtualMemUnDeclareThread(). - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Declare that a thread will stop accessing a virtual memory mapping. - /// - /// This function must be called by a thread that will no longer access the - /// content of a virtual memory mapping, except if the virtual memory mapping has - /// been created with bSingleThreadUsage = TRUE. - /// - /// This function must be paired with CPLVirtualMemDeclareThread(). - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); -} -extern "C" { - /// Make sure that a region of virtual memory will be realized. - /// - /// Calling this function is not required, but might be useful when debugging - /// a process with tools like gdb or valgrind that do not naturally like - /// segmentation fault signals. - /// - /// It is also needed when wanting to provide part of virtual memory mapping - /// to a system call such as read() or write(). If read() or write() is called - /// on a memory region not yet realized, the call will fail with EFAULT. - /// - /// @param ctxt context returned by CPLVirtualMemNew(). - /// @param pAddr the memory region to pin. - /// @param nSize the size of the memory region. - /// @param bWriteOp set to TRUE if the memory are will be accessed in write mode. - /// - /// @since GDAL 1.11 - pub fn CPLVirtualMemPin( - ctxt: *mut CPLVirtualMem, - pAddr: *mut libc::c_void, - nSize: usize, - bWriteOp: libc::c_int, - ); -} -extern "C" { - /// Cleanup any resource and handlers related to virtual memory. - /// - /// This function must be called after the last CPLVirtualMem object has - /// been freed. - /// - /// @since GDAL 2.0 - pub fn CPLVirtualMemManagerTerminate(); -} -pub mod CPLXMLNodeType { - /// XML node type - pub type Type = u32; - /// Node is an element - pub const CXT_Element: Type = 0; - /// Node is a raw text value - pub const CXT_Text: Type = 1; - /// Node is attribute - pub const CXT_Attribute: Type = 2; - /// Node is an XML comment. - pub const CXT_Comment: Type = 3; - /// Node is a special literal - pub const CXT_Literal: Type = 4; -} -/// Document node structure. -/// -/// This C structure is used to hold a single text fragment representing a -/// component of the document when parsed. It should be allocated with the -/// appropriate CPL function, and freed with CPLDestroyXMLNode(). The structure -/// contents should not normally be altered by application code, but may be -/// freely examined by application code. -/// -/// Using the psChild and psNext pointers, a hierarchical tree structure -/// for a document can be represented as a tree of CPLXMLNode structures. -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLXMLNode { - /// \brief Node type - /// - /// One of CXT_Element, CXT_Text, CXT_Attribute, CXT_Comment, - /// or CXT_Literal. - pub eType: CPLXMLNodeType::Type, - /// \brief Node value - /// - /// For CXT_Element this is the name of the element, without the angle - /// brackets. Note there is a single CXT_Element even when the document - /// contains a start and end element tag. The node represents the pair. - /// All text or other elements between the start and end tag will appear - /// as children nodes of this CXT_Element node. - /// - /// For CXT_Attribute the pszValue is the attribute name. The value of - /// the attribute will be a CXT_Text child. - /// - /// For CXT_Text this is the text itself (value of an attribute, or a - /// text fragment between an element start and end tags. - /// - /// For CXT_Literal it is all the literal text. Currently this is just - /// used for !DOCTYPE lines, and the value would be the entire line. - /// - /// For CXT_Comment the value is all the literal text within the comment, - /// but not including the comment start/end indicators ("<--" and "-->"). - pub pszValue: *mut libc::c_char, - /// \brief Next sibling. - /// - /// Pointer to next sibling, that is the next node appearing after this - /// one that has the same parent as this node. NULL if this node is the - /// last child of the parent element. - pub psNext: *mut CPLXMLNode, - /// \brief Child node. - /// - /// Pointer to first child node, if any. Only CXT_Element and CXT_Attribute - /// nodes should have children. For CXT_Attribute it should be a single - /// CXT_Text value node, while CXT_Element can have any kind of child. - /// The full list of children for a node are identified by walking the - /// psNext's starting with the psChild node. - pub psChild: *mut CPLXMLNode, -} -#[test] -fn bindgen_test_layout_CPLXMLNode() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLXMLNode)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLXMLNode)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(eType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(pszValue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psNext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psChild) - ) - ); -} -extern "C" { - pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSearchXMLNode( - poRoot: *mut CPLXMLNode, - pszTarget: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLGetXMLValue( - poRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszDefault: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCreateXMLNode( - poParent: *mut CPLXMLNode, - eType: CPLXMLNodeType::Type, - pszText: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; -} -extern "C" { - pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); -} -extern "C" { - pub fn CPLCreateXMLElementAndValue( - psParent: *mut CPLXMLNode, - pszName: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLAddXMLAttributeAndValue( - psParent: *mut CPLXMLNode, - pszName: *const libc::c_char, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn CPLCloneXMLTree(psTree: *mut CPLXMLNode) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSetXMLValue( - psRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLStripXMLNamespace( - psRoot: *mut CPLXMLNode, - pszNameSpace: *const libc::c_char, - bRecurse: libc::c_int, - ); -} -extern "C" { - pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); -} -extern "C" { - pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; -} -extern "C" { - pub fn CPLSerializeXMLTreeToFile( - psTree: *const CPLXMLNode, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, -} -#[test] -fn bindgen_test_layout_OGREnvelope() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(OGREnvelope)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxY) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope3D { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, - pub MinZ: f64, - pub MaxZ: f64, -} -#[test] -fn bindgen_test_layout_OGREnvelope3D() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(OGREnvelope3D)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope3D)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxZ) - ) - ); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn OGRFree(arg1: *mut libc::c_void); -} -pub mod OGRwkbGeometryType { - /// List of well known binary geometry types. These are used within the BLOBs - /// but are also returned from OGRGeometry::getGeometryType() to identify the - /// type of a geometry object. - pub type Type = u32; - /// < unknown type, non-standard - pub const wkbUnknown: Type = 0; - /// < 0-dimensional geometric object, standard WKB - pub const wkbPoint: Type = 1; - /// < 1-dimensional geometric object with linear - /// interpolation between Points, standard WKB - pub const wkbLineString: Type = 2; - /// < planar 2-dimensional geometric object defined - /// by 1 exterior boundary and 0 or more interior - /// boundaries, standard WKB - pub const wkbPolygon: Type = 3; - /// < GeometryCollection of Points, standard WKB - pub const wkbMultiPoint: Type = 4; - /// < GeometryCollection of LineStrings, standard WKB - pub const wkbMultiLineString: Type = 5; - /// < GeometryCollection of Polygons, standard WKB - pub const wkbMultiPolygon: Type = 6; - /// < geometric object that is a collection of 1 - /// or more geometric objects, standard WKB - pub const wkbGeometryCollection: Type = 7; - /// < one or more circular arc segments connected end to end, - /// ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCircularString: Type = 8; - /// < sequence of contiguous curves, ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCompoundCurve: Type = 9; - /// < planar surface, defined by 1 exterior boundary - /// and zero or more interior boundaries, that are curves. - /// ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCurvePolygon: Type = 10; - /// < GeometryCollection of Curves, ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiCurve: Type = 11; - /// < GeometryCollection of Surfaces, ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiSurface: Type = 12; - /// < Curve (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurve: Type = 13; - /// < Surface (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbSurface: Type = 14; - /// < a contiguous collection of polygons, which share common boundary segments, - /// ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbPolyhedralSurface: Type = 15; - /// < a PolyhedralSurface consisting only of Triangle patches - /// ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTIN: Type = 16; - /// < a Triangle. ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTriangle: Type = 17; - /// < non-standard, for pure attribute records - pub const wkbNone: Type = 100; - /// < non-standard, just for createGeometry() - pub const wkbLinearRing: Type = 101; - /// < wkbCircularString with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCircularStringZ: Type = 1008; - /// < wkbCompoundCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCompoundCurveZ: Type = 1009; - /// < wkbCurvePolygon with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbCurvePolygonZ: Type = 1010; - /// < wkbMultiCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiCurveZ: Type = 1011; - /// < wkbMultiSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.0 - pub const wkbMultiSurfaceZ: Type = 1012; - /// < wkbCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurveZ: Type = 1013; - /// < wkbSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbSurfaceZ: Type = 1014; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbPolyhedralSurfaceZ: Type = 1015; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTINZ: Type = 1016; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTriangleZ: Type = 1017; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbPointM: Type = 2001; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbLineStringM: Type = 2002; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbPolygonM: Type = 2003; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiPointM: Type = 2004; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiLineStringM: Type = 2005; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiPolygonM: Type = 2006; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbGeometryCollectionM: Type = 2007; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCircularStringM: Type = 2008; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCompoundCurveM: Type = 2009; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurvePolygonM: Type = 2010; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiCurveM: Type = 2011; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiSurfaceM: Type = 2012; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurveM: Type = 2013; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbSurfaceM: Type = 2014; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbPolyhedralSurfaceM: Type = 2015; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTINM: Type = 2016; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTriangleM: Type = 2017; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbPointZM: Type = 3001; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbLineStringZM: Type = 3002; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbPolygonZM: Type = 3003; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiPointZM: Type = 3004; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiLineStringZM: Type = 3005; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiPolygonZM: Type = 3006; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbGeometryCollectionZM: Type = 3007; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCircularStringZM: Type = 3008; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCompoundCurveZM: Type = 3009; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurvePolygonZM: Type = 3010; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiCurveZM: Type = 3011; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbMultiSurfaceZM: Type = 3012; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbCurveZM: Type = 3013; - /// < ISO SQL/MM Part 3. GDAL >= 2.1 - pub const wkbSurfaceZM: Type = 3014; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbPolyhedralSurfaceZM: Type = 3015; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTINZM: Type = 3016; - /// < ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented - pub const wkbTriangleZM: Type = 3017; - /// < 2.5D extension as per 99-402 - pub const wkbPoint25D: Type = 2147483649; - /// < 2.5D extension as per 99-402 - pub const wkbLineString25D: Type = 2147483650; - /// < 2.5D extension as per 99-402 - pub const wkbPolygon25D: Type = 2147483651; - /// < 2.5D extension as per 99-402 - pub const wkbMultiPoint25D: Type = 2147483652; - /// < 2.5D extension as per 99-402 - pub const wkbMultiLineString25D: Type = 2147483653; - /// < 2.5D extension as per 99-402 - pub const wkbMultiPolygon25D: Type = 2147483654; - /// < 2.5D extension as per 99-402 - pub const wkbGeometryCollection25D: Type = 2147483655; -} -extern "C" { - pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGRMergeGeometryTypes( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGRMergeGeometryTypesEx( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - bAllowPromotingToCurves: libc::c_int, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetModifier( - eType: OGRwkbGeometryType::Type, - bSetZ: libc::c_int, - bSetM: libc::c_int, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsSubClassOf( - eType: OGRwkbGeometryType::Type, - eSuperType: OGRwkbGeometryType::Type, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -pub mod OGRwkbByteOrder { - /// Enumeration to describe byte order - pub type Type = u32; - /// < MSB/Sun/Motoroloa: Most Significant Byte First - pub const wkbXDR: Type = 0; - /// < LSB/Intel/Vax: Least Significant Byte First - pub const wkbNDR: Type = 1; -} -pub mod OGRFieldType { - /// List of feature field types. This list is likely to be extended in the - /// future ... avoid coding applications based on the assumption that all - /// field types can be known. - pub type Type = u32; - /// Simple 32bit integer - pub const OFTInteger: Type = 0; - /// List of 32bit integers - pub const OFTIntegerList: Type = 1; - /// Double Precision floating point - pub const OFTReal: Type = 2; - /// List of doubles - pub const OFTRealList: Type = 3; - /// String of ASCII chars - pub const OFTString: Type = 4; - /// Array of strings - pub const OFTStringList: Type = 5; - /// deprecated - pub const OFTWideString: Type = 6; - /// deprecated - pub const OFTWideStringList: Type = 7; - /// Raw Binary data - pub const OFTBinary: Type = 8; - /// Date - pub const OFTDate: Type = 9; - /// Time - pub const OFTTime: Type = 10; - /// Date and Time - pub const OFTDateTime: Type = 11; - /// Single 64bit integer - pub const OFTInteger64: Type = 12; - /// List of 64bit integers - pub const OFTInteger64List: Type = 13; - /// List of 64bit integers - pub const OFTMaxType: Type = 13; -} -pub mod OGRFieldSubType { - /// List of field subtypes. A subtype represents a hint, a restriction of the - /// main type, that is not strictly necessary to consult. - /// This list is likely to be extended in the - /// future ... avoid coding applications based on the assumption that all - /// field types can be known. - /// Most subtypes only make sense for a restricted set of main types. - /// @since GDAL 2.0 - pub type Type = u32; - /// No subtype. This is the default value - pub const OFSTNone: Type = 0; - /// Boolean integer. Only valid for OFTInteger and OFTIntegerList. - pub const OFSTBoolean: Type = 1; - /// Signed 16-bit integer. Only valid for OFTInteger and OFTIntegerList. - pub const OFSTInt16: Type = 2; - /// Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList. - pub const OFSTFloat32: Type = 3; - /// Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList. - pub const OFSTMaxSubType: Type = 3; -} -pub mod OGRJustification { - /// Display justification for field values. - pub type Type = u32; - pub const OJUndefined: Type = 0; - pub const OJLeft: Type = 1; - pub const OJRight: Type = 2; -} -/// OGRFeature field attribute value union. -#[repr(C)] -#[derive(Copy, Clone)] -pub union OGRField { - /// @cond Doxygen_Suppress - pub Integer: libc::c_int, - pub Integer64: GIntBig, - pub Real: f64, - pub String: *mut libc::c_char, - pub IntegerList: OGRField__bindgen_ty_1, - pub Integer64List: OGRField__bindgen_ty_2, - pub RealList: OGRField__bindgen_ty_3, - pub StringList: OGRField__bindgen_ty_4, - pub Binary: OGRField__bindgen_ty_5, - pub Set: OGRField__bindgen_ty_6, - pub Date: OGRField__bindgen_ty_7, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_1 { - pub nCount: libc::c_int, - pub paList: *mut libc::c_int, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_2 { - pub nCount: libc::c_int, - pub paList: *mut GIntBig, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_3 { - pub nCount: libc::c_int, - pub paList: *mut f64, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_4 { - pub nCount: libc::c_int, - pub paList: *mut *mut libc::c_char, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_4() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(paList) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_5 { - pub nCount: libc::c_int, - pub paData: *mut GByte, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_5() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(paData) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_6 { - pub nMarker1: libc::c_int, - pub nMarker2: libc::c_int, - pub nMarker3: libc::c_int, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_6() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker3) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_7 { - pub Year: GInt16, - pub Month: GByte, - pub Day: GByte, - pub Hour: GByte, - pub Minute: GByte, - pub TZFlag: GByte, - pub Reserved: GByte, - pub Second: f32, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_7() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Month) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Day) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Minute) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(TZFlag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Reserved) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Second) - ) - ); -} -#[test] -fn bindgen_test_layout_OGRField() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Real) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(String) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(IntegerList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64List) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(RealList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(StringList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Binary) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Set) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Date) - ) - ); -} -extern "C" { - pub fn OGRParseDate( - pszInput: *const libc::c_char, - psOutput: *mut OGRField, - nOptions: libc::c_int, - ) -> libc::c_int; -} -pub mod ogr_style_tool_class_id { - /// OGRStyleTool derived class types (returned by GetType()). - pub type Type = u32; - /// < None - pub const OGRSTCNone: Type = 0; - /// < Pen - pub const OGRSTCPen: Type = 1; - /// < Brush - pub const OGRSTCBrush: Type = 2; - /// < Symbol - pub const OGRSTCSymbol: Type = 3; - /// < Label - pub const OGRSTCLabel: Type = 4; - /// < Vector - pub const OGRSTCVector: Type = 5; -} -pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; -pub mod ogr_style_tool_units_id { - /// List of units supported by OGRStyleTools. - pub type Type = u32; - /// < Ground unit - pub const OGRSTUGround: Type = 0; - /// < Pixel - pub const OGRSTUPixel: Type = 1; - /// < Points - pub const OGRSTUPoints: Type = 2; - /// < Millimeter - pub const OGRSTUMM: Type = 3; - /// < Centimeter - pub const OGRSTUCM: Type = 4; - /// < Inch - pub const OGRSTUInches: Type = 5; -} -pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; -extern "C" { - pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - /// Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor. - /// - /// The purpose of this method is to ensure that calling code will run with the GDAL - /// version it is compiled for. It is primarily indented for external plugins. - /// - /// @param nVersionMajor Major version to be tested against - /// @param nVersionMinor Minor version to be tested against - /// @param pszCallingComponentName If not NULL, in case of version mismatch, the method - /// will issue a failure mentioning the name of - /// the calling component. - pub fn GDALCheckVersion( - nVersionMajor: libc::c_int, - nVersionMinor: libc::c_int, - pszCallingComponentName: *const libc::c_char, - ) -> libc::c_int; -} -/// Opaque type for a geometyr -pub type OGRGeometryH = *mut libc::c_void; -/// Opaque type for a spatial reference system -pub type OGRSpatialReferenceH = *mut libc::c_void; -/// Opaque type for a coordinate transformation object -pub type OGRCoordinateTransformationH = *mut libc::c_void; -extern "C" { - pub fn OGR_G_CreateFromWkb( - arg1: *mut libc::c_uchar, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromWkt( - arg1: *mut *mut libc::c_char, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromFgf( - arg1: *mut libc::c_uchar, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - arg5: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ApproximateArcAngles( - dfCenterX: f64, - dfCenterY: f64, - dfZ: f64, - dfPrimaryRadius: f64, - dfSecondaryAxis: f64, - dfRotation: f64, - dfStartAngle: f64, - dfEndAngle: f64, - dfMaxAngleStepSizeDegrees: f64, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceTo( - hGeom: OGRGeometryH, - eTargetType: OGRwkbGeometryType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsMeasured(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Set3D(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_SetMeasured(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); -} -extern "C" { - pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); -} -extern "C" { - pub fn OGR_G_ImportFromWkb( - arg1: OGRGeometryH, - arg2: *mut libc::c_uchar, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToIsoWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CloseRings(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToGMLEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; -} -extern "C" { - pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; -} -extern "C" { - pub fn OGR_G_ExportToKML( - arg1: OGRGeometryH, - pszAltitudeMode: *const libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToJsonEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - /// Create a OGR geometry from a GeoJSON geometry object - pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); -} -extern "C" { - pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_DelaunayTriangulation( - hThis: OGRGeometryH, - dfTolerance: f64, - bOnlyEdges: libc::c_int, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Segmentize(hGeom: OGRGeometryH, dfMaxLength: f64); -} -extern "C" { - pub fn OGR_G_Intersects(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Equals(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Disjoint(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Touches(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Crosses(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Within(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Contains(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Overlaps(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Boundary(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ConvexHull(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Buffer(arg1: OGRGeometryH, arg2: f64, arg3: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Intersection(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Union(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_UnionCascaded(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_PointOnSurface(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Difference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_SymDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Distance(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Distance3D(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Length(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Area(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Centroid(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Value(arg1: OGRGeometryH, dfDistance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Empty(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_IsEmpty(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsValid(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsSimple(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsRing(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Equal(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SymmetricDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetArea(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - /// @endcond - pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetPoints( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetPointsZM( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - pabyM: *mut libc::c_void, - nMStride: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetX(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetY(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetZ(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetM(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetPoint( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, - ); -} -extern "C" { - pub fn OGR_G_GetPointZM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, - arg5: *mut f64, - ); -} -extern "C" { - pub fn OGR_G_SetPointCount(hGeom: OGRGeometryH, nNewPointCount: libc::c_int); -} -extern "C" { - pub fn OGR_G_SetPoint(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_SetPoint_2D(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_SetPointM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: f64, - arg3: f64, - arg4: f64, - ); -} -extern "C" { - pub fn OGR_G_SetPointZM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - ); -} -extern "C" { - pub fn OGR_G_AddPoint(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_AddPoint_2D(arg1: OGRGeometryH, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_AddPointM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_AddPointZM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); -} -extern "C" { - pub fn OGR_G_SetPoints( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - ); -} -extern "C" { - pub fn OGR_G_SetPointsZM( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - pabyM: *mut libc::c_void, - nMStride: libc::c_int, - ); -} -extern "C" { - pub fn OGR_G_GetGeometryCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetGeometryRef(arg1: OGRGeometryH, arg2: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AddGeometry(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_AddGeometryDirectly(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_RemoveGeometry( - arg1: OGRGeometryH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_HasCurveGeometry( - arg1: OGRGeometryH, - bLookForNonLinear: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetLinearGeometry( - hGeom: OGRGeometryH, - dfMaxAngleStepSizeDegrees: f64, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetCurveGeometry( - hGeom: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGRBuildPolygonFromEdges( - hLinesAsCollection: OGRGeometryH, - bBestEffort: libc::c_int, - bAutoClose: libc::c_int, - dfTolerance: f64, - peErr: *mut OGRErr::Type, - ) -> OGRGeometryH; -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( - bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; -} -extern "C" { - /// @endcond - pub fn OGRSetNonLinearGeometriesEnabledFlag(bFlag: libc::c_int); -} -extern "C" { - pub fn OGRGetNonLinearGeometriesEnabledFlag() -> libc::c_int; -} -/// Opaque type for a field definition (OGRFieldDefn) -pub type OGRFieldDefnH = *mut libc::c_void; -/// Opaque type for a feature definition (OGRFeatureDefn) -pub type OGRFeatureDefnH = *mut libc::c_void; -/// Opaque type for a feature (OGRFeature) -pub type OGRFeatureH = *mut libc::c_void; -/// Opaque type for a style table (OGRStyleTable) -pub type OGRStyleTableH = *mut libc::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRGeomFieldDefnHS { - _unused: [u8; 0], -} -/// Opaque type for a geometry field definition (OGRGeomFieldDefn) -pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; -extern "C" { - pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_Fld_Destroy(arg1: OGRFieldDefnH); -} -extern "C" { - pub fn OGR_Fld_SetName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_Fld_GetNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Fld_GetType(arg1: OGRFieldDefnH) -> OGRFieldType::Type; -} -extern "C" { - pub fn OGR_Fld_SetType(arg1: OGRFieldDefnH, arg2: OGRFieldType::Type); -} -extern "C" { - pub fn OGR_Fld_GetSubType(arg1: OGRFieldDefnH) -> OGRFieldSubType::Type; -} -extern "C" { - pub fn OGR_Fld_SetSubType(arg1: OGRFieldDefnH, arg2: OGRFieldSubType::Type); -} -extern "C" { - pub fn OGR_Fld_GetJustify(arg1: OGRFieldDefnH) -> OGRJustification::Type; -} -extern "C" { - pub fn OGR_Fld_SetJustify(arg1: OGRFieldDefnH, arg2: OGRJustification::Type); -} -extern "C" { - pub fn OGR_Fld_GetWidth(arg1: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetWidth(arg1: OGRFieldDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_GetPrecision(arg1: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetPrecision(arg1: OGRFieldDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_Set( - arg1: OGRFieldDefnH, - arg2: *const libc::c_char, - arg3: OGRFieldType::Type, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: OGRJustification::Type, - ); -} -extern "C" { - pub fn OGR_Fld_IsIgnored(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetIgnored(hDefn: OGRFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_IsNullable(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetNullable(hDefn: OGRFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_GetDefault(hDefn: OGRFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Fld_SetDefault(hDefn: OGRFieldDefnH, arg1: *const libc::c_char); -} -extern "C" { - pub fn OGR_Fld_IsDefaultDriverSpecific(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_GetFieldTypeName(arg1: OGRFieldType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_GetFieldSubTypeName(arg1: OGRFieldSubType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_AreTypeSubTypeCompatible( - eType: OGRFieldType::Type, - eSubType: OGRFieldSubType::Type, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_GFld_Create( - arg1: *const libc::c_char, - arg2: OGRwkbGeometryType::Type, - ) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_GFld_Destroy(arg1: OGRGeomFieldDefnH); -} -extern "C" { - pub fn OGR_GFld_SetName(arg1: OGRGeomFieldDefnH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_GFld_GetNameRef(arg1: OGRGeomFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_GFld_GetType(arg1: OGRGeomFieldDefnH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GFld_SetType(arg1: OGRGeomFieldDefnH, arg2: OGRwkbGeometryType::Type); -} -extern "C" { - pub fn OGR_GFld_GetSpatialRef(arg1: OGRGeomFieldDefnH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_GFld_SetSpatialRef(arg1: OGRGeomFieldDefnH, hSRS: OGRSpatialReferenceH); -} -extern "C" { - pub fn OGR_GFld_IsNullable(hDefn: OGRGeomFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_GFld_SetNullable(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_GFld_IsIgnored(hDefn: OGRGeomFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_GFld_SetIgnored(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_FD_Create(arg1: *const libc::c_char) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_FD_Destroy(arg1: OGRFeatureDefnH); -} -extern "C" { - pub fn OGR_FD_Release(arg1: OGRFeatureDefnH); -} -extern "C" { - pub fn OGR_FD_GetName(arg1: OGRFeatureDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_FD_GetFieldCount(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetFieldDefn(arg1: OGRFeatureDefnH, arg2: libc::c_int) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_FD_GetFieldIndex(arg1: OGRFeatureDefnH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_AddFieldDefn(arg1: OGRFeatureDefnH, arg2: OGRFieldDefnH); -} -extern "C" { - pub fn OGR_FD_DeleteFieldDefn(hDefn: OGRFeatureDefnH, iField: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_ReorderFieldDefns( - hDefn: OGRFeatureDefnH, - panMap: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_GetGeomType(arg1: OGRFeatureDefnH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_FD_SetGeomType(arg1: OGRFeatureDefnH, arg2: OGRwkbGeometryType::Type); -} -extern "C" { - pub fn OGR_FD_IsGeometryIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_SetGeometryIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_FD_IsStyleIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_SetStyleIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_FD_Reference(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_Dereference(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetReferenceCount(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldCount(hFDefn: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldDefn(hFDefn: OGRFeatureDefnH, i: libc::c_int) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_FD_GetGeomFieldIndex( - hFDefn: OGRFeatureDefnH, - pszName: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_AddGeomFieldDefn(hFDefn: OGRFeatureDefnH, hGFldDefn: OGRGeomFieldDefnH); -} -extern "C" { - pub fn OGR_FD_DeleteGeomFieldDefn( - hFDefn: OGRFeatureDefnH, - iGeomField: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_FD_IsSame(hFDefn: OGRFeatureDefnH, hOtherFDefn: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_Create(arg1: OGRFeatureDefnH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_F_Destroy(arg1: OGRFeatureH); -} -extern "C" { - pub fn OGR_F_GetDefnRef(arg1: OGRFeatureH) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_F_SetGeometryDirectly(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetGeometry(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetGeometryRef(arg1: OGRFeatureH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_StealGeometry(arg1: OGRFeatureH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_Clone(arg1: OGRFeatureH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_F_Equal(arg1: OGRFeatureH, arg2: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldCount(arg1: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldDefnRef(arg1: OGRFeatureH, arg2: libc::c_int) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_F_GetFieldIndex(arg1: OGRFeatureH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_IsFieldSet(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_UnsetField(arg1: OGRFeatureH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_F_IsFieldNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_IsFieldSetAndNotNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_SetFieldNull(arg1: OGRFeatureH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_F_GetRawFieldRef(arg1: OGRFeatureH, arg2: libc::c_int) -> *mut OGRField; -} -extern "C" { - pub fn OGR_RawField_IsUnset(arg1: *const OGRField) -> libc::c_int; -} -extern "C" { - pub fn OGR_RawField_IsNull(arg1: *const OGRField) -> libc::c_int; -} -extern "C" { - pub fn OGR_RawField_SetUnset(arg1: *mut OGRField); -} -extern "C" { - pub fn OGR_RawField_SetNull(arg1: *mut OGRField); -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger64(arg1: OGRFeatureH, arg2: libc::c_int) -> GIntBig; -} -extern "C" { - pub fn OGR_F_GetFieldAsDouble(arg1: OGRFeatureH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_F_GetFieldAsString(arg1: OGRFeatureH, arg2: libc::c_int) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_GetFieldAsIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const GIntBig; -} -extern "C" { - pub fn OGR_F_GetFieldAsDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const f64; -} -extern "C" { - pub fn OGR_F_GetFieldAsStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn OGR_F_GetFieldAsBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *mut GByte; -} -extern "C" { - pub fn OGR_F_GetFieldAsDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - arg4: *mut libc::c_int, - arg5: *mut libc::c_int, - arg6: *mut libc::c_int, - arg7: *mut libc::c_int, - arg8: *mut libc::c_int, - arg9: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsDateTimeEx( - hFeat: OGRFeatureH, - iField: libc::c_int, - pnYear: *mut libc::c_int, - pnMonth: *mut libc::c_int, - pnDay: *mut libc::c_int, - pnHour: *mut libc::c_int, - pnMinute: *mut libc::c_int, - pfSecond: *mut f32, - pnTZFlag: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_SetFieldInteger(arg1: OGRFeatureH, arg2: libc::c_int, arg3: libc::c_int); -} -extern "C" { - pub fn OGR_F_SetFieldInteger64(arg1: OGRFeatureH, arg2: libc::c_int, arg3: GIntBig); -} -extern "C" { - pub fn OGR_F_SetFieldDouble(arg1: OGRFeatureH, arg2: libc::c_int, arg3: f64); -} -extern "C" { - pub fn OGR_F_SetFieldString(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_SetFieldIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_SetFieldInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const GIntBig, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut f64, - ); -} -extern "C" { - pub fn OGR_F_SetFieldStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut *mut libc::c_char, - ); -} -extern "C" { - pub fn OGR_F_SetFieldRaw(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *mut OGRField); -} -extern "C" { - pub fn OGR_F_SetFieldBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut GByte, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_SetFieldDateTimeEx( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: f32, - arg9: libc::c_int, - ); -} -extern "C" { - pub fn OGR_F_GetGeomFieldCount(hFeat: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetGeomFieldDefnRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_F_GetGeomFieldIndex(hFeat: OGRFeatureH, pszName: *const libc::c_char) - -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetGeomFieldRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_SetGeomFieldDirectly( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetGeomField( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetFID(arg1: OGRFeatureH) -> GIntBig; -} -extern "C" { - pub fn OGR_F_SetFID(arg1: OGRFeatureH, arg2: GIntBig) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_DumpReadable(arg1: OGRFeatureH, arg2: *mut FILE); -} -extern "C" { - pub fn OGR_F_SetFrom(arg1: OGRFeatureH, arg2: OGRFeatureH, arg3: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetFromWithMap( - arg1: OGRFeatureH, - arg2: OGRFeatureH, - arg3: libc::c_int, - arg4: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetStyleString(arg1: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_SetStyleString(arg1: OGRFeatureH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); -} -extern "C" { - /// Return style table - pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; -} -extern "C" { - /// Set style table and take ownership - pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); -} -extern "C" { - /// Set style table - pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_F_GetNativeData(arg1: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_SetNativeData(arg1: OGRFeatureH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_GetNativeMediaType(arg1: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_SetNativeMediaType(arg1: OGRFeatureH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_FillUnsetWithDefault( - hFeat: OGRFeatureH, - bNotNullableOnly: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ); -} -extern "C" { - pub fn OGR_F_Validate( - arg1: OGRFeatureH, - nValidateFlags: libc::c_int, - bEmitError: libc::c_int, - ) -> libc::c_int; -} -/// Opaque type for a layer (OGRLayer) -pub type OGRLayerH = *mut libc::c_void; -/// Opaque type for a OGR datasource (OGRDataSource) -pub type OGRDataSourceH = *mut libc::c_void; -/// Opaque type for a OGR driver (OGRSFDriver) -pub type OGRSFDriverH = *mut libc::c_void; -extern "C" { - pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetGeomType(arg1: OGRLayerH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_L_GetSpatialFilter(arg1: OGRLayerH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_L_SetSpatialFilter(arg1: OGRLayerH, arg2: OGRGeometryH); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterRect(arg1: OGRLayerH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterEx(arg1: OGRLayerH, iGeomField: libc::c_int, hGeom: OGRGeometryH); -} -extern "C" { - pub fn OGR_L_SetSpatialFilterRectEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - dfMinX: f64, - dfMinY: f64, - dfMaxX: f64, - dfMaxY: f64, - ); -} -extern "C" { - pub fn OGR_L_SetAttributeFilter(arg1: OGRLayerH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ResetReading(arg1: OGRLayerH); -} -extern "C" { - pub fn OGR_L_GetNextFeature(arg1: OGRLayerH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_L_SetNextByIndex(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_L_SetFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CreateFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_DeleteFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetLayerDefn(arg1: OGRLayerH) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_L_GetSpatialRef(arg1: OGRLayerH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OGR_L_FindFieldIndex( - arg1: OGRLayerH, - arg2: *const libc::c_char, - bExactMatch: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_GetFeatureCount(arg1: OGRLayerH, arg2: libc::c_int) -> GIntBig; -} -extern "C" { - pub fn OGR_L_GetExtent( - arg1: OGRLayerH, - arg2: *mut OGREnvelope, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_GetExtentEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - psExtent: *mut OGREnvelope, - bForce: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_TestCapability(arg1: OGRLayerH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_CreateField( - arg1: OGRLayerH, - arg2: OGRFieldDefnH, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CreateGeomField( - hLayer: OGRLayerH, - hFieldDefn: OGRGeomFieldDefnH, - bForce: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_DeleteField(arg1: OGRLayerH, iField: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ReorderFields(arg1: OGRLayerH, panMap: *mut libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_ReorderField( - arg1: OGRLayerH, - iOldFieldPos: libc::c_int, - iNewFieldPos: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_AlterFieldDefn( - arg1: OGRLayerH, - iField: libc::c_int, - hNewFieldDefn: OGRFieldDefnH, - nFlags: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_StartTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_CommitTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_Dereference(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; -} -extern "C" { - /// @endcond - pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; -} -extern "C" { - /// @endcond - pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; -} -extern "C" { - /// Get style table - pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; -} -extern "C" { - /// Set style table (and take ownership) - pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); -} -extern "C" { - /// Set style table - pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_L_SetIgnoredFields(arg1: OGRLayerH, arg2: *mut *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Intersection( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Union( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_SymDifference( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Identity( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Update( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Clip( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_L_Erase( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_Destroy(arg1: OGRDataSourceH); -} -extern "C" { - pub fn OGR_DS_GetName(arg1: OGRDataSourceH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_DS_GetLayerCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_GetLayerByName(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_DeleteLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_GetDriver(arg1: OGRDataSourceH) -> OGRSFDriverH; -} -extern "C" { - pub fn OGR_DS_CreateLayer( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_CopyLayer( - arg1: OGRDataSourceH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_TestCapability(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_ExecuteSQL( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_Dereference(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetRefCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; -} -extern "C" { - /// @endcond */ - /// /** Flush pending changes to disk. See GDALDataset::FlushCache() - pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; -} -extern "C" { - /// Get style table - pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; -} -extern "C" { - /// Set style table (and take ownership) - pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); -} -extern "C" { - /// Set style table - pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn OGR_Dr_GetName(arg1: OGRSFDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Dr_Open( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_TestCapability(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_Dr_CreateDataSource( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_CopyDataSource( - arg1: OGRSFDriverH, - arg2: OGRDataSourceH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGROpen( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGROpenShared( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn OGRRegisterDriver(arg1: OGRSFDriverH); -} -extern "C" { - pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); -} -extern "C" { - /// @endcond - pub fn OGRGetDriverCount() -> libc::c_int; -} -extern "C" { - pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; -} -extern "C" { - pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn OGRGetOpenDSCount() -> libc::c_int; -} -extern "C" { - pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; -} -extern "C" { - /// @endcond - pub fn OGRRegisterAll(); -} -extern "C" { - /// Clean-up all drivers (including raster ones starting with GDAL 2.0. - /// See GDALDestroyDriverManager() - pub fn OGRCleanupAll(); -} -/// Style manager opaque type -pub type OGRStyleMgrH = *mut libc::c_void; -/// Style tool opaque type -pub type OGRStyleToolH = *mut libc::c_void; -extern "C" { - pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; -} -extern "C" { - pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); -} -extern "C" { - pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_SM_InitStyleString( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_GetPartCount( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_GetPart( - hSM: OGRStyleMgrH, - nPartId: libc::c_int, - pszStyleString: *const libc::c_char, - ) -> OGRStyleToolH; -} -extern "C" { - pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_AddStyle( - hSM: OGRStyleMgrH, - pszStyleName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; -} -extern "C" { - pub fn OGR_ST_Destroy(hST: OGRStyleToolH); -} -extern "C" { - pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; -} -extern "C" { - pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; -} -extern "C" { - pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); -} -extern "C" { - pub fn OGR_ST_GetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_ST_GetParamNum( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_ST_GetParamDbl( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> f64; -} -extern "C" { - pub fn OGR_ST_SetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); -} -extern "C" { - pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); -} -extern "C" { - pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_ST_GetRGBFromString( - hST: OGRStyleToolH, - pszColor: *const libc::c_char, - pnRed: *mut libc::c_int, - pnGreen: *mut libc::c_int, - pnBlue: *mut libc::c_int, - pnAlpha: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_Create() -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); -} -extern "C" { - pub fn OGR_STBL_AddStyle( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_SaveStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_LoadStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_Find( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); -} -extern "C" { - pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -pub mod GDALDataType { - /// Pixel data types - pub type Type = u32; - /// Unknown or unspecified type - pub const GDT_Unknown: Type = 0; - /// Eight bit unsigned integer - pub const GDT_Byte: Type = 1; - /// Sixteen bit unsigned integer - pub const GDT_UInt16: Type = 2; - /// Sixteen bit signed integer - pub const GDT_Int16: Type = 3; - /// Thirty two bit unsigned integer - pub const GDT_UInt32: Type = 4; - /// Thirty two bit signed integer - pub const GDT_Int32: Type = 5; - /// Thirty two bit floating point - pub const GDT_Float32: Type = 6; - /// Sixty four bit floating point - pub const GDT_Float64: Type = 7; - /// Complex Int16 - pub const GDT_CInt16: Type = 8; - /// Complex Int32 - pub const GDT_CInt32: Type = 9; - /// Complex Float32 - pub const GDT_CFloat32: Type = 10; - /// Complex Float64 - pub const GDT_CFloat64: Type = 11; - /// Complex Float64 - pub const GDT_TypeCount: Type = 12; -} -extern "C" { - pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDataTypeSizeBits(eDataType: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDataTypeSizeBytes(arg1: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; -} -extern "C" { - pub fn GDALDataTypeUnion( - arg1: GDALDataType::Type, - arg2: GDALDataType::Type, - ) -> GDALDataType::Type; -} -extern "C" { - pub fn GDALAdjustValueToDataType( - eDT: GDALDataType::Type, - dfValue: f64, - pbClamped: *mut libc::c_int, - pbRounded: *mut libc::c_int, - ) -> f64; -} -extern "C" { - pub fn GDALGetNonComplexDataType(arg1: GDALDataType::Type) -> GDALDataType::Type; -} -pub mod GDALAsyncStatusType { - /// status of the asynchronous stream - pub type Type = u32; - pub const GARIO_PENDING: Type = 0; - pub const GARIO_UPDATE: Type = 1; - pub const GARIO_ERROR: Type = 2; - pub const GARIO_COMPLETE: Type = 3; - pub const GARIO_TypeCount: Type = 4; -} -extern "C" { - pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; -} -pub mod GDALAccess { - /// Flag indicating read/write, or read-only access to data. - pub type Type = u32; - /// Read only (no update) access - pub const GA_ReadOnly: Type = 0; - /// Read/write access. - pub const GA_Update: Type = 1; -} -pub mod GDALRWFlag { - /// Read/Write flag for RasterIO() method - pub type Type = u32; - /// Read data - pub const GF_Read: Type = 0; - /// Write data - pub const GF_Write: Type = 1; -} -pub mod GDALRIOResampleAlg { - /// RasterIO() resampling method. - /// @since GDAL 2.0 - pub type Type = u32; - /// Nearest neighbour - pub const GRIORA_NearestNeighbour: Type = 0; - /// Bilinear (2x2 kernel) - pub const GRIORA_Bilinear: Type = 1; - /// Cubic Convolution Approximation (4x4 kernel) - pub const GRIORA_Cubic: Type = 2; - /// Cubic B-Spline Approximation (4x4 kernel) - pub const GRIORA_CubicSpline: Type = 3; - /// Lanczos windowed sinc interpolation (6x6 kernel) - pub const GRIORA_Lanczos: Type = 4; - /// Average - pub const GRIORA_Average: Type = 5; - /// Mode (selects the value which appears most often of all the sampled points) - pub const GRIORA_Mode: Type = 6; - /// Gauss blurring - pub const GRIORA_Gauss: Type = 7; -} -/// Structure to pass extra arguments to RasterIO() method -/// @since GDAL 2.0 -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRasterIOExtraArg { - /// Version of structure (to allow future extensions of the structure) - pub nVersion: libc::c_int, - /// Resampling algorithm - pub eResampleAlg: GDALRIOResampleAlg::Type, - /// Progress callback - pub pfnProgress: GDALProgressFunc, - /// Progress callback user data - pub pProgressData: *mut libc::c_void, - /// Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set. - /// Mostly reserved from the VRT driver to communicate a more precise - /// source window. Must be such that dfXOff - nXOff < 1.0 and - /// dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize < 1.0 - pub bFloatingPointWindowValidity: libc::c_int, - /// Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE - pub dfXOff: f64, - /// Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE - pub dfYOff: f64, - /// Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE - pub dfXSize: f64, - /// Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE - pub dfYSize: f64, -} -#[test] -fn bindgen_test_layout_GDALRasterIOExtraArg() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(nVersion) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnProgress as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pProgressData as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pProgressData) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bFloatingPointWindowValidity - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(bFloatingPointWindowValidity) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYSize) - ) - ); -} -pub mod GDALColorInterp { - /// Types of color interpretation for raster bands. - pub type Type = u32; - pub const GCI_Undefined: Type = 0; - /// Greyscale - pub const GCI_GrayIndex: Type = 1; - /// Paletted (see associated color table) - pub const GCI_PaletteIndex: Type = 2; - /// Red band of RGBA image - pub const GCI_RedBand: Type = 3; - /// Green band of RGBA image - pub const GCI_GreenBand: Type = 4; - /// Blue band of RGBA image - pub const GCI_BlueBand: Type = 5; - /// Alpha (0=transparent, 255=opaque) - pub const GCI_AlphaBand: Type = 6; - /// Hue band of HLS image - pub const GCI_HueBand: Type = 7; - /// Saturation band of HLS image - pub const GCI_SaturationBand: Type = 8; - /// Lightness band of HLS image - pub const GCI_LightnessBand: Type = 9; - /// Cyan band of CMYK image - pub const GCI_CyanBand: Type = 10; - /// Magenta band of CMYK image - pub const GCI_MagentaBand: Type = 11; - /// Yellow band of CMYK image - pub const GCI_YellowBand: Type = 12; - /// Black band of CMLY image - pub const GCI_BlackBand: Type = 13; - /// Y Luminance - pub const GCI_YCbCr_YBand: Type = 14; - /// Cb Chroma - pub const GCI_YCbCr_CbBand: Type = 15; - /// Cr Chroma - pub const GCI_YCbCr_CrBand: Type = 16; - /// Max current value - pub const GCI_Max: Type = 16; -} -extern "C" { - pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; -} -pub mod GDALPaletteInterp { - /// Types of color interpretations for a GDALColorTable. - pub type Type = u32; - /// Grayscale (in GDALColorEntry.c1) - pub const GPI_Gray: Type = 0; - /// Red, Green, Blue and Alpha in (in c1, c2, c3 and c4) - pub const GPI_RGB: Type = 1; - /// Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4) - pub const GPI_CMYK: Type = 2; - /// Hue, Lightness and Saturation (in c1, c2, and c3) - pub const GPI_HLS: Type = 3; -} -extern "C" { - pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; -} -/// Opaque type used for the C bindings of the C++ GDALMajorObject class -pub type GDALMajorObjectH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALDataset class -pub type GDALDatasetH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALRasterBand class -pub type GDALRasterBandH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALDriver class -pub type GDALDriverH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALColorTable class -pub type GDALColorTableH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class -pub type GDALRasterAttributeTableH = *mut libc::c_void; -/// Opaque type used for the C bindings of the C++ GDALAsyncReader class -pub type GDALAsyncReaderH = *mut libc::c_void; -/// Type to express pixel, line or band spacing. Signed 64 bit integer. -pub type GSpacing = GIntBig; -extern "C" { - pub fn GDALAllRegister(); -} -extern "C" { - pub fn GDALCreate( - hDriver: GDALDriverH, - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: GDALDataType::Type, - arg6: *mut *mut libc::c_char, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALCreateCopy( - arg1: GDALDriverH, - arg2: *const libc::c_char, - arg3: GDALDatasetH, - arg4: libc::c_int, - arg5: *mut *mut libc::c_char, - arg6: GDALProgressFunc, - arg7: *mut libc::c_void, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALIdentifyDriver( - pszFilename: *const libc::c_char, - papszFileList: *mut *mut libc::c_char, - ) -> GDALDriverH; -} -extern "C" { - pub fn GDALIdentifyDriverEx( - pszFilename: *const libc::c_char, - nIdentifyFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszFileList: *const *const libc::c_char, - ) -> GDALDriverH; -} -extern "C" { - pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; -} -extern "C" { - pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; -} -extern "C" { - pub fn GDALOpenEx( - pszFilename: *const libc::c_char, - nOpenFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszOpenOptions: *const *const libc::c_char, - papszSiblingFiles: *const *const libc::c_char, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; -} -extern "C" { - pub fn GDALGetDriverCount() -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; -} -extern "C" { - pub fn GDALCreateDriver() -> GDALDriverH; -} -extern "C" { - pub fn GDALDestroyDriver(arg1: GDALDriverH); -} -extern "C" { - pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; -} -extern "C" { - pub fn GDALDeregisterDriver(arg1: GDALDriverH); -} -extern "C" { - pub fn GDALDestroyDriverManager(); -} -extern "C" { - pub fn GDALDestroy(); -} -extern "C" { - pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRenameDataset( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALCopyDatasetFiles( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALValidateCreationOptions( - arg1: GDALDriverH, - papszCreationOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; -} -/// Ground Control Point -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDAL_GCP { - /// Unique identifier, often numeric - pub pszId: *mut libc::c_char, - /// Informational message or "" - pub pszInfo: *mut libc::c_char, - /// Pixel (x) location of GCP on raster - pub dfGCPPixel: f64, - /// Line (y) location of GCP on raster - pub dfGCPLine: f64, - /// X position of GCP in georeferenced space - pub dfGCPX: f64, - /// Y position of GCP in georeferenced space - pub dfGCPY: f64, - /// Elevation of GCP, or zero if not known - pub dfGCPZ: f64, -} -#[test] -fn bindgen_test_layout_GDAL_GCP() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(GDAL_GCP)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDAL_GCP)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszId) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszInfo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPPixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPLine) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPZ) - ) - ); -} -extern "C" { - pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); -} -extern "C" { - pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); -} -extern "C" { - pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; -} -extern "C" { - pub fn GDALGCPsToGeoTransform( - nGCPCount: libc::c_int, - pasGCPs: *const GDAL_GCP, - padfGeoTransform: *mut f64, - bApproxOK: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALInvGeoTransform( - padfGeoTransformIn: *mut f64, - padfInvGeoTransformOut: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALApplyGeoTransform( - arg1: *mut f64, - arg2: f64, - arg3: f64, - arg4: *mut f64, - arg5: *mut f64, - ); -} -extern "C" { - pub fn GDALComposeGeoTransforms( - padfGeoTransform1: *const f64, - padfGeoTransform2: *const f64, - padfGeoTransformOut: *mut f64, - ); -} -extern "C" { - pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALGetMetadata( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALSetMetadata( - arg1: GDALMajorObjectH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); -} -extern "C" { - pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; -} -extern "C" { - pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALClose(arg1: GDALDatasetH); -} -extern "C" { - pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALAddBand( - hDS: GDALDatasetH, - eType: GDALDataType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALBeginAsyncReader( - hDS: GDALDatasetH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - pBuf: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> GDALAsyncReaderH; -} -extern "C" { - pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); -} -extern "C" { - pub fn GDALDatasetRasterIO( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetRasterIOEx( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - nBandSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetAdviseRead( - hDS: GDALDatasetH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; -} -extern "C" { - pub fn GDALSetGCPs( - arg1: GDALDatasetH, - arg2: libc::c_int, - arg3: *const GDAL_GCP, - arg4: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetInternalHandle( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALReleaseDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALBuildOverviews( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: libc::c_int, - arg4: *mut libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_int, - arg7: GDALProgressFunc, - arg8: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); -} -extern "C" { - pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALFlushCache(hDS: GDALDatasetH); -} -extern "C" { - pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetCopyWholeRaster( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterBandCopyWholeRaster( - hSrcBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - constpapszOptions: *const *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRegenerateOverviews( - hSrcBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviewBands: *mut GDALRasterBandH, - pszResampling: *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn GDALDatasetCreateLayer( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetCopyLayer( - arg1: GDALDatasetH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetResetReading(arg1: GDALDatasetH); -} -extern "C" { - pub fn GDALDatasetGetNextFeature( - hDS: GDALDatasetH, - phBelongingLayer: *mut OGRLayerH, - pdfProgressPct: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> OGRFeatureH; -} -extern "C" { - pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn GDALDatasetExecuteSQL( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; -} -extern "C" { - pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); -} -extern "C" { - pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; -} -extern "C" { - pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); -} -extern "C" { - pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; -} -extern "C" { - pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; -} -/// Type of functions to pass to GDALAddDerivedBandPixelFunc. -/// @since GDAL 2.2 -pub type GDALDerivedPixelFunc = ::std::option::Option< - unsafe extern "C" fn( - papoSources: *mut *mut libc::c_void, - nSources: libc::c_int, - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eSrcType: GDALDataType::Type, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type, ->; -extern "C" { - pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; -} -extern "C" { - pub fn GDALGetBlockSize( - arg1: GDALRasterBandH, - pnXSize: *mut libc::c_int, - pnYSize: *mut libc::c_int, - ); -} -extern "C" { - pub fn GDALGetActualBlockSize( - arg1: GDALRasterBandH, - nXBlockOff: libc::c_int, - nYBlockOff: libc::c_int, - pnXValid: *mut libc::c_int, - pnYValid: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterAdviseRead( - hRB: GDALRasterBandH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterIO( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterIOEx( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALReadBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWriteBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; -} -extern "C" { - pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; -} -extern "C" { - pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; -} -extern "C" { - pub fn GDALSetRasterColorInterpretation( - arg1: GDALRasterBandH, - arg2: GDALColorInterp::Type, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; -} -extern "C" { - pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDeleteRasterNoDataValue(arg1: GDALRasterBandH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALSetRasterCategoryNames( - arg1: GDALRasterBandH, - arg2: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALGetRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - bForce: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetRasterStatistics( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - dfMean: f64, - dfStdDev: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetRasterUnitType( - hBand: GDALRasterBandH, - pszNewValue: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeRasterMinMax( - hBand: GDALRasterBandH, - bApproxOK: libc::c_int, - adfMinMax: *mut f64, - ); -} -extern "C" { - pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultHistogram( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut libc::c_int, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultHistogramEx( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut GUIntBig, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetDefaultHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetDefaultHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRandomRasterSample( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: *mut f32, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) - -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALFillRaster( - hBand: GDALRasterBandH, - dfRealValue: f64, - dfImaginaryValue: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeBandStats( - hBand: GDALRasterBandH, - nSampleStep: libc::c_int, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALOverviewMagnitudeCorrection( - hBaseBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviews: *mut GDALRasterBandH, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALSetDefaultRAT( - arg1: GDALRasterBandH, - arg2: GDALRasterAttributeTableH, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALAddDerivedBandPixelFunc( - pszName: *const libc::c_char, - pfnPixelFunc: GDALDerivedPixelFunc, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDataCoverageStatus( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nMaskFlagStop: libc::c_int, - pdfDataPct: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALARGetNextUpdatedRegion( - hARIO: GDALAsyncReaderH, - dfTimeout: f64, - pnXBufOff: *mut libc::c_int, - pnYBufOff: *mut libc::c_int, - pnXBufSize: *mut libc::c_int, - pnYBufSize: *mut libc::c_int, - ) -> GDALAsyncStatusType::Type; -} -extern "C" { - pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; -} -extern "C" { - pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); -} -extern "C" { - pub fn GDALGeneralCmdLineProcessor( - nArgc: libc::c_int, - ppapszArgv: *mut *mut *mut libc::c_char, - nOptions: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSwapWords( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: libc::c_int, - nWordSkip: libc::c_int, - ); -} -extern "C" { - pub fn GDALSwapWordsEx( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: usize, - nWordSkip: libc::c_int, - ); -} -extern "C" { - pub fn GDALCopyWords( - pSrcData: *const libc::c_void, - eSrcType: GDALDataType::Type, - nSrcPixelOffset: libc::c_int, - pDstData: *mut libc::c_void, - eDstType: GDALDataType::Type, - nDstPixelOffset: libc::c_int, - nWordCount: libc::c_int, - ); -} -extern "C" { - pub fn GDALCopyBits( - pabySrcData: *const GByte, - nSrcOffset: libc::c_int, - nSrcStep: libc::c_int, - pabyDstData: *mut GByte, - nDstOffset: libc::c_int, - nDstStep: libc::c_int, - nBitCount: libc::c_int, - nStepCount: libc::c_int, - ); -} -extern "C" { - pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; -} -extern "C" { - pub fn GDALReadWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALWriteWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALLoadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALReadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALLoadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALReadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALDecToDMS( - arg1: f64, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALPackedDMSToDec(arg1: f64) -> f64; -} -extern "C" { - pub fn GDALDecToPackedDMS(arg1: f64) -> f64; -} -/// Strucutre to store Rational Polynomial Coefficients / Rigorous Projection -/// Model. See http://geotiff.maptools.org/rpc_prop.html -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRPCInfo { - /// < Line offset - pub dfLINE_OFF: f64, - /// < Sample/Pixel offset - pub dfSAMP_OFF: f64, - /// < Latitude offset - pub dfLAT_OFF: f64, - /// < Longitude offset - pub dfLONG_OFF: f64, - /// < Height offset - pub dfHEIGHT_OFF: f64, - /// < Line scale - pub dfLINE_SCALE: f64, - /// < Sample/Pixel scale - pub dfSAMP_SCALE: f64, - /// < Latitude scale - pub dfLAT_SCALE: f64, - /// < Longitude scale - pub dfLONG_SCALE: f64, - /// < Height scale - pub dfHEIGHT_SCALE: f64, - /// < Line Numerator Coefficients - pub adfLINE_NUM_COEFF: [f64; 20usize], - /// < Line Denominator Coefficients - pub adfLINE_DEN_COEFF: [f64; 20usize], - /// < Sample/Pixel Numerator Coefficients - pub adfSAMP_NUM_COEFF: [f64; 20usize], - /// < Sample/Pixel Denominator Coefficients - pub adfSAMP_DEN_COEFF: [f64; 20usize], - /// < Minimum longitude - pub dfMIN_LONG: f64, - /// < Minimum latitude - pub dfMIN_LAT: f64, - /// < Maximum longitude - pub dfMAX_LONG: f64, - /// < Maximum latitude - pub dfMAX_LAT: f64, -} -#[test] -fn bindgen_test_layout_GDALRPCInfo() { - assert_eq!( - ::std::mem::size_of::(), - 752usize, - concat!("Size of: ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LAT) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, - 744usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LAT) - ) - ); -} -extern "C" { - pub fn GDALExtractRPCInfo(arg1: *mut *mut libc::c_char, arg2: *mut GDALRPCInfo) -> libc::c_int; -} -/// Color tuple -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALColorEntry { - /// gray, red, cyan or hue - pub c1: libc::c_short, - /// green, magenta, or lightness - pub c2: libc::c_short, - /// blue, yellow, or saturation - pub c3: libc::c_short, - /// alpha or blackband - pub c4: libc::c_short, -} -#[test] -fn bindgen_test_layout_GDALColorEntry() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(GDALColorEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(GDALColorEntry)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c4) - ) - ); -} -extern "C" { - pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; -} -extern "C" { - pub fn GDALDestroyColorTable(arg1: GDALColorTableH); -} -extern "C" { - pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; -} -extern "C" { - pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; -} -extern "C" { - pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; -} -extern "C" { - pub fn GDALGetColorEntryAsRGB( - arg1: GDALColorTableH, - arg2: libc::c_int, - arg3: *mut GDALColorEntry, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); -} -extern "C" { - pub fn GDALCreateColorRamp( - hTable: GDALColorTableH, - nStartIndex: libc::c_int, - psStartColor: *const GDALColorEntry, - nEndIndex: libc::c_int, - psEndColor: *const GDALColorEntry, - ); -} -pub mod GDALRATFieldType { - /// Field type of raster attribute table - pub type Type = u32; - /// Integer field - pub const GFT_Integer: Type = 0; - /// Floating point (double) field - pub const GFT_Real: Type = 1; - /// String field - pub const GFT_String: Type = 2; -} -pub mod GDALRATFieldUsage { - /// Field usage of raster attribute table - pub type Type = u32; - /// General purpose field. - pub const GFU_Generic: Type = 0; - /// Histogram pixel count - pub const GFU_PixelCount: Type = 1; - /// Class name - pub const GFU_Name: Type = 2; - /// Class range minimum - pub const GFU_Min: Type = 3; - /// Class range maximum - pub const GFU_Max: Type = 4; - /// Class value (min=max) - pub const GFU_MinMax: Type = 5; - /// Red class color (0-255) - pub const GFU_Red: Type = 6; - /// Green class color (0-255) - pub const GFU_Green: Type = 7; - /// Blue class color (0-255) - pub const GFU_Blue: Type = 8; - /// Alpha (0=transparent,255=opaque) - pub const GFU_Alpha: Type = 9; - /// Color Range Red Minimum - pub const GFU_RedMin: Type = 10; - /// Color Range Green Minimum - pub const GFU_GreenMin: Type = 11; - /// Color Range Blue Minimum - pub const GFU_BlueMin: Type = 12; - /// Color Range Alpha Minimum - pub const GFU_AlphaMin: Type = 13; - /// Color Range Red Maximum - pub const GFU_RedMax: Type = 14; - /// Color Range Green Maximum - pub const GFU_GreenMax: Type = 15; - /// Color Range Blue Maximum - pub const GFU_BlueMax: Type = 16; - /// Color Range Alpha Maximum - pub const GFU_AlphaMax: Type = 17; - /// Maximum GFU value - pub const GFU_MaxCount: Type = 18; -} -extern "C" { - pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); -} -extern "C" { - pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetNameOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALRATGetUsageOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldUsage::Type; -} -extern "C" { - pub fn GDALRATGetTypeOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldType::Type; -} -extern "C" { - pub fn GDALRATGetColOfUsage( - arg1: GDALRasterAttributeTableH, - arg2: GDALRATFieldUsage::Type, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALRATGetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATGetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> f64; -} -extern "C" { - pub fn GDALRATSetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_char, - ); -} -extern "C" { - pub fn GDALRATSetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ); -} -extern "C" { - pub fn GDALRATSetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: f64, - ); -} -extern "C" { - pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; -} -extern "C" { - pub fn GDALRATValuesIOAsDouble( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pdfData: *mut f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATValuesIOAsInteger( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pnData: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATValuesIOAsString( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - papszStrList: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); -} -extern "C" { - pub fn GDALRATCreateColumn( - arg1: GDALRasterAttributeTableH, - arg2: *const libc::c_char, - arg3: GDALRATFieldType::Type, - arg4: GDALRATFieldUsage::Type, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATSetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: f64, - arg3: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATGetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: *mut f64, - arg3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALRATInitializeFromColorTable( - arg1: GDALRasterAttributeTableH, - arg2: GDALColorTableH, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRATTranslateToColorTable( - arg1: GDALRasterAttributeTableH, - nEntryCount: libc::c_int, - ) -> GDALColorTableH; -} -extern "C" { - pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); -} -extern "C" { - pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; -} -extern "C" { - pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; -} -extern "C" { - pub fn GDALSetCacheMax(nBytes: libc::c_int); -} -extern "C" { - pub fn GDALGetCacheMax() -> libc::c_int; -} -extern "C" { - pub fn GDALGetCacheUsed() -> libc::c_int; -} -extern "C" { - pub fn GDALSetCacheMax64(nBytes: GIntBig); -} -extern "C" { - pub fn GDALGetCacheMax64() -> GIntBig; -} -extern "C" { - pub fn GDALGetCacheUsed64() -> GIntBig; -} -extern "C" { - pub fn GDALFlushCacheBlock() -> libc::c_int; -} -extern "C" { - pub fn GDALDatasetGetVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nBandSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALRasterBandGetVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALGetVirtualMemAuto( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - pnPixelSpace: *mut libc::c_int, - pnLineSpace: *mut GIntBig, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -pub mod GDALTileOrganization { - /// Enumeration to describe the tile organization - pub type Type = u32; - /// Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ... - pub const GTO_TIP: Type = 0; - /// Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ... - pub const GTO_BIT: Type = 1; - /// Band SeQuential : all the tiles of first band, all the tiles of following band... - pub const GTO_BSQ: Type = 2; -} -extern "C" { - pub fn GDALDatasetGetTiledVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - eTileOrganization: GDALTileOrganization::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALRasterBandGetTiledVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLVirtualMem; -} -extern "C" { - pub fn GDALCreatePansharpenedVRT( - pszXML: *const libc::c_char, - hPanchroBand: GDALRasterBandH, - nInputSpectralBands: libc::c_int, - pahInputSpectralBands: *mut GDALRasterBandH, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALGetJPEG2000Structure( - pszFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALComputeMedianCutPCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - pfnIncludePixel: ::std::option::Option< - unsafe extern "C" fn(arg1: libc::c_int, arg2: libc::c_int, arg3: *mut libc::c_void) - -> libc::c_int, - >, - nColors: libc::c_int, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALDitherRGB2PCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - hTarget: GDALRasterBandH, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALChecksumImage( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALComputeProximity( - hSrcBand: GDALRasterBandH, - hProximityBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALFillNodata( - hTargetBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - dfMaxSearchDist: f64, - bDeprecatedOption: libc::c_int, - nSmoothingIterations: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALFPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSieveFilter( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - nSizeThreshold: libc::c_int, - nConnectedness: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub type GDALTransformerFunc = ::std::option::Option< - unsafe extern "C" fn( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int, ->; -extern "C" { - /// @cond Doxygen_Suppress - pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALUseTransformer( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateSimilarTransformer( - psTransformerArg: *mut libc::c_void, - dfSrcRatioX: f64, - dfSrcRatioY: f64, - ) -> *mut libc::c_void; -} -extern "C" { - /// @endcond - pub fn GDALCreateGenImgProjTransformer( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - bGCPUseOK: libc::c_int, - dfGCPErrorThreshold: f64, - nOrder: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer2( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGenImgProjTransformer3( - pszSrcWKT: *const libc::c_char, - padfSrcGeoTransform: *const f64, - pszDstWKT: *const libc::c_char, - padfDstGeoTransform: *const f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); -} -extern "C" { - pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); -} -extern "C" { - pub fn GDALGenImgProjTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); -} -extern "C" { - pub fn GDALGetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *mut f64); -} -extern "C" { - pub fn GDALCreateReprojectionTransformer( - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); -} -extern "C" { - pub fn GDALReprojectionTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateGCPTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALCreateGCPRefineTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - tolerance: f64, - minimumGcps: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALGCPTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateTPSTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALTPSTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - /// @endcond - pub fn GDALCreateRPCTransformer( - psRPC: *mut GDALRPCInfo, - bReversed: libc::c_int, - dfPixErrThreshold: f64, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALRPCTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateGeoLocTransformer( - hBaseDS: GDALDatasetH, - papszGeolocationInfo: *mut *mut libc::c_char, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALGeoLocTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateApproxTransformer( - pfnRawTransformer: GDALTransformerFunc, - pRawTransformerArg: *mut libc::c_void, - dfMaxError: f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALApproxTransformerOwnsSubtransformer( - pCBData: *mut libc::c_void, - bOwnFlag: libc::c_int, - ); -} -extern "C" { - pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); -} -extern "C" { - pub fn GDALApproxTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSimpleImageWarp( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - pfnTransform: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszWarpOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSuggestedWarpOutput( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSuggestedWarpOutput2( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - padfExtents: *mut f64, - nOptions: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn GDALSerializeTransformer( - pfnFunc: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - ) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALDeserializeTransformer( - psTree: *mut CPLXMLNode, - ppfnFunc: *mut GDALTransformerFunc, - ppTransformArg: *mut *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - /// @endcond - pub fn GDALTransformGeolocations( - hXBand: GDALRasterBandH, - hYBand: GDALRasterBandH, - hZBand: GDALRasterBandH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -/// Contour writer callback type -pub type GDALContourWriter = ::std::option::Option< - unsafe extern "C" fn( - dfLevel: f64, - nPoints: libc::c_int, - padfX: *mut f64, - padfY: *mut f64, - arg1: *mut libc::c_void, - ) -> CPLErr::Type, ->; -/// Contour generator opaque type -pub type GDALContourGeneratorH = *mut libc::c_void; -extern "C" { - pub fn GDAL_CG_Create( - nWidth: libc::c_int, - nHeight: libc::c_int, - bNoDataSet: libc::c_int, - dfNoDataValue: f64, - dfContourInterval: f64, - dfContourBase: f64, - pfnWriter: GDALContourWriter, - pCBData: *mut libc::c_void, - ) -> GDALContourGeneratorH; -} -extern "C" { - pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); -} -extern "C" { - pub fn OGRContourWriter( - arg1: f64, - arg2: libc::c_int, - arg3: *mut f64, - arg4: *mut f64, - pInfo: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - /// @endcond - pub fn GDALContourGenerate( - hBand: GDALRasterBandH, - dfContourInterval: f64, - dfContourBase: f64, - nFixedLevelCount: libc::c_int, - padfFixedLevels: *mut f64, - bUseNoData: libc::c_int, - dfNoDataValue: f64, - hLayer: *mut libc::c_void, - iIDField: libc::c_int, - iElevField: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - - pub fn GDALRasterizeGeometries( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nGeomCount: libc::c_int, - pahGeometries: *mut OGRGeometryH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeomBurnValue: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterizeLayers( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfLayerBurnValues: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterizeLayersBuf( - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pszDstProjection: *const libc::c_char, - padfDstGeoTransform: *mut f64, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - dfBurnValue: f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub mod GDALGridAlgorithm { - /// Gridding Algorithms - pub type Type = u32; - /// Inverse distance to a power - pub const GGA_InverseDistanceToAPower: Type = 1; - /// Moving Average - pub const GGA_MovingAverage: Type = 2; - /// Nearest Neighbor - pub const GGA_NearestNeighbor: Type = 3; - /// Minimum Value (Data Metric) - pub const GGA_MetricMinimum: Type = 4; - /// Maximum Value (Data Metric) - pub const GGA_MetricMaximum: Type = 5; - /// Data Range (Data Metric) - pub const GGA_MetricRange: Type = 6; - /// Number of Points (Data Metric) - pub const GGA_MetricCount: Type = 7; - /// Average Distance (Data Metric) - pub const GGA_MetricAverageDistance: Type = 8; - /// Average Distance Between Data Points (Data Metric) - pub const GGA_MetricAverageDistancePts: Type = 9; - /// Linear interpolation (from Delaunay triangulation. Since GDAL 2.1 - pub const GGA_Linear: Type = 10; - /// Inverse distance to a power with nearest neighbor search for max points - pub const GGA_InverseDistanceToAPowerNearestNeighbor: Type = 11; -} -extern "C" { - pub fn GDALGridCreate( - arg1: GDALGridAlgorithm::Type, - arg2: *const libc::c_void, - arg3: GUInt32, - arg4: *const f64, - arg5: *const f64, - arg6: *const f64, - arg7: f64, - arg8: f64, - arg9: f64, - arg10: f64, - arg11: GUInt32, - arg12: GUInt32, - arg13: GDALDataType::Type, - arg14: *mut libc::c_void, - arg15: GDALProgressFunc, - arg16: *mut libc::c_void, - ) -> CPLErr::Type; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALGridContext { - _unused: [u8; 0], -} -extern "C" { - pub fn GDALGridContextCreate( - eAlgorithm: GDALGridAlgorithm::Type, - poOptions: *const libc::c_void, - nPoints: GUInt32, - padfX: *const f64, - padfY: *const f64, - padfZ: *const f64, - bCallerWillKeepPointArraysAlive: libc::c_int, - ) -> *mut GDALGridContext; -} -extern "C" { - pub fn GDALGridContextFree(psContext: *mut GDALGridContext); -} -extern "C" { - pub fn GDALGridContextProcess( - psContext: *mut GDALGridContext, - dfXMin: f64, - dfXMax: f64, - dfYMin: f64, - dfYMax: f64, - nXSize: GUInt32, - nYSize: GUInt32, - eType: GDALDataType::Type, - pData: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeMatchingPoints( - hFirstImage: GDALDatasetH, - hSecondImage: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pnGCPCount: *mut libc::c_int, - ) -> *mut GDAL_GCP; -} -/// Triangle fact -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriFacet { - /// < index to the padfX/padfY arrays - pub anVertexIdx: [libc::c_int; 3usize], - /// < index to GDALDelaunayTriangulation.pasFacets, or -1 - pub anNeighborIdx: [libc::c_int; 3usize], -} -#[test] -fn bindgen_test_layout_GDALTriFacet() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriFacet)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(GDALTriFacet)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).anVertexIdx as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriFacet), - "::", - stringify!(anVertexIdx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).anNeighborIdx as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(GDALTriFacet), - "::", - stringify!(anNeighborIdx) - ) - ); -} -/// Triangle barycentric coefficients. -/// -/// Conversion from cartesian (x,y) to barycentric (l1,l2,l3) with : -/// l1 = dfMul1X * (x - dfCxtX) + dfMul1Y * (y - dfCstY) -/// l2 = dfMul2X * (x - dfCxtX) + dfMul2Y * (y - dfCstY) -/// l3 = 1 - l1 - l2 -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriBarycentricCoefficients { - /// < dfMul1X - pub dfMul1X: f64, - /// < dfMul1Y - pub dfMul1Y: f64, - /// < dfMul2X - pub dfMul2X: f64, - /// < dfMul2Y - pub dfMul2Y: f64, - /// < dfCstX - pub dfCstX: f64, - /// < dfCstY - pub dfCstY: f64, -} -#[test] -fn bindgen_test_layout_GDALTriBarycentricCoefficients() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(GDALTriBarycentricCoefficients)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriBarycentricCoefficients)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1X as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul1X) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1Y as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul1Y) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2X as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul2X) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2Y as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul2Y) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstX as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfCstX) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstY as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfCstY) - ) - ); -} -/// Triangulation structure -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriangulation { - /// < number of facets - pub nFacets: libc::c_int, - /// < array of nFacets facets - pub pasFacets: *mut GDALTriFacet, - /// < arra of nFacets barycentric coefficients - pub pasFacetCoefficients: *mut GDALTriBarycentricCoefficients, -} -#[test] -fn bindgen_test_layout_GDALTriangulation() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriangulation)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriangulation)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nFacets as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), - "::", - stringify!(nFacets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pasFacets as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), - "::", - stringify!(pasFacets) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pasFacetCoefficients as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), - "::", - stringify!(pasFacetCoefficients) - ) - ); -} -extern "C" { - pub fn GDALHasTriangulation() -> libc::c_int; -} -extern "C" { - pub fn GDALTriangulationCreateDelaunay( - nPoints: libc::c_int, - padfX: *const f64, - padfY: *const f64, - ) -> *mut GDALTriangulation; -} -extern "C" { - pub fn GDALTriangulationComputeBarycentricCoefficients( - psDT: *mut GDALTriangulation, - padfX: *const f64, - padfY: *const f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTriangulationComputeBarycentricCoordinates( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - pdfL1: *mut f64, - pdfL2: *mut f64, - pdfL3: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTriangulationFindFacetBruteForce( - psDT: *const GDALTriangulation, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTriangulationFindFacetDirected( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALTriangulationFree(psDT: *mut GDALTriangulation); -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn GDALTriangulationTerminate(); -} -extern "C" { - /// @endcond - pub fn GDALOpenVerticalShiftGrid( - pszProj4Geoidgrids: *const libc::c_char, - pbError: *mut libc::c_int, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALApplyVerticalShiftGrid( - hSrcDataset: GDALDatasetH, - hGridDataset: GDALDatasetH, - bInverse: libc::c_int, - dfSrcUnitToMeter: f64, - dfDstUnitToMeter: f64, - papszOptions: *const *const libc::c_char, - ) -> GDALDatasetH; -} -pub type CPLThreadFunc = ::std::option::Option; -extern "C" { - pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLUnlockFile(hLock: *mut libc::c_void); -} -extern "C" { - pub fn CPLCreateMutex() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateOrAcquireMutex( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLCreateOrAcquireMutexEx( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - nOptions: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; -} -extern "C" { - pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); -} -extern "C" { - pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); -} -extern "C" { - pub fn CPLCleanupMasterMutex(); -} -extern "C" { - pub fn CPLCreateCond() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); -} -extern "C" { - pub fn CPLCondSignal(hCond: *mut libc::c_void); -} -extern "C" { - pub fn CPLCondBroadcast(hCond: *mut libc::c_void); -} -extern "C" { - pub fn CPLDestroyCond(hCond: *mut libc::c_void); -} -extern "C" { - /// Contrary to what its name suggests, CPLGetPID() actually returns the thread id - pub fn CPLGetPID() -> GIntBig; -} -extern "C" { - pub fn CPLGetCurrentProcessID() -> libc::c_int; -} -extern "C" { - pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; -} -extern "C" { - pub fn CPLCreateJoinableThread( - pfnMain: CPLThreadFunc, - pArg: *mut libc::c_void, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); -} -extern "C" { - pub fn CPLSleep(dfWaitInSeconds: f64); -} -extern "C" { - pub fn CPLGetThreadingModel() -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetNumCPUs() -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CPLLock { - _unused: [u8; 0], -} -pub type CPLLock = _CPLLock; -pub mod CPLLockType { - pub type Type = u32; - pub const LOCK_RECURSIVE_MUTEX: Type = 0; - pub const LOCK_ADAPTIVE_MUTEX: Type = 1; - pub const LOCK_SPIN: Type = 2; -} -extern "C" { - pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; -} -extern "C" { - pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) - -> libc::c_int; -} -extern "C" { - pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; -} -extern "C" { - pub fn CPLReleaseLock(arg1: *mut CPLLock); -} -extern "C" { - pub fn CPLDestroyLock(arg1: *mut CPLLock); -} -extern "C" { - pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); -} -extern "C" { - pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLGetTLSEx( - nIndex: libc::c_int, - pbMemoryErrorOccurred: *mut libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); -} -pub type CPLTLSFreeFunc = ::std::option::Option; -extern "C" { - pub fn CPLSetTLSWithFreeFunc( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - ); -} -extern "C" { - pub fn CPLSetTLSWithFreeFuncEx( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - pbMemoryErrorOccurred: *mut libc::c_int, - ); -} -extern "C" { - pub fn CPLCleanupTLS(); -} -pub mod GDALResampleAlg { - /// Warp Resampling Algorithm - pub type Type = u32; - /// Nearest neighbour (select on one input pixel) - pub const GRA_NearestNeighbour: Type = 0; - /// Bilinear (2x2 kernel) - pub const GRA_Bilinear: Type = 1; - /// Cubic Convolution Approximation (4x4 kernel) - pub const GRA_Cubic: Type = 2; - /// Cubic B-Spline Approximation (4x4 kernel) - pub const GRA_CubicSpline: Type = 3; - /// Lanczos windowed sinc interpolation (6x6 kernel) - pub const GRA_Lanczos: Type = 4; - /// Average (computes the average of all non-NODATA contributing pixels) - pub const GRA_Average: Type = 5; - /// Mode (selects the value which appears most often of all the sampled points) - pub const GRA_Mode: Type = 6; - /// Max (selects maximum of all non-NODATA contributing pixels) - pub const GRA_Max: Type = 8; - /// Min (selects minimum of all non-NODATA contributing pixels) - pub const GRA_Min: Type = 9; - /// Med (selects median of all non-NODATA contributing pixels) - pub const GRA_Med: Type = 10; - /// Q1 (selects first quartile of all non-NODATA contributing pixels) - pub const GRA_Q1: Type = 11; - /// Q3 (selects third quartile of all non-NODATA contributing pixels) - pub const GRA_Q3: Type = 12; -} -/// @cond Doxygen_Suppress -pub type GDALMaskFunc = ::std::option::Option< - unsafe extern "C" fn( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pMask: *mut libc::c_void, - ) -> libc::c_int, ->; -extern "C" { - pub fn GDALWarpNoDataMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllValid: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpDstAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpSrcAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllOpaque: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpSrcMaskMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpCutlineMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; -} -/// Warp control options for use with GDALWarpOperation::Initialize() -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALWarpOptions { - pub papszWarpOptions: *mut *mut libc::c_char, - /// In bytes, 0.0 for internal default - pub dfWarpMemoryLimit: f64, - /// Resampling algorithm to use - pub eResampleAlg: GDALResampleAlg::Type, - /// data type to use during warp operation, GDT_Unknown lets the algorithm - /// select the type - pub eWorkingDataType: GDALDataType::Type, - /// Source image dataset. - pub hSrcDS: GDALDatasetH, - /// Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer(). - pub hDstDS: GDALDatasetH, - /// Number of bands to process, may be 0 to select all bands. - pub nBandCount: libc::c_int, - /// The band numbers for the source bands to process (1 based) - pub panSrcBands: *mut libc::c_int, - /// The band numbers for the destination bands to process (1 based) - pub panDstBands: *mut libc::c_int, - /// The source band so use as an alpha (transparency) value, 0=disabled - pub nSrcAlphaBand: libc::c_int, - /// The dest. band so use as an alpha (transparency) value, 0=disabled - pub nDstAlphaBand: libc::c_int, - /// The "nodata" value real component for each input band, if NULL there isn't one - pub padfSrcNoDataReal: *mut f64, - /// The "nodata" value imaginary component - may be NULL even if real - /// component is provided. - pub padfSrcNoDataImag: *mut f64, - /// The "nodata" value real component for each output band, if NULL there isn't one - pub padfDstNoDataReal: *mut f64, - /// The "nodata" value imaginary component - may be NULL even if real - /// component is provided. - pub padfDstNoDataImag: *mut f64, - /// GDALProgressFunc() compatible progress reporting function, or NULL - /// if there isn't one. - pub pfnProgress: GDALProgressFunc, - /// Callback argument to be passed to pfnProgress. - pub pProgressArg: *mut libc::c_void, - /// Type of spatial point transformer function - pub pfnTransformer: GDALTransformerFunc, - /// Handle to image transformer setup structure - pub pTransformerArg: *mut libc::c_void, - /// Unused. Must be NULL - pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, - /// Unused. Must be NULL - pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, - /// Unused. Must be NULL - pub pfnSrcValidityMaskFunc: GDALMaskFunc, - /// Unused. Must be NULL - pub pSrcValidityMaskFuncArg: *mut libc::c_void, - /// Unused. Must be NULL - pub pfnSrcDensityMaskFunc: GDALMaskFunc, - /// Unused. Must be NULL - pub pSrcDensityMaskFuncArg: *mut libc::c_void, - /// Unused. Must be NULL - pub pfnDstDensityMaskFunc: GDALMaskFunc, - /// Unused. Must be NULL - pub pDstDensityMaskFuncArg: *mut libc::c_void, - /// Unused. Must be NULL - pub pfnDstValidityMaskFunc: GDALMaskFunc, - /// Unused. Must be NULL - pub pDstValidityMaskFuncArg: *mut libc::c_void, - /// Unused. Must be NULL - pub pfnPreWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - /// Unused. Must be NULL - pub pPreWarpProcessorArg: *mut libc::c_void, - /// Unused. Must be NULL - pub pfnPostWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - /// Unused. Must be NULL - pub pPostWarpProcessorArg: *mut libc::c_void, - /// Optional OGRPolygonH for a masking cutline. - pub hCutline: *mut libc::c_void, - /// Optional blending distance to apply across cutline in pixels, default is zero. - pub dfCutlineBlendDist: f64, -} -#[test] -fn bindgen_test_layout_GDALWarpOptions() { - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papszWarpOptions) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfWarpMemoryLimit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eWorkingDataType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hSrcDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hDstDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nBandCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panSrcBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panDstBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nSrcAlphaBand) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nDstAlphaBand) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataImag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataImag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pProgressArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnTransformer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pTransformerArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ - as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papfnSrcPerBandValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ - as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papSrcPerBandValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ - as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPreWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPreWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ - as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPostWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPostWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hCutline) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfCutlineBlendDist) - ) - ); -} -extern "C" { - pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; -} -extern "C" { - pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); -} -extern "C" { - pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; -} -extern "C" { - pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; -} -extern "C" { - - pub fn GDALReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALCreateAndReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstFilename: *const libc::c_char, - pszDstWKT: *const libc::c_char, - hDstDriver: GDALDriverH, - papszCreateOptions: *mut *mut libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; -} -extern "C" { - - pub fn GDALAutoCreateWarpedVRT( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfMaxError: f64, - psOptions: *const GDALWarpOptions, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALCreateWarpedVRT( - hSrcDS: GDALDatasetH, - nPixels: libc::c_int, - nLines: libc::c_int, - padfGeoTransform: *mut f64, - psOptions: *mut GDALWarpOptions, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; -} -/// Opaque type representing a GDALWarpOperation object -pub type GDALWarpOperationH = *mut libc::c_void; -extern "C" { - pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; -} -extern "C" { - pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); -} -extern "C" { - pub fn GDALChunkAndWarpImage( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALChunkAndWarpMulti( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpRegion( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALWarpRegionToBuffer( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_void, - arg7: GDALDataType::Type, - arg8: libc::c_int, - arg9: libc::c_int, - arg10: libc::c_int, - arg11: libc::c_int, - ) -> CPLErr::Type; -} -pub mod OGRAxisOrientation { - /// Axis orientations (corresponds to CS_AxisOrientationEnum). - pub type Type = u32; - /// < Other - pub const OAO_Other: Type = 0; - /// < North - pub const OAO_North: Type = 1; - /// < South - pub const OAO_South: Type = 2; - /// < East - pub const OAO_East: Type = 3; - /// < West - pub const OAO_West: Type = 4; - /// < Up (to space) - pub const OAO_Up: Type = 5; - /// < Down (to Earth center) - pub const OAO_Down: Type = 6; -} -extern "C" { - pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); -} -extern "C" { - pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRRelease(arg1: OGRSpatialReferenceH); -} -extern "C" { - pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRFixupOrdering(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRFixup(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRStripCTParms(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromProj4( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromESRI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromPCI( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromUSGS( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: *mut f64, - arg5: libc::c_long, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromDict( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromPanorama( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: libc::c_long, - arg5: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromOzi( - arg1: OGRSpatialReferenceH, - arg2: *const *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromERM( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) - -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPrettyWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToProj4( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPCI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *mut *mut libc::c_char, - arg4: *mut *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToUSGS( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut *mut f64, - arg5: *mut libc::c_long, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToXML( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToPanorama( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut libc::c_long, - arg5: *mut libc::c_long, - arg6: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToERM( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_char, - arg3: *mut libc::c_char, - arg4: *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetAttrValue( - hSRS: OGRSpatialReferenceH, - pszNodePath: *const libc::c_char, - pszNewNodeValue: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAttrValue( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - iChild: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetAngularUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRSetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetLinearUnitsAndUpdateParameters( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRGetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> f64; -} -extern "C" { - pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetWellKnownGeogCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetFromUserInput( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRCopyGeogCSFrom( - hSRS: OGRSpatialReferenceH, - hSrcSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: f64, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - arg6: f64, - arg7: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: *mut f64, - arg2: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetCompoundCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - hHorizSRS: OGRSpatialReferenceH, - hVertSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetGeogCS( - hSRS: OGRSpatialReferenceH, - pszGeogName: *const libc::c_char, - pszDatumName: *const libc::c_char, - pszEllipsoidName: *const libc::c_char, - dfSemiMajor: f64, - dfInvFlattening: f64, - pszPMName: *const libc::c_char, - dfPMOffset: f64, - pszUnits: *const libc::c_char, - dfConvertToRadians: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetVertCS( - hSRS: OGRSpatialReferenceH, - pszVertCSName: *const libc::c_char, - pszVertDatumName: *const libc::c_char, - nVertDatumType: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; -} -extern "C" { - pub fn OSRSetAuthority( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszAuthority: *const libc::c_char, - nCode: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAuthorityCode( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRGetAuthorityName( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; -} -extern "C" { - pub fn OSRSetNormProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetNormProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; -} -extern "C" { - pub fn OSRSetUTM( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNorth: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OSRSetStatePlane( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetStatePlaneWithUnits( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - pszOverrideUnitName: *const libc::c_char, - dfOverrideUnit: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; -} -extern "C" { - pub fn OSRGetAxis( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - iAxis: libc::c_int, - peOrientation: *mut OGRAxisOrientation::Type, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetAxes( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszXAxisName: *const libc::c_char, - eXAxisOrientation: OGRAxisOrientation::Type, - pszYAxisName: *const libc::c_char, - eYAxisOrientation: OGRAxisOrientation::Type, - ) -> OGRErr::Type; -} -extern "C" { - /// Albers Conic Equal Area - pub fn OSRSetACEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Azimuthal Equidistant - pub fn OSRSetAE( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Bonne - pub fn OSRSetBonne( - hSRS: OGRSpatialReferenceH, - dfStandardParallel: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Cylindrical Equal Area - pub fn OSRSetCEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Cassini-Soldner - pub fn OSRSetCS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equidistant Conic - pub fn OSRSetEC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert I-VI - pub fn OSRSetEckert( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert IV - pub fn OSRSetEckertIV( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Eckert VI - pub fn OSRSetEckertVI( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equirectangular - pub fn OSRSetEquirectangular( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Equirectangular generalized form - pub fn OSRSetEquirectangular2( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfPseudoStdParallel1: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gall Stereograpic - pub fn OSRSetGS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Goode Homolosine - pub fn OSRSetGH( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Interrupted Goode Homolosine - pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - /// GEOS - Geostationary Satellite View - pub fn OSRSetGEOS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfSatelliteHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gauss Schreiber Transverse Mercator - pub fn OSRSetGaussSchreiberTMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Gnomonic - pub fn OSRSetGnomonic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Oblique Mercator (aka HOM (variant B) - pub fn OSRSetOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Hotine Oblique Mercator using azimuth angle - pub fn OSRSetHOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetHOMAC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Hotine Oblique Mercator using two points on centerline - pub fn OSRSetHOM2PNO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// International Map of the World Polyconic - pub fn OSRSetIWMPolyconic( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLat2: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Krovak Oblique Conic Conformal - pub fn OSRSetKrovak( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfPseudoStdParallelLat: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Azimuthal Equal-Area - pub fn OSRSetLAEA( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic - pub fn OSRSetLCC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic 1SP - pub fn OSRSetLCC1SP( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Lambert Conformal Conic (Belgium) - pub fn OSRSetLCCB( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Miller Cylindrical - pub fn OSRSetMC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Mercator - pub fn OSRSetMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Mercator 2SP - pub fn OSRSetMercator2SP( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Mollweide - pub fn OSRSetMollweide( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// New Zealand Map Grid - pub fn OSRSetNZMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Oblique Stereographic - pub fn OSRSetOS( - hSRS: OGRSpatialReferenceH, - dfOriginLat: f64, - dfCMeridian: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Orthographic - pub fn OSRSetOrthographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Polyconic - pub fn OSRSetPolyconic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Polar Stereographic - pub fn OSRSetPS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Robinson - pub fn OSRSetRobinson( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Sinusoidal - pub fn OSRSetSinusoidal( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Stereographic - pub fn OSRSetStereographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Swiss Oblique Cylindrical - pub fn OSRSetSOC( - hSRS: OGRSpatialReferenceH, - dfLatitudeOfOrigin: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator - /// - /// Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 : - /// see OGRSpatialReference::exportToProj4(). - pub fn OSRSetTM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator variant - pub fn OSRSetTMVariant( - hSRS: OGRSpatialReferenceH, - pszVariantName: *const libc::c_char, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Tunesia Mining Grid - pub fn OSRSetTMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Transverse Mercator (South Oriented) - pub fn OSRSetTMSO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// TPED (Two Point Equi Distant) - pub fn OSRSetTPED( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// VanDerGrinten - pub fn OSRSetVDG( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Wagner I -- VII - pub fn OSRSetWagner( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCenterLat: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Quadrilateralized Spherical Cube - pub fn OSRSetQSC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - ) -> OGRErr::Type; -} -extern "C" { - /// Spherical, Cross-track, Height - pub fn OSRSetSCH( - hSRS: OGRSpatialReferenceH, - dfPegLat: f64, - dfPegLong: f64, - dfPegHeading: f64, - dfPegHgt: f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; -} -extern "C" { - pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; -} -extern "C" { - pub fn OSRCleanup(); -} -extern "C" { - pub fn OCTNewCoordinateTransformation( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - ) -> OGRCoordinateTransformationH; -} -extern "C" { - pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); -} -extern "C" { - pub fn OCTTransform( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn OCTTransformEx( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - /// @cond Doxygen_Suppress - pub fn OCTProj4Normalize(pszProj4Src: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn OCTCleanupProjMutex(); -} -pub mod OGRErr { - /// Type for a OGR error - /// - ///
- pub type Type = u32; - /// Success - /// - ///
- pub const OGRERR_NONE: Type = 0; - /// Not enough data to deserialize - /// - ///
- pub const OGRERR_NOT_ENOUGH_DATA: Type = 1; - /// Not enough memory - /// - ///
- pub const OGRERR_NOT_ENOUGH_MEMORY: Type = 2; - /// Unsupported geometry type - /// - ///
- pub const OGRERR_UNSUPPORTED_GEOMETRY_TYPE: Type = 3; - /// Unsupported operation - /// - ///
- pub const OGRERR_UNSUPPORTED_OPERATION: Type = 4; - /// Corrupt data - /// - ///
- pub const OGRERR_CORRUPT_DATA: Type = 5; - /// Failure - /// - ///
- pub const OGRERR_FAILURE: Type = 6; - /// Unsupported SRS - /// - ///
- pub const OGRERR_UNSUPPORTED_SRS: Type = 7; - /// Invalid handle - /// - ///
- pub const INVALID_HANDLE: Type = 8; - /// Non existing feature. Added in GDAL 2.0 - /// - ///
- pub const NON_EXISTING_FEATURE: Type = 9; -} -pub type __builtin_va_list = [__va_list_tag; 1usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __va_list_tag { - pub gp_offset: libc::c_uint, - pub fp_offset: libc::c_uint, - pub overflow_arg_area: *mut libc::c_void, - pub reg_save_area: *mut libc::c_void, -} -#[test] -fn bindgen_test_layout___va_list_tag() { - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} diff --git a/gdal-sys/prebuilt-bindings/gdal_2.4.rs b/gdal-sys/prebuilt-bindings/gdal_2.4.rs index 3937130a..cb807a33 100644 --- a/gdal-sys/prebuilt-bindings/gdal_2.4.rs +++ b/gdal-sys/prebuilt-bindings/gdal_2.4.rs @@ -1,6 +1,5 @@ -/* automatically generated by rust-bindgen */ +/* automatically generated by rust-bindgen 0.59.1 */ -pub type va_list = __builtin_va_list; pub type __dev_t = libc::c_ulong; pub type __uid_t = libc::c_uint; pub type __gid_t = libc::c_uint; @@ -14,22 +13,58 @@ pub type __blksize_t = libc::c_long; pub type __blkcnt_t = libc::c_long; pub type __syscall_slong_t = libc::c_long; pub type FILE = _IO_FILE; +pub type va_list = __builtin_va_list; +pub type _IO_lock_t = libc::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _IO_marker { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_codecvt { - _unused: [u8; 0], + pub _next: *mut _IO_marker, + pub _sbuf: *mut _IO_FILE, + pub _pos: libc::c_int, } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_wide_data { - _unused: [u8; 0], +#[test] +fn bindgen_test_layout__IO_marker() { + assert_eq!( + ::std::mem::size_of::<_IO_marker>(), + 24usize, + concat!("Size of: ", stringify!(_IO_marker)) + ); + assert_eq!( + ::std::mem::align_of::<_IO_marker>(), + 8usize, + concat!("Alignment of ", stringify!(_IO_marker)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_marker>()))._next as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_IO_marker), + "::", + stringify!(_next) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_marker>()))._sbuf as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_IO_marker), + "::", + stringify!(_sbuf) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_marker>()))._pos as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_IO_marker), + "::", + stringify!(_pos) + ) + ); } -pub type _IO_lock_t = libc::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _IO_FILE { @@ -55,10 +90,10 @@ pub struct _IO_FILE { pub _shortbuf: [libc::c_char; 1usize], pub _lock: *mut _IO_lock_t, pub _offset: __off64_t, - pub _codecvt: *mut _IO_codecvt, - pub _wide_data: *mut _IO_wide_data, - pub _freeres_list: *mut _IO_FILE, - pub _freeres_buf: *mut libc::c_void, + pub __pad1: *mut libc::c_void, + pub __pad2: *mut libc::c_void, + pub __pad3: *mut libc::c_void, + pub __pad4: *mut libc::c_void, pub __pad5: usize, pub _mode: libc::c_int, pub _unused2: [libc::c_char; 20usize], @@ -296,43 +331,43 @@ fn bindgen_test_layout__IO_FILE() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._codecvt as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad1 as *const _ as usize }, 152usize, concat!( "Offset of field: ", stringify!(_IO_FILE), "::", - stringify!(_codecvt) + stringify!(__pad1) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._wide_data as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad2 as *const _ as usize }, 160usize, concat!( "Offset of field: ", stringify!(_IO_FILE), "::", - stringify!(_wide_data) + stringify!(__pad2) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_list as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad3 as *const _ as usize }, 168usize, concat!( "Offset of field: ", stringify!(_IO_FILE), "::", - stringify!(_freeres_list) + stringify!(__pad3) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_buf as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad4 as *const _ as usize }, 176usize, concat!( "Offset of field: ", stringify!(_IO_FILE), "::", - stringify!(_freeres_buf) + stringify!(__pad4) ) ); assert_eq!( @@ -366,6 +401,7 @@ fn bindgen_test_layout__IO_FILE() { ) ); } +pub type wchar_t = libc::c_int; pub type time_t = __time_t; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -561,6 +597,53 @@ pub type GUIntBig = libc::c_ulonglong; #[doc = " Type of a constant null-terminated list of nul terminated strings."] #[doc = " Seen as char** from C and const char* const* from C++"] pub type CSLConstList = *mut *mut libc::c_char; +extern "C" { + #[doc = " Add a value to a pointed integer in a thread and SMP-safe way"] + #[doc = " and return the resulting value of the operation."] + #[doc = ""] + #[doc = " This function, which in most cases is implemented by a few"] + #[doc = " efficient machine instructions, guarantees that the value pointed"] + #[doc = " by ptr will be incremented in a thread and SMP-safe way."] + #[doc = " The variables for this function must be aligned on a 32-bit boundary."] + #[doc = ""] + #[doc = " Depending on the platforms, this function can also act as a"] + #[doc = " memory barrier, but this should not be assumed."] + #[doc = ""] + #[doc = " Current platforms/architectures where an efficient implementation"] + #[doc = " exists are MacOSX, MS Windows, i386/x86_64 with GCC and platforms"] + #[doc = " supported by GCC 4.1 or higher. For other platforms supporting"] + #[doc = " the pthread library, and when GDAL is configured with thread-support,"] + #[doc = " the atomicity will be done with a mutex, but with"] + #[doc = " reduced efficiency. For the remaining platforms, a simple addition"] + #[doc = " with no locking will be done..."] + #[doc = ""] + #[doc = " @param ptr a pointer to an integer to increment"] + #[doc = " @param increment the amount to add to the pointed integer"] + #[doc = " @return the pointed value AFTER the result of the addition"] + pub fn CPLAtomicAdd(ptr: *mut libc::c_int, increment: libc::c_int) -> libc::c_int; +} +extern "C" { + #[doc = " Compares *ptr with oldval. If *ptr == oldval, then *ptr is assigned"] + #[doc = " newval and TRUE is returned. Otherwise nothing is done, and FALSE is returned."] + #[doc = ""] + #[doc = " Current platforms/architectures where an efficient implementation"] + #[doc = " exists are MacOSX, MS Windows, i386/x86_64 with GCC and platforms"] + #[doc = " supported by GCC 4.1 or higher. For other platforms supporting"] + #[doc = " the pthread library, and when GDAL is configured with thread-support,"] + #[doc = " the atomicity will be done with a mutex, but with"] + #[doc = " reduced efficiency. For the remaining platforms, a simple compare and"] + #[doc = " exchange with no locking will be done..."] + #[doc = ""] + #[doc = " @param ptr a pointer to an integer (aligned on 32bit boundary)."] + #[doc = " @param oldval old value"] + #[doc = " @param newval new value"] + #[doc = " @return TRUE if the exchange has been done"] + pub fn CPLAtomicCompareAndExchange( + ptr: *mut libc::c_int, + oldval: libc::c_int, + newval: libc::c_int, + ) -> libc::c_int; +} pub type GDALProgressFunc = ::std::option::Option< unsafe extern "C" fn( dfComplete: f64, @@ -906,7 +989,7 @@ extern "C" { } pub mod VSIRangeStatus { #[doc = " Range status"] - pub type Type = u32; + pub type Type = libc::c_uint; #[doc = "< Unknown"] pub const VSI_RANGE_STATUS_UNKNOWN: Type = 0; #[doc = "< Data present"] @@ -1388,7 +1471,7 @@ extern "C" { } pub mod CPLErr { #[doc = " Error category"] - pub type Type = u32; + pub type Type = libc::c_uint; pub const CE_None: Type = 0; pub const CE_Debug: Type = 1; pub const CE_Warning: Type = 2; @@ -2007,8094 +2090,9037 @@ extern "C" { #[doc = "@return TRUE if i is power of two otherwise return FALSE"] pub fn CPLIsPowerOfTwo(i: libc::c_uint) -> libc::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLVirtualMem { - _unused: [u8; 0], -} -#[doc = " Callback triggered when a still unmapped page of virtual memory is accessed."] -#[doc = " The callback has the responsibility of filling the page with relevant values"] -#[doc = ""] -#[doc = " @param ctxt virtual memory handle."] -#[doc = " @param nOffset offset of the page in the memory mapping."] -#[doc = " @param pPageToFill address of the page to fill. Note that the address might"] -#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] -#[doc = " @param nToFill number of bytes of the page."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToFill: *mut libc::c_void, - nToFill: usize, - pUserData: *mut libc::c_void, - ), ->; -#[doc = " Callback triggered when a dirty mapped page is going to be freed."] -#[doc = " (saturation of cache, or termination of the virtual memory mapping)."] -#[doc = ""] -#[doc = " @param ctxt virtual memory handle."] -#[doc = " @param nOffset offset of the page in the memory mapping."] -#[doc = " @param pPageToBeEvicted address of the page that will be flushed. Note that the address might"] -#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] -#[doc = " @param nToBeEvicted number of bytes of the page."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToBeEvicted: *const libc::c_void, - nToBeEvicted: usize, - pUserData: *mut libc::c_void, - ), ->; -#[doc = " Callback triggered when a virtual memory mapping is destroyed."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemFreeUserData = - ::std::option::Option; -pub mod CPLVirtualMemAccessMode { - #[doc = " Access mode of a virtual memory mapping."] - pub type Type = u32; - #[doc = " The mapping is meant at being read-only, but writes will not be prevented."] - #[doc = "Note that any content written will be lost."] - pub const VIRTUALMEM_READONLY: Type = 0; - #[doc = " The mapping is meant at being read-only, and this will be enforced"] - #[doc = "through the operating system page protection mechanism."] - pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; - #[doc = " The mapping is meant at being read-write, and modified pages can be saved"] - #[doc = "thanks to the pfnUnCachePage callback"] - pub const VIRTUALMEM_READWRITE: Type = 2; -} -extern "C" { - #[doc = " Return the size of a page of virtual memory."] - #[doc = ""] - #[doc = " @return the page size."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLGetPageSize() -> usize; -} extern "C" { - #[doc = " Create a new virtual memory mapping."] - #[doc = ""] - #[doc = " This will reserve an area of virtual memory of size nSize, whose size"] - #[doc = " might be potentially much larger than the physical memory available. Initially,"] - #[doc = " no physical memory will be allocated. As soon as memory pages will be accessed,"] - #[doc = " they will be allocated transparently and filled with the pfnCachePage callback."] - #[doc = " When the allowed cache size is reached, the least recently used pages will"] - #[doc = " be unallocated."] + #[doc = " \\file cpl_string.h"] #[doc = ""] - #[doc = " On Linux AMD64 platforms, the maximum value for nSize is 128 TB."] - #[doc = " On Linux x86 platforms, the maximum value for nSize is 2 GB."] - #[doc = ""] - #[doc = " Only supported on Linux for now."] + #[doc = " Various convenience functions for working with strings and string lists."] #[doc = ""] - #[doc = " Note that on Linux, this function will install a SIGSEGV handler. The"] - #[doc = " original handler will be restored by CPLVirtualMemManagerTerminate()."] + #[doc = " A StringList is just an array of strings with the last pointer being"] + #[doc = " NULL. An empty StringList may be either a NULL pointer, or a pointer to"] + #[doc = " a pointer memory location with a NULL value."] #[doc = ""] - #[doc = " @param nSize size in bytes of the virtual memory mapping."] - #[doc = " @param nCacheSize size in bytes of the maximum memory that will be really"] - #[doc = " allocated (must ideally fit into RAM)."] - #[doc = " @param nPageSizeHint hint for the page size. Must be a multiple of the"] - #[doc = " system page size, returned by CPLGetPageSize()."] - #[doc = " Minimum value is generally 4096. Might be set to 0 to"] - #[doc = " let the function determine a default page size."] - #[doc = " @param bSingleThreadUsage set to TRUE if there will be no concurrent threads"] - #[doc = " that will access the virtual memory mapping. This can"] - #[doc = " optimize performance a bit."] - #[doc = " @param eAccessMode permission to use for the virtual memory mapping."] - #[doc = " @param pfnCachePage callback triggered when a still unmapped page of virtual"] - #[doc = " memory is accessed. The callback has the responsibility"] - #[doc = " of filling the page with relevant values."] - #[doc = " @param pfnUnCachePage callback triggered when a dirty mapped page is going to"] - #[doc = " be freed (saturation of cache, or termination of the"] - #[doc = " virtual memory mapping). Might be NULL."] - #[doc = " @param pfnFreeUserData callback that can be used to free pCbkUserData. Might be"] - #[doc = " NULL"] - #[doc = " @param pCbkUserData user data passed to pfnCachePage and pfnUnCachePage."] + #[doc = " A common convention for StringLists is to use them to store name/value"] + #[doc = " lists. In this case the contents are treated like a dictionary of"] + #[doc = " name/value pairs. The actual data is formatted with each string having"] + #[doc = " the format \":\" (though \"=\" is also an acceptable separator)."] + #[doc = " A number of the functions in the file operate on name/value style"] + #[doc = " string lists (such as CSLSetNameValue(), and CSLFetchNameValue())."] #[doc = ""] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] + #[doc = " To some extent the CPLStringList C++ class can be used to abstract"] + #[doc = " managing string lists a bit but still be able to return them from C"] + #[doc = " functions."] #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemNew( - nSize: usize, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnCachePage: CPLVirtualMemCachePageCbk, - pfnUnCachePage: CPLVirtualMemUnCachePageCbk, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLAddString( + papszStrList: *mut *mut libc::c_char, + pszNewString: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return if virtual memory mapping of a file is available."] - #[doc = ""] - #[doc = " @return TRUE if virtual memory mapping of a file is available."] - #[doc = " @since GDAL 1.11"] - pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; + pub fn CSLAddStringMayFail( + papszStrList: *mut *mut libc::c_char, + pszNewString: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Create a new virtual memory mapping from a file."] - #[doc = ""] - #[doc = " The file must be a \"real\" file recognized by the operating system, and not"] - #[doc = " a VSI extended virtual file."] - #[doc = ""] - #[doc = " In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written"] - #[doc = " in the file."] - #[doc = ""] - #[doc = " On Linux AMD64 platforms, the maximum value for nLength is 128 TB."] - #[doc = " On Linux x86 platforms, the maximum value for nLength is 2 GB."] - #[doc = ""] - #[doc = " Supported on Linux only in GDAL <= 2.0, and all POSIX systems supporting"] - #[doc = " mmap() in GDAL >= 2.1"] - #[doc = ""] - #[doc = " @param fp Virtual file handle."] - #[doc = " @param nOffset Offset in the file to start the mapping from."] - #[doc = " @param nLength Length of the portion of the file to map into memory."] - #[doc = " @param eAccessMode Permission to use for the virtual memory mapping. This must"] - #[doc = " be consistent with how the file has been opened."] - #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] - #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemFileMapNew( - fp: *mut VSILFILE, - nOffset: vsi_l_offset, - nLength: vsi_l_offset, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLCount(papszStrList: CSLConstList) -> libc::c_int; } extern "C" { - #[doc = " Create a new virtual memory mapping derived from an other virtual memory"] - #[doc = " mapping."] - #[doc = ""] - #[doc = " This may be useful in case of creating mapping for pixel interleaved data."] - #[doc = ""] - #[doc = " The new mapping takes a reference on the base mapping."] - #[doc = ""] - #[doc = " @param pVMemBase Base virtual memory mapping"] - #[doc = " @param nOffset Offset in the base virtual memory mapping from which to start"] - #[doc = " the new mapping."] - #[doc = " @param nSize Size of the base virtual memory mapping to expose in the"] - #[doc = " the new mapping."] - #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] - #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemDerivedNew( - pVMemBase: *mut CPLVirtualMem, - nOffset: vsi_l_offset, - nSize: vsi_l_offset, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLGetField(arg1: CSLConstList, arg2: libc::c_int) -> *const libc::c_char; } extern "C" { - #[doc = " Free a virtual memory mapping."] - #[doc = ""] - #[doc = " The pointer returned by CPLVirtualMemGetAddr() will no longer be valid."] - #[doc = " If the virtual memory mapping was created with read/write permissions and that"] - #[doc = " they are dirty (i.e. modified) pages, they will be flushed through the"] - #[doc = " pfnUnCachePage callback before being freed."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); + pub fn CSLDestroy(papszStrList: *mut *mut libc::c_char); } extern "C" { - #[doc = " Return the pointer to the start of a virtual memory mapping."] - #[doc = ""] - #[doc = " The bytes in the range [p:p+CPLVirtualMemGetSize()-1] where p is the pointer"] - #[doc = " returned by this function will be valid, until CPLVirtualMemFree() is called."] - #[doc = ""] - #[doc = " Note that if a range of bytes used as an argument of a system call"] - #[doc = " (such as read() or write()) contains pages that have not been \"realized\", the"] - #[doc = " system call will fail with EFAULT. CPLVirtualMemPin() can be used to work"] - #[doc = " around this issue."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the pointer to the start of a virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; + pub fn CSLDuplicate(papszStrList: CSLConstList) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return the size of the virtual memory mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the size of the virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; + pub fn CSLMerge( + papszOrig: *mut *mut libc::c_char, + papszOverride: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return if the virtual memory mapping is a direct file mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return TRUE if the virtual memory mapping is a direct file mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; + pub fn CSLTokenizeString(pszString: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return the access mode of the virtual memory mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the access mode of the virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; + pub fn CSLTokenizeStringComplex( + pszString: *const libc::c_char, + pszDelimiter: *const libc::c_char, + bHonourStrings: libc::c_int, + bAllowEmptyTokens: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return the page size associated to a virtual memory mapping."] - #[doc = ""] - #[doc = " The value returned will be at least CPLGetPageSize(), but potentially"] - #[doc = " larger."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the page size"] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; + pub fn CSLTokenizeString2( + pszString: *const libc::c_char, + pszDelimiter: *const libc::c_char, + nCSLTFlags: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return TRUE if this memory mapping can be accessed safely from concurrent"] - #[doc = " threads."] - #[doc = ""] - #[doc = " The situation that can cause problems is when several threads try to access"] - #[doc = " a page of the mapping that is not yet mapped."] - #[doc = ""] - #[doc = " The return value of this function depends on whether bSingleThreadUsage has"] - #[doc = " been set of not in CPLVirtualMemNew() and/or the implementation."] - #[doc = ""] - #[doc = " On Linux, this will always return TRUE if bSingleThreadUsage = FALSE."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return TRUE if this memory mapping can be accessed safely from concurrent"] - #[doc = " threads."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; + pub fn CSLPrint(papszStrList: CSLConstList, fpOut: *mut FILE) -> libc::c_int; } extern "C" { - #[doc = " Declare that a thread will access a virtual memory mapping."] - #[doc = ""] - #[doc = " This function must be called by a thread that wants to access the"] - #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] - #[doc = " been created with bSingleThreadUsage = TRUE."] - #[doc = ""] - #[doc = " This function must be paired with CPLVirtualMemUnDeclareThread()."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); + pub fn CSLLoad(pszFname: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Declare that a thread will stop accessing a virtual memory mapping."] - #[doc = ""] - #[doc = " This function must be called by a thread that will no longer access the"] - #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] - #[doc = " been created with bSingleThreadUsage = TRUE."] - #[doc = ""] - #[doc = " This function must be paired with CPLVirtualMemDeclareThread()."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); + pub fn CSLLoad2( + pszFname: *const libc::c_char, + nMaxLines: libc::c_int, + nMaxCols: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Make sure that a region of virtual memory will be realized."] - #[doc = ""] - #[doc = " Calling this function is not required, but might be useful when debugging"] - #[doc = " a process with tools like gdb or valgrind that do not naturally like"] - #[doc = " segmentation fault signals."] - #[doc = ""] - #[doc = " It is also needed when wanting to provide part of virtual memory mapping"] - #[doc = " to a system call such as read() or write(). If read() or write() is called"] - #[doc = " on a memory region not yet realized, the call will fail with EFAULT."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @param pAddr the memory region to pin."] - #[doc = " @param nSize the size of the memory region."] - #[doc = " @param bWriteOp set to TRUE if the memory are will be accessed in write mode."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemPin( - ctxt: *mut CPLVirtualMem, - pAddr: *mut libc::c_void, - nSize: usize, - bWriteOp: libc::c_int, - ); + pub fn CSLSave(papszStrList: CSLConstList, pszFname: *const libc::c_char) -> libc::c_int; } extern "C" { - #[doc = " Cleanup any resource and handlers related to virtual memory."] - #[doc = ""] - #[doc = " This function must be called after the last CPLVirtualMem object has"] - #[doc = " been freed."] - #[doc = ""] - #[doc = " @since GDAL 2.0"] - pub fn CPLVirtualMemManagerTerminate(); -} -pub mod CPLXMLNodeType { - #[doc = " XML node type"] - pub type Type = u32; - #[doc = " Node is an element"] - pub const CXT_Element: Type = 0; - #[doc = " Node is a raw text value"] - pub const CXT_Text: Type = 1; - #[doc = " Node is attribute"] - pub const CXT_Attribute: Type = 2; - #[doc = " Node is an XML comment."] - pub const CXT_Comment: Type = 3; - #[doc = " Node is a special literal"] - pub const CXT_Literal: Type = 4; -} -#[doc = " Document node structure."] -#[doc = ""] -#[doc = " This C structure is used to hold a single text fragment representing a"] -#[doc = " component of the document when parsed. It should be allocated with the"] -#[doc = " appropriate CPL function, and freed with CPLDestroyXMLNode(). The structure"] -#[doc = " contents should not normally be altered by application code, but may be"] -#[doc = " freely examined by application code."] -#[doc = ""] -#[doc = " Using the psChild and psNext pointers, a hierarchical tree structure"] -#[doc = " for a document can be represented as a tree of CPLXMLNode structures."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLXMLNode { - #[doc = " \\brief Node type"] - #[doc = ""] - #[doc = " One of CXT_Element, CXT_Text, CXT_Attribute, CXT_Comment,"] - #[doc = " or CXT_Literal."] - pub eType: CPLXMLNodeType::Type, - #[doc = " \\brief Node value"] - #[doc = ""] - #[doc = " For CXT_Element this is the name of the element, without the angle"] - #[doc = " brackets. Note there is a single CXT_Element even when the document"] - #[doc = " contains a start and end element tag. The node represents the pair."] - #[doc = " All text or other elements between the start and end tag will appear"] - #[doc = " as children nodes of this CXT_Element node."] - #[doc = ""] - #[doc = " For CXT_Attribute the pszValue is the attribute name. The value of"] - #[doc = " the attribute will be a CXT_Text child."] - #[doc = ""] - #[doc = " For CXT_Text this is the text itself (value of an attribute, or a"] - #[doc = " text fragment between an element start and end tags."] - #[doc = ""] - #[doc = " For CXT_Literal it is all the literal text. Currently this is just"] - #[doc = " used for !DOCTYPE lines, and the value would be the entire line."] - #[doc = ""] - #[doc = " For CXT_Comment the value is all the literal text within the comment,"] - #[doc = " but not including the comment start/end indicators (\"<--\" and \"-->\")."] - pub pszValue: *mut libc::c_char, - #[doc = " \\brief Next sibling."] - #[doc = ""] - #[doc = " Pointer to next sibling, that is the next node appearing after this"] - #[doc = " one that has the same parent as this node. NULL if this node is the"] - #[doc = " last child of the parent element."] - pub psNext: *mut CPLXMLNode, - #[doc = " \\brief Child node."] - #[doc = ""] - #[doc = " Pointer to first child node, if any. Only CXT_Element and CXT_Attribute"] - #[doc = " nodes should have children. For CXT_Attribute it should be a single"] - #[doc = " CXT_Text value node, while CXT_Element can have any kind of child."] - #[doc = " The full list of children for a node are identified by walking the"] - #[doc = " psNext\'s starting with the psChild node."] - pub psChild: *mut CPLXMLNode, -} -#[test] -fn bindgen_test_layout_CPLXMLNode() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLXMLNode)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLXMLNode)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(eType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(pszValue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psNext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psChild) - ) - ); + pub fn CSLInsertStrings( + papszStrList: *mut *mut libc::c_char, + nInsertAtLineNo: libc::c_int, + papszNewLines: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CSLInsertString( + papszStrList: *mut *mut libc::c_char, + nInsertAtLineNo: libc::c_int, + pszNewLine: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); + pub fn CSLRemoveStrings( + papszStrList: *mut *mut libc::c_char, + nFirstLineToDelete: libc::c_int, + nNumToRemove: libc::c_int, + ppapszRetStrings: *mut *mut *mut libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CSLFindString(papszList: CSLConstList, pszTarget: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLSearchXMLNode( - poRoot: *mut CPLXMLNode, + pub fn CSLFindStringCaseSensitive( + papszList: CSLConstList, pszTarget: *const libc::c_char, - ) -> *mut CPLXMLNode; + ) -> libc::c_int; } extern "C" { - pub fn CPLGetXMLValue( - poRoot: *const CPLXMLNode, - pszPath: *const libc::c_char, - pszDefault: *const libc::c_char, - ) -> *const libc::c_char; + pub fn CSLPartialFindString( + papszHaystack: CSLConstList, + pszNeedle: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn CPLCreateXMLNode( - poParent: *mut CPLXMLNode, - eType: CPLXMLNodeType::Type, - pszText: *const libc::c_char, - ) -> *mut CPLXMLNode; + pub fn CSLFindName(papszStrList: CSLConstList, pszName: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; + pub fn CSLFetchBoolean( + papszStrList: CSLConstList, + pszKey: *const libc::c_char, + bDefault: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); + pub fn CSLTestBoolean(pszValue: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; + pub fn CPLTestBoolean(pszValue: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); + pub fn CPLParseNameValue( + pszNameValue: *const libc::c_char, + ppszKey: *mut *mut libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLCreateXMLElementAndValue( - psParent: *mut CPLXMLNode, + pub fn CSLFetchNameValue( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn CSLFetchNameValueDef( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + pszDefault: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn CSLFetchNameValueMultiple( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn CSLAddNameValue( + papszStrList: *mut *mut libc::c_char, pszName: *const libc::c_char, pszValue: *const libc::c_char, - ) -> *mut CPLXMLNode; + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLAddXMLAttributeAndValue( - psParent: *mut CPLXMLNode, + pub fn CSLSetNameValue( + papszStrList: *mut *mut libc::c_char, pszName: *const libc::c_char, pszValue: *const libc::c_char, + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn CSLSetNameValueSeparator( + papszStrList: *mut *mut libc::c_char, + pszSeparator: *const libc::c_char, ); } extern "C" { - pub fn CPLCloneXMLTree(psTree: *const CPLXMLNode) -> *mut CPLXMLNode; + pub fn CSLParseCommandLine(pszCommandLine: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLSetXMLValue( - psRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszValue: *const libc::c_char, + pub fn CPLEscapeString( + pszString: *const libc::c_char, + nLength: libc::c_int, + nScheme: libc::c_int, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLUnescapeString( + pszString: *const libc::c_char, + pnLength: *mut libc::c_int, + nScheme: libc::c_int, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLBinaryToHex(nBytes: libc::c_int, pabyData: *const GByte) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLHexToBinary(pszHex: *const libc::c_char, pnBytes: *mut libc::c_int) -> *mut GByte; +} +extern "C" { + pub fn CPLBase64Encode(nBytes: libc::c_int, pabyData: *const GByte) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLBase64DecodeInPlace(pszBase64: *mut GByte) -> libc::c_int; +} +pub mod CPLValueType { + #[doc = " Type of value"] + pub type Type = libc::c_uint; + #[doc = "< String"] + pub const CPL_VALUE_STRING: Type = 0; + #[doc = "< Real number"] + pub const CPL_VALUE_REAL: Type = 1; + #[doc = "< Integer"] + pub const CPL_VALUE_INTEGER: Type = 2; +} +extern "C" { + pub fn CPLGetValueType(pszValue: *const libc::c_char) -> CPLValueType::Type; +} +extern "C" { + pub fn CPLStrlcpy( + pszDest: *mut libc::c_char, + pszSrc: *const libc::c_char, + nDestSize: usize, + ) -> usize; +} +extern "C" { + pub fn CPLStrlcat( + pszDest: *mut libc::c_char, + pszSrc: *const libc::c_char, + nDestSize: usize, + ) -> usize; +} +extern "C" { + pub fn CPLStrnlen(pszStr: *const libc::c_char, nMaxLen: usize) -> usize; +} +extern "C" { + pub fn CPLvsnprintf( + str_: *mut libc::c_char, + size: usize, + fmt: *const libc::c_char, + args: *mut __va_list_tag, ) -> libc::c_int; } extern "C" { - pub fn CPLStripXMLNamespace( - psRoot: *mut CPLXMLNode, - pszNameSpace: *const libc::c_char, - bRecurse: libc::c_int, - ); + pub fn CPLsnprintf( + str_: *mut libc::c_char, + size: usize, + fmt: *const libc::c_char, + ... + ) -> libc::c_int; } extern "C" { - pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); + pub fn CPLsprintf(str_: *mut libc::c_char, fmt: *const libc::c_char, ...) -> libc::c_int; } extern "C" { - pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; + #[doc = " @endcond"] + pub fn CPLprintf(fmt: *const libc::c_char, ...) -> libc::c_int; } extern "C" { - pub fn CPLSerializeXMLTreeToFile( - psTree: *const CPLXMLNode, - pszFilename: *const libc::c_char, + #[doc = " @cond Doxygen_Suppress"] + pub fn CPLsscanf(str_: *const libc::c_char, fmt: *const libc::c_char, ...) -> libc::c_int; +} +extern "C" { + #[doc = " @endcond"] + pub fn CPLSPrintf(fmt: *const libc::c_char, ...) -> *const libc::c_char; +} +extern "C" { + pub fn CSLAppendPrintf( + papszStrList: *mut *mut libc::c_char, + fmt: *const libc::c_char, + ... + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn CPLVASPrintf( + buf: *mut *mut libc::c_char, + fmt: *const libc::c_char, + args: *mut __va_list_tag, ) -> libc::c_int; } +extern "C" { + pub fn CPLEncodingCharSize(pszEncoding: *const libc::c_char) -> libc::c_int; +} +extern "C" { + #[doc = " @cond Doxygen_Suppress"] + pub fn CPLClearRecodeWarningFlags(); +} +extern "C" { + #[doc = " @endcond"] + pub fn CPLRecode( + pszSource: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLRecodeFromWChar( + pwszSource: *const wchar_t, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLRecodeToWChar( + pszSource: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut wchar_t; +} +extern "C" { + pub fn CPLIsUTF8(pabyData: *const libc::c_char, nLen: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn CPLForceToASCII( + pabyData: *const libc::c_char, + nLen: libc::c_int, + chReplacementChar: libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLStrlenUTF8(pszUTF8Str: *const libc::c_char) -> libc::c_int; +} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGREnvelope { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, +pub struct _CPLHashSet { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_OGREnvelope() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(OGREnvelope)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxY) - ) +#[doc = " Opaque type for a hash set"] +pub type CPLHashSet = _CPLHashSet; +#[doc = " CPLHashSetHashFunc"] +pub type CPLHashSetHashFunc = + ::std::option::Option libc::c_ulong>; +#[doc = " CPLHashSetEqualFunc"] +pub type CPLHashSetEqualFunc = ::std::option::Option< + unsafe extern "C" fn(elt1: *const libc::c_void, elt2: *const libc::c_void) -> libc::c_int, +>; +#[doc = " CPLHashSetFreeEltFunc"] +pub type CPLHashSetFreeEltFunc = + ::std::option::Option; +#[doc = " CPLHashSetIterEltFunc"] +pub type CPLHashSetIterEltFunc = ::std::option::Option< + unsafe extern "C" fn(elt: *mut libc::c_void, user_data: *mut libc::c_void) -> libc::c_int, +>; +extern "C" { + pub fn CPLHashSetNew( + fnHashFunc: CPLHashSetHashFunc, + fnEqualFunc: CPLHashSetEqualFunc, + fnFreeEltFunc: CPLHashSetFreeEltFunc, + ) -> *mut CPLHashSet; +} +extern "C" { + pub fn CPLHashSetDestroy(set: *mut CPLHashSet); +} +extern "C" { + pub fn CPLHashSetClear(set: *mut CPLHashSet); +} +extern "C" { + pub fn CPLHashSetSize(set: *const CPLHashSet) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetForeach( + set: *mut CPLHashSet, + fnIterFunc: CPLHashSetIterEltFunc, + user_data: *mut libc::c_void, ); } +extern "C" { + pub fn CPLHashSetInsert(set: *mut CPLHashSet, elt: *mut libc::c_void) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetLookup(set: *mut CPLHashSet, elt: *const libc::c_void) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLHashSetRemove(set: *mut CPLHashSet, elt: *const libc::c_void) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetRemoveDeferRehash( + set: *mut CPLHashSet, + elt: *const libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetHashPointer(elt: *const libc::c_void) -> libc::c_ulong; +} +extern "C" { + pub fn CPLHashSetEqualPointer( + elt1: *const libc::c_void, + elt2: *const libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetHashStr(pszStr: *const libc::c_void) -> libc::c_ulong; +} +extern "C" { + pub fn CPLHashSetEqualStr( + pszStr1: *const libc::c_void, + pszStr2: *const libc::c_void, + ) -> libc::c_int; +} +#[doc = " List element structure."] +pub type CPLList = _CPLList; +#[doc = " List element structure."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGREnvelope3D { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, - pub MinZ: f64, - pub MaxZ: f64, +pub struct _CPLList { + #[doc = " Pointer to the data object. Should be allocated and freed by the"] + #[doc = " caller."] + pub pData: *mut libc::c_void, + #[doc = " Pointer to the next element in list. NULL, if current element is the"] + #[doc = " last one."] + pub psNext: *mut _CPLList, } #[test] -fn bindgen_test_layout_OGREnvelope3D() { +fn bindgen_test_layout__CPLList() { assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(OGREnvelope3D)) + ::std::mem::size_of::<_CPLList>(), + 16usize, + concat!("Size of: ", stringify!(_CPLList)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::<_CPLList>(), 8usize, - concat!("Alignment of ", stringify!(OGREnvelope3D)) + concat!("Alignment of ", stringify!(_CPLList)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_CPLList>())).pData as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(_CPLList), "::", - stringify!(MinX) + stringify!(pData) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_CPLList>())).psNext as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(_CPLList), "::", - stringify!(MaxZ) + stringify!(psNext) ) ); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; + pub fn CPLListAppend(psList: *mut CPLList, pData: *mut libc::c_void) -> *mut CPLList; } extern "C" { - pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; + pub fn CPLListInsert( + psList: *mut CPLList, + pData: *mut libc::c_void, + nPosition: libc::c_int, + ) -> *mut CPLList; } extern "C" { - pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; + pub fn CPLListGetLast(psList: *mut CPLList) -> *mut CPLList; } extern "C" { - pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; + pub fn CPLListGet(psList: *mut CPLList, nPosition: libc::c_int) -> *mut CPLList; } extern "C" { - pub fn OGRFree(arg1: *mut libc::c_void); -} -pub mod OGRwkbGeometryType { - #[doc = " List of well known binary geometry types. These are used within the BLOBs"] - #[doc = " but are also returned from OGRGeometry::getGeometryType() to identify the"] - #[doc = " type of a geometry object."] - pub type Type = u32; - #[doc = "< unknown type, non-standard"] - pub const wkbUnknown: Type = 0; - #[doc = "< 0-dimensional geometric object, standard WKB"] - pub const wkbPoint: Type = 1; - #[doc = "< 1-dimensional geometric object with linear"] - #[doc = " interpolation between Points, standard WKB"] - pub const wkbLineString: Type = 2; - #[doc = "< planar 2-dimensional geometric object defined"] - #[doc = " by 1 exterior boundary and 0 or more interior"] - #[doc = " boundaries, standard WKB"] - pub const wkbPolygon: Type = 3; - #[doc = "< GeometryCollection of Points, standard WKB"] - pub const wkbMultiPoint: Type = 4; - #[doc = "< GeometryCollection of LineStrings, standard WKB"] - pub const wkbMultiLineString: Type = 5; - #[doc = "< GeometryCollection of Polygons, standard WKB"] - pub const wkbMultiPolygon: Type = 6; - #[doc = "< geometric object that is a collection of 1"] - #[doc = "or more geometric objects, standard WKB"] - pub const wkbGeometryCollection: Type = 7; - #[doc = "< one or more circular arc segments connected end to end,"] - #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCircularString: Type = 8; - #[doc = "< sequence of contiguous curves, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCompoundCurve: Type = 9; - #[doc = "< planar surface, defined by 1 exterior boundary"] - #[doc = " and zero or more interior boundaries, that are curves."] - #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCurvePolygon: Type = 10; - #[doc = "< GeometryCollection of Curves, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiCurve: Type = 11; - #[doc = "< GeometryCollection of Surfaces, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiSurface: Type = 12; - #[doc = "< Curve (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurve: Type = 13; - #[doc = "< Surface (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurface: Type = 14; - #[doc = "< a contiguous collection of polygons, which share common boundary segments,"] - #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurface: Type = 15; - #[doc = "< a PolyhedralSurface consisting only of Triangle patches"] - #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTIN: Type = 16; - #[doc = "< a Triangle. ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangle: Type = 17; - #[doc = "< non-standard, for pure attribute records"] - pub const wkbNone: Type = 100; - #[doc = "< non-standard, just for createGeometry()"] - pub const wkbLinearRing: Type = 101; - #[doc = "< wkbCircularString with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCircularStringZ: Type = 1008; - #[doc = "< wkbCompoundCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCompoundCurveZ: Type = 1009; - #[doc = "< wkbCurvePolygon with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCurvePolygonZ: Type = 1010; - #[doc = "< wkbMultiCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiCurveZ: Type = 1011; - #[doc = "< wkbMultiSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiSurfaceZ: Type = 1012; - #[doc = "< wkbCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveZ: Type = 1013; - #[doc = "< wkbSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceZ: Type = 1014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceZ: Type = 1015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINZ: Type = 1016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleZ: Type = 1017; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPointM: Type = 2001; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbLineStringM: Type = 2002; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPolygonM: Type = 2003; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPointM: Type = 2004; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiLineStringM: Type = 2005; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPolygonM: Type = 2006; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbGeometryCollectionM: Type = 2007; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCircularStringM: Type = 2008; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCompoundCurveM: Type = 2009; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurvePolygonM: Type = 2010; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiCurveM: Type = 2011; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiSurfaceM: Type = 2012; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveM: Type = 2013; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceM: Type = 2014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceM: Type = 2015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINM: Type = 2016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleM: Type = 2017; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPointZM: Type = 3001; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbLineStringZM: Type = 3002; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPolygonZM: Type = 3003; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPointZM: Type = 3004; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiLineStringZM: Type = 3005; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPolygonZM: Type = 3006; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbGeometryCollectionZM: Type = 3007; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCircularStringZM: Type = 3008; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCompoundCurveZM: Type = 3009; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurvePolygonZM: Type = 3010; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiCurveZM: Type = 3011; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiSurfaceZM: Type = 3012; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveZM: Type = 3013; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceZM: Type = 3014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceZM: Type = 3015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINZM: Type = 3016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleZM: Type = 3017; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbPoint25D: Type = 2147483649; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbLineString25D: Type = 2147483650; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbPolygon25D: Type = 2147483651; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiPoint25D: Type = 2147483652; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiLineString25D: Type = 2147483653; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiPolygon25D: Type = 2147483654; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbGeometryCollection25D: Type = 2147483655; -} -extern "C" { - pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGRMergeGeometryTypes( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGRMergeGeometryTypesEx( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - bAllowPromotingToCurves: libc::c_int, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLListCount(psList: *const CPLList) -> libc::c_int; } extern "C" { - pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLListRemove(psList: *mut CPLList, nPosition: libc::c_int) -> *mut CPLList; } extern "C" { - pub fn OGR_GT_SetModifier( - eType: OGRwkbGeometryType::Type, - bSetZ: libc::c_int, - bSetM: libc::c_int, - ) -> OGRwkbGeometryType::Type; + pub fn CPLListDestroy(psList: *mut CPLList); } extern "C" { - pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLListGetNext(psElement: *const CPLList) -> *mut CPLList; } extern "C" { - pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLListGetData(psElement: *const CPLList) -> *mut libc::c_void; } -extern "C" { - pub fn OGR_GT_IsSubClassOf( - eType: OGRwkbGeometryType::Type, - eSuperType: OGRwkbGeometryType::Type, - ) -> libc::c_int; +pub mod CPLXMLNodeType { + #[doc = " XML node type"] + pub type Type = libc::c_uint; + #[doc = " Node is an element"] + pub const CXT_Element: Type = 0; + #[doc = " Node is a raw text value"] + pub const CXT_Text: Type = 1; + #[doc = " Node is attribute"] + pub const CXT_Attribute: Type = 2; + #[doc = " Node is an XML comment."] + pub const CXT_Comment: Type = 3; + #[doc = " Node is a special literal"] + pub const CXT_Literal: Type = 4; } -extern "C" { - pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; +#[doc = " Document node structure."] +#[doc = ""] +#[doc = " This C structure is used to hold a single text fragment representing a"] +#[doc = " component of the document when parsed. It should be allocated with the"] +#[doc = " appropriate CPL function, and freed with CPLDestroyXMLNode(). The structure"] +#[doc = " contents should not normally be altered by application code, but may be"] +#[doc = " freely examined by application code."] +#[doc = ""] +#[doc = " Using the psChild and psNext pointers, a hierarchical tree structure"] +#[doc = " for a document can be represented as a tree of CPLXMLNode structures."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CPLXMLNode { + #[doc = " \\brief Node type"] + #[doc = ""] + #[doc = " One of CXT_Element, CXT_Text, CXT_Attribute, CXT_Comment,"] + #[doc = " or CXT_Literal."] + pub eType: CPLXMLNodeType::Type, + #[doc = " \\brief Node value"] + #[doc = ""] + #[doc = " For CXT_Element this is the name of the element, without the angle"] + #[doc = " brackets. Note there is a single CXT_Element even when the document"] + #[doc = " contains a start and end element tag. The node represents the pair."] + #[doc = " All text or other elements between the start and end tag will appear"] + #[doc = " as children nodes of this CXT_Element node."] + #[doc = ""] + #[doc = " For CXT_Attribute the pszValue is the attribute name. The value of"] + #[doc = " the attribute will be a CXT_Text child."] + #[doc = ""] + #[doc = " For CXT_Text this is the text itself (value of an attribute, or a"] + #[doc = " text fragment between an element start and end tags."] + #[doc = ""] + #[doc = " For CXT_Literal it is all the literal text. Currently this is just"] + #[doc = " used for !DOCTYPE lines, and the value would be the entire line."] + #[doc = ""] + #[doc = " For CXT_Comment the value is all the literal text within the comment,"] + #[doc = " but not including the comment start/end indicators (\"<--\" and \"-->\")."] + pub pszValue: *mut libc::c_char, + #[doc = " \\brief Next sibling."] + #[doc = ""] + #[doc = " Pointer to next sibling, that is the next node appearing after this"] + #[doc = " one that has the same parent as this node. NULL if this node is the"] + #[doc = " last child of the parent element."] + pub psNext: *mut CPLXMLNode, + #[doc = " \\brief Child node."] + #[doc = ""] + #[doc = " Pointer to first child node, if any. Only CXT_Element and CXT_Attribute"] + #[doc = " nodes should have children. For CXT_Attribute it should be a single"] + #[doc = " CXT_Text value node, while CXT_Element can have any kind of child."] + #[doc = " The full list of children for a node are identified by walking the"] + #[doc = " psNext's starting with the psChild node."] + pub psChild: *mut CPLXMLNode, +} +#[test] +fn bindgen_test_layout_CPLXMLNode() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLXMLNode)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CPLXMLNode)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CPLXMLNode), + "::", + stringify!(eType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CPLXMLNode), + "::", + stringify!(pszValue) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CPLXMLNode), + "::", + stringify!(psNext) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CPLXMLNode), + "::", + stringify!(psChild) + ) + ); } extern "C" { - pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); } extern "C" { - pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLSearchXMLNode( + poRoot: *mut CPLXMLNode, + pszTarget: *const libc::c_char, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLGetXMLValue( + poRoot: *const CPLXMLNode, + pszPath: *const libc::c_char, + pszDefault: *const libc::c_char, + ) -> *const libc::c_char; } -pub mod OGRwkbByteOrder { - #[doc = " Enumeration to describe byte order"] - pub type Type = u32; - #[doc = "< MSB/Sun/Motoroloa: Most Significant Byte First"] - pub const wkbXDR: Type = 0; - #[doc = "< LSB/Intel/Vax: Least Significant Byte First"] - pub const wkbNDR: Type = 1; +extern "C" { + pub fn CPLCreateXMLNode( + poParent: *mut CPLXMLNode, + eType: CPLXMLNodeType::Type, + pszText: *const libc::c_char, + ) -> *mut CPLXMLNode; } -pub mod OGRFieldType { - #[doc = " List of feature field types. This list is likely to be extended in the"] - #[doc = " future ... avoid coding applications based on the assumption that all"] - #[doc = " field types can be known."] - pub type Type = u32; - #[doc = " Simple 32bit integer"] - pub const OFTInteger: Type = 0; - #[doc = " List of 32bit integers"] - pub const OFTIntegerList: Type = 1; - #[doc = " Double Precision floating point"] - pub const OFTReal: Type = 2; - #[doc = " List of doubles"] - pub const OFTRealList: Type = 3; - #[doc = " String of ASCII chars"] - pub const OFTString: Type = 4; - #[doc = " Array of strings"] - pub const OFTStringList: Type = 5; - #[doc = " deprecated"] - pub const OFTWideString: Type = 6; - #[doc = " deprecated"] - pub const OFTWideStringList: Type = 7; - #[doc = " Raw Binary data"] - pub const OFTBinary: Type = 8; - #[doc = " Date"] - pub const OFTDate: Type = 9; - #[doc = " Time"] - pub const OFTTime: Type = 10; - #[doc = " Date and Time"] - pub const OFTDateTime: Type = 11; - #[doc = " Single 64bit integer"] - pub const OFTInteger64: Type = 12; - #[doc = " List of 64bit integers"] - pub const OFTInteger64List: Type = 13; - #[doc = " List of 64bit integers"] - pub const OFTMaxType: Type = 13; +extern "C" { + pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; } -pub mod OGRFieldSubType { - #[doc = " List of field subtypes. A subtype represents a hint, a restriction of the"] - #[doc = " main type, that is not strictly necessary to consult."] - #[doc = " This list is likely to be extended in the"] - #[doc = " future ... avoid coding applications based on the assumption that all"] - #[doc = " field types can be known."] - #[doc = " Most subtypes only make sense for a restricted set of main types."] - #[doc = " @since GDAL 2.0"] - pub type Type = u32; - #[doc = " No subtype. This is the default value"] - pub const OFSTNone: Type = 0; - #[doc = " Boolean integer. Only valid for OFTInteger and OFTIntegerList."] - pub const OFSTBoolean: Type = 1; - #[doc = " Signed 16-bit integer. Only valid for OFTInteger and OFTIntegerList."] - pub const OFSTInt16: Type = 2; - #[doc = " Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList."] - pub const OFSTFloat32: Type = 3; - #[doc = " JSON content. Only valid for OFTString."] - #[doc = " @since GDAL 2.4"] - pub const OFSTJSON: Type = 4; - #[doc = " JSON content. Only valid for OFTString."] - #[doc = " @since GDAL 2.4"] - pub const OFSTMaxSubType: Type = 4; +extern "C" { + pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); } -pub mod OGRJustification { - #[doc = " Display justification for field values."] - pub type Type = u32; - pub const OJUndefined: Type = 0; - pub const OJLeft: Type = 1; - pub const OJRight: Type = 2; +extern "C" { + pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; } -#[doc = " OGRFeature field attribute value union."] -#[repr(C)] -#[derive(Copy, Clone)] -pub union OGRField { - #[doc = " @cond Doxygen_Suppress"] - pub Integer: libc::c_int, - pub Integer64: GIntBig, - pub Real: f64, - pub String: *mut libc::c_char, - pub IntegerList: OGRField__bindgen_ty_1, - pub Integer64List: OGRField__bindgen_ty_2, - pub RealList: OGRField__bindgen_ty_3, - pub StringList: OGRField__bindgen_ty_4, - pub Binary: OGRField__bindgen_ty_5, - pub Set: OGRField__bindgen_ty_6, - pub Date: OGRField__bindgen_ty_7, - _bindgen_union_align: [u64; 2usize], +extern "C" { + pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); +} +extern "C" { + pub fn CPLCreateXMLElementAndValue( + psParent: *mut CPLXMLNode, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ) -> *mut CPLXMLNode; +} +extern "C" { + pub fn CPLAddXMLAttributeAndValue( + psParent: *mut CPLXMLNode, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ); +} +extern "C" { + pub fn CPLCloneXMLTree(psTree: *const CPLXMLNode) -> *mut CPLXMLNode; +} +extern "C" { + pub fn CPLSetXMLValue( + psRoot: *mut CPLXMLNode, + pszPath: *const libc::c_char, + pszValue: *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLStripXMLNamespace( + psRoot: *mut CPLXMLNode, + pszNameSpace: *const libc::c_char, + bRecurse: libc::c_int, + ); +} +extern "C" { + pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); +} +extern "C" { + pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; +} +extern "C" { + pub fn CPLSerializeXMLTreeToFile( + psTree: *const CPLXMLNode, + pszFilename: *const libc::c_char, + ) -> libc::c_int; } +#[doc = " Describe a rectangle"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_1 { - pub nCount: libc::c_int, - pub paList: *mut libc::c_int, +pub struct CPLRectObj { + #[doc = "< Minimum x"] + pub minx: f64, + #[doc = "< Minimum y"] + pub miny: f64, + #[doc = "< Maximum x"] + pub maxx: f64, + #[doc = "< Maximum y"] + pub maxy: f64, } #[test] -fn bindgen_test_layout_OGRField__bindgen_ty_1() { +fn bindgen_test_layout_CPLRectObj() { assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLRectObj)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) + concat!("Alignment of ", stringify!(CPLRectObj)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).minx as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), + stringify!(CPLRectObj), "::", - stringify!(nCount) + stringify!(minx) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).miny as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), + stringify!(CPLRectObj), "::", - stringify!(paList) + stringify!(miny) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_2 { - pub nCount: libc::c_int, - pub paList: *mut GIntBig, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).maxx as *const _ as usize }, 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), + stringify!(CPLRectObj), "::", - stringify!(nCount) + stringify!(maxx) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).maxy as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), + stringify!(CPLRectObj), "::", - stringify!(paList) + stringify!(maxy) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_3 { - pub nCount: libc::c_int, - pub paList: *mut f64, +pub struct _CPLQuadTree { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(paList) - ) - ); +#[doc = " Opaque type for a quad tree"] +pub type CPLQuadTree = _CPLQuadTree; +#[doc = " CPLQuadTreeGetBoundsFunc"] +pub type CPLQuadTreeGetBoundsFunc = ::std::option::Option< + unsafe extern "C" fn(hFeature: *const libc::c_void, pBounds: *mut CPLRectObj), +>; +#[doc = " CPLQuadTreeForeachFunc"] +pub type CPLQuadTreeForeachFunc = ::std::option::Option< + unsafe extern "C" fn(pElt: *mut libc::c_void, pUserData: *mut libc::c_void) -> libc::c_int, +>; +#[doc = " CPLQuadTreeDumpFeatureFunc"] +pub type CPLQuadTreeDumpFeatureFunc = ::std::option::Option< + unsafe extern "C" fn( + hFeature: *const libc::c_void, + nIndentLevel: libc::c_int, + pUserData: *mut libc::c_void, + ), +>; +extern "C" { + pub fn CPLQuadTreeCreate( + pGlobalBounds: *const CPLRectObj, + pfnGetBounds: CPLQuadTreeGetBoundsFunc, + ) -> *mut CPLQuadTree; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_4 { - pub nCount: libc::c_int, - pub paList: *mut *mut libc::c_char, +extern "C" { + pub fn CPLQuadTreeDestroy(hQuadtree: *mut CPLQuadTree); } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_4() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(paList) - ) - ); +extern "C" { + pub fn CPLQuadTreeSetBucketCapacity(hQuadtree: *mut CPLQuadTree, nBucketCapacity: libc::c_int); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_5 { - pub nCount: libc::c_int, - pub paData: *mut GByte, +extern "C" { + pub fn CPLQuadTreeGetAdvisedMaxDepth(nExpectedFeatures: libc::c_int) -> libc::c_int; } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_5() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(paData) - ) - ); +extern "C" { + pub fn CPLQuadTreeSetMaxDepth(hQuadtree: *mut CPLQuadTree, nMaxDepth: libc::c_int); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_6 { - pub nMarker1: libc::c_int, - pub nMarker2: libc::c_int, - pub nMarker3: libc::c_int, +extern "C" { + pub fn CPLQuadTreeInsert(hQuadtree: *mut CPLQuadTree, hFeature: *mut libc::c_void); } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_6() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) +extern "C" { + pub fn CPLQuadTreeInsertWithBounds( + hQuadtree: *mut CPLQuadTree, + hFeature: *mut libc::c_void, + psBounds: *const CPLRectObj, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker1) - ) +} +extern "C" { + pub fn CPLQuadTreeSearch( + hQuadtree: *const CPLQuadTree, + pAoi: *const CPLRectObj, + pnFeatureCount: *mut libc::c_int, + ) -> *mut *mut libc::c_void; +} +extern "C" { + pub fn CPLQuadTreeForeach( + hQuadtree: *const CPLQuadTree, + pfnForeach: CPLQuadTreeForeachFunc, + pUserData: *mut libc::c_void, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker2) - ) +} +extern "C" { + pub fn CPLQuadTreeDump( + hQuadtree: *const CPLQuadTree, + pfnDumpFeatureFunc: CPLQuadTreeDumpFeatureFunc, + pUserData: *mut libc::c_void, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker3) - ) +} +extern "C" { + pub fn CPLQuadTreeGetStats( + hQuadtree: *const CPLQuadTree, + pnFeatureCount: *mut libc::c_int, + pnNodeCount: *mut libc::c_int, + pnMaxDepth: *mut libc::c_int, + pnMaxBucketCapacity: *mut libc::c_int, ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_7 { - pub Year: GInt16, - pub Month: GByte, - pub Day: GByte, - pub Hour: GByte, - pub Minute: GByte, - pub TZFlag: GByte, - pub Reserved: GByte, - pub Second: f32, +pub struct CPLVirtualMem { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_7() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Month) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Day) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Minute) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(TZFlag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Reserved) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Second) - ) - ); -} -#[test] -fn bindgen_test_layout_OGRField() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Real) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(String) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(IntegerList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64List) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(RealList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(StringList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Binary) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Set) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Date) - ) - ); -} -extern "C" { - pub fn OGRParseDate( - pszInput: *const libc::c_char, - psOutput: *mut OGRField, - nOptions: libc::c_int, - ) -> libc::c_int; -} -pub mod ogr_style_tool_class_id { - #[doc = " OGRStyleTool derived class types (returned by GetType())."] - pub type Type = u32; - #[doc = "< None"] - pub const OGRSTCNone: Type = 0; - #[doc = "< Pen"] - pub const OGRSTCPen: Type = 1; - #[doc = "< Brush"] - pub const OGRSTCBrush: Type = 2; - #[doc = "< Symbol"] - pub const OGRSTCSymbol: Type = 3; - #[doc = "< Label"] - pub const OGRSTCLabel: Type = 4; - #[doc = "< Vector"] - pub const OGRSTCVector: Type = 5; -} -pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; -pub mod ogr_style_tool_units_id { - #[doc = " List of units supported by OGRStyleTools."] - pub type Type = u32; - #[doc = "< Ground unit"] - pub const OGRSTUGround: Type = 0; - #[doc = "< Pixel"] - pub const OGRSTUPixel: Type = 1; - #[doc = "< Points"] - pub const OGRSTUPoints: Type = 2; - #[doc = "< Millimeter"] - pub const OGRSTUMM: Type = 3; - #[doc = "< Centimeter"] - pub const OGRSTUCM: Type = 4; - #[doc = "< Inch"] - pub const OGRSTUInches: Type = 5; +#[doc = " Callback triggered when a still unmapped page of virtual memory is accessed."] +#[doc = " The callback has the responsibility of filling the page with relevant values"] +#[doc = ""] +#[doc = " @param ctxt virtual memory handle."] +#[doc = " @param nOffset offset of the page in the memory mapping."] +#[doc = " @param pPageToFill address of the page to fill. Note that the address might"] +#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] +#[doc = " @param nToFill number of bytes of the page."] +#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] +pub type CPLVirtualMemCachePageCbk = ::std::option::Option< + unsafe extern "C" fn( + ctxt: *mut CPLVirtualMem, + nOffset: usize, + pPageToFill: *mut libc::c_void, + nToFill: usize, + pUserData: *mut libc::c_void, + ), +>; +#[doc = " Callback triggered when a dirty mapped page is going to be freed."] +#[doc = " (saturation of cache, or termination of the virtual memory mapping)."] +#[doc = ""] +#[doc = " @param ctxt virtual memory handle."] +#[doc = " @param nOffset offset of the page in the memory mapping."] +#[doc = " @param pPageToBeEvicted address of the page that will be flushed. Note that the address might"] +#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] +#[doc = " @param nToBeEvicted number of bytes of the page."] +#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] +pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< + unsafe extern "C" fn( + ctxt: *mut CPLVirtualMem, + nOffset: usize, + pPageToBeEvicted: *const libc::c_void, + nToBeEvicted: usize, + pUserData: *mut libc::c_void, + ), +>; +#[doc = " Callback triggered when a virtual memory mapping is destroyed."] +#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] +pub type CPLVirtualMemFreeUserData = + ::std::option::Option; +pub mod CPLVirtualMemAccessMode { + #[doc = " Access mode of a virtual memory mapping."] + pub type Type = libc::c_uint; + #[doc = " The mapping is meant at being read-only, but writes will not be prevented."] + #[doc = "Note that any content written will be lost."] + pub const VIRTUALMEM_READONLY: Type = 0; + #[doc = " The mapping is meant at being read-only, and this will be enforced"] + #[doc = "through the operating system page protection mechanism."] + pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; + #[doc = " The mapping is meant at being read-write, and modified pages can be saved"] + #[doc = "thanks to the pfnUnCachePage callback"] + pub const VIRTUALMEM_READWRITE: Type = 2; } -pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; extern "C" { - pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; + #[doc = " Return the size of a page of virtual memory."] + #[doc = ""] + #[doc = " @return the page size."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLGetPageSize() -> usize; } extern "C" { - #[doc = " Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor."] + #[doc = " Create a new virtual memory mapping."] #[doc = ""] - #[doc = "The purpose of this method is to ensure that calling code will run with the GDAL"] - #[doc = "version it is compiled for. It is primarily indented for external plugins."] + #[doc = " This will reserve an area of virtual memory of size nSize, whose size"] + #[doc = " might be potentially much larger than the physical memory available. Initially,"] + #[doc = " no physical memory will be allocated. As soon as memory pages will be accessed,"] + #[doc = " they will be allocated transparently and filled with the pfnCachePage callback."] + #[doc = " When the allowed cache size is reached, the least recently used pages will"] + #[doc = " be unallocated."] #[doc = ""] - #[doc = "@param nVersionMajor Major version to be tested against"] - #[doc = "@param nVersionMinor Minor version to be tested against"] - #[doc = "@param pszCallingComponentName If not NULL, in case of version mismatch, the method"] - #[doc = "will issue a failure mentioning the name of"] - #[doc = "the calling component."] - pub fn GDALCheckVersion( - nVersionMajor: libc::c_int, - nVersionMinor: libc::c_int, - pszCallingComponentName: *const libc::c_char, - ) -> libc::c_int; -} -#[doc = " Opaque type for a geometry"] -pub type OGRGeometryH = *mut libc::c_void; -#[doc = " Opaque type for a spatial reference system"] -pub type OGRSpatialReferenceH = *mut libc::c_void; -#[doc = " Opaque type for a coordinate transformation object"] -pub type OGRCoordinateTransformationH = *mut libc::c_void; -extern "C" { - pub fn OGR_G_CreateFromWkb( - arg1: *const libc::c_void, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromWkt( - arg1: *mut *mut libc::c_char, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromFgf( - arg1: *const libc::c_void, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - arg5: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); + #[doc = " On Linux AMD64 platforms, the maximum value for nSize is 128 TB."] + #[doc = " On Linux x86 platforms, the maximum value for nSize is 2 GB."] + #[doc = ""] + #[doc = " Only supported on Linux for now."] + #[doc = ""] + #[doc = " Note that on Linux, this function will install a SIGSEGV handler. The"] + #[doc = " original handler will be restored by CPLVirtualMemManagerTerminate()."] + #[doc = ""] + #[doc = " @param nSize size in bytes of the virtual memory mapping."] + #[doc = " @param nCacheSize size in bytes of the maximum memory that will be really"] + #[doc = " allocated (must ideally fit into RAM)."] + #[doc = " @param nPageSizeHint hint for the page size. Must be a multiple of the"] + #[doc = " system page size, returned by CPLGetPageSize()."] + #[doc = " Minimum value is generally 4096. Might be set to 0 to"] + #[doc = " let the function determine a default page size."] + #[doc = " @param bSingleThreadUsage set to TRUE if there will be no concurrent threads"] + #[doc = " that will access the virtual memory mapping. This can"] + #[doc = " optimize performance a bit."] + #[doc = " @param eAccessMode permission to use for the virtual memory mapping."] + #[doc = " @param pfnCachePage callback triggered when a still unmapped page of virtual"] + #[doc = " memory is accessed. The callback has the responsibility"] + #[doc = " of filling the page with relevant values."] + #[doc = " @param pfnUnCachePage callback triggered when a dirty mapped page is going to"] + #[doc = " be freed (saturation of cache, or termination of the"] + #[doc = " virtual memory mapping). Might be NULL."] + #[doc = " @param pfnFreeUserData callback that can be used to free pCbkUserData. Might be"] + #[doc = " NULL"] + #[doc = " @param pCbkUserData user data passed to pfnCachePage and pfnUnCachePage."] + #[doc = ""] + #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] + #[doc = " or NULL in case of failure."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemNew( + nSize: usize, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + eAccessMode: CPLVirtualMemAccessMode::Type, + pfnCachePage: CPLVirtualMemCachePageCbk, + pfnUnCachePage: CPLVirtualMemUnCachePageCbk, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; + #[doc = " Return if virtual memory mapping of a file is available."] + #[doc = ""] + #[doc = " @return TRUE if virtual memory mapping of a file is available."] + #[doc = " @since GDAL 1.11"] + pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; } extern "C" { - pub fn OGR_G_ApproximateArcAngles( - dfCenterX: f64, - dfCenterY: f64, - dfZ: f64, - dfPrimaryRadius: f64, - dfSecondaryAxis: f64, - dfRotation: f64, - dfStartAngle: f64, - dfEndAngle: f64, - dfMaxAngleStepSizeDegrees: f64, - ) -> OGRGeometryH; + #[doc = " Create a new virtual memory mapping from a file."] + #[doc = ""] + #[doc = " The file must be a \"real\" file recognized by the operating system, and not"] + #[doc = " a VSI extended virtual file."] + #[doc = ""] + #[doc = " In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written"] + #[doc = " in the file."] + #[doc = ""] + #[doc = " On Linux AMD64 platforms, the maximum value for nLength is 128 TB."] + #[doc = " On Linux x86 platforms, the maximum value for nLength is 2 GB."] + #[doc = ""] + #[doc = " Supported on Linux only in GDAL <= 2.0, and all POSIX systems supporting"] + #[doc = " mmap() in GDAL >= 2.1"] + #[doc = ""] + #[doc = " @param fp Virtual file handle."] + #[doc = " @param nOffset Offset in the file to start the mapping from."] + #[doc = " @param nLength Length of the portion of the file to map into memory."] + #[doc = " @param eAccessMode Permission to use for the virtual memory mapping. This must"] + #[doc = " be consistent with how the file has been opened."] + #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] + #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] + #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] + #[doc = " or NULL in case of failure."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemFileMapNew( + fp: *mut VSILFILE, + nOffset: vsi_l_offset, + nLength: vsi_l_offset, + eAccessMode: CPLVirtualMemAccessMode::Type, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; + #[doc = " Create a new virtual memory mapping derived from an other virtual memory"] + #[doc = " mapping."] + #[doc = ""] + #[doc = " This may be useful in case of creating mapping for pixel interleaved data."] + #[doc = ""] + #[doc = " The new mapping takes a reference on the base mapping."] + #[doc = ""] + #[doc = " @param pVMemBase Base virtual memory mapping"] + #[doc = " @param nOffset Offset in the base virtual memory mapping from which to start"] + #[doc = " the new mapping."] + #[doc = " @param nSize Size of the base virtual memory mapping to expose in the"] + #[doc = " the new mapping."] + #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] + #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] + #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] + #[doc = " or NULL in case of failure."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemDerivedNew( + pVMemBase: *mut CPLVirtualMem, + nOffset: vsi_l_offset, + nSize: vsi_l_offset, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; + #[doc = " Free a virtual memory mapping."] + #[doc = ""] + #[doc = " The pointer returned by CPLVirtualMemGetAddr() will no longer be valid."] + #[doc = " If the virtual memory mapping was created with read/write permissions and that"] + #[doc = " they are dirty (i.e. modified) pages, they will be flushed through the"] + #[doc = " pfnUnCachePage callback before being freed."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); } extern "C" { - pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; + #[doc = " Return the pointer to the start of a virtual memory mapping."] + #[doc = ""] + #[doc = " The bytes in the range [p:p+CPLVirtualMemGetSize()-1] where p is the pointer"] + #[doc = " returned by this function will be valid, until CPLVirtualMemFree() is called."] + #[doc = ""] + #[doc = " Note that if a range of bytes used as an argument of a system call"] + #[doc = " (such as read() or write()) contains pages that have not been \"realized\", the"] + #[doc = " system call will fail with EFAULT. CPLVirtualMemPin() can be used to work"] + #[doc = " around this issue."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return the pointer to the start of a virtual memory mapping."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; + #[doc = " Return the size of the virtual memory mapping."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return the size of the virtual memory mapping."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; } extern "C" { - pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; + #[doc = " Return if the virtual memory mapping is a direct file mapping."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return TRUE if the virtual memory mapping is a direct file mapping."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; } extern "C" { - pub fn OGR_G_ForceTo( - hGeom: OGRGeometryH, - eTargetType: OGRwkbGeometryType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; + #[doc = " Return the access mode of the virtual memory mapping."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return the access mode of the virtual memory mapping."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; } extern "C" { - pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; + #[doc = " Return the page size associated to a virtual memory mapping."] + #[doc = ""] + #[doc = " The value returned will be at least CPLGetPageSize(), but potentially"] + #[doc = " larger."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return the page size"] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; } extern "C" { - pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; + #[doc = " Return TRUE if this memory mapping can be accessed safely from concurrent"] + #[doc = " threads."] + #[doc = ""] + #[doc = " The situation that can cause problems is when several threads try to access"] + #[doc = " a page of the mapping that is not yet mapped."] + #[doc = ""] + #[doc = " The return value of this function depends on whether bSingleThreadUsage has"] + #[doc = " been set of not in CPLVirtualMemNew() and/or the implementation."] + #[doc = ""] + #[doc = " On Linux, this will always return TRUE if bSingleThreadUsage = FALSE."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return TRUE if this memory mapping can be accessed safely from concurrent"] + #[doc = " threads."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; } extern "C" { - pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; + #[doc = " Declare that a thread will access a virtual memory mapping."] + #[doc = ""] + #[doc = " This function must be called by a thread that wants to access the"] + #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] + #[doc = " been created with bSingleThreadUsage = TRUE."] + #[doc = ""] + #[doc = " This function must be paired with CPLVirtualMemUnDeclareThread()."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); } extern "C" { - pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsMeasured(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Set3D(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_SetMeasured(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); -} -extern "C" { - pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); -} -extern "C" { - pub fn OGR_G_ImportFromWkb( - arg1: OGRGeometryH, - arg2: *const libc::c_void, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToIsoWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; + #[doc = " Declare that a thread will stop accessing a virtual memory mapping."] + #[doc = ""] + #[doc = " This function must be called by a thread that will no longer access the"] + #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] + #[doc = " been created with bSingleThreadUsage = TRUE."] + #[doc = ""] + #[doc = " This function must be paired with CPLVirtualMemDeclareThread()."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); } extern "C" { - pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; + #[doc = " Make sure that a region of virtual memory will be realized."] + #[doc = ""] + #[doc = " Calling this function is not required, but might be useful when debugging"] + #[doc = " a process with tools like gdb or valgrind that do not naturally like"] + #[doc = " segmentation fault signals."] + #[doc = ""] + #[doc = " It is also needed when wanting to provide part of virtual memory mapping"] + #[doc = " to a system call such as read() or write(). If read() or write() is called"] + #[doc = " on a memory region not yet realized, the call will fail with EFAULT."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @param pAddr the memory region to pin."] + #[doc = " @param nSize the size of the memory region."] + #[doc = " @param bWriteOp set to TRUE if the memory are will be accessed in write mode."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemPin( + ctxt: *mut CPLVirtualMem, + pAddr: *mut libc::c_void, + nSize: usize, + bWriteOp: libc::c_int, + ); } extern "C" { - pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; + #[doc = " Cleanup any resource and handlers related to virtual memory."] + #[doc = ""] + #[doc = " This function must be called after the last CPLVirtualMem object has"] + #[doc = " been freed."] + #[doc = ""] + #[doc = " @since GDAL 2.0"] + pub fn CPLVirtualMemManagerTerminate(); } -extern "C" { - pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGREnvelope { + pub MinX: f64, + pub MaxX: f64, + pub MinY: f64, + pub MaxY: f64, } -extern "C" { - pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; +#[test] +fn bindgen_test_layout_OGREnvelope() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(OGREnvelope)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGREnvelope)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope), + "::", + stringify!(MinX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope), + "::", + stringify!(MaxX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope), + "::", + stringify!(MinY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope), + "::", + stringify!(MaxY) + ) + ); } -extern "C" { - pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGREnvelope3D { + pub MinX: f64, + pub MaxX: f64, + pub MinY: f64, + pub MaxY: f64, + pub MinZ: f64, + pub MaxZ: f64, } -extern "C" { - pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); +#[test] +fn bindgen_test_layout_OGREnvelope3D() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(OGREnvelope3D)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGREnvelope3D)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MinX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MaxX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MinY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MaxY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MinZ) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MaxZ) + ) + ); } extern "C" { - pub fn OGR_G_CloseRings(arg1: OGRGeometryH); + #[doc = " @cond Doxygen_Suppress"] + pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; + pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; + pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_ExportToGMLEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; + pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; + pub fn OGRFree(arg1: *mut libc::c_void); } -extern "C" { - pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; +pub mod OGRwkbGeometryType { + #[doc = " List of well known binary geometry types. These are used within the BLOBs"] + #[doc = " but are also returned from OGRGeometry::getGeometryType() to identify the"] + #[doc = " type of a geometry object."] + pub type Type = libc::c_uint; + #[doc = "< unknown type, non-standard"] + pub const wkbUnknown: Type = 0; + #[doc = "< 0-dimensional geometric object, standard WKB"] + pub const wkbPoint: Type = 1; + #[doc = "< 1-dimensional geometric object with linear"] + #[doc = " interpolation between Points, standard WKB"] + pub const wkbLineString: Type = 2; + #[doc = "< planar 2-dimensional geometric object defined"] + #[doc = " by 1 exterior boundary and 0 or more interior"] + #[doc = " boundaries, standard WKB"] + pub const wkbPolygon: Type = 3; + #[doc = "< GeometryCollection of Points, standard WKB"] + pub const wkbMultiPoint: Type = 4; + #[doc = "< GeometryCollection of LineStrings, standard WKB"] + pub const wkbMultiLineString: Type = 5; + #[doc = "< GeometryCollection of Polygons, standard WKB"] + pub const wkbMultiPolygon: Type = 6; + #[doc = "< geometric object that is a collection of 1"] + #[doc = "or more geometric objects, standard WKB"] + pub const wkbGeometryCollection: Type = 7; + #[doc = "< one or more circular arc segments connected end to end,"] + #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCircularString: Type = 8; + #[doc = "< sequence of contiguous curves, ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCompoundCurve: Type = 9; + #[doc = "< planar surface, defined by 1 exterior boundary"] + #[doc = " and zero or more interior boundaries, that are curves."] + #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCurvePolygon: Type = 10; + #[doc = "< GeometryCollection of Curves, ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbMultiCurve: Type = 11; + #[doc = "< GeometryCollection of Surfaces, ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbMultiSurface: Type = 12; + #[doc = "< Curve (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurve: Type = 13; + #[doc = "< Surface (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbSurface: Type = 14; + #[doc = "< a contiguous collection of polygons, which share common boundary segments,"] + #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbPolyhedralSurface: Type = 15; + #[doc = "< a PolyhedralSurface consisting only of Triangle patches"] + #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTIN: Type = 16; + #[doc = "< a Triangle. ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTriangle: Type = 17; + #[doc = "< non-standard, for pure attribute records"] + pub const wkbNone: Type = 100; + #[doc = "< non-standard, just for createGeometry()"] + pub const wkbLinearRing: Type = 101; + #[doc = "< wkbCircularString with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCircularStringZ: Type = 1008; + #[doc = "< wkbCompoundCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCompoundCurveZ: Type = 1009; + #[doc = "< wkbCurvePolygon with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCurvePolygonZ: Type = 1010; + #[doc = "< wkbMultiCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbMultiCurveZ: Type = 1011; + #[doc = "< wkbMultiSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbMultiSurfaceZ: Type = 1012; + #[doc = "< wkbCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurveZ: Type = 1013; + #[doc = "< wkbSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbSurfaceZ: Type = 1014; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbPolyhedralSurfaceZ: Type = 1015; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTINZ: Type = 1016; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTriangleZ: Type = 1017; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbPointM: Type = 2001; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbLineStringM: Type = 2002; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbPolygonM: Type = 2003; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiPointM: Type = 2004; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiLineStringM: Type = 2005; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiPolygonM: Type = 2006; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbGeometryCollectionM: Type = 2007; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCircularStringM: Type = 2008; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCompoundCurveM: Type = 2009; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurvePolygonM: Type = 2010; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiCurveM: Type = 2011; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiSurfaceM: Type = 2012; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurveM: Type = 2013; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbSurfaceM: Type = 2014; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbPolyhedralSurfaceM: Type = 2015; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTINM: Type = 2016; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTriangleM: Type = 2017; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbPointZM: Type = 3001; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbLineStringZM: Type = 3002; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbPolygonZM: Type = 3003; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiPointZM: Type = 3004; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiLineStringZM: Type = 3005; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiPolygonZM: Type = 3006; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbGeometryCollectionZM: Type = 3007; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCircularStringZM: Type = 3008; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCompoundCurveZM: Type = 3009; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurvePolygonZM: Type = 3010; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiCurveZM: Type = 3011; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiSurfaceZM: Type = 3012; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurveZM: Type = 3013; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbSurfaceZM: Type = 3014; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbPolyhedralSurfaceZM: Type = 3015; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTINZM: Type = 3016; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTriangleZM: Type = 3017; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbPoint25D: Type = 2147483649; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbLineString25D: Type = 2147483650; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbPolygon25D: Type = 2147483651; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbMultiPoint25D: Type = 2147483652; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbMultiLineString25D: Type = 2147483653; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbMultiPolygon25D: Type = 2147483654; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbGeometryCollection25D: Type = 2147483655; } extern "C" { - pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; + pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; } extern "C" { - pub fn OGR_G_ExportToKML( - arg1: OGRGeometryH, - pszAltitudeMode: *const libc::c_char, - ) -> *mut libc::c_char; + pub fn OGRMergeGeometryTypes( + eMain: OGRwkbGeometryType::Type, + eExtra: OGRwkbGeometryType::Type, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; + pub fn OGRMergeGeometryTypesEx( + eMain: OGRwkbGeometryType::Type, + eExtra: OGRwkbGeometryType::Type, + bAllowPromotingToCurves: libc::c_int, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ExportToJsonEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; + pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - #[doc = " Create a OGR geometry from a GeoJSON geometry object"] - pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; + pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); + pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; + pub fn OGR_GT_SetModifier( + eType: OGRwkbGeometryType::Type, + bSetZ: libc::c_int, + bSetM: libc::c_int, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; + pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; + pub fn OGR_GT_IsSubClassOf( + eType: OGRwkbGeometryType::Type, + eSuperType: OGRwkbGeometryType::Type, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; + pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_DelaunayTriangulation( - hThis: OGRGeometryH, - dfTolerance: f64, - bOnlyEdges: libc::c_int, - ) -> OGRGeometryH; + pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_Segmentize(hGeom: OGRGeometryH, dfMaxLength: f64); + pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_Intersects(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_Equals(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_Disjoint(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } -extern "C" { - pub fn OGR_G_Touches(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +pub mod OGRwkbByteOrder { + #[doc = " Enumeration to describe byte order"] + pub type Type = libc::c_uint; + #[doc = "< MSB/Sun/Motoroloa: Most Significant Byte First"] + pub const wkbXDR: Type = 0; + #[doc = "< LSB/Intel/Vax: Least Significant Byte First"] + pub const wkbNDR: Type = 1; } -extern "C" { - pub fn OGR_G_Crosses(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +pub mod OGRFieldType { + #[doc = " List of feature field types. This list is likely to be extended in the"] + #[doc = " future ... avoid coding applications based on the assumption that all"] + #[doc = " field types can be known."] + pub type Type = libc::c_uint; + #[doc = " Simple 32bit integer"] + pub const OFTInteger: Type = 0; + #[doc = " List of 32bit integers"] + pub const OFTIntegerList: Type = 1; + #[doc = " Double Precision floating point"] + pub const OFTReal: Type = 2; + #[doc = " List of doubles"] + pub const OFTRealList: Type = 3; + #[doc = " String of ASCII chars"] + pub const OFTString: Type = 4; + #[doc = " Array of strings"] + pub const OFTStringList: Type = 5; + #[doc = " deprecated"] + pub const OFTWideString: Type = 6; + #[doc = " deprecated"] + pub const OFTWideStringList: Type = 7; + #[doc = " Raw Binary data"] + pub const OFTBinary: Type = 8; + #[doc = " Date"] + pub const OFTDate: Type = 9; + #[doc = " Time"] + pub const OFTTime: Type = 10; + #[doc = " Date and Time"] + pub const OFTDateTime: Type = 11; + #[doc = " Single 64bit integer"] + pub const OFTInteger64: Type = 12; + #[doc = " List of 64bit integers"] + pub const OFTInteger64List: Type = 13; + #[doc = " List of 64bit integers"] + pub const OFTMaxType: Type = 13; } -extern "C" { - pub fn OGR_G_Within(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +pub mod OGRFieldSubType { + #[doc = " List of field subtypes. A subtype represents a hint, a restriction of the"] + #[doc = " main type, that is not strictly necessary to consult."] + #[doc = " This list is likely to be extended in the"] + #[doc = " future ... avoid coding applications based on the assumption that all"] + #[doc = " field types can be known."] + #[doc = " Most subtypes only make sense for a restricted set of main types."] + #[doc = " @since GDAL 2.0"] + pub type Type = libc::c_uint; + #[doc = " No subtype. This is the default value"] + pub const OFSTNone: Type = 0; + #[doc = " Boolean integer. Only valid for OFTInteger and OFTIntegerList."] + pub const OFSTBoolean: Type = 1; + #[doc = " Signed 16-bit integer. Only valid for OFTInteger and OFTIntegerList."] + pub const OFSTInt16: Type = 2; + #[doc = " Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList."] + pub const OFSTFloat32: Type = 3; + #[doc = " JSON content. Only valid for OFTString."] + #[doc = " @since GDAL 2.4"] + pub const OFSTJSON: Type = 4; + #[doc = " JSON content. Only valid for OFTString."] + #[doc = " @since GDAL 2.4"] + pub const OFSTMaxSubType: Type = 4; } -extern "C" { - pub fn OGR_G_Contains(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +pub mod OGRJustification { + #[doc = " Display justification for field values."] + pub type Type = libc::c_uint; + pub const OJUndefined: Type = 0; + pub const OJLeft: Type = 1; + pub const OJRight: Type = 2; } -extern "C" { - pub fn OGR_G_Overlaps(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +#[doc = " OGRFeature field attribute value union."] +#[repr(C)] +#[derive(Copy, Clone)] +pub union OGRField { + #[doc = " @cond Doxygen_Suppress"] + pub Integer: libc::c_int, + pub Integer64: GIntBig, + pub Real: f64, + pub String: *mut libc::c_char, + pub IntegerList: OGRField__bindgen_ty_1, + pub Integer64List: OGRField__bindgen_ty_2, + pub RealList: OGRField__bindgen_ty_3, + pub StringList: OGRField__bindgen_ty_4, + pub Binary: OGRField__bindgen_ty_5, + pub Set: OGRField__bindgen_ty_6, + pub Date: OGRField__bindgen_ty_7, } -extern "C" { - pub fn OGR_G_Boundary(arg1: OGRGeometryH) -> OGRGeometryH; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_1 { + pub nCount: libc::c_int, + pub paList: *mut libc::c_int, } -extern "C" { - pub fn OGR_G_ConvexHull(arg1: OGRGeometryH) -> OGRGeometryH; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_1), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_1), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_G_Buffer(arg1: OGRGeometryH, arg2: f64, arg3: libc::c_int) -> OGRGeometryH; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_2 { + pub nCount: libc::c_int, + pub paList: *mut GIntBig, } -extern "C" { - pub fn OGR_G_Intersection(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_2), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_2), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_G_Union(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_3 { + pub nCount: libc::c_int, + pub paList: *mut f64, } -extern "C" { - pub fn OGR_G_UnionCascaded(arg1: OGRGeometryH) -> OGRGeometryH; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_3() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_3), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_3), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_G_PointOnSurface(arg1: OGRGeometryH) -> OGRGeometryH; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_4 { + pub nCount: libc::c_int, + pub paList: *mut *mut libc::c_char, } -extern "C" { - pub fn OGR_G_Difference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_4() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_4), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_4), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_G_SymDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_5 { + pub nCount: libc::c_int, + pub paData: *mut GByte, } -extern "C" { - pub fn OGR_G_Distance(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_5() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_5), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_5), + "::", + stringify!(paData) + ) + ); } -extern "C" { - pub fn OGR_G_Distance3D(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Length(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Area(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Centroid(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Value(arg1: OGRGeometryH, dfDistance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Empty(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_IsEmpty(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsValid(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsSimple(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsRing(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Equal(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SymmetricDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetArea(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - #[doc = " @endcond"] - pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetPoints( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetPointsZM( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - pabyM: *mut libc::c_void, - nMStride: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetX(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetY(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetZ(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetM(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_6 { + pub nMarker1: libc::c_int, + pub nMarker2: libc::c_int, + pub nMarker3: libc::c_int, } -extern "C" { - pub fn OGR_G_GetPoint( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_6() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) ); -} -extern "C" { - pub fn OGR_G_GetPointZM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, - arg5: *mut f64, + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) ); -} -extern "C" { - pub fn OGR_G_SetPointCount(hGeom: OGRGeometryH, nNewPointCount: libc::c_int); -} -extern "C" { - pub fn OGR_G_SetPoint(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_SetPoint_2D(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_SetPointM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: f64, - arg3: f64, - arg4: f64, + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker1) + ) ); -} -extern "C" { - pub fn OGR_G_SetPointZM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker3) + ) ); } -extern "C" { - pub fn OGR_G_AddPoint(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_AddPoint_2D(arg1: OGRGeometryH, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_AddPointM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_AddPointZM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_7 { + pub Year: GInt16, + pub Month: GByte, + pub Day: GByte, + pub Hour: GByte, + pub Minute: GByte, + pub TZFlag: GByte, + pub Reserved: GByte, + pub Second: f32, } -extern "C" { - pub fn OGR_G_SetPoints( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *const libc::c_void, - nXStride: libc::c_int, - pabyY: *const libc::c_void, - nYStride: libc::c_int, - pabyZ: *const libc::c_void, - nZStride: libc::c_int, +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_7() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) ); -} -extern "C" { - pub fn OGR_G_SetPointsZM( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *const libc::c_void, - nXStride: libc::c_int, - pabyY: *const libc::c_void, - nYStride: libc::c_int, - pabyZ: *const libc::c_void, - nZStride: libc::c_int, - pabyM: *const libc::c_void, - nMStride: libc::c_int, + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Year) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Month) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Day) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Hour) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Minute) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(TZFlag) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Reserved) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Second) + ) ); } -extern "C" { - pub fn OGR_G_SwapXY(hGeom: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_GetGeometryCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetGeometryRef(arg1: OGRGeometryH, arg2: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AddGeometry(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_AddGeometryDirectly(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_RemoveGeometry( - arg1: OGRGeometryH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_HasCurveGeometry( - arg1: OGRGeometryH, - bLookForNonLinear: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetLinearGeometry( - hGeom: OGRGeometryH, - dfMaxAngleStepSizeDegrees: f64, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetCurveGeometry( - hGeom: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGRBuildPolygonFromEdges( - hLinesAsCollection: OGRGeometryH, - bBestEffort: libc::c_int, - bAutoClose: libc::c_int, - dfTolerance: f64, - peErr: *mut OGRErr::Type, - ) -> OGRGeometryH; -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( - bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; +#[test] +fn bindgen_test_layout_OGRField() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer64) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Real) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(String) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(IntegerList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer64List) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(RealList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(StringList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Binary) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Set) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Date) + ) + ); } extern "C" { - #[doc = " @endcond"] - pub fn OGRSetNonLinearGeometriesEnabledFlag(bFlag: libc::c_int); + pub fn OGRParseDate( + pszInput: *const libc::c_char, + psOutput: *mut OGRField, + nOptions: libc::c_int, + ) -> libc::c_int; } -extern "C" { - pub fn OGRGetNonLinearGeometriesEnabledFlag() -> libc::c_int; +pub mod ogr_style_tool_class_id { + #[doc = " OGRStyleTool derived class types (returned by GetType())."] + pub type Type = libc::c_uint; + #[doc = "< None"] + pub const OGRSTCNone: Type = 0; + #[doc = "< Pen"] + pub const OGRSTCPen: Type = 1; + #[doc = "< Brush"] + pub const OGRSTCBrush: Type = 2; + #[doc = "< Symbol"] + pub const OGRSTCSymbol: Type = 3; + #[doc = "< Label"] + pub const OGRSTCLabel: Type = 4; + #[doc = "< Vector"] + pub const OGRSTCVector: Type = 5; } -#[doc = " Opaque type for a field definition (OGRFieldDefn)"] -pub type OGRFieldDefnH = *mut libc::c_void; -#[doc = " Opaque type for a feature definition (OGRFeatureDefn)"] -pub type OGRFeatureDefnH = *mut libc::c_void; -#[doc = " Opaque type for a feature (OGRFeature)"] -pub type OGRFeatureH = *mut libc::c_void; -#[doc = " Opaque type for a style table (OGRStyleTable)"] -pub type OGRStyleTableH = *mut libc::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRGeomFieldDefnHS { - _unused: [u8; 0], +pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; +pub mod ogr_style_tool_units_id { + #[doc = " List of units supported by OGRStyleTools."] + pub type Type = libc::c_uint; + #[doc = "< Ground unit"] + pub const OGRSTUGround: Type = 0; + #[doc = "< Pixel"] + pub const OGRSTUPixel: Type = 1; + #[doc = "< Points"] + pub const OGRSTUPoints: Type = 2; + #[doc = "< Millimeter"] + pub const OGRSTUMM: Type = 3; + #[doc = "< Centimeter"] + pub const OGRSTUCM: Type = 4; + #[doc = "< Inch"] + pub const OGRSTUInches: Type = 5; } -#[doc = " Opaque type for a geometry field definition (OGRGeomFieldDefn)"] -pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; +pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; extern "C" { - pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; + pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; } extern "C" { - pub fn OGR_Fld_Destroy(arg1: OGRFieldDefnH); + #[doc = " Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor."] + #[doc = ""] + #[doc = "The purpose of this method is to ensure that calling code will run with the GDAL"] + #[doc = "version it is compiled for. It is primarily indented for external plugins."] + #[doc = ""] + #[doc = "@param nVersionMajor Major version to be tested against"] + #[doc = "@param nVersionMinor Minor version to be tested against"] + #[doc = "@param pszCallingComponentName If not NULL, in case of version mismatch, the method"] + #[doc = "will issue a failure mentioning the name of"] + #[doc = "the calling component."] + pub fn GDALCheckVersion( + nVersionMajor: libc::c_int, + nVersionMinor: libc::c_int, + pszCallingComponentName: *const libc::c_char, + ) -> libc::c_int; } +#[doc = " Opaque type for a geometry"] +pub type OGRGeometryH = *mut libc::c_void; +#[doc = " Opaque type for a spatial reference system"] +pub type OGRSpatialReferenceH = *mut libc::c_void; +#[doc = " Opaque type for a coordinate transformation object"] +pub type OGRCoordinateTransformationH = *mut libc::c_void; extern "C" { - pub fn OGR_Fld_SetName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); + pub fn OGR_G_CreateFromWkb( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_Fld_GetNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; + pub fn OGR_G_CreateFromWkt( + arg1: *mut *mut libc::c_char, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_Fld_GetType(arg1: OGRFieldDefnH) -> OGRFieldType::Type; + pub fn OGR_G_CreateFromFgf( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: libc::c_int, + arg5: *mut libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_Fld_SetType(arg1: OGRFieldDefnH, arg2: OGRFieldType::Type); + pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); } extern "C" { - pub fn OGR_Fld_GetSubType(arg1: OGRFieldDefnH) -> OGRFieldSubType::Type; + pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; } extern "C" { - pub fn OGR_Fld_SetSubType(arg1: OGRFieldDefnH, arg2: OGRFieldSubType::Type); + pub fn OGR_G_ApproximateArcAngles( + dfCenterX: f64, + dfCenterY: f64, + dfZ: f64, + dfPrimaryRadius: f64, + dfSecondaryAxis: f64, + dfRotation: f64, + dfStartAngle: f64, + dfEndAngle: f64, + dfMaxAngleStepSizeDegrees: f64, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_Fld_GetJustify(arg1: OGRFieldDefnH) -> OGRJustification::Type; + pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_Fld_SetJustify(arg1: OGRFieldDefnH, arg2: OGRJustification::Type); + pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_Fld_GetWidth(arg1: OGRFieldDefnH) -> libc::c_int; + pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_Fld_SetWidth(arg1: OGRFieldDefnH, arg2: libc::c_int); + pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_Fld_GetPrecision(arg1: OGRFieldDefnH) -> libc::c_int; + pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_Fld_SetPrecision(arg1: OGRFieldDefnH, arg2: libc::c_int); + pub fn OGR_G_ForceTo( + hGeom: OGRGeometryH, + eTargetType: OGRwkbGeometryType::Type, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_Fld_Set( - arg1: OGRFieldDefnH, - arg2: *const libc::c_char, - arg3: OGRFieldType::Type, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: OGRJustification::Type, - ); + pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_Fld_IsIgnored(hDefn: OGRFieldDefnH) -> libc::c_int; + pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_Fld_SetIgnored(hDefn: OGRFieldDefnH, arg1: libc::c_int); + pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_Fld_IsNullable(hDefn: OGRFieldDefnH) -> libc::c_int; + pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); } extern "C" { - pub fn OGR_Fld_SetNullable(hDefn: OGRFieldDefnH, arg1: libc::c_int); + pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_Fld_GetDefault(hDefn: OGRFieldDefnH) -> *const libc::c_char; + pub fn OGR_G_IsMeasured(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_Fld_SetDefault(hDefn: OGRFieldDefnH, arg1: *const libc::c_char); + pub fn OGR_G_Set3D(arg1: OGRGeometryH, arg2: libc::c_int); } extern "C" { - pub fn OGR_Fld_IsDefaultDriverSpecific(hDefn: OGRFieldDefnH) -> libc::c_int; + pub fn OGR_G_SetMeasured(arg1: OGRGeometryH, arg2: libc::c_int); } extern "C" { - pub fn OGR_GetFieldTypeName(arg1: OGRFieldType::Type) -> *const libc::c_char; + pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_GetFieldSubTypeName(arg1: OGRFieldSubType::Type) -> *const libc::c_char; + pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); } extern "C" { - pub fn OGR_AreTypeSubTypeCompatible( - eType: OGRFieldType::Type, - eSubType: OGRFieldSubType::Type, - ) -> libc::c_int; + pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); } extern "C" { - pub fn OGR_GFld_Create( - arg1: *const libc::c_char, - arg2: OGRwkbGeometryType::Type, - ) -> OGRGeomFieldDefnH; + pub fn OGR_G_ImportFromWkb( + arg1: OGRGeometryH, + arg2: *const libc::c_void, + arg3: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_GFld_Destroy(arg1: OGRGeomFieldDefnH); + pub fn OGR_G_ExportToWkb( + arg1: OGRGeometryH, + arg2: OGRwkbByteOrder::Type, + arg3: *mut libc::c_uchar, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_GFld_SetName(arg1: OGRGeomFieldDefnH, arg2: *const libc::c_char); + pub fn OGR_G_ExportToIsoWkb( + arg1: OGRGeometryH, + arg2: OGRwkbByteOrder::Type, + arg3: *mut libc::c_uchar, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_GFld_GetNameRef(arg1: OGRGeomFieldDefnH) -> *const libc::c_char; + pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_GFld_GetType(arg1: OGRGeomFieldDefnH) -> OGRwkbGeometryType::Type; + pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OGR_GFld_SetType(arg1: OGRGeomFieldDefnH, arg2: OGRwkbGeometryType::Type); + pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OGR_GFld_GetSpatialRef(arg1: OGRGeomFieldDefnH) -> OGRSpatialReferenceH; + pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OGR_GFld_SetSpatialRef(arg1: OGRGeomFieldDefnH, hSRS: OGRSpatialReferenceH); + pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_GFld_IsNullable(hDefn: OGRGeomFieldDefnH) -> libc::c_int; + pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; } extern "C" { - pub fn OGR_GFld_SetNullable(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); + pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); } extern "C" { - pub fn OGR_GFld_IsIgnored(hDefn: OGRGeomFieldDefnH) -> libc::c_int; + pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); } extern "C" { - pub fn OGR_GFld_SetIgnored(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); + pub fn OGR_G_CloseRings(arg1: OGRGeometryH); } extern "C" { - pub fn OGR_FD_Create(arg1: *const libc::c_char) -> OGRFeatureDefnH; + pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; } extern "C" { - pub fn OGR_FD_Destroy(arg1: OGRFeatureDefnH); + pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; } extern "C" { - pub fn OGR_FD_Release(arg1: OGRFeatureDefnH); + pub fn OGR_G_ExportToGMLEx( + arg1: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_FD_GetName(arg1: OGRFeatureDefnH) -> *const libc::c_char; + pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; } extern "C" { - pub fn OGR_FD_GetFieldCount(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_FD_GetFieldDefn(arg1: OGRFeatureDefnH, arg2: libc::c_int) -> OGRFieldDefnH; + pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_FD_GetFieldIndex(arg1: OGRFeatureDefnH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_G_ExportToKML( + arg1: OGRGeometryH, + pszAltitudeMode: *const libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_FD_AddFieldDefn(arg1: OGRFeatureDefnH, arg2: OGRFieldDefnH); + pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; } extern "C" { - pub fn OGR_FD_DeleteFieldDefn(hDefn: OGRFeatureDefnH, iField: libc::c_int) -> OGRErr::Type; + pub fn OGR_G_ExportToJsonEx( + arg1: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_FD_ReorderFieldDefns( - hDefn: OGRFeatureDefnH, - panMap: *mut libc::c_int, - ) -> OGRErr::Type; + #[doc = " Create a OGR geometry from a GeoJSON geometry object"] + pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; } extern "C" { - pub fn OGR_FD_GetGeomType(arg1: OGRFeatureDefnH) -> OGRwkbGeometryType::Type; + pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); } extern "C" { - pub fn OGR_FD_SetGeomType(arg1: OGRFeatureDefnH, arg2: OGRwkbGeometryType::Type); + pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; } extern "C" { - pub fn OGR_FD_IsGeometryIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; } extern "C" { - pub fn OGR_FD_SetGeometryIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); + pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - pub fn OGR_FD_IsStyleIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; } extern "C" { - pub fn OGR_FD_SetStyleIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); + pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; } extern "C" { - pub fn OGR_FD_Reference(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_DelaunayTriangulation( + hThis: OGRGeometryH, + dfTolerance: f64, + bOnlyEdges: libc::c_int, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_FD_Dereference(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_Segmentize(hGeom: OGRGeometryH, dfMaxLength: f64); } extern "C" { - pub fn OGR_FD_GetReferenceCount(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_Intersects(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_GetGeomFieldCount(hFDefn: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_Equals(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_GetGeomFieldDefn(hFDefn: OGRFeatureDefnH, i: libc::c_int) -> OGRGeomFieldDefnH; + pub fn OGR_G_Disjoint(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_GetGeomFieldIndex( - hFDefn: OGRFeatureDefnH, - pszName: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_G_Touches(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_AddGeomFieldDefn(hFDefn: OGRFeatureDefnH, hGFldDefn: OGRGeomFieldDefnH); + pub fn OGR_G_Crosses(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_DeleteGeomFieldDefn( - hFDefn: OGRFeatureDefnH, - iGeomField: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_G_Within(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_IsSame(hFDefn: OGRFeatureDefnH, hOtherFDefn: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_Contains(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_Create(arg1: OGRFeatureDefnH) -> OGRFeatureH; + pub fn OGR_G_Overlaps(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_Destroy(arg1: OGRFeatureH); + pub fn OGR_G_Boundary(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetDefnRef(arg1: OGRFeatureH) -> OGRFeatureDefnH; + pub fn OGR_G_ConvexHull(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_SetGeometryDirectly(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetGeometry(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetGeometryRef(arg1: OGRFeatureH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_StealGeometry(arg1: OGRFeatureH) -> OGRGeometryH; + pub fn OGR_G_Buffer(arg1: OGRGeometryH, arg2: f64, arg3: libc::c_int) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_Clone(arg1: OGRFeatureH) -> OGRFeatureH; + pub fn OGR_G_Intersection(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_Equal(arg1: OGRFeatureH, arg2: OGRFeatureH) -> libc::c_int; + pub fn OGR_G_Union(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldCount(arg1: OGRFeatureH) -> libc::c_int; + pub fn OGR_G_UnionCascaded(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldDefnRef(arg1: OGRFeatureH, arg2: libc::c_int) -> OGRFieldDefnH; + pub fn OGR_G_PointOnSurface(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldIndex(arg1: OGRFeatureH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_G_Difference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_IsFieldSet(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; + pub fn OGR_G_SymDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_UnsetField(arg1: OGRFeatureH, arg2: libc::c_int); + pub fn OGR_G_Distance(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; } extern "C" { - pub fn OGR_F_IsFieldNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; + pub fn OGR_G_Distance3D(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; } extern "C" { - pub fn OGR_F_IsFieldSetAndNotNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; + pub fn OGR_G_Length(arg1: OGRGeometryH) -> f64; } extern "C" { - pub fn OGR_F_SetFieldNull(arg1: OGRFeatureH, arg2: libc::c_int); + pub fn OGR_G_Area(arg1: OGRGeometryH) -> f64; } extern "C" { - pub fn OGR_F_GetRawFieldRef(arg1: OGRFeatureH, arg2: libc::c_int) -> *mut OGRField; + pub fn OGR_G_Centroid(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_RawField_IsUnset(arg1: *const OGRField) -> libc::c_int; + pub fn OGR_G_Value(arg1: OGRGeometryH, dfDistance: f64) -> OGRGeometryH; } extern "C" { - pub fn OGR_RawField_IsNull(arg1: *const OGRField) -> libc::c_int; + pub fn OGR_G_Empty(arg1: OGRGeometryH); } extern "C" { - pub fn OGR_RawField_SetUnset(arg1: *mut OGRField); + pub fn OGR_G_IsEmpty(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_RawField_SetNull(arg1: *mut OGRField); + pub fn OGR_G_IsValid(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFieldAsInteger(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; + pub fn OGR_G_IsSimple(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFieldAsInteger64(arg1: OGRFeatureH, arg2: libc::c_int) -> GIntBig; + pub fn OGR_G_IsRing(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFieldAsDouble(arg1: OGRFeatureH, arg2: libc::c_int) -> f64; + pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsString(arg1: OGRFeatureH, arg2: libc::c_int) -> *const libc::c_char; + #[doc = " @cond Doxygen_Suppress"] + pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFieldAsIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const libc::c_int; + pub fn OGR_G_Equal(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFieldAsInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const GIntBig; + pub fn OGR_G_SymmetricDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const f64; + pub fn OGR_G_GetArea(arg1: OGRGeometryH) -> f64; } extern "C" { - pub fn OGR_F_GetFieldAsStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - ) -> *mut *mut libc::c_char; + pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *mut GByte; + #[doc = " @endcond"] + pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFieldAsDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - arg4: *mut libc::c_int, - arg5: *mut libc::c_int, - arg6: *mut libc::c_int, - arg7: *mut libc::c_int, - arg8: *mut libc::c_int, - arg9: *mut libc::c_int, + pub fn OGR_G_GetPoints( + hGeom: OGRGeometryH, + pabyX: *mut libc::c_void, + nXStride: libc::c_int, + pabyY: *mut libc::c_void, + nYStride: libc::c_int, + pabyZ: *mut libc::c_void, + nZStride: libc::c_int, ) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFieldAsDateTimeEx( - hFeat: OGRFeatureH, - iField: libc::c_int, - pnYear: *mut libc::c_int, - pnMonth: *mut libc::c_int, - pnDay: *mut libc::c_int, - pnHour: *mut libc::c_int, - pnMinute: *mut libc::c_int, - pfSecond: *mut f32, - pnTZFlag: *mut libc::c_int, + pub fn OGR_G_GetPointsZM( + hGeom: OGRGeometryH, + pabyX: *mut libc::c_void, + nXStride: libc::c_int, + pabyY: *mut libc::c_void, + nYStride: libc::c_int, + pabyZ: *mut libc::c_void, + nZStride: libc::c_int, + pabyM: *mut libc::c_void, + nMStride: libc::c_int, ) -> libc::c_int; } extern "C" { - pub fn OGR_F_SetFieldInteger(arg1: OGRFeatureH, arg2: libc::c_int, arg3: libc::c_int); + pub fn OGR_G_GetX(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_F_SetFieldInteger64(arg1: OGRFeatureH, arg2: libc::c_int, arg3: GIntBig); + pub fn OGR_G_GetY(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_F_SetFieldDouble(arg1: OGRFeatureH, arg2: libc::c_int, arg3: f64); + pub fn OGR_G_GetZ(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_F_SetFieldString(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *const libc::c_char); + pub fn OGR_G_GetM(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_F_SetFieldIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_int, + pub fn OGR_G_GetPoint( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: *mut f64, + arg3: *mut f64, + arg4: *mut f64, ); } extern "C" { - pub fn OGR_F_SetFieldInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const GIntBig, + pub fn OGR_G_GetPointZM( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: *mut f64, + arg3: *mut f64, + arg4: *mut f64, + arg5: *mut f64, ); } extern "C" { - pub fn OGR_F_SetFieldDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const f64, - ); + pub fn OGR_G_SetPointCount(hGeom: OGRGeometryH, nNewPointCount: libc::c_int); } extern "C" { - pub fn OGR_F_SetFieldStringList(arg1: OGRFeatureH, arg2: libc::c_int, arg3: CSLConstList); + pub fn OGR_G_SetPoint(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64, arg4: f64); } extern "C" { - pub fn OGR_F_SetFieldRaw(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *mut OGRField); + pub fn OGR_G_SetPoint_2D(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64); } extern "C" { - pub fn OGR_F_SetFieldBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut GByte, + pub fn OGR_G_SetPointM( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: f64, + arg3: f64, + arg4: f64, ); } extern "C" { - pub fn OGR_F_SetFieldDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, + pub fn OGR_G_SetPointZM( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: f64, + arg3: f64, + arg4: f64, + arg5: f64, ); } extern "C" { - pub fn OGR_F_SetFieldDateTimeEx( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: f32, - arg9: libc::c_int, - ); + pub fn OGR_G_AddPoint(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); } extern "C" { - pub fn OGR_F_GetGeomFieldCount(hFeat: OGRFeatureH) -> libc::c_int; + pub fn OGR_G_AddPoint_2D(arg1: OGRGeometryH, arg2: f64, arg3: f64); } extern "C" { - pub fn OGR_F_GetGeomFieldDefnRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeomFieldDefnH; + pub fn OGR_G_AddPointM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); } extern "C" { - pub fn OGR_F_GetGeomFieldIndex(hFeat: OGRFeatureH, pszName: *const libc::c_char) - -> libc::c_int; + pub fn OGR_G_AddPointZM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); } extern "C" { - pub fn OGR_F_GetGeomFieldRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeometryH; + pub fn OGR_G_SetPoints( + hGeom: OGRGeometryH, + nPointsIn: libc::c_int, + pabyX: *const libc::c_void, + nXStride: libc::c_int, + pabyY: *const libc::c_void, + nYStride: libc::c_int, + pabyZ: *const libc::c_void, + nZStride: libc::c_int, + ); } extern "C" { - pub fn OGR_F_SetGeomFieldDirectly( - hFeat: OGRFeatureH, - iField: libc::c_int, + pub fn OGR_G_SetPointsZM( hGeom: OGRGeometryH, - ) -> OGRErr::Type; + nPointsIn: libc::c_int, + pabyX: *const libc::c_void, + nXStride: libc::c_int, + pabyY: *const libc::c_void, + nYStride: libc::c_int, + pabyZ: *const libc::c_void, + nZStride: libc::c_int, + pabyM: *const libc::c_void, + nMStride: libc::c_int, + ); } extern "C" { - pub fn OGR_F_SetGeomField( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; + pub fn OGR_G_SwapXY(hGeom: OGRGeometryH); } extern "C" { - pub fn OGR_F_GetFID(arg1: OGRFeatureH) -> GIntBig; + pub fn OGR_G_GetGeometryCount(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_SetFID(arg1: OGRFeatureH, arg2: GIntBig) -> OGRErr::Type; + pub fn OGR_G_GetGeometryRef(arg1: OGRGeometryH, arg2: libc::c_int) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_DumpReadable(arg1: OGRFeatureH, arg2: *mut FILE); + pub fn OGR_G_AddGeometry(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn OGR_F_SetFrom(arg1: OGRFeatureH, arg2: OGRFeatureH, arg3: libc::c_int) -> OGRErr::Type; + pub fn OGR_G_AddGeometryDirectly(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn OGR_F_SetFromWithMap( - arg1: OGRFeatureH, - arg2: OGRFeatureH, + pub fn OGR_G_RemoveGeometry( + arg1: OGRGeometryH, + arg2: libc::c_int, arg3: libc::c_int, - arg4: *const libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OGR_F_GetStyleString(arg1: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_SetStyleString(arg1: OGRFeatureH, arg2: *const libc::c_char); + pub fn OGR_G_HasCurveGeometry( + arg1: OGRGeometryH, + bLookForNonLinear: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); + pub fn OGR_G_GetLinearGeometry( + hGeom: OGRGeometryH, + dfMaxAngleStepSizeDegrees: f64, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; } extern "C" { - #[doc = " Return style table"] - pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; + pub fn OGR_G_GetCurveGeometry( + hGeom: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; } extern "C" { - #[doc = " Set style table and take ownership"] - pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); + pub fn OGRBuildPolygonFromEdges( + hLinesAsCollection: OGRGeometryH, + bBestEffort: libc::c_int, + bAutoClose: libc::c_int, + dfTolerance: f64, + peErr: *mut OGRErr::Type, + ) -> OGRGeometryH; } extern "C" { - #[doc = " Set style table"] - pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); + #[doc = " @cond Doxygen_Suppress"] + pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( + bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_F_GetNativeData(arg1: OGRFeatureH) -> *const libc::c_char; + pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; } extern "C" { - pub fn OGR_F_SetNativeData(arg1: OGRFeatureH, arg2: *const libc::c_char); + #[doc = " @endcond"] + pub fn OGRSetNonLinearGeometriesEnabledFlag(bFlag: libc::c_int); } extern "C" { - pub fn OGR_F_GetNativeMediaType(arg1: OGRFeatureH) -> *const libc::c_char; + pub fn OGRGetNonLinearGeometriesEnabledFlag() -> libc::c_int; +} +#[doc = " Opaque type for a field definition (OGRFieldDefn)"] +pub type OGRFieldDefnH = *mut libc::c_void; +#[doc = " Opaque type for a feature definition (OGRFeatureDefn)"] +pub type OGRFeatureDefnH = *mut libc::c_void; +#[doc = " Opaque type for a feature (OGRFeature)"] +pub type OGRFeatureH = *mut libc::c_void; +#[doc = " Opaque type for a style table (OGRStyleTable)"] +pub type OGRStyleTableH = *mut libc::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRGeomFieldDefnHS { + _unused: [u8; 0], } +#[doc = " Opaque type for a geometry field definition (OGRGeomFieldDefn)"] +pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; extern "C" { - pub fn OGR_F_SetNativeMediaType(arg1: OGRFeatureH, arg2: *const libc::c_char); + pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; } extern "C" { - pub fn OGR_F_FillUnsetWithDefault( - hFeat: OGRFeatureH, - bNotNullableOnly: libc::c_int, - papszOptions: *mut *mut libc::c_char, - ); + pub fn OGR_Fld_Destroy(arg1: OGRFieldDefnH); } extern "C" { - pub fn OGR_F_Validate( - arg1: OGRFeatureH, - nValidateFlags: libc::c_int, - bEmitError: libc::c_int, - ) -> libc::c_int; + pub fn OGR_Fld_SetName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); } -#[doc = " Opaque type for a layer (OGRLayer)"] -pub type OGRLayerH = *mut libc::c_void; -#[doc = " Opaque type for a OGR datasource (OGRDataSource)"] -pub type OGRDataSourceH = *mut libc::c_void; -#[doc = " Opaque type for a OGR driver (OGRSFDriver)"] -pub type OGRSFDriverH = *mut libc::c_void; extern "C" { - pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; + pub fn OGR_Fld_GetNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; } extern "C" { - pub fn OGR_L_GetGeomType(arg1: OGRLayerH) -> OGRwkbGeometryType::Type; + pub fn OGR_Fld_GetType(arg1: OGRFieldDefnH) -> OGRFieldType::Type; } extern "C" { - pub fn OGR_L_GetSpatialFilter(arg1: OGRLayerH) -> OGRGeometryH; + pub fn OGR_Fld_SetType(arg1: OGRFieldDefnH, arg2: OGRFieldType::Type); } extern "C" { - pub fn OGR_L_SetSpatialFilter(arg1: OGRLayerH, arg2: OGRGeometryH); + pub fn OGR_Fld_GetSubType(arg1: OGRFieldDefnH) -> OGRFieldSubType::Type; } extern "C" { - pub fn OGR_L_SetSpatialFilterRect(arg1: OGRLayerH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); + pub fn OGR_Fld_SetSubType(arg1: OGRFieldDefnH, arg2: OGRFieldSubType::Type); } extern "C" { - pub fn OGR_L_SetSpatialFilterEx(arg1: OGRLayerH, iGeomField: libc::c_int, hGeom: OGRGeometryH); + pub fn OGR_Fld_GetJustify(arg1: OGRFieldDefnH) -> OGRJustification::Type; } extern "C" { - pub fn OGR_L_SetSpatialFilterRectEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - dfMinX: f64, - dfMinY: f64, - dfMaxX: f64, - dfMaxY: f64, - ); + pub fn OGR_Fld_SetJustify(arg1: OGRFieldDefnH, arg2: OGRJustification::Type); } extern "C" { - pub fn OGR_L_SetAttributeFilter(arg1: OGRLayerH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OGR_Fld_GetWidth(arg1: OGRFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_ResetReading(arg1: OGRLayerH); + pub fn OGR_Fld_SetWidth(arg1: OGRFieldDefnH, arg2: libc::c_int); } extern "C" { - pub fn OGR_L_GetNextFeature(arg1: OGRLayerH) -> OGRFeatureH; + pub fn OGR_Fld_GetPrecision(arg1: OGRFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_SetNextByIndex(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; + pub fn OGR_Fld_SetPrecision(arg1: OGRFieldDefnH, arg2: libc::c_int); } extern "C" { - pub fn OGR_L_GetFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRFeatureH; + pub fn OGR_Fld_Set( + arg1: OGRFieldDefnH, + arg2: *const libc::c_char, + arg3: OGRFieldType::Type, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: OGRJustification::Type, + ); } extern "C" { - pub fn OGR_L_SetFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; + pub fn OGR_Fld_IsIgnored(hDefn: OGRFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_CreateFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; + pub fn OGR_Fld_SetIgnored(hDefn: OGRFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn OGR_L_DeleteFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; + pub fn OGR_Fld_IsNullable(hDefn: OGRFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_GetLayerDefn(arg1: OGRLayerH) -> OGRFeatureDefnH; + pub fn OGR_Fld_SetNullable(hDefn: OGRFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn OGR_L_GetSpatialRef(arg1: OGRLayerH) -> OGRSpatialReferenceH; + pub fn OGR_Fld_GetDefault(hDefn: OGRFieldDefnH) -> *const libc::c_char; } extern "C" { - pub fn OGR_L_FindFieldIndex( - arg1: OGRLayerH, - arg2: *const libc::c_char, - bExactMatch: libc::c_int, - ) -> libc::c_int; + pub fn OGR_Fld_SetDefault(hDefn: OGRFieldDefnH, arg1: *const libc::c_char); } extern "C" { - pub fn OGR_L_GetFeatureCount(arg1: OGRLayerH, arg2: libc::c_int) -> GIntBig; + pub fn OGR_Fld_IsDefaultDriverSpecific(hDefn: OGRFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_GetExtent( - arg1: OGRLayerH, - arg2: *mut OGREnvelope, - arg3: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_GetFieldTypeName(arg1: OGRFieldType::Type) -> *const libc::c_char; } extern "C" { - pub fn OGR_L_GetExtentEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - psExtent: *mut OGREnvelope, - bForce: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_GetFieldSubTypeName(arg1: OGRFieldSubType::Type) -> *const libc::c_char; } extern "C" { - pub fn OGR_L_TestCapability(arg1: OGRLayerH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_AreTypeSubTypeCompatible( + eType: OGRFieldType::Type, + eSubType: OGRFieldSubType::Type, + ) -> libc::c_int; } extern "C" { - pub fn OGR_L_CreateField( - arg1: OGRLayerH, - arg2: OGRFieldDefnH, - arg3: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_GFld_Create( + arg1: *const libc::c_char, + arg2: OGRwkbGeometryType::Type, + ) -> OGRGeomFieldDefnH; } extern "C" { - pub fn OGR_L_CreateGeomField( - hLayer: OGRLayerH, - hFieldDefn: OGRGeomFieldDefnH, - bForce: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_GFld_Destroy(arg1: OGRGeomFieldDefnH); } extern "C" { - pub fn OGR_L_DeleteField(arg1: OGRLayerH, iField: libc::c_int) -> OGRErr::Type; + pub fn OGR_GFld_SetName(arg1: OGRGeomFieldDefnH, arg2: *const libc::c_char); } extern "C" { - pub fn OGR_L_ReorderFields(arg1: OGRLayerH, panMap: *mut libc::c_int) -> OGRErr::Type; + pub fn OGR_GFld_GetNameRef(arg1: OGRGeomFieldDefnH) -> *const libc::c_char; } extern "C" { - pub fn OGR_L_ReorderField( - arg1: OGRLayerH, - iOldFieldPos: libc::c_int, - iNewFieldPos: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_GFld_GetType(arg1: OGRGeomFieldDefnH) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_L_AlterFieldDefn( - arg1: OGRLayerH, - iField: libc::c_int, - hNewFieldDefn: OGRFieldDefnH, - nFlags: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_GFld_SetType(arg1: OGRGeomFieldDefnH, arg2: OGRwkbGeometryType::Type); } extern "C" { - pub fn OGR_L_StartTransaction(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_GFld_GetSpatialRef(arg1: OGRGeomFieldDefnH) -> OGRSpatialReferenceH; } extern "C" { - pub fn OGR_L_CommitTransaction(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_GFld_SetSpatialRef(arg1: OGRGeomFieldDefnH, hSRS: OGRSpatialReferenceH); } extern "C" { - pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_GFld_IsNullable(hDefn: OGRGeomFieldDefnH) -> libc::c_int; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; + pub fn OGR_GFld_SetNullable(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn OGR_L_Dereference(arg1: OGRLayerH) -> libc::c_int; + pub fn OGR_GFld_IsIgnored(hDefn: OGRGeomFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; + pub fn OGR_GFld_SetIgnored(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); } extern "C" { - #[doc = " @endcond"] - pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_FD_Create(arg1: *const libc::c_char) -> OGRFeatureDefnH; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; + pub fn OGR_FD_Destroy(arg1: OGRFeatureDefnH); } extern "C" { - #[doc = " @endcond"] - pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; + pub fn OGR_FD_Release(arg1: OGRFeatureDefnH); } extern "C" { - pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; + pub fn OGR_FD_GetName(arg1: OGRFeatureDefnH) -> *const libc::c_char; } extern "C" { - #[doc = " Get style table"] - pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; + pub fn OGR_FD_GetFieldCount(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - #[doc = " Set style table (and take ownership)"] - pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); + pub fn OGR_FD_GetFieldDefn(arg1: OGRFeatureDefnH, arg2: libc::c_int) -> OGRFieldDefnH; } extern "C" { - #[doc = " Set style table"] - pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); + pub fn OGR_FD_GetFieldIndex(arg1: OGRFeatureDefnH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_L_SetIgnoredFields(arg1: OGRLayerH, arg2: *mut *const libc::c_char) -> OGRErr::Type; + pub fn OGR_FD_AddFieldDefn(arg1: OGRFeatureDefnH, arg2: OGRFieldDefnH); } extern "C" { - pub fn OGR_L_Intersection( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_FD_DeleteFieldDefn(hDefn: OGRFeatureDefnH, iField: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_Union( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, + pub fn OGR_FD_ReorderFieldDefns( + hDefn: OGRFeatureDefnH, + panMap: *mut libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_SymDifference( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_FD_GetGeomType(arg1: OGRFeatureDefnH) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_L_Identity( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_FD_SetGeomType(arg1: OGRFeatureDefnH, arg2: OGRwkbGeometryType::Type); } extern "C" { - pub fn OGR_L_Update( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_FD_IsGeometryIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_Clip( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_FD_SetGeometryIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); } extern "C" { - pub fn OGR_L_Erase( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_FD_IsStyleIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_DS_Destroy(arg1: OGRDataSourceH); + pub fn OGR_FD_SetStyleIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); } extern "C" { - pub fn OGR_DS_GetName(arg1: OGRDataSourceH) -> *const libc::c_char; + pub fn OGR_FD_Reference(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_DS_GetLayerCount(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_FD_Dereference(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_DS_GetLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRLayerH; + pub fn OGR_FD_GetReferenceCount(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_DS_GetLayerByName(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> OGRLayerH; + pub fn OGR_FD_GetGeomFieldCount(hFDefn: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_DS_DeleteLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRErr::Type; + pub fn OGR_FD_GetGeomFieldDefn(hFDefn: OGRFeatureDefnH, i: libc::c_int) -> OGRGeomFieldDefnH; } extern "C" { - pub fn OGR_DS_GetDriver(arg1: OGRDataSourceH) -> OGRSFDriverH; + pub fn OGR_FD_GetGeomFieldIndex( + hFDefn: OGRFeatureDefnH, + pszName: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OGR_DS_CreateLayer( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: *mut *mut libc::c_char, - ) -> OGRLayerH; + pub fn OGR_FD_AddGeomFieldDefn(hFDefn: OGRFeatureDefnH, hGFldDefn: OGRGeomFieldDefnH); } extern "C" { - pub fn OGR_DS_CopyLayer( - arg1: OGRDataSourceH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRLayerH; + pub fn OGR_FD_DeleteGeomFieldDefn( + hFDefn: OGRFeatureDefnH, + iGeomField: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_DS_TestCapability(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_FD_IsSame(hFDefn: OGRFeatureDefnH, hOtherFDefn: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_DS_ExecuteSQL( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; + pub fn OGR_F_Create(arg1: OGRFeatureDefnH) -> OGRFeatureH; } extern "C" { - pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); + pub fn OGR_F_Destroy(arg1: OGRFeatureH); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_F_GetDefnRef(arg1: OGRFeatureH) -> OGRFeatureDefnH; } extern "C" { - pub fn OGR_DS_Dereference(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_F_SetGeometryDirectly(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn OGR_DS_GetRefCount(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_F_SetGeometry(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_F_GetGeometryRef(arg1: OGRFeatureH) -> OGRGeometryH; } extern "C" { - #[doc = " @endcond */"] - pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; + pub fn OGR_F_StealGeometry(arg1: OGRFeatureH) -> OGRGeometryH; } extern "C" { - #[doc = " Get style table"] - pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; + pub fn OGR_F_Clone(arg1: OGRFeatureH) -> OGRFeatureH; } extern "C" { - #[doc = " Set style table (and take ownership)"] - pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); + pub fn OGR_F_Equal(arg1: OGRFeatureH, arg2: OGRFeatureH) -> libc::c_int; } extern "C" { - #[doc = " Set style table"] - pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); + pub fn OGR_F_GetFieldCount(arg1: OGRFeatureH) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_GetName(arg1: OGRSFDriverH) -> *const libc::c_char; + pub fn OGR_F_GetFieldDefnRef(arg1: OGRFeatureH, arg2: libc::c_int) -> OGRFieldDefnH; } extern "C" { - pub fn OGR_Dr_Open( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> OGRDataSourceH; + pub fn OGR_F_GetFieldIndex(arg1: OGRFeatureH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_TestCapability(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_F_IsFieldSet(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_CreateDataSource( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> OGRDataSourceH; + pub fn OGR_F_UnsetField(arg1: OGRFeatureH, arg2: libc::c_int); } extern "C" { - pub fn OGR_Dr_CopyDataSource( - arg1: OGRSFDriverH, - arg2: OGRDataSourceH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRDataSourceH; + pub fn OGR_F_IsFieldNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OGR_F_IsFieldSetAndNotNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGROpen( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; + pub fn OGR_F_SetFieldNull(arg1: OGRFeatureH, arg2: libc::c_int); } extern "C" { - pub fn OGROpenShared( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; + pub fn OGR_F_GetRawFieldRef(arg1: OGRFeatureH, arg2: libc::c_int) -> *mut OGRField; } extern "C" { - pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; + pub fn OGR_RawField_IsUnset(arg1: *const OGRField) -> libc::c_int; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRRegisterDriver(arg1: OGRSFDriverH); + pub fn OGR_RawField_IsNull(arg1: *const OGRField) -> libc::c_int; } extern "C" { - pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); + pub fn OGR_RawField_SetUnset(arg1: *mut OGRField); } extern "C" { - #[doc = " @endcond"] - pub fn OGRGetDriverCount() -> libc::c_int; + pub fn OGR_RawField_SetNull(arg1: *mut OGRField); } extern "C" { - pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; + pub fn OGR_F_GetFieldAsInteger(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; + pub fn OGR_F_GetFieldAsInteger64(arg1: OGRFeatureH, arg2: libc::c_int) -> GIntBig; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRGetOpenDSCount() -> libc::c_int; + pub fn OGR_F_GetFieldAsDouble(arg1: OGRFeatureH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; + pub fn OGR_F_GetFieldAsString(arg1: OGRFeatureH, arg2: libc::c_int) -> *const libc::c_char; } extern "C" { - #[doc = " @endcond"] - pub fn OGRRegisterAll(); + pub fn OGR_F_GetFieldAsIntegerList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *const libc::c_int; } extern "C" { - #[doc = " Clean-up all drivers (including raster ones starting with GDAL 2.0."] - #[doc = " See GDALDestroyDriverManager()"] - pub fn OGRCleanupAll(); + pub fn OGR_F_GetFieldAsInteger64List( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *const GIntBig; } -#[doc = " Style manager opaque type"] -pub type OGRStyleMgrH = *mut libc::c_void; -#[doc = " Style tool opaque type"] -pub type OGRStyleToolH = *mut libc::c_void; extern "C" { - pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; + pub fn OGR_F_GetFieldAsDoubleList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *const f64; } extern "C" { - pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); + pub fn OGR_F_GetFieldAsStringList( + arg1: OGRFeatureH, + arg2: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; + pub fn OGR_F_GetFieldAsBinary( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *mut GByte; } extern "C" { - pub fn OGR_SM_InitStyleString( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, + pub fn OGR_F_GetFieldAsDateTime( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + arg4: *mut libc::c_int, + arg5: *mut libc::c_int, + arg6: *mut libc::c_int, + arg7: *mut libc::c_int, + arg8: *mut libc::c_int, + arg9: *mut libc::c_int, ) -> libc::c_int; } extern "C" { - pub fn OGR_SM_GetPartCount( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, + pub fn OGR_F_GetFieldAsDateTimeEx( + hFeat: OGRFeatureH, + iField: libc::c_int, + pnYear: *mut libc::c_int, + pnMonth: *mut libc::c_int, + pnDay: *mut libc::c_int, + pnHour: *mut libc::c_int, + pnMinute: *mut libc::c_int, + pfSecond: *mut f32, + pnTZFlag: *mut libc::c_int, ) -> libc::c_int; } extern "C" { - pub fn OGR_SM_GetPart( - hSM: OGRStyleMgrH, - nPartId: libc::c_int, - pszStyleString: *const libc::c_char, - ) -> OGRStyleToolH; + pub fn OGR_F_SetFieldInteger(arg1: OGRFeatureH, arg2: libc::c_int, arg3: libc::c_int); } extern "C" { - pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; + pub fn OGR_F_SetFieldInteger64(arg1: OGRFeatureH, arg2: libc::c_int, arg3: GIntBig); } extern "C" { - pub fn OGR_SM_AddStyle( - hSM: OGRStyleMgrH, - pszStyleName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_F_SetFieldDouble(arg1: OGRFeatureH, arg2: libc::c_int, arg3: f64); } extern "C" { - pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; + pub fn OGR_F_SetFieldString(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *const libc::c_char); } extern "C" { - pub fn OGR_ST_Destroy(hST: OGRStyleToolH); + pub fn OGR_F_SetFieldIntegerList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const libc::c_int, + ); } extern "C" { - pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; + pub fn OGR_F_SetFieldInteger64List( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const GIntBig, + ); } extern "C" { - pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; + pub fn OGR_F_SetFieldDoubleList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const f64, + ); } extern "C" { - pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); + pub fn OGR_F_SetFieldStringList(arg1: OGRFeatureH, arg2: libc::c_int, arg3: CSLConstList); } extern "C" { - pub fn OGR_ST_GetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> *const libc::c_char; + pub fn OGR_F_SetFieldRaw(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *mut OGRField); } extern "C" { - pub fn OGR_ST_GetParamNum( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> libc::c_int; + pub fn OGR_F_SetFieldBinary( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *mut GByte, + ); } extern "C" { - pub fn OGR_ST_GetParamDbl( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> f64; + pub fn OGR_F_SetFieldDateTime( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: libc::c_int, + arg9: libc::c_int, + ); } extern "C" { - pub fn OGR_ST_SetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - pszValue: *const libc::c_char, + pub fn OGR_F_SetFieldDateTimeEx( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: f32, + arg9: libc::c_int, ); } extern "C" { - pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); + pub fn OGR_F_GetGeomFieldCount(hFeat: OGRFeatureH) -> libc::c_int; } extern "C" { - pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); + pub fn OGR_F_GetGeomFieldDefnRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeomFieldDefnH; } extern "C" { - pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; + pub fn OGR_F_GetGeomFieldIndex(hFeat: OGRFeatureH, pszName: *const libc::c_char) + -> libc::c_int; } extern "C" { - pub fn OGR_ST_GetRGBFromString( - hST: OGRStyleToolH, - pszColor: *const libc::c_char, - pnRed: *mut libc::c_int, - pnGreen: *mut libc::c_int, - pnBlue: *mut libc::c_int, - pnAlpha: *mut libc::c_int, - ) -> libc::c_int; + pub fn OGR_F_GetGeomFieldRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeometryH; } extern "C" { - pub fn OGR_STBL_Create() -> OGRStyleTableH; + pub fn OGR_F_SetGeomFieldDirectly( + hFeat: OGRFeatureH, + iField: libc::c_int, + hGeom: OGRGeometryH, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); + pub fn OGR_F_SetGeomField( + hFeat: OGRFeatureH, + iField: libc::c_int, + hGeom: OGRGeometryH, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_STBL_AddStyle( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_F_GetFID(arg1: OGRFeatureH) -> GIntBig; } extern "C" { - pub fn OGR_STBL_SaveStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_F_SetFID(arg1: OGRFeatureH, arg2: GIntBig) -> OGRErr::Type; } extern "C" { - pub fn OGR_STBL_LoadStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_F_DumpReadable(arg1: OGRFeatureH, arg2: *mut FILE); } extern "C" { - pub fn OGR_STBL_Find( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - ) -> *const libc::c_char; + pub fn OGR_F_SetFrom(arg1: OGRFeatureH, arg2: OGRFeatureH, arg3: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); + pub fn OGR_F_SetFromWithMap( + arg1: OGRFeatureH, + arg2: OGRFeatureH, + arg3: libc::c_int, + arg4: *const libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; + pub fn OGR_F_GetStyleString(arg1: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; + pub fn OGR_F_SetStyleString(arg1: OGRFeatureH, arg2: *const libc::c_char); } -pub mod GDALDataType { - #[doc = " Pixel data types"] - pub type Type = u32; - #[doc = " Unknown or unspecified type"] - pub const GDT_Unknown: Type = 0; - #[doc = " Eight bit unsigned integer"] - pub const GDT_Byte: Type = 1; - #[doc = " Sixteen bit unsigned integer"] - pub const GDT_UInt16: Type = 2; - #[doc = " Sixteen bit signed integer"] - pub const GDT_Int16: Type = 3; - #[doc = " Thirty two bit unsigned integer"] - pub const GDT_UInt32: Type = 4; - #[doc = " Thirty two bit signed integer"] - pub const GDT_Int32: Type = 5; - #[doc = " Thirty two bit floating point"] - pub const GDT_Float32: Type = 6; - #[doc = " Sixty four bit floating point"] - pub const GDT_Float64: Type = 7; - #[doc = " Complex Int16"] - pub const GDT_CInt16: Type = 8; - #[doc = " Complex Int32"] - pub const GDT_CInt32: Type = 9; - #[doc = " Complex Float32"] - pub const GDT_CFloat32: Type = 10; - #[doc = " Complex Float64"] - pub const GDT_CFloat64: Type = 11; - #[doc = " Complex Float64"] - pub const GDT_TypeCount: Type = 12; +extern "C" { + pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); } extern "C" { - pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; + #[doc = " Return style table"] + pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; } extern "C" { - pub fn GDALGetDataTypeSizeBits(eDataType: GDALDataType::Type) -> libc::c_int; + #[doc = " Set style table and take ownership"] + pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALGetDataTypeSizeBytes(arg1: GDALDataType::Type) -> libc::c_int; + #[doc = " Set style table"] + pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_GetNativeData(arg1: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn GDALDataTypeIsInteger(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_SetNativeData(arg1: OGRFeatureH, arg2: *const libc::c_char); } extern "C" { - pub fn GDALDataTypeIsFloating(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_GetNativeMediaType(arg1: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn GDALDataTypeIsSigned(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_SetNativeMediaType(arg1: OGRFeatureH, arg2: *const libc::c_char); } extern "C" { - pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; + pub fn OGR_F_FillUnsetWithDefault( + hFeat: OGRFeatureH, + bNotNullableOnly: libc::c_int, + papszOptions: *mut *mut libc::c_char, + ); } extern "C" { - pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; + pub fn OGR_F_Validate( + arg1: OGRFeatureH, + nValidateFlags: libc::c_int, + bEmitError: libc::c_int, + ) -> libc::c_int; } +#[doc = " Opaque type for a layer (OGRLayer)"] +pub type OGRLayerH = *mut libc::c_void; +#[doc = " Opaque type for a OGR datasource (OGRDataSource)"] +pub type OGRDataSourceH = *mut libc::c_void; +#[doc = " Opaque type for a OGR driver (OGRSFDriver)"] +pub type OGRSFDriverH = *mut libc::c_void; extern "C" { - pub fn GDALDataTypeUnion( - arg1: GDALDataType::Type, - arg2: GDALDataType::Type, - ) -> GDALDataType::Type; + pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { - pub fn GDALDataTypeUnionWithValue( - eDT: GDALDataType::Type, - dValue: f64, - bComplex: libc::c_int, - ) -> GDALDataType::Type; + pub fn OGR_L_GetGeomType(arg1: OGRLayerH) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn GDALFindDataType( - nBits: libc::c_int, - bSigned: libc::c_int, - bFloating: libc::c_int, - bComplex: libc::c_int, - ) -> GDALDataType::Type; + pub fn OGR_L_GetSpatialFilter(arg1: OGRLayerH) -> OGRGeometryH; } extern "C" { - pub fn GDALFindDataTypeForValue(dValue: f64, bComplex: libc::c_int) -> GDALDataType::Type; + pub fn OGR_L_SetSpatialFilter(arg1: OGRLayerH, arg2: OGRGeometryH); } extern "C" { - pub fn GDALAdjustValueToDataType( - eDT: GDALDataType::Type, - dfValue: f64, - pbClamped: *mut libc::c_int, - pbRounded: *mut libc::c_int, - ) -> f64; + pub fn OGR_L_SetSpatialFilterRect(arg1: OGRLayerH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); } extern "C" { - pub fn GDALGetNonComplexDataType(arg1: GDALDataType::Type) -> GDALDataType::Type; + pub fn OGR_L_SetSpatialFilterEx(arg1: OGRLayerH, iGeomField: libc::c_int, hGeom: OGRGeometryH); } extern "C" { - pub fn GDALDataTypeIsConversionLossy( - eTypeFrom: GDALDataType::Type, - eTypeTo: GDALDataType::Type, - ) -> libc::c_int; + pub fn OGR_L_SetSpatialFilterRectEx( + arg1: OGRLayerH, + iGeomField: libc::c_int, + dfMinX: f64, + dfMinY: f64, + dfMaxX: f64, + dfMaxY: f64, + ); } -pub mod GDALAsyncStatusType { - #[doc = " status of the asynchronous stream"] - pub type Type = u32; - pub const GARIO_PENDING: Type = 0; - pub const GARIO_UPDATE: Type = 1; - pub const GARIO_ERROR: Type = 2; - pub const GARIO_COMPLETE: Type = 3; - pub const GARIO_TypeCount: Type = 4; +extern "C" { + pub fn OGR_L_SetAttributeFilter(arg1: OGRLayerH, arg2: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; + pub fn OGR_L_ResetReading(arg1: OGRLayerH); } extern "C" { - pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; + pub fn OGR_L_GetNextFeature(arg1: OGRLayerH) -> OGRFeatureH; } -pub mod GDALAccess { - #[doc = " Flag indicating read/write, or read-only access to data."] - pub type Type = u32; - #[doc = " Read only (no update) access"] - pub const GA_ReadOnly: Type = 0; - #[doc = " Read/write access."] - pub const GA_Update: Type = 1; +extern "C" { + pub fn OGR_L_SetNextByIndex(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; } -pub mod GDALRWFlag { - #[doc = " Read/Write flag for RasterIO() method"] - pub type Type = u32; - #[doc = " Read data"] - pub const GF_Read: Type = 0; - #[doc = " Write data"] - pub const GF_Write: Type = 1; +extern "C" { + pub fn OGR_L_GetFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRFeatureH; } -pub mod GDALRIOResampleAlg { - #[doc = " RasterIO() resampling method."] - #[doc = " @since GDAL 2.0"] - pub type Type = u32; - #[doc = " Nearest neighbour"] - pub const GRIORA_NearestNeighbour: Type = 0; - #[doc = " Bilinear (2x2 kernel)"] - pub const GRIORA_Bilinear: Type = 1; - #[doc = " Cubic Convolution Approximation (4x4 kernel)"] - pub const GRIORA_Cubic: Type = 2; - #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] - pub const GRIORA_CubicSpline: Type = 3; - #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] - pub const GRIORA_Lanczos: Type = 4; - #[doc = " Average"] - pub const GRIORA_Average: Type = 5; - #[doc = " Mode (selects the value which appears most often of all the sampled points)"] - pub const GRIORA_Mode: Type = 6; - #[doc = " Gauss blurring"] - pub const GRIORA_Gauss: Type = 7; +extern "C" { + pub fn OGR_L_SetFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; } -#[doc = " Structure to pass extra arguments to RasterIO() method"] -#[doc = " @since GDAL 2.0"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRasterIOExtraArg { - #[doc = " Version of structure (to allow future extensions of the structure)"] - pub nVersion: libc::c_int, - #[doc = " Resampling algorithm"] - pub eResampleAlg: GDALRIOResampleAlg::Type, - #[doc = " Progress callback"] - pub pfnProgress: GDALProgressFunc, - #[doc = " Progress callback user data"] - pub pProgressData: *mut libc::c_void, - #[doc = " Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set."] - #[doc = "Mostly reserved from the VRT driver to communicate a more precise"] - #[doc = "source window. Must be such that dfXOff - nXOff < 1.0 and"] - #[doc = "dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize < 1.0"] - pub bFloatingPointWindowValidity: libc::c_int, - #[doc = " Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfXOff: f64, - #[doc = " Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfYOff: f64, - #[doc = " Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfXSize: f64, - #[doc = " Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfYSize: f64, -} -#[test] -fn bindgen_test_layout_GDALRasterIOExtraArg() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(nVersion) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnProgress as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pProgressData as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pProgressData) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bFloatingPointWindowValidity - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(bFloatingPointWindowValidity) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYSize) - ) - ); -} -pub mod GDALColorInterp { - #[doc = " Types of color interpretation for raster bands."] - pub type Type = u32; - #[doc = " Undefined"] - pub const GCI_Undefined: Type = 0; - #[doc = " Greyscale"] - pub const GCI_GrayIndex: Type = 1; - #[doc = " Paletted (see associated color table)"] - pub const GCI_PaletteIndex: Type = 2; - #[doc = " Red band of RGBA image"] - pub const GCI_RedBand: Type = 3; - #[doc = " Green band of RGBA image"] - pub const GCI_GreenBand: Type = 4; - #[doc = " Blue band of RGBA image"] - pub const GCI_BlueBand: Type = 5; - #[doc = " Alpha (0=transparent, 255=opaque)"] - pub const GCI_AlphaBand: Type = 6; - #[doc = " Hue band of HLS image"] - pub const GCI_HueBand: Type = 7; - #[doc = " Saturation band of HLS image"] - pub const GCI_SaturationBand: Type = 8; - #[doc = " Lightness band of HLS image"] - pub const GCI_LightnessBand: Type = 9; - #[doc = " Cyan band of CMYK image"] - pub const GCI_CyanBand: Type = 10; - #[doc = " Magenta band of CMYK image"] - pub const GCI_MagentaBand: Type = 11; - #[doc = " Yellow band of CMYK image"] - pub const GCI_YellowBand: Type = 12; - #[doc = " Black band of CMLY image"] - pub const GCI_BlackBand: Type = 13; - #[doc = " Y Luminance"] - pub const GCI_YCbCr_YBand: Type = 14; - #[doc = " Cb Chroma"] - pub const GCI_YCbCr_CbBand: Type = 15; - #[doc = " Cr Chroma"] - pub const GCI_YCbCr_CrBand: Type = 16; - #[doc = " Max current value (equals to GCI_YCbCr_CrBand currently)"] - pub const GCI_Max: Type = 16; +extern "C" { + pub fn OGR_L_CreateFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; } extern "C" { - pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; + pub fn OGR_L_DeleteFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; } extern "C" { - pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; + pub fn OGR_L_GetLayerDefn(arg1: OGRLayerH) -> OGRFeatureDefnH; } -pub mod GDALPaletteInterp { - #[doc = " Types of color interpretations for a GDALColorTable."] - pub type Type = u32; - #[doc = " Grayscale (in GDALColorEntry.c1)"] - pub const GPI_Gray: Type = 0; - #[doc = " Red, Green, Blue and Alpha in (in c1, c2, c3 and c4)"] - pub const GPI_RGB: Type = 1; - #[doc = " Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)"] - pub const GPI_CMYK: Type = 2; - #[doc = " Hue, Lightness and Saturation (in c1, c2, and c3)"] - pub const GPI_HLS: Type = 3; +extern "C" { + pub fn OGR_L_GetSpatialRef(arg1: OGRLayerH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; + pub fn OGR_L_FindFieldIndex( + arg1: OGRLayerH, + arg2: *const libc::c_char, + bExactMatch: libc::c_int, + ) -> libc::c_int; } -#[doc = " Opaque type used for the C bindings of the C++ GDALMajorObject class"] -pub type GDALMajorObjectH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALDataset class"] -pub type GDALDatasetH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALRasterBand class"] -pub type GDALRasterBandH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALDriver class"] -pub type GDALDriverH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALColorTable class"] -pub type GDALColorTableH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class"] -pub type GDALRasterAttributeTableH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALAsyncReader class"] -pub type GDALAsyncReaderH = *mut libc::c_void; -#[doc = " Type to express pixel, line or band spacing. Signed 64 bit integer."] -pub type GSpacing = GIntBig; extern "C" { - pub fn GDALAllRegister(); + pub fn OGR_L_GetFeatureCount(arg1: OGRLayerH, arg2: libc::c_int) -> GIntBig; } extern "C" { - pub fn GDALCreate( - hDriver: GDALDriverH, - arg1: *const libc::c_char, - arg2: libc::c_int, + pub fn OGR_L_GetExtent( + arg1: OGRLayerH, + arg2: *mut OGREnvelope, arg3: libc::c_int, - arg4: libc::c_int, - arg5: GDALDataType::Type, - arg6: CSLConstList, - ) -> GDALDatasetH; + ) -> OGRErr::Type; } extern "C" { - pub fn GDALCreateCopy( - arg1: GDALDriverH, - arg2: *const libc::c_char, - arg3: GDALDatasetH, - arg4: libc::c_int, - arg5: CSLConstList, - arg6: GDALProgressFunc, - arg7: *mut libc::c_void, - ) -> GDALDatasetH; + pub fn OGR_L_GetExtentEx( + arg1: OGRLayerH, + iGeomField: libc::c_int, + psExtent: *mut OGREnvelope, + bForce: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALIdentifyDriver( - pszFilename: *const libc::c_char, - papszFileList: CSLConstList, - ) -> GDALDriverH; + pub fn OGR_L_TestCapability(arg1: OGRLayerH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALIdentifyDriverEx( - pszFilename: *const libc::c_char, - nIdentifyFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszFileList: *const *const libc::c_char, - ) -> GDALDriverH; -} + pub fn OGR_L_CreateField( + arg1: OGRLayerH, + arg2: OGRFieldDefnH, + arg3: libc::c_int, + ) -> OGRErr::Type; +} extern "C" { - pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; + pub fn OGR_L_CreateGeomField( + hLayer: OGRLayerH, + hFieldDefn: OGRGeomFieldDefnH, + bForce: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; + pub fn OGR_L_DeleteField(arg1: OGRLayerH, iField: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALOpenEx( - pszFilename: *const libc::c_char, - nOpenFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszOpenOptions: *const *const libc::c_char, - papszSiblingFiles: *const *const libc::c_char, - ) -> GDALDatasetH; + pub fn OGR_L_ReorderFields(arg1: OGRLayerH, panMap: *mut libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; + pub fn OGR_L_ReorderField( + arg1: OGRLayerH, + iOldFieldPos: libc::c_int, + iNewFieldPos: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; + pub fn OGR_L_AlterFieldDefn( + arg1: OGRLayerH, + iField: libc::c_int, + hNewFieldDefn: OGRFieldDefnH, + nFlags: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDriverCount() -> libc::c_int; + pub fn OGR_L_StartTransaction(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; + pub fn OGR_L_CommitTransaction(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALCreateDriver() -> GDALDriverH; + pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALDestroyDriver(arg1: GDALDriverH); + #[doc = " @cond Doxygen_Suppress"] + pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; } extern "C" { - pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; + pub fn OGR_L_Dereference(arg1: OGRLayerH) -> libc::c_int; } extern "C" { - pub fn GDALDeregisterDriver(arg1: GDALDriverH); + pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; } extern "C" { - pub fn GDALDestroyDriverManager(); + #[doc = " @endcond"] + pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALDestroy(); + #[doc = " @cond Doxygen_Suppress"] + pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; } extern "C" { - pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; + #[doc = " @endcond"] + pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { - pub fn GDALRenameDataset( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; + pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { - pub fn GDALCopyDatasetFiles( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; + #[doc = " Get style table"] + pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; } extern "C" { - pub fn GDALValidateCreationOptions( - arg1: GDALDriverH, - papszCreationOptions: CSLConstList, - ) -> libc::c_int; + #[doc = " Set style table (and take ownership)"] + pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; + #[doc = " Set style table"] + pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; + pub fn OGR_L_SetIgnoredFields(arg1: OGRLayerH, arg2: *mut *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; + pub fn OGR_L_Intersection( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; + pub fn OGR_L_Union( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } -#[doc = " Ground Control Point"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDAL_GCP { - #[doc = " Unique identifier, often numeric"] - pub pszId: *mut libc::c_char, - #[doc = " Informational message or \"\""] - pub pszInfo: *mut libc::c_char, - #[doc = " Pixel (x) location of GCP on raster"] - pub dfGCPPixel: f64, - #[doc = " Line (y) location of GCP on raster"] - pub dfGCPLine: f64, - #[doc = " X position of GCP in georeferenced space"] - pub dfGCPX: f64, - #[doc = " Y position of GCP in georeferenced space"] - pub dfGCPY: f64, - #[doc = " Elevation of GCP, or zero if not known"] - pub dfGCPZ: f64, +extern "C" { + pub fn OGR_L_SymDifference( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } -#[test] -fn bindgen_test_layout_GDAL_GCP() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(GDAL_GCP)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDAL_GCP)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszId) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszInfo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPPixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPLine) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPZ) - ) - ); +extern "C" { + pub fn OGR_L_Identity( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); + pub fn OGR_L_Update( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); + pub fn OGR_L_Clip( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; + pub fn OGR_L_Erase( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGCPsToGeoTransform( - nGCPCount: libc::c_int, - pasGCPs: *const GDAL_GCP, - padfGeoTransform: *mut f64, - bApproxOK: libc::c_int, - ) -> libc::c_int; + pub fn OGR_DS_Destroy(arg1: OGRDataSourceH); } extern "C" { - pub fn GDALInvGeoTransform( - padfGeoTransformIn: *mut f64, - padfInvGeoTransformOut: *mut f64, - ) -> libc::c_int; + pub fn OGR_DS_GetName(arg1: OGRDataSourceH) -> *const libc::c_char; } extern "C" { - pub fn GDALApplyGeoTransform( - arg1: *mut f64, - arg2: f64, - arg3: f64, - arg4: *mut f64, - arg5: *mut f64, - ); + pub fn OGR_DS_GetLayerCount(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALComposeGeoTransforms( - padfGeoTransform1: *const f64, - padfGeoTransform2: *const f64, - padfGeoTransformOut: *mut f64, - ); + pub fn OGR_DS_GetLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRLayerH; } extern "C" { - pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; + pub fn OGR_DS_GetLayerByName(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> OGRLayerH; } extern "C" { - pub fn GDALGetMetadata( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - ) -> *mut *mut libc::c_char; + pub fn OGR_DS_DeleteLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALSetMetadata( - arg1: GDALMajorObjectH, - arg2: CSLConstList, - arg3: *const libc::c_char, - ) -> CPLErr::Type; + pub fn OGR_DS_GetDriver(arg1: OGRDataSourceH) -> OGRSFDriverH; } extern "C" { - pub fn GDALGetMetadataItem( - arg1: GDALMajorObjectH, + pub fn OGR_DS_CreateLayer( + arg1: OGRDataSourceH, arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> *const libc::c_char; + arg3: OGRSpatialReferenceH, + arg4: OGRwkbGeometryType::Type, + arg5: *mut *mut libc::c_char, + ) -> OGRLayerH; } extern "C" { - pub fn GDALSetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, + pub fn OGR_DS_CopyLayer( + arg1: OGRDataSourceH, + arg2: OGRLayerH, arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> CPLErr::Type; + arg4: *mut *mut libc::c_char, + ) -> OGRLayerH; } extern "C" { - pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; + pub fn OGR_DS_TestCapability(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); + pub fn OGR_DS_ExecuteSQL( + arg1: OGRDataSourceH, + arg2: *const libc::c_char, + arg3: OGRGeometryH, + arg4: *const libc::c_char, + ) -> OGRLayerH; } extern "C" { - pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; + pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); } extern "C" { - pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; + #[doc = " @cond Doxygen_Suppress"] + pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALClose(arg1: GDALDatasetH); + pub fn OGR_DS_Dereference(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_DS_GetRefCount(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; + #[doc = " @endcond */"] + pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; } extern "C" { - pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; + #[doc = " Get style table"] + pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; } extern "C" { - pub fn GDALAddBand( - hDS: GDALDatasetH, - eType: GDALDataType::Type, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + #[doc = " Set style table (and take ownership)"] + pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALBeginAsyncReader( - hDS: GDALDatasetH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - pBuf: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - papszOptions: CSLConstList, - ) -> GDALAsyncReaderH; + #[doc = " Set style table"] + pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); + pub fn OGR_Dr_GetName(arg1: OGRSFDriverH) -> *const libc::c_char; } extern "C" { - pub fn GDALDatasetRasterIO( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - ) -> CPLErr::Type; + pub fn OGR_Dr_Open( + arg1: OGRSFDriverH, + arg2: *const libc::c_char, + arg3: libc::c_int, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALDatasetRasterIOEx( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - nBandSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; + pub fn OGR_Dr_TestCapability(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALDatasetAdviseRead( - hDS: GDALDatasetH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + pub fn OGR_Dr_CreateDataSource( + arg1: OGRSFDriverH, + arg2: *const libc::c_char, + arg3: *mut *mut libc::c_char, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; + pub fn OGR_Dr_CopyDataSource( + arg1: OGRSFDriverH, + arg2: OGRDataSourceH, + arg3: *const libc::c_char, + arg4: *mut *mut libc::c_char, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; + pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; + pub fn OGROpen( + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: *mut OGRSFDriverH, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; + pub fn OGROpenShared( + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: *mut OGRSFDriverH, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; } extern "C" { - pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; + #[doc = " @cond Doxygen_Suppress"] + pub fn OGRRegisterDriver(arg1: OGRSFDriverH); } extern "C" { - pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; + pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); } extern "C" { - pub fn GDALSetGCPs( - arg1: GDALDatasetH, - arg2: libc::c_int, - arg3: *const GDAL_GCP, - arg4: *const libc::c_char, - ) -> CPLErr::Type; + #[doc = " @endcond"] + pub fn OGRGetDriverCount() -> libc::c_int; } extern "C" { - pub fn GDALGetInternalHandle( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - ) -> *mut libc::c_void; + pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; } extern "C" { - pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; } extern "C" { - pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; + #[doc = " @cond Doxygen_Suppress"] + pub fn OGRGetOpenDSCount() -> libc::c_int; } extern "C" { - pub fn GDALReleaseDataset(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; } extern "C" { - pub fn GDALBuildOverviews( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: libc::c_int, - arg4: *mut libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_int, - arg7: GDALProgressFunc, - arg8: *mut libc::c_void, - ) -> CPLErr::Type; + #[doc = " @endcond"] + pub fn OGRRegisterAll(); } extern "C" { - pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); + #[doc = " Clean-up all drivers (including raster ones starting with GDAL 2.0."] + #[doc = " See GDALDestroyDriverManager()"] + pub fn OGRCleanupAll(); } +#[doc = " Style manager opaque type"] +pub type OGRStyleMgrH = *mut libc::c_void; +#[doc = " Style tool opaque type"] +pub type OGRStyleToolH = *mut libc::c_void; extern "C" { - pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; + pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; } extern "C" { - pub fn GDALFlushCache(hDS: GDALDatasetH); + pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); } extern "C" { - pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; + pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn GDALDatasetCopyWholeRaster( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: CSLConstList, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_SM_InitStyleString( + hSM: OGRStyleMgrH, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALRasterBandCopyWholeRaster( - hSrcBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - constpapszOptions: *const *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_SM_GetPartCount( + hSM: OGRStyleMgrH, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALRegenerateOverviews( - hSrcBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviewBands: *mut GDALRasterBandH, - pszResampling: *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_SM_GetPart( + hSM: OGRStyleMgrH, + nPartId: libc::c_int, + pszStyleString: *const libc::c_char, + ) -> OGRStyleToolH; } extern "C" { - pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; } extern "C" { - pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; + pub fn OGR_SM_AddStyle( + hSM: OGRStyleMgrH, + pszStyleName: *const libc::c_char, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; + pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; } extern "C" { - pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; + pub fn OGR_ST_Destroy(hST: OGRStyleToolH); } extern "C" { - pub fn GDALDatasetCreateLayer( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: CSLConstList, - ) -> OGRLayerH; + pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; } extern "C" { - pub fn GDALDatasetCopyLayer( - arg1: GDALDatasetH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: CSLConstList, - ) -> OGRLayerH; + pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; } extern "C" { - pub fn GDALDatasetResetReading(arg1: GDALDatasetH); + pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); } extern "C" { - pub fn GDALDatasetGetNextFeature( - hDS: GDALDatasetH, - phBelongingLayer: *mut OGRLayerH, - pdfProgressPct: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> OGRFeatureH; + pub fn OGR_ST_GetParamStr( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_ST_GetParamNum( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetExecuteSQL( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; + pub fn OGR_ST_GetParamDbl( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> f64; } extern "C" { - pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); + pub fn OGR_ST_SetParamStr( + hST: OGRStyleToolH, + eParam: libc::c_int, + pszValue: *const libc::c_char, + ); } extern "C" { - pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; + pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); } extern "C" { - pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); + pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); } extern "C" { - pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); + pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; } extern "C" { - pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; + pub fn OGR_ST_GetRGBFromString( + hST: OGRStyleToolH, + pszColor: *const libc::c_char, + pnRed: *mut libc::c_int, + pnGreen: *mut libc::c_int, + pnBlue: *mut libc::c_int, + pnAlpha: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; + pub fn OGR_STBL_Create() -> OGRStyleTableH; } extern "C" { - pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; + pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); } -#[doc = " Type of functions to pass to GDALAddDerivedBandPixelFunc."] -#[doc = " @since GDAL 2.2"] -pub type GDALDerivedPixelFunc = ::std::option::Option< - unsafe extern "C" fn( - papoSources: *mut *mut libc::c_void, - nSources: libc::c_int, - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eSrcType: GDALDataType::Type, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type, ->; extern "C" { - pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; + pub fn OGR_STBL_AddStyle( + hStyleTable: OGRStyleTableH, + pszName: *const libc::c_char, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetBlockSize( - arg1: GDALRasterBandH, - pnXSize: *mut libc::c_int, - pnYSize: *mut libc::c_int, - ); + pub fn OGR_STBL_SaveStyleTable( + hStyleTable: OGRStyleTableH, + pszFilename: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetActualBlockSize( - arg1: GDALRasterBandH, - nXBlockOff: libc::c_int, - nYBlockOff: libc::c_int, - pnXValid: *mut libc::c_int, - pnYValid: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn OGR_STBL_LoadStyleTable( + hStyleTable: OGRStyleTableH, + pszFilename: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALRasterAdviseRead( - hRB: GDALRasterBandH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + pub fn OGR_STBL_Find( + hStyleTable: OGRStyleTableH, + pszName: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALRasterIO( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type; + pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); } extern "C" { - pub fn GDALRasterIOEx( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; + pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; } extern "C" { - pub fn GDALReadBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; +} +pub mod GDALDataType { + #[doc = " Pixel data types"] + pub type Type = libc::c_uint; + #[doc = " Unknown or unspecified type"] + pub const GDT_Unknown: Type = 0; + #[doc = " Eight bit unsigned integer"] + pub const GDT_Byte: Type = 1; + #[doc = " Sixteen bit unsigned integer"] + pub const GDT_UInt16: Type = 2; + #[doc = " Sixteen bit signed integer"] + pub const GDT_Int16: Type = 3; + #[doc = " Thirty two bit unsigned integer"] + pub const GDT_UInt32: Type = 4; + #[doc = " Thirty two bit signed integer"] + pub const GDT_Int32: Type = 5; + #[doc = " Thirty two bit floating point"] + pub const GDT_Float32: Type = 6; + #[doc = " Sixty four bit floating point"] + pub const GDT_Float64: Type = 7; + #[doc = " Complex Int16"] + pub const GDT_CInt16: Type = 8; + #[doc = " Complex Int32"] + pub const GDT_CInt32: Type = 9; + #[doc = " Complex Float32"] + pub const GDT_CFloat32: Type = 10; + #[doc = " Complex Float64"] + pub const GDT_CFloat64: Type = 11; + #[doc = " Complex Float64"] + pub const GDT_TypeCount: Type = 12; } extern "C" { - pub fn GDALWriteBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALGetDataTypeSizeBits(eDataType: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALGetDataTypeSizeBytes(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; + pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALDataTypeIsInteger(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; + pub fn GDALDataTypeIsFloating(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; + pub fn GDALDataTypeIsSigned(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALSetRasterColorInterpretation( - arg1: GDALRasterBandH, - arg2: GDALColorInterp::Type, - ) -> CPLErr::Type; + pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; + pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; } extern "C" { - pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; + pub fn GDALDataTypeUnion( + arg1: GDALDataType::Type, + arg2: GDALDataType::Type, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALDataTypeUnionWithValue( + eDT: GDALDataType::Type, + dValue: f64, + bComplex: libc::c_int, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; -} -extern "C" { - pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDeleteRasterNoDataValue(arg1: GDALRasterBandH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALSetRasterCategoryNames(arg1: GDALRasterBandH, arg2: CSLConstList) -> CPLErr::Type; + pub fn GDALFindDataType( + nBits: libc::c_int, + bSigned: libc::c_int, + bFloating: libc::c_int, + bComplex: libc::c_int, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn GDALFindDataTypeForValue(dValue: f64, bComplex: libc::c_int) -> GDALDataType::Type; } extern "C" { - pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn GDALAdjustValueToDataType( + eDT: GDALDataType::Type, + dfValue: f64, + pbClamped: *mut libc::c_int, + pbRounded: *mut libc::c_int, + ) -> f64; } extern "C" { - pub fn GDALGetRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - bForce: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - ) -> CPLErr::Type; + pub fn GDALGetNonComplexDataType(arg1: GDALDataType::Type) -> GDALDataType::Type; } extern "C" { - pub fn GDALComputeRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALDataTypeIsConversionLossy( + eTypeFrom: GDALDataType::Type, + eTypeTo: GDALDataType::Type, + ) -> libc::c_int; } -extern "C" { - pub fn GDALSetRasterStatistics( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - dfMean: f64, - dfStdDev: f64, - ) -> CPLErr::Type; +pub mod GDALAsyncStatusType { + #[doc = " status of the asynchronous stream"] + pub type Type = libc::c_uint; + pub const GARIO_PENDING: Type = 0; + pub const GARIO_UPDATE: Type = 1; + pub const GARIO_ERROR: Type = 2; + pub const GARIO_COMPLETE: Type = 3; + pub const GARIO_TypeCount: Type = 4; } extern "C" { - pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; + pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALSetRasterUnitType( - hBand: GDALRasterBandH, - pszNewValue: *const libc::c_char, - ) -> CPLErr::Type; + pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; } -extern "C" { - pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; +pub mod GDALAccess { + #[doc = " Flag indicating read/write, or read-only access to data."] + pub type Type = libc::c_uint; + #[doc = " Read only (no update) access"] + pub const GA_ReadOnly: Type = 0; + #[doc = " Read/write access."] + pub const GA_Update: Type = 1; } -extern "C" { - pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; +pub mod GDALRWFlag { + #[doc = " Read/Write flag for RasterIO() method"] + pub type Type = libc::c_uint; + #[doc = " Read data"] + pub const GF_Read: Type = 0; + #[doc = " Write data"] + pub const GF_Write: Type = 1; } -extern "C" { - pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; +pub mod GDALRIOResampleAlg { + #[doc = " RasterIO() resampling method."] + #[doc = " @since GDAL 2.0"] + pub type Type = libc::c_uint; + #[doc = " Nearest neighbour"] + pub const GRIORA_NearestNeighbour: Type = 0; + #[doc = " Bilinear (2x2 kernel)"] + pub const GRIORA_Bilinear: Type = 1; + #[doc = " Cubic Convolution Approximation (4x4 kernel)"] + pub const GRIORA_Cubic: Type = 2; + #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] + pub const GRIORA_CubicSpline: Type = 3; + #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] + pub const GRIORA_Lanczos: Type = 4; + #[doc = " Average"] + pub const GRIORA_Average: Type = 5; + #[doc = " Mode (selects the value which appears most often of all the sampled points)"] + pub const GRIORA_Mode: Type = 6; + #[doc = " Gauss blurring"] + pub const GRIORA_Gauss: Type = 7; } -extern "C" { - pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; +#[doc = " Structure to pass extra arguments to RasterIO() method"] +#[doc = " @since GDAL 2.0"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterIOExtraArg { + #[doc = " Version of structure (to allow future extensions of the structure)"] + pub nVersion: libc::c_int, + #[doc = " Resampling algorithm"] + pub eResampleAlg: GDALRIOResampleAlg::Type, + #[doc = " Progress callback"] + pub pfnProgress: GDALProgressFunc, + #[doc = " Progress callback user data"] + pub pProgressData: *mut libc::c_void, + #[doc = " Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set."] + #[doc = "Mostly reserved from the VRT driver to communicate a more precise"] + #[doc = "source window. Must be such that dfXOff - nXOff < 1.0 and"] + #[doc = "dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize < 1.0"] + pub bFloatingPointWindowValidity: libc::c_int, + #[doc = " Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] + pub dfXOff: f64, + #[doc = " Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] + pub dfYOff: f64, + #[doc = " Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] + pub dfXSize: f64, + #[doc = " Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] + pub dfYSize: f64, } -extern "C" { - pub fn GDALComputeRasterMinMax( - hBand: GDALRasterBandH, - bApproxOK: libc::c_int, - adfMinMax: *mut f64, +#[test] +fn bindgen_test_layout_GDALRasterIOExtraArg() { + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(nVersion) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(eResampleAlg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnProgress as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(pfnProgress) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pProgressData as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(pProgressData) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).bFloatingPointWindowValidity + as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(bFloatingPointWindowValidity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfXOff) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfYOff) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfXSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfYSize) + ) ); } -extern "C" { - pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultHistogram( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut libc::c_int, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDefaultHistogramEx( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut GUIntBig, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetDefaultHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSetDefaultHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRandomRasterSample( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: *mut f32, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) - -> GDALRasterBandH; -} -extern "C" { - pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALFillRaster( - hBand: GDALRasterBandH, - dfRealValue: f64, - dfImaginaryValue: f64, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALComputeBandStats( - hBand: GDALRasterBandH, - nSampleStep: libc::c_int, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALOverviewMagnitudeCorrection( - hBaseBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviews: *mut GDALRasterBandH, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; +pub mod GDALColorInterp { + #[doc = " Types of color interpretation for raster bands."] + pub type Type = libc::c_uint; + #[doc = " Undefined"] + pub const GCI_Undefined: Type = 0; + #[doc = " Greyscale"] + pub const GCI_GrayIndex: Type = 1; + #[doc = " Paletted (see associated color table)"] + pub const GCI_PaletteIndex: Type = 2; + #[doc = " Red band of RGBA image"] + pub const GCI_RedBand: Type = 3; + #[doc = " Green band of RGBA image"] + pub const GCI_GreenBand: Type = 4; + #[doc = " Blue band of RGBA image"] + pub const GCI_BlueBand: Type = 5; + #[doc = " Alpha (0=transparent, 255=opaque)"] + pub const GCI_AlphaBand: Type = 6; + #[doc = " Hue band of HLS image"] + pub const GCI_HueBand: Type = 7; + #[doc = " Saturation band of HLS image"] + pub const GCI_SaturationBand: Type = 8; + #[doc = " Lightness band of HLS image"] + pub const GCI_LightnessBand: Type = 9; + #[doc = " Cyan band of CMYK image"] + pub const GCI_CyanBand: Type = 10; + #[doc = " Magenta band of CMYK image"] + pub const GCI_MagentaBand: Type = 11; + #[doc = " Yellow band of CMYK image"] + pub const GCI_YellowBand: Type = 12; + #[doc = " Black band of CMLY image"] + pub const GCI_BlackBand: Type = 13; + #[doc = " Y Luminance"] + pub const GCI_YCbCr_YBand: Type = 14; + #[doc = " Cb Chroma"] + pub const GCI_YCbCr_CbBand: Type = 15; + #[doc = " Cr Chroma"] + pub const GCI_YCbCr_CrBand: Type = 16; + #[doc = " Max current value (equals to GCI_YCbCr_CrBand currently)"] + pub const GCI_Max: Type = 16; } extern "C" { - pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; + pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALSetDefaultRAT( - arg1: GDALRasterBandH, - arg2: GDALRasterAttributeTableH, - ) -> CPLErr::Type; + pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; +} +pub mod GDALPaletteInterp { + #[doc = " Types of color interpretations for a GDALColorTable."] + pub type Type = libc::c_uint; + #[doc = " Grayscale (in GDALColorEntry.c1)"] + pub const GPI_Gray: Type = 0; + #[doc = " Red, Green, Blue and Alpha in (in c1, c2, c3 and c4)"] + pub const GPI_RGB: Type = 1; + #[doc = " Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)"] + pub const GPI_CMYK: Type = 2; + #[doc = " Hue, Lightness and Saturation (in c1, c2, and c3)"] + pub const GPI_HLS: Type = 3; } extern "C" { - pub fn GDALAddDerivedBandPixelFunc( - pszName: *const libc::c_char, - pfnPixelFunc: GDALDerivedPixelFunc, - ) -> CPLErr::Type; + pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; } +#[doc = " Opaque type used for the C bindings of the C++ GDALMajorObject class"] +pub type GDALMajorObjectH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALDataset class"] +pub type GDALDatasetH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALRasterBand class"] +pub type GDALRasterBandH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALDriver class"] +pub type GDALDriverH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALColorTable class"] +pub type GDALColorTableH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class"] +pub type GDALRasterAttributeTableH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALAsyncReader class"] +pub type GDALAsyncReaderH = *mut libc::c_void; +#[doc = " Type to express pixel, line or band spacing. Signed 64 bit integer."] +pub type GSpacing = GIntBig; extern "C" { - pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; + pub fn GDALAllRegister(); } extern "C" { - pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; + pub fn GDALCreate( + hDriver: GDALDriverH, + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: GDALDataType::Type, + arg6: CSLConstList, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; + pub fn GDALCreateCopy( + arg1: GDALDriverH, + arg2: *const libc::c_char, + arg3: GDALDatasetH, + arg4: libc::c_int, + arg5: CSLConstList, + arg6: GDALProgressFunc, + arg7: *mut libc::c_void, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALGetDataCoverageStatus( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nMaskFlagStop: libc::c_int, - pdfDataPct: *mut f64, - ) -> libc::c_int; + pub fn GDALIdentifyDriver( + pszFilename: *const libc::c_char, + papszFileList: CSLConstList, + ) -> GDALDriverH; } extern "C" { - pub fn GDALARGetNextUpdatedRegion( - hARIO: GDALAsyncReaderH, - dfTimeout: f64, - pnXBufOff: *mut libc::c_int, - pnYBufOff: *mut libc::c_int, - pnXBufSize: *mut libc::c_int, - pnYBufSize: *mut libc::c_int, - ) -> GDALAsyncStatusType::Type; + pub fn GDALIdentifyDriverEx( + pszFilename: *const libc::c_char, + nIdentifyFlags: libc::c_uint, + papszAllowedDrivers: *const *const libc::c_char, + papszFileList: *const *const libc::c_char, + ) -> GDALDriverH; } extern "C" { - pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; + pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; } extern "C" { - pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); + pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; } extern "C" { - pub fn GDALGeneralCmdLineProcessor( - nArgc: libc::c_int, - ppapszArgv: *mut *mut *mut libc::c_char, - nOptions: libc::c_int, - ) -> libc::c_int; + pub fn GDALOpenEx( + pszFilename: *const libc::c_char, + nOpenFlags: libc::c_uint, + papszAllowedDrivers: *const *const libc::c_char, + papszOpenOptions: *const *const libc::c_char, + papszSiblingFiles: *const *const libc::c_char, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALSwapWords( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: libc::c_int, - nWordSkip: libc::c_int, - ); + pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; } extern "C" { - pub fn GDALSwapWordsEx( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: usize, - nWordSkip: libc::c_int, - ); + pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; } extern "C" { - pub fn GDALCopyWords( - pSrcData: *const libc::c_void, - eSrcType: GDALDataType::Type, - nSrcPixelOffset: libc::c_int, - pDstData: *mut libc::c_void, - eDstType: GDALDataType::Type, - nDstPixelOffset: libc::c_int, - nWordCount: libc::c_int, - ); + pub fn GDALGetDriverCount() -> libc::c_int; } extern "C" { - pub fn GDALCopyBits( - pabySrcData: *const GByte, - nSrcOffset: libc::c_int, - nSrcStep: libc::c_int, - pabyDstData: *mut GByte, - nDstOffset: libc::c_int, - nDstStep: libc::c_int, - nBitCount: libc::c_int, - nStepCount: libc::c_int, - ); + pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; } extern "C" { - pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; + pub fn GDALCreateDriver() -> GDALDriverH; } extern "C" { - pub fn GDALReadWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; + pub fn GDALDestroyDriver(arg1: GDALDriverH); } extern "C" { - pub fn GDALWriteWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; + pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; } extern "C" { - pub fn GDALLoadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALDeregisterDriver(arg1: GDALDriverH); } extern "C" { - pub fn GDALReadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALDestroyDriverManager(); } extern "C" { - pub fn GDALLoadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALDestroy(); } extern "C" { - pub fn GDALReadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, + pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRenameDataset( + arg1: GDALDriverH, + pszNewName: *const libc::c_char, + pszOldName: *const libc::c_char, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALCopyDatasetFiles( + arg1: GDALDriverH, + pszNewName: *const libc::c_char, + pszOldName: *const libc::c_char, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALValidateCreationOptions( + arg1: GDALDriverH, + papszCreationOptions: CSLConstList, ) -> libc::c_int; } extern "C" { - pub fn GDALDecToDMS( - arg1: f64, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *const libc::c_char; + pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; } extern "C" { - pub fn GDALPackedDMSToDec(arg1: f64) -> f64; + pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; } extern "C" { - pub fn GDALDecToPackedDMS(arg1: f64) -> f64; + pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; } -#[doc = " Structure to store Rational Polynomial Coefficients / Rigorous Projection"] -#[doc = " Model. See http://geotiff.maptools.org/rpc_prop.html"] +extern "C" { + pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; +} +#[doc = " Ground Control Point"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct GDALRPCInfo { - #[doc = "< Line offset"] - pub dfLINE_OFF: f64, - #[doc = "< Sample/Pixel offset"] - pub dfSAMP_OFF: f64, - #[doc = "< Latitude offset"] - pub dfLAT_OFF: f64, - #[doc = "< Longitude offset"] - pub dfLONG_OFF: f64, - #[doc = "< Height offset"] - pub dfHEIGHT_OFF: f64, - #[doc = "< Line scale"] - pub dfLINE_SCALE: f64, - #[doc = "< Sample/Pixel scale"] - pub dfSAMP_SCALE: f64, - #[doc = "< Latitude scale"] - pub dfLAT_SCALE: f64, - #[doc = "< Longitude scale"] - pub dfLONG_SCALE: f64, - #[doc = "< Height scale"] - pub dfHEIGHT_SCALE: f64, - #[doc = "< Line Numerator Coefficients"] - pub adfLINE_NUM_COEFF: [f64; 20usize], - #[doc = "< Line Denominator Coefficients"] - pub adfLINE_DEN_COEFF: [f64; 20usize], - #[doc = "< Sample/Pixel Numerator Coefficients"] - pub adfSAMP_NUM_COEFF: [f64; 20usize], - #[doc = "< Sample/Pixel Denominator Coefficients"] - pub adfSAMP_DEN_COEFF: [f64; 20usize], - #[doc = "< Minimum longitude"] - pub dfMIN_LONG: f64, - #[doc = "< Minimum latitude"] - pub dfMIN_LAT: f64, - #[doc = "< Maximum longitude"] - pub dfMAX_LONG: f64, - #[doc = "< Maximum latitude"] - pub dfMAX_LAT: f64, +pub struct GDAL_GCP { + #[doc = " Unique identifier, often numeric"] + pub pszId: *mut libc::c_char, + #[doc = " Informational message or \"\""] + pub pszInfo: *mut libc::c_char, + #[doc = " Pixel (x) location of GCP on raster"] + pub dfGCPPixel: f64, + #[doc = " Line (y) location of GCP on raster"] + pub dfGCPLine: f64, + #[doc = " X position of GCP in georeferenced space"] + pub dfGCPX: f64, + #[doc = " Y position of GCP in georeferenced space"] + pub dfGCPY: f64, + #[doc = " Elevation of GCP, or zero if not known"] + pub dfGCPZ: f64, } #[test] -fn bindgen_test_layout_GDALRPCInfo() { +fn bindgen_test_layout_GDAL_GCP() { assert_eq!( - ::std::mem::size_of::(), - 752usize, - concat!("Size of: ", stringify!(GDALRPCInfo)) + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(GDAL_GCP)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GDALRPCInfo)) + concat!("Alignment of ", stringify!(GDAL_GCP)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(GDALRPCInfo), + stringify!(GDAL_GCP), "::", - stringify!(dfLINE_OFF) + stringify!(pszId) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(GDALRPCInfo), + stringify!(GDAL_GCP), "::", - stringify!(dfSAMP_OFF) + stringify!(pszInfo) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, 16usize, concat!( "Offset of field: ", - stringify!(GDALRPCInfo), + stringify!(GDAL_GCP), "::", - stringify!(dfLAT_OFF) + stringify!(dfGCPPixel) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, 24usize, concat!( "Offset of field: ", - stringify!(GDALRPCInfo), + stringify!(GDAL_GCP), "::", - stringify!(dfLONG_OFF) + stringify!(dfGCPLine) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, 32usize, concat!( "Offset of field: ", - stringify!(GDALRPCInfo), + stringify!(GDAL_GCP), "::", - stringify!(dfHEIGHT_OFF) + stringify!(dfGCPX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, 40usize, concat!( "Offset of field: ", - stringify!(GDALRPCInfo), + stringify!(GDAL_GCP), "::", - stringify!(dfLINE_SCALE) + stringify!(dfGCPY) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, 48usize, concat!( "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), + stringify!(GDAL_GCP), "::", - stringify!(dfHEIGHT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LAT) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, - 744usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LAT) + stringify!(dfGCPZ) ) ); } extern "C" { - pub fn GDALExtractRPCInfo(arg1: CSLConstList, arg2: *mut GDALRPCInfo) -> libc::c_int; + pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); } -#[doc = " Color tuple"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALColorEntry { - #[doc = " gray, red, cyan or hue"] - pub c1: libc::c_short, - #[doc = " green, magenta, or lightness"] - pub c2: libc::c_short, - #[doc = " blue, yellow, or saturation"] - pub c3: libc::c_short, - #[doc = " alpha or blackband"] - pub c4: libc::c_short, +extern "C" { + pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); } -#[test] -fn bindgen_test_layout_GDALColorEntry() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(GDALColorEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(GDALColorEntry)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c3) - ) +extern "C" { + pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; +} +extern "C" { + pub fn GDALGCPsToGeoTransform( + nGCPCount: libc::c_int, + pasGCPs: *const GDAL_GCP, + padfGeoTransform: *mut f64, + bApproxOK: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALInvGeoTransform( + padfGeoTransformIn: *mut f64, + padfInvGeoTransformOut: *mut f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALApplyGeoTransform( + arg1: *mut f64, + arg2: f64, + arg3: f64, + arg4: *mut f64, + arg5: *mut f64, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c4) - ) +} +extern "C" { + pub fn GDALComposeGeoTransforms( + padfGeoTransform1: *const f64, + padfGeoTransform2: *const f64, + padfGeoTransformOut: *mut f64, ); } extern "C" { - pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; + pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALDestroyColorTable(arg1: GDALColorTableH); + pub fn GDALGetMetadata( + arg1: GDALMajorObjectH, + arg2: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; + pub fn GDALSetMetadata( + arg1: GDALMajorObjectH, + arg2: CSLConstList, + arg3: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; + pub fn GDALGetMetadataItem( + arg1: GDALMajorObjectH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; + pub fn GDALSetMetadataItem( + arg1: GDALMajorObjectH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; + pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetColorEntryAsRGB( - arg1: GDALColorTableH, - arg2: libc::c_int, - arg3: *mut GDALColorEntry, - ) -> libc::c_int; + pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); } extern "C" { - pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); + pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; } extern "C" { - pub fn GDALCreateColorRamp( - hTable: GDALColorTableH, - nStartIndex: libc::c_int, - psStartColor: *const GDALColorEntry, - nEndIndex: libc::c_int, - psEndColor: *const GDALColorEntry, - ); + pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; } -pub mod GDALRATFieldType { - #[doc = " Field type of raster attribute table"] - pub type Type = u32; - #[doc = " Integer field"] - pub const GFT_Integer: Type = 0; - #[doc = " Floating point (double) field"] - pub const GFT_Real: Type = 1; - #[doc = " String field"] - pub const GFT_String: Type = 2; +extern "C" { + pub fn GDALClose(arg1: GDALDatasetH); } -pub mod GDALRATFieldUsage { - #[doc = " Field usage of raster attribute table"] - pub type Type = u32; - #[doc = " General purpose field."] - pub const GFU_Generic: Type = 0; - #[doc = " Histogram pixel count"] - pub const GFU_PixelCount: Type = 1; - #[doc = " Class name"] - pub const GFU_Name: Type = 2; - #[doc = " Class range minimum"] - pub const GFU_Min: Type = 3; - #[doc = " Class range maximum"] - pub const GFU_Max: Type = 4; - #[doc = " Class value (min=max)"] - pub const GFU_MinMax: Type = 5; - #[doc = " Red class color (0-255)"] - pub const GFU_Red: Type = 6; - #[doc = " Green class color (0-255)"] - pub const GFU_Green: Type = 7; - #[doc = " Blue class color (0-255)"] - pub const GFU_Blue: Type = 8; - #[doc = " Alpha (0=transparent,255=opaque)"] - pub const GFU_Alpha: Type = 9; - #[doc = " Color Range Red Minimum"] - pub const GFU_RedMin: Type = 10; - #[doc = " Color Range Green Minimum"] - pub const GFU_GreenMin: Type = 11; - #[doc = " Color Range Blue Minimum"] - pub const GFU_BlueMin: Type = 12; - #[doc = " Color Range Alpha Minimum"] - pub const GFU_AlphaMin: Type = 13; - #[doc = " Color Range Red Maximum"] - pub const GFU_RedMax: Type = 14; - #[doc = " Color Range Green Maximum"] - pub const GFU_GreenMax: Type = 15; - #[doc = " Color Range Blue Maximum"] - pub const GFU_BlueMax: Type = 16; - #[doc = " Color Range Alpha Maximum"] - pub const GFU_AlphaMax: Type = 17; - #[doc = " Maximum GFU value (equals to GFU_AlphaMax+1 currently)"] - pub const GFU_MaxCount: Type = 18; +extern "C" { + pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; } -pub mod GDALRATTableType { - #[doc = " RAT table type (thematic or athematic)"] - #[doc = " @since GDAL 2.4"] - pub type Type = u32; - #[doc = " Thematic table type"] - pub const GRTT_THEMATIC: Type = 0; - #[doc = " Athematic table type"] - pub const GRTT_ATHEMATIC: Type = 1; +extern "C" { + pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; + pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); + pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; } extern "C" { - pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; + pub fn GDALAddBand( + hDS: GDALDatasetH, + eType: GDALDataType::Type, + papszOptions: CSLConstList, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetNameOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> *const libc::c_char; + pub fn GDALBeginAsyncReader( + hDS: GDALDatasetH, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + pBuf: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nBandSpace: libc::c_int, + papszOptions: CSLConstList, + ) -> GDALAsyncReaderH; } extern "C" { - pub fn GDALRATGetUsageOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldUsage::Type; + pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); } extern "C" { - pub fn GDALRATGetTypeOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldType::Type; + pub fn GDALDatasetRasterIO( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nBandSpace: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetColOfUsage( - arg1: GDALRasterAttributeTableH, - arg2: GDALRATFieldUsage::Type, - ) -> libc::c_int; + pub fn GDALDatasetRasterIOEx( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + nPixelSpace: GSpacing, + nLineSpace: GSpacing, + nBandSpace: GSpacing, + psExtraArg: *mut GDALRasterIOExtraArg, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; + pub fn GDALDatasetAdviseRead( + hDS: GDALDatasetH, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + papszOptions: CSLConstList, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> *const libc::c_char; + pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; } extern "C" { - pub fn GDALRATGetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> libc::c_int; + pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> f64; + pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; } extern "C" { - pub fn GDALRATSetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_char, - ); + pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; } extern "C" { - pub fn GDALRATSetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ); + pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALRATSetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: f64, - ); + pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; } extern "C" { - pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; + pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; } extern "C" { - pub fn GDALRATValuesIOAsDouble( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pdfData: *mut f64, + pub fn GDALSetGCPs( + arg1: GDALDatasetH, + arg2: libc::c_int, + arg3: *const GDAL_GCP, + arg4: *const libc::c_char, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATValuesIOAsInteger( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pnData: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn GDALGetInternalHandle( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn GDALRATValuesIOAsString( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - papszStrList: CSLConstList, - ) -> CPLErr::Type; + pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); + pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALRATCreateColumn( - arg1: GDALRasterAttributeTableH, + pub fn GDALReleaseDataset(arg1: GDALDatasetH) -> libc::c_int; +} +extern "C" { + pub fn GDALBuildOverviews( + arg1: GDALDatasetH, arg2: *const libc::c_char, - arg3: GDALRATFieldType::Type, - arg4: GDALRATFieldUsage::Type, + arg3: libc::c_int, + arg4: *mut libc::c_int, + arg5: libc::c_int, + arg6: *mut libc::c_int, + arg7: GDALProgressFunc, + arg8: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATSetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: f64, - arg3: f64, - ) -> CPLErr::Type; + pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); } extern "C" { - pub fn GDALRATGetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: *mut f64, - arg3: *mut f64, - ) -> libc::c_int; + pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALRATSetTableType( - hRAT: GDALRasterAttributeTableH, - eInTableType: GDALRATTableType::Type, - ) -> CPLErr::Type; + pub fn GDALFlushCache(hDS: GDALDatasetH); } extern "C" { - pub fn GDALRATGetTableType(hRAT: GDALRasterAttributeTableH) -> GDALRATTableType::Type; + pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; } extern "C" { - pub fn GDALRATInitializeFromColorTable( - arg1: GDALRasterAttributeTableH, - arg2: GDALColorTableH, + pub fn GDALDatasetCopyWholeRaster( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + papszOptions: CSLConstList, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATTranslateToColorTable( - arg1: GDALRasterAttributeTableH, - nEntryCount: libc::c_int, - ) -> GDALColorTableH; + pub fn GDALRasterBandCopyWholeRaster( + hSrcBand: GDALRasterBandH, + hDstBand: GDALRasterBandH, + constpapszOptions: *const *const libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); + pub fn GDALRegenerateOverviews( + hSrcBand: GDALRasterBandH, + nOverviewCount: libc::c_int, + pahOverviewBands: *mut GDALRasterBandH, + pszResampling: *const libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; + pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; + pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; } extern "C" { - pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; + pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; } extern "C" { - pub fn GDALRATRemoveStatistics(arg1: GDALRasterAttributeTableH); + pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALSetCacheMax(nBytes: libc::c_int); + pub fn GDALDatasetCreateLayer( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + arg3: OGRSpatialReferenceH, + arg4: OGRwkbGeometryType::Type, + arg5: CSLConstList, + ) -> OGRLayerH; } extern "C" { - pub fn GDALGetCacheMax() -> libc::c_int; + pub fn GDALDatasetCopyLayer( + arg1: GDALDatasetH, + arg2: OGRLayerH, + arg3: *const libc::c_char, + arg4: CSLConstList, + ) -> OGRLayerH; } extern "C" { - pub fn GDALGetCacheUsed() -> libc::c_int; + pub fn GDALDatasetResetReading(arg1: GDALDatasetH); } extern "C" { - pub fn GDALSetCacheMax64(nBytes: GIntBig); + pub fn GDALDatasetGetNextFeature( + hDS: GDALDatasetH, + phBelongingLayer: *mut OGRLayerH, + pdfProgressPct: *mut f64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> OGRFeatureH; } extern "C" { - pub fn GDALGetCacheMax64() -> GIntBig; + pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALGetCacheUsed64() -> GIntBig; + pub fn GDALDatasetExecuteSQL( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + arg3: OGRGeometryH, + arg4: *const libc::c_char, + ) -> OGRLayerH; } extern "C" { - pub fn GDALFlushCacheBlock() -> libc::c_int; + pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); } extern "C" { - pub fn GDALDatasetGetVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, + pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; +} +extern "C" { + pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); +} +extern "C" { + pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); +} +extern "C" { + pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; +} +extern "C" { + pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; +} +extern "C" { + pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; +} +#[doc = " Type of functions to pass to GDALAddDerivedBandPixelFunc."] +#[doc = " @since GDAL 2.2"] +pub type GDALDerivedPixelFunc = ::std::option::Option< + unsafe extern "C" fn( + papoSources: *mut *mut libc::c_void, + nSources: libc::c_int, + pData: *mut libc::c_void, nBufXSize: libc::c_int, nBufYSize: libc::c_int, + eSrcType: GDALDataType::Type, eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nBandSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, + nLineSpace: libc::c_int, + ) -> CPLErr::Type, +>; +extern "C" { + pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; +} +extern "C" { + pub fn GDALGetBlockSize( + arg1: GDALRasterBandH, + pnXSize: *mut libc::c_int, + pnYSize: *mut libc::c_int, + ); +} +extern "C" { + pub fn GDALGetActualBlockSize( + arg1: GDALRasterBandH, + nXBlockOff: libc::c_int, + nYBlockOff: libc::c_int, + pnXValid: *mut libc::c_int, + pnYValid: *mut libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRasterAdviseRead( + hRB: GDALRasterBandH, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRasterBandGetVirtualMem( - hBand: GDALRasterBandH, + pub fn GDALRasterIO( + hRBand: GDALRasterBandH, eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + nLineSpace: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetVirtualMemAuto( - hBand: GDALRasterBandH, + pub fn GDALRasterIOEx( + hRBand: GDALRasterBandH, eRWFlag: GDALRWFlag::Type, - pnPixelSpace: *mut libc::c_int, - pnLineSpace: *mut GIntBig, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; -} -pub mod GDALTileOrganization { - #[doc = " Enumeration to describe the tile organization"] - pub type Type = u32; - #[doc = " Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ..."] - pub const GTO_TIP: Type = 0; - #[doc = " Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ..."] - pub const GTO_BIT: Type = 1; - #[doc = " Band SeQuential : all the tiles of first band, all the tiles of following band..."] - pub const GTO_BSQ: Type = 2; + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nPixelSpace: GSpacing, + nLineSpace: GSpacing, + psExtraArg: *mut GDALRasterIOExtraArg, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDatasetGetTiledVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - eTileOrganization: GDALTileOrganization::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn GDALReadBlock( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRasterBandGetTiledVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn GDALWriteBlock( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALCreatePansharpenedVRT( - pszXML: *const libc::c_char, - hPanchroBand: GDALRasterBandH, - nInputSpectralBands: libc::c_int, - pahInputSpectralBands: *mut GDALRasterBandH, - ) -> GDALDatasetH; + pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALGetJPEG2000Structure( - pszFilename: *const libc::c_char, - papszOptions: CSLConstList, - ) -> *mut CPLXMLNode; + pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALComputeMedianCutPCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - pfnIncludePixel: ::std::option::Option< - unsafe extern "C" fn( - hRed: libc::c_int, - hGreen: libc::c_int, - hBlue: *mut libc::c_void, - ) -> libc::c_int, - >, - nColors: libc::c_int, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; + pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; } extern "C" { - pub fn GDALDitherRGB2PCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - hTarget: GDALRasterBandH, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; + pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALChecksumImage( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - ) -> libc::c_int; + pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; } extern "C" { - pub fn GDALComputeProximity( - hSrcBand: GDALRasterBandH, - hProximityBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; } extern "C" { - pub fn GDALFillNodata( - hTargetBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - dfMaxSearchDist: f64, - bDeprecatedOption: libc::c_int, - nSmoothingIterations: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, + pub fn GDALSetRasterColorInterpretation( + arg1: GDALRasterBandH, + arg2: GDALColorInterp::Type, ) -> CPLErr::Type; } extern "C" { - pub fn GDALPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; } extern "C" { - pub fn GDALFPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; } extern "C" { - pub fn GDALSieveFilter( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - nSizeThreshold: libc::c_int, - nConnectedness: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; } -pub type GDALTransformerFunc = ::std::option::Option< - unsafe extern "C" fn( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int, ->; extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); + pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALUseTransformer( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; } extern "C" { - pub fn GDALCreateSimilarTransformer( - psTransformerArg: *mut libc::c_void, - dfSrcRatioX: f64, - dfSrcRatioY: f64, - ) -> *mut libc::c_void; + pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; } extern "C" { - #[doc = " @endcond"] - pub fn GDALCreateGenImgProjTransformer( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - bGCPUseOK: libc::c_int, - dfGCPErrorThreshold: f64, - nOrder: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateGenImgProjTransformer2( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALDeleteRasterNoDataValue(arg1: GDALRasterBandH) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateGenImgProjTransformer3( - pszSrcWKT: *const libc::c_char, - padfSrcGeoTransform: *const f64, - pszDstWKT: *const libc::c_char, - padfDstGeoTransform: *const f64, - ) -> *mut libc::c_void; + pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); + pub fn GDALSetRasterCategoryNames(arg1: GDALRasterBandH, arg2: CSLConstList) -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); + pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALGenImgProjTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); + pub fn GDALGetRasterStatistics( + arg1: GDALRasterBandH, + bApproxOK: libc::c_int, + bForce: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *mut f64); + pub fn GDALComputeRasterStatistics( + arg1: GDALRasterBandH, + bApproxOK: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateReprojectionTransformer( - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALSetRasterStatistics( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + dfMean: f64, + dfStdDev: f64, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); + pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; } extern "C" { - pub fn GDALReprojectionTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALSetRasterUnitType( + hBand: GDALRasterBandH, + pszNewValue: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateGCPTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALCreateGCPRefineTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - tolerance: f64, - minimumGcps: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALGCPTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateTPSTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - bReversed: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALComputeRasterMinMax( + hBand: GDALRasterBandH, + bApproxOK: libc::c_int, + adfMinMax: *mut f64, + ); } extern "C" { - pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; } extern "C" { - pub fn GDALTPSTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetRasterHistogram( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut libc::c_int, + bIncludeOutOfRange: libc::c_int, + bApproxOK: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - #[doc = " @endcond"] - pub fn GDALCreateRPCTransformer( - psRPC: *mut GDALRPCInfo, - bReversed: libc::c_int, - dfPixErrThreshold: f64, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALGetRasterHistogramEx( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut GUIntBig, + bIncludeOutOfRange: libc::c_int, + bApproxOK: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALGetDefaultHistogram( + hBand: GDALRasterBandH, + pdfMin: *mut f64, + pdfMax: *mut f64, + pnBuckets: *mut libc::c_int, + ppanHistogram: *mut *mut libc::c_int, + bForce: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRPCTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetDefaultHistogramEx( + hBand: GDALRasterBandH, + pdfMin: *mut f64, + pdfMax: *mut f64, + pnBuckets: *mut libc::c_int, + ppanHistogram: *mut *mut GUIntBig, + bForce: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateGeoLocTransformer( - hBaseDS: GDALDatasetH, - papszGeolocationInfo: *mut *mut libc::c_char, - bReversed: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALSetDefaultHistogram( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALSetDefaultHistogramEx( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut GUIntBig, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGeoLocTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, + pub fn GDALGetRandomRasterSample( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: *mut f32, ) -> libc::c_int; } extern "C" { - pub fn GDALCreateApproxTransformer( - pfnRawTransformer: GDALTransformerFunc, - pRawTransformerArg: *mut libc::c_void, - dfMaxError: f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALApproxTransformerOwnsSubtransformer( - pCBData: *mut libc::c_void, - bOwnFlag: libc::c_int, - ); + pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) + -> GDALRasterBandH; } extern "C" { - pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); + pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; } extern "C" { - pub fn GDALApproxTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALFillRaster( + hBand: GDALRasterBandH, + dfRealValue: f64, + dfImaginaryValue: f64, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALSimpleImageWarp( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - pfnTransform: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, + pub fn GDALComputeBandStats( + hBand: GDALRasterBandH, + nSampleStep: libc::c_int, + pdfMean: *mut f64, + pdfStdDev: *mut f64, pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszWarpOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSuggestedWarpOutput( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALSuggestedWarpOutput2( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - padfExtents: *mut f64, - nOptions: libc::c_int, + pub fn GDALOverviewMagnitudeCorrection( + hBaseBand: GDALRasterBandH, + nOverviewCount: libc::c_int, + pahOverviews: *mut GDALRasterBandH, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALSerializeTransformer( - pfnFunc: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - ) -> *mut CPLXMLNode; + pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; } extern "C" { - pub fn GDALDeserializeTransformer( - psTree: *mut CPLXMLNode, - ppfnFunc: *mut GDALTransformerFunc, - ppTransformArg: *mut *mut libc::c_void, + pub fn GDALSetDefaultRAT( + arg1: GDALRasterBandH, + arg2: GDALRasterAttributeTableH, ) -> CPLErr::Type; } extern "C" { - #[doc = " @endcond"] - pub fn GDALTransformGeolocations( - hXBand: GDALRasterBandH, - hYBand: GDALRasterBandH, - hZBand: GDALRasterBandH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszOptions: *mut *mut libc::c_char, + pub fn GDALAddDerivedBandPixelFunc( + pszName: *const libc::c_char, + pfnPixelFunc: GDALDerivedPixelFunc, ) -> CPLErr::Type; } -#[doc = " Contour writer callback type"] -pub type GDALContourWriter = ::std::option::Option< - unsafe extern "C" fn( - dfLevel: f64, - nPoints: libc::c_int, - padfX: *mut f64, - padfY: *mut f64, - arg1: *mut libc::c_void, - ) -> CPLErr::Type, ->; -#[doc = " Contour generator opaque type"] -pub type GDALContourGeneratorH = *mut libc::c_void; extern "C" { - pub fn GDAL_CG_Create( - nWidth: libc::c_int, - nHeight: libc::c_int, - bNoDataSet: libc::c_int, - dfNoDataValue: f64, - dfContourInterval: f64, - dfContourBase: f64, - pfnWriter: GDALContourWriter, - pCBData: *mut libc::c_void, - ) -> GDALContourGeneratorH; + pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; } extern "C" { - pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; + pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); + pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; } extern "C" { - pub fn OGRContourWriter( - arg1: f64, - arg2: libc::c_int, - arg3: *mut f64, - arg4: *mut f64, - pInfo: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetDataCoverageStatus( + hBand: GDALRasterBandH, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nMaskFlagStop: libc::c_int, + pdfDataPct: *mut f64, + ) -> libc::c_int; } extern "C" { - #[doc = " @endcond"] - pub fn GDALContourGenerate( - hBand: GDALRasterBandH, - dfContourInterval: f64, - dfContourBase: f64, - nFixedLevelCount: libc::c_int, - padfFixedLevels: *mut f64, - bUseNoData: libc::c_int, - dfNoDataValue: f64, - hLayer: *mut libc::c_void, - iIDField: libc::c_int, - iElevField: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALARGetNextUpdatedRegion( + hARIO: GDALAsyncReaderH, + dfTimeout: f64, + pnXBufOff: *mut libc::c_int, + pnYBufOff: *mut libc::c_int, + pnXBufSize: *mut libc::c_int, + pnYBufSize: *mut libc::c_int, + ) -> GDALAsyncStatusType::Type; } extern "C" { - pub fn GDALContourGenerateEx( - hBand: GDALRasterBandH, - hLayer: *mut libc::c_void, - options: CSLConstList, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; } extern "C" { - pub fn GDALRasterizeGeometries( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nGeomCount: libc::c_int, - pahGeometries: *mut OGRGeometryH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeomBurnValue: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); } extern "C" { - pub fn GDALRasterizeLayers( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfLayerBurnValues: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGeneralCmdLineProcessor( + nArgc: libc::c_int, + ppapszArgv: *mut *mut *mut libc::c_char, + nOptions: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALRasterizeLayersBuf( + pub fn GDALSwapWords( pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pszDstProjection: *const libc::c_char, - padfDstGeoTransform: *mut f64, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - dfBurnValue: f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + nWordSize: libc::c_int, + nWordCount: libc::c_int, + nWordSkip: libc::c_int, + ); } -pub mod GDALGridAlgorithm { - #[doc = " Gridding Algorithms"] - pub type Type = u32; - #[doc = " Inverse distance to a power"] - pub const GGA_InverseDistanceToAPower: Type = 1; - #[doc = " Moving Average"] - pub const GGA_MovingAverage: Type = 2; - #[doc = " Nearest Neighbor"] - pub const GGA_NearestNeighbor: Type = 3; - #[doc = " Minimum Value (Data Metric)"] - pub const GGA_MetricMinimum: Type = 4; - #[doc = " Maximum Value (Data Metric)"] - pub const GGA_MetricMaximum: Type = 5; - #[doc = " Data Range (Data Metric)"] - pub const GGA_MetricRange: Type = 6; - #[doc = " Number of Points (Data Metric)"] - pub const GGA_MetricCount: Type = 7; - #[doc = " Average Distance (Data Metric)"] - pub const GGA_MetricAverageDistance: Type = 8; - #[doc = " Average Distance Between Data Points (Data Metric)"] - pub const GGA_MetricAverageDistancePts: Type = 9; - #[doc = " Linear interpolation (from Delaunay triangulation. Since GDAL 2.1"] - pub const GGA_Linear: Type = 10; - #[doc = " Inverse distance to a power with nearest neighbor search for max points"] - pub const GGA_InverseDistanceToAPowerNearestNeighbor: Type = 11; +extern "C" { + pub fn GDALSwapWordsEx( + pData: *mut libc::c_void, + nWordSize: libc::c_int, + nWordCount: usize, + nWordSkip: libc::c_int, + ); } extern "C" { - pub fn GDALGridCreate( - arg1: GDALGridAlgorithm::Type, - arg2: *const libc::c_void, - arg3: GUInt32, - arg4: *const f64, - arg5: *const f64, - arg6: *const f64, - arg7: f64, - arg8: f64, - arg9: f64, - arg10: f64, - arg11: GUInt32, - arg12: GUInt32, - arg13: GDALDataType::Type, - arg14: *mut libc::c_void, - arg15: GDALProgressFunc, - arg16: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALCopyWords( + pSrcData: *const libc::c_void, + eSrcType: GDALDataType::Type, + nSrcPixelOffset: libc::c_int, + pDstData: *mut libc::c_void, + eDstType: GDALDataType::Type, + nDstPixelOffset: libc::c_int, + nWordCount: libc::c_int, + ); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALGridContext { - _unused: [u8; 0], +extern "C" { + pub fn GDALCopyBits( + pabySrcData: *const GByte, + nSrcOffset: libc::c_int, + nSrcStep: libc::c_int, + pabyDstData: *mut GByte, + nDstOffset: libc::c_int, + nDstStep: libc::c_int, + nBitCount: libc::c_int, + nStepCount: libc::c_int, + ); } extern "C" { - pub fn GDALGridContextCreate( - eAlgorithm: GDALGridAlgorithm::Type, - poOptions: *const libc::c_void, - nPoints: GUInt32, - padfX: *const f64, - padfY: *const f64, - padfZ: *const f64, - bCallerWillKeepPointArraysAlive: libc::c_int, - ) -> *mut GDALGridContext; + pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; } extern "C" { - pub fn GDALGridContextFree(psContext: *mut GDALGridContext); + pub fn GDALReadWorldFile( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn GDALGridContextProcess( - psContext: *mut GDALGridContext, - dfXMin: f64, - dfXMax: f64, - dfYMin: f64, - dfYMax: f64, - nXSize: GUInt32, - nYSize: GUInt32, - eType: GDALDataType::Type, - pData: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALWriteWorldFile( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn GDALComputeMatchingPoints( - hFirstImage: GDALDatasetH, - hSecondImage: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pnGCPCount: *mut libc::c_int, - ) -> *mut GDAL_GCP; + pub fn GDALLoadTabFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; } -#[doc = " Triangle fact"] +extern "C" { + pub fn GDALReadTabFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALLoadOziMapFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALReadOziMapFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALDecToDMS( + arg1: f64, + arg2: *const libc::c_char, + arg3: libc::c_int, + ) -> *const libc::c_char; +} +extern "C" { + pub fn GDALPackedDMSToDec(arg1: f64) -> f64; +} +extern "C" { + pub fn GDALDecToPackedDMS(arg1: f64) -> f64; +} +#[doc = " Structure to store Rational Polynomial Coefficients / Rigorous Projection"] +#[doc = " Model. See http://geotiff.maptools.org/rpc_prop.html"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct GDALTriFacet { - #[doc = "< index to the padfX/padfY arrays"] - pub anVertexIdx: [libc::c_int; 3usize], - #[doc = "< index to GDALDelaunayTriangulation.pasFacets, or -1"] - pub anNeighborIdx: [libc::c_int; 3usize], +pub struct GDALRPCInfo { + #[doc = "< Line offset"] + pub dfLINE_OFF: f64, + #[doc = "< Sample/Pixel offset"] + pub dfSAMP_OFF: f64, + #[doc = "< Latitude offset"] + pub dfLAT_OFF: f64, + #[doc = "< Longitude offset"] + pub dfLONG_OFF: f64, + #[doc = "< Height offset"] + pub dfHEIGHT_OFF: f64, + #[doc = "< Line scale"] + pub dfLINE_SCALE: f64, + #[doc = "< Sample/Pixel scale"] + pub dfSAMP_SCALE: f64, + #[doc = "< Latitude scale"] + pub dfLAT_SCALE: f64, + #[doc = "< Longitude scale"] + pub dfLONG_SCALE: f64, + #[doc = "< Height scale"] + pub dfHEIGHT_SCALE: f64, + #[doc = "< Line Numerator Coefficients"] + pub adfLINE_NUM_COEFF: [f64; 20usize], + #[doc = "< Line Denominator Coefficients"] + pub adfLINE_DEN_COEFF: [f64; 20usize], + #[doc = "< Sample/Pixel Numerator Coefficients"] + pub adfSAMP_NUM_COEFF: [f64; 20usize], + #[doc = "< Sample/Pixel Denominator Coefficients"] + pub adfSAMP_DEN_COEFF: [f64; 20usize], + #[doc = "< Minimum longitude"] + pub dfMIN_LONG: f64, + #[doc = "< Minimum latitude"] + pub dfMIN_LAT: f64, + #[doc = "< Maximum longitude"] + pub dfMAX_LONG: f64, + #[doc = "< Maximum latitude"] + pub dfMAX_LAT: f64, } #[test] -fn bindgen_test_layout_GDALTriFacet() { +fn bindgen_test_layout_GDALRPCInfo() { assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriFacet)) + ::std::mem::size_of::(), + 752usize, + concat!("Size of: ", stringify!(GDALRPCInfo)) ); assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(GDALTriFacet)) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALRPCInfo)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).anVertexIdx as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(GDALTriFacet), + stringify!(GDALRPCInfo), "::", - stringify!(anVertexIdx) + stringify!(dfLINE_OFF) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).anNeighborIdx as *const _ as usize }, - 12usize, + unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(GDALTriFacet), + stringify!(GDALRPCInfo), "::", - stringify!(anNeighborIdx) + stringify!(dfSAMP_OFF) ) ); -} -#[doc = " Triangle barycentric coefficients."] -#[doc = ""] -#[doc = " Conversion from cartesian (x,y) to barycentric (l1,l2,l3) with :"] -#[doc = " l1 = dfMul1X * (x - dfCxtX) + dfMul1Y * (y - dfCstY)"] -#[doc = " l2 = dfMul2X * (x - dfCxtX) + dfMul2Y * (y - dfCstY)"] -#[doc = " l3 = 1 - l1 - l2"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriBarycentricCoefficients { - #[doc = "< dfMul1X"] - pub dfMul1X: f64, - #[doc = "< dfMul1Y"] - pub dfMul1Y: f64, - #[doc = "< dfMul2X"] - pub dfMul2X: f64, - #[doc = "< dfMul2Y"] - pub dfMul2Y: f64, - #[doc = "< dfCstX"] - pub dfCstX: f64, - #[doc = "< dfCstY"] - pub dfCstY: f64, -} -#[test] -fn bindgen_test_layout_GDALTriBarycentricCoefficients() { assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLAT_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLONG_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfHEIGHT_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLINE_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, 48usize, - concat!("Size of: ", stringify!(GDALTriBarycentricCoefficients)) + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfSAMP_SCALE) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriBarycentricCoefficients)) + unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLAT_SCALE) + ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1X as *const _ as usize - }, - 0usize, + unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, + 64usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfMul1X) + stringify!(dfLONG_SCALE) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1Y as *const _ as usize - }, - 8usize, + unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, + 72usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfMul1Y) + stringify!(dfHEIGHT_SCALE) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2X as *const _ as usize - }, - 16usize, + unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, + 80usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfMul2X) + stringify!(adfLINE_NUM_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2Y as *const _ as usize - }, - 24usize, + unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, + 240usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfMul2Y) + stringify!(adfLINE_DEN_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstX as *const _ as usize - }, - 32usize, + unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, + 400usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfCstX) + stringify!(adfSAMP_NUM_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstY as *const _ as usize - }, - 40usize, + unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, + 560usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfCstY) + stringify!(adfSAMP_DEN_COEFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, + 720usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMIN_LONG) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, + 728usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMIN_LAT) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, + 736usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMAX_LONG) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, + 744usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMAX_LAT) ) ); } -#[doc = " Triangulation structure"] +extern "C" { + pub fn GDALExtractRPCInfo(arg1: CSLConstList, arg2: *mut GDALRPCInfo) -> libc::c_int; +} +#[doc = " Color tuple"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct GDALTriangulation { - #[doc = "< number of facets"] - pub nFacets: libc::c_int, - #[doc = "< array of nFacets facets"] - pub pasFacets: *mut GDALTriFacet, - #[doc = "< arra of nFacets barycentric coefficients"] - pub pasFacetCoefficients: *mut GDALTriBarycentricCoefficients, +pub struct GDALColorEntry { + #[doc = " gray, red, cyan or hue"] + pub c1: libc::c_short, + #[doc = " green, magenta, or lightness"] + pub c2: libc::c_short, + #[doc = " blue, yellow, or saturation"] + pub c3: libc::c_short, + #[doc = " alpha or blackband"] + pub c4: libc::c_short, } #[test] -fn bindgen_test_layout_GDALTriangulation() { +fn bindgen_test_layout_GDALColorEntry() { assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriangulation)) + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(GDALColorEntry)) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriangulation)) + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(GDALColorEntry)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nFacets as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(GDALTriangulation), + stringify!(GDALColorEntry), "::", - stringify!(nFacets) + stringify!(c1) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pasFacets as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, + 2usize, concat!( "Offset of field: ", - stringify!(GDALTriangulation), + stringify!(GDALColorEntry), "::", - stringify!(pasFacets) + stringify!(c2) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pasFacetCoefficients as *const _ as usize - }, - 16usize, + unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, + 4usize, concat!( "Offset of field: ", - stringify!(GDALTriangulation), + stringify!(GDALColorEntry), "::", - stringify!(pasFacetCoefficients) + stringify!(c3) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(GDALColorEntry), + "::", + stringify!(c4) ) ); } extern "C" { - pub fn GDALHasTriangulation() -> libc::c_int; + pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; } extern "C" { - pub fn GDALTriangulationCreateDelaunay( - nPoints: libc::c_int, - padfX: *const f64, - padfY: *const f64, - ) -> *mut GDALTriangulation; + pub fn GDALDestroyColorTable(arg1: GDALColorTableH); } extern "C" { - pub fn GDALTriangulationComputeBarycentricCoefficients( - psDT: *mut GDALTriangulation, - padfX: *const f64, - padfY: *const f64, - ) -> libc::c_int; + pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; } extern "C" { - pub fn GDALTriangulationComputeBarycentricCoordinates( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - pdfL1: *mut f64, - pdfL2: *mut f64, - pdfL3: *mut f64, - ) -> libc::c_int; + pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; } extern "C" { - pub fn GDALTriangulationFindFacetBruteForce( - psDT: *const GDALTriangulation, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; } extern "C" { - pub fn GDALTriangulationFindFacetDirected( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, + pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; +} +extern "C" { + pub fn GDALGetColorEntryAsRGB( + arg1: GDALColorTableH, + arg2: libc::c_int, + arg3: *mut GDALColorEntry, ) -> libc::c_int; } extern "C" { - pub fn GDALTriangulationFree(psDT: *mut GDALTriangulation); + pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALTriangulationTerminate(); + pub fn GDALCreateColorRamp( + hTable: GDALColorTableH, + nStartIndex: libc::c_int, + psStartColor: *const GDALColorEntry, + nEndIndex: libc::c_int, + psEndColor: *const GDALColorEntry, + ); +} +pub mod GDALRATFieldType { + #[doc = " Field type of raster attribute table"] + pub type Type = libc::c_uint; + #[doc = " Integer field"] + pub const GFT_Integer: Type = 0; + #[doc = " Floating point (double) field"] + pub const GFT_Real: Type = 1; + #[doc = " String field"] + pub const GFT_String: Type = 2; +} +pub mod GDALRATFieldUsage { + #[doc = " Field usage of raster attribute table"] + pub type Type = libc::c_uint; + #[doc = " General purpose field."] + pub const GFU_Generic: Type = 0; + #[doc = " Histogram pixel count"] + pub const GFU_PixelCount: Type = 1; + #[doc = " Class name"] + pub const GFU_Name: Type = 2; + #[doc = " Class range minimum"] + pub const GFU_Min: Type = 3; + #[doc = " Class range maximum"] + pub const GFU_Max: Type = 4; + #[doc = " Class value (min=max)"] + pub const GFU_MinMax: Type = 5; + #[doc = " Red class color (0-255)"] + pub const GFU_Red: Type = 6; + #[doc = " Green class color (0-255)"] + pub const GFU_Green: Type = 7; + #[doc = " Blue class color (0-255)"] + pub const GFU_Blue: Type = 8; + #[doc = " Alpha (0=transparent,255=opaque)"] + pub const GFU_Alpha: Type = 9; + #[doc = " Color Range Red Minimum"] + pub const GFU_RedMin: Type = 10; + #[doc = " Color Range Green Minimum"] + pub const GFU_GreenMin: Type = 11; + #[doc = " Color Range Blue Minimum"] + pub const GFU_BlueMin: Type = 12; + #[doc = " Color Range Alpha Minimum"] + pub const GFU_AlphaMin: Type = 13; + #[doc = " Color Range Red Maximum"] + pub const GFU_RedMax: Type = 14; + #[doc = " Color Range Green Maximum"] + pub const GFU_GreenMax: Type = 15; + #[doc = " Color Range Blue Maximum"] + pub const GFU_BlueMax: Type = 16; + #[doc = " Color Range Alpha Maximum"] + pub const GFU_AlphaMax: Type = 17; + #[doc = " Maximum GFU value (equals to GFU_AlphaMax+1 currently)"] + pub const GFU_MaxCount: Type = 18; +} +pub mod GDALRATTableType { + #[doc = " RAT table type (thematic or athematic)"] + #[doc = " @since GDAL 2.4"] + pub type Type = libc::c_uint; + #[doc = " Thematic table type"] + pub const GRTT_THEMATIC: Type = 0; + #[doc = " Athematic table type"] + pub const GRTT_ATHEMATIC: Type = 1; } extern "C" { - #[doc = " @endcond"] - pub fn GDALOpenVerticalShiftGrid( - pszProj4Geoidgrids: *const libc::c_char, - pbError: *mut libc::c_int, - ) -> GDALDatasetH; + pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; } extern "C" { - pub fn GDALApplyVerticalShiftGrid( - hSrcDataset: GDALDatasetH, - hGridDataset: GDALDatasetH, - bInverse: libc::c_int, - dfSrcUnitToMeter: f64, - dfDstUnitToMeter: f64, - papszOptions: *const *const libc::c_char, - ) -> GDALDatasetH; + pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); } -pub type CPLThreadFunc = ::std::option::Option; extern "C" { - pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; + pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn CPLUnlockFile(hLock: *mut libc::c_void); + pub fn GDALRATGetNameOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLCreateMutex() -> *mut libc::c_void; + pub fn GDALRATGetUsageOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> GDALRATFieldUsage::Type; } extern "C" { - pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; + pub fn GDALRATGetTypeOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> GDALRATFieldType::Type; } extern "C" { - pub fn CPLCreateOrAcquireMutex( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, + pub fn GDALRATGetColOfUsage( + arg1: GDALRasterAttributeTableH, + arg2: GDALRATFieldUsage::Type, ) -> libc::c_int; } extern "C" { - pub fn CPLCreateOrAcquireMutexEx( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - nOptions: libc::c_int, - ) -> libc::c_int; + pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; + pub fn GDALRATGetValueAsString( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); + pub fn GDALRATGetValueAsInt( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); + pub fn GDALRATGetValueAsDouble( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + ) -> f64; } extern "C" { - pub fn CPLCleanupMasterMutex(); + pub fn GDALRATSetValueAsString( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const libc::c_char, + ); } extern "C" { - pub fn CPLCreateCond() -> *mut libc::c_void; + pub fn GDALRATSetValueAsInt( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + ); } extern "C" { - pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); + pub fn GDALRATSetValueAsDouble( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: f64, + ); } extern "C" { - pub fn CPLCondSignal(hCond: *mut libc::c_void); + pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn CPLCondBroadcast(hCond: *mut libc::c_void); + pub fn GDALRATValuesIOAsDouble( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + pdfData: *mut f64, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLDestroyCond(hCond: *mut libc::c_void); + pub fn GDALRATValuesIOAsInteger( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + pnData: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - #[doc = " Contrary to what its name suggests, CPLGetPID() actually returns the thread id"] - pub fn CPLGetPID() -> GIntBig; + pub fn GDALRATValuesIOAsString( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + papszStrList: CSLConstList, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLGetCurrentProcessID() -> libc::c_int; + pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); } extern "C" { - pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; + pub fn GDALRATCreateColumn( + arg1: GDALRasterAttributeTableH, + arg2: *const libc::c_char, + arg3: GDALRATFieldType::Type, + arg4: GDALRATFieldUsage::Type, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLCreateJoinableThread( - pfnMain: CPLThreadFunc, - pArg: *mut libc::c_void, - ) -> *mut libc::c_void; + pub fn GDALRATSetLinearBinning( + arg1: GDALRasterAttributeTableH, + arg2: f64, + arg3: f64, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); + pub fn GDALRATGetLinearBinning( + arg1: GDALRasterAttributeTableH, + arg2: *mut f64, + arg3: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn CPLSleep(dfWaitInSeconds: f64); + pub fn GDALRATSetTableType( + hRAT: GDALRasterAttributeTableH, + eInTableType: GDALRATTableType::Type, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLGetThreadingModel() -> *const libc::c_char; + pub fn GDALRATGetTableType(hRAT: GDALRasterAttributeTableH) -> GDALRATTableType::Type; } extern "C" { - pub fn CPLGetNumCPUs() -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CPLLock { - _unused: [u8; 0], -} -pub type CPLLock = _CPLLock; -pub mod CPLLockType { - pub type Type = u32; - pub const LOCK_RECURSIVE_MUTEX: Type = 0; - pub const LOCK_ADAPTIVE_MUTEX: Type = 1; - pub const LOCK_SPIN: Type = 2; + pub fn GDALRATInitializeFromColorTable( + arg1: GDALRasterAttributeTableH, + arg2: GDALColorTableH, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; + pub fn GDALRATTranslateToColorTable( + arg1: GDALRasterAttributeTableH, + nEntryCount: libc::c_int, + ) -> GDALColorTableH; } extern "C" { - pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) - -> libc::c_int; + pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); } extern "C" { - pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; + pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; } extern "C" { - pub fn CPLReleaseLock(arg1: *mut CPLLock); + pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; } extern "C" { - pub fn CPLDestroyLock(arg1: *mut CPLLock); + pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; } extern "C" { - pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); + pub fn GDALRATRemoveStatistics(arg1: GDALRasterAttributeTableH); } extern "C" { - pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; + pub fn GDALSetCacheMax(nBytes: libc::c_int); } extern "C" { - pub fn CPLGetTLSEx( - nIndex: libc::c_int, - pbMemoryErrorOccurred: *mut libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALGetCacheMax() -> libc::c_int; } extern "C" { - pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); + pub fn GDALGetCacheUsed() -> libc::c_int; } -pub type CPLTLSFreeFunc = ::std::option::Option; extern "C" { - pub fn CPLSetTLSWithFreeFunc( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - ); + pub fn GDALSetCacheMax64(nBytes: GIntBig); } extern "C" { - pub fn CPLSetTLSWithFreeFuncEx( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - pbMemoryErrorOccurred: *mut libc::c_int, - ); + pub fn GDALGetCacheMax64() -> GIntBig; } extern "C" { - pub fn CPLCleanupTLS(); + pub fn GDALGetCacheUsed64() -> GIntBig; } -pub mod GDALResampleAlg { - #[doc = " Warp Resampling Algorithm"] - pub type Type = u32; - #[doc = " Nearest neighbour (select on one input pixel)"] - pub const GRA_NearestNeighbour: Type = 0; - #[doc = " Bilinear (2x2 kernel)"] - pub const GRA_Bilinear: Type = 1; - #[doc = " Cubic Convolution Approximation (4x4 kernel)"] - pub const GRA_Cubic: Type = 2; - #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] - pub const GRA_CubicSpline: Type = 3; - #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] - pub const GRA_Lanczos: Type = 4; - #[doc = " Average (computes the average of all non-NODATA contributing pixels)"] - pub const GRA_Average: Type = 5; - #[doc = " Mode (selects the value which appears most often of all the sampled points)"] - pub const GRA_Mode: Type = 6; - #[doc = " Max (selects maximum of all non-NODATA contributing pixels)"] - pub const GRA_Max: Type = 8; - #[doc = " Min (selects minimum of all non-NODATA contributing pixels)"] - pub const GRA_Min: Type = 9; - #[doc = " Med (selects median of all non-NODATA contributing pixels)"] - pub const GRA_Med: Type = 10; - #[doc = " Q1 (selects first quartile of all non-NODATA contributing pixels)"] - pub const GRA_Q1: Type = 11; - #[doc = " Q3 (selects third quartile of all non-NODATA contributing pixels)"] - pub const GRA_Q3: Type = 12; +extern "C" { + pub fn GDALFlushCacheBlock() -> libc::c_int; } -#[doc = " @cond Doxygen_Suppress"] -pub type GDALMaskFunc = ::std::option::Option< - unsafe extern "C" fn( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pMask: *mut libc::c_void, - ) -> libc::c_int, ->; extern "C" { - pub fn GDALWarpNoDataMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, + pub fn GDALDatasetGetVirtualMem( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, nXOff: libc::c_int, nYOff: libc::c_int, nXSize: libc::c_int, nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllValid: *mut libc::c_int, - ) -> CPLErr::Type; + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: GIntBig, + nBandSpace: GIntBig, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALWarpDstAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, + pub fn GDALRasterBandGetVirtualMem( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, nXOff: libc::c_int, nYOff: libc::c_int, nXSize: libc::c_int, nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: GIntBig, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALWarpSrcAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, + pub fn GDALGetVirtualMemAuto( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + pnPixelSpace: *mut libc::c_int, + pnLineSpace: *mut GIntBig, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; +} +pub mod GDALTileOrganization { + #[doc = " Enumeration to describe the tile organization"] + pub type Type = libc::c_uint; + #[doc = " Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ..."] + pub const GTO_TIP: Type = 0; + #[doc = " Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ..."] + pub const GTO_BIT: Type = 1; + #[doc = " Band SeQuential : all the tiles of first band, all the tiles of following band..."] + pub const GTO_BSQ: Type = 2; +} +extern "C" { + pub fn GDALDatasetGetTiledVirtualMem( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, nXOff: libc::c_int, nYOff: libc::c_int, nXSize: libc::c_int, nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllOpaque: *mut libc::c_int, - ) -> CPLErr::Type; + nTileXSize: libc::c_int, + nTileYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + eTileOrganization: GDALTileOrganization::Type, + nCacheSize: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALWarpSrcMaskMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, + pub fn GDALRasterBandGetTiledVirtualMem( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, nXOff: libc::c_int, nYOff: libc::c_int, nXSize: libc::c_int, nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; + nTileXSize: libc::c_int, + nTileYSize: libc::c_int, + eBufType: GDALDataType::Type, + nCacheSize: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALWarpCutlineMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, + pub fn GDALCreatePansharpenedVRT( + pszXML: *const libc::c_char, + hPanchroBand: GDALRasterBandH, + nInputSpectralBands: libc::c_int, + pahInputSpectralBands: *mut GDALRasterBandH, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALGetJPEG2000Structure( + pszFilename: *const libc::c_char, + papszOptions: CSLConstList, + ) -> *mut CPLXMLNode; +} +extern "C" { + pub fn GDALComputeMedianCutPCT( + hRed: GDALRasterBandH, + hGreen: GDALRasterBandH, + hBlue: GDALRasterBandH, + pfnIncludePixel: ::std::option::Option< + unsafe extern "C" fn( + arg1: libc::c_int, + arg2: libc::c_int, + arg3: *mut libc::c_void, + ) -> libc::c_int, + >, + nColors: libc::c_int, + hColorTable: GDALColorTableH, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALDitherRGB2PCT( + hRed: GDALRasterBandH, + hGreen: GDALRasterBandH, + hBlue: GDALRasterBandH, + hTarget: GDALRasterBandH, + hColorTable: GDALColorTableH, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALChecksumImage( + hBand: GDALRasterBandH, nXOff: libc::c_int, nYOff: libc::c_int, nXSize: libc::c_int, nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALComputeProximity( + hSrcBand: GDALRasterBandH, + hProximityBand: GDALRasterBandH, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, ) -> CPLErr::Type; } -#[doc = " Warp control options for use with GDALWarpOperation::Initialize()"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALWarpOptions { - pub papszWarpOptions: *mut *mut libc::c_char, - #[doc = " In bytes, 0.0 for internal default"] - pub dfWarpMemoryLimit: f64, - #[doc = " Resampling algorithm to use"] - pub eResampleAlg: GDALResampleAlg::Type, - #[doc = " data type to use during warp operation, GDT_Unknown lets the algorithm"] - #[doc = "select the type"] - pub eWorkingDataType: GDALDataType::Type, - #[doc = " Source image dataset."] - pub hSrcDS: GDALDatasetH, - #[doc = " Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer()."] - pub hDstDS: GDALDatasetH, - #[doc = " Number of bands to process, may be 0 to select all bands."] - pub nBandCount: libc::c_int, - #[doc = " The band numbers for the source bands to process (1 based)"] - pub panSrcBands: *mut libc::c_int, - #[doc = " The band numbers for the destination bands to process (1 based)"] - pub panDstBands: *mut libc::c_int, - #[doc = " The source band so use as an alpha (transparency) value, 0=disabled"] - pub nSrcAlphaBand: libc::c_int, - #[doc = " The dest. band so use as an alpha (transparency) value, 0=disabled"] - pub nDstAlphaBand: libc::c_int, - #[doc = " The \"nodata\" value real component for each input band, if NULL there isn\'t one"] - pub padfSrcNoDataReal: *mut f64, - #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] - #[doc = "component is provided. This value is not used to flag invalid values."] - #[doc = "Only the real component is used."] - pub padfSrcNoDataImag: *mut f64, - #[doc = " The \"nodata\" value real component for each output band, if NULL there isn\'t one"] - pub padfDstNoDataReal: *mut f64, - #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] - #[doc = "component is provided. Note that warp operations only use real component"] - #[doc = "for flagging invalid data."] - pub padfDstNoDataImag: *mut f64, - #[doc = " GDALProgressFunc() compatible progress reporting function, or NULL"] - #[doc = "if there isn\'t one."] - pub pfnProgress: GDALProgressFunc, - #[doc = " Callback argument to be passed to pfnProgress."] - pub pProgressArg: *mut libc::c_void, - #[doc = " Type of spatial point transformer function"] - pub pfnTransformer: GDALTransformerFunc, - #[doc = " Handle to image transformer setup structure"] - pub pTransformerArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnSrcValidityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pSrcValidityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnSrcDensityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pSrcDensityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnDstDensityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pDstDensityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnDstValidityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pDstValidityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnPreWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - #[doc = " Unused. Must be NULL"] - pub pPreWarpProcessorArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnPostWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - #[doc = " Unused. Must be NULL"] - pub pPostWarpProcessorArg: *mut libc::c_void, - #[doc = " Optional OGRPolygonH for a masking cutline."] - pub hCutline: *mut libc::c_void, - #[doc = " Optional blending distance to apply across cutline in pixels, default is zero."] - pub dfCutlineBlendDist: f64, -} -#[test] -fn bindgen_test_layout_GDALWarpOptions() { - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papszWarpOptions) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfWarpMemoryLimit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eWorkingDataType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hSrcDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hDstDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nBandCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panSrcBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panDstBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nSrcAlphaBand) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nDstAlphaBand) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataImag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataImag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pProgressArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnTransformer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pTransformerArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ - as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papfnSrcPerBandValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ - as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papSrcPerBandValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ - as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPreWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPreWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ - as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPostWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPostWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hCutline) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfCutlineBlendDist) - ) - ); +extern "C" { + pub fn GDALFillNodata( + hTargetBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + dfMaxSearchDist: f64, + bDeprecatedOption: libc::c_int, + nSmoothingIterations: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; + pub fn GDALPolygonize( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hOutLayer: OGRLayerH, + iPixValField: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); -} -extern "C" { - pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; -} -extern "C" { - pub fn GDALWarpInitDstNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); -} -extern "C" { - pub fn GDALWarpInitSrcNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); -} -extern "C" { - pub fn GDALWarpInitNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); -} -extern "C" { - pub fn GDALWarpInitDstNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); -} -extern "C" { - pub fn GDALWarpInitSrcNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); + pub fn GDALFPolygonize( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hOutLayer: OGRLayerH, + iPixValField: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALWarpResolveWorkingDataType(arg1: *mut GDALWarpOptions); + pub fn GDALSieveFilter( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hDstBand: GDALRasterBandH, + nSizeThreshold: libc::c_int, + nConnectedness: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } +pub type GDALTransformerFunc = ::std::option::Option< + unsafe extern "C" fn( + pTransformerArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int, +>; extern "C" { - pub fn GDALWarpInitDefaultBandMapping(arg1: *mut GDALWarpOptions, nBandCount: libc::c_int); + #[doc = " @cond Doxygen_Suppress"] + pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; + pub fn GDALUseTransformer( + pTransformerArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; + pub fn GDALCreateSimilarTransformer( + psTransformerArg: *mut libc::c_void, + dfSrcRatioX: f64, + dfSrcRatioY: f64, + ) -> *mut libc::c_void; } extern "C" { - pub fn GDALReprojectImage( + #[doc = " @endcond"] + pub fn GDALCreateGenImgProjTransformer( hSrcDS: GDALDatasetH, pszSrcWKT: *const libc::c_char, hDstDS: GDALDatasetH, pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; + bGCPUseOK: libc::c_int, + dfGCPErrorThreshold: f64, + nOrder: libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - pub fn GDALCreateAndReprojectImage( + pub fn GDALCreateGenImgProjTransformer2( hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstFilename: *const libc::c_char, - pszDstWKT: *const libc::c_char, - hDstDriver: GDALDriverH, - papszCreateOptions: *mut *mut libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; + hDstDS: GDALDatasetH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn GDALAutoCreateWarpedVRT( - hSrcDS: GDALDatasetH, + pub fn GDALCreateGenImgProjTransformer3( pszSrcWKT: *const libc::c_char, + padfSrcGeoTransform: *const f64, pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfMaxError: f64, - psOptions: *const GDALWarpOptions, - ) -> GDALDatasetH; -} -extern "C" { - pub fn GDALCreateWarpedVRT( - hSrcDS: GDALDatasetH, - nPixels: libc::c_int, - nLines: libc::c_int, - padfGeoTransform: *mut f64, - psOptions: *mut GDALWarpOptions, - ) -> GDALDatasetH; + padfDstGeoTransform: *const f64, + ) -> *mut libc::c_void; } extern "C" { - pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; + pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); } -#[doc = " Opaque type representing a GDALWarpOperation object"] -pub type GDALWarpOperationH = *mut libc::c_void; extern "C" { - pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; + pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); } extern "C" { - pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); + pub fn GDALGenImgProjTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALChunkAndWarpImage( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); } extern "C" { - pub fn GDALChunkAndWarpMulti( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALGetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *mut f64); } extern "C" { - pub fn GDALWarpRegion( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALCreateReprojectionTransformer( + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn GDALWarpRegionToBuffer( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_void, - arg7: GDALDataType::Type, - arg8: libc::c_int, - arg9: libc::c_int, - arg10: libc::c_int, - arg11: libc::c_int, - ) -> CPLErr::Type; -} -pub mod OGRAxisOrientation { - #[doc = " Axis orientations (corresponds to CS_AxisOrientationEnum)."] - pub type Type = u32; - #[doc = "< Other"] - pub const OAO_Other: Type = 0; - #[doc = "< North"] - pub const OAO_North: Type = 1; - #[doc = "< South"] - pub const OAO_South: Type = 2; - #[doc = "< East"] - pub const OAO_East: Type = 3; - #[doc = "< West"] - pub const OAO_West: Type = 4; - #[doc = "< Up (to space)"] - pub const OAO_Up: Type = 5; - #[doc = "< Down (to Earth center)"] - pub const OAO_Down: Type = 6; + pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); } extern "C" { - pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; + pub fn GDALReprojectionTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; + pub fn GDALCreateGCPTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + nReqOrder: libc::c_int, + bReversed: libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; + pub fn GDALCreateGCPRefineTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + nReqOrder: libc::c_int, + bReversed: libc::c_int, + tolerance: f64, + minimumGcps: libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; + pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); } extern "C" { - pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); + pub fn GDALGCPTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALCreateTPSTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + bReversed: libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); } extern "C" { - pub fn OSRRelease(arg1: OGRSpatialReferenceH); + pub fn GDALTPSTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRFixupOrdering(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + #[doc = " @endcond"] + pub fn GDALCreateRPCTransformer( + psRPC: *mut GDALRPCInfo, + bReversed: libc::c_int, + dfPixErrThreshold: f64, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn OSRFixup(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); } extern "C" { - pub fn OSRStripCTParms(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALRPCTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; + pub fn GDALCreateGeoLocTransformer( + hBaseDS: GDALDatasetH, + papszGeolocationInfo: *mut *mut libc::c_char, + bReversed: libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; + pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); } extern "C" { - pub fn OSRImportFromWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; + pub fn GDALGeoLocTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRImportFromProj4( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALCreateApproxTransformer( + pfnRawTransformer: GDALTransformerFunc, + pRawTransformerArg: *mut libc::c_void, + dfMaxError: f64, + ) -> *mut libc::c_void; } extern "C" { - pub fn OSRImportFromESRI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; + pub fn GDALApproxTransformerOwnsSubtransformer( + pCBData: *mut libc::c_void, + bOwnFlag: libc::c_int, + ); } extern "C" { - pub fn OSRImportFromPCI( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> OGRErr::Type; + pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); } extern "C" { - pub fn OSRImportFromUSGS( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: *mut f64, - arg5: libc::c_long, - ) -> OGRErr::Type; + pub fn GDALApproxTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn GDALSimpleImageWarp( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + nBandCount: libc::c_int, + panBandList: *mut libc::c_int, + pfnTransform: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + papszWarpOptions: *mut *mut libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OSRImportFromDict( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALSuggestedWarpOutput( + hSrcDS: GDALDatasetH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeoTransformOut: *mut f64, + pnPixels: *mut libc::c_int, + pnLines: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRImportFromPanorama( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: libc::c_long, - arg5: *mut f64, - ) -> OGRErr::Type; + pub fn GDALSuggestedWarpOutput2( + hSrcDS: GDALDatasetH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeoTransformOut: *mut f64, + pnPixels: *mut libc::c_int, + pnLines: *mut libc::c_int, + padfExtents: *mut f64, + nOptions: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRImportFromOzi( - arg1: OGRSpatialReferenceH, - arg2: *const *const libc::c_char, - ) -> OGRErr::Type; + #[doc = " @cond Doxygen_Suppress"] + pub fn GDALSerializeTransformer( + pfnFunc: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OSRImportFromMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALDeserializeTransformer( + psTree: *mut CPLXMLNode, + ppfnFunc: *mut GDALTransformerFunc, + ppTransformArg: *mut *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRImportFromERM( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> OGRErr::Type; + #[doc = " @endcond"] + pub fn GDALTransformGeolocations( + hXBand: GDALRasterBandH, + hYBand: GDALRasterBandH, + hZBand: GDALRasterBandH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + papszOptions: *mut *mut libc::c_char, + ) -> CPLErr::Type; } +#[doc = " Contour writer callback type"] +pub type GDALContourWriter = ::std::option::Option< + unsafe extern "C" fn( + dfLevel: f64, + nPoints: libc::c_int, + padfX: *mut f64, + padfY: *mut f64, + arg1: *mut libc::c_void, + ) -> CPLErr::Type, +>; +#[doc = " Contour generator opaque type"] +pub type GDALContourGeneratorH = *mut libc::c_void; extern "C" { - pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn GDAL_CG_Create( + nWidth: libc::c_int, + nHeight: libc::c_int, + bNoDataSet: libc::c_int, + dfNoDataValue: f64, + dfContourInterval: f64, + dfContourBase: f64, + pfnWriter: GDALContourWriter, + pCBData: *mut libc::c_void, + ) -> GDALContourGeneratorH; } extern "C" { - pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) - -> OGRErr::Type; + pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; } extern "C" { - pub fn OSRExportToPrettyWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: libc::c_int, - ) -> OGRErr::Type; + pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); } extern "C" { - pub fn OSRExportToProj4( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; + pub fn OGRContourWriter( + arg1: f64, + arg2: libc::c_int, + arg3: *mut f64, + arg4: *mut f64, + pInfo: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRExportToPCI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *mut *mut libc::c_char, - arg4: *mut *mut f64, - ) -> OGRErr::Type; + #[doc = " @endcond"] + pub fn GDALContourGenerate( + hBand: GDALRasterBandH, + dfContourInterval: f64, + dfContourBase: f64, + nFixedLevelCount: libc::c_int, + padfFixedLevels: *mut f64, + bUseNoData: libc::c_int, + dfNoDataValue: f64, + hLayer: *mut libc::c_void, + iIDField: libc::c_int, + iElevField: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRExportToUSGS( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut *mut f64, - arg5: *mut libc::c_long, - ) -> OGRErr::Type; + pub fn GDALContourGenerateEx( + hBand: GDALRasterBandH, + hLayer: *mut libc::c_void, + options: CSLConstList, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRExportToXML( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALRasterizeGeometries( + hDS: GDALDatasetH, + nBandCount: libc::c_int, + panBandList: *mut libc::c_int, + nGeomCount: libc::c_int, + pahGeometries: *mut OGRGeometryH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeomBurnValue: *mut f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRExportToPanorama( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut libc::c_long, - arg5: *mut libc::c_long, - arg6: *mut f64, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToERM( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_char, - arg3: *mut libc::c_char, - arg4: *mut libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; -} -extern "C" { - pub fn OSRConvertToOtherProjection( - hSRS: OGRSpatialReferenceH, - pszTargetProjection: *const libc::c_char, - papszOptions: *const *const libc::c_char, - ) -> OGRSpatialReferenceH; -} -extern "C" { - pub fn OSRSetAttrValue( - hSRS: OGRSpatialReferenceH, - pszNodePath: *const libc::c_char, - pszNewNodeValue: *const libc::c_char, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OSRGetAttrValue( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - iChild: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OSRSetAngularUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; + pub fn GDALRasterizeLayers( + hDS: GDALDatasetH, + nBandCount: libc::c_int, + panBandList: *mut libc::c_int, + nLayerCount: libc::c_int, + pahLayers: *mut OGRLayerH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfLayerBurnValues: *mut f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn GDALRasterizeLayersBuf( + pData: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nLayerCount: libc::c_int, + pahLayers: *mut OGRLayerH, + pszDstProjection: *const libc::c_char, + padfDstGeoTransform: *mut f64, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + dfBurnValue: f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } -extern "C" { - pub fn OSRSetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; +pub mod GDALGridAlgorithm { + #[doc = " Gridding Algorithms"] + pub type Type = libc::c_uint; + #[doc = " Inverse distance to a power"] + pub const GGA_InverseDistanceToAPower: Type = 1; + #[doc = " Moving Average"] + pub const GGA_MovingAverage: Type = 2; + #[doc = " Nearest Neighbor"] + pub const GGA_NearestNeighbor: Type = 3; + #[doc = " Minimum Value (Data Metric)"] + pub const GGA_MetricMinimum: Type = 4; + #[doc = " Maximum Value (Data Metric)"] + pub const GGA_MetricMaximum: Type = 5; + #[doc = " Data Range (Data Metric)"] + pub const GGA_MetricRange: Type = 6; + #[doc = " Number of Points (Data Metric)"] + pub const GGA_MetricCount: Type = 7; + #[doc = " Average Distance (Data Metric)"] + pub const GGA_MetricAverageDistance: Type = 8; + #[doc = " Average Distance Between Data Points (Data Metric)"] + pub const GGA_MetricAverageDistancePts: Type = 9; + #[doc = " Linear interpolation (from Delaunay triangulation. Since GDAL 2.1"] + pub const GGA_Linear: Type = 10; + #[doc = " Inverse distance to a power with nearest neighbor search for max points"] + pub const GGA_InverseDistanceToAPowerNearestNeighbor: Type = 11; } extern "C" { - pub fn OSRSetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: f64, - ) -> OGRErr::Type; + pub fn GDALGridCreate( + arg1: GDALGridAlgorithm::Type, + arg2: *const libc::c_void, + arg3: GUInt32, + arg4: *const f64, + arg5: *const f64, + arg6: *const f64, + arg7: f64, + arg8: f64, + arg9: f64, + arg10: f64, + arg11: GUInt32, + arg12: GUInt32, + arg13: GDALDataType::Type, + arg14: *mut libc::c_void, + arg15: GDALProgressFunc, + arg16: *mut libc::c_void, + ) -> CPLErr::Type; } -extern "C" { - pub fn OSRSetLinearUnitsAndUpdateParameters( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridContext { + _unused: [u8; 0], } extern "C" { - pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn GDALGridContextCreate( + eAlgorithm: GDALGridAlgorithm::Type, + poOptions: *const libc::c_void, + nPoints: GUInt32, + padfX: *const f64, + padfY: *const f64, + padfZ: *const f64, + bCallerWillKeepPointArraysAlive: libc::c_int, + ) -> *mut GDALGridContext; } extern "C" { - pub fn OSRGetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> f64; + pub fn GDALGridContextFree(psContext: *mut GDALGridContext); } extern "C" { - pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn GDALGridContextProcess( + psContext: *mut GDALGridContext, + dfXMin: f64, + dfXMax: f64, + dfYMin: f64, + dfYMax: f64, + nXSize: GUInt32, + nYSize: GUInt32, + eType: GDALDataType::Type, + pData: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALComputeMatchingPoints( + hFirstImage: GDALDatasetH, + hSecondImage: GDALDatasetH, + papszOptions: *mut *mut libc::c_char, + pnGCPCount: *mut libc::c_int, + ) -> *mut GDAL_GCP; } -extern "C" { - pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; +#[doc = " Triangle fact"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriFacet { + #[doc = "< index to the padfX/padfY arrays"] + pub anVertexIdx: [libc::c_int; 3usize], + #[doc = "< index to GDALDelaunayTriangulation.pasFacets, or -1"] + pub anNeighborIdx: [libc::c_int; 3usize], } -extern "C" { - pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; +#[test] +fn bindgen_test_layout_GDALTriFacet() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(GDALTriFacet)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(GDALTriFacet)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).anVertexIdx as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALTriFacet), + "::", + stringify!(anVertexIdx) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).anNeighborIdx as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(GDALTriFacet), + "::", + stringify!(anNeighborIdx) + ) + ); } -extern "C" { - pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; +#[doc = " Triangle barycentric coefficients."] +#[doc = ""] +#[doc = " Conversion from cartesian (x,y) to barycentric (l1,l2,l3) with :"] +#[doc = " l1 = dfMul1X * (x - dfCxtX) + dfMul1Y * (y - dfCstY)"] +#[doc = " l2 = dfMul2X * (x - dfCxtX) + dfMul2Y * (y - dfCstY)"] +#[doc = " l3 = 1 - l1 - l2"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriBarycentricCoefficients { + #[doc = "< dfMul1X"] + pub dfMul1X: f64, + #[doc = "< dfMul1Y"] + pub dfMul1Y: f64, + #[doc = "< dfMul2X"] + pub dfMul2X: f64, + #[doc = "< dfMul2Y"] + pub dfMul2Y: f64, + #[doc = "< dfCstX"] + pub dfCstX: f64, + #[doc = "< dfCstY"] + pub dfCstY: f64, } -extern "C" { - pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; +#[test] +fn bindgen_test_layout_GDALTriBarycentricCoefficients() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(GDALTriBarycentricCoefficients)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALTriBarycentricCoefficients)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfMul1X as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfMul1X) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfMul1Y as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfMul1Y) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfMul2X as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfMul2X) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfMul2Y as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfMul2Y) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfCstX as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfCstX) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfCstY as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfCstY) + ) + ); } -extern "C" { - pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; +#[doc = " Triangulation structure"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriangulation { + #[doc = "< number of facets"] + pub nFacets: libc::c_int, + #[doc = "< array of nFacets facets"] + pub pasFacets: *mut GDALTriFacet, + #[doc = "< arra of nFacets barycentric coefficients"] + pub pasFacetCoefficients: *mut GDALTriBarycentricCoefficients, } -extern "C" { - pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; +#[test] +fn bindgen_test_layout_GDALTriangulation() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(GDALTriangulation)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALTriangulation)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nFacets as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALTriangulation), + "::", + stringify!(nFacets) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pasFacets as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALTriangulation), + "::", + stringify!(pasFacets) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pasFacetCoefficients as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALTriangulation), + "::", + stringify!(pasFacetCoefficients) + ) + ); } extern "C" { - pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALHasTriangulation() -> libc::c_int; } extern "C" { - pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALTriangulationCreateDelaunay( + nPoints: libc::c_int, + padfX: *const f64, + padfY: *const f64, + ) -> *mut GDALTriangulation; } extern "C" { - pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn GDALTriangulationComputeBarycentricCoefficients( + psDT: *mut GDALTriangulation, + padfX: *const f64, + padfY: *const f64, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn GDALTriangulationComputeBarycentricCoordinates( + psDT: *const GDALTriangulation, + nFacetIdx: libc::c_int, + dfX: f64, + dfY: f64, + pdfL1: *mut f64, + pdfL2: *mut f64, + pdfL3: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn GDALTriangulationFindFacetBruteForce( + psDT: *const GDALTriangulation, + dfX: f64, + dfY: f64, + panOutputFacetIdx: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetWellKnownGeogCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALTriangulationFindFacetDirected( + psDT: *const GDALTriangulation, + nFacetIdx: libc::c_int, + dfX: f64, + dfY: f64, + panOutputFacetIdx: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetFromUserInput( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALTriangulationFree(psDT: *mut GDALTriangulation); } extern "C" { - pub fn OSRCopyGeogCSFrom( - hSRS: OGRSpatialReferenceH, - hSrcSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; + #[doc = " @cond Doxygen_Suppress"] + pub fn GDALTriangulationTerminate(); } extern "C" { - pub fn OSRSetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: f64, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - arg6: f64, - arg7: f64, - ) -> OGRErr::Type; + #[doc = " @endcond"] + pub fn GDALOpenVerticalShiftGrid( + pszProj4Geoidgrids: *const libc::c_char, + pbError: *mut libc::c_int, + ) -> GDALDatasetH; } extern "C" { - pub fn OSRGetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: *mut f64, - arg2: libc::c_int, - ) -> OGRErr::Type; + pub fn GDALApplyVerticalShiftGrid( + hSrcDataset: GDALDatasetH, + hGridDataset: GDALDatasetH, + bInverse: libc::c_int, + dfSrcUnitToMeter: f64, + dfDstUnitToMeter: f64, + papszOptions: *const *const libc::c_char, + ) -> GDALDatasetH; } -extern "C" { - pub fn OSRSetCompoundCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - hHorizSRS: OGRSpatialReferenceH, - hVertSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALInfoOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALInfoOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn OSRSetGeogCS( - hSRS: OGRSpatialReferenceH, - pszGeogName: *const libc::c_char, - pszDatumName: *const libc::c_char, - pszEllipsoidName: *const libc::c_char, - dfSemiMajor: f64, - dfInvFlattening: f64, - pszPMName: *const libc::c_char, - dfPMOffset: f64, - pszUnits: *const libc::c_char, - dfConvertToRadians: f64, - ) -> OGRErr::Type; + pub fn GDALInfoOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALInfoOptionsForBinary, + ) -> *mut GDALInfoOptions; } extern "C" { - pub fn OSRSetVertCS( - hSRS: OGRSpatialReferenceH, - pszVertCSName: *const libc::c_char, - pszVertDatumName: *const libc::c_char, - nVertDatumType: libc::c_int, - ) -> OGRErr::Type; + pub fn GDALInfoOptionsFree(psOptions: *mut GDALInfoOptions); } extern "C" { - pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + pub fn GDALInfo(hDataset: GDALDatasetH, psOptions: *const GDALInfoOptions) + -> *mut libc::c_char; } -extern "C" { - pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTranslateOptions { + _unused: [u8; 0], } -extern "C" { - pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTranslateOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn OSRSetAuthority( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszAuthority: *const libc::c_char, - nCode: libc::c_int, - ) -> OGRErr::Type; + pub fn GDALTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALTranslateOptionsForBinary, + ) -> *mut GDALTranslateOptions; } extern "C" { - pub fn OSRGetAuthorityCode( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; + pub fn GDALTranslateOptionsFree(psOptions: *mut GDALTranslateOptions); } extern "C" { - pub fn OSRGetAuthorityName( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; + pub fn GDALTranslateOptionsSetProgress( + psOptions: *mut GDALTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn GDALTranslate( + pszDestFilename: *const libc::c_char, + hSrcDataset: GDALDatasetH, + psOptions: *const GDALTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; } -extern "C" { - pub fn OSRSetProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpAppOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpAppOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn OSRGetProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; + pub fn GDALWarpAppOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALWarpAppOptionsForBinary, + ) -> *mut GDALWarpAppOptions; } extern "C" { - pub fn OSRSetNormProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; + pub fn GDALWarpAppOptionsFree(psOptions: *mut GDALWarpAppOptions); } extern "C" { - pub fn OSRGetNormProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; + pub fn GDALWarpAppOptionsSetProgress( + psOptions: *mut GDALWarpAppOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn OSRSetUTM( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNorth: libc::c_int, - ) -> OGRErr::Type; + pub fn GDALWarpAppOptionsSetQuiet(psOptions: *mut GDALWarpAppOptions, bQuiet: libc::c_int); } extern "C" { - pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; + pub fn GDALWarpAppOptionsSetWarpOption( + psOptions: *mut GDALWarpAppOptions, + pszKey: *const libc::c_char, + pszValue: *const libc::c_char, + ); } extern "C" { - pub fn OSRSetStatePlane( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - ) -> OGRErr::Type; + pub fn GDALWarp( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALWarpAppOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALVectorTranslateOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALVectorTranslateOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn OSRSetStatePlaneWithUnits( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - pszOverrideUnitName: *const libc::c_char, - dfOverrideUnit: f64, - ) -> OGRErr::Type; + pub fn GDALVectorTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALVectorTranslateOptionsForBinary, + ) -> *mut GDALVectorTranslateOptions; } extern "C" { - pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALVectorTranslateOptionsFree(psOptions: *mut GDALVectorTranslateOptions); } extern "C" { - pub fn OSRFindMatches( - hSRS: OGRSpatialReferenceH, - papszOptions: *mut *mut libc::c_char, - pnEntries: *mut libc::c_int, - ppanMatchConfidence: *mut *mut libc::c_int, - ) -> *mut OGRSpatialReferenceH; + pub fn GDALVectorTranslateOptionsSetProgress( + psOptions: *mut GDALVectorTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn OSRFreeSRSArray(pahSRS: *mut OGRSpatialReferenceH); + pub fn GDALVectorTranslate( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALVectorTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDEMProcessingOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDEMProcessingOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALDEMProcessingOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALDEMProcessingOptionsForBinary, + ) -> *mut GDALDEMProcessingOptions; } extern "C" { - pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALDEMProcessingOptionsFree(psOptions: *mut GDALDEMProcessingOptions); } extern "C" { - pub fn OSRGetAxis( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - iAxis: libc::c_int, - peOrientation: *mut OGRAxisOrientation::Type, - ) -> *const libc::c_char; + pub fn GDALDEMProcessingOptionsSetProgress( + psOptions: *mut GDALDEMProcessingOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn OSRSetAxes( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszXAxisName: *const libc::c_char, - eXAxisOrientation: OGRAxisOrientation::Type, - pszYAxisName: *const libc::c_char, - eYAxisOrientation: OGRAxisOrientation::Type, - ) -> OGRErr::Type; + pub fn GDALDEMProcessing( + pszDestFilename: *const libc::c_char, + hSrcDataset: GDALDatasetH, + pszProcessing: *const libc::c_char, + pszColorFilename: *const libc::c_char, + psOptions: *const GDALDEMProcessingOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALNearblackOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALNearblackOptionsForBinary { + _unused: [u8; 0], } extern "C" { - #[doc = " Albers Conic Equal Area"] - pub fn OSRSetACEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALNearblackOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALNearblackOptionsForBinary, + ) -> *mut GDALNearblackOptions; } extern "C" { - #[doc = " Azimuthal Equidistant"] - pub fn OSRSetAE( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALNearblackOptionsFree(psOptions: *mut GDALNearblackOptions); } extern "C" { - #[doc = " Bonne"] - pub fn OSRSetBonne( - hSRS: OGRSpatialReferenceH, - dfStandardParallel: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALNearblackOptionsSetProgress( + psOptions: *mut GDALNearblackOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - #[doc = " Cylindrical Equal Area"] - pub fn OSRSetCEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALNearblack( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + hSrcDS: GDALDatasetH, + psOptions: *const GDALNearblackOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridOptionsForBinary { + _unused: [u8; 0], } extern "C" { - #[doc = " Cassini-Soldner"] - pub fn OSRSetCS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALGridOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALGridOptionsForBinary, + ) -> *mut GDALGridOptions; } extern "C" { - #[doc = " Equidistant Conic"] - pub fn OSRSetEC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALGridOptionsFree(psOptions: *mut GDALGridOptions); } extern "C" { - #[doc = " Eckert I-VI"] - pub fn OSRSetEckert( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALGridOptionsSetProgress( + psOptions: *mut GDALGridOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - #[doc = " Eckert IV"] - pub fn OSRSetEckertIV( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALGrid( + pszDest: *const libc::c_char, + hSrcDS: GDALDatasetH, + psOptions: *const GDALGridOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterizeOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterizeOptionsForBinary { + _unused: [u8; 0], } extern "C" { - #[doc = " Eckert VI"] - pub fn OSRSetEckertVI( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALRasterizeOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALRasterizeOptionsForBinary, + ) -> *mut GDALRasterizeOptions; } extern "C" { - #[doc = " Equirectangular"] - pub fn OSRSetEquirectangular( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALRasterizeOptionsFree(psOptions: *mut GDALRasterizeOptions); } extern "C" { - #[doc = " Equirectangular generalized form"] - pub fn OSRSetEquirectangular2( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfPseudoStdParallel1: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALRasterizeOptionsSetProgress( + psOptions: *mut GDALRasterizeOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - #[doc = " Gall Stereograpic"] - pub fn OSRSetGS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALRasterize( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + hSrcDS: GDALDatasetH, + psOptions: *const GDALRasterizeOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALBuildVRTOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALBuildVRTOptionsForBinary { + _unused: [u8; 0], } extern "C" { - #[doc = " Goode Homolosine"] - pub fn OSRSetGH( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALBuildVRTOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALBuildVRTOptionsForBinary, + ) -> *mut GDALBuildVRTOptions; } extern "C" { - #[doc = " Interrupted Goode Homolosine"] - pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALBuildVRTOptionsFree(psOptions: *mut GDALBuildVRTOptions); } extern "C" { - #[doc = " GEOS - Geostationary Satellite View"] - pub fn OSRSetGEOS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfSatelliteHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALBuildVRTOptionsSetProgress( + psOptions: *mut GDALBuildVRTOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - #[doc = " Gauss Schreiber Transverse Mercator"] - pub fn OSRSetGaussSchreiberTMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALBuildVRT( + pszDest: *const libc::c_char, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + papszSrcDSNames: *const *const libc::c_char, + psOptions: *const GDALBuildVRTOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +pub mod OGRAxisOrientation { + #[doc = " Axis orientations (corresponds to CS_AxisOrientationEnum)."] + pub type Type = libc::c_uint; + #[doc = "< Other"] + pub const OAO_Other: Type = 0; + #[doc = "< North"] + pub const OAO_North: Type = 1; + #[doc = "< South"] + pub const OAO_South: Type = 2; + #[doc = "< East"] + pub const OAO_East: Type = 3; + #[doc = "< West"] + pub const OAO_West: Type = 4; + #[doc = "< Up (to space)"] + pub const OAO_Up: Type = 5; + #[doc = "< Down (to Earth center)"] + pub const OAO_Down: Type = 6; } extern "C" { - #[doc = " Gnomonic"] - pub fn OSRSetGnomonic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; } extern "C" { - #[doc = " Hotine Oblique Mercator using azimuth angle"] - pub fn OSRSetHOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; } extern "C" { - pub fn OSRSetHOMAC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; } extern "C" { - #[doc = " Hotine Oblique Mercator using two points on centerline"] - pub fn OSRSetHOM2PNO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; } extern "C" { - #[doc = " International Map of the World Polyconic"] - pub fn OSRSetIWMPolyconic( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLat2: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); } extern "C" { - #[doc = " Krovak Oblique Conic Conformal"] - pub fn OSRSetKrovak( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfPseudoStdParallelLat: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - #[doc = " Lambert Azimuthal Equal-Area"] - pub fn OSRSetLAEA( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - #[doc = " Lambert Conformal Conic"] - pub fn OSRSetLCC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRRelease(arg1: OGRSpatialReferenceH); } extern "C" { - #[doc = " Lambert Conformal Conic 1SP"] - pub fn OSRSetLCC1SP( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - #[doc = " Lambert Conformal Conic (Belgium)"] - pub fn OSRSetLCCB( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRFixupOrdering(arg1: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - #[doc = " Miller Cylindrical"] - pub fn OSRSetMC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRFixup(arg1: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - #[doc = " Mercator"] - pub fn OSRSetMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRStripCTParms(arg1: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - #[doc = " Mercator 2SP"] - pub fn OSRSetMercator2SP( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; } extern "C" { - #[doc = " Mollweide"] - pub fn OSRSetMollweide( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, + pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromWkt( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, ) -> OGRErr::Type; } extern "C" { - #[doc = " New Zealand Map Grid"] - pub fn OSRSetNZMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, + pub fn OSRImportFromProj4( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, ) -> OGRErr::Type; } extern "C" { - #[doc = " Oblique Stereographic"] - pub fn OSRSetOS( - hSRS: OGRSpatialReferenceH, - dfOriginLat: f64, - dfCMeridian: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, + pub fn OSRImportFromESRI( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, ) -> OGRErr::Type; } extern "C" { - #[doc = " Orthographic"] - pub fn OSRSetOrthographic( + pub fn OSRImportFromPCI( hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, ) -> OGRErr::Type; } extern "C" { - #[doc = " Polyconic"] - pub fn OSRSetPolyconic( + pub fn OSRImportFromUSGS( + arg1: OGRSpatialReferenceH, + arg2: libc::c_long, + arg3: libc::c_long, + arg4: *mut f64, + arg5: libc::c_long, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromDict( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromPanorama( + arg1: OGRSpatialReferenceH, + arg2: libc::c_long, + arg3: libc::c_long, + arg4: libc::c_long, + arg5: *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromOzi( + arg1: OGRSpatialReferenceH, + arg2: *const *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromMICoordSys( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromERM( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) + -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPrettyWkt( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToProj4( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPCI( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: *mut *mut libc::c_char, + arg4: *mut *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToUSGS( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_long, + arg3: *mut libc::c_long, + arg4: *mut *mut f64, + arg5: *mut libc::c_long, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToXML( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPanorama( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_long, + arg3: *mut libc::c_long, + arg4: *mut libc::c_long, + arg5: *mut libc::c_long, + arg6: *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToMICoordSys( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToERM( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_char, + arg3: *mut libc::c_char, + arg4: *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRConvertToOtherProjection( hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, + pszTargetProjection: *const libc::c_char, + papszOptions: *const *const libc::c_char, + ) -> OGRSpatialReferenceH; +} +extern "C" { + pub fn OSRSetAttrValue( + hSRS: OGRSpatialReferenceH, + pszNodePath: *const libc::c_char, + pszNewNodeValue: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetAttrValue( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + iChild: libc::c_int, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRSetAngularUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; +} +extern "C" { + pub fn OSRSetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetTargetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetLinearUnitsAndUpdateParameters( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; +} +extern "C" { + pub fn OSRGetTargetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *mut *mut libc::c_char, + ) -> f64; +} +extern "C" { + pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; +} +extern "C" { + pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetWellKnownGeogCS( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetFromUserInput( + hSRS: OGRSpatialReferenceH, + arg1: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRCopyGeogCSFrom( + hSRS: OGRSpatialReferenceH, + hSrcSRS: OGRSpatialReferenceH, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetTOWGS84( + hSRS: OGRSpatialReferenceH, + arg1: f64, + arg2: f64, + arg3: f64, + arg4: f64, + arg5: f64, + arg6: f64, + arg7: f64, ) -> OGRErr::Type; } extern "C" { - #[doc = " Polar Stereographic"] - pub fn OSRSetPS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRGetTOWGS84( + hSRS: OGRSpatialReferenceH, + arg1: *mut f64, + arg2: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetCompoundCS( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + hHorizSRS: OGRSpatialReferenceH, + hVertSRS: OGRSpatialReferenceH, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGeogCS( + hSRS: OGRSpatialReferenceH, + pszGeogName: *const libc::c_char, + pszDatumName: *const libc::c_char, + pszEllipsoidName: *const libc::c_char, + dfSemiMajor: f64, + dfInvFlattening: f64, + pszPMName: *const libc::c_char, + dfPMOffset: f64, + pszUnits: *const libc::c_char, + dfConvertToRadians: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetVertCS( + hSRS: OGRSpatialReferenceH, + pszVertCSName: *const libc::c_char, + pszVertDatumName: *const libc::c_char, + nVertDatumType: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRSetAuthority( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + pszAuthority: *const libc::c_char, + nCode: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetAuthorityCode( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRGetAuthorityName( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetProjParm( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetProjParm( + hSRS: OGRSpatialReferenceH, + pszParmName: *const libc::c_char, + dfDefault: f64, + arg1: *mut OGRErr::Type, + ) -> f64; +} +extern "C" { + pub fn OSRSetNormProjParm( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetNormProjParm( + hSRS: OGRSpatialReferenceH, + pszParmName: *const libc::c_char, + dfDefault: f64, + arg1: *mut OGRErr::Type, + ) -> f64; +} +extern "C" { + pub fn OSRSetUTM( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNorth: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn OSRSetStatePlane( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNAD83: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetStatePlaneWithUnits( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNAD83: libc::c_int, + pszOverrideUnitName: *const libc::c_char, + dfOverrideUnit: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRFindMatches( + hSRS: OGRSpatialReferenceH, + papszOptions: *mut *mut libc::c_char, + pnEntries: *mut libc::c_int, + ppanMatchConfidence: *mut *mut libc::c_int, + ) -> *mut OGRSpatialReferenceH; +} +extern "C" { + pub fn OSRFreeSRSArray(pahSRS: *mut OGRSpatialReferenceH); +} +extern "C" { + pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRGetAxis( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + iAxis: libc::c_int, + peOrientation: *mut OGRAxisOrientation::Type, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRSetAxes( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + pszXAxisName: *const libc::c_char, + eXAxisOrientation: OGRAxisOrientation::Type, + pszYAxisName: *const libc::c_char, + eYAxisOrientation: OGRAxisOrientation::Type, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Albers Conic Equal Area"] + pub fn OSRSetACEA( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Azimuthal Equidistant"] + pub fn OSRSetAE( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Bonne"] + pub fn OSRSetBonne( + hSRS: OGRSpatialReferenceH, + dfStandardParallel: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Cylindrical Equal Area"] + pub fn OSRSetCEA( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Cassini-Soldner"] + pub fn OSRSetCS( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Equidistant Conic"] + pub fn OSRSetEC( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Eckert I-VI"] + pub fn OSRSetEckert( + hSRS: OGRSpatialReferenceH, + nVariation: libc::c_int, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Eckert IV"] + pub fn OSRSetEckertIV( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Eckert VI"] + pub fn OSRSetEckertVI( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Equirectangular"] + pub fn OSRSetEquirectangular( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Equirectangular generalized form"] + pub fn OSRSetEquirectangular2( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfPseudoStdParallel1: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Gall Stereograpic"] + pub fn OSRSetGS( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Goode Homolosine"] + pub fn OSRSetGH( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Interrupted Goode Homolosine"] + pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + #[doc = " GEOS - Geostationary Satellite View"] + pub fn OSRSetGEOS( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfSatelliteHeight: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Gauss Schreiber Transverse Mercator"] + pub fn OSRSetGaussSchreiberTMercator( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Gnomonic"] + pub fn OSRSetGnomonic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Hotine Oblique Mercator using azimuth angle"] + pub fn OSRSetHOM( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfRectToSkew: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetHOMAC( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfRectToSkew: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Hotine Oblique Mercator using two points on centerline"] + pub fn OSRSetHOM2PNO( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfLat1: f64, + dfLong1: f64, + dfLat2: f64, + dfLong2: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " International Map of the World Polyconic"] + pub fn OSRSetIWMPolyconic( + hSRS: OGRSpatialReferenceH, + dfLat1: f64, + dfLat2: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Krovak Oblique Conic Conformal"] + pub fn OSRSetKrovak( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfPseudoStdParallelLat: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Lambert Azimuthal Equal-Area"] + pub fn OSRSetLAEA( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Lambert Conformal Conic"] + pub fn OSRSetLCC( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Lambert Conformal Conic 1SP"] + pub fn OSRSetLCC1SP( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Lambert Conformal Conic (Belgium)"] + pub fn OSRSetLCCB( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Miller Cylindrical"] + pub fn OSRSetMC( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Mercator"] + pub fn OSRSetMercator( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Mercator 2SP"] + pub fn OSRSetMercator2SP( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Mollweide"] + pub fn OSRSetMollweide( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " New Zealand Map Grid"] + pub fn OSRSetNZMG( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Oblique Stereographic"] + pub fn OSRSetOS( + hSRS: OGRSpatialReferenceH, + dfOriginLat: f64, + dfCMeridian: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Orthographic"] + pub fn OSRSetOrthographic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Polyconic"] + pub fn OSRSetPolyconic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Polar Stereographic"] + pub fn OSRSetPS( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Robinson"] + pub fn OSRSetRobinson( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Sinusoidal"] + pub fn OSRSetSinusoidal( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Stereographic"] + pub fn OSRSetStereographic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Swiss Oblique Cylindrical"] + pub fn OSRSetSOC( + hSRS: OGRSpatialReferenceH, + dfLatitudeOfOrigin: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Transverse Mercator"] + #[doc = ""] + #[doc = " Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 :"] + #[doc = " see OGRSpatialReference::exportToProj4()."] + pub fn OSRSetTM( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Transverse Mercator variant"] + pub fn OSRSetTMVariant( + hSRS: OGRSpatialReferenceH, + pszVariantName: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Tunesia Mining Grid"] + pub fn OSRSetTMG( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Transverse Mercator (South Oriented)"] + pub fn OSRSetTMSO( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " TPED (Two Point Equi Distant)"] + pub fn OSRSetTPED( + hSRS: OGRSpatialReferenceH, + dfLat1: f64, + dfLong1: f64, + dfLat2: f64, + dfLong2: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " VanDerGrinten"] + pub fn OSRSetVDG( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Wagner I -- VII"] + pub fn OSRSetWagner( + hSRS: OGRSpatialReferenceH, + nVariation: libc::c_int, + dfCenterLat: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Quadrilateralized Spherical Cube"] + pub fn OSRSetQSC( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + ) -> OGRErr::Type; +} +extern "C" { + #[doc = " Spherical, Cross-track, Height"] + pub fn OSRSetSCH( + hSRS: OGRSpatialReferenceH, + dfPegLat: f64, + dfPegLong: f64, + dfPegHeading: f64, + dfPegHgt: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; +} +extern "C" { + pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; +} +extern "C" { + pub fn OSRCleanup(); +} +extern "C" { + pub fn OCTNewCoordinateTransformation( + hSourceSRS: OGRSpatialReferenceH, + hTargetSRS: OGRSpatialReferenceH, + ) -> OGRCoordinateTransformationH; +} +extern "C" { + pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); +} +extern "C" { + pub fn OCTTransform( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + ) -> libc::c_int; +} +extern "C" { + pub fn OCTTransformEx( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + pabSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + #[doc = " @cond Doxygen_Suppress"] + pub fn OCTProj4Normalize(pszProj4Src: *const libc::c_char) -> *mut libc::c_char; +} +extern "C" { + pub fn OCTCleanupProjMutex(); +} +pub type CPLThreadFunc = ::std::option::Option; +extern "C" { + pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLUnlockFile(hLock: *mut libc::c_void); +} +extern "C" { + pub fn CPLCreateMutex() -> *mut libc::c_void; +} +extern "C" { + pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLCreateOrAcquireMutex( + arg1: *mut *mut libc::c_void, + dfWaitInSeconds: f64, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLCreateOrAcquireMutexEx( + arg1: *mut *mut libc::c_void, + dfWaitInSeconds: f64, + nOptions: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; +} +extern "C" { + pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); +} +extern "C" { + pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); +} +extern "C" { + pub fn CPLCleanupMasterMutex(); +} +extern "C" { + pub fn CPLCreateCond() -> *mut libc::c_void; +} +extern "C" { + pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); +} +extern "C" { + pub fn CPLCondSignal(hCond: *mut libc::c_void); +} +extern "C" { + pub fn CPLCondBroadcast(hCond: *mut libc::c_void); +} +extern "C" { + pub fn CPLDestroyCond(hCond: *mut libc::c_void); +} +extern "C" { + #[doc = " Contrary to what its name suggests, CPLGetPID() actually returns the thread id"] + pub fn CPLGetPID() -> GIntBig; +} +extern "C" { + pub fn CPLGetCurrentProcessID() -> libc::c_int; +} +extern "C" { + pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; +} +extern "C" { + pub fn CPLCreateJoinableThread( + pfnMain: CPLThreadFunc, + pArg: *mut libc::c_void, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); +} +extern "C" { + pub fn CPLSleep(dfWaitInSeconds: f64); +} +extern "C" { + pub fn CPLGetThreadingModel() -> *const libc::c_char; +} +extern "C" { + pub fn CPLGetNumCPUs() -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLLock { + _unused: [u8; 0], +} +pub type CPLLock = _CPLLock; +pub mod CPLLockType { + pub type Type = libc::c_uint; + pub const LOCK_RECURSIVE_MUTEX: Type = 0; + pub const LOCK_ADAPTIVE_MUTEX: Type = 1; + pub const LOCK_SPIN: Type = 2; +} +extern "C" { + pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; +} +extern "C" { + pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) + -> libc::c_int; +} +extern "C" { + pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; +} +extern "C" { + pub fn CPLReleaseLock(arg1: *mut CPLLock); +} +extern "C" { + pub fn CPLDestroyLock(arg1: *mut CPLLock); +} +extern "C" { + pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); +} +extern "C" { + pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLGetTLSEx( + nIndex: libc::c_int, + pbMemoryErrorOccurred: *mut libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); +} +pub type CPLTLSFreeFunc = ::std::option::Option; +extern "C" { + pub fn CPLSetTLSWithFreeFunc( + nIndex: libc::c_int, + pData: *mut libc::c_void, + pfnFree: CPLTLSFreeFunc, + ); +} +extern "C" { + pub fn CPLSetTLSWithFreeFuncEx( + nIndex: libc::c_int, + pData: *mut libc::c_void, + pfnFree: CPLTLSFreeFunc, + pbMemoryErrorOccurred: *mut libc::c_int, + ); +} +extern "C" { + pub fn CPLCleanupTLS(); +} +pub mod GDALResampleAlg { + #[doc = " Warp Resampling Algorithm"] + pub type Type = libc::c_uint; + #[doc = " Nearest neighbour (select on one input pixel)"] + pub const GRA_NearestNeighbour: Type = 0; + #[doc = " Bilinear (2x2 kernel)"] + pub const GRA_Bilinear: Type = 1; + #[doc = " Cubic Convolution Approximation (4x4 kernel)"] + pub const GRA_Cubic: Type = 2; + #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] + pub const GRA_CubicSpline: Type = 3; + #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] + pub const GRA_Lanczos: Type = 4; + #[doc = " Average (computes the average of all non-NODATA contributing pixels)"] + pub const GRA_Average: Type = 5; + #[doc = " Mode (selects the value which appears most often of all the sampled points)"] + pub const GRA_Mode: Type = 6; + #[doc = " Max (selects maximum of all non-NODATA contributing pixels)"] + pub const GRA_Max: Type = 8; + #[doc = " Min (selects minimum of all non-NODATA contributing pixels)"] + pub const GRA_Min: Type = 9; + #[doc = " Med (selects median of all non-NODATA contributing pixels)"] + pub const GRA_Med: Type = 10; + #[doc = " Q1 (selects first quartile of all non-NODATA contributing pixels)"] + pub const GRA_Q1: Type = 11; + #[doc = " Q3 (selects third quartile of all non-NODATA contributing pixels)"] + pub const GRA_Q3: Type = 12; +} +#[doc = " @cond Doxygen_Suppress"] +pub type GDALMaskFunc = ::std::option::Option< + unsafe extern "C" fn( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + papabyImageData: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pMask: *mut libc::c_void, + ) -> libc::c_int, +>; +extern "C" { + pub fn GDALWarpNoDataMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + papabyImageData: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + pbOutAllValid: *mut libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpDstAlphaMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpSrcAlphaMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + pbOutAllOpaque: *mut libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpSrcMaskMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpCutlineMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; +} +#[doc = " Warp control options for use with GDALWarpOperation::Initialize()"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpOptions { + pub papszWarpOptions: *mut *mut libc::c_char, + #[doc = " In bytes, 0.0 for internal default"] + pub dfWarpMemoryLimit: f64, + #[doc = " Resampling algorithm to use"] + pub eResampleAlg: GDALResampleAlg::Type, + #[doc = " data type to use during warp operation, GDT_Unknown lets the algorithm"] + #[doc = "select the type"] + pub eWorkingDataType: GDALDataType::Type, + #[doc = " Source image dataset."] + pub hSrcDS: GDALDatasetH, + #[doc = " Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer()."] + pub hDstDS: GDALDatasetH, + #[doc = " Number of bands to process, may be 0 to select all bands."] + pub nBandCount: libc::c_int, + #[doc = " The band numbers for the source bands to process (1 based)"] + pub panSrcBands: *mut libc::c_int, + #[doc = " The band numbers for the destination bands to process (1 based)"] + pub panDstBands: *mut libc::c_int, + #[doc = " The source band so use as an alpha (transparency) value, 0=disabled"] + pub nSrcAlphaBand: libc::c_int, + #[doc = " The dest. band so use as an alpha (transparency) value, 0=disabled"] + pub nDstAlphaBand: libc::c_int, + #[doc = " The \"nodata\" value real component for each input band, if NULL there isn't one"] + pub padfSrcNoDataReal: *mut f64, + #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] + #[doc = "component is provided. This value is not used to flag invalid values."] + #[doc = "Only the real component is used."] + pub padfSrcNoDataImag: *mut f64, + #[doc = " The \"nodata\" value real component for each output band, if NULL there isn't one"] + pub padfDstNoDataReal: *mut f64, + #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] + #[doc = "component is provided. Note that warp operations only use real component"] + #[doc = "for flagging invalid data."] + pub padfDstNoDataImag: *mut f64, + #[doc = " GDALProgressFunc() compatible progress reporting function, or NULL"] + #[doc = "if there isn't one."] + pub pfnProgress: GDALProgressFunc, + #[doc = " Callback argument to be passed to pfnProgress."] + pub pProgressArg: *mut libc::c_void, + #[doc = " Type of spatial point transformer function"] + pub pfnTransformer: GDALTransformerFunc, + #[doc = " Handle to image transformer setup structure"] + pub pTransformerArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, + #[doc = " Unused. Must be NULL"] + pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnSrcValidityMaskFunc: GDALMaskFunc, + #[doc = " Unused. Must be NULL"] + pub pSrcValidityMaskFuncArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnSrcDensityMaskFunc: GDALMaskFunc, + #[doc = " Unused. Must be NULL"] + pub pSrcDensityMaskFuncArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnDstDensityMaskFunc: GDALMaskFunc, + #[doc = " Unused. Must be NULL"] + pub pDstDensityMaskFuncArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnDstValidityMaskFunc: GDALMaskFunc, + #[doc = " Unused. Must be NULL"] + pub pDstValidityMaskFuncArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnPreWarpChunkProcessor: ::std::option::Option< + unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, + >, + #[doc = " Unused. Must be NULL"] + pub pPreWarpProcessorArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnPostWarpChunkProcessor: ::std::option::Option< + unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, + >, + #[doc = " Unused. Must be NULL"] + pub pPostWarpProcessorArg: *mut libc::c_void, + #[doc = " Optional OGRPolygonH for a masking cutline."] + pub hCutline: *mut libc::c_void, + #[doc = " Optional blending distance to apply across cutline in pixels, default is zero."] + pub dfCutlineBlendDist: f64, +} +#[test] +fn bindgen_test_layout_GDALWarpOptions() { + assert_eq!( + ::std::mem::size_of::(), + 264usize, + concat!("Size of: ", stringify!(GDALWarpOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALWarpOptions)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papszWarpOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(dfWarpMemoryLimit) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(eResampleAlg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(eWorkingDataType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hSrcDS) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hDstDS) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nBandCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(panSrcBands) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(panDstBands) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nSrcAlphaBand) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nDstAlphaBand) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfSrcNoDataReal) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfSrcNoDataImag) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfDstNoDataReal) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfDstNoDataImag) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnProgress) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pProgressArg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnTransformer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pTransformerArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ + as usize + }, + 136usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papfnSrcPerBandValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ + as usize + }, + 144usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papSrcPerBandValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnSrcValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize + }, + 160usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pSrcValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize + }, + 168usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnSrcDensityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize + }, + 176usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pSrcDensityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize + }, + 184usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnDstDensityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize + }, + 192usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pDstDensityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize + }, + 200usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnDstValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize + }, + 208usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pDstValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ + as usize + }, + 216usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnPreWarpChunkProcessor) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize + }, + 224usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pPreWarpProcessorArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ + as usize + }, + 232usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnPostWarpChunkProcessor) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize + }, + 240usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pPostWarpProcessorArg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, + 248usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hCutline) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize + }, + 256usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(dfCutlineBlendDist) + ) + ); +} +extern "C" { + pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; } extern "C" { - #[doc = " Robinson"] - pub fn OSRSetRobinson( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); } extern "C" { - #[doc = " Sinusoidal"] - pub fn OSRSetSinusoidal( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; } extern "C" { - #[doc = " Stereographic"] - pub fn OSRSetStereographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitDstNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } extern "C" { - #[doc = " Swiss Oblique Cylindrical"] - pub fn OSRSetSOC( - hSRS: OGRSpatialReferenceH, - dfLatitudeOfOrigin: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitSrcNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } extern "C" { - #[doc = " Transverse Mercator"] - #[doc = ""] - #[doc = " Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 :"] - #[doc = " see OGRSpatialReference::exportToProj4()."] - pub fn OSRSetTM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } extern "C" { - #[doc = " Transverse Mercator variant"] - pub fn OSRSetTMVariant( - hSRS: OGRSpatialReferenceH, - pszVariantName: *const libc::c_char, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitDstNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); } extern "C" { - #[doc = " Tunesia Mining Grid"] - pub fn OSRSetTMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitSrcNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); } extern "C" { - #[doc = " Transverse Mercator (South Oriented)"] - pub fn OSRSetTMSO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpResolveWorkingDataType(arg1: *mut GDALWarpOptions); } extern "C" { - #[doc = " TPED (Two Point Equi Distant)"] - pub fn OSRSetTPED( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitDefaultBandMapping(arg1: *mut GDALWarpOptions, nBandCount: libc::c_int); } extern "C" { - #[doc = " VanDerGrinten"] - pub fn OSRSetVDG( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + #[doc = " @cond Doxygen_Suppress"] + pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; } extern "C" { - #[doc = " Wagner I -- VII"] - pub fn OSRSetWagner( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCenterLat: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; } extern "C" { - #[doc = " Quadrilateralized Spherical Cube"] - pub fn OSRSetQSC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - ) -> OGRErr::Type; + pub fn GDALReprojectImage( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + hDstDS: GDALDatasetH, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfWarpMemoryLimit: f64, + dfMaxError: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + psOptions: *mut GDALWarpOptions, + ) -> CPLErr::Type; } extern "C" { - #[doc = " Spherical, Cross-track, Height"] - pub fn OSRSetSCH( - hSRS: OGRSpatialReferenceH, - dfPegLat: f64, - dfPegLong: f64, - dfPegHeading: f64, - dfPegHgt: f64, - ) -> OGRErr::Type; + pub fn GDALCreateAndReprojectImage( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstFilename: *const libc::c_char, + pszDstWKT: *const libc::c_char, + hDstDriver: GDALDriverH, + papszCreateOptions: *mut *mut libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfWarpMemoryLimit: f64, + dfMaxError: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + psOptions: *mut GDALWarpOptions, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; + pub fn GDALAutoCreateWarpedVRT( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfMaxError: f64, + psOptions: *const GDALWarpOptions, + ) -> GDALDatasetH; } extern "C" { - pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; + pub fn GDALCreateWarpedVRT( + hSrcDS: GDALDatasetH, + nPixels: libc::c_int, + nLines: libc::c_int, + padfGeoTransform: *mut f64, + psOptions: *mut GDALWarpOptions, + ) -> GDALDatasetH; } extern "C" { - pub fn OSRCleanup(); + pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; } +#[doc = " Opaque type representing a GDALWarpOperation object"] +pub type GDALWarpOperationH = *mut libc::c_void; extern "C" { - pub fn OCTNewCoordinateTransformation( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - ) -> OGRCoordinateTransformationH; + pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; } extern "C" { - pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); + pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); } extern "C" { - pub fn OCTTransform( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - ) -> libc::c_int; + pub fn GDALChunkAndWarpImage( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OCTTransformEx( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALChunkAndWarpMulti( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OCTProj4Normalize(pszProj4Src: *const libc::c_char) -> *mut libc::c_char; + pub fn GDALWarpRegion( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: libc::c_int, + arg9: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OCTCleanupProjMutex(); + pub fn GDALWarpRegionToBuffer( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: *mut libc::c_void, + arg7: GDALDataType::Type, + arg8: libc::c_int, + arg9: libc::c_int, + arg10: libc::c_int, + arg11: libc::c_int, + ) -> CPLErr::Type; } pub mod OGRErr { #[doc = " Type for a OGR error"] #[doc = ""] #[doc = "
"] - pub type Type = u32; + pub type Type = libc::c_uint; #[doc = " Success"] #[doc = ""] #[doc = "
"] diff --git a/gdal-sys/prebuilt-bindings/gdal_3.0.rs b/gdal-sys/prebuilt-bindings/gdal_3.0.rs index 4803f972..14e92847 100644 --- a/gdal-sys/prebuilt-bindings/gdal_3.0.rs +++ b/gdal-sys/prebuilt-bindings/gdal_3.0.rs @@ -1,6 +1,5 @@ -/* automatically generated by rust-bindgen */ +/* automatically generated by rust-bindgen 0.59.1 */ -pub type size_t = libc::c_ulong; pub type va_list = __builtin_va_list; pub type __dev_t = libc::c_ulong; pub type __uid_t = libc::c_uint; @@ -60,7 +59,7 @@ pub struct _IO_FILE { pub _wide_data: *mut _IO_wide_data, pub _freeres_list: *mut _IO_FILE, pub _freeres_buf: *mut libc::c_void, - pub __pad5: size_t, + pub __pad5: usize, pub _mode: libc::c_int, pub _unused2: [libc::c_char; 20usize], } @@ -367,6 +366,7 @@ fn bindgen_test_layout__IO_FILE() { ) ); } +pub type wchar_t = libc::c_int; pub type time_t = __time_t; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -564,6 +564,53 @@ pub type GPtrDiff_t = GIntBig; #[doc = " Type of a constant null-terminated list of nul terminated strings."] #[doc = " Seen as char** from C and const char* const* from C++"] pub type CSLConstList = *mut *mut libc::c_char; +extern "C" { + #[doc = " Add a value to a pointed integer in a thread and SMP-safe way"] + #[doc = " and return the resulting value of the operation."] + #[doc = ""] + #[doc = " This function, which in most cases is implemented by a few"] + #[doc = " efficient machine instructions, guarantees that the value pointed"] + #[doc = " by ptr will be incremented in a thread and SMP-safe way."] + #[doc = " The variables for this function must be aligned on a 32-bit boundary."] + #[doc = ""] + #[doc = " Depending on the platforms, this function can also act as a"] + #[doc = " memory barrier, but this should not be assumed."] + #[doc = ""] + #[doc = " Current platforms/architectures where an efficient implementation"] + #[doc = " exists are MacOSX, MS Windows, i386/x86_64 with GCC and platforms"] + #[doc = " supported by GCC 4.1 or higher. For other platforms supporting"] + #[doc = " the pthread library, and when GDAL is configured with thread-support,"] + #[doc = " the atomicity will be done with a mutex, but with"] + #[doc = " reduced efficiency. For the remaining platforms, a simple addition"] + #[doc = " with no locking will be done..."] + #[doc = ""] + #[doc = " @param ptr a pointer to an integer to increment"] + #[doc = " @param increment the amount to add to the pointed integer"] + #[doc = " @return the pointed value AFTER the result of the addition"] + pub fn CPLAtomicAdd(ptr: *mut libc::c_int, increment: libc::c_int) -> libc::c_int; +} +extern "C" { + #[doc = " Compares *ptr with oldval. If *ptr == oldval, then *ptr is assigned"] + #[doc = " newval and TRUE is returned. Otherwise nothing is done, and FALSE is returned."] + #[doc = ""] + #[doc = " Current platforms/architectures where an efficient implementation"] + #[doc = " exists are MacOSX, MS Windows, i386/x86_64 with GCC and platforms"] + #[doc = " supported by GCC 4.1 or higher. For other platforms supporting"] + #[doc = " the pthread library, and when GDAL is configured with thread-support,"] + #[doc = " the atomicity will be done with a mutex, but with"] + #[doc = " reduced efficiency. For the remaining platforms, a simple compare and"] + #[doc = " exchange with no locking will be done..."] + #[doc = ""] + #[doc = " @param ptr a pointer to an integer (aligned on 32bit boundary)."] + #[doc = " @param oldval old value"] + #[doc = " @param newval new value"] + #[doc = " @return TRUE if the exchange has been done"] + pub fn CPLAtomicCompareAndExchange( + ptr: *mut libc::c_int, + oldval: libc::c_int, + newval: libc::c_int, + ) -> libc::c_int; +} pub type GDALProgressFunc = ::std::option::Option< unsafe extern "C" fn( dfComplete: f64, @@ -805,16 +852,11 @@ extern "C" { pub fn VSIFFlush(arg1: *mut FILE); } extern "C" { - pub fn VSIFRead(arg1: *mut libc::c_void, arg2: size_t, arg3: size_t, arg4: *mut FILE) - -> size_t; + pub fn VSIFRead(arg1: *mut libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) -> usize; } extern "C" { - pub fn VSIFWrite( - arg1: *const libc::c_void, - arg2: size_t, - arg3: size_t, - arg4: *mut FILE, - ) -> size_t; + pub fn VSIFWrite(arg1: *const libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) + -> usize; } extern "C" { pub fn VSIFGets( @@ -875,27 +917,27 @@ extern "C" { extern "C" { pub fn VSIFReadL( arg1: *mut libc::c_void, - arg2: size_t, - arg3: size_t, + arg2: usize, + arg3: usize, arg4: *mut VSILFILE, - ) -> size_t; + ) -> usize; } extern "C" { pub fn VSIFReadMultiRangeL( nRanges: libc::c_int, ppData: *mut *mut libc::c_void, panOffsets: *const vsi_l_offset, - panSizes: *const size_t, + panSizes: *const usize, arg1: *mut VSILFILE, ) -> libc::c_int; } extern "C" { pub fn VSIFWriteL( arg1: *const libc::c_void, - arg2: size_t, - arg3: size_t, + arg2: usize, + arg3: usize, arg4: *mut VSILFILE, - ) -> size_t; + ) -> usize; } extern "C" { pub fn VSIFEofL(arg1: *mut VSILFILE) -> libc::c_int; @@ -914,7 +956,7 @@ extern "C" { } pub mod VSIRangeStatus { #[doc = " Range status"] - pub type Type = u32; + pub type Type = libc::c_uint; #[doc = "< Unknown"] pub const VSI_RANGE_STATUS_UNKNOWN: Type = 0; #[doc = "< Data present"] @@ -989,32 +1031,32 @@ extern "C" { pub fn VSIFGetNativeFileDescriptorL(arg1: *mut VSILFILE) -> *mut libc::c_void; } extern "C" { - pub fn VSICalloc(arg1: size_t, arg2: size_t) -> *mut libc::c_void; + pub fn VSICalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn VSIMalloc(arg1: size_t) -> *mut libc::c_void; + pub fn VSIMalloc(arg1: usize) -> *mut libc::c_void; } extern "C" { pub fn VSIFree(arg1: *mut libc::c_void); } extern "C" { - pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: size_t) -> *mut libc::c_void; + pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } extern "C" { pub fn VSIStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; } extern "C" { - pub fn VSIMallocAligned(nAlignment: size_t, nSize: size_t) -> *mut libc::c_void; + pub fn VSIMallocAligned(nAlignment: usize, nSize: usize) -> *mut libc::c_void; } extern "C" { - pub fn VSIMallocAlignedAuto(nSize: size_t) -> *mut libc::c_void; + pub fn VSIMallocAlignedAuto(nSize: usize) -> *mut libc::c_void; } extern "C" { pub fn VSIFreeAligned(ptr: *mut libc::c_void); } extern "C" { pub fn VSIMallocAlignedAutoVerbose( - nSize: size_t, + nSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; @@ -1025,7 +1067,7 @@ extern "C" { #[doc = "NULL pointer is returned and a CE_Failure error is raised with CPLError()."] #[doc = "If nSize1 == 0 || nSize2 == 0, a NULL pointer will also be returned."] #[doc = "CPLFree() or VSIFree() can be used to free memory allocated by this function."] - pub fn VSIMalloc2(nSize1: size_t, nSize2: size_t) -> *mut libc::c_void; + pub fn VSIMalloc2(nSize1: usize, nSize2: usize) -> *mut libc::c_void; } extern "C" { #[doc = "VSIMalloc3 allocates (nSize1 * nSize2 * nSize3) bytes."] @@ -1033,12 +1075,12 @@ extern "C" { #[doc = "NULL pointer is returned and a CE_Failure error is raised with CPLError()."] #[doc = "If nSize1 == 0 || nSize2 == 0 || nSize3 == 0, a NULL pointer will also be returned."] #[doc = "CPLFree() or VSIFree() can be used to free memory allocated by this function."] - pub fn VSIMalloc3(nSize1: size_t, nSize2: size_t, nSize3: size_t) -> *mut libc::c_void; + pub fn VSIMalloc3(nSize1: usize, nSize2: usize, nSize3: usize) -> *mut libc::c_void; } extern "C" { #[doc = " VSIMallocVerbose"] pub fn VSIMallocVerbose( - nSize: size_t, + nSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; @@ -1046,8 +1088,8 @@ extern "C" { extern "C" { #[doc = " VSIMalloc2Verbose"] pub fn VSIMalloc2Verbose( - nSize1: size_t, - nSize2: size_t, + nSize1: usize, + nSize2: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; @@ -1055,9 +1097,9 @@ extern "C" { extern "C" { #[doc = " VSIMalloc3Verbose"] pub fn VSIMalloc3Verbose( - nSize1: size_t, - nSize2: size_t, - nSize3: size_t, + nSize1: usize, + nSize2: usize, + nSize3: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; @@ -1065,8 +1107,8 @@ extern "C" { extern "C" { #[doc = " VSICallocVerbose"] pub fn VSICallocVerbose( - nCount: size_t, - nSize: size_t, + nCount: usize, + nSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; @@ -1075,7 +1117,7 @@ extern "C" { #[doc = " VSIReallocVerbose"] pub fn VSIReallocVerbose( pOldPtr: *mut libc::c_void, - nNewSize: size_t, + nNewSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; @@ -1379,10 +1421,10 @@ extern "C" { pub type VSIWriteFunction = ::std::option::Option< unsafe extern "C" fn( ptr: *const libc::c_void, - size: size_t, - nmemb: size_t, + size: usize, + nmemb: usize, stream: *mut FILE, - ) -> size_t, + ) -> usize, >; extern "C" { pub fn VSIStdoutSetRedirection(pFct: VSIWriteFunction, stream: *mut FILE); @@ -1470,9 +1512,9 @@ pub type VSIFilesystemPluginReadCallback = ::std::option::Option< unsafe extern "C" fn( pFile: *mut libc::c_void, pBuffer: *mut libc::c_void, - nSize: size_t, - nCount: size_t, - ) -> size_t, + nSize: usize, + nCount: usize, + ) -> usize, >; #[doc = " Read from multiple offsets. Optional, will be replaced by multiple calls to Read() if not provided"] #[doc = " @since GDAL 2.5"] @@ -1482,7 +1524,7 @@ pub type VSIFilesystemPluginReadMultiRangeCallback = ::std::option::Option< nRanges: libc::c_int, ppData: *mut *mut libc::c_void, panOffsets: *const vsi_l_offset, - panSizes: *const size_t, + panSizes: *const usize, ) -> libc::c_int, >; #[doc = " Get empty ranges. Optional"] @@ -1504,9 +1546,9 @@ pub type VSIFilesystemPluginWriteCallback = ::std::option::Option< unsafe extern "C" fn( pFile: *mut libc::c_void, pBuffer: *const libc::c_void, - nSize: size_t, - nCount: size_t, - ) -> size_t, + nSize: usize, + nCount: usize, + ) -> usize, >; #[doc = " Sync written bytes. Optional"] #[doc = " @since GDAL 2.5"] @@ -1844,7 +1886,7 @@ extern "C" { } pub mod CPLErr { #[doc = " Error category"] - pub type Type = u32; + pub type Type = libc::c_uint; pub const CE_None: Type = 0; pub const CE_Debug: Type = 1; pub const CE_Warning: Type = 2; @@ -1977,13 +2019,13 @@ extern "C" { pub fn CPLSetThreadLocalConfigOptions(papszConfigOptions: *const *const libc::c_char); } extern "C" { - pub fn CPLMalloc(arg1: size_t) -> *mut libc::c_void; + pub fn CPLMalloc(arg1: usize) -> *mut libc::c_void; } extern "C" { - pub fn CPLCalloc(arg1: size_t, arg2: size_t) -> *mut libc::c_void; + pub fn CPLCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: size_t) -> *mut libc::c_void; + pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } extern "C" { pub fn CPLStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; @@ -2427,20 +2469,20 @@ extern "C" { extern "C" { pub fn CPLZLibDeflate( ptr: *const libc::c_void, - nBytes: size_t, + nBytes: usize, nLevel: libc::c_int, outptr: *mut libc::c_void, - nOutAvailableBytes: size_t, - pnOutBytes: *mut size_t, + nOutAvailableBytes: usize, + pnOutBytes: *mut usize, ) -> *mut libc::c_void; } extern "C" { pub fn CPLZLibInflate( ptr: *const libc::c_void, - nBytes: size_t, + nBytes: usize, outptr: *mut libc::c_void, - nOutAvailableBytes: size_t, - pnOutBytes: *mut size_t, + nOutAvailableBytes: usize, + pnOutBytes: *mut usize, ) -> *mut libc::c_void; } extern "C" { @@ -2463,7092 +2505,7139 @@ extern "C" { #[doc = "@return TRUE if i is power of two otherwise return FALSE"] pub fn CPLIsPowerOfTwo(i: libc::c_uint) -> libc::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLVirtualMem { - _unused: [u8; 0], -} -#[doc = " Callback triggered when a still unmapped page of virtual memory is accessed."] -#[doc = " The callback has the responsibility of filling the page with relevant values"] -#[doc = ""] -#[doc = " @param ctxt virtual memory handle."] -#[doc = " @param nOffset offset of the page in the memory mapping."] -#[doc = " @param pPageToFill address of the page to fill. Note that the address might"] -#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] -#[doc = " @param nToFill number of bytes of the page."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: size_t, - pPageToFill: *mut libc::c_void, - nToFill: size_t, - pUserData: *mut libc::c_void, - ), ->; -#[doc = " Callback triggered when a dirty mapped page is going to be freed."] -#[doc = " (saturation of cache, or termination of the virtual memory mapping)."] -#[doc = ""] -#[doc = " @param ctxt virtual memory handle."] -#[doc = " @param nOffset offset of the page in the memory mapping."] -#[doc = " @param pPageToBeEvicted address of the page that will be flushed. Note that the address might"] -#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] -#[doc = " @param nToBeEvicted number of bytes of the page."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: size_t, - pPageToBeEvicted: *const libc::c_void, - nToBeEvicted: size_t, - pUserData: *mut libc::c_void, - ), ->; -#[doc = " Callback triggered when a virtual memory mapping is destroyed."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemFreeUserData = - ::std::option::Option; -pub mod CPLVirtualMemAccessMode { - #[doc = " Access mode of a virtual memory mapping."] - pub type Type = u32; - #[doc = " The mapping is meant at being read-only, but writes will not be prevented."] - #[doc = "Note that any content written will be lost."] - pub const VIRTUALMEM_READONLY: Type = 0; - #[doc = " The mapping is meant at being read-only, and this will be enforced"] - #[doc = "through the operating system page protection mechanism."] - pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; - #[doc = " The mapping is meant at being read-write, and modified pages can be saved"] - #[doc = "thanks to the pfnUnCachePage callback"] - pub const VIRTUALMEM_READWRITE: Type = 2; -} -extern "C" { - #[doc = " Return the size of a page of virtual memory."] - #[doc = ""] - #[doc = " @return the page size."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLGetPageSize() -> size_t; -} extern "C" { - #[doc = " Create a new virtual memory mapping."] - #[doc = ""] - #[doc = " This will reserve an area of virtual memory of size nSize, whose size"] - #[doc = " might be potentially much larger than the physical memory available. Initially,"] - #[doc = " no physical memory will be allocated. As soon as memory pages will be accessed,"] - #[doc = " they will be allocated transparently and filled with the pfnCachePage callback."] - #[doc = " When the allowed cache size is reached, the least recently used pages will"] - #[doc = " be unallocated."] + #[doc = " \\file cpl_string.h"] #[doc = ""] - #[doc = " On Linux AMD64 platforms, the maximum value for nSize is 128 TB."] - #[doc = " On Linux x86 platforms, the maximum value for nSize is 2 GB."] - #[doc = ""] - #[doc = " Only supported on Linux for now."] + #[doc = " Various convenience functions for working with strings and string lists."] #[doc = ""] - #[doc = " Note that on Linux, this function will install a SIGSEGV handler. The"] - #[doc = " original handler will be restored by CPLVirtualMemManagerTerminate()."] + #[doc = " A StringList is just an array of strings with the last pointer being"] + #[doc = " NULL. An empty StringList may be either a NULL pointer, or a pointer to"] + #[doc = " a pointer memory location with a NULL value."] #[doc = ""] - #[doc = " @param nSize size in bytes of the virtual memory mapping."] - #[doc = " @param nCacheSize size in bytes of the maximum memory that will be really"] - #[doc = " allocated (must ideally fit into RAM)."] - #[doc = " @param nPageSizeHint hint for the page size. Must be a multiple of the"] - #[doc = " system page size, returned by CPLGetPageSize()."] - #[doc = " Minimum value is generally 4096. Might be set to 0 to"] - #[doc = " let the function determine a default page size."] - #[doc = " @param bSingleThreadUsage set to TRUE if there will be no concurrent threads"] - #[doc = " that will access the virtual memory mapping. This can"] - #[doc = " optimize performance a bit."] - #[doc = " @param eAccessMode permission to use for the virtual memory mapping."] - #[doc = " @param pfnCachePage callback triggered when a still unmapped page of virtual"] - #[doc = " memory is accessed. The callback has the responsibility"] - #[doc = " of filling the page with relevant values."] - #[doc = " @param pfnUnCachePage callback triggered when a dirty mapped page is going to"] - #[doc = " be freed (saturation of cache, or termination of the"] - #[doc = " virtual memory mapping). Might be NULL."] - #[doc = " @param pfnFreeUserData callback that can be used to free pCbkUserData. Might be"] - #[doc = " NULL"] - #[doc = " @param pCbkUserData user data passed to pfnCachePage and pfnUnCachePage."] + #[doc = " A common convention for StringLists is to use them to store name/value"] + #[doc = " lists. In this case the contents are treated like a dictionary of"] + #[doc = " name/value pairs. The actual data is formatted with each string having"] + #[doc = " the format \":\" (though \"=\" is also an acceptable separator)."] + #[doc = " A number of the functions in the file operate on name/value style"] + #[doc = " string lists (such as CSLSetNameValue(), and CSLFetchNameValue())."] #[doc = ""] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] + #[doc = " To some extent the CPLStringList C++ class can be used to abstract"] + #[doc = " managing string lists a bit but still be able to return them from C"] + #[doc = " functions."] #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemNew( - nSize: size_t, - nCacheSize: size_t, - nPageSizeHint: size_t, - bSingleThreadUsage: libc::c_int, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnCachePage: CPLVirtualMemCachePageCbk, - pfnUnCachePage: CPLVirtualMemUnCachePageCbk, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLAddString( + papszStrList: *mut *mut libc::c_char, + pszNewString: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return if virtual memory mapping of a file is available."] - #[doc = ""] - #[doc = " @return TRUE if virtual memory mapping of a file is available."] - #[doc = " @since GDAL 1.11"] - pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; + pub fn CSLAddStringMayFail( + papszStrList: *mut *mut libc::c_char, + pszNewString: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Create a new virtual memory mapping from a file."] - #[doc = ""] - #[doc = " The file must be a \"real\" file recognized by the operating system, and not"] - #[doc = " a VSI extended virtual file."] - #[doc = ""] - #[doc = " In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written"] - #[doc = " in the file."] - #[doc = ""] - #[doc = " On Linux AMD64 platforms, the maximum value for nLength is 128 TB."] - #[doc = " On Linux x86 platforms, the maximum value for nLength is 2 GB."] - #[doc = ""] - #[doc = " Supported on Linux only in GDAL <= 2.0, and all POSIX systems supporting"] - #[doc = " mmap() in GDAL >= 2.1"] - #[doc = ""] - #[doc = " @param fp Virtual file handle."] - #[doc = " @param nOffset Offset in the file to start the mapping from."] - #[doc = " @param nLength Length of the portion of the file to map into memory."] - #[doc = " @param eAccessMode Permission to use for the virtual memory mapping. This must"] - #[doc = " be consistent with how the file has been opened."] - #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] - #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemFileMapNew( - fp: *mut VSILFILE, - nOffset: vsi_l_offset, - nLength: vsi_l_offset, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLCount(papszStrList: CSLConstList) -> libc::c_int; } extern "C" { - #[doc = " Create a new virtual memory mapping derived from an other virtual memory"] - #[doc = " mapping."] - #[doc = ""] - #[doc = " This may be useful in case of creating mapping for pixel interleaved data."] - #[doc = ""] - #[doc = " The new mapping takes a reference on the base mapping."] - #[doc = ""] - #[doc = " @param pVMemBase Base virtual memory mapping"] - #[doc = " @param nOffset Offset in the base virtual memory mapping from which to start"] - #[doc = " the new mapping."] - #[doc = " @param nSize Size of the base virtual memory mapping to expose in the"] - #[doc = " the new mapping."] - #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] - #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemDerivedNew( - pVMemBase: *mut CPLVirtualMem, - nOffset: vsi_l_offset, - nSize: vsi_l_offset, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLGetField(arg1: CSLConstList, arg2: libc::c_int) -> *const libc::c_char; } extern "C" { - #[doc = " Free a virtual memory mapping."] - #[doc = ""] - #[doc = " The pointer returned by CPLVirtualMemGetAddr() will no longer be valid."] - #[doc = " If the virtual memory mapping was created with read/write permissions and that"] - #[doc = " they are dirty (i.e. modified) pages, they will be flushed through the"] - #[doc = " pfnUnCachePage callback before being freed."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); + pub fn CSLDestroy(papszStrList: *mut *mut libc::c_char); } extern "C" { - #[doc = " Return the pointer to the start of a virtual memory mapping."] - #[doc = ""] - #[doc = " The bytes in the range [p:p+CPLVirtualMemGetSize()-1] where p is the pointer"] - #[doc = " returned by this function will be valid, until CPLVirtualMemFree() is called."] - #[doc = ""] - #[doc = " Note that if a range of bytes used as an argument of a system call"] - #[doc = " (such as read() or write()) contains pages that have not been \"realized\", the"] - #[doc = " system call will fail with EFAULT. CPLVirtualMemPin() can be used to work"] - #[doc = " around this issue."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the pointer to the start of a virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; + pub fn CSLDuplicate(papszStrList: CSLConstList) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return the size of the virtual memory mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the size of the virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> size_t; + pub fn CSLMerge( + papszOrig: *mut *mut libc::c_char, + papszOverride: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return if the virtual memory mapping is a direct file mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return TRUE if the virtual memory mapping is a direct file mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; + pub fn CSLTokenizeString(pszString: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return the access mode of the virtual memory mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the access mode of the virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; + pub fn CSLTokenizeStringComplex( + pszString: *const libc::c_char, + pszDelimiter: *const libc::c_char, + bHonourStrings: libc::c_int, + bAllowEmptyTokens: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return the page size associated to a virtual memory mapping."] - #[doc = ""] - #[doc = " The value returned will be at least CPLGetPageSize(), but potentially"] - #[doc = " larger."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the page size"] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> size_t; + pub fn CSLTokenizeString2( + pszString: *const libc::c_char, + pszDelimiter: *const libc::c_char, + nCSLTFlags: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return TRUE if this memory mapping can be accessed safely from concurrent"] - #[doc = " threads."] - #[doc = ""] - #[doc = " The situation that can cause problems is when several threads try to access"] - #[doc = " a page of the mapping that is not yet mapped."] - #[doc = ""] - #[doc = " The return value of this function depends on whether bSingleThreadUsage has"] - #[doc = " been set of not in CPLVirtualMemNew() and/or the implementation."] - #[doc = ""] - #[doc = " On Linux, this will always return TRUE if bSingleThreadUsage = FALSE."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return TRUE if this memory mapping can be accessed safely from concurrent"] - #[doc = " threads."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; + pub fn CSLPrint(papszStrList: CSLConstList, fpOut: *mut FILE) -> libc::c_int; } extern "C" { - #[doc = " Declare that a thread will access a virtual memory mapping."] - #[doc = ""] - #[doc = " This function must be called by a thread that wants to access the"] - #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] - #[doc = " been created with bSingleThreadUsage = TRUE."] - #[doc = ""] - #[doc = " This function must be paired with CPLVirtualMemUnDeclareThread()."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); + pub fn CSLLoad(pszFname: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Declare that a thread will stop accessing a virtual memory mapping."] - #[doc = ""] - #[doc = " This function must be called by a thread that will no longer access the"] - #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] - #[doc = " been created with bSingleThreadUsage = TRUE."] - #[doc = ""] - #[doc = " This function must be paired with CPLVirtualMemDeclareThread()."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); + pub fn CSLLoad2( + pszFname: *const libc::c_char, + nMaxLines: libc::c_int, + nMaxCols: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Make sure that a region of virtual memory will be realized."] - #[doc = ""] - #[doc = " Calling this function is not required, but might be useful when debugging"] - #[doc = " a process with tools like gdb or valgrind that do not naturally like"] - #[doc = " segmentation fault signals."] - #[doc = ""] - #[doc = " It is also needed when wanting to provide part of virtual memory mapping"] - #[doc = " to a system call such as read() or write(). If read() or write() is called"] - #[doc = " on a memory region not yet realized, the call will fail with EFAULT."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @param pAddr the memory region to pin."] - #[doc = " @param nSize the size of the memory region."] - #[doc = " @param bWriteOp set to TRUE if the memory are will be accessed in write mode."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemPin( - ctxt: *mut CPLVirtualMem, - pAddr: *mut libc::c_void, - nSize: size_t, - bWriteOp: libc::c_int, - ); + pub fn CSLSave(papszStrList: CSLConstList, pszFname: *const libc::c_char) -> libc::c_int; } extern "C" { - #[doc = " Cleanup any resource and handlers related to virtual memory."] - #[doc = ""] - #[doc = " This function must be called after the last CPLVirtualMem object has"] - #[doc = " been freed."] - #[doc = ""] - #[doc = " @since GDAL 2.0"] - pub fn CPLVirtualMemManagerTerminate(); + pub fn CSLInsertStrings( + papszStrList: *mut *mut libc::c_char, + nInsertAtLineNo: libc::c_int, + papszNewLines: CSLConstList, + ) -> *mut *mut libc::c_char; } -pub mod CPLXMLNodeType { - #[doc = " XML node type"] - pub type Type = u32; - #[doc = " Node is an element"] - pub const CXT_Element: Type = 0; - #[doc = " Node is a raw text value"] - pub const CXT_Text: Type = 1; - #[doc = " Node is attribute"] - pub const CXT_Attribute: Type = 2; - #[doc = " Node is an XML comment."] - pub const CXT_Comment: Type = 3; - #[doc = " Node is a special literal"] - pub const CXT_Literal: Type = 4; +extern "C" { + pub fn CSLInsertString( + papszStrList: *mut *mut libc::c_char, + nInsertAtLineNo: libc::c_int, + pszNewLine: *const libc::c_char, + ) -> *mut *mut libc::c_char; } -#[doc = " Document node structure."] -#[doc = ""] -#[doc = " This C structure is used to hold a single text fragment representing a"] -#[doc = " component of the document when parsed. It should be allocated with the"] -#[doc = " appropriate CPL function, and freed with CPLDestroyXMLNode(). The structure"] -#[doc = " contents should not normally be altered by application code, but may be"] -#[doc = " freely examined by application code."] -#[doc = ""] -#[doc = " Using the psChild and psNext pointers, a hierarchical tree structure"] -#[doc = " for a document can be represented as a tree of CPLXMLNode structures."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLXMLNode { - #[doc = " \\brief Node type"] - #[doc = ""] - #[doc = " One of CXT_Element, CXT_Text, CXT_Attribute, CXT_Comment,"] - #[doc = " or CXT_Literal."] - pub eType: CPLXMLNodeType::Type, - #[doc = " \\brief Node value"] - #[doc = ""] - #[doc = " For CXT_Element this is the name of the element, without the angle"] - #[doc = " brackets. Note there is a single CXT_Element even when the document"] - #[doc = " contains a start and end element tag. The node represents the pair."] - #[doc = " All text or other elements between the start and end tag will appear"] - #[doc = " as children nodes of this CXT_Element node."] - #[doc = ""] - #[doc = " For CXT_Attribute the pszValue is the attribute name. The value of"] - #[doc = " the attribute will be a CXT_Text child."] - #[doc = ""] - #[doc = " For CXT_Text this is the text itself (value of an attribute, or a"] - #[doc = " text fragment between an element start and end tags."] - #[doc = ""] - #[doc = " For CXT_Literal it is all the literal text. Currently this is just"] - #[doc = " used for !DOCTYPE lines, and the value would be the entire line."] - #[doc = ""] - #[doc = " For CXT_Comment the value is all the literal text within the comment,"] - #[doc = " but not including the comment start/end indicators (\"<--\" and \"-->\")."] - pub pszValue: *mut libc::c_char, - #[doc = " \\brief Next sibling."] - #[doc = ""] - #[doc = " Pointer to next sibling, that is the next node appearing after this"] - #[doc = " one that has the same parent as this node. NULL if this node is the"] - #[doc = " last child of the parent element."] - pub psNext: *mut CPLXMLNode, - #[doc = " \\brief Child node."] - #[doc = ""] - #[doc = " Pointer to first child node, if any. Only CXT_Element and CXT_Attribute"] - #[doc = " nodes should have children. For CXT_Attribute it should be a single"] - #[doc = " CXT_Text value node, while CXT_Element can have any kind of child."] - #[doc = " The full list of children for a node are identified by walking the"] - #[doc = " psNext's starting with the psChild node."] - pub psChild: *mut CPLXMLNode, +extern "C" { + pub fn CSLRemoveStrings( + papszStrList: *mut *mut libc::c_char, + nFirstLineToDelete: libc::c_int, + nNumToRemove: libc::c_int, + ppapszRetStrings: *mut *mut *mut libc::c_char, + ) -> *mut *mut libc::c_char; } -#[test] -fn bindgen_test_layout_CPLXMLNode() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLXMLNode)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLXMLNode)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(eType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(pszValue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psNext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psChild) - ) - ); +extern "C" { + pub fn CSLFindString(papszList: CSLConstList, pszTarget: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CSLFindStringCaseSensitive( + papszList: CSLConstList, + pszTarget: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); + pub fn CSLPartialFindString( + papszHaystack: CSLConstList, + pszNeedle: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CSLFindName(papszStrList: CSLConstList, pszName: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLSearchXMLNode( - poRoot: *mut CPLXMLNode, - pszTarget: *const libc::c_char, - ) -> *mut CPLXMLNode; + pub fn CSLFetchBoolean( + papszStrList: CSLConstList, + pszKey: *const libc::c_char, + bDefault: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLGetXMLValue( - poRoot: *const CPLXMLNode, - pszPath: *const libc::c_char, - pszDefault: *const libc::c_char, - ) -> *const libc::c_char; + pub fn CSLTestBoolean(pszValue: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLCreateXMLNode( - poParent: *mut CPLXMLNode, - eType: CPLXMLNodeType::Type, - pszText: *const libc::c_char, - ) -> *mut CPLXMLNode; + pub fn CPLTestBoolean(pszValue: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; + pub fn CPLParseNameValue( + pszNameValue: *const libc::c_char, + ppszKey: *mut *mut libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); + pub fn CSLFetchNameValue( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; + pub fn CSLFetchNameValueDef( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + pszDefault: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); + pub fn CSLFetchNameValueMultiple( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLCreateXMLElementAndValue( - psParent: *mut CPLXMLNode, + pub fn CSLAddNameValue( + papszStrList: *mut *mut libc::c_char, pszName: *const libc::c_char, pszValue: *const libc::c_char, - ) -> *mut CPLXMLNode; + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLAddXMLAttributeAndValue( - psParent: *mut CPLXMLNode, + pub fn CSLSetNameValue( + papszStrList: *mut *mut libc::c_char, pszName: *const libc::c_char, pszValue: *const libc::c_char, + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn CSLSetNameValueSeparator( + papszStrList: *mut *mut libc::c_char, + pszSeparator: *const libc::c_char, ); } extern "C" { - pub fn CPLCloneXMLTree(psTree: *const CPLXMLNode) -> *mut CPLXMLNode; + pub fn CSLParseCommandLine(pszCommandLine: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLSetXMLValue( - psRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> libc::c_int; + pub fn CPLEscapeString( + pszString: *const libc::c_char, + nLength: libc::c_int, + nScheme: libc::c_int, + ) -> *mut libc::c_char; } extern "C" { - pub fn CPLStripXMLNamespace( - psRoot: *mut CPLXMLNode, - pszNameSpace: *const libc::c_char, - bRecurse: libc::c_int, - ); + pub fn CPLUnescapeString( + pszString: *const libc::c_char, + pnLength: *mut libc::c_int, + nScheme: libc::c_int, + ) -> *mut libc::c_char; } extern "C" { - pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); + pub fn CPLBinaryToHex(nBytes: libc::c_int, pabyData: *const GByte) -> *mut libc::c_char; } extern "C" { - pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CPLHexToBinary(pszHex: *const libc::c_char, pnBytes: *mut libc::c_int) -> *mut GByte; } extern "C" { - pub fn CPLSerializeXMLTreeToFile( - psTree: *const CPLXMLNode, - pszFilename: *const libc::c_char, - ) -> libc::c_int; + pub fn CPLBase64Encode(nBytes: libc::c_int, pabyData: *const GByte) -> *mut libc::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, +extern "C" { + pub fn CPLBase64DecodeInPlace(pszBase64: *mut GByte) -> libc::c_int; } -#[test] -fn bindgen_test_layout_OGREnvelope() { +pub mod CPLValueType { + #[doc = " Type of value"] + pub type Type = libc::c_uint; + #[doc = "< String"] + pub const CPL_VALUE_STRING: Type = 0; + #[doc = "< Real number"] + pub const CPL_VALUE_REAL: Type = 1; + #[doc = "< Integer"] + pub const CPL_VALUE_INTEGER: Type = 2; +} +extern "C" { + pub fn CPLGetValueType(pszValue: *const libc::c_char) -> CPLValueType::Type; +} +extern "C" { + pub fn CPLStrlcpy( + pszDest: *mut libc::c_char, + pszSrc: *const libc::c_char, + nDestSize: usize, + ) -> usize; +} +extern "C" { + pub fn CPLStrlcat( + pszDest: *mut libc::c_char, + pszSrc: *const libc::c_char, + nDestSize: usize, + ) -> usize; +} +extern "C" { + pub fn CPLStrnlen(pszStr: *const libc::c_char, nMaxLen: usize) -> usize; +} +extern "C" { + pub fn CPLvsnprintf( + str_: *mut libc::c_char, + size: usize, + fmt: *const libc::c_char, + args: *mut __va_list_tag, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLsnprintf( + str_: *mut libc::c_char, + size: usize, + fmt: *const libc::c_char, + ... + ) -> libc::c_int; +} +extern "C" { + pub fn CPLsprintf(str_: *mut libc::c_char, fmt: *const libc::c_char, ...) -> libc::c_int; +} +extern "C" { + #[doc = " @endcond"] + pub fn CPLprintf(fmt: *const libc::c_char, ...) -> libc::c_int; +} +extern "C" { + #[doc = " @cond Doxygen_Suppress"] + pub fn CPLsscanf(str_: *const libc::c_char, fmt: *const libc::c_char, ...) -> libc::c_int; +} +extern "C" { + #[doc = " @endcond"] + pub fn CPLSPrintf(fmt: *const libc::c_char, ...) -> *const libc::c_char; +} +extern "C" { + pub fn CSLAppendPrintf( + papszStrList: *mut *mut libc::c_char, + fmt: *const libc::c_char, + ... + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn CPLVASPrintf( + buf: *mut *mut libc::c_char, + fmt: *const libc::c_char, + args: *mut __va_list_tag, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLEncodingCharSize(pszEncoding: *const libc::c_char) -> libc::c_int; +} +extern "C" { + #[doc = " @cond Doxygen_Suppress"] + pub fn CPLClearRecodeWarningFlags(); +} +extern "C" { + #[doc = " @endcond"] + pub fn CPLRecode( + pszSource: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLRecodeFromWChar( + pwszSource: *const wchar_t, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLRecodeToWChar( + pszSource: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut wchar_t; +} +extern "C" { + pub fn CPLIsUTF8(pabyData: *const libc::c_char, nLen: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn CPLForceToASCII( + pabyData: *const libc::c_char, + nLen: libc::c_int, + chReplacementChar: libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLStrlenUTF8(pszUTF8Str: *const libc::c_char) -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLHashSet { + _unused: [u8; 0], +} +#[doc = " Opaque type for a hash set"] +pub type CPLHashSet = _CPLHashSet; +#[doc = " CPLHashSetHashFunc"] +pub type CPLHashSetHashFunc = + ::std::option::Option libc::c_ulong>; +#[doc = " CPLHashSetEqualFunc"] +pub type CPLHashSetEqualFunc = ::std::option::Option< + unsafe extern "C" fn(elt1: *const libc::c_void, elt2: *const libc::c_void) -> libc::c_int, +>; +#[doc = " CPLHashSetFreeEltFunc"] +pub type CPLHashSetFreeEltFunc = + ::std::option::Option; +#[doc = " CPLHashSetIterEltFunc"] +pub type CPLHashSetIterEltFunc = ::std::option::Option< + unsafe extern "C" fn(elt: *mut libc::c_void, user_data: *mut libc::c_void) -> libc::c_int, +>; +extern "C" { + pub fn CPLHashSetNew( + fnHashFunc: CPLHashSetHashFunc, + fnEqualFunc: CPLHashSetEqualFunc, + fnFreeEltFunc: CPLHashSetFreeEltFunc, + ) -> *mut CPLHashSet; +} +extern "C" { + pub fn CPLHashSetDestroy(set: *mut CPLHashSet); +} +extern "C" { + pub fn CPLHashSetClear(set: *mut CPLHashSet); +} +extern "C" { + pub fn CPLHashSetSize(set: *const CPLHashSet) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetForeach( + set: *mut CPLHashSet, + fnIterFunc: CPLHashSetIterEltFunc, + user_data: *mut libc::c_void, + ); +} +extern "C" { + pub fn CPLHashSetInsert(set: *mut CPLHashSet, elt: *mut libc::c_void) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetLookup(set: *mut CPLHashSet, elt: *const libc::c_void) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLHashSetRemove(set: *mut CPLHashSet, elt: *const libc::c_void) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetRemoveDeferRehash( + set: *mut CPLHashSet, + elt: *const libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetHashPointer(elt: *const libc::c_void) -> libc::c_ulong; +} +extern "C" { + pub fn CPLHashSetEqualPointer( + elt1: *const libc::c_void, + elt2: *const libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetHashStr(pszStr: *const libc::c_void) -> libc::c_ulong; +} +extern "C" { + pub fn CPLHashSetEqualStr( + pszStr1: *const libc::c_void, + pszStr2: *const libc::c_void, + ) -> libc::c_int; +} +#[doc = " List element structure."] +pub type CPLList = _CPLList; +#[doc = " List element structure."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLList { + #[doc = " Pointer to the data object. Should be allocated and freed by the"] + #[doc = " caller."] + pub pData: *mut libc::c_void, + #[doc = " Pointer to the next element in list. NULL, if current element is the"] + #[doc = " last one."] + pub psNext: *mut _CPLList, +} +#[test] +fn bindgen_test_layout__CPLList() { assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(OGREnvelope)) + ::std::mem::size_of::<_CPLList>(), + 16usize, + concat!("Size of: ", stringify!(_CPLList)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::<_CPLList>(), 8usize, - concat!("Alignment of ", stringify!(OGREnvelope)) + concat!("Alignment of ", stringify!(_CPLList)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_CPLList>())).pData as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGREnvelope), + stringify!(_CPLList), "::", - stringify!(MinX) + stringify!(pData) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_CPLList>())).psNext as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), + stringify!(_CPLList), "::", - stringify!(MaxY) + stringify!(psNext) ) ); } +extern "C" { + pub fn CPLListAppend(psList: *mut CPLList, pData: *mut libc::c_void) -> *mut CPLList; +} +extern "C" { + pub fn CPLListInsert( + psList: *mut CPLList, + pData: *mut libc::c_void, + nPosition: libc::c_int, + ) -> *mut CPLList; +} +extern "C" { + pub fn CPLListGetLast(psList: *mut CPLList) -> *mut CPLList; +} +extern "C" { + pub fn CPLListGet(psList: *mut CPLList, nPosition: libc::c_int) -> *mut CPLList; +} +extern "C" { + pub fn CPLListCount(psList: *const CPLList) -> libc::c_int; +} +extern "C" { + pub fn CPLListRemove(psList: *mut CPLList, nPosition: libc::c_int) -> *mut CPLList; +} +extern "C" { + pub fn CPLListDestroy(psList: *mut CPLList); +} +extern "C" { + pub fn CPLListGetNext(psElement: *const CPLList) -> *mut CPLList; +} +extern "C" { + pub fn CPLListGetData(psElement: *const CPLList) -> *mut libc::c_void; +} +pub mod CPLXMLNodeType { + #[doc = " XML node type"] + pub type Type = libc::c_uint; + #[doc = " Node is an element"] + pub const CXT_Element: Type = 0; + #[doc = " Node is a raw text value"] + pub const CXT_Text: Type = 1; + #[doc = " Node is attribute"] + pub const CXT_Attribute: Type = 2; + #[doc = " Node is an XML comment."] + pub const CXT_Comment: Type = 3; + #[doc = " Node is a special literal"] + pub const CXT_Literal: Type = 4; +} +#[doc = " Document node structure."] +#[doc = ""] +#[doc = " This C structure is used to hold a single text fragment representing a"] +#[doc = " component of the document when parsed. It should be allocated with the"] +#[doc = " appropriate CPL function, and freed with CPLDestroyXMLNode(). The structure"] +#[doc = " contents should not normally be altered by application code, but may be"] +#[doc = " freely examined by application code."] +#[doc = ""] +#[doc = " Using the psChild and psNext pointers, a hierarchical tree structure"] +#[doc = " for a document can be represented as a tree of CPLXMLNode structures."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGREnvelope3D { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, - pub MinZ: f64, - pub MaxZ: f64, +pub struct CPLXMLNode { + #[doc = " \\brief Node type"] + #[doc = ""] + #[doc = " One of CXT_Element, CXT_Text, CXT_Attribute, CXT_Comment,"] + #[doc = " or CXT_Literal."] + pub eType: CPLXMLNodeType::Type, + #[doc = " \\brief Node value"] + #[doc = ""] + #[doc = " For CXT_Element this is the name of the element, without the angle"] + #[doc = " brackets. Note there is a single CXT_Element even when the document"] + #[doc = " contains a start and end element tag. The node represents the pair."] + #[doc = " All text or other elements between the start and end tag will appear"] + #[doc = " as children nodes of this CXT_Element node."] + #[doc = ""] + #[doc = " For CXT_Attribute the pszValue is the attribute name. The value of"] + #[doc = " the attribute will be a CXT_Text child."] + #[doc = ""] + #[doc = " For CXT_Text this is the text itself (value of an attribute, or a"] + #[doc = " text fragment between an element start and end tags."] + #[doc = ""] + #[doc = " For CXT_Literal it is all the literal text. Currently this is just"] + #[doc = " used for !DOCTYPE lines, and the value would be the entire line."] + #[doc = ""] + #[doc = " For CXT_Comment the value is all the literal text within the comment,"] + #[doc = " but not including the comment start/end indicators (\"<--\" and \"-->\")."] + pub pszValue: *mut libc::c_char, + #[doc = " \\brief Next sibling."] + #[doc = ""] + #[doc = " Pointer to next sibling, that is the next node appearing after this"] + #[doc = " one that has the same parent as this node. NULL if this node is the"] + #[doc = " last child of the parent element."] + pub psNext: *mut CPLXMLNode, + #[doc = " \\brief Child node."] + #[doc = ""] + #[doc = " Pointer to first child node, if any. Only CXT_Element and CXT_Attribute"] + #[doc = " nodes should have children. For CXT_Attribute it should be a single"] + #[doc = " CXT_Text value node, while CXT_Element can have any kind of child."] + #[doc = " The full list of children for a node are identified by walking the"] + #[doc = " psNext's starting with the psChild node."] + pub psChild: *mut CPLXMLNode, } #[test] -fn bindgen_test_layout_OGREnvelope3D() { +fn bindgen_test_layout_CPLXMLNode() { assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(OGREnvelope3D)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLXMLNode)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGREnvelope3D)) + concat!("Alignment of ", stringify!(CPLXMLNode)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MinX) + stringify!(eType) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MaxX) + stringify!(pszValue) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, 16usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MinY) + stringify!(psNext) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, 24usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MaxY) + stringify!(psChild) ) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxZ) - ) - ); -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRMalloc(arg1: size_t) -> *mut libc::c_void; } extern "C" { - pub fn OGRCalloc(arg1: size_t, arg2: size_t) -> *mut libc::c_void; + pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: size_t) -> *mut libc::c_void; + pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); } extern "C" { - pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; + pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRFree(arg1: *mut libc::c_void); -} -pub mod OGRwkbGeometryType { - #[doc = " List of well known binary geometry types. These are used within the BLOBs"] - #[doc = " but are also returned from OGRGeometry::getGeometryType() to identify the"] - #[doc = " type of a geometry object."] - pub type Type = u32; - #[doc = "< unknown type, non-standard"] - pub const wkbUnknown: Type = 0; - #[doc = "< 0-dimensional geometric object, standard WKB"] - pub const wkbPoint: Type = 1; - #[doc = "< 1-dimensional geometric object with linear"] - #[doc = " interpolation between Points, standard WKB"] - pub const wkbLineString: Type = 2; - #[doc = "< planar 2-dimensional geometric object defined"] - #[doc = " by 1 exterior boundary and 0 or more interior"] - #[doc = " boundaries, standard WKB"] - pub const wkbPolygon: Type = 3; - #[doc = "< GeometryCollection of Points, standard WKB"] - pub const wkbMultiPoint: Type = 4; - #[doc = "< GeometryCollection of LineStrings, standard WKB"] - pub const wkbMultiLineString: Type = 5; - #[doc = "< GeometryCollection of Polygons, standard WKB"] - pub const wkbMultiPolygon: Type = 6; - #[doc = "< geometric object that is a collection of 1"] - #[doc = "or more geometric objects, standard WKB"] - pub const wkbGeometryCollection: Type = 7; - #[doc = "< one or more circular arc segments connected end to end,"] - #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCircularString: Type = 8; - #[doc = "< sequence of contiguous curves, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCompoundCurve: Type = 9; - #[doc = "< planar surface, defined by 1 exterior boundary"] - #[doc = " and zero or more interior boundaries, that are curves."] - #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCurvePolygon: Type = 10; - #[doc = "< GeometryCollection of Curves, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiCurve: Type = 11; - #[doc = "< GeometryCollection of Surfaces, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiSurface: Type = 12; - #[doc = "< Curve (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurve: Type = 13; - #[doc = "< Surface (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurface: Type = 14; - #[doc = "< a contiguous collection of polygons, which share common boundary segments,"] - #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurface: Type = 15; - #[doc = "< a PolyhedralSurface consisting only of Triangle patches"] - #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTIN: Type = 16; - #[doc = "< a Triangle. ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangle: Type = 17; - #[doc = "< non-standard, for pure attribute records"] - pub const wkbNone: Type = 100; - #[doc = "< non-standard, just for createGeometry()"] - pub const wkbLinearRing: Type = 101; - #[doc = "< wkbCircularString with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCircularStringZ: Type = 1008; - #[doc = "< wkbCompoundCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCompoundCurveZ: Type = 1009; - #[doc = "< wkbCurvePolygon with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCurvePolygonZ: Type = 1010; - #[doc = "< wkbMultiCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiCurveZ: Type = 1011; - #[doc = "< wkbMultiSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiSurfaceZ: Type = 1012; - #[doc = "< wkbCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveZ: Type = 1013; - #[doc = "< wkbSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceZ: Type = 1014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceZ: Type = 1015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINZ: Type = 1016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleZ: Type = 1017; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPointM: Type = 2001; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbLineStringM: Type = 2002; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPolygonM: Type = 2003; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPointM: Type = 2004; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiLineStringM: Type = 2005; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPolygonM: Type = 2006; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbGeometryCollectionM: Type = 2007; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCircularStringM: Type = 2008; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCompoundCurveM: Type = 2009; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurvePolygonM: Type = 2010; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiCurveM: Type = 2011; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiSurfaceM: Type = 2012; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveM: Type = 2013; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceM: Type = 2014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceM: Type = 2015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINM: Type = 2016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleM: Type = 2017; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPointZM: Type = 3001; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbLineStringZM: Type = 3002; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPolygonZM: Type = 3003; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPointZM: Type = 3004; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiLineStringZM: Type = 3005; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPolygonZM: Type = 3006; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbGeometryCollectionZM: Type = 3007; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCircularStringZM: Type = 3008; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCompoundCurveZM: Type = 3009; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurvePolygonZM: Type = 3010; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiCurveZM: Type = 3011; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiSurfaceZM: Type = 3012; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveZM: Type = 3013; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceZM: Type = 3014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceZM: Type = 3015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINZM: Type = 3016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleZM: Type = 3017; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbPoint25D: Type = 2147483649; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbLineString25D: Type = 2147483650; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbPolygon25D: Type = 2147483651; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiPoint25D: Type = 2147483652; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiLineString25D: Type = 2147483653; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiPolygon25D: Type = 2147483654; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbGeometryCollection25D: Type = 2147483655; + pub fn CPLSearchXMLNode( + poRoot: *mut CPLXMLNode, + pszTarget: *const libc::c_char, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; + pub fn CPLGetXMLValue( + poRoot: *const CPLXMLNode, + pszPath: *const libc::c_char, + pszDefault: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn OGRMergeGeometryTypes( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - ) -> OGRwkbGeometryType::Type; + pub fn CPLCreateXMLNode( + poParent: *mut CPLXMLNode, + eType: CPLXMLNodeType::Type, + pszText: *const libc::c_char, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRMergeGeometryTypesEx( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - bAllowPromotingToCurves: libc::c_int, - ) -> OGRwkbGeometryType::Type; + pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; } extern "C" { - pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); } extern "C" { - pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; } extern "C" { - pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); } extern "C" { - pub fn OGR_GT_SetModifier( - eType: OGRwkbGeometryType::Type, - bSetZ: libc::c_int, - bSetM: libc::c_int, - ) -> OGRwkbGeometryType::Type; + pub fn CPLCreateXMLElementAndValue( + psParent: *mut CPLXMLNode, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLAddXMLAttributeAndValue( + psParent: *mut CPLXMLNode, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ); } extern "C" { - pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLCloneXMLTree(psTree: *const CPLXMLNode) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_GT_IsSubClassOf( - eType: OGRwkbGeometryType::Type, - eSuperType: OGRwkbGeometryType::Type, + pub fn CPLSetXMLValue( + psRoot: *mut CPLXMLNode, + pszPath: *const libc::c_char, + pszValue: *const libc::c_char, ) -> libc::c_int; } extern "C" { - pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLStripXMLNamespace( + psRoot: *mut CPLXMLNode, + pszNameSpace: *const libc::c_char, + bRecurse: libc::c_int, + ); } extern "C" { - pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); } extern "C" { - pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -pub mod OGRwkbByteOrder { - #[doc = " Enumeration to describe byte order"] - pub type Type = u32; - #[doc = "< MSB/Sun/Motoroloa: Most Significant Byte First"] - pub const wkbXDR: Type = 0; - #[doc = "< LSB/Intel/Vax: Least Significant Byte First"] - pub const wkbNDR: Type = 1; -} -pub mod OGRFieldType { - #[doc = " List of feature field types. This list is likely to be extended in the"] - #[doc = " future ... avoid coding applications based on the assumption that all"] - #[doc = " field types can be known."] - pub type Type = u32; - #[doc = " Simple 32bit integer"] - pub const OFTInteger: Type = 0; - #[doc = " List of 32bit integers"] - pub const OFTIntegerList: Type = 1; - #[doc = " Double Precision floating point"] - pub const OFTReal: Type = 2; - #[doc = " List of doubles"] - pub const OFTRealList: Type = 3; - #[doc = " String of ASCII chars"] - pub const OFTString: Type = 4; - #[doc = " Array of strings"] - pub const OFTStringList: Type = 5; - #[doc = " deprecated"] - pub const OFTWideString: Type = 6; - #[doc = " deprecated"] - pub const OFTWideStringList: Type = 7; - #[doc = " Raw Binary data"] - pub const OFTBinary: Type = 8; - #[doc = " Date"] - pub const OFTDate: Type = 9; - #[doc = " Time"] - pub const OFTTime: Type = 10; - #[doc = " Date and Time"] - pub const OFTDateTime: Type = 11; - #[doc = " Single 64bit integer"] - pub const OFTInteger64: Type = 12; - #[doc = " List of 64bit integers"] - pub const OFTInteger64List: Type = 13; - #[doc = " List of 64bit integers"] - pub const OFTMaxType: Type = 13; -} -pub mod OGRFieldSubType { - #[doc = " List of field subtypes. A subtype represents a hint, a restriction of the"] - #[doc = " main type, that is not strictly necessary to consult."] - #[doc = " This list is likely to be extended in the"] - #[doc = " future ... avoid coding applications based on the assumption that all"] - #[doc = " field types can be known."] - #[doc = " Most subtypes only make sense for a restricted set of main types."] - #[doc = " @since GDAL 2.0"] - pub type Type = u32; - #[doc = " No subtype. This is the default value"] - pub const OFSTNone: Type = 0; - #[doc = " Boolean integer. Only valid for OFTInteger and OFTIntegerList."] - pub const OFSTBoolean: Type = 1; - #[doc = " Signed 16-bit integer. Only valid for OFTInteger and OFTIntegerList."] - pub const OFSTInt16: Type = 2; - #[doc = " Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList."] - pub const OFSTFloat32: Type = 3; - #[doc = " JSON content. Only valid for OFTString."] - #[doc = " @since GDAL 2.4"] - pub const OFSTJSON: Type = 4; - #[doc = " JSON content. Only valid for OFTString."] - #[doc = " @since GDAL 2.4"] - pub const OFSTMaxSubType: Type = 4; -} -pub mod OGRJustification { - #[doc = " Display justification for field values."] - pub type Type = u32; - pub const OJUndefined: Type = 0; - pub const OJLeft: Type = 1; - pub const OJRight: Type = 2; -} -#[doc = " OGRFeature field attribute value union."] -#[repr(C)] -#[derive(Copy, Clone)] -pub union OGRField { - #[doc = " @cond Doxygen_Suppress"] - pub Integer: libc::c_int, - pub Integer64: GIntBig, - pub Real: f64, - pub String: *mut libc::c_char, - pub IntegerList: OGRField__bindgen_ty_1, - pub Integer64List: OGRField__bindgen_ty_2, - pub RealList: OGRField__bindgen_ty_3, - pub StringList: OGRField__bindgen_ty_4, - pub Binary: OGRField__bindgen_ty_5, - pub Set: OGRField__bindgen_ty_6, - pub Date: OGRField__bindgen_ty_7, - _bindgen_union_align: [u64; 2usize], + pub fn CPLSerializeXMLTreeToFile( + psTree: *const CPLXMLNode, + pszFilename: *const libc::c_char, + ) -> libc::c_int; } +#[doc = " Describe a rectangle"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_1 { - pub nCount: libc::c_int, - pub paList: *mut libc::c_int, +pub struct CPLRectObj { + #[doc = "< Minimum x"] + pub minx: f64, + #[doc = "< Minimum y"] + pub miny: f64, + #[doc = "< Maximum x"] + pub maxx: f64, + #[doc = "< Maximum y"] + pub maxy: f64, } #[test] -fn bindgen_test_layout_OGRField__bindgen_ty_1() { +fn bindgen_test_layout_CPLRectObj() { assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLRectObj)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) + concat!("Alignment of ", stringify!(CPLRectObj)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).minx as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), + stringify!(CPLRectObj), "::", - stringify!(nCount) + stringify!(minx) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).miny as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), + stringify!(CPLRectObj), "::", - stringify!(paList) + stringify!(miny) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_2 { - pub nCount: libc::c_int, - pub paList: *mut GIntBig, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).maxx as *const _ as usize }, 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), + stringify!(CPLRectObj), "::", - stringify!(nCount) + stringify!(maxx) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).maxy as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), + stringify!(CPLRectObj), "::", - stringify!(paList) + stringify!(maxy) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_3 { - pub nCount: libc::c_int, - pub paList: *mut f64, +pub struct _CPLQuadTree { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(paList) - ) - ); +#[doc = " Opaque type for a quad tree"] +pub type CPLQuadTree = _CPLQuadTree; +#[doc = " CPLQuadTreeGetBoundsFunc"] +pub type CPLQuadTreeGetBoundsFunc = ::std::option::Option< + unsafe extern "C" fn(hFeature: *const libc::c_void, pBounds: *mut CPLRectObj), +>; +#[doc = " CPLQuadTreeForeachFunc"] +pub type CPLQuadTreeForeachFunc = ::std::option::Option< + unsafe extern "C" fn(pElt: *mut libc::c_void, pUserData: *mut libc::c_void) -> libc::c_int, +>; +#[doc = " CPLQuadTreeDumpFeatureFunc"] +pub type CPLQuadTreeDumpFeatureFunc = ::std::option::Option< + unsafe extern "C" fn( + hFeature: *const libc::c_void, + nIndentLevel: libc::c_int, + pUserData: *mut libc::c_void, + ), +>; +extern "C" { + pub fn CPLQuadTreeCreate( + pGlobalBounds: *const CPLRectObj, + pfnGetBounds: CPLQuadTreeGetBoundsFunc, + ) -> *mut CPLQuadTree; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_4 { - pub nCount: libc::c_int, - pub paList: *mut *mut libc::c_char, +extern "C" { + pub fn CPLQuadTreeDestroy(hQuadtree: *mut CPLQuadTree); } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_4() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) +extern "C" { + pub fn CPLQuadTreeSetBucketCapacity(hQuadtree: *mut CPLQuadTree, nBucketCapacity: libc::c_int); +} +extern "C" { + pub fn CPLQuadTreeGetAdvisedMaxDepth(nExpectedFeatures: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn CPLQuadTreeSetMaxDepth(hQuadtree: *mut CPLQuadTree, nMaxDepth: libc::c_int); +} +extern "C" { + pub fn CPLQuadTreeInsert(hQuadtree: *mut CPLQuadTree, hFeature: *mut libc::c_void); +} +extern "C" { + pub fn CPLQuadTreeInsertWithBounds( + hQuadtree: *mut CPLQuadTree, + hFeature: *mut libc::c_void, + psBounds: *const CPLRectObj, ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) +} +extern "C" { + pub fn CPLQuadTreeSearch( + hQuadtree: *const CPLQuadTree, + pAoi: *const CPLRectObj, + pnFeatureCount: *mut libc::c_int, + ) -> *mut *mut libc::c_void; +} +extern "C" { + pub fn CPLQuadTreeForeach( + hQuadtree: *const CPLQuadTree, + pfnForeach: CPLQuadTreeForeachFunc, + pUserData: *mut libc::c_void, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(nCount) - ) +} +extern "C" { + pub fn CPLQuadTreeDump( + hQuadtree: *const CPLQuadTree, + pfnDumpFeatureFunc: CPLQuadTreeDumpFeatureFunc, + pUserData: *mut libc::c_void, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(paList) - ) +} +extern "C" { + pub fn CPLQuadTreeGetStats( + hQuadtree: *const CPLQuadTree, + pnFeatureCount: *mut libc::c_int, + pnNodeCount: *mut libc::c_int, + pnMaxDepth: *mut libc::c_int, + pnMaxBucketCapacity: *mut libc::c_int, ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_5 { - pub nCount: libc::c_int, - pub paData: *mut GByte, +pub struct CPLVirtualMem { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_5() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(paData) - ) - ); +#[doc = " Callback triggered when a still unmapped page of virtual memory is accessed."] +#[doc = " The callback has the responsibility of filling the page with relevant values"] +#[doc = ""] +#[doc = " @param ctxt virtual memory handle."] +#[doc = " @param nOffset offset of the page in the memory mapping."] +#[doc = " @param pPageToFill address of the page to fill. Note that the address might"] +#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] +#[doc = " @param nToFill number of bytes of the page."] +#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] +pub type CPLVirtualMemCachePageCbk = ::std::option::Option< + unsafe extern "C" fn( + ctxt: *mut CPLVirtualMem, + nOffset: usize, + pPageToFill: *mut libc::c_void, + nToFill: usize, + pUserData: *mut libc::c_void, + ), +>; +#[doc = " Callback triggered when a dirty mapped page is going to be freed."] +#[doc = " (saturation of cache, or termination of the virtual memory mapping)."] +#[doc = ""] +#[doc = " @param ctxt virtual memory handle."] +#[doc = " @param nOffset offset of the page in the memory mapping."] +#[doc = " @param pPageToBeEvicted address of the page that will be flushed. Note that the address might"] +#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] +#[doc = " @param nToBeEvicted number of bytes of the page."] +#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] +pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< + unsafe extern "C" fn( + ctxt: *mut CPLVirtualMem, + nOffset: usize, + pPageToBeEvicted: *const libc::c_void, + nToBeEvicted: usize, + pUserData: *mut libc::c_void, + ), +>; +#[doc = " Callback triggered when a virtual memory mapping is destroyed."] +#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] +pub type CPLVirtualMemFreeUserData = + ::std::option::Option; +pub mod CPLVirtualMemAccessMode { + #[doc = " Access mode of a virtual memory mapping."] + pub type Type = libc::c_uint; + #[doc = " The mapping is meant at being read-only, but writes will not be prevented."] + #[doc = "Note that any content written will be lost."] + pub const VIRTUALMEM_READONLY: Type = 0; + #[doc = " The mapping is meant at being read-only, and this will be enforced"] + #[doc = "through the operating system page protection mechanism."] + pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; + #[doc = " The mapping is meant at being read-write, and modified pages can be saved"] + #[doc = "thanks to the pfnUnCachePage callback"] + pub const VIRTUALMEM_READWRITE: Type = 2; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_6 { - pub nMarker1: libc::c_int, - pub nMarker2: libc::c_int, - pub nMarker3: libc::c_int, +extern "C" { + #[doc = " Return the size of a page of virtual memory."] + #[doc = ""] + #[doc = " @return the page size."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLGetPageSize() -> usize; } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_6() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), - "::", - stringify!(nMarker3) - ) - ); +extern "C" { + #[doc = " Create a new virtual memory mapping."] + #[doc = ""] + #[doc = " This will reserve an area of virtual memory of size nSize, whose size"] + #[doc = " might be potentially much larger than the physical memory available. Initially,"] + #[doc = " no physical memory will be allocated. As soon as memory pages will be accessed,"] + #[doc = " they will be allocated transparently and filled with the pfnCachePage callback."] + #[doc = " When the allowed cache size is reached, the least recently used pages will"] + #[doc = " be unallocated."] + #[doc = ""] + #[doc = " On Linux AMD64 platforms, the maximum value for nSize is 128 TB."] + #[doc = " On Linux x86 platforms, the maximum value for nSize is 2 GB."] + #[doc = ""] + #[doc = " Only supported on Linux for now."] + #[doc = ""] + #[doc = " Note that on Linux, this function will install a SIGSEGV handler. The"] + #[doc = " original handler will be restored by CPLVirtualMemManagerTerminate()."] + #[doc = ""] + #[doc = " @param nSize size in bytes of the virtual memory mapping."] + #[doc = " @param nCacheSize size in bytes of the maximum memory that will be really"] + #[doc = " allocated (must ideally fit into RAM)."] + #[doc = " @param nPageSizeHint hint for the page size. Must be a multiple of the"] + #[doc = " system page size, returned by CPLGetPageSize()."] + #[doc = " Minimum value is generally 4096. Might be set to 0 to"] + #[doc = " let the function determine a default page size."] + #[doc = " @param bSingleThreadUsage set to TRUE if there will be no concurrent threads"] + #[doc = " that will access the virtual memory mapping. This can"] + #[doc = " optimize performance a bit."] + #[doc = " @param eAccessMode permission to use for the virtual memory mapping."] + #[doc = " @param pfnCachePage callback triggered when a still unmapped page of virtual"] + #[doc = " memory is accessed. The callback has the responsibility"] + #[doc = " of filling the page with relevant values."] + #[doc = " @param pfnUnCachePage callback triggered when a dirty mapped page is going to"] + #[doc = " be freed (saturation of cache, or termination of the"] + #[doc = " virtual memory mapping). Might be NULL."] + #[doc = " @param pfnFreeUserData callback that can be used to free pCbkUserData. Might be"] + #[doc = " NULL"] + #[doc = " @param pCbkUserData user data passed to pfnCachePage and pfnUnCachePage."] + #[doc = ""] + #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] + #[doc = " or NULL in case of failure."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemNew( + nSize: usize, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + eAccessMode: CPLVirtualMemAccessMode::Type, + pfnCachePage: CPLVirtualMemCachePageCbk, + pfnUnCachePage: CPLVirtualMemUnCachePageCbk, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_7 { - pub Year: GInt16, - pub Month: GByte, - pub Day: GByte, - pub Hour: GByte, - pub Minute: GByte, - pub TZFlag: GByte, - pub Reserved: GByte, - pub Second: f32, +extern "C" { + #[doc = " Return if virtual memory mapping of a file is available."] + #[doc = ""] + #[doc = " @return TRUE if virtual memory mapping of a file is available."] + #[doc = " @since GDAL 1.11"] + pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_7() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Month) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Day) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Minute) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(TZFlag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Reserved) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Second) - ) +extern "C" { + #[doc = " Create a new virtual memory mapping from a file."] + #[doc = ""] + #[doc = " The file must be a \"real\" file recognized by the operating system, and not"] + #[doc = " a VSI extended virtual file."] + #[doc = ""] + #[doc = " In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written"] + #[doc = " in the file."] + #[doc = ""] + #[doc = " On Linux AMD64 platforms, the maximum value for nLength is 128 TB."] + #[doc = " On Linux x86 platforms, the maximum value for nLength is 2 GB."] + #[doc = ""] + #[doc = " Supported on Linux only in GDAL <= 2.0, and all POSIX systems supporting"] + #[doc = " mmap() in GDAL >= 2.1"] + #[doc = ""] + #[doc = " @param fp Virtual file handle."] + #[doc = " @param nOffset Offset in the file to start the mapping from."] + #[doc = " @param nLength Length of the portion of the file to map into memory."] + #[doc = " @param eAccessMode Permission to use for the virtual memory mapping. This must"] + #[doc = " be consistent with how the file has been opened."] + #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] + #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] + #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] + #[doc = " or NULL in case of failure."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemFileMapNew( + fp: *mut VSILFILE, + nOffset: vsi_l_offset, + nLength: vsi_l_offset, + eAccessMode: CPLVirtualMemAccessMode::Type, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; +} +extern "C" { + #[doc = " Create a new virtual memory mapping derived from an other virtual memory"] + #[doc = " mapping."] + #[doc = ""] + #[doc = " This may be useful in case of creating mapping for pixel interleaved data."] + #[doc = ""] + #[doc = " The new mapping takes a reference on the base mapping."] + #[doc = ""] + #[doc = " @param pVMemBase Base virtual memory mapping"] + #[doc = " @param nOffset Offset in the base virtual memory mapping from which to start"] + #[doc = " the new mapping."] + #[doc = " @param nSize Size of the base virtual memory mapping to expose in the"] + #[doc = " the new mapping."] + #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] + #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] + #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] + #[doc = " or NULL in case of failure."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemDerivedNew( + pVMemBase: *mut CPLVirtualMem, + nOffset: vsi_l_offset, + nSize: vsi_l_offset, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; +} +extern "C" { + #[doc = " Free a virtual memory mapping."] + #[doc = ""] + #[doc = " The pointer returned by CPLVirtualMemGetAddr() will no longer be valid."] + #[doc = " If the virtual memory mapping was created with read/write permissions and that"] + #[doc = " they are dirty (i.e. modified) pages, they will be flushed through the"] + #[doc = " pfnUnCachePage callback before being freed."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); +} +extern "C" { + #[doc = " Return the pointer to the start of a virtual memory mapping."] + #[doc = ""] + #[doc = " The bytes in the range [p:p+CPLVirtualMemGetSize()-1] where p is the pointer"] + #[doc = " returned by this function will be valid, until CPLVirtualMemFree() is called."] + #[doc = ""] + #[doc = " Note that if a range of bytes used as an argument of a system call"] + #[doc = " (such as read() or write()) contains pages that have not been \"realized\", the"] + #[doc = " system call will fail with EFAULT. CPLVirtualMemPin() can be used to work"] + #[doc = " around this issue."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return the pointer to the start of a virtual memory mapping."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; +} +extern "C" { + #[doc = " Return the size of the virtual memory mapping."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return the size of the virtual memory mapping."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; +} +extern "C" { + #[doc = " Return if the virtual memory mapping is a direct file mapping."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return TRUE if the virtual memory mapping is a direct file mapping."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; +} +extern "C" { + #[doc = " Return the access mode of the virtual memory mapping."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return the access mode of the virtual memory mapping."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; +} +extern "C" { + #[doc = " Return the page size associated to a virtual memory mapping."] + #[doc = ""] + #[doc = " The value returned will be at least CPLGetPageSize(), but potentially"] + #[doc = " larger."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return the page size"] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; +} +extern "C" { + #[doc = " Return TRUE if this memory mapping can be accessed safely from concurrent"] + #[doc = " threads."] + #[doc = ""] + #[doc = " The situation that can cause problems is when several threads try to access"] + #[doc = " a page of the mapping that is not yet mapped."] + #[doc = ""] + #[doc = " The return value of this function depends on whether bSingleThreadUsage has"] + #[doc = " been set of not in CPLVirtualMemNew() and/or the implementation."] + #[doc = ""] + #[doc = " On Linux, this will always return TRUE if bSingleThreadUsage = FALSE."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @return TRUE if this memory mapping can be accessed safely from concurrent"] + #[doc = " threads."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; +} +extern "C" { + #[doc = " Declare that a thread will access a virtual memory mapping."] + #[doc = ""] + #[doc = " This function must be called by a thread that wants to access the"] + #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] + #[doc = " been created with bSingleThreadUsage = TRUE."] + #[doc = ""] + #[doc = " This function must be paired with CPLVirtualMemUnDeclareThread()."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); +} +extern "C" { + #[doc = " Declare that a thread will stop accessing a virtual memory mapping."] + #[doc = ""] + #[doc = " This function must be called by a thread that will no longer access the"] + #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] + #[doc = " been created with bSingleThreadUsage = TRUE."] + #[doc = ""] + #[doc = " This function must be paired with CPLVirtualMemDeclareThread()."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); +} +extern "C" { + #[doc = " Make sure that a region of virtual memory will be realized."] + #[doc = ""] + #[doc = " Calling this function is not required, but might be useful when debugging"] + #[doc = " a process with tools like gdb or valgrind that do not naturally like"] + #[doc = " segmentation fault signals."] + #[doc = ""] + #[doc = " It is also needed when wanting to provide part of virtual memory mapping"] + #[doc = " to a system call such as read() or write(). If read() or write() is called"] + #[doc = " on a memory region not yet realized, the call will fail with EFAULT."] + #[doc = ""] + #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] + #[doc = " @param pAddr the memory region to pin."] + #[doc = " @param nSize the size of the memory region."] + #[doc = " @param bWriteOp set to TRUE if the memory are will be accessed in write mode."] + #[doc = ""] + #[doc = " @since GDAL 1.11"] + pub fn CPLVirtualMemPin( + ctxt: *mut CPLVirtualMem, + pAddr: *mut libc::c_void, + nSize: usize, + bWriteOp: libc::c_int, ); } +extern "C" { + #[doc = " Cleanup any resource and handlers related to virtual memory."] + #[doc = ""] + #[doc = " This function must be called after the last CPLVirtualMem object has"] + #[doc = " been freed."] + #[doc = ""] + #[doc = " @since GDAL 2.0"] + pub fn CPLVirtualMemManagerTerminate(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGREnvelope { + pub MinX: f64, + pub MaxX: f64, + pub MinY: f64, + pub MaxY: f64, +} #[test] -fn bindgen_test_layout_OGRField() { +fn bindgen_test_layout_OGREnvelope() { assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(OGREnvelope)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGRField)) + concat!("Alignment of ", stringify!(OGREnvelope)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope), "::", - stringify!(Integer) + stringify!(MinX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope), "::", - stringify!(Integer64) + stringify!(MaxX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + 16usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope), "::", - stringify!(Real) + stringify!(MinY) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope), "::", - stringify!(String) + stringify!(MaxY) ) ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGREnvelope3D { + pub MinX: f64, + pub MaxX: f64, + pub MinY: f64, + pub MaxY: f64, + pub MinZ: f64, + pub MaxZ: f64, +} +#[test] +fn bindgen_test_layout_OGREnvelope3D() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(IntegerList) - ) + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(OGREnvelope3D)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGREnvelope3D)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope3D), "::", - stringify!(Integer64List) + stringify!(MinX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope3D), "::", - stringify!(RealList) + stringify!(MaxX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + 16usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope3D), "::", - stringify!(StringList) + stringify!(MinY) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope3D), "::", - stringify!(Binary) + stringify!(MaxY) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, + 32usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope3D), "::", - stringify!(Set) + stringify!(MinZ) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, + 40usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope3D), "::", - stringify!(Date) + stringify!(MaxZ) ) ); } extern "C" { - pub fn OGRParseDate( - pszInput: *const libc::c_char, - psOutput: *mut OGRField, - nOptions: libc::c_int, - ) -> libc::c_int; -} -pub mod ogr_style_tool_class_id { - #[doc = " OGRStyleTool derived class types (returned by GetType())."] - pub type Type = u32; - #[doc = "< None"] - pub const OGRSTCNone: Type = 0; - #[doc = "< Pen"] - pub const OGRSTCPen: Type = 1; - #[doc = "< Brush"] - pub const OGRSTCBrush: Type = 2; - #[doc = "< Symbol"] - pub const OGRSTCSymbol: Type = 3; - #[doc = "< Label"] - pub const OGRSTCLabel: Type = 4; - #[doc = "< Vector"] - pub const OGRSTCVector: Type = 5; -} -#[doc = " OGRStyleTool derived class types (returned by GetType())."] -pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; -pub mod ogr_style_tool_units_id { - #[doc = " List of units supported by OGRStyleTools."] - pub type Type = u32; - #[doc = "< Ground unit"] - pub const OGRSTUGround: Type = 0; - #[doc = "< Pixel"] - pub const OGRSTUPixel: Type = 1; - #[doc = "< Points"] - pub const OGRSTUPoints: Type = 2; - #[doc = "< Millimeter"] - pub const OGRSTUMM: Type = 3; - #[doc = "< Centimeter"] - pub const OGRSTUCM: Type = 4; - #[doc = "< Inch"] - pub const OGRSTUInches: Type = 5; -} -#[doc = " List of units supported by OGRStyleTools."] -pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; -extern "C" { - pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - #[doc = " Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor."] - #[doc = ""] - #[doc = "The purpose of this method is to ensure that calling code will run with the GDAL"] - #[doc = "version it is compiled for. It is primarily indented for external plugins."] - #[doc = ""] - #[doc = "@param nVersionMajor Major version to be tested against"] - #[doc = "@param nVersionMinor Minor version to be tested against"] - #[doc = "@param pszCallingComponentName If not NULL, in case of version mismatch, the method"] - #[doc = "will issue a failure mentioning the name of"] - #[doc = "the calling component."] - pub fn GDALCheckVersion( - nVersionMajor: libc::c_int, - nVersionMinor: libc::c_int, - pszCallingComponentName: *const libc::c_char, - ) -> libc::c_int; -} -#[doc = " Opaque type for a geometry"] -pub type OGRGeometryH = *mut libc::c_void; -#[doc = " Opaque type for a spatial reference system"] -pub type OGRSpatialReferenceH = *mut libc::c_void; -#[doc = " Opaque type for a coordinate transformation object"] -pub type OGRCoordinateTransformationH = *mut libc::c_void; -extern "C" { - pub fn OGR_G_CreateFromWkb( - arg1: *const libc::c_void, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromWkt( - arg1: *mut *mut libc::c_char, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromFgf( - arg1: *const libc::c_void, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - arg5: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ApproximateArcAngles( - dfCenterX: f64, - dfCenterY: f64, - dfZ: f64, - dfPrimaryRadius: f64, - dfSecondaryAxis: f64, - dfRotation: f64, - dfStartAngle: f64, - dfEndAngle: f64, - dfMaxAngleStepSizeDegrees: f64, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceTo( - hGeom: OGRGeometryH, - eTargetType: OGRwkbGeometryType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsMeasured(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Set3D(arg1: OGRGeometryH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_G_SetMeasured(arg1: OGRGeometryH, arg2: libc::c_int); + #[doc = " @cond Doxygen_Suppress"] + pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); + pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); + pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_ImportFromWkb( - arg1: OGRGeometryH, - arg2: *const libc::c_void, - arg3: libc::c_int, - ) -> OGRErr::Type; + pub fn OGRFree(arg1: *mut libc::c_void); } -extern "C" { - pub fn OGR_G_ExportToWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToIsoWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); +pub mod OGRwkbGeometryType { + #[doc = " List of well known binary geometry types. These are used within the BLOBs"] + #[doc = " but are also returned from OGRGeometry::getGeometryType() to identify the"] + #[doc = " type of a geometry object."] + pub type Type = libc::c_uint; + #[doc = "< unknown type, non-standard"] + pub const wkbUnknown: Type = 0; + #[doc = "< 0-dimensional geometric object, standard WKB"] + pub const wkbPoint: Type = 1; + #[doc = "< 1-dimensional geometric object with linear"] + #[doc = " interpolation between Points, standard WKB"] + pub const wkbLineString: Type = 2; + #[doc = "< planar 2-dimensional geometric object defined"] + #[doc = " by 1 exterior boundary and 0 or more interior"] + #[doc = " boundaries, standard WKB"] + pub const wkbPolygon: Type = 3; + #[doc = "< GeometryCollection of Points, standard WKB"] + pub const wkbMultiPoint: Type = 4; + #[doc = "< GeometryCollection of LineStrings, standard WKB"] + pub const wkbMultiLineString: Type = 5; + #[doc = "< GeometryCollection of Polygons, standard WKB"] + pub const wkbMultiPolygon: Type = 6; + #[doc = "< geometric object that is a collection of 1"] + #[doc = "or more geometric objects, standard WKB"] + pub const wkbGeometryCollection: Type = 7; + #[doc = "< one or more circular arc segments connected end to end,"] + #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCircularString: Type = 8; + #[doc = "< sequence of contiguous curves, ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCompoundCurve: Type = 9; + #[doc = "< planar surface, defined by 1 exterior boundary"] + #[doc = " and zero or more interior boundaries, that are curves."] + #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCurvePolygon: Type = 10; + #[doc = "< GeometryCollection of Curves, ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbMultiCurve: Type = 11; + #[doc = "< GeometryCollection of Surfaces, ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbMultiSurface: Type = 12; + #[doc = "< Curve (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurve: Type = 13; + #[doc = "< Surface (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbSurface: Type = 14; + #[doc = "< a contiguous collection of polygons, which share common boundary segments,"] + #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbPolyhedralSurface: Type = 15; + #[doc = "< a PolyhedralSurface consisting only of Triangle patches"] + #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTIN: Type = 16; + #[doc = "< a Triangle. ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTriangle: Type = 17; + #[doc = "< non-standard, for pure attribute records"] + pub const wkbNone: Type = 100; + #[doc = "< non-standard, just for createGeometry()"] + pub const wkbLinearRing: Type = 101; + #[doc = "< wkbCircularString with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCircularStringZ: Type = 1008; + #[doc = "< wkbCompoundCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCompoundCurveZ: Type = 1009; + #[doc = "< wkbCurvePolygon with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbCurvePolygonZ: Type = 1010; + #[doc = "< wkbMultiCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbMultiCurveZ: Type = 1011; + #[doc = "< wkbMultiSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] + pub const wkbMultiSurfaceZ: Type = 1012; + #[doc = "< wkbCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurveZ: Type = 1013; + #[doc = "< wkbSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbSurfaceZ: Type = 1014; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbPolyhedralSurfaceZ: Type = 1015; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTINZ: Type = 1016; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTriangleZ: Type = 1017; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbPointM: Type = 2001; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbLineStringM: Type = 2002; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbPolygonM: Type = 2003; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiPointM: Type = 2004; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiLineStringM: Type = 2005; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiPolygonM: Type = 2006; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbGeometryCollectionM: Type = 2007; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCircularStringM: Type = 2008; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCompoundCurveM: Type = 2009; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurvePolygonM: Type = 2010; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiCurveM: Type = 2011; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiSurfaceM: Type = 2012; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurveM: Type = 2013; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbSurfaceM: Type = 2014; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbPolyhedralSurfaceM: Type = 2015; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTINM: Type = 2016; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTriangleM: Type = 2017; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbPointZM: Type = 3001; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbLineStringZM: Type = 3002; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbPolygonZM: Type = 3003; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiPointZM: Type = 3004; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiLineStringZM: Type = 3005; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiPolygonZM: Type = 3006; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbGeometryCollectionZM: Type = 3007; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCircularStringZM: Type = 3008; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCompoundCurveZM: Type = 3009; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurvePolygonZM: Type = 3010; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiCurveZM: Type = 3011; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbMultiSurfaceZM: Type = 3012; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbCurveZM: Type = 3013; + #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] + pub const wkbSurfaceZM: Type = 3014; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbPolyhedralSurfaceZM: Type = 3015; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTINZM: Type = 3016; + #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] + pub const wkbTriangleZM: Type = 3017; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbPoint25D: Type = 2147483649; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbLineString25D: Type = 2147483650; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbPolygon25D: Type = 2147483651; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbMultiPoint25D: Type = 2147483652; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbMultiLineString25D: Type = 2147483653; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbMultiPolygon25D: Type = 2147483654; + #[doc = "< 2.5D extension as per 99-402"] + pub const wkbGeometryCollection25D: Type = 2147483655; } extern "C" { - pub fn OGR_G_CloseRings(arg1: OGRGeometryH); + pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; } extern "C" { - pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; + pub fn OGRMergeGeometryTypes( + eMain: OGRwkbGeometryType::Type, + eExtra: OGRwkbGeometryType::Type, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; + pub fn OGRMergeGeometryTypesEx( + eMain: OGRwkbGeometryType::Type, + eExtra: OGRwkbGeometryType::Type, + bAllowPromotingToCurves: libc::c_int, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ExportToGMLEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; + pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; + pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; + pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; + pub fn OGR_GT_SetModifier( + eType: OGRwkbGeometryType::Type, + bSetZ: libc::c_int, + bSetM: libc::c_int, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ExportToKML( - arg1: OGRGeometryH, - pszAltitudeMode: *const libc::c_char, - ) -> *mut libc::c_char; + pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; + pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_ExportToJsonEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; + pub fn OGR_GT_IsSubClassOf( + eType: OGRwkbGeometryType::Type, + eSuperType: OGRwkbGeometryType::Type, + ) -> libc::c_int; } extern "C" { - #[doc = " Create a OGR geometry from a GeoJSON geometry object"] - pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; + pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); + pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; + pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; + pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; + pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } -extern "C" { - pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; +pub mod OGRwkbByteOrder { + #[doc = " Enumeration to describe byte order"] + pub type Type = libc::c_uint; + #[doc = "< MSB/Sun/Motoroloa: Most Significant Byte First"] + pub const wkbXDR: Type = 0; + #[doc = "< LSB/Intel/Vax: Least Significant Byte First"] + pub const wkbNDR: Type = 1; } -extern "C" { - pub fn OGR_G_DelaunayTriangulation( - hThis: OGRGeometryH, - dfTolerance: f64, - bOnlyEdges: libc::c_int, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Segmentize(hGeom: OGRGeometryH, dfMaxLength: f64); +pub mod OGRFieldType { + #[doc = " List of feature field types. This list is likely to be extended in the"] + #[doc = " future ... avoid coding applications based on the assumption that all"] + #[doc = " field types can be known."] + pub type Type = libc::c_uint; + #[doc = " Simple 32bit integer"] + pub const OFTInteger: Type = 0; + #[doc = " List of 32bit integers"] + pub const OFTIntegerList: Type = 1; + #[doc = " Double Precision floating point"] + pub const OFTReal: Type = 2; + #[doc = " List of doubles"] + pub const OFTRealList: Type = 3; + #[doc = " String of ASCII chars"] + pub const OFTString: Type = 4; + #[doc = " Array of strings"] + pub const OFTStringList: Type = 5; + #[doc = " deprecated"] + pub const OFTWideString: Type = 6; + #[doc = " deprecated"] + pub const OFTWideStringList: Type = 7; + #[doc = " Raw Binary data"] + pub const OFTBinary: Type = 8; + #[doc = " Date"] + pub const OFTDate: Type = 9; + #[doc = " Time"] + pub const OFTTime: Type = 10; + #[doc = " Date and Time"] + pub const OFTDateTime: Type = 11; + #[doc = " Single 64bit integer"] + pub const OFTInteger64: Type = 12; + #[doc = " List of 64bit integers"] + pub const OFTInteger64List: Type = 13; + #[doc = " List of 64bit integers"] + pub const OFTMaxType: Type = 13; } -extern "C" { - pub fn OGR_G_Intersects(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +pub mod OGRFieldSubType { + #[doc = " List of field subtypes. A subtype represents a hint, a restriction of the"] + #[doc = " main type, that is not strictly necessary to consult."] + #[doc = " This list is likely to be extended in the"] + #[doc = " future ... avoid coding applications based on the assumption that all"] + #[doc = " field types can be known."] + #[doc = " Most subtypes only make sense for a restricted set of main types."] + #[doc = " @since GDAL 2.0"] + pub type Type = libc::c_uint; + #[doc = " No subtype. This is the default value"] + pub const OFSTNone: Type = 0; + #[doc = " Boolean integer. Only valid for OFTInteger and OFTIntegerList."] + pub const OFSTBoolean: Type = 1; + #[doc = " Signed 16-bit integer. Only valid for OFTInteger and OFTIntegerList."] + pub const OFSTInt16: Type = 2; + #[doc = " Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList."] + pub const OFSTFloat32: Type = 3; + #[doc = " JSON content. Only valid for OFTString."] + #[doc = " @since GDAL 2.4"] + pub const OFSTJSON: Type = 4; + #[doc = " JSON content. Only valid for OFTString."] + #[doc = " @since GDAL 2.4"] + pub const OFSTMaxSubType: Type = 4; } -extern "C" { - pub fn OGR_G_Equals(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +pub mod OGRJustification { + #[doc = " Display justification for field values."] + pub type Type = libc::c_uint; + pub const OJUndefined: Type = 0; + pub const OJLeft: Type = 1; + pub const OJRight: Type = 2; } -extern "C" { - pub fn OGR_G_Disjoint(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +#[doc = " OGRFeature field attribute value union."] +#[repr(C)] +#[derive(Copy, Clone)] +pub union OGRField { + #[doc = " @cond Doxygen_Suppress"] + pub Integer: libc::c_int, + pub Integer64: GIntBig, + pub Real: f64, + pub String: *mut libc::c_char, + pub IntegerList: OGRField__bindgen_ty_1, + pub Integer64List: OGRField__bindgen_ty_2, + pub RealList: OGRField__bindgen_ty_3, + pub StringList: OGRField__bindgen_ty_4, + pub Binary: OGRField__bindgen_ty_5, + pub Set: OGRField__bindgen_ty_6, + pub Date: OGRField__bindgen_ty_7, } -extern "C" { - pub fn OGR_G_Touches(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_1 { + pub nCount: libc::c_int, + pub paList: *mut libc::c_int, } -extern "C" { - pub fn OGR_G_Crosses(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_1), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_1), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_G_Within(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_2 { + pub nCount: libc::c_int, + pub paList: *mut GIntBig, } -extern "C" { - pub fn OGR_G_Contains(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_2), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_2), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_G_Overlaps(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_3 { + pub nCount: libc::c_int, + pub paList: *mut f64, } -extern "C" { - pub fn OGR_G_Boundary(arg1: OGRGeometryH) -> OGRGeometryH; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_3() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_3), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_3), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_G_ConvexHull(arg1: OGRGeometryH) -> OGRGeometryH; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_4 { + pub nCount: libc::c_int, + pub paList: *mut *mut libc::c_char, } -extern "C" { - pub fn OGR_G_Buffer(arg1: OGRGeometryH, arg2: f64, arg3: libc::c_int) -> OGRGeometryH; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_4() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_4), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_4), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_G_Intersection(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Union(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_UnionCascaded(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_PointOnSurface(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Difference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_SymDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Distance(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Distance3D(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Length(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Area(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_Centroid(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Value(arg1: OGRGeometryH, dfDistance: f64) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_Empty(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_IsEmpty(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsValid(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_MakeValid(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_IsSimple(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_IsRing(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_Equal(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_SymmetricDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetArea(arg1: OGRGeometryH) -> f64; -} -extern "C" { - pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - #[doc = " @endcond"] - pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetPoints( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetPointsZM( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - pabyM: *mut libc::c_void, - nMStride: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetX(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetY(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetZ(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn OGR_G_GetM(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_5 { + pub nCount: libc::c_int, + pub paData: *mut GByte, } -extern "C" { - pub fn OGR_G_GetPoint( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_5() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) ); -} -extern "C" { - pub fn OGR_G_GetPointZM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, - arg5: *mut f64, + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) ); -} -extern "C" { - pub fn OGR_G_SetPointCount(hGeom: OGRGeometryH, nNewPointCount: libc::c_int); -} -extern "C" { - pub fn OGR_G_SetPoint(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_SetPoint_2D(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_SetPointM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: f64, - arg3: f64, - arg4: f64, + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_5), + "::", + stringify!(nCount) + ) ); -} -extern "C" { - pub fn OGR_G_SetPointZM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_5), + "::", + stringify!(paData) + ) ); } -extern "C" { - pub fn OGR_G_AddPoint(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_AddPoint_2D(arg1: OGRGeometryH, arg2: f64, arg3: f64); -} -extern "C" { - pub fn OGR_G_AddPointM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); -} -extern "C" { - pub fn OGR_G_AddPointZM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_6 { + pub nMarker1: libc::c_int, + pub nMarker2: libc::c_int, + pub nMarker3: libc::c_int, } -extern "C" { - pub fn OGR_G_SetPoints( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *const libc::c_void, - nXStride: libc::c_int, - pabyY: *const libc::c_void, - nYStride: libc::c_int, - pabyZ: *const libc::c_void, - nZStride: libc::c_int, +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_6() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) ); -} -extern "C" { - pub fn OGR_G_SetPointsZM( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *const libc::c_void, - nXStride: libc::c_int, - pabyY: *const libc::c_void, - nYStride: libc::c_int, - pabyZ: *const libc::c_void, - nZStride: libc::c_int, - pabyM: *const libc::c_void, - nMStride: libc::c_int, + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker3) + ) ); } -extern "C" { - pub fn OGR_G_SwapXY(hGeom: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_GetGeometryCount(arg1: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetGeometryRef(arg1: OGRGeometryH, arg2: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AddGeometry(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_AddGeometryDirectly(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_RemoveGeometry( - arg1: OGRGeometryH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_HasCurveGeometry( - arg1: OGRGeometryH, - bLookForNonLinear: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_GetLinearGeometry( - hGeom: OGRGeometryH, - dfMaxAngleStepSizeDegrees: f64, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_GetCurveGeometry( - hGeom: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGRBuildPolygonFromEdges( - hLinesAsCollection: OGRGeometryH, - bBestEffort: libc::c_int, - bAutoClose: libc::c_int, - dfTolerance: f64, - peErr: *mut OGRErr::Type, - ) -> OGRGeometryH; -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( - bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; -} -extern "C" { - #[doc = " @endcond"] - pub fn OGRSetNonLinearGeometriesEnabledFlag(bFlag: libc::c_int); -} -extern "C" { - pub fn OGRGetNonLinearGeometriesEnabledFlag() -> libc::c_int; -} -#[doc = " Opaque type for a field definition (OGRFieldDefn)"] -pub type OGRFieldDefnH = *mut libc::c_void; -#[doc = " Opaque type for a feature definition (OGRFeatureDefn)"] -pub type OGRFeatureDefnH = *mut libc::c_void; -#[doc = " Opaque type for a feature (OGRFeature)"] -pub type OGRFeatureH = *mut libc::c_void; -#[doc = " Opaque type for a style table (OGRStyleTable)"] -pub type OGRStyleTableH = *mut libc::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRGeomFieldDefnHS { - _unused: [u8; 0], -} -#[doc = " Opaque type for a geometry field definition (OGRGeomFieldDefn)"] -pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; -extern "C" { - pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_Fld_Destroy(arg1: OGRFieldDefnH); -} -extern "C" { - pub fn OGR_Fld_SetName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_Fld_GetNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Fld_GetType(arg1: OGRFieldDefnH) -> OGRFieldType::Type; -} -extern "C" { - pub fn OGR_Fld_SetType(arg1: OGRFieldDefnH, arg2: OGRFieldType::Type); -} -extern "C" { - pub fn OGR_Fld_GetSubType(arg1: OGRFieldDefnH) -> OGRFieldSubType::Type; -} -extern "C" { - pub fn OGR_Fld_SetSubType(arg1: OGRFieldDefnH, arg2: OGRFieldSubType::Type); -} -extern "C" { - pub fn OGR_Fld_GetJustify(arg1: OGRFieldDefnH) -> OGRJustification::Type; -} -extern "C" { - pub fn OGR_Fld_SetJustify(arg1: OGRFieldDefnH, arg2: OGRJustification::Type); -} -extern "C" { - pub fn OGR_Fld_GetWidth(arg1: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetWidth(arg1: OGRFieldDefnH, arg2: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_GetPrecision(arg1: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetPrecision(arg1: OGRFieldDefnH, arg2: libc::c_int); +pub struct OGRField__bindgen_ty_7 { + pub Year: GInt16, + pub Month: GByte, + pub Day: GByte, + pub Hour: GByte, + pub Minute: GByte, + pub TZFlag: GByte, + pub Reserved: GByte, + pub Second: f32, } -extern "C" { - pub fn OGR_Fld_Set( - arg1: OGRFieldDefnH, - arg2: *const libc::c_char, - arg3: OGRFieldType::Type, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: OGRJustification::Type, +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_7() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Year) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Month) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Day) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Hour) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Minute) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(TZFlag) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Reserved) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Second) + ) ); } -extern "C" { - pub fn OGR_Fld_IsIgnored(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetIgnored(hDefn: OGRFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_IsNullable(hDefn: OGRFieldDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_Fld_SetNullable(hDefn: OGRFieldDefnH, arg1: libc::c_int); -} -extern "C" { - pub fn OGR_Fld_GetDefault(hDefn: OGRFieldDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_Fld_SetDefault(hDefn: OGRFieldDefnH, arg1: *const libc::c_char); -} -extern "C" { - pub fn OGR_Fld_IsDefaultDriverSpecific(hDefn: OGRFieldDefnH) -> libc::c_int; +#[test] +fn bindgen_test_layout_OGRField() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer64) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Real) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(String) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(IntegerList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer64List) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(RealList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(StringList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Binary) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Set) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Date) + ) + ); } extern "C" { - pub fn OGR_GetFieldTypeName(arg1: OGRFieldType::Type) -> *const libc::c_char; + pub fn OGRParseDate( + pszInput: *const libc::c_char, + psOutput: *mut OGRField, + nOptions: libc::c_int, + ) -> libc::c_int; +} +pub mod ogr_style_tool_class_id { + #[doc = " OGRStyleTool derived class types (returned by GetType())."] + pub type Type = libc::c_uint; + #[doc = "< None"] + pub const OGRSTCNone: Type = 0; + #[doc = "< Pen"] + pub const OGRSTCPen: Type = 1; + #[doc = "< Brush"] + pub const OGRSTCBrush: Type = 2; + #[doc = "< Symbol"] + pub const OGRSTCSymbol: Type = 3; + #[doc = "< Label"] + pub const OGRSTCLabel: Type = 4; + #[doc = "< Vector"] + pub const OGRSTCVector: Type = 5; +} +#[doc = " OGRStyleTool derived class types (returned by GetType())."] +pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; +pub mod ogr_style_tool_units_id { + #[doc = " List of units supported by OGRStyleTools."] + pub type Type = libc::c_uint; + #[doc = "< Ground unit"] + pub const OGRSTUGround: Type = 0; + #[doc = "< Pixel"] + pub const OGRSTUPixel: Type = 1; + #[doc = "< Points"] + pub const OGRSTUPoints: Type = 2; + #[doc = "< Millimeter"] + pub const OGRSTUMM: Type = 3; + #[doc = "< Centimeter"] + pub const OGRSTUCM: Type = 4; + #[doc = "< Inch"] + pub const OGRSTUInches: Type = 5; } +#[doc = " List of units supported by OGRStyleTools."] +pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; extern "C" { - pub fn OGR_GetFieldSubTypeName(arg1: OGRFieldSubType::Type) -> *const libc::c_char; + pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; } extern "C" { - pub fn OGR_AreTypeSubTypeCompatible( - eType: OGRFieldType::Type, - eSubType: OGRFieldSubType::Type, + #[doc = " Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor."] + #[doc = ""] + #[doc = "The purpose of this method is to ensure that calling code will run with the GDAL"] + #[doc = "version it is compiled for. It is primarily indented for external plugins."] + #[doc = ""] + #[doc = "@param nVersionMajor Major version to be tested against"] + #[doc = "@param nVersionMinor Minor version to be tested against"] + #[doc = "@param pszCallingComponentName If not NULL, in case of version mismatch, the method"] + #[doc = "will issue a failure mentioning the name of"] + #[doc = "the calling component."] + pub fn GDALCheckVersion( + nVersionMajor: libc::c_int, + nVersionMinor: libc::c_int, + pszCallingComponentName: *const libc::c_char, ) -> libc::c_int; } +#[doc = " Opaque type for a geometry"] +pub type OGRGeometryH = *mut libc::c_void; +#[doc = " Opaque type for a spatial reference system"] +pub type OGRSpatialReferenceH = *mut libc::c_void; +#[doc = " Opaque type for a coordinate transformation object"] +pub type OGRCoordinateTransformationH = *mut libc::c_void; extern "C" { - pub fn OGR_GFld_Create( - arg1: *const libc::c_char, - arg2: OGRwkbGeometryType::Type, - ) -> OGRGeomFieldDefnH; + pub fn OGR_G_CreateFromWkb( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_GFld_Destroy(arg1: OGRGeomFieldDefnH); + pub fn OGR_G_CreateFromWkt( + arg1: *mut *mut libc::c_char, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_GFld_SetName(arg1: OGRGeomFieldDefnH, arg2: *const libc::c_char); + pub fn OGR_G_CreateFromFgf( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: libc::c_int, + arg5: *mut libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_GFld_GetNameRef(arg1: OGRGeomFieldDefnH) -> *const libc::c_char; + pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); } extern "C" { - pub fn OGR_GFld_GetType(arg1: OGRGeomFieldDefnH) -> OGRwkbGeometryType::Type; + pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; } extern "C" { - pub fn OGR_GFld_SetType(arg1: OGRGeomFieldDefnH, arg2: OGRwkbGeometryType::Type); + pub fn OGR_G_ApproximateArcAngles( + dfCenterX: f64, + dfCenterY: f64, + dfZ: f64, + dfPrimaryRadius: f64, + dfSecondaryAxis: f64, + dfRotation: f64, + dfStartAngle: f64, + dfEndAngle: f64, + dfMaxAngleStepSizeDegrees: f64, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_GFld_GetSpatialRef(arg1: OGRGeomFieldDefnH) -> OGRSpatialReferenceH; + pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_GFld_SetSpatialRef(arg1: OGRGeomFieldDefnH, hSRS: OGRSpatialReferenceH); + pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_GFld_IsNullable(hDefn: OGRGeomFieldDefnH) -> libc::c_int; + pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_GFld_SetNullable(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); + pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_GFld_IsIgnored(hDefn: OGRGeomFieldDefnH) -> libc::c_int; + pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_GFld_SetIgnored(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); + pub fn OGR_G_ForceTo( + hGeom: OGRGeometryH, + eTargetType: OGRwkbGeometryType::Type, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_FD_Create(arg1: *const libc::c_char) -> OGRFeatureDefnH; + pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_Destroy(arg1: OGRFeatureDefnH); + pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_Release(arg1: OGRFeatureDefnH); + pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_GetName(arg1: OGRFeatureDefnH) -> *const libc::c_char; + pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); } extern "C" { - pub fn OGR_FD_GetFieldCount(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_GetFieldDefn(arg1: OGRFeatureDefnH, arg2: libc::c_int) -> OGRFieldDefnH; + pub fn OGR_G_IsMeasured(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_GetFieldIndex(arg1: OGRFeatureDefnH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_G_Set3D(arg1: OGRGeometryH, arg2: libc::c_int); } extern "C" { - pub fn OGR_FD_AddFieldDefn(arg1: OGRFeatureDefnH, arg2: OGRFieldDefnH); + pub fn OGR_G_SetMeasured(arg1: OGRGeometryH, arg2: libc::c_int); } extern "C" { - pub fn OGR_FD_DeleteFieldDefn(hDefn: OGRFeatureDefnH, iField: libc::c_int) -> OGRErr::Type; + pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_FD_ReorderFieldDefns( - hDefn: OGRFeatureDefnH, - panMap: *mut libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); } extern "C" { - pub fn OGR_FD_GetGeomType(arg1: OGRFeatureDefnH) -> OGRwkbGeometryType::Type; + pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); } extern "C" { - pub fn OGR_FD_SetGeomType(arg1: OGRFeatureDefnH, arg2: OGRwkbGeometryType::Type); + pub fn OGR_G_ImportFromWkb( + arg1: OGRGeometryH, + arg2: *const libc::c_void, + arg3: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_FD_IsGeometryIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_ExportToWkb( + arg1: OGRGeometryH, + arg2: OGRwkbByteOrder::Type, + arg3: *mut libc::c_uchar, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_FD_SetGeometryIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); + pub fn OGR_G_ExportToIsoWkb( + arg1: OGRGeometryH, + arg2: OGRwkbByteOrder::Type, + arg3: *mut libc::c_uchar, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_FD_IsStyleIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_FD_SetStyleIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); + pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OGR_FD_Reference(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OGR_FD_Dereference(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OGR_FD_GetReferenceCount(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_FD_GetGeomFieldCount(hFDefn: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; } extern "C" { - pub fn OGR_FD_GetGeomFieldDefn(hFDefn: OGRFeatureDefnH, i: libc::c_int) -> OGRGeomFieldDefnH; + pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); } extern "C" { - pub fn OGR_FD_GetGeomFieldIndex( - hFDefn: OGRFeatureDefnH, - pszName: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); } extern "C" { - pub fn OGR_FD_AddGeomFieldDefn(hFDefn: OGRFeatureDefnH, hGFldDefn: OGRGeomFieldDefnH); + pub fn OGR_G_CloseRings(arg1: OGRGeometryH); } extern "C" { - pub fn OGR_FD_DeleteGeomFieldDefn( - hFDefn: OGRFeatureDefnH, - iGeomField: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; } extern "C" { - pub fn OGR_FD_IsSame(hFDefn: OGRFeatureDefnH, hOtherFDefn: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; } extern "C" { - pub fn OGR_F_Create(arg1: OGRFeatureDefnH) -> OGRFeatureH; + pub fn OGR_G_ExportToGMLEx( + arg1: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_F_Destroy(arg1: OGRFeatureH); + pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetDefnRef(arg1: OGRFeatureH) -> OGRFeatureDefnH; + pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_F_SetGeometryDirectly(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; + pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_F_SetGeometry(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; + pub fn OGR_G_ExportToKML( + arg1: OGRGeometryH, + pszAltitudeMode: *const libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_F_GetGeometryRef(arg1: OGRFeatureH) -> OGRGeometryH; + pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; } extern "C" { - pub fn OGR_F_StealGeometry(arg1: OGRFeatureH) -> OGRGeometryH; + pub fn OGR_G_ExportToJsonEx( + arg1: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_F_Clone(arg1: OGRFeatureH) -> OGRFeatureH; + #[doc = " Create a OGR geometry from a GeoJSON geometry object"] + pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_Equal(arg1: OGRFeatureH, arg2: OGRFeatureH) -> libc::c_int; + pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); } extern "C" { - pub fn OGR_F_GetFieldCount(arg1: OGRFeatureH) -> libc::c_int; + pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; } extern "C" { - pub fn OGR_F_GetFieldDefnRef(arg1: OGRFeatureH, arg2: libc::c_int) -> OGRFieldDefnH; + pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; } extern "C" { - pub fn OGR_F_GetFieldIndex(arg1: OGRFeatureH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - pub fn OGR_F_IsFieldSet(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; + pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_UnsetField(arg1: OGRFeatureH, arg2: libc::c_int); + pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_IsFieldNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; + pub fn OGR_G_DelaunayTriangulation( + hThis: OGRGeometryH, + dfTolerance: f64, + bOnlyEdges: libc::c_int, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_IsFieldSetAndNotNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; + pub fn OGR_G_Segmentize(hGeom: OGRGeometryH, dfMaxLength: f64); } extern "C" { - pub fn OGR_F_SetFieldNull(arg1: OGRFeatureH, arg2: libc::c_int); + pub fn OGR_G_Intersects(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetRawFieldRef(arg1: OGRFeatureH, arg2: libc::c_int) -> *mut OGRField; + pub fn OGR_G_Equals(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_RawField_IsUnset(arg1: *const OGRField) -> libc::c_int; + pub fn OGR_G_Disjoint(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_RawField_IsNull(arg1: *const OGRField) -> libc::c_int; + pub fn OGR_G_Touches(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_RawField_SetUnset(arg1: *mut OGRField); + pub fn OGR_G_Crosses(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_RawField_SetNull(arg1: *mut OGRField); + pub fn OGR_G_Within(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFieldAsInteger(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; + pub fn OGR_G_Contains(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFieldAsInteger64(arg1: OGRFeatureH, arg2: libc::c_int) -> GIntBig; + pub fn OGR_G_Overlaps(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFieldAsDouble(arg1: OGRFeatureH, arg2: libc::c_int) -> f64; + pub fn OGR_G_Boundary(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsString(arg1: OGRFeatureH, arg2: libc::c_int) -> *const libc::c_char; + pub fn OGR_G_ConvexHull(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const libc::c_int; + pub fn OGR_G_Buffer(arg1: OGRGeometryH, arg2: f64, arg3: libc::c_int) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const GIntBig; + pub fn OGR_G_Intersection(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const f64; + pub fn OGR_G_Union(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - ) -> *mut *mut libc::c_char; + pub fn OGR_G_UnionCascaded(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *mut GByte; + pub fn OGR_G_PointOnSurface(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - arg4: *mut libc::c_int, - arg5: *mut libc::c_int, - arg6: *mut libc::c_int, - arg7: *mut libc::c_int, - arg8: *mut libc::c_int, - arg9: *mut libc::c_int, - ) -> libc::c_int; + pub fn OGR_G_Difference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetFieldAsDateTimeEx( - hFeat: OGRFeatureH, - iField: libc::c_int, - pnYear: *mut libc::c_int, - pnMonth: *mut libc::c_int, - pnDay: *mut libc::c_int, - pnHour: *mut libc::c_int, - pnMinute: *mut libc::c_int, - pfSecond: *mut f32, - pnTZFlag: *mut libc::c_int, - ) -> libc::c_int; + pub fn OGR_G_SymDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_SetFieldInteger(arg1: OGRFeatureH, arg2: libc::c_int, arg3: libc::c_int); + pub fn OGR_G_Distance(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; } extern "C" { - pub fn OGR_F_SetFieldInteger64(arg1: OGRFeatureH, arg2: libc::c_int, arg3: GIntBig); + pub fn OGR_G_Distance3D(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; } extern "C" { - pub fn OGR_F_SetFieldDouble(arg1: OGRFeatureH, arg2: libc::c_int, arg3: f64); + pub fn OGR_G_Length(arg1: OGRGeometryH) -> f64; } extern "C" { - pub fn OGR_F_SetFieldString(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *const libc::c_char); + pub fn OGR_G_Area(arg1: OGRGeometryH) -> f64; } extern "C" { - pub fn OGR_F_SetFieldIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_int, - ); + pub fn OGR_G_Centroid(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_SetFieldInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const GIntBig, - ); + pub fn OGR_G_Value(arg1: OGRGeometryH, dfDistance: f64) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_SetFieldDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const f64, - ); + pub fn OGR_G_Empty(arg1: OGRGeometryH); } extern "C" { - pub fn OGR_F_SetFieldStringList(arg1: OGRFeatureH, arg2: libc::c_int, arg3: CSLConstList); + pub fn OGR_G_IsEmpty(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_SetFieldRaw(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *mut OGRField); + pub fn OGR_G_IsValid(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_SetFieldBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_void, - ); + pub fn OGR_G_MakeValid(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_SetFieldDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ); + pub fn OGR_G_IsSimple(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_SetFieldDateTimeEx( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: f32, - arg9: libc::c_int, - ); + pub fn OGR_G_IsRing(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetGeomFieldCount(hFeat: OGRFeatureH) -> libc::c_int; + pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_GetGeomFieldDefnRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeomFieldDefnH; + #[doc = " @cond Doxygen_Suppress"] + pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetGeomFieldIndex(hFeat: OGRFeatureH, pszName: *const libc::c_char) - -> libc::c_int; + pub fn OGR_G_Equal(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetGeomFieldRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeometryH; + pub fn OGR_G_SymmetricDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_F_SetGeomFieldDirectly( - hFeat: OGRFeatureH, - iField: libc::c_int, + pub fn OGR_G_GetArea(arg1: OGRGeometryH) -> f64; +} +extern "C" { + pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + #[doc = " @endcond"] + pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; +} +extern "C" { + pub fn OGR_G_GetPoints( hGeom: OGRGeometryH, - ) -> OGRErr::Type; + pabyX: *mut libc::c_void, + nXStride: libc::c_int, + pabyY: *mut libc::c_void, + nYStride: libc::c_int, + pabyZ: *mut libc::c_void, + nZStride: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_F_SetGeomField( - hFeat: OGRFeatureH, - iField: libc::c_int, + pub fn OGR_G_GetPointsZM( hGeom: OGRGeometryH, - ) -> OGRErr::Type; + pabyX: *mut libc::c_void, + nXStride: libc::c_int, + pabyY: *mut libc::c_void, + nYStride: libc::c_int, + pabyZ: *mut libc::c_void, + nZStride: libc::c_int, + pabyM: *mut libc::c_void, + nMStride: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_F_GetFID(arg1: OGRFeatureH) -> GIntBig; + pub fn OGR_G_GetX(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_F_SetFID(arg1: OGRFeatureH, arg2: GIntBig) -> OGRErr::Type; + pub fn OGR_G_GetY(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_F_DumpReadable(arg1: OGRFeatureH, arg2: *mut FILE); + pub fn OGR_G_GetZ(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_F_SetFrom(arg1: OGRFeatureH, arg2: OGRFeatureH, arg3: libc::c_int) -> OGRErr::Type; + pub fn OGR_G_GetM(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_F_SetFromWithMap( - arg1: OGRFeatureH, - arg2: OGRFeatureH, - arg3: libc::c_int, - arg4: *const libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_G_GetPoint( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: *mut f64, + arg3: *mut f64, + arg4: *mut f64, + ); } extern "C" { - pub fn OGR_F_GetStyleString(arg1: OGRFeatureH) -> *const libc::c_char; + pub fn OGR_G_GetPointZM( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: *mut f64, + arg3: *mut f64, + arg4: *mut f64, + arg5: *mut f64, + ); } extern "C" { - pub fn OGR_F_SetStyleString(arg1: OGRFeatureH, arg2: *const libc::c_char); + pub fn OGR_G_SetPointCount(hGeom: OGRGeometryH, nNewPointCount: libc::c_int); } extern "C" { - pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); + pub fn OGR_G_SetPoint(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64, arg4: f64); } extern "C" { - #[doc = " Return style table"] - pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; + pub fn OGR_G_SetPoint_2D(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64); } extern "C" { - #[doc = " Set style table and take ownership"] - pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); + pub fn OGR_G_SetPointM( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: f64, + arg3: f64, + arg4: f64, + ); } extern "C" { - #[doc = " Set style table"] - pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); + pub fn OGR_G_SetPointZM( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: f64, + arg3: f64, + arg4: f64, + arg5: f64, + ); } extern "C" { - pub fn OGR_F_GetNativeData(arg1: OGRFeatureH) -> *const libc::c_char; + pub fn OGR_G_AddPoint(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); } extern "C" { - pub fn OGR_F_SetNativeData(arg1: OGRFeatureH, arg2: *const libc::c_char); + pub fn OGR_G_AddPoint_2D(arg1: OGRGeometryH, arg2: f64, arg3: f64); } extern "C" { - pub fn OGR_F_GetNativeMediaType(arg1: OGRFeatureH) -> *const libc::c_char; + pub fn OGR_G_AddPointM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); } extern "C" { - pub fn OGR_F_SetNativeMediaType(arg1: OGRFeatureH, arg2: *const libc::c_char); + pub fn OGR_G_AddPointZM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); } extern "C" { - pub fn OGR_F_FillUnsetWithDefault( - hFeat: OGRFeatureH, - bNotNullableOnly: libc::c_int, - papszOptions: *mut *mut libc::c_char, + pub fn OGR_G_SetPoints( + hGeom: OGRGeometryH, + nPointsIn: libc::c_int, + pabyX: *const libc::c_void, + nXStride: libc::c_int, + pabyY: *const libc::c_void, + nYStride: libc::c_int, + pabyZ: *const libc::c_void, + nZStride: libc::c_int, ); } extern "C" { - pub fn OGR_F_Validate( - arg1: OGRFeatureH, - nValidateFlags: libc::c_int, - bEmitError: libc::c_int, - ) -> libc::c_int; + pub fn OGR_G_SetPointsZM( + hGeom: OGRGeometryH, + nPointsIn: libc::c_int, + pabyX: *const libc::c_void, + nXStride: libc::c_int, + pabyY: *const libc::c_void, + nYStride: libc::c_int, + pabyZ: *const libc::c_void, + nZStride: libc::c_int, + pabyM: *const libc::c_void, + nMStride: libc::c_int, + ); } -#[doc = " Opaque type for a layer (OGRLayer)"] -pub type OGRLayerH = *mut libc::c_void; -#[doc = " Opaque type for a OGR datasource (OGRDataSource)"] -pub type OGRDataSourceH = *mut libc::c_void; -#[doc = " Opaque type for a OGR driver (OGRSFDriver)"] -pub type OGRSFDriverH = *mut libc::c_void; extern "C" { - pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; + pub fn OGR_G_SwapXY(hGeom: OGRGeometryH); } extern "C" { - pub fn OGR_L_GetGeomType(arg1: OGRLayerH) -> OGRwkbGeometryType::Type; + pub fn OGR_G_GetGeometryCount(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_L_GetSpatialFilter(arg1: OGRLayerH) -> OGRGeometryH; + pub fn OGR_G_GetGeometryRef(arg1: OGRGeometryH, arg2: libc::c_int) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_SetSpatialFilter(arg1: OGRLayerH, arg2: OGRGeometryH); + pub fn OGR_G_AddGeometry(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_SetSpatialFilterRect(arg1: OGRLayerH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); + pub fn OGR_G_AddGeometryDirectly(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_SetSpatialFilterEx(arg1: OGRLayerH, iGeomField: libc::c_int, hGeom: OGRGeometryH); + pub fn OGR_G_RemoveGeometry( + arg1: OGRGeometryH, + arg2: libc::c_int, + arg3: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_SetSpatialFilterRectEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - dfMinX: f64, - dfMinY: f64, - dfMaxX: f64, - dfMaxY: f64, - ); + pub fn OGR_G_HasCurveGeometry( + arg1: OGRGeometryH, + bLookForNonLinear: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_L_SetAttributeFilter(arg1: OGRLayerH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OGR_G_GetLinearGeometry( + hGeom: OGRGeometryH, + dfMaxAngleStepSizeDegrees: f64, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_ResetReading(arg1: OGRLayerH); + pub fn OGR_G_GetCurveGeometry( + hGeom: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_GetNextFeature(arg1: OGRLayerH) -> OGRFeatureH; + pub fn OGRBuildPolygonFromEdges( + hLinesAsCollection: OGRGeometryH, + bBestEffort: libc::c_int, + bAutoClose: libc::c_int, + dfTolerance: f64, + peErr: *mut OGRErr::Type, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_SetNextByIndex(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; + #[doc = " @cond Doxygen_Suppress"] + pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( + bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_GetFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRFeatureH; + pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; } extern "C" { - pub fn OGR_L_SetFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; + #[doc = " @endcond"] + pub fn OGRSetNonLinearGeometriesEnabledFlag(bFlag: libc::c_int); } extern "C" { - pub fn OGR_L_CreateFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; + pub fn OGRGetNonLinearGeometriesEnabledFlag() -> libc::c_int; } +#[doc = " Opaque type for a field definition (OGRFieldDefn)"] +pub type OGRFieldDefnH = *mut libc::c_void; +#[doc = " Opaque type for a feature definition (OGRFeatureDefn)"] +pub type OGRFeatureDefnH = *mut libc::c_void; +#[doc = " Opaque type for a feature (OGRFeature)"] +pub type OGRFeatureH = *mut libc::c_void; +#[doc = " Opaque type for a style table (OGRStyleTable)"] +pub type OGRStyleTableH = *mut libc::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRGeomFieldDefnHS { + _unused: [u8; 0], +} +#[doc = " Opaque type for a geometry field definition (OGRGeomFieldDefn)"] +pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; extern "C" { - pub fn OGR_L_DeleteFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; + pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; } extern "C" { - pub fn OGR_L_GetLayerDefn(arg1: OGRLayerH) -> OGRFeatureDefnH; + pub fn OGR_Fld_Destroy(arg1: OGRFieldDefnH); } extern "C" { - pub fn OGR_L_GetSpatialRef(arg1: OGRLayerH) -> OGRSpatialReferenceH; + pub fn OGR_Fld_SetName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); } extern "C" { - pub fn OGR_L_FindFieldIndex( - arg1: OGRLayerH, - arg2: *const libc::c_char, - bExactMatch: libc::c_int, - ) -> libc::c_int; + pub fn OGR_Fld_GetNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; } extern "C" { - pub fn OGR_L_GetFeatureCount(arg1: OGRLayerH, arg2: libc::c_int) -> GIntBig; + pub fn OGR_Fld_GetType(arg1: OGRFieldDefnH) -> OGRFieldType::Type; } extern "C" { - pub fn OGR_L_GetExtent( - arg1: OGRLayerH, - arg2: *mut OGREnvelope, - arg3: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_Fld_SetType(arg1: OGRFieldDefnH, arg2: OGRFieldType::Type); } extern "C" { - pub fn OGR_L_GetExtentEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - psExtent: *mut OGREnvelope, - bForce: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_Fld_GetSubType(arg1: OGRFieldDefnH) -> OGRFieldSubType::Type; } extern "C" { - pub fn OGR_L_TestCapability(arg1: OGRLayerH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_Fld_SetSubType(arg1: OGRFieldDefnH, arg2: OGRFieldSubType::Type); } extern "C" { - pub fn OGR_L_CreateField( - arg1: OGRLayerH, - arg2: OGRFieldDefnH, - arg3: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_Fld_GetJustify(arg1: OGRFieldDefnH) -> OGRJustification::Type; } extern "C" { - pub fn OGR_L_CreateGeomField( - hLayer: OGRLayerH, - hFieldDefn: OGRGeomFieldDefnH, - bForce: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_Fld_SetJustify(arg1: OGRFieldDefnH, arg2: OGRJustification::Type); } extern "C" { - pub fn OGR_L_DeleteField(arg1: OGRLayerH, iField: libc::c_int) -> OGRErr::Type; + pub fn OGR_Fld_GetWidth(arg1: OGRFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_ReorderFields(arg1: OGRLayerH, panMap: *mut libc::c_int) -> OGRErr::Type; + pub fn OGR_Fld_SetWidth(arg1: OGRFieldDefnH, arg2: libc::c_int); } extern "C" { - pub fn OGR_L_ReorderField( - arg1: OGRLayerH, - iOldFieldPos: libc::c_int, - iNewFieldPos: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_Fld_GetPrecision(arg1: OGRFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_AlterFieldDefn( - arg1: OGRLayerH, - iField: libc::c_int, - hNewFieldDefn: OGRFieldDefnH, - nFlags: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_Fld_SetPrecision(arg1: OGRFieldDefnH, arg2: libc::c_int); } extern "C" { - pub fn OGR_L_StartTransaction(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_Fld_Set( + arg1: OGRFieldDefnH, + arg2: *const libc::c_char, + arg3: OGRFieldType::Type, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: OGRJustification::Type, + ); } extern "C" { - pub fn OGR_L_CommitTransaction(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_Fld_IsIgnored(hDefn: OGRFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_Fld_SetIgnored(hDefn: OGRFieldDefnH, arg1: libc::c_int); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; + pub fn OGR_Fld_IsNullable(hDefn: OGRFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_Dereference(arg1: OGRLayerH) -> libc::c_int; + pub fn OGR_Fld_SetNullable(hDefn: OGRFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; + pub fn OGR_Fld_GetDefault(hDefn: OGRFieldDefnH) -> *const libc::c_char; } extern "C" { - #[doc = " @endcond"] - pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_Fld_SetDefault(hDefn: OGRFieldDefnH, arg1: *const libc::c_char); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; + pub fn OGR_Fld_IsDefaultDriverSpecific(hDefn: OGRFieldDefnH) -> libc::c_int; } extern "C" { - #[doc = " @endcond"] - pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; + pub fn OGR_GetFieldTypeName(arg1: OGRFieldType::Type) -> *const libc::c_char; } extern "C" { - pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; + pub fn OGR_GetFieldSubTypeName(arg1: OGRFieldSubType::Type) -> *const libc::c_char; } extern "C" { - #[doc = " Get style table"] - pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; + pub fn OGR_AreTypeSubTypeCompatible( + eType: OGRFieldType::Type, + eSubType: OGRFieldSubType::Type, + ) -> libc::c_int; } extern "C" { - #[doc = " Set style table (and take ownership)"] - pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); + pub fn OGR_GFld_Create( + arg1: *const libc::c_char, + arg2: OGRwkbGeometryType::Type, + ) -> OGRGeomFieldDefnH; } extern "C" { - #[doc = " Set style table"] - pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); + pub fn OGR_GFld_Destroy(arg1: OGRGeomFieldDefnH); } extern "C" { - pub fn OGR_L_SetIgnoredFields(arg1: OGRLayerH, arg2: *mut *const libc::c_char) -> OGRErr::Type; + pub fn OGR_GFld_SetName(arg1: OGRGeomFieldDefnH, arg2: *const libc::c_char); } extern "C" { - pub fn OGR_L_Intersection( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_GFld_GetNameRef(arg1: OGRGeomFieldDefnH) -> *const libc::c_char; } extern "C" { - pub fn OGR_L_Union( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_GFld_GetType(arg1: OGRGeomFieldDefnH) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_L_SymDifference( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_GFld_SetType(arg1: OGRGeomFieldDefnH, arg2: OGRwkbGeometryType::Type); } extern "C" { - pub fn OGR_L_Identity( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_GFld_GetSpatialRef(arg1: OGRGeomFieldDefnH) -> OGRSpatialReferenceH; } extern "C" { - pub fn OGR_L_Update( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_GFld_SetSpatialRef(arg1: OGRGeomFieldDefnH, hSRS: OGRSpatialReferenceH); } extern "C" { - pub fn OGR_L_Clip( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_GFld_IsNullable(hDefn: OGRGeomFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_L_Erase( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_GFld_SetNullable(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn OGR_DS_Destroy(arg1: OGRDataSourceH); + pub fn OGR_GFld_IsIgnored(hDefn: OGRGeomFieldDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_DS_GetName(arg1: OGRDataSourceH) -> *const libc::c_char; + pub fn OGR_GFld_SetIgnored(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn OGR_DS_GetLayerCount(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_FD_Create(arg1: *const libc::c_char) -> OGRFeatureDefnH; } extern "C" { - pub fn OGR_DS_GetLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRLayerH; + pub fn OGR_FD_Destroy(arg1: OGRFeatureDefnH); } extern "C" { - pub fn OGR_DS_GetLayerByName(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> OGRLayerH; + pub fn OGR_FD_Release(arg1: OGRFeatureDefnH); } extern "C" { - pub fn OGR_DS_DeleteLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRErr::Type; + pub fn OGR_FD_GetName(arg1: OGRFeatureDefnH) -> *const libc::c_char; } extern "C" { - pub fn OGR_DS_GetDriver(arg1: OGRDataSourceH) -> OGRSFDriverH; + pub fn OGR_FD_GetFieldCount(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_DS_CreateLayer( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: *mut *mut libc::c_char, - ) -> OGRLayerH; + pub fn OGR_FD_GetFieldDefn(arg1: OGRFeatureDefnH, arg2: libc::c_int) -> OGRFieldDefnH; } extern "C" { - pub fn OGR_DS_CopyLayer( - arg1: OGRDataSourceH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRLayerH; + pub fn OGR_FD_GetFieldIndex(arg1: OGRFeatureDefnH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_DS_TestCapability(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_FD_AddFieldDefn(arg1: OGRFeatureDefnH, arg2: OGRFieldDefnH); } extern "C" { - pub fn OGR_DS_ExecuteSQL( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; + pub fn OGR_FD_DeleteFieldDefn(hDefn: OGRFeatureDefnH, iField: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); + pub fn OGR_FD_ReorderFieldDefns( + hDefn: OGRFeatureDefnH, + panMap: *mut libc::c_int, + ) -> OGRErr::Type; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_FD_GetGeomType(arg1: OGRFeatureDefnH) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_DS_Dereference(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_FD_SetGeomType(arg1: OGRFeatureDefnH, arg2: OGRwkbGeometryType::Type); } extern "C" { - pub fn OGR_DS_GetRefCount(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_FD_IsGeometryIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_FD_SetGeometryIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); } extern "C" { - #[doc = " @endcond */"] - pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; + pub fn OGR_FD_IsStyleIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - #[doc = " Get style table"] - pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; + pub fn OGR_FD_SetStyleIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); } extern "C" { - #[doc = " Set style table (and take ownership)"] - pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); + pub fn OGR_FD_Reference(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - #[doc = " Set style table"] - pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); + pub fn OGR_FD_Dereference(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_GetName(arg1: OGRSFDriverH) -> *const libc::c_char; + pub fn OGR_FD_GetReferenceCount(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_Open( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> OGRDataSourceH; + pub fn OGR_FD_GetGeomFieldCount(hFDefn: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_TestCapability(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_FD_GetGeomFieldDefn(hFDefn: OGRFeatureDefnH, i: libc::c_int) -> OGRGeomFieldDefnH; } extern "C" { - pub fn OGR_Dr_CreateDataSource( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> OGRDataSourceH; + pub fn OGR_FD_GetGeomFieldIndex( + hFDefn: OGRFeatureDefnH, + pszName: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_CopyDataSource( - arg1: OGRSFDriverH, - arg2: OGRDataSourceH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRDataSourceH; + pub fn OGR_FD_AddGeomFieldDefn(hFDefn: OGRFeatureDefnH, hGFldDefn: OGRGeomFieldDefnH); } extern "C" { - pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OGR_FD_DeleteGeomFieldDefn( + hFDefn: OGRFeatureDefnH, + iGeomField: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGROpen( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; + pub fn OGR_FD_IsSame(hFDefn: OGRFeatureDefnH, hOtherFDefn: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn OGROpenShared( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; + pub fn OGR_F_Create(arg1: OGRFeatureDefnH) -> OGRFeatureH; } extern "C" { - pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; + pub fn OGR_F_Destroy(arg1: OGRFeatureH); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRRegisterDriver(arg1: OGRSFDriverH); + pub fn OGR_F_GetDefnRef(arg1: OGRFeatureH) -> OGRFeatureDefnH; } extern "C" { - pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); + pub fn OGR_F_SetGeometryDirectly(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - #[doc = " @endcond"] - pub fn OGRGetDriverCount() -> libc::c_int; + pub fn OGR_F_SetGeometry(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; + pub fn OGR_F_GetGeometryRef(arg1: OGRFeatureH) -> OGRGeometryH; } extern "C" { - pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; + pub fn OGR_F_StealGeometry(arg1: OGRFeatureH) -> OGRGeometryH; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRGetOpenDSCount() -> libc::c_int; + pub fn OGR_F_Clone(arg1: OGRFeatureH) -> OGRFeatureH; } extern "C" { - pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; + pub fn OGR_F_Equal(arg1: OGRFeatureH, arg2: OGRFeatureH) -> libc::c_int; } extern "C" { - #[doc = " @endcond"] - pub fn OGRRegisterAll(); + pub fn OGR_F_GetFieldCount(arg1: OGRFeatureH) -> libc::c_int; } extern "C" { - #[doc = " Clean-up all drivers (including raster ones starting with GDAL 2.0."] - #[doc = " See GDALDestroyDriverManager()"] - pub fn OGRCleanupAll(); + pub fn OGR_F_GetFieldDefnRef(arg1: OGRFeatureH, arg2: libc::c_int) -> OGRFieldDefnH; } -#[doc = " Style manager opaque type"] -pub type OGRStyleMgrH = *mut libc::c_void; -#[doc = " Style tool opaque type"] -pub type OGRStyleToolH = *mut libc::c_void; extern "C" { - pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; + pub fn OGR_F_GetFieldIndex(arg1: OGRFeatureH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); + pub fn OGR_F_IsFieldSet(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; + pub fn OGR_F_UnsetField(arg1: OGRFeatureH, arg2: libc::c_int); } extern "C" { - pub fn OGR_SM_InitStyleString( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_F_IsFieldNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGR_SM_GetPartCount( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_F_IsFieldSetAndNotNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGR_SM_GetPart( - hSM: OGRStyleMgrH, - nPartId: libc::c_int, - pszStyleString: *const libc::c_char, - ) -> OGRStyleToolH; + pub fn OGR_F_SetFieldNull(arg1: OGRFeatureH, arg2: libc::c_int); } extern "C" { - pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; + pub fn OGR_F_GetRawFieldRef(arg1: OGRFeatureH, arg2: libc::c_int) -> *mut OGRField; } extern "C" { - pub fn OGR_SM_AddStyle( - hSM: OGRStyleMgrH, - pszStyleName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_RawField_IsUnset(arg1: *const OGRField) -> libc::c_int; } extern "C" { - pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; + pub fn OGR_RawField_IsNull(arg1: *const OGRField) -> libc::c_int; } extern "C" { - pub fn OGR_ST_Destroy(hST: OGRStyleToolH); + pub fn OGR_RawField_SetUnset(arg1: *mut OGRField); } extern "C" { - pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; + pub fn OGR_RawField_SetNull(arg1: *mut OGRField); } extern "C" { - pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; + pub fn OGR_F_GetFieldAsInteger(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); + pub fn OGR_F_GetFieldAsInteger64(arg1: OGRFeatureH, arg2: libc::c_int) -> GIntBig; } extern "C" { - pub fn OGR_ST_GetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> *const libc::c_char; + pub fn OGR_F_GetFieldAsDouble(arg1: OGRFeatureH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_ST_GetParamNum( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> libc::c_int; + pub fn OGR_F_GetFieldAsString(arg1: OGRFeatureH, arg2: libc::c_int) -> *const libc::c_char; } extern "C" { - pub fn OGR_ST_GetParamDbl( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> f64; + pub fn OGR_F_GetFieldAsIntegerList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *const libc::c_int; } extern "C" { - pub fn OGR_ST_SetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - pszValue: *const libc::c_char, - ); + pub fn OGR_F_GetFieldAsInteger64List( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *const GIntBig; } extern "C" { - pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); + pub fn OGR_F_GetFieldAsDoubleList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *const f64; } extern "C" { - pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); + pub fn OGR_F_GetFieldAsStringList( + arg1: OGRFeatureH, + arg2: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; + pub fn OGR_F_GetFieldAsBinary( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *mut GByte; } extern "C" { - pub fn OGR_ST_GetRGBFromString( - hST: OGRStyleToolH, - pszColor: *const libc::c_char, - pnRed: *mut libc::c_int, - pnGreen: *mut libc::c_int, - pnBlue: *mut libc::c_int, - pnAlpha: *mut libc::c_int, + pub fn OGR_F_GetFieldAsDateTime( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + arg4: *mut libc::c_int, + arg5: *mut libc::c_int, + arg6: *mut libc::c_int, + arg7: *mut libc::c_int, + arg8: *mut libc::c_int, + arg9: *mut libc::c_int, ) -> libc::c_int; } extern "C" { - pub fn OGR_STBL_Create() -> OGRStyleTableH; + pub fn OGR_F_GetFieldAsDateTimeEx( + hFeat: OGRFeatureH, + iField: libc::c_int, + pnYear: *mut libc::c_int, + pnMonth: *mut libc::c_int, + pnDay: *mut libc::c_int, + pnHour: *mut libc::c_int, + pnMinute: *mut libc::c_int, + pfSecond: *mut f32, + pnTZFlag: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); + pub fn OGR_F_SetFieldInteger(arg1: OGRFeatureH, arg2: libc::c_int, arg3: libc::c_int); } extern "C" { - pub fn OGR_STBL_AddStyle( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_F_SetFieldInteger64(arg1: OGRFeatureH, arg2: libc::c_int, arg3: GIntBig); } extern "C" { - pub fn OGR_STBL_SaveStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_F_SetFieldDouble(arg1: OGRFeatureH, arg2: libc::c_int, arg3: f64); } extern "C" { - pub fn OGR_STBL_LoadStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_F_SetFieldString(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *const libc::c_char); } extern "C" { - pub fn OGR_STBL_Find( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - ) -> *const libc::c_char; + pub fn OGR_F_SetFieldIntegerList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const libc::c_int, + ); } extern "C" { - pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); + pub fn OGR_F_SetFieldInteger64List( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const GIntBig, + ); } extern "C" { - pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; + pub fn OGR_F_SetFieldDoubleList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const f64, + ); } extern "C" { - pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; + pub fn OGR_F_SetFieldStringList(arg1: OGRFeatureH, arg2: libc::c_int, arg3: CSLConstList); } -pub mod GDALDataType { - #[doc = " Pixel data types"] - pub type Type = u32; - #[doc = " Unknown or unspecified type"] - pub const GDT_Unknown: Type = 0; - #[doc = " Eight bit unsigned integer"] - pub const GDT_Byte: Type = 1; - #[doc = " Sixteen bit unsigned integer"] - pub const GDT_UInt16: Type = 2; - #[doc = " Sixteen bit signed integer"] - pub const GDT_Int16: Type = 3; - #[doc = " Thirty two bit unsigned integer"] - pub const GDT_UInt32: Type = 4; - #[doc = " Thirty two bit signed integer"] - pub const GDT_Int32: Type = 5; - #[doc = " Thirty two bit floating point"] - pub const GDT_Float32: Type = 6; - #[doc = " Sixty four bit floating point"] - pub const GDT_Float64: Type = 7; - #[doc = " Complex Int16"] - pub const GDT_CInt16: Type = 8; - #[doc = " Complex Int32"] - pub const GDT_CInt32: Type = 9; - #[doc = " Complex Float32"] - pub const GDT_CFloat32: Type = 10; - #[doc = " Complex Float64"] - pub const GDT_CFloat64: Type = 11; - #[doc = " Complex Float64"] - pub const GDT_TypeCount: Type = 12; +extern "C" { + pub fn OGR_F_SetFieldRaw(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *mut OGRField); } extern "C" { - pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_SetFieldBinary( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const libc::c_void, + ); } extern "C" { - pub fn GDALGetDataTypeSizeBits(eDataType: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_SetFieldDateTime( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: libc::c_int, + arg9: libc::c_int, + ); } extern "C" { - pub fn GDALGetDataTypeSizeBytes(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_SetFieldDateTimeEx( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: f32, + arg9: libc::c_int, + ); } extern "C" { - pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_GetGeomFieldCount(hFeat: OGRFeatureH) -> libc::c_int; } extern "C" { - pub fn GDALDataTypeIsInteger(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_GetGeomFieldDefnRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeomFieldDefnH; } extern "C" { - pub fn GDALDataTypeIsFloating(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_GetGeomFieldIndex(hFeat: OGRFeatureH, pszName: *const libc::c_char) + -> libc::c_int; } extern "C" { - pub fn GDALDataTypeIsSigned(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_F_GetGeomFieldRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeometryH; } extern "C" { - pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; + pub fn OGR_F_SetGeomFieldDirectly( + hFeat: OGRFeatureH, + iField: libc::c_int, + hGeom: OGRGeometryH, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; + pub fn OGR_F_SetGeomField( + hFeat: OGRFeatureH, + iField: libc::c_int, + hGeom: OGRGeometryH, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDataTypeUnion( - arg1: GDALDataType::Type, - arg2: GDALDataType::Type, - ) -> GDALDataType::Type; + pub fn OGR_F_GetFID(arg1: OGRFeatureH) -> GIntBig; } extern "C" { - pub fn GDALDataTypeUnionWithValue( - eDT: GDALDataType::Type, - dValue: f64, - bComplex: libc::c_int, - ) -> GDALDataType::Type; + pub fn OGR_F_SetFID(arg1: OGRFeatureH, arg2: GIntBig) -> OGRErr::Type; } extern "C" { - pub fn GDALFindDataType( - nBits: libc::c_int, - bSigned: libc::c_int, - bFloating: libc::c_int, - bComplex: libc::c_int, - ) -> GDALDataType::Type; + pub fn OGR_F_DumpReadable(arg1: OGRFeatureH, arg2: *mut FILE); } extern "C" { - pub fn GDALFindDataTypeForValue(dValue: f64, bComplex: libc::c_int) -> GDALDataType::Type; + pub fn OGR_F_SetFrom(arg1: OGRFeatureH, arg2: OGRFeatureH, arg3: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALAdjustValueToDataType( - eDT: GDALDataType::Type, - dfValue: f64, - pbClamped: *mut libc::c_int, - pbRounded: *mut libc::c_int, - ) -> f64; + pub fn OGR_F_SetFromWithMap( + arg1: OGRFeatureH, + arg2: OGRFeatureH, + arg3: libc::c_int, + arg4: *const libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetNonComplexDataType(arg1: GDALDataType::Type) -> GDALDataType::Type; + pub fn OGR_F_GetStyleString(arg1: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn GDALDataTypeIsConversionLossy( - eTypeFrom: GDALDataType::Type, - eTypeTo: GDALDataType::Type, - ) -> libc::c_int; + pub fn OGR_F_SetStyleString(arg1: OGRFeatureH, arg2: *const libc::c_char); } -pub mod GDALAsyncStatusType { - #[doc = " status of the asynchronous stream"] - pub type Type = u32; - pub const GARIO_PENDING: Type = 0; - pub const GARIO_UPDATE: Type = 1; - pub const GARIO_ERROR: Type = 2; - pub const GARIO_COMPLETE: Type = 3; - pub const GARIO_TypeCount: Type = 4; +extern "C" { + pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); } extern "C" { - pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; + #[doc = " Return style table"] + pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; } extern "C" { - pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; + #[doc = " Set style table and take ownership"] + pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); } -pub mod GDALAccess { - #[doc = " Flag indicating read/write, or read-only access to data."] - pub type Type = u32; - #[doc = " Read only (no update) access"] - pub const GA_ReadOnly: Type = 0; - #[doc = " Read/write access."] - pub const GA_Update: Type = 1; +extern "C" { + #[doc = " Set style table"] + pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); } -pub mod GDALRWFlag { - #[doc = " Read/Write flag for RasterIO() method"] - pub type Type = u32; - #[doc = " Read data"] - pub const GF_Read: Type = 0; - #[doc = " Write data"] - pub const GF_Write: Type = 1; +extern "C" { + pub fn OGR_F_GetNativeData(arg1: OGRFeatureH) -> *const libc::c_char; } -pub mod GDALRIOResampleAlg { - #[doc = " RasterIO() resampling method."] - #[doc = " @since GDAL 2.0"] - pub type Type = u32; - #[doc = " Nearest neighbour"] - pub const GRIORA_NearestNeighbour: Type = 0; - #[doc = " Bilinear (2x2 kernel)"] - pub const GRIORA_Bilinear: Type = 1; - #[doc = " Cubic Convolution Approximation (4x4 kernel)"] - pub const GRIORA_Cubic: Type = 2; - #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] - pub const GRIORA_CubicSpline: Type = 3; - #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] - pub const GRIORA_Lanczos: Type = 4; - #[doc = " Average"] - pub const GRIORA_Average: Type = 5; - #[doc = " Mode (selects the value which appears most often of all the sampled points)"] - pub const GRIORA_Mode: Type = 6; - #[doc = " Gauss blurring"] - pub const GRIORA_Gauss: Type = 7; +extern "C" { + pub fn OGR_F_SetNativeData(arg1: OGRFeatureH, arg2: *const libc::c_char); } -#[doc = " Structure to pass extra arguments to RasterIO() method"] -#[doc = " @since GDAL 2.0"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRasterIOExtraArg { - #[doc = " Version of structure (to allow future extensions of the structure)"] - pub nVersion: libc::c_int, - #[doc = " Resampling algorithm"] - pub eResampleAlg: GDALRIOResampleAlg::Type, - #[doc = " Progress callback"] - pub pfnProgress: GDALProgressFunc, - #[doc = " Progress callback user data"] - pub pProgressData: *mut libc::c_void, - #[doc = " Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set."] - #[doc = "Mostly reserved from the VRT driver to communicate a more precise"] - #[doc = "source window. Must be such that dfXOff - nXOff < 1.0 and"] - #[doc = "dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize < 1.0"] - pub bFloatingPointWindowValidity: libc::c_int, - #[doc = " Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfXOff: f64, - #[doc = " Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfYOff: f64, - #[doc = " Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfXSize: f64, - #[doc = " Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfYSize: f64, +extern "C" { + pub fn OGR_F_GetNativeMediaType(arg1: OGRFeatureH) -> *const libc::c_char; } -#[test] -fn bindgen_test_layout_GDALRasterIOExtraArg() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(nVersion) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnProgress as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pProgressData as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pProgressData) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bFloatingPointWindowValidity - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(bFloatingPointWindowValidity) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYSize) - ) +extern "C" { + pub fn OGR_F_SetNativeMediaType(arg1: OGRFeatureH, arg2: *const libc::c_char); +} +extern "C" { + pub fn OGR_F_FillUnsetWithDefault( + hFeat: OGRFeatureH, + bNotNullableOnly: libc::c_int, + papszOptions: *mut *mut libc::c_char, ); } -pub mod GDALColorInterp { - #[doc = " Types of color interpretation for raster bands."] - pub type Type = u32; - #[doc = " Undefined"] - pub const GCI_Undefined: Type = 0; - #[doc = " Greyscale"] - pub const GCI_GrayIndex: Type = 1; - #[doc = " Paletted (see associated color table)"] - pub const GCI_PaletteIndex: Type = 2; - #[doc = " Red band of RGBA image"] - pub const GCI_RedBand: Type = 3; - #[doc = " Green band of RGBA image"] - pub const GCI_GreenBand: Type = 4; - #[doc = " Blue band of RGBA image"] - pub const GCI_BlueBand: Type = 5; - #[doc = " Alpha (0=transparent, 255=opaque)"] - pub const GCI_AlphaBand: Type = 6; - #[doc = " Hue band of HLS image"] - pub const GCI_HueBand: Type = 7; - #[doc = " Saturation band of HLS image"] - pub const GCI_SaturationBand: Type = 8; - #[doc = " Lightness band of HLS image"] - pub const GCI_LightnessBand: Type = 9; - #[doc = " Cyan band of CMYK image"] - pub const GCI_CyanBand: Type = 10; - #[doc = " Magenta band of CMYK image"] - pub const GCI_MagentaBand: Type = 11; - #[doc = " Yellow band of CMYK image"] - pub const GCI_YellowBand: Type = 12; - #[doc = " Black band of CMLY image"] - pub const GCI_BlackBand: Type = 13; - #[doc = " Y Luminance"] - pub const GCI_YCbCr_YBand: Type = 14; - #[doc = " Cb Chroma"] - pub const GCI_YCbCr_CbBand: Type = 15; - #[doc = " Cr Chroma"] - pub const GCI_YCbCr_CrBand: Type = 16; - #[doc = " Max current value (equals to GCI_YCbCr_CrBand currently)"] - pub const GCI_Max: Type = 16; +extern "C" { + pub fn OGR_F_Validate( + arg1: OGRFeatureH, + nValidateFlags: libc::c_int, + bEmitError: libc::c_int, + ) -> libc::c_int; } +#[doc = " Opaque type for a layer (OGRLayer)"] +pub type OGRLayerH = *mut libc::c_void; +#[doc = " Opaque type for a OGR datasource (OGRDataSource)"] +pub type OGRDataSourceH = *mut libc::c_void; +#[doc = " Opaque type for a OGR driver (OGRSFDriver)"] +pub type OGRSFDriverH = *mut libc::c_void; extern "C" { - pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; + pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; + pub fn OGR_L_GetGeomType(arg1: OGRLayerH) -> OGRwkbGeometryType::Type; } -pub mod GDALPaletteInterp { - #[doc = " Types of color interpretations for a GDALColorTable."] - pub type Type = u32; - #[doc = " Grayscale (in GDALColorEntry.c1)"] - pub const GPI_Gray: Type = 0; - #[doc = " Red, Green, Blue and Alpha in (in c1, c2, c3 and c4)"] - pub const GPI_RGB: Type = 1; - #[doc = " Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)"] - pub const GPI_CMYK: Type = 2; - #[doc = " Hue, Lightness and Saturation (in c1, c2, and c3)"] - pub const GPI_HLS: Type = 3; +extern "C" { + pub fn OGR_L_GetSpatialFilter(arg1: OGRLayerH) -> OGRGeometryH; } extern "C" { - pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; + pub fn OGR_L_SetSpatialFilter(arg1: OGRLayerH, arg2: OGRGeometryH); } -#[doc = " Opaque type used for the C bindings of the C++ GDALMajorObject class"] -pub type GDALMajorObjectH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALDataset class"] -pub type GDALDatasetH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALRasterBand class"] -pub type GDALRasterBandH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALDriver class"] -pub type GDALDriverH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALColorTable class"] -pub type GDALColorTableH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class"] -pub type GDALRasterAttributeTableH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALAsyncReader class"] -pub type GDALAsyncReaderH = *mut libc::c_void; -#[doc = " Type to express pixel, line or band spacing. Signed 64 bit integer."] -pub type GSpacing = GIntBig; extern "C" { - pub fn GDALAllRegister(); + pub fn OGR_L_SetSpatialFilterRect(arg1: OGRLayerH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); } extern "C" { - pub fn GDALCreate( - hDriver: GDALDriverH, - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: GDALDataType::Type, - arg6: CSLConstList, - ) -> GDALDatasetH; + pub fn OGR_L_SetSpatialFilterEx(arg1: OGRLayerH, iGeomField: libc::c_int, hGeom: OGRGeometryH); } extern "C" { - pub fn GDALCreateCopy( - arg1: GDALDriverH, + pub fn OGR_L_SetSpatialFilterRectEx( + arg1: OGRLayerH, + iGeomField: libc::c_int, + dfMinX: f64, + dfMinY: f64, + dfMaxX: f64, + dfMaxY: f64, + ); +} +extern "C" { + pub fn OGR_L_SetAttributeFilter(arg1: OGRLayerH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_L_ResetReading(arg1: OGRLayerH); +} +extern "C" { + pub fn OGR_L_GetNextFeature(arg1: OGRLayerH) -> OGRFeatureH; +} +extern "C" { + pub fn OGR_L_SetNextByIndex(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_L_GetFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRFeatureH; +} +extern "C" { + pub fn OGR_L_SetFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_L_CreateFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_L_DeleteFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_L_GetLayerDefn(arg1: OGRLayerH) -> OGRFeatureDefnH; +} +extern "C" { + pub fn OGR_L_GetSpatialRef(arg1: OGRLayerH) -> OGRSpatialReferenceH; +} +extern "C" { + pub fn OGR_L_FindFieldIndex( + arg1: OGRLayerH, arg2: *const libc::c_char, - arg3: GDALDatasetH, - arg4: libc::c_int, - arg5: CSLConstList, - arg6: GDALProgressFunc, - arg7: *mut libc::c_void, - ) -> GDALDatasetH; + bExactMatch: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALIdentifyDriver( - pszFilename: *const libc::c_char, - papszFileList: CSLConstList, - ) -> GDALDriverH; + pub fn OGR_L_GetFeatureCount(arg1: OGRLayerH, arg2: libc::c_int) -> GIntBig; } extern "C" { - pub fn GDALIdentifyDriverEx( - pszFilename: *const libc::c_char, - nIdentifyFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszFileList: *const *const libc::c_char, - ) -> GDALDriverH; + pub fn OGR_L_GetExtent( + arg1: OGRLayerH, + arg2: *mut OGREnvelope, + arg3: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; + pub fn OGR_L_GetExtentEx( + arg1: OGRLayerH, + iGeomField: libc::c_int, + psExtent: *mut OGREnvelope, + bForce: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; + pub fn OGR_L_TestCapability(arg1: OGRLayerH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALOpenEx( - pszFilename: *const libc::c_char, - nOpenFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszOpenOptions: *const *const libc::c_char, - papszSiblingFiles: *const *const libc::c_char, - ) -> GDALDatasetH; + pub fn OGR_L_CreateField( + arg1: OGRLayerH, + arg2: OGRFieldDefnH, + arg3: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; + pub fn OGR_L_CreateGeomField( + hLayer: OGRLayerH, + hFieldDefn: OGRGeomFieldDefnH, + bForce: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; + pub fn OGR_L_DeleteField(arg1: OGRLayerH, iField: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDriverCount() -> libc::c_int; + pub fn OGR_L_ReorderFields(arg1: OGRLayerH, panMap: *mut libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; + pub fn OGR_L_ReorderField( + arg1: OGRLayerH, + iOldFieldPos: libc::c_int, + iNewFieldPos: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALCreateDriver() -> GDALDriverH; + pub fn OGR_L_AlterFieldDefn( + arg1: OGRLayerH, + iField: libc::c_int, + hNewFieldDefn: OGRFieldDefnH, + nFlags: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDestroyDriver(arg1: GDALDriverH); + pub fn OGR_L_StartTransaction(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; + pub fn OGR_L_CommitTransaction(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALDeregisterDriver(arg1: GDALDriverH); + pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALDestroyDriverManager(); + #[doc = " @cond Doxygen_Suppress"] + pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; } extern "C" { - pub fn GDALDestroy(); + pub fn OGR_L_Dereference(arg1: OGRLayerH) -> libc::c_int; } extern "C" { - pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; + pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; } extern "C" { - pub fn GDALRenameDataset( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; + #[doc = " @endcond"] + pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALCopyDatasetFiles( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; + #[doc = " @cond Doxygen_Suppress"] + pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; } extern "C" { - pub fn GDALValidateCreationOptions( - arg1: GDALDriverH, - papszCreationOptions: CSLConstList, - ) -> libc::c_int; + #[doc = " @endcond"] + pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; + pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; + #[doc = " Get style table"] + pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; } extern "C" { - pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; + #[doc = " Set style table (and take ownership)"] + pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; + #[doc = " Set style table"] + pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); } -#[doc = " Ground Control Point"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDAL_GCP { - #[doc = " Unique identifier, often numeric"] - pub pszId: *mut libc::c_char, - #[doc = " Informational message or \"\""] - pub pszInfo: *mut libc::c_char, - #[doc = " Pixel (x) location of GCP on raster"] - pub dfGCPPixel: f64, - #[doc = " Line (y) location of GCP on raster"] - pub dfGCPLine: f64, - #[doc = " X position of GCP in georeferenced space"] - pub dfGCPX: f64, - #[doc = " Y position of GCP in georeferenced space"] - pub dfGCPY: f64, - #[doc = " Elevation of GCP, or zero if not known"] - pub dfGCPZ: f64, +extern "C" { + pub fn OGR_L_SetIgnoredFields(arg1: OGRLayerH, arg2: *mut *const libc::c_char) -> OGRErr::Type; } -#[test] -fn bindgen_test_layout_GDAL_GCP() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(GDAL_GCP)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDAL_GCP)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszId) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszInfo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPPixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPLine) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPZ) - ) - ); +extern "C" { + pub fn OGR_L_Intersection( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); + pub fn OGR_L_Union( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); + pub fn OGR_L_SymDifference( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; + pub fn OGR_L_Identity( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGCPsToGeoTransform( - nGCPCount: libc::c_int, - pasGCPs: *const GDAL_GCP, - padfGeoTransform: *mut f64, - bApproxOK: libc::c_int, - ) -> libc::c_int; + pub fn OGR_L_Update( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALInvGeoTransform( - padfGeoTransformIn: *mut f64, - padfInvGeoTransformOut: *mut f64, - ) -> libc::c_int; + pub fn OGR_L_Clip( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALApplyGeoTransform( - arg1: *mut f64, - arg2: f64, - arg3: f64, - arg4: *mut f64, - arg5: *mut f64, - ); + pub fn OGR_L_Erase( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALComposeGeoTransforms( - padfGeoTransform1: *const f64, - padfGeoTransform2: *const f64, - padfGeoTransformOut: *mut f64, - ); + pub fn OGR_DS_Destroy(arg1: OGRDataSourceH); } extern "C" { - pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; + pub fn OGR_DS_GetName(arg1: OGRDataSourceH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetMetadata( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - ) -> *mut *mut libc::c_char; + pub fn OGR_DS_GetLayerCount(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALSetMetadata( - arg1: GDALMajorObjectH, - arg2: CSLConstList, - arg3: *const libc::c_char, - ) -> CPLErr::Type; + pub fn OGR_DS_GetLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRLayerH; } extern "C" { - pub fn GDALGetMetadataItem( - arg1: GDALMajorObjectH, + pub fn OGR_DS_GetLayerByName(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> OGRLayerH; +} +extern "C" { + pub fn OGR_DS_DeleteLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_DS_GetDriver(arg1: OGRDataSourceH) -> OGRSFDriverH; +} +extern "C" { + pub fn OGR_DS_CreateLayer( + arg1: OGRDataSourceH, arg2: *const libc::c_char, + arg3: OGRSpatialReferenceH, + arg4: OGRwkbGeometryType::Type, + arg5: *mut *mut libc::c_char, + ) -> OGRLayerH; +} +extern "C" { + pub fn OGR_DS_CopyLayer( + arg1: OGRDataSourceH, + arg2: OGRLayerH, arg3: *const libc::c_char, - ) -> *const libc::c_char; + arg4: *mut *mut libc::c_char, + ) -> OGRLayerH; } extern "C" { - pub fn GDALSetMetadataItem( - arg1: GDALMajorObjectH, + pub fn OGR_DS_TestCapability(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> libc::c_int; +} +extern "C" { + pub fn OGR_DS_ExecuteSQL( + arg1: OGRDataSourceH, arg2: *const libc::c_char, - arg3: *const libc::c_char, + arg3: OGRGeometryH, arg4: *const libc::c_char, - ) -> CPLErr::Type; + ) -> OGRLayerH; } extern "C" { - pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; + pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); } extern "C" { - pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); + #[doc = " @cond Doxygen_Suppress"] + pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; + pub fn OGR_DS_Dereference(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; + pub fn OGR_DS_GetRefCount(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALClose(arg1: GDALDatasetH); + pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; + #[doc = " @endcond */"] + pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; } extern "C" { - pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; + #[doc = " Get style table"] + pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; } extern "C" { - pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; + #[doc = " Set style table (and take ownership)"] + pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; + #[doc = " Set style table"] + pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALAddBand( - hDS: GDALDatasetH, - eType: GDALDataType::Type, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + pub fn OGR_Dr_GetName(arg1: OGRSFDriverH) -> *const libc::c_char; } extern "C" { - pub fn GDALBeginAsyncReader( - hDS: GDALDatasetH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - pBuf: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - papszOptions: CSLConstList, - ) -> GDALAsyncReaderH; + pub fn OGR_Dr_Open( + arg1: OGRSFDriverH, + arg2: *const libc::c_char, + arg3: libc::c_int, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); + pub fn OGR_Dr_TestCapability(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALDatasetRasterIO( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALDatasetRasterIOEx( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - nBandSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; + pub fn OGR_Dr_CreateDataSource( + arg1: OGRSFDriverH, + arg2: *const libc::c_char, + arg3: *mut *mut libc::c_char, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALDatasetAdviseRead( - hDS: GDALDatasetH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + pub fn OGR_Dr_CopyDataSource( + arg1: OGRSFDriverH, + arg2: OGRDataSourceH, + arg3: *const libc::c_char, + arg4: *mut *mut libc::c_char, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; + pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn GDALGetSpatialRef(arg1: GDALDatasetH) -> OGRSpatialReferenceH; + pub fn OGROpen( + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: *mut OGRSFDriverH, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; + pub fn OGROpenShared( + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: *mut OGRSFDriverH, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALSetSpatialRef(arg1: GDALDatasetH, arg2: OGRSpatialReferenceH) -> CPLErr::Type; + pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; } extern "C" { - pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; + #[doc = " @cond Doxygen_Suppress"] + pub fn OGRRegisterDriver(arg1: OGRSFDriverH); } extern "C" { - pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; + pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); } extern "C" { - pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; + #[doc = " @endcond"] + pub fn OGRGetDriverCount() -> libc::c_int; } extern "C" { - pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; + pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; } extern "C" { - pub fn GDALGetGCPSpatialRef(arg1: GDALDatasetH) -> OGRSpatialReferenceH; + pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; } extern "C" { - pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; + #[doc = " @cond Doxygen_Suppress"] + pub fn OGRGetOpenDSCount() -> libc::c_int; } extern "C" { - pub fn GDALSetGCPs( - arg1: GDALDatasetH, - arg2: libc::c_int, - arg3: *const GDAL_GCP, - arg4: *const libc::c_char, - ) -> CPLErr::Type; + pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; } extern "C" { - pub fn GDALSetGCPs2( - arg1: GDALDatasetH, - arg2: libc::c_int, - arg3: *const GDAL_GCP, - arg4: OGRSpatialReferenceH, - ) -> CPLErr::Type; + #[doc = " @endcond"] + pub fn OGRRegisterAll(); } extern "C" { - pub fn GDALGetInternalHandle( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - ) -> *mut libc::c_void; + #[doc = " Clean-up all drivers (including raster ones starting with GDAL 2.0."] + #[doc = " See GDALDestroyDriverManager()"] + pub fn OGRCleanupAll(); } +#[doc = " Style manager opaque type"] +pub type OGRStyleMgrH = *mut libc::c_void; +#[doc = " Style tool opaque type"] +pub type OGRStyleToolH = *mut libc::c_void; extern "C" { - pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; } extern "C" { - pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); } extern "C" { - pub fn GDALReleaseDataset(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn GDALBuildOverviews( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: libc::c_int, - arg4: *mut libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_int, - arg7: GDALProgressFunc, - arg8: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_SM_InitStyleString( + hSM: OGRStyleMgrH, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); + pub fn OGR_SM_GetPartCount( + hSM: OGRStyleMgrH, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; + pub fn OGR_SM_GetPart( + hSM: OGRStyleMgrH, + nPartId: libc::c_int, + pszStyleString: *const libc::c_char, + ) -> OGRStyleToolH; } extern "C" { - pub fn GDALFlushCache(hDS: GDALDatasetH); + pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; } extern "C" { - pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; + pub fn OGR_SM_AddStyle( + hSM: OGRStyleMgrH, + pszStyleName: *const libc::c_char, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetCopyWholeRaster( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: CSLConstList, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; } extern "C" { - pub fn GDALRasterBandCopyWholeRaster( - hSrcBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - constpapszOptions: *const *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_ST_Destroy(hST: OGRStyleToolH); } extern "C" { - pub fn GDALRegenerateOverviews( - hSrcBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviewBands: *mut GDALRasterBandH, - pszResampling: *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; } extern "C" { - pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; } extern "C" { - pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; + pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); } extern "C" { - pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; + pub fn OGR_ST_GetParamStr( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; + pub fn OGR_ST_GetParamNum( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetCreateLayer( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: CSLConstList, - ) -> OGRLayerH; + pub fn OGR_ST_GetParamDbl( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> f64; } extern "C" { - pub fn GDALDatasetCopyLayer( - arg1: GDALDatasetH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: CSLConstList, - ) -> OGRLayerH; + pub fn OGR_ST_SetParamStr( + hST: OGRStyleToolH, + eParam: libc::c_int, + pszValue: *const libc::c_char, + ); } extern "C" { - pub fn GDALDatasetResetReading(arg1: GDALDatasetH); + pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); } extern "C" { - pub fn GDALDatasetGetNextFeature( - hDS: GDALDatasetH, - phBelongingLayer: *mut OGRLayerH, - pdfProgressPct: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> OGRFeatureH; + pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); } extern "C" { - pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; } extern "C" { - pub fn GDALDatasetExecuteSQL( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; + pub fn OGR_ST_GetRGBFromString( + hST: OGRStyleToolH, + pszColor: *const libc::c_char, + pnRed: *mut libc::c_int, + pnGreen: *mut libc::c_int, + pnBlue: *mut libc::c_int, + pnAlpha: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); + pub fn OGR_STBL_Create() -> OGRStyleTableH; } extern "C" { - pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; + pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); } extern "C" { - pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); + pub fn OGR_STBL_AddStyle( + hStyleTable: OGRStyleTableH, + pszName: *const libc::c_char, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); + pub fn OGR_STBL_SaveStyleTable( + hStyleTable: OGRStyleTableH, + pszFilename: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; + pub fn OGR_STBL_LoadStyleTable( + hStyleTable: OGRStyleTableH, + pszFilename: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; + pub fn OGR_STBL_Find( + hStyleTable: OGRStyleTableH, + pszName: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; + pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); } -#[doc = " Type of functions to pass to GDALAddDerivedBandPixelFunc."] -#[doc = " @since GDAL 2.2"] -pub type GDALDerivedPixelFunc = ::std::option::Option< - unsafe extern "C" fn( - papoSources: *mut *mut libc::c_void, - nSources: libc::c_int, - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eSrcType: GDALDataType::Type, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type, ->; extern "C" { - pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; + pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetBlockSize( - arg1: GDALRasterBandH, - pnXSize: *mut libc::c_int, - pnYSize: *mut libc::c_int, - ); + pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; } -extern "C" { - pub fn GDALGetActualBlockSize( - arg1: GDALRasterBandH, - nXBlockOff: libc::c_int, - nYBlockOff: libc::c_int, - pnXValid: *mut libc::c_int, - pnYValid: *mut libc::c_int, - ) -> CPLErr::Type; +pub mod GDALDataType { + #[doc = " Pixel data types"] + pub type Type = libc::c_uint; + #[doc = " Unknown or unspecified type"] + pub const GDT_Unknown: Type = 0; + #[doc = " Eight bit unsigned integer"] + pub const GDT_Byte: Type = 1; + #[doc = " Sixteen bit unsigned integer"] + pub const GDT_UInt16: Type = 2; + #[doc = " Sixteen bit signed integer"] + pub const GDT_Int16: Type = 3; + #[doc = " Thirty two bit unsigned integer"] + pub const GDT_UInt32: Type = 4; + #[doc = " Thirty two bit signed integer"] + pub const GDT_Int32: Type = 5; + #[doc = " Thirty two bit floating point"] + pub const GDT_Float32: Type = 6; + #[doc = " Sixty four bit floating point"] + pub const GDT_Float64: Type = 7; + #[doc = " Complex Int16"] + pub const GDT_CInt16: Type = 8; + #[doc = " Complex Int32"] + pub const GDT_CInt32: Type = 9; + #[doc = " Complex Float32"] + pub const GDT_CFloat32: Type = 10; + #[doc = " Complex Float64"] + pub const GDT_CFloat64: Type = 11; + #[doc = " Complex Float64"] + pub const GDT_TypeCount: Type = 12; } extern "C" { - pub fn GDALRasterAdviseRead( - hRB: GDALRasterBandH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALRasterIO( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALGetDataTypeSizeBits(eDataType: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALRasterIOEx( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; + pub fn GDALGetDataTypeSizeBytes(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALReadBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALWriteBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALDataTypeIsInteger(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALDataTypeIsFloating(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALDataTypeIsSigned(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; + pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; } extern "C" { - pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; + pub fn GDALDataTypeUnion( + arg1: GDALDataType::Type, + arg2: GDALDataType::Type, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; + pub fn GDALDataTypeUnionWithValue( + eDT: GDALDataType::Type, + dValue: f64, + bComplex: libc::c_int, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALSetRasterColorInterpretation( - arg1: GDALRasterBandH, - arg2: GDALColorInterp::Type, - ) -> CPLErr::Type; + pub fn GDALFindDataType( + nBits: libc::c_int, + bSigned: libc::c_int, + bFloating: libc::c_int, + bComplex: libc::c_int, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; + pub fn GDALFindDataTypeForValue(dValue: f64, bComplex: libc::c_int) -> GDALDataType::Type; } extern "C" { - pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; + pub fn GDALAdjustValueToDataType( + eDT: GDALDataType::Type, + dfValue: f64, + pbClamped: *mut libc::c_int, + pbRounded: *mut libc::c_int, + ) -> f64; } extern "C" { - pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALGetNonComplexDataType(arg1: GDALDataType::Type) -> GDALDataType::Type; } extern "C" { - pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALDataTypeIsConversionLossy( + eTypeFrom: GDALDataType::Type, + eTypeTo: GDALDataType::Type, + ) -> libc::c_int; } -extern "C" { - pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; +pub mod GDALAsyncStatusType { + #[doc = " status of the asynchronous stream"] + pub type Type = libc::c_uint; + pub const GARIO_PENDING: Type = 0; + pub const GARIO_UPDATE: Type = 1; + pub const GARIO_ERROR: Type = 2; + pub const GARIO_COMPLETE: Type = 3; + pub const GARIO_TypeCount: Type = 4; } extern "C" { - pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; + pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; + pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; } -extern "C" { - pub fn GDALDeleteRasterNoDataValue(arg1: GDALRasterBandH) -> CPLErr::Type; +pub mod GDALAccess { + #[doc = " Flag indicating read/write, or read-only access to data."] + pub type Type = libc::c_uint; + #[doc = " Read only (no update) access"] + pub const GA_ReadOnly: Type = 0; + #[doc = " Read/write access."] + pub const GA_Update: Type = 1; } -extern "C" { - pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; +pub mod GDALRWFlag { + #[doc = " Read/Write flag for RasterIO() method"] + pub type Type = libc::c_uint; + #[doc = " Read data"] + pub const GF_Read: Type = 0; + #[doc = " Write data"] + pub const GF_Write: Type = 1; } -extern "C" { - pub fn GDALSetRasterCategoryNames(arg1: GDALRasterBandH, arg2: CSLConstList) -> CPLErr::Type; +pub mod GDALRIOResampleAlg { + #[doc = " RasterIO() resampling method."] + #[doc = " @since GDAL 2.0"] + pub type Type = libc::c_uint; + #[doc = " Nearest neighbour"] + pub const GRIORA_NearestNeighbour: Type = 0; + #[doc = " Bilinear (2x2 kernel)"] + pub const GRIORA_Bilinear: Type = 1; + #[doc = " Cubic Convolution Approximation (4x4 kernel)"] + pub const GRIORA_Cubic: Type = 2; + #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] + pub const GRIORA_CubicSpline: Type = 3; + #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] + pub const GRIORA_Lanczos: Type = 4; + #[doc = " Average"] + pub const GRIORA_Average: Type = 5; + #[doc = " Mode (selects the value which appears most often of all the sampled points)"] + pub const GRIORA_Mode: Type = 6; + #[doc = " Gauss blurring"] + pub const GRIORA_Gauss: Type = 7; } -extern "C" { - pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; +#[doc = " Structure to pass extra arguments to RasterIO() method"] +#[doc = " @since GDAL 2.0"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterIOExtraArg { + #[doc = " Version of structure (to allow future extensions of the structure)"] + pub nVersion: libc::c_int, + #[doc = " Resampling algorithm"] + pub eResampleAlg: GDALRIOResampleAlg::Type, + #[doc = " Progress callback"] + pub pfnProgress: GDALProgressFunc, + #[doc = " Progress callback user data"] + pub pProgressData: *mut libc::c_void, + #[doc = " Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set."] + #[doc = "Mostly reserved from the VRT driver to communicate a more precise"] + #[doc = "source window. Must be such that dfXOff - nXOff < 1.0 and"] + #[doc = "dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize < 1.0"] + pub bFloatingPointWindowValidity: libc::c_int, + #[doc = " Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] + pub dfXOff: f64, + #[doc = " Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] + pub dfYOff: f64, + #[doc = " Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] + pub dfXSize: f64, + #[doc = " Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] + pub dfYSize: f64, } -extern "C" { - pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; +#[test] +fn bindgen_test_layout_GDALRasterIOExtraArg() { + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(nVersion) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(eResampleAlg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnProgress as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(pfnProgress) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pProgressData as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(pProgressData) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).bFloatingPointWindowValidity + as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(bFloatingPointWindowValidity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfXOff) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfYOff) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfXSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfYSize) + ) + ); } -extern "C" { - pub fn GDALGetRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - bForce: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - ) -> CPLErr::Type; +pub mod GDALColorInterp { + #[doc = " Types of color interpretation for raster bands."] + pub type Type = libc::c_uint; + #[doc = " Undefined"] + pub const GCI_Undefined: Type = 0; + #[doc = " Greyscale"] + pub const GCI_GrayIndex: Type = 1; + #[doc = " Paletted (see associated color table)"] + pub const GCI_PaletteIndex: Type = 2; + #[doc = " Red band of RGBA image"] + pub const GCI_RedBand: Type = 3; + #[doc = " Green band of RGBA image"] + pub const GCI_GreenBand: Type = 4; + #[doc = " Blue band of RGBA image"] + pub const GCI_BlueBand: Type = 5; + #[doc = " Alpha (0=transparent, 255=opaque)"] + pub const GCI_AlphaBand: Type = 6; + #[doc = " Hue band of HLS image"] + pub const GCI_HueBand: Type = 7; + #[doc = " Saturation band of HLS image"] + pub const GCI_SaturationBand: Type = 8; + #[doc = " Lightness band of HLS image"] + pub const GCI_LightnessBand: Type = 9; + #[doc = " Cyan band of CMYK image"] + pub const GCI_CyanBand: Type = 10; + #[doc = " Magenta band of CMYK image"] + pub const GCI_MagentaBand: Type = 11; + #[doc = " Yellow band of CMYK image"] + pub const GCI_YellowBand: Type = 12; + #[doc = " Black band of CMLY image"] + pub const GCI_BlackBand: Type = 13; + #[doc = " Y Luminance"] + pub const GCI_YCbCr_YBand: Type = 14; + #[doc = " Cb Chroma"] + pub const GCI_YCbCr_CbBand: Type = 15; + #[doc = " Cr Chroma"] + pub const GCI_YCbCr_CrBand: Type = 16; + #[doc = " Max current value (equals to GCI_YCbCr_CrBand currently)"] + pub const GCI_Max: Type = 16; } extern "C" { - pub fn GDALComputeRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALSetRasterStatistics( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - dfMean: f64, - dfStdDev: f64, - ) -> CPLErr::Type; + pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; +} +pub mod GDALPaletteInterp { + #[doc = " Types of color interpretations for a GDALColorTable."] + pub type Type = libc::c_uint; + #[doc = " Grayscale (in GDALColorEntry.c1)"] + pub const GPI_Gray: Type = 0; + #[doc = " Red, Green, Blue and Alpha in (in c1, c2, c3 and c4)"] + pub const GPI_RGB: Type = 1; + #[doc = " Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)"] + pub const GPI_CMYK: Type = 2; + #[doc = " Hue, Lightness and Saturation (in c1, c2, and c3)"] + pub const GPI_HLS: Type = 3; } extern "C" { - pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; + pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; } +#[doc = " Opaque type used for the C bindings of the C++ GDALMajorObject class"] +pub type GDALMajorObjectH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALDataset class"] +pub type GDALDatasetH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALRasterBand class"] +pub type GDALRasterBandH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALDriver class"] +pub type GDALDriverH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALColorTable class"] +pub type GDALColorTableH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class"] +pub type GDALRasterAttributeTableH = *mut libc::c_void; +#[doc = " Opaque type used for the C bindings of the C++ GDALAsyncReader class"] +pub type GDALAsyncReaderH = *mut libc::c_void; +#[doc = " Type to express pixel, line or band spacing. Signed 64 bit integer."] +pub type GSpacing = GIntBig; extern "C" { - pub fn GDALSetRasterUnitType( - hBand: GDALRasterBandH, - pszNewValue: *const libc::c_char, - ) -> CPLErr::Type; + pub fn GDALAllRegister(); } extern "C" { - pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn GDALCreate( + hDriver: GDALDriverH, + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: GDALDataType::Type, + arg6: CSLConstList, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; + pub fn GDALCreateCopy( + arg1: GDALDriverH, + arg2: *const libc::c_char, + arg3: GDALDatasetH, + arg4: libc::c_int, + arg5: CSLConstList, + arg6: GDALProgressFunc, + arg7: *mut libc::c_void, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn GDALIdentifyDriver( + pszFilename: *const libc::c_char, + papszFileList: CSLConstList, + ) -> GDALDriverH; } extern "C" { - pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; + pub fn GDALIdentifyDriverEx( + pszFilename: *const libc::c_char, + nIdentifyFlags: libc::c_uint, + papszAllowedDrivers: *const *const libc::c_char, + papszFileList: *const *const libc::c_char, + ) -> GDALDriverH; } extern "C" { - pub fn GDALComputeRasterMinMax( - hBand: GDALRasterBandH, - bApproxOK: libc::c_int, - adfMinMax: *mut f64, - ); + pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; } extern "C" { - pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; + pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; } extern "C" { - pub fn GDALGetRasterHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetRasterHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALOpenEx( + pszFilename: *const libc::c_char, + nOpenFlags: libc::c_uint, + papszAllowedDrivers: *const *const libc::c_char, + papszOpenOptions: *const *const libc::c_char, + papszSiblingFiles: *const *const libc::c_char, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALGetDefaultHistogram( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut libc::c_int, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; } extern "C" { - pub fn GDALGetDefaultHistogramEx( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut GUIntBig, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; } extern "C" { - pub fn GDALSetDefaultHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn GDALGetDriverCount() -> libc::c_int; } extern "C" { - pub fn GDALSetDefaultHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - ) -> CPLErr::Type; + pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; } extern "C" { - pub fn GDALGetRandomRasterSample( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: *mut f32, - ) -> libc::c_int; + pub fn GDALCreateDriver() -> GDALDriverH; } extern "C" { - pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) - -> GDALRasterBandH; + pub fn GDALDestroyDriver(arg1: GDALDriverH); } extern "C" { - pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; + pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; } extern "C" { - pub fn GDALFillRaster( - hBand: GDALRasterBandH, - dfRealValue: f64, - dfImaginaryValue: f64, - ) -> CPLErr::Type; + pub fn GDALDeregisterDriver(arg1: GDALDriverH); } extern "C" { - pub fn GDALComputeBandStats( - hBand: GDALRasterBandH, - nSampleStep: libc::c_int, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALDestroyDriverManager(); } extern "C" { - pub fn GDALOverviewMagnitudeCorrection( - hBaseBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviews: *mut GDALRasterBandH, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALDestroy(); } extern "C" { - pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; + pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; } extern "C" { - pub fn GDALSetDefaultRAT( - arg1: GDALRasterBandH, - arg2: GDALRasterAttributeTableH, + pub fn GDALRenameDataset( + arg1: GDALDriverH, + pszNewName: *const libc::c_char, + pszOldName: *const libc::c_char, ) -> CPLErr::Type; } extern "C" { - pub fn GDALAddDerivedBandPixelFunc( - pszName: *const libc::c_char, - pfnPixelFunc: GDALDerivedPixelFunc, + pub fn GDALCopyDatasetFiles( + arg1: GDALDriverH, + pszNewName: *const libc::c_char, + pszOldName: *const libc::c_char, ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; + pub fn GDALValidateCreationOptions( + arg1: GDALDriverH, + papszCreationOptions: CSLConstList, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; + pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; } extern "C" { - pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; + pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetDataCoverageStatus( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nMaskFlagStop: libc::c_int, - pdfDataPct: *mut f64, - ) -> libc::c_int; + pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; } extern "C" { - pub fn GDALARGetNextUpdatedRegion( - hARIO: GDALAsyncReaderH, - dfTimeout: f64, - pnXBufOff: *mut libc::c_int, - pnYBufOff: *mut libc::c_int, - pnXBufSize: *mut libc::c_int, - pnYBufSize: *mut libc::c_int, - ) -> GDALAsyncStatusType::Type; + pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; +} +#[doc = " Ground Control Point"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDAL_GCP { + #[doc = " Unique identifier, often numeric"] + pub pszId: *mut libc::c_char, + #[doc = " Informational message or \"\""] + pub pszInfo: *mut libc::c_char, + #[doc = " Pixel (x) location of GCP on raster"] + pub dfGCPPixel: f64, + #[doc = " Line (y) location of GCP on raster"] + pub dfGCPLine: f64, + #[doc = " X position of GCP in georeferenced space"] + pub dfGCPX: f64, + #[doc = " Y position of GCP in georeferenced space"] + pub dfGCPY: f64, + #[doc = " Elevation of GCP, or zero if not known"] + pub dfGCPZ: f64, +} +#[test] +fn bindgen_test_layout_GDAL_GCP() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(GDAL_GCP)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDAL_GCP)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(pszId) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(pszInfo) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(dfGCPPixel) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(dfGCPLine) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(dfGCPX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(dfGCPY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(dfGCPZ) + ) + ); } extern "C" { - pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; + pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); } extern "C" { - pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); + pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); } extern "C" { - pub fn GDALGeneralCmdLineProcessor( - nArgc: libc::c_int, - ppapszArgv: *mut *mut *mut libc::c_char, - nOptions: libc::c_int, - ) -> libc::c_int; + pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; } extern "C" { - pub fn GDALSwapWords( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: libc::c_int, - nWordSkip: libc::c_int, - ); + pub fn GDALGCPsToGeoTransform( + nGCPCount: libc::c_int, + pasGCPs: *const GDAL_GCP, + padfGeoTransform: *mut f64, + bApproxOK: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALSwapWordsEx( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: size_t, - nWordSkip: libc::c_int, - ); + pub fn GDALInvGeoTransform( + padfGeoTransformIn: *mut f64, + padfInvGeoTransformOut: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn GDALCopyWords( - pSrcData: *const libc::c_void, - eSrcType: GDALDataType::Type, - nSrcPixelOffset: libc::c_int, - pDstData: *mut libc::c_void, - eDstType: GDALDataType::Type, - nDstPixelOffset: libc::c_int, - nWordCount: libc::c_int, + pub fn GDALApplyGeoTransform( + arg1: *mut f64, + arg2: f64, + arg3: f64, + arg4: *mut f64, + arg5: *mut f64, ); } extern "C" { - pub fn GDALCopyWords64( - pSrcData: *const libc::c_void, - eSrcType: GDALDataType::Type, - nSrcPixelOffset: libc::c_int, - pDstData: *mut libc::c_void, - eDstType: GDALDataType::Type, - nDstPixelOffset: libc::c_int, - nWordCount: GPtrDiff_t, + pub fn GDALComposeGeoTransforms( + padfGeoTransform1: *const f64, + padfGeoTransform2: *const f64, + padfGeoTransformOut: *mut f64, ); } extern "C" { - pub fn GDALCopyBits( - pabySrcData: *const GByte, - nSrcOffset: libc::c_int, - nSrcStep: libc::c_int, - pabyDstData: *mut GByte, - nDstOffset: libc::c_int, - nDstStep: libc::c_int, - nBitCount: libc::c_int, - nStepCount: libc::c_int, - ); + pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; + pub fn GDALGetMetadata( + arg1: GDALMajorObjectH, + arg2: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALReadWorldFile( - arg1: *const libc::c_char, + pub fn GDALSetMetadata( + arg1: GDALMajorObjectH, + arg2: CSLConstList, + arg3: *const libc::c_char, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetMetadataItem( + arg1: GDALMajorObjectH, arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; + arg3: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALWriteWorldFile( - arg1: *const libc::c_char, + pub fn GDALSetMetadataItem( + arg1: GDALMajorObjectH, arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; + arg3: *const libc::c_char, + arg4: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALLoadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; } extern "C" { - pub fn GDALReadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); } extern "C" { - pub fn GDALLoadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; } extern "C" { - pub fn GDALReadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALDecToDMS( - arg1: f64, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *const libc::c_char; + pub fn GDALClose(arg1: GDALDatasetH); } extern "C" { - pub fn GDALPackedDMSToDec(arg1: f64) -> f64; + pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALDecToPackedDMS(arg1: f64) -> f64; + pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; } -#[doc = " Structure to store Rational Polynomial Coefficients / Rigorous Projection"] -#[doc = " Model. See http://geotiff.maptools.org/rpc_prop.html"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRPCInfo { - #[doc = "< Line offset"] - pub dfLINE_OFF: f64, - #[doc = "< Sample/Pixel offset"] - pub dfSAMP_OFF: f64, - #[doc = "< Latitude offset"] - pub dfLAT_OFF: f64, - #[doc = "< Longitude offset"] - pub dfLONG_OFF: f64, - #[doc = "< Height offset"] - pub dfHEIGHT_OFF: f64, - #[doc = "< Line scale"] - pub dfLINE_SCALE: f64, - #[doc = "< Sample/Pixel scale"] - pub dfSAMP_SCALE: f64, - #[doc = "< Latitude scale"] - pub dfLAT_SCALE: f64, - #[doc = "< Longitude scale"] - pub dfLONG_SCALE: f64, - #[doc = "< Height scale"] - pub dfHEIGHT_SCALE: f64, - #[doc = "< Line Numerator Coefficients"] - pub adfLINE_NUM_COEFF: [f64; 20usize], - #[doc = "< Line Denominator Coefficients"] - pub adfLINE_DEN_COEFF: [f64; 20usize], - #[doc = "< Sample/Pixel Numerator Coefficients"] - pub adfSAMP_NUM_COEFF: [f64; 20usize], - #[doc = "< Sample/Pixel Denominator Coefficients"] - pub adfSAMP_DEN_COEFF: [f64; 20usize], - #[doc = "< Minimum longitude"] - pub dfMIN_LONG: f64, - #[doc = "< Minimum latitude"] - pub dfMIN_LAT: f64, - #[doc = "< Maximum longitude"] - pub dfMAX_LONG: f64, - #[doc = "< Maximum latitude"] - pub dfMAX_LAT: f64, -} -#[test] -fn bindgen_test_layout_GDALRPCInfo() { - assert_eq!( - ::std::mem::size_of::(), - 752usize, - concat!("Size of: ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LAT) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, - 744usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LAT) - ) - ); +extern "C" { + pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALExtractRPCInfo(arg1: CSLConstList, arg2: *mut GDALRPCInfo) -> libc::c_int; + pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; } -#[doc = " Color tuple"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALColorEntry { - #[doc = " gray, red, cyan or hue"] - pub c1: libc::c_short, - #[doc = " green, magenta, or lightness"] - pub c2: libc::c_short, - #[doc = " blue, yellow, or saturation"] - pub c3: libc::c_short, - #[doc = " alpha or blackband"] - pub c4: libc::c_short, +extern "C" { + pub fn GDALAddBand( + hDS: GDALDatasetH, + eType: GDALDataType::Type, + papszOptions: CSLConstList, + ) -> CPLErr::Type; } -#[test] -fn bindgen_test_layout_GDALColorEntry() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(GDALColorEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(GDALColorEntry)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c4) - ) - ); +extern "C" { + pub fn GDALBeginAsyncReader( + hDS: GDALDatasetH, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + pBuf: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nBandSpace: libc::c_int, + papszOptions: CSLConstList, + ) -> GDALAsyncReaderH; } extern "C" { - pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; + pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); } extern "C" { - pub fn GDALDestroyColorTable(arg1: GDALColorTableH); + pub fn GDALDatasetRasterIO( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nBandSpace: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; + pub fn GDALDatasetRasterIOEx( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + nPixelSpace: GSpacing, + nLineSpace: GSpacing, + nBandSpace: GSpacing, + psExtraArg: *mut GDALRasterIOExtraArg, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; + pub fn GDALDatasetAdviseRead( + hDS: GDALDatasetH, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + papszOptions: CSLConstList, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; + pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; + pub fn GDALGetSpatialRef(arg1: GDALDatasetH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALGetColorEntryAsRGB( - arg1: GDALColorTableH, - arg2: libc::c_int, - arg3: *mut GDALColorEntry, - ) -> libc::c_int; + pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; } extern "C" { - pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); + pub fn GDALSetSpatialRef(arg1: GDALDatasetH, arg2: OGRSpatialReferenceH) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateColorRamp( - hTable: GDALColorTableH, - nStartIndex: libc::c_int, - psStartColor: *const GDALColorEntry, - nEndIndex: libc::c_int, - psEndColor: *const GDALColorEntry, - ); -} -pub mod GDALRATFieldType { - #[doc = " Field type of raster attribute table"] - pub type Type = u32; - #[doc = " Integer field"] - pub const GFT_Integer: Type = 0; - #[doc = " Floating point (double) field"] - pub const GFT_Real: Type = 1; - #[doc = " String field"] - pub const GFT_String: Type = 2; -} -pub mod GDALRATFieldUsage { - #[doc = " Field usage of raster attribute table"] - pub type Type = u32; - #[doc = " General purpose field."] - pub const GFU_Generic: Type = 0; - #[doc = " Histogram pixel count"] - pub const GFU_PixelCount: Type = 1; - #[doc = " Class name"] - pub const GFU_Name: Type = 2; - #[doc = " Class range minimum"] - pub const GFU_Min: Type = 3; - #[doc = " Class range maximum"] - pub const GFU_Max: Type = 4; - #[doc = " Class value (min=max)"] - pub const GFU_MinMax: Type = 5; - #[doc = " Red class color (0-255)"] - pub const GFU_Red: Type = 6; - #[doc = " Green class color (0-255)"] - pub const GFU_Green: Type = 7; - #[doc = " Blue class color (0-255)"] - pub const GFU_Blue: Type = 8; - #[doc = " Alpha (0=transparent,255=opaque)"] - pub const GFU_Alpha: Type = 9; - #[doc = " Color Range Red Minimum"] - pub const GFU_RedMin: Type = 10; - #[doc = " Color Range Green Minimum"] - pub const GFU_GreenMin: Type = 11; - #[doc = " Color Range Blue Minimum"] - pub const GFU_BlueMin: Type = 12; - #[doc = " Color Range Alpha Minimum"] - pub const GFU_AlphaMin: Type = 13; - #[doc = " Color Range Red Maximum"] - pub const GFU_RedMax: Type = 14; - #[doc = " Color Range Green Maximum"] - pub const GFU_GreenMax: Type = 15; - #[doc = " Color Range Blue Maximum"] - pub const GFU_BlueMax: Type = 16; - #[doc = " Color Range Alpha Maximum"] - pub const GFU_AlphaMax: Type = 17; - #[doc = " Maximum GFU value (equals to GFU_AlphaMax+1 currently)"] - pub const GFU_MaxCount: Type = 18; + pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; } -pub mod GDALRATTableType { - #[doc = " RAT table type (thematic or athematic)"] - #[doc = " @since GDAL 2.4"] - pub type Type = u32; - #[doc = " Thematic table type"] - pub const GRTT_THEMATIC: Type = 0; - #[doc = " Athematic table type"] - pub const GRTT_ATHEMATIC: Type = 1; +extern "C" { + pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; + pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); + pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; } extern "C" { - pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; + pub fn GDALGetGCPSpatialRef(arg1: GDALDatasetH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALRATGetNameOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> *const libc::c_char; + pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; } extern "C" { - pub fn GDALRATGetUsageOfCol( - arg1: GDALRasterAttributeTableH, + pub fn GDALSetGCPs( + arg1: GDALDatasetH, arg2: libc::c_int, - ) -> GDALRATFieldUsage::Type; + arg3: *const GDAL_GCP, + arg4: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetTypeOfCol( - arg1: GDALRasterAttributeTableH, + pub fn GDALSetGCPs2( + arg1: GDALDatasetH, arg2: libc::c_int, - ) -> GDALRATFieldType::Type; + arg3: *const GDAL_GCP, + arg4: OGRSpatialReferenceH, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetColOfUsage( - arg1: GDALRasterAttributeTableH, - arg2: GDALRATFieldUsage::Type, - ) -> libc::c_int; + pub fn GDALGetInternalHandle( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; + pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALRATGetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> *const libc::c_char; + pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALRATGetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> libc::c_int; + pub fn GDALReleaseDataset(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALRATGetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, + pub fn GDALBuildOverviews( + arg1: GDALDatasetH, + arg2: *const libc::c_char, arg3: libc::c_int, - ) -> f64; + arg4: *mut libc::c_int, + arg5: libc::c_int, + arg6: *mut libc::c_int, + arg7: GDALProgressFunc, + arg8: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATSetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_char, - ); + pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); } extern "C" { - pub fn GDALRATSetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ); + pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALRATSetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: f64, - ); + pub fn GDALFlushCache(hDS: GDALDatasetH); } extern "C" { - pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; + pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; } extern "C" { - pub fn GDALRATValuesIOAsDouble( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pdfData: *mut f64, + pub fn GDALDatasetCopyWholeRaster( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + papszOptions: CSLConstList, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATValuesIOAsInteger( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pnData: *mut libc::c_int, + pub fn GDALRasterBandCopyWholeRaster( + hSrcBand: GDALRasterBandH, + hDstBand: GDALRasterBandH, + constpapszOptions: *const *const libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATValuesIOAsString( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - papszStrList: CSLConstList, + pub fn GDALRegenerateOverviews( + hSrcBand: GDALRasterBandH, + nOverviewCount: libc::c_int, + pahOverviewBands: *mut GDALRasterBandH, + pszResampling: *const libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); + pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALRATCreateColumn( - arg1: GDALRasterAttributeTableH, - arg2: *const libc::c_char, - arg3: GDALRATFieldType::Type, - arg4: GDALRATFieldUsage::Type, - ) -> CPLErr::Type; + pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; } extern "C" { - pub fn GDALRATSetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: f64, - arg3: f64, - ) -> CPLErr::Type; + pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; } extern "C" { - pub fn GDALRATGetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: *mut f64, - arg3: *mut f64, - ) -> libc::c_int; + pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALRATSetTableType( - hRAT: GDALRasterAttributeTableH, - eInTableType: GDALRATTableType::Type, - ) -> CPLErr::Type; + pub fn GDALDatasetCreateLayer( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + arg3: OGRSpatialReferenceH, + arg4: OGRwkbGeometryType::Type, + arg5: CSLConstList, + ) -> OGRLayerH; } extern "C" { - pub fn GDALRATGetTableType(hRAT: GDALRasterAttributeTableH) -> GDALRATTableType::Type; + pub fn GDALDatasetCopyLayer( + arg1: GDALDatasetH, + arg2: OGRLayerH, + arg3: *const libc::c_char, + arg4: CSLConstList, + ) -> OGRLayerH; } extern "C" { - pub fn GDALRATInitializeFromColorTable( - arg1: GDALRasterAttributeTableH, - arg2: GDALColorTableH, - ) -> CPLErr::Type; + pub fn GDALDatasetResetReading(arg1: GDALDatasetH); } extern "C" { - pub fn GDALRATTranslateToColorTable( - arg1: GDALRasterAttributeTableH, - nEntryCount: libc::c_int, - ) -> GDALColorTableH; + pub fn GDALDatasetGetNextFeature( + hDS: GDALDatasetH, + phBelongingLayer: *mut OGRLayerH, + pdfProgressPct: *mut f64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> OGRFeatureH; } extern "C" { - pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); + pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; + pub fn GDALDatasetExecuteSQL( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + arg3: OGRGeometryH, + arg4: *const libc::c_char, + ) -> OGRLayerH; } extern "C" { - pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; + pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); } extern "C" { - pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; + pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; } extern "C" { - pub fn GDALRATRemoveStatistics(arg1: GDALRasterAttributeTableH); + pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALSetCacheMax(nBytes: libc::c_int); + pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALGetCacheMax() -> libc::c_int; + pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALGetCacheUsed() -> libc::c_int; + pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; } extern "C" { - pub fn GDALSetCacheMax64(nBytes: GIntBig); + pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; } +#[doc = " Type of functions to pass to GDALAddDerivedBandPixelFunc."] +#[doc = " @since GDAL 2.2"] +pub type GDALDerivedPixelFunc = ::std::option::Option< + unsafe extern "C" fn( + papoSources: *mut *mut libc::c_void, + nSources: libc::c_int, + pData: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eSrcType: GDALDataType::Type, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + ) -> CPLErr::Type, +>; extern "C" { - pub fn GDALGetCacheMax64() -> GIntBig; + pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; } extern "C" { - pub fn GDALGetCacheUsed64() -> GIntBig; + pub fn GDALGetBlockSize( + arg1: GDALRasterBandH, + pnXSize: *mut libc::c_int, + pnYSize: *mut libc::c_int, + ); } extern "C" { - pub fn GDALFlushCacheBlock() -> libc::c_int; + pub fn GDALGetActualBlockSize( + arg1: GDALRasterBandH, + nXBlockOff: libc::c_int, + nYBlockOff: libc::c_int, + pnXValid: *mut libc::c_int, + pnYValid: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDatasetGetVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nBandSpace: GIntBig, - nCacheSize: size_t, - nPageSizeHint: size_t, - bSingleThreadUsage: libc::c_int, + pub fn GDALRasterAdviseRead( + hRB: GDALRasterBandH, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRasterBandGetVirtualMem( - hBand: GDALRasterBandH, + pub fn GDALRasterIO( + hRBand: GDALRasterBandH, eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nCacheSize: size_t, - nPageSizeHint: size_t, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + nLineSpace: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetVirtualMemAuto( - hBand: GDALRasterBandH, + pub fn GDALRasterIOEx( + hRBand: GDALRasterBandH, eRWFlag: GDALRWFlag::Type, - pnPixelSpace: *mut libc::c_int, - pnLineSpace: *mut GIntBig, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nPixelSpace: GSpacing, + nLineSpace: GSpacing, + psExtraArg: *mut GDALRasterIOExtraArg, + ) -> CPLErr::Type; } -pub mod GDALTileOrganization { - #[doc = " Enumeration to describe the tile organization"] - pub type Type = u32; - #[doc = " Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ..."] - pub const GTO_TIP: Type = 0; - #[doc = " Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ..."] - pub const GTO_BIT: Type = 1; - #[doc = " Band SeQuential : all the tiles of first band, all the tiles of following band..."] - pub const GTO_BSQ: Type = 2; +extern "C" { + pub fn GDALReadBlock( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDatasetGetTiledVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - eTileOrganization: GDALTileOrganization::Type, - nCacheSize: size_t, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn GDALWriteBlock( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRasterBandGetTiledVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nCacheSize: size_t, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALCreatePansharpenedVRT( - pszXML: *const libc::c_char, - hPanchroBand: GDALRasterBandH, - nInputSpectralBands: libc::c_int, - pahInputSpectralBands: *mut GDALRasterBandH, - ) -> GDALDatasetH; + pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALGetJPEG2000Structure( - pszFilename: *const libc::c_char, - papszOptions: CSLConstList, - ) -> *mut CPLXMLNode; + pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; } extern "C" { - pub fn GDALComputeMedianCutPCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - pfnIncludePixel: ::std::option::Option< - unsafe extern "C" fn( - arg1: libc::c_int, - arg2: libc::c_int, - arg3: *mut libc::c_void, - ) -> libc::c_int, - >, - nColors: libc::c_int, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; + pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALDitherRGB2PCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - hTarget: GDALRasterBandH, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; + pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; } extern "C" { - pub fn GDALChecksumImage( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - ) -> libc::c_int; + pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; } extern "C" { - pub fn GDALComputeProximity( - hSrcBand: GDALRasterBandH, - hProximityBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, + pub fn GDALSetRasterColorInterpretation( + arg1: GDALRasterBandH, + arg2: GDALColorInterp::Type, ) -> CPLErr::Type; } extern "C" { - pub fn GDALFillNodata( - hTargetBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - dfMaxSearchDist: f64, - bDeprecatedOption: libc::c_int, - nSmoothingIterations: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; } extern "C" { - pub fn GDALPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; } extern "C" { - pub fn GDALFPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALSieveFilter( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - nSizeThreshold: libc::c_int, - nConnectedness: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; } -pub type GDALTransformerFunc = ::std::option::Option< - unsafe extern "C" fn( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int, ->; extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); + pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALUseTransformer( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; } extern "C" { - pub fn GDALCreateSimilarTransformer( - psTransformerArg: *mut libc::c_void, - dfSrcRatioX: f64, - dfSrcRatioY: f64, - ) -> *mut libc::c_void; + pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; } extern "C" { - #[doc = " @endcond"] - pub fn GDALCreateGenImgProjTransformer( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - bGCPUseOK: libc::c_int, - dfGCPErrorThreshold: f64, - nOrder: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateGenImgProjTransformer2( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALDeleteRasterNoDataValue(arg1: GDALRasterBandH) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateGenImgProjTransformer3( - pszSrcWKT: *const libc::c_char, - padfSrcGeoTransform: *const f64, - pszDstWKT: *const libc::c_char, - padfDstGeoTransform: *const f64, - ) -> *mut libc::c_void; + pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALCreateGenImgProjTransformer4( - hSrcSRS: OGRSpatialReferenceH, - padfSrcGeoTransform: *const f64, - hDstSRS: OGRSpatialReferenceH, - padfDstGeoTransform: *const f64, - papszOptions: *const *const libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALSetRasterCategoryNames(arg1: GDALRasterBandH, arg2: CSLConstList) -> CPLErr::Type; } extern "C" { - pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); + pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); + pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALGenImgProjTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetRasterStatistics( + arg1: GDALRasterBandH, + bApproxOK: libc::c_int, + bForce: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); + pub fn GDALComputeRasterStatistics( + arg1: GDALRasterBandH, + bApproxOK: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *mut f64); + pub fn GDALSetRasterStatistics( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + dfMean: f64, + dfStdDev: f64, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateReprojectionTransformer( - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; } extern "C" { - pub fn GDALCreateReprojectionTransformerEx( - hSrcSRS: OGRSpatialReferenceH, - hDstSRS: OGRSpatialReferenceH, - papszOptions: *const *const libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALSetRasterUnitType( + hBand: GDALRasterBandH, + pszNewValue: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); + pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALReprojectionTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateGCPTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALCreateGCPRefineTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - tolerance: f64, - minimumGcps: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALComputeRasterMinMax( + hBand: GDALRasterBandH, + bApproxOK: libc::c_int, + adfMinMax: *mut f64, + ); } extern "C" { - pub fn GDALGCPTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateTPSTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - bReversed: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALGetRasterHistogram( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut libc::c_int, + bIncludeOutOfRange: libc::c_int, + bApproxOK: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALGetRasterHistogramEx( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut GUIntBig, + bIncludeOutOfRange: libc::c_int, + bApproxOK: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALTPSTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetDefaultHistogram( + hBand: GDALRasterBandH, + pdfMin: *mut f64, + pdfMax: *mut f64, + pnBuckets: *mut libc::c_int, + ppanHistogram: *mut *mut libc::c_int, + bForce: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - #[doc = " @endcond"] - pub fn GDALCreateRPCTransformer( - psRPC: *mut GDALRPCInfo, - bReversed: libc::c_int, - dfPixErrThreshold: f64, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALGetDefaultHistogramEx( + hBand: GDALRasterBandH, + pdfMin: *mut f64, + pdfMax: *mut f64, + pnBuckets: *mut libc::c_int, + ppanHistogram: *mut *mut GUIntBig, + bForce: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALSetDefaultHistogram( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRPCTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALCreateGeoLocTransformer( - hBaseDS: GDALDatasetH, - papszGeolocationInfo: *mut *mut libc::c_char, - bReversed: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALSetDefaultHistogramEx( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut GUIntBig, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGeoLocTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, + pub fn GDALGetRandomRasterSample( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: *mut f32, ) -> libc::c_int; } extern "C" { - pub fn GDALCreateApproxTransformer( - pfnRawTransformer: GDALTransformerFunc, - pRawTransformerArg: *mut libc::c_void, - dfMaxError: f64, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALApproxTransformerOwnsSubtransformer( - pCBData: *mut libc::c_void, - bOwnFlag: libc::c_int, - ); + pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) + -> GDALRasterBandH; } extern "C" { - pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); + pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; } extern "C" { - pub fn GDALApproxTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALFillRaster( + hBand: GDALRasterBandH, + dfRealValue: f64, + dfImaginaryValue: f64, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALSimpleImageWarp( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - pfnTransform: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, + pub fn GDALComputeBandStats( + hBand: GDALRasterBandH, + nSampleStep: libc::c_int, + pdfMean: *mut f64, + pdfStdDev: *mut f64, pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszWarpOptions: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALSuggestedWarpOutput( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALSuggestedWarpOutput2( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - padfExtents: *mut f64, - nOptions: libc::c_int, + pub fn GDALOverviewMagnitudeCorrection( + hBaseBand: GDALRasterBandH, + nOverviewCount: libc::c_int, + pahOverviews: *mut GDALRasterBandH, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALSerializeTransformer( - pfnFunc: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - ) -> *mut CPLXMLNode; + pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; } extern "C" { - pub fn GDALDeserializeTransformer( - psTree: *mut CPLXMLNode, - ppfnFunc: *mut GDALTransformerFunc, - ppTransformArg: *mut *mut libc::c_void, + pub fn GDALSetDefaultRAT( + arg1: GDALRasterBandH, + arg2: GDALRasterAttributeTableH, ) -> CPLErr::Type; } extern "C" { - #[doc = " @endcond"] - pub fn GDALTransformGeolocations( - hXBand: GDALRasterBandH, - hYBand: GDALRasterBandH, - hZBand: GDALRasterBandH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszOptions: *mut *mut libc::c_char, + pub fn GDALAddDerivedBandPixelFunc( + pszName: *const libc::c_char, + pfnPixelFunc: GDALDerivedPixelFunc, ) -> CPLErr::Type; } -#[doc = " Contour writer callback type"] -pub type GDALContourWriter = ::std::option::Option< - unsafe extern "C" fn( - dfLevel: f64, - nPoints: libc::c_int, - padfX: *mut f64, - padfY: *mut f64, - arg1: *mut libc::c_void, - ) -> CPLErr::Type, ->; -#[doc = " Contour generator opaque type"] -pub type GDALContourGeneratorH = *mut libc::c_void; extern "C" { - pub fn GDAL_CG_Create( - nWidth: libc::c_int, - nHeight: libc::c_int, - bNoDataSet: libc::c_int, - dfNoDataValue: f64, - dfContourInterval: f64, - dfContourBase: f64, - pfnWriter: GDALContourWriter, - pCBData: *mut libc::c_void, - ) -> GDALContourGeneratorH; + pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; } extern "C" { - pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; + pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); + pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; } extern "C" { - pub fn OGRContourWriter( - arg1: f64, - arg2: libc::c_int, - arg3: *mut f64, - arg4: *mut f64, - pInfo: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetDataCoverageStatus( + hBand: GDALRasterBandH, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nMaskFlagStop: libc::c_int, + pdfDataPct: *mut f64, + ) -> libc::c_int; } extern "C" { - #[doc = " @endcond"] - pub fn GDALContourGenerate( - hBand: GDALRasterBandH, - dfContourInterval: f64, - dfContourBase: f64, - nFixedLevelCount: libc::c_int, - padfFixedLevels: *mut f64, - bUseNoData: libc::c_int, - dfNoDataValue: f64, - hLayer: *mut libc::c_void, - iIDField: libc::c_int, - iElevField: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALARGetNextUpdatedRegion( + hARIO: GDALAsyncReaderH, + dfTimeout: f64, + pnXBufOff: *mut libc::c_int, + pnYBufOff: *mut libc::c_int, + pnXBufSize: *mut libc::c_int, + pnYBufSize: *mut libc::c_int, + ) -> GDALAsyncStatusType::Type; } extern "C" { - pub fn GDALContourGenerateEx( - hBand: GDALRasterBandH, - hLayer: *mut libc::c_void, - options: CSLConstList, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; } extern "C" { - pub fn GDALRasterizeGeometries( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nGeomCount: libc::c_int, - pahGeometries: *mut OGRGeometryH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeomBurnValue: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); } extern "C" { - pub fn GDALRasterizeLayers( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfLayerBurnValues: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGeneralCmdLineProcessor( + nArgc: libc::c_int, + ppapszArgv: *mut *mut *mut libc::c_char, + nOptions: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALRasterizeLayersBuf( + pub fn GDALSwapWords( pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pszDstProjection: *const libc::c_char, - padfDstGeoTransform: *mut f64, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - dfBurnValue: f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub mod GDALGridAlgorithm { - #[doc = " Gridding Algorithms"] - pub type Type = u32; - #[doc = " Inverse distance to a power"] - pub const GGA_InverseDistanceToAPower: Type = 1; - #[doc = " Moving Average"] - pub const GGA_MovingAverage: Type = 2; - #[doc = " Nearest Neighbor"] - pub const GGA_NearestNeighbor: Type = 3; - #[doc = " Minimum Value (Data Metric)"] - pub const GGA_MetricMinimum: Type = 4; - #[doc = " Maximum Value (Data Metric)"] - pub const GGA_MetricMaximum: Type = 5; - #[doc = " Data Range (Data Metric)"] - pub const GGA_MetricRange: Type = 6; - #[doc = " Number of Points (Data Metric)"] - pub const GGA_MetricCount: Type = 7; - #[doc = " Average Distance (Data Metric)"] - pub const GGA_MetricAverageDistance: Type = 8; - #[doc = " Average Distance Between Data Points (Data Metric)"] - pub const GGA_MetricAverageDistancePts: Type = 9; - #[doc = " Linear interpolation (from Delaunay triangulation. Since GDAL 2.1"] - pub const GGA_Linear: Type = 10; - #[doc = " Inverse distance to a power with nearest neighbor search for max points"] - pub const GGA_InverseDistanceToAPowerNearestNeighbor: Type = 11; + nWordSize: libc::c_int, + nWordCount: libc::c_int, + nWordSkip: libc::c_int, + ); } extern "C" { - pub fn GDALGridCreate( - arg1: GDALGridAlgorithm::Type, - arg2: *const libc::c_void, - arg3: GUInt32, - arg4: *const f64, - arg5: *const f64, - arg6: *const f64, - arg7: f64, - arg8: f64, - arg9: f64, - arg10: f64, - arg11: GUInt32, - arg12: GUInt32, - arg13: GDALDataType::Type, - arg14: *mut libc::c_void, - arg15: GDALProgressFunc, - arg16: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALSwapWordsEx( + pData: *mut libc::c_void, + nWordSize: libc::c_int, + nWordCount: usize, + nWordSkip: libc::c_int, + ); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALGridContext { - _unused: [u8; 0], +extern "C" { + pub fn GDALCopyWords( + pSrcData: *const libc::c_void, + eSrcType: GDALDataType::Type, + nSrcPixelOffset: libc::c_int, + pDstData: *mut libc::c_void, + eDstType: GDALDataType::Type, + nDstPixelOffset: libc::c_int, + nWordCount: libc::c_int, + ); } extern "C" { - pub fn GDALGridContextCreate( - eAlgorithm: GDALGridAlgorithm::Type, - poOptions: *const libc::c_void, - nPoints: GUInt32, - padfX: *const f64, - padfY: *const f64, - padfZ: *const f64, - bCallerWillKeepPointArraysAlive: libc::c_int, - ) -> *mut GDALGridContext; + pub fn GDALCopyWords64( + pSrcData: *const libc::c_void, + eSrcType: GDALDataType::Type, + nSrcPixelOffset: libc::c_int, + pDstData: *mut libc::c_void, + eDstType: GDALDataType::Type, + nDstPixelOffset: libc::c_int, + nWordCount: GPtrDiff_t, + ); } extern "C" { - pub fn GDALGridContextFree(psContext: *mut GDALGridContext); + pub fn GDALCopyBits( + pabySrcData: *const GByte, + nSrcOffset: libc::c_int, + nSrcStep: libc::c_int, + pabyDstData: *mut GByte, + nDstOffset: libc::c_int, + nDstStep: libc::c_int, + nBitCount: libc::c_int, + nStepCount: libc::c_int, + ); } extern "C" { - pub fn GDALGridContextProcess( - psContext: *mut GDALGridContext, - dfXMin: f64, - dfXMax: f64, - dfYMin: f64, - dfYMax: f64, - nXSize: GUInt32, - nYSize: GUInt32, - eType: GDALDataType::Type, - pData: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; } extern "C" { - pub fn GDALComputeMatchingPoints( - hFirstImage: GDALDatasetH, - hSecondImage: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pnGCPCount: *mut libc::c_int, - ) -> *mut GDAL_GCP; + pub fn GDALReadWorldFile( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> libc::c_int; } -#[doc = " Triangle fact"] +extern "C" { + pub fn GDALWriteWorldFile( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALLoadTabFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALReadTabFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALLoadOziMapFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALReadOziMapFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALDecToDMS( + arg1: f64, + arg2: *const libc::c_char, + arg3: libc::c_int, + ) -> *const libc::c_char; +} +extern "C" { + pub fn GDALPackedDMSToDec(arg1: f64) -> f64; +} +extern "C" { + pub fn GDALDecToPackedDMS(arg1: f64) -> f64; +} +#[doc = " Structure to store Rational Polynomial Coefficients / Rigorous Projection"] +#[doc = " Model. See http://geotiff.maptools.org/rpc_prop.html"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct GDALTriFacet { - #[doc = "< index to the padfX/padfY arrays"] - pub anVertexIdx: [libc::c_int; 3usize], - #[doc = "< index to GDALDelaunayTriangulation.pasFacets, or -1"] - pub anNeighborIdx: [libc::c_int; 3usize], +pub struct GDALRPCInfo { + #[doc = "< Line offset"] + pub dfLINE_OFF: f64, + #[doc = "< Sample/Pixel offset"] + pub dfSAMP_OFF: f64, + #[doc = "< Latitude offset"] + pub dfLAT_OFF: f64, + #[doc = "< Longitude offset"] + pub dfLONG_OFF: f64, + #[doc = "< Height offset"] + pub dfHEIGHT_OFF: f64, + #[doc = "< Line scale"] + pub dfLINE_SCALE: f64, + #[doc = "< Sample/Pixel scale"] + pub dfSAMP_SCALE: f64, + #[doc = "< Latitude scale"] + pub dfLAT_SCALE: f64, + #[doc = "< Longitude scale"] + pub dfLONG_SCALE: f64, + #[doc = "< Height scale"] + pub dfHEIGHT_SCALE: f64, + #[doc = "< Line Numerator Coefficients"] + pub adfLINE_NUM_COEFF: [f64; 20usize], + #[doc = "< Line Denominator Coefficients"] + pub adfLINE_DEN_COEFF: [f64; 20usize], + #[doc = "< Sample/Pixel Numerator Coefficients"] + pub adfSAMP_NUM_COEFF: [f64; 20usize], + #[doc = "< Sample/Pixel Denominator Coefficients"] + pub adfSAMP_DEN_COEFF: [f64; 20usize], + #[doc = "< Minimum longitude"] + pub dfMIN_LONG: f64, + #[doc = "< Minimum latitude"] + pub dfMIN_LAT: f64, + #[doc = "< Maximum longitude"] + pub dfMAX_LONG: f64, + #[doc = "< Maximum latitude"] + pub dfMAX_LAT: f64, } #[test] -fn bindgen_test_layout_GDALTriFacet() { +fn bindgen_test_layout_GDALRPCInfo() { assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriFacet)) + ::std::mem::size_of::(), + 752usize, + concat!("Size of: ", stringify!(GDALRPCInfo)) ); assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(GDALTriFacet)) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALRPCInfo)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).anVertexIdx as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(GDALTriFacet), + stringify!(GDALRPCInfo), "::", - stringify!(anVertexIdx) + stringify!(dfLINE_OFF) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).anNeighborIdx as *const _ as usize }, - 12usize, + unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(GDALTriFacet), + stringify!(GDALRPCInfo), "::", - stringify!(anNeighborIdx) + stringify!(dfSAMP_OFF) ) ); -} -#[doc = " Triangle barycentric coefficients."] -#[doc = ""] -#[doc = " Conversion from cartesian (x,y) to barycentric (l1,l2,l3) with :"] -#[doc = " l1 = dfMul1X * (x - dfCxtX) + dfMul1Y * (y - dfCstY)"] -#[doc = " l2 = dfMul2X * (x - dfCxtX) + dfMul2Y * (y - dfCstY)"] -#[doc = " l3 = 1 - l1 - l2"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriBarycentricCoefficients { - #[doc = "< dfMul1X"] - pub dfMul1X: f64, - #[doc = "< dfMul1Y"] - pub dfMul1Y: f64, - #[doc = "< dfMul2X"] - pub dfMul2X: f64, - #[doc = "< dfMul2Y"] - pub dfMul2Y: f64, - #[doc = "< dfCstX"] - pub dfCstX: f64, - #[doc = "< dfCstY"] - pub dfCstY: f64, -} -#[test] -fn bindgen_test_layout_GDALTriBarycentricCoefficients() { assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLAT_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLONG_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfHEIGHT_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLINE_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, 48usize, - concat!("Size of: ", stringify!(GDALTriBarycentricCoefficients)) + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfSAMP_SCALE) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriBarycentricCoefficients)) + unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLAT_SCALE) + ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1X as *const _ as usize - }, - 0usize, + unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, + 64usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfMul1X) + stringify!(dfLONG_SCALE) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1Y as *const _ as usize - }, - 8usize, + unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, + 72usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfMul1Y) + stringify!(dfHEIGHT_SCALE) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2X as *const _ as usize - }, - 16usize, + unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, + 80usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfMul2X) + stringify!(adfLINE_NUM_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2Y as *const _ as usize - }, - 24usize, + unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, + 240usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfMul2Y) + stringify!(adfLINE_DEN_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstX as *const _ as usize - }, - 32usize, + unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, + 400usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfCstX) + stringify!(adfSAMP_NUM_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstY as *const _ as usize - }, - 40usize, + unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, + 560usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDALRPCInfo), "::", - stringify!(dfCstY) + stringify!(adfSAMP_DEN_COEFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, + 720usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMIN_LONG) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, + 728usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMIN_LAT) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, + 736usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMAX_LONG) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, + 744usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMAX_LAT) ) ); } -#[doc = " Triangulation structure"] +extern "C" { + pub fn GDALExtractRPCInfo(arg1: CSLConstList, arg2: *mut GDALRPCInfo) -> libc::c_int; +} +#[doc = " Color tuple"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct GDALTriangulation { - #[doc = "< number of facets"] - pub nFacets: libc::c_int, - #[doc = "< array of nFacets facets"] - pub pasFacets: *mut GDALTriFacet, - #[doc = "< arra of nFacets barycentric coefficients"] - pub pasFacetCoefficients: *mut GDALTriBarycentricCoefficients, +pub struct GDALColorEntry { + #[doc = " gray, red, cyan or hue"] + pub c1: libc::c_short, + #[doc = " green, magenta, or lightness"] + pub c2: libc::c_short, + #[doc = " blue, yellow, or saturation"] + pub c3: libc::c_short, + #[doc = " alpha or blackband"] + pub c4: libc::c_short, } #[test] -fn bindgen_test_layout_GDALTriangulation() { +fn bindgen_test_layout_GDALColorEntry() { assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriangulation)) + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(GDALColorEntry)) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriangulation)) + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(GDALColorEntry)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nFacets as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(GDALTriangulation), + stringify!(GDALColorEntry), "::", - stringify!(nFacets) + stringify!(c1) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pasFacets as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, + 2usize, concat!( "Offset of field: ", - stringify!(GDALTriangulation), + stringify!(GDALColorEntry), "::", - stringify!(pasFacets) + stringify!(c2) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pasFacetCoefficients as *const _ as usize - }, - 16usize, + unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, + 4usize, concat!( "Offset of field: ", - stringify!(GDALTriangulation), + stringify!(GDALColorEntry), "::", - stringify!(pasFacetCoefficients) + stringify!(c3) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(GDALColorEntry), + "::", + stringify!(c4) ) ); } extern "C" { - pub fn GDALHasTriangulation() -> libc::c_int; + pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; } extern "C" { - pub fn GDALTriangulationCreateDelaunay( - nPoints: libc::c_int, - padfX: *const f64, - padfY: *const f64, - ) -> *mut GDALTriangulation; + pub fn GDALDestroyColorTable(arg1: GDALColorTableH); } extern "C" { - pub fn GDALTriangulationComputeBarycentricCoefficients( - psDT: *mut GDALTriangulation, - padfX: *const f64, - padfY: *const f64, - ) -> libc::c_int; + pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; } extern "C" { - pub fn GDALTriangulationComputeBarycentricCoordinates( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - pdfL1: *mut f64, - pdfL2: *mut f64, - pdfL3: *mut f64, - ) -> libc::c_int; + pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; } extern "C" { - pub fn GDALTriangulationFindFacetBruteForce( - psDT: *const GDALTriangulation, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; } extern "C" { - pub fn GDALTriangulationFindFacetDirected( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; } extern "C" { - pub fn GDALTriangulationFree(psDT: *mut GDALTriangulation); + pub fn GDALGetColorEntryAsRGB( + arg1: GDALColorTableH, + arg2: libc::c_int, + arg3: *mut GDALColorEntry, + ) -> libc::c_int; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALTriangulationTerminate(); + pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); } extern "C" { - #[doc = " @endcond"] - pub fn GDALOpenVerticalShiftGrid( - pszProj4Geoidgrids: *const libc::c_char, - pbError: *mut libc::c_int, - ) -> GDALDatasetH; + pub fn GDALCreateColorRamp( + hTable: GDALColorTableH, + nStartIndex: libc::c_int, + psStartColor: *const GDALColorEntry, + nEndIndex: libc::c_int, + psEndColor: *const GDALColorEntry, + ); +} +pub mod GDALRATFieldType { + #[doc = " Field type of raster attribute table"] + pub type Type = libc::c_uint; + #[doc = " Integer field"] + pub const GFT_Integer: Type = 0; + #[doc = " Floating point (double) field"] + pub const GFT_Real: Type = 1; + #[doc = " String field"] + pub const GFT_String: Type = 2; +} +pub mod GDALRATFieldUsage { + #[doc = " Field usage of raster attribute table"] + pub type Type = libc::c_uint; + #[doc = " General purpose field."] + pub const GFU_Generic: Type = 0; + #[doc = " Histogram pixel count"] + pub const GFU_PixelCount: Type = 1; + #[doc = " Class name"] + pub const GFU_Name: Type = 2; + #[doc = " Class range minimum"] + pub const GFU_Min: Type = 3; + #[doc = " Class range maximum"] + pub const GFU_Max: Type = 4; + #[doc = " Class value (min=max)"] + pub const GFU_MinMax: Type = 5; + #[doc = " Red class color (0-255)"] + pub const GFU_Red: Type = 6; + #[doc = " Green class color (0-255)"] + pub const GFU_Green: Type = 7; + #[doc = " Blue class color (0-255)"] + pub const GFU_Blue: Type = 8; + #[doc = " Alpha (0=transparent,255=opaque)"] + pub const GFU_Alpha: Type = 9; + #[doc = " Color Range Red Minimum"] + pub const GFU_RedMin: Type = 10; + #[doc = " Color Range Green Minimum"] + pub const GFU_GreenMin: Type = 11; + #[doc = " Color Range Blue Minimum"] + pub const GFU_BlueMin: Type = 12; + #[doc = " Color Range Alpha Minimum"] + pub const GFU_AlphaMin: Type = 13; + #[doc = " Color Range Red Maximum"] + pub const GFU_RedMax: Type = 14; + #[doc = " Color Range Green Maximum"] + pub const GFU_GreenMax: Type = 15; + #[doc = " Color Range Blue Maximum"] + pub const GFU_BlueMax: Type = 16; + #[doc = " Color Range Alpha Maximum"] + pub const GFU_AlphaMax: Type = 17; + #[doc = " Maximum GFU value (equals to GFU_AlphaMax+1 currently)"] + pub const GFU_MaxCount: Type = 18; +} +pub mod GDALRATTableType { + #[doc = " RAT table type (thematic or athematic)"] + #[doc = " @since GDAL 2.4"] + pub type Type = libc::c_uint; + #[doc = " Thematic table type"] + pub const GRTT_THEMATIC: Type = 0; + #[doc = " Athematic table type"] + pub const GRTT_ATHEMATIC: Type = 1; } extern "C" { - pub fn GDALApplyVerticalShiftGrid( - hSrcDataset: GDALDatasetH, - hGridDataset: GDALDatasetH, - bInverse: libc::c_int, - dfSrcUnitToMeter: f64, - dfDstUnitToMeter: f64, - papszOptions: *const *const libc::c_char, - ) -> GDALDatasetH; + pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; } -pub type CPLThreadFunc = ::std::option::Option; extern "C" { - pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; + pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); } extern "C" { - pub fn CPLUnlockFile(hLock: *mut libc::c_void); + pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn CPLCreateMutex() -> *mut libc::c_void; + pub fn GDALRATGetNameOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; + pub fn GDALRATGetUsageOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> GDALRATFieldUsage::Type; } extern "C" { - pub fn CPLCreateOrAcquireMutex( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - ) -> libc::c_int; + pub fn GDALRATGetTypeOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> GDALRATFieldType::Type; } extern "C" { - pub fn CPLCreateOrAcquireMutexEx( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - nOptions: libc::c_int, + pub fn GDALRATGetColOfUsage( + arg1: GDALRasterAttributeTableH, + arg2: GDALRATFieldUsage::Type, ) -> libc::c_int; } extern "C" { - pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; + pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); + pub fn GDALRATGetValueAsString( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); + pub fn GDALRATGetValueAsInt( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLCleanupMasterMutex(); + pub fn GDALRATGetValueAsDouble( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + ) -> f64; } extern "C" { - pub fn CPLCreateCond() -> *mut libc::c_void; + pub fn GDALRATSetValueAsString( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const libc::c_char, + ); } extern "C" { - pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); + pub fn GDALRATSetValueAsInt( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + ); } extern "C" { - pub fn CPLCondSignal(hCond: *mut libc::c_void); + pub fn GDALRATSetValueAsDouble( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: f64, + ); } extern "C" { - pub fn CPLCondBroadcast(hCond: *mut libc::c_void); + pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn CPLDestroyCond(hCond: *mut libc::c_void); + pub fn GDALRATValuesIOAsDouble( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + pdfData: *mut f64, + ) -> CPLErr::Type; } extern "C" { - #[doc = " Contrary to what its name suggests, CPLGetPID() actually returns the thread id"] - pub fn CPLGetPID() -> GIntBig; + pub fn GDALRATValuesIOAsInteger( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + pnData: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLGetCurrentProcessID() -> libc::c_int; + pub fn GDALRATValuesIOAsString( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + papszStrList: CSLConstList, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; + pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); } extern "C" { - pub fn CPLCreateJoinableThread( - pfnMain: CPLThreadFunc, - pArg: *mut libc::c_void, - ) -> *mut libc::c_void; + pub fn GDALRATCreateColumn( + arg1: GDALRasterAttributeTableH, + arg2: *const libc::c_char, + arg3: GDALRATFieldType::Type, + arg4: GDALRATFieldUsage::Type, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); + pub fn GDALRATSetLinearBinning( + arg1: GDALRasterAttributeTableH, + arg2: f64, + arg3: f64, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLSleep(dfWaitInSeconds: f64); + pub fn GDALRATGetLinearBinning( + arg1: GDALRasterAttributeTableH, + arg2: *mut f64, + arg3: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn CPLGetThreadingModel() -> *const libc::c_char; + pub fn GDALRATSetTableType( + hRAT: GDALRasterAttributeTableH, + eInTableType: GDALRATTableType::Type, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLGetNumCPUs() -> libc::c_int; + pub fn GDALRATGetTableType(hRAT: GDALRasterAttributeTableH) -> GDALRATTableType::Type; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CPLLock { - _unused: [u8; 0], -} -pub type CPLLock = _CPLLock; -pub mod CPLLockType { - pub type Type = u32; - pub const LOCK_RECURSIVE_MUTEX: Type = 0; - pub const LOCK_ADAPTIVE_MUTEX: Type = 1; - pub const LOCK_SPIN: Type = 2; +extern "C" { + pub fn GDALRATInitializeFromColorTable( + arg1: GDALRasterAttributeTableH, + arg2: GDALColorTableH, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; + pub fn GDALRATTranslateToColorTable( + arg1: GDALRasterAttributeTableH, + nEntryCount: libc::c_int, + ) -> GDALColorTableH; } extern "C" { - pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) - -> libc::c_int; + pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); } extern "C" { - pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; + pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; } extern "C" { - pub fn CPLReleaseLock(arg1: *mut CPLLock); + pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; } extern "C" { - pub fn CPLDestroyLock(arg1: *mut CPLLock); + pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; } extern "C" { - pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); + pub fn GDALRATRemoveStatistics(arg1: GDALRasterAttributeTableH); } extern "C" { - pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; + pub fn GDALSetCacheMax(nBytes: libc::c_int); } extern "C" { - pub fn CPLGetTLSEx( - nIndex: libc::c_int, - pbMemoryErrorOccurred: *mut libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALGetCacheMax() -> libc::c_int; } extern "C" { - pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); + pub fn GDALGetCacheUsed() -> libc::c_int; } -pub type CPLTLSFreeFunc = ::std::option::Option; extern "C" { - pub fn CPLSetTLSWithFreeFunc( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - ); + pub fn GDALSetCacheMax64(nBytes: GIntBig); } extern "C" { - pub fn CPLSetTLSWithFreeFuncEx( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - pbMemoryErrorOccurred: *mut libc::c_int, - ); + pub fn GDALGetCacheMax64() -> GIntBig; } extern "C" { - pub fn CPLCleanupTLS(); + pub fn GDALGetCacheUsed64() -> GIntBig; } -pub mod GDALResampleAlg { - #[doc = " Warp Resampling Algorithm"] - pub type Type = u32; - #[doc = " Nearest neighbour (select on one input pixel)"] - pub const GRA_NearestNeighbour: Type = 0; - #[doc = " Bilinear (2x2 kernel)"] - pub const GRA_Bilinear: Type = 1; - #[doc = " Cubic Convolution Approximation (4x4 kernel)"] - pub const GRA_Cubic: Type = 2; - #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] - pub const GRA_CubicSpline: Type = 3; - #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] - pub const GRA_Lanczos: Type = 4; - #[doc = " Average (computes the average of all non-NODATA contributing pixels)"] - pub const GRA_Average: Type = 5; - #[doc = " Mode (selects the value which appears most often of all the sampled points)"] - pub const GRA_Mode: Type = 6; - #[doc = " Max (selects maximum of all non-NODATA contributing pixels)"] - pub const GRA_Max: Type = 8; - #[doc = " Min (selects minimum of all non-NODATA contributing pixels)"] - pub const GRA_Min: Type = 9; - #[doc = " Med (selects median of all non-NODATA contributing pixels)"] - pub const GRA_Med: Type = 10; - #[doc = " Q1 (selects first quartile of all non-NODATA contributing pixels)"] - pub const GRA_Q1: Type = 11; - #[doc = " Q3 (selects third quartile of all non-NODATA contributing pixels)"] - pub const GRA_Q3: Type = 12; +extern "C" { + pub fn GDALFlushCacheBlock() -> libc::c_int; } -#[doc = " @cond Doxygen_Suppress"] -pub type GDALMaskFunc = ::std::option::Option< - unsafe extern "C" fn( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pMask: *mut libc::c_void, - ) -> libc::c_int, ->; extern "C" { - pub fn GDALWarpNoDataMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, + pub fn GDALDatasetGetVirtualMem( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, nXOff: libc::c_int, nYOff: libc::c_int, nXSize: libc::c_int, nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllValid: *mut libc::c_int, - ) -> CPLErr::Type; + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: GIntBig, + nBandSpace: GIntBig, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALWarpDstAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, + pub fn GDALRasterBandGetVirtualMem( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, nXOff: libc::c_int, nYOff: libc::c_int, nXSize: libc::c_int, nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: GIntBig, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALWarpSrcAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, + pub fn GDALGetVirtualMemAuto( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + pnPixelSpace: *mut libc::c_int, + pnLineSpace: *mut GIntBig, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; +} +pub mod GDALTileOrganization { + #[doc = " Enumeration to describe the tile organization"] + pub type Type = libc::c_uint; + #[doc = " Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ..."] + pub const GTO_TIP: Type = 0; + #[doc = " Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ..."] + pub const GTO_BIT: Type = 1; + #[doc = " Band SeQuential : all the tiles of first band, all the tiles of following band..."] + pub const GTO_BSQ: Type = 2; +} +extern "C" { + pub fn GDALDatasetGetTiledVirtualMem( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, nXOff: libc::c_int, nYOff: libc::c_int, nXSize: libc::c_int, nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllOpaque: *mut libc::c_int, - ) -> CPLErr::Type; + nTileXSize: libc::c_int, + nTileYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + eTileOrganization: GDALTileOrganization::Type, + nCacheSize: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALWarpSrcMaskMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, + pub fn GDALRasterBandGetTiledVirtualMem( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, nXOff: libc::c_int, nYOff: libc::c_int, nXSize: libc::c_int, nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; + nTileXSize: libc::c_int, + nTileYSize: libc::c_int, + eBufType: GDALDataType::Type, + nCacheSize: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALWarpCutlineMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, + pub fn GDALCreatePansharpenedVRT( + pszXML: *const libc::c_char, + hPanchroBand: GDALRasterBandH, + nInputSpectralBands: libc::c_int, + pahInputSpectralBands: *mut GDALRasterBandH, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALGetJPEG2000Structure( + pszFilename: *const libc::c_char, + papszOptions: CSLConstList, + ) -> *mut CPLXMLNode; +} +extern "C" { + pub fn GDALComputeMedianCutPCT( + hRed: GDALRasterBandH, + hGreen: GDALRasterBandH, + hBlue: GDALRasterBandH, + pfnIncludePixel: ::std::option::Option< + unsafe extern "C" fn( + arg1: libc::c_int, + arg2: libc::c_int, + arg3: *mut libc::c_void, + ) -> libc::c_int, + >, + nColors: libc::c_int, + hColorTable: GDALColorTableH, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALDitherRGB2PCT( + hRed: GDALRasterBandH, + hGreen: GDALRasterBandH, + hBlue: GDALRasterBandH, + hTarget: GDALRasterBandH, + hColorTable: GDALColorTableH, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALChecksumImage( + hBand: GDALRasterBandH, nXOff: libc::c_int, nYOff: libc::c_int, nXSize: libc::c_int, nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALComputeProximity( + hSrcBand: GDALRasterBandH, + hProximityBand: GDALRasterBandH, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, ) -> CPLErr::Type; } -#[doc = " Warp control options for use with GDALWarpOperation::Initialize()"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALWarpOptions { - pub papszWarpOptions: *mut *mut libc::c_char, - #[doc = " In bytes, 0.0 for internal default"] - pub dfWarpMemoryLimit: f64, - #[doc = " Resampling algorithm to use"] - pub eResampleAlg: GDALResampleAlg::Type, - #[doc = " data type to use during warp operation, GDT_Unknown lets the algorithm"] - #[doc = "select the type"] - pub eWorkingDataType: GDALDataType::Type, - #[doc = " Source image dataset."] - pub hSrcDS: GDALDatasetH, - #[doc = " Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer()."] - pub hDstDS: GDALDatasetH, - #[doc = " Number of bands to process, may be 0 to select all bands."] - pub nBandCount: libc::c_int, - #[doc = " The band numbers for the source bands to process (1 based)"] - pub panSrcBands: *mut libc::c_int, - #[doc = " The band numbers for the destination bands to process (1 based)"] - pub panDstBands: *mut libc::c_int, - #[doc = " The source band so use as an alpha (transparency) value, 0=disabled"] - pub nSrcAlphaBand: libc::c_int, - #[doc = " The dest. band so use as an alpha (transparency) value, 0=disabled"] - pub nDstAlphaBand: libc::c_int, - #[doc = " The \"nodata\" value real component for each input band, if NULL there isn't one"] - pub padfSrcNoDataReal: *mut f64, - #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] - #[doc = "component is provided. This value is not used to flag invalid values."] - #[doc = "Only the real component is used."] - pub padfSrcNoDataImag: *mut f64, - #[doc = " The \"nodata\" value real component for each output band, if NULL there isn't one"] - pub padfDstNoDataReal: *mut f64, - #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] - #[doc = "component is provided. Note that warp operations only use real component"] - #[doc = "for flagging invalid data."] - pub padfDstNoDataImag: *mut f64, - #[doc = " GDALProgressFunc() compatible progress reporting function, or NULL"] - #[doc = "if there isn't one."] - pub pfnProgress: GDALProgressFunc, - #[doc = " Callback argument to be passed to pfnProgress."] - pub pProgressArg: *mut libc::c_void, - #[doc = " Type of spatial point transformer function"] - pub pfnTransformer: GDALTransformerFunc, - #[doc = " Handle to image transformer setup structure"] - pub pTransformerArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnSrcValidityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pSrcValidityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnSrcDensityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pSrcDensityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnDstDensityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pDstDensityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnDstValidityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pDstValidityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnPreWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - #[doc = " Unused. Must be NULL"] - pub pPreWarpProcessorArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnPostWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - #[doc = " Unused. Must be NULL"] - pub pPostWarpProcessorArg: *mut libc::c_void, - #[doc = " Optional OGRPolygonH for a masking cutline."] - pub hCutline: *mut libc::c_void, - #[doc = " Optional blending distance to apply across cutline in pixels, default is zero."] - pub dfCutlineBlendDist: f64, +extern "C" { + pub fn GDALFillNodata( + hTargetBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + dfMaxSearchDist: f64, + bDeprecatedOption: libc::c_int, + nSmoothingIterations: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALPolygonize( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hOutLayer: OGRLayerH, + iPixValField: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALFPolygonize( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hOutLayer: OGRLayerH, + iPixValField: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALSieveFilter( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hDstBand: GDALRasterBandH, + nSizeThreshold: libc::c_int, + nConnectedness: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +pub type GDALTransformerFunc = ::std::option::Option< + unsafe extern "C" fn( + pTransformerArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int, +>; +extern "C" { + #[doc = " @cond Doxygen_Suppress"] + pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALUseTransformer( + pTransformerArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateSimilarTransformer( + psTransformerArg: *mut libc::c_void, + dfSrcRatioX: f64, + dfSrcRatioY: f64, + ) -> *mut libc::c_void; +} +extern "C" { + #[doc = " @endcond"] + pub fn GDALCreateGenImgProjTransformer( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + hDstDS: GDALDatasetH, + pszDstWKT: *const libc::c_char, + bGCPUseOK: libc::c_int, + dfGCPErrorThreshold: f64, + nOrder: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer2( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer3( + pszSrcWKT: *const libc::c_char, + padfSrcGeoTransform: *const f64, + pszDstWKT: *const libc::c_char, + padfDstGeoTransform: *const f64, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer4( + hSrcSRS: OGRSpatialReferenceH, + padfSrcGeoTransform: *const f64, + hDstSRS: OGRSpatialReferenceH, + padfDstGeoTransform: *const f64, + papszOptions: *const *const libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); +} +extern "C" { + pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); +} +extern "C" { + pub fn GDALGenImgProjTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); +} +extern "C" { + pub fn GDALGetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *mut f64); +} +extern "C" { + pub fn GDALCreateReprojectionTransformer( + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateReprojectionTransformerEx( + hSrcSRS: OGRSpatialReferenceH, + hDstSRS: OGRSpatialReferenceH, + papszOptions: *const *const libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); +} +extern "C" { + pub fn GDALReprojectionTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateGCPTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + nReqOrder: libc::c_int, + bReversed: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGCPRefineTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + nReqOrder: libc::c_int, + bReversed: libc::c_int, + tolerance: f64, + minimumGcps: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALGCPTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateTPSTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + bReversed: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALTPSTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + #[doc = " @endcond"] + pub fn GDALCreateRPCTransformer( + psRPC: *mut GDALRPCInfo, + bReversed: libc::c_int, + dfPixErrThreshold: f64, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALRPCTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateGeoLocTransformer( + hBaseDS: GDALDatasetH, + papszGeolocationInfo: *mut *mut libc::c_char, + bReversed: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALGeoLocTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateApproxTransformer( + pfnRawTransformer: GDALTransformerFunc, + pRawTransformerArg: *mut libc::c_void, + dfMaxError: f64, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALApproxTransformerOwnsSubtransformer( + pCBData: *mut libc::c_void, + bOwnFlag: libc::c_int, + ); +} +extern "C" { + pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALApproxTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALSimpleImageWarp( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + nBandCount: libc::c_int, + panBandList: *mut libc::c_int, + pfnTransform: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + papszWarpOptions: *mut *mut libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALSuggestedWarpOutput( + hSrcDS: GDALDatasetH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeoTransformOut: *mut f64, + pnPixels: *mut libc::c_int, + pnLines: *mut libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALSuggestedWarpOutput2( + hSrcDS: GDALDatasetH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeoTransformOut: *mut f64, + pnPixels: *mut libc::c_int, + pnLines: *mut libc::c_int, + padfExtents: *mut f64, + nOptions: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + #[doc = " @cond Doxygen_Suppress"] + pub fn GDALSerializeTransformer( + pfnFunc: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + ) -> *mut CPLXMLNode; +} +extern "C" { + pub fn GDALDeserializeTransformer( + psTree: *mut CPLXMLNode, + ppfnFunc: *mut GDALTransformerFunc, + ppTransformArg: *mut *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + #[doc = " @endcond"] + pub fn GDALTransformGeolocations( + hXBand: GDALRasterBandH, + hYBand: GDALRasterBandH, + hZBand: GDALRasterBandH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + papszOptions: *mut *mut libc::c_char, + ) -> CPLErr::Type; +} +#[doc = " Contour writer callback type"] +pub type GDALContourWriter = ::std::option::Option< + unsafe extern "C" fn( + dfLevel: f64, + nPoints: libc::c_int, + padfX: *mut f64, + padfY: *mut f64, + arg1: *mut libc::c_void, + ) -> CPLErr::Type, +>; +#[doc = " Contour generator opaque type"] +pub type GDALContourGeneratorH = *mut libc::c_void; +extern "C" { + pub fn GDAL_CG_Create( + nWidth: libc::c_int, + nHeight: libc::c_int, + bNoDataSet: libc::c_int, + dfNoDataValue: f64, + dfContourInterval: f64, + dfContourBase: f64, + pfnWriter: GDALContourWriter, + pCBData: *mut libc::c_void, + ) -> GDALContourGeneratorH; +} +extern "C" { + pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; +} +extern "C" { + pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); +} +extern "C" { + pub fn OGRContourWriter( + arg1: f64, + arg2: libc::c_int, + arg3: *mut f64, + arg4: *mut f64, + pInfo: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + #[doc = " @endcond"] + pub fn GDALContourGenerate( + hBand: GDALRasterBandH, + dfContourInterval: f64, + dfContourBase: f64, + nFixedLevelCount: libc::c_int, + padfFixedLevels: *mut f64, + bUseNoData: libc::c_int, + dfNoDataValue: f64, + hLayer: *mut libc::c_void, + iIDField: libc::c_int, + iElevField: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALContourGenerateEx( + hBand: GDALRasterBandH, + hLayer: *mut libc::c_void, + options: CSLConstList, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRasterizeGeometries( + hDS: GDALDatasetH, + nBandCount: libc::c_int, + panBandList: *mut libc::c_int, + nGeomCount: libc::c_int, + pahGeometries: *mut OGRGeometryH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeomBurnValue: *mut f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRasterizeLayers( + hDS: GDALDatasetH, + nBandCount: libc::c_int, + panBandList: *mut libc::c_int, + nLayerCount: libc::c_int, + pahLayers: *mut OGRLayerH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfLayerBurnValues: *mut f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRasterizeLayersBuf( + pData: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nLayerCount: libc::c_int, + pahLayers: *mut OGRLayerH, + pszDstProjection: *const libc::c_char, + padfDstGeoTransform: *mut f64, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + dfBurnValue: f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +pub mod GDALGridAlgorithm { + #[doc = " Gridding Algorithms"] + pub type Type = libc::c_uint; + #[doc = " Inverse distance to a power"] + pub const GGA_InverseDistanceToAPower: Type = 1; + #[doc = " Moving Average"] + pub const GGA_MovingAverage: Type = 2; + #[doc = " Nearest Neighbor"] + pub const GGA_NearestNeighbor: Type = 3; + #[doc = " Minimum Value (Data Metric)"] + pub const GGA_MetricMinimum: Type = 4; + #[doc = " Maximum Value (Data Metric)"] + pub const GGA_MetricMaximum: Type = 5; + #[doc = " Data Range (Data Metric)"] + pub const GGA_MetricRange: Type = 6; + #[doc = " Number of Points (Data Metric)"] + pub const GGA_MetricCount: Type = 7; + #[doc = " Average Distance (Data Metric)"] + pub const GGA_MetricAverageDistance: Type = 8; + #[doc = " Average Distance Between Data Points (Data Metric)"] + pub const GGA_MetricAverageDistancePts: Type = 9; + #[doc = " Linear interpolation (from Delaunay triangulation. Since GDAL 2.1"] + pub const GGA_Linear: Type = 10; + #[doc = " Inverse distance to a power with nearest neighbor search for max points"] + pub const GGA_InverseDistanceToAPowerNearestNeighbor: Type = 11; +} +extern "C" { + pub fn GDALGridCreate( + arg1: GDALGridAlgorithm::Type, + arg2: *const libc::c_void, + arg3: GUInt32, + arg4: *const f64, + arg5: *const f64, + arg6: *const f64, + arg7: f64, + arg8: f64, + arg9: f64, + arg10: f64, + arg11: GUInt32, + arg12: GUInt32, + arg13: GDALDataType::Type, + arg14: *mut libc::c_void, + arg15: GDALProgressFunc, + arg16: *mut libc::c_void, + ) -> CPLErr::Type; } -#[test] -fn bindgen_test_layout_GDALWarpOptions() { - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papszWarpOptions) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfWarpMemoryLimit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eWorkingDataType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hSrcDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hDstDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nBandCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panSrcBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panDstBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nSrcAlphaBand) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nDstAlphaBand) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataImag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataImag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pProgressArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnTransformer) - ) - ); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridContext { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALGridContextCreate( + eAlgorithm: GDALGridAlgorithm::Type, + poOptions: *const libc::c_void, + nPoints: GUInt32, + padfX: *const f64, + padfY: *const f64, + padfZ: *const f64, + bCallerWillKeepPointArraysAlive: libc::c_int, + ) -> *mut GDALGridContext; +} +extern "C" { + pub fn GDALGridContextFree(psContext: *mut GDALGridContext); +} +extern "C" { + pub fn GDALGridContextProcess( + psContext: *mut GDALGridContext, + dfXMin: f64, + dfXMax: f64, + dfYMin: f64, + dfYMax: f64, + nXSize: GUInt32, + nYSize: GUInt32, + eType: GDALDataType::Type, + pData: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALComputeMatchingPoints( + hFirstImage: GDALDatasetH, + hSecondImage: GDALDatasetH, + papszOptions: *mut *mut libc::c_char, + pnGCPCount: *mut libc::c_int, + ) -> *mut GDAL_GCP; +} +#[doc = " Triangle fact"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriFacet { + #[doc = "< index to the padfX/padfY arrays"] + pub anVertexIdx: [libc::c_int; 3usize], + #[doc = "< index to GDALDelaunayTriangulation.pasFacets, or -1"] + pub anNeighborIdx: [libc::c_int; 3usize], +} +#[test] +fn bindgen_test_layout_GDALTriFacet() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pTransformerArg) - ) + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(GDALTriFacet)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ - as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papfnSrcPerBandValidityMaskFunc) - ) + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(GDALTriFacet)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ - as usize - }, - 144usize, + unsafe { &(*(::std::ptr::null::())).anVertexIdx as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriFacet), "::", - stringify!(papSrcPerBandValidityMaskFuncArg) + stringify!(anVertexIdx) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize - }, - 152usize, + unsafe { &(*(::std::ptr::null::())).anNeighborIdx as *const _ as usize }, + 12usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriFacet), "::", - stringify!(pfnSrcValidityMaskFunc) + stringify!(anNeighborIdx) ) ); +} +#[doc = " Triangle barycentric coefficients."] +#[doc = ""] +#[doc = " Conversion from cartesian (x,y) to barycentric (l1,l2,l3) with :"] +#[doc = " l1 = dfMul1X * (x - dfCxtX) + dfMul1Y * (y - dfCstY)"] +#[doc = " l2 = dfMul2X * (x - dfCxtX) + dfMul2Y * (y - dfCstY)"] +#[doc = " l3 = 1 - l1 - l2"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriBarycentricCoefficients { + #[doc = "< dfMul1X"] + pub dfMul1X: f64, + #[doc = "< dfMul1Y"] + pub dfMul1Y: f64, + #[doc = "< dfMul2X"] + pub dfMul2X: f64, + #[doc = "< dfMul2Y"] + pub dfMul2Y: f64, + #[doc = "< dfCstX"] + pub dfCstX: f64, + #[doc = "< dfCstY"] + pub dfCstY: f64, +} +#[test] +fn bindgen_test_layout_GDALTriBarycentricCoefficients() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcValidityMaskFuncArg) - ) + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(GDALTriBarycentricCoefficients)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcDensityMaskFunc) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALTriBarycentricCoefficients)) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize + &(*(::std::ptr::null::())).dfMul1X as *const _ as usize }, - 176usize, + 0usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(pSrcDensityMaskFuncArg) + stringify!(dfMul1X) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize + &(*(::std::ptr::null::())).dfMul1Y as *const _ as usize }, - 184usize, + 8usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(pfnDstDensityMaskFunc) + stringify!(dfMul1Y) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize + &(*(::std::ptr::null::())).dfMul2X as *const _ as usize }, - 192usize, + 16usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(pDstDensityMaskFuncArg) + stringify!(dfMul2X) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize + &(*(::std::ptr::null::())).dfMul2Y as *const _ as usize }, - 200usize, + 24usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(pfnDstValidityMaskFunc) + stringify!(dfMul2Y) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize + &(*(::std::ptr::null::())).dfCstX as *const _ as usize }, - 208usize, + 32usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(pDstValidityMaskFuncArg) + stringify!(dfCstX) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ - as usize + &(*(::std::ptr::null::())).dfCstY as *const _ as usize }, - 216usize, + 40usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(pfnPreWarpChunkProcessor) + stringify!(dfCstY) ) ); +} +#[doc = " Triangulation structure"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriangulation { + #[doc = "< number of facets"] + pub nFacets: libc::c_int, + #[doc = "< array of nFacets facets"] + pub pasFacets: *mut GDALTriFacet, + #[doc = "< arra of nFacets barycentric coefficients"] + pub pasFacetCoefficients: *mut GDALTriBarycentricCoefficients, +} +#[test] +fn bindgen_test_layout_GDALTriangulation() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPreWarpProcessorArg) - ) + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(GDALTriangulation)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ - as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPostWarpChunkProcessor) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALTriangulation)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize - }, - 240usize, + unsafe { &(*(::std::ptr::null::())).nFacets as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriangulation), "::", - stringify!(pPostWarpProcessorArg) + stringify!(nFacets) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, - 248usize, + unsafe { &(*(::std::ptr::null::())).pasFacets as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriangulation), "::", - stringify!(hCutline) + stringify!(pasFacets) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize + &(*(::std::ptr::null::())).pasFacetCoefficients as *const _ as usize }, - 256usize, + 16usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriangulation), "::", - stringify!(dfCutlineBlendDist) + stringify!(pasFacetCoefficients) ) ); } extern "C" { - pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; + pub fn GDALHasTriangulation() -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationCreateDelaunay( + nPoints: libc::c_int, + padfX: *const f64, + padfY: *const f64, + ) -> *mut GDALTriangulation; +} +extern "C" { + pub fn GDALTriangulationComputeBarycentricCoefficients( + psDT: *mut GDALTriangulation, + padfX: *const f64, + padfY: *const f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationComputeBarycentricCoordinates( + psDT: *const GDALTriangulation, + nFacetIdx: libc::c_int, + dfX: f64, + dfY: f64, + pdfL1: *mut f64, + pdfL2: *mut f64, + pdfL3: *mut f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationFindFacetBruteForce( + psDT: *const GDALTriangulation, + dfX: f64, + dfY: f64, + panOutputFacetIdx: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); + pub fn GDALTriangulationFindFacetDirected( + psDT: *const GDALTriangulation, + nFacetIdx: libc::c_int, + dfX: f64, + dfY: f64, + panOutputFacetIdx: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; + pub fn GDALTriangulationFree(psDT: *mut GDALTriangulation); } extern "C" { - pub fn GDALWarpInitDstNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + #[doc = " @cond Doxygen_Suppress"] + pub fn GDALTriangulationTerminate(); } extern "C" { - pub fn GDALWarpInitSrcNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + #[doc = " @endcond"] + pub fn GDALOpenVerticalShiftGrid( + pszProj4Geoidgrids: *const libc::c_char, + pbError: *mut libc::c_int, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALWarpInitNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + pub fn GDALApplyVerticalShiftGrid( + hSrcDataset: GDALDatasetH, + hGridDataset: GDALDatasetH, + bInverse: libc::c_int, + dfSrcUnitToMeter: f64, + dfDstUnitToMeter: f64, + papszOptions: *const *const libc::c_char, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALInfoOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALInfoOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn GDALWarpInitDstNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); + pub fn GDALInfoOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALInfoOptionsForBinary, + ) -> *mut GDALInfoOptions; } extern "C" { - pub fn GDALWarpInitSrcNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); + pub fn GDALInfoOptionsFree(psOptions: *mut GDALInfoOptions); } extern "C" { - pub fn GDALWarpResolveWorkingDataType(arg1: *mut GDALWarpOptions); + pub fn GDALInfo(hDataset: GDALDatasetH, psOptions: *const GDALInfoOptions) + -> *mut libc::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTranslateOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTranslateOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn GDALWarpInitDefaultBandMapping(arg1: *mut GDALWarpOptions, nBandCount: libc::c_int); + pub fn GDALTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALTranslateOptionsForBinary, + ) -> *mut GDALTranslateOptions; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; + pub fn GDALTranslateOptionsFree(psOptions: *mut GDALTranslateOptions); } extern "C" { - pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; + pub fn GDALTranslateOptionsSetProgress( + psOptions: *mut GDALTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn GDALReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, + pub fn GDALTranslate( + pszDestFilename: *const libc::c_char, + hSrcDataset: GDALDatasetH, + psOptions: *const GDALTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpAppOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpAppOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALWarpAppOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALWarpAppOptionsForBinary, + ) -> *mut GDALWarpAppOptions; +} +extern "C" { + pub fn GDALWarpAppOptionsFree(psOptions: *mut GDALWarpAppOptions); +} +extern "C" { + pub fn GDALWarpAppOptionsSetProgress( + psOptions: *mut GDALWarpAppOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALWarpAppOptionsSetQuiet(psOptions: *mut GDALWarpAppOptions, bQuiet: libc::c_int); +} +extern "C" { + pub fn GDALWarpAppOptionsSetWarpOption( + psOptions: *mut GDALWarpAppOptions, + pszKey: *const libc::c_char, + pszValue: *const libc::c_char, + ); +} +extern "C" { + pub fn GDALWarp( + pszDest: *const libc::c_char, hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALWarpAppOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALVectorTranslateOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALVectorTranslateOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALVectorTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALVectorTranslateOptionsForBinary, + ) -> *mut GDALVectorTranslateOptions; +} +extern "C" { + pub fn GDALVectorTranslateOptionsFree(psOptions: *mut GDALVectorTranslateOptions); +} +extern "C" { + pub fn GDALVectorTranslateOptionsSetProgress( + psOptions: *mut GDALVectorTranslateOptions, pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn GDALCreateAndReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstFilename: *const libc::c_char, - pszDstWKT: *const libc::c_char, - hDstDriver: GDALDriverH, - papszCreateOptions: *mut *mut libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, + pub fn GDALVectorTranslate( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALVectorTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDEMProcessingOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDEMProcessingOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALDEMProcessingOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALDEMProcessingOptionsForBinary, + ) -> *mut GDALDEMProcessingOptions; +} +extern "C" { + pub fn GDALDEMProcessingOptionsFree(psOptions: *mut GDALDEMProcessingOptions); +} +extern "C" { + pub fn GDALDEMProcessingOptionsSetProgress( + psOptions: *mut GDALDEMProcessingOptions, pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn GDALAutoCreateWarpedVRT( + pub fn GDALDEMProcessing( + pszDestFilename: *const libc::c_char, + hSrcDataset: GDALDatasetH, + pszProcessing: *const libc::c_char, + pszColorFilename: *const libc::c_char, + psOptions: *const GDALDEMProcessingOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALNearblackOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALNearblackOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALNearblackOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALNearblackOptionsForBinary, + ) -> *mut GDALNearblackOptions; +} +extern "C" { + pub fn GDALNearblackOptionsFree(psOptions: *mut GDALNearblackOptions); +} +extern "C" { + pub fn GDALNearblackOptionsSetProgress( + psOptions: *mut GDALNearblackOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALNearblack( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfMaxError: f64, - psOptions: *const GDALWarpOptions, + psOptions: *const GDALNearblackOptions, + pbUsageError: *mut libc::c_int, ) -> GDALDatasetH; } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridOptionsForBinary { + _unused: [u8; 0], +} extern "C" { - pub fn GDALCreateWarpedVRT( + pub fn GDALGridOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALGridOptionsForBinary, + ) -> *mut GDALGridOptions; +} +extern "C" { + pub fn GDALGridOptionsFree(psOptions: *mut GDALGridOptions); +} +extern "C" { + pub fn GDALGridOptionsSetProgress( + psOptions: *mut GDALGridOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALGrid( + pszDest: *const libc::c_char, hSrcDS: GDALDatasetH, - nPixels: libc::c_int, - nLines: libc::c_int, - padfGeoTransform: *mut f64, - psOptions: *mut GDALWarpOptions, + psOptions: *const GDALGridOptions, + pbUsageError: *mut libc::c_int, ) -> GDALDatasetH; } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterizeOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterizeOptionsForBinary { + _unused: [u8; 0], +} extern "C" { - pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; + pub fn GDALRasterizeOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALRasterizeOptionsForBinary, + ) -> *mut GDALRasterizeOptions; } -#[doc = " Opaque type representing a GDALWarpOperation object"] -pub type GDALWarpOperationH = *mut libc::c_void; extern "C" { - pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; + pub fn GDALRasterizeOptionsFree(psOptions: *mut GDALRasterizeOptions); } extern "C" { - pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); + pub fn GDALRasterizeOptionsSetProgress( + psOptions: *mut GDALRasterizeOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn GDALChunkAndWarpImage( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALRasterize( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + hSrcDS: GDALDatasetH, + psOptions: *const GDALRasterizeOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALBuildVRTOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALBuildVRTOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn GDALChunkAndWarpMulti( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALBuildVRTOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALBuildVRTOptionsForBinary, + ) -> *mut GDALBuildVRTOptions; } extern "C" { - pub fn GDALWarpRegion( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALBuildVRTOptionsFree(psOptions: *mut GDALBuildVRTOptions); +} +extern "C" { + pub fn GDALBuildVRTOptionsSetProgress( + psOptions: *mut GDALBuildVRTOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn GDALWarpRegionToBuffer( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_void, - arg7: GDALDataType::Type, - arg8: libc::c_int, - arg9: libc::c_int, - arg10: libc::c_int, - arg11: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALBuildVRT( + pszDest: *const libc::c_char, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + papszSrcDSNames: *const *const libc::c_char, + psOptions: *const GDALBuildVRTOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; } pub mod OGRAxisOrientation { #[doc = " Axis orientations (corresponds to CS_AxisOrientationEnum)."] - pub type Type = u32; + pub type Type = libc::c_uint; #[doc = "< Other"] pub const OAO_Other: Type = 0; #[doc = "< North"] @@ -9832,288 +9921,718 @@ extern "C" { ) -> f64; } extern "C" { - pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; +} +extern "C" { + pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSameEx( + arg1: OGRSpatialReferenceH, + arg2: OGRSpatialReferenceH, + papszOptions: *const *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetWellKnownGeogCS( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetFromUserInput( + hSRS: OGRSpatialReferenceH, + arg1: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRCopyGeogCSFrom( + hSRS: OGRSpatialReferenceH, + hSrcSRS: OGRSpatialReferenceH, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetTOWGS84( + hSRS: OGRSpatialReferenceH, + arg1: f64, + arg2: f64, + arg3: f64, + arg4: f64, + arg5: f64, + arg6: f64, + arg7: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetTOWGS84( + hSRS: OGRSpatialReferenceH, + arg1: *mut f64, + arg2: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRAddGuessedTOWGS84(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetCompoundCS( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + hHorizSRS: OGRSpatialReferenceH, + hVertSRS: OGRSpatialReferenceH, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGeogCS( + hSRS: OGRSpatialReferenceH, + pszGeogName: *const libc::c_char, + pszDatumName: *const libc::c_char, + pszEllipsoidName: *const libc::c_char, + dfSemiMajor: f64, + dfInvFlattening: f64, + pszPMName: *const libc::c_char, + dfPMOffset: f64, + pszUnits: *const libc::c_char, + dfConvertToRadians: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetVertCS( + hSRS: OGRSpatialReferenceH, + pszVertCSName: *const libc::c_char, + pszVertDatumName: *const libc::c_char, + nVertDatumType: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRSetAuthority( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + pszAuthority: *const libc::c_char, + nCode: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetAuthorityCode( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRGetAuthorityName( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRGetAreaOfUse( + hSRS: OGRSpatialReferenceH, + pdfWestLongitudeDeg: *mut f64, + pdfSouthLatitudeDeg: *mut f64, + pdfEastLongitudeDeg: *mut f64, + pdfNorthLatitudeDeg: *mut f64, + ppszAreaName: *mut *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetProjParm( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetProjParm( + hSRS: OGRSpatialReferenceH, + pszParmName: *const libc::c_char, + dfDefault: f64, + arg1: *mut OGRErr::Type, + ) -> f64; +} +extern "C" { + pub fn OSRSetNormProjParm( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetNormProjParm( + hSRS: OGRSpatialReferenceH, + pszParmName: *const libc::c_char, + dfDefault: f64, + arg1: *mut OGRErr::Type, + ) -> f64; +} +extern "C" { + pub fn OSRSetUTM( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNorth: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn OSRSetStatePlane( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNAD83: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetStatePlaneWithUnits( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNAD83: libc::c_int, + pszOverrideUnitName: *const libc::c_char, + dfOverrideUnit: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRFindMatches( + hSRS: OGRSpatialReferenceH, + papszOptions: *mut *mut libc::c_char, + pnEntries: *mut libc::c_int, + ppanMatchConfidence: *mut *mut libc::c_int, + ) -> *mut OGRSpatialReferenceH; +} +extern "C" { + pub fn OSRFreeSRSArray(pahSRS: *mut OGRSpatialReferenceH); +} +extern "C" { + pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRGetAxis( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + iAxis: libc::c_int, + peOrientation: *mut OGRAxisOrientation::Type, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRSetAxes( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + pszXAxisName: *const libc::c_char, + eXAxisOrientation: OGRAxisOrientation::Type, + pszYAxisName: *const libc::c_char, + eYAxisOrientation: OGRAxisOrientation::Type, + ) -> OGRErr::Type; } -extern "C" { - pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; +pub mod OSRAxisMappingStrategy { + #[doc = " Data axis to CRS axis mapping strategy."] + pub type Type = libc::c_uint; + #[doc = "< Traditional GIS order"] + pub const OAMS_TRADITIONAL_GIS_ORDER: Type = 0; + #[doc = "< Compliant with the order mandated by the CRS authority"] + pub const OAMS_AUTHORITY_COMPLIANT: Type = 1; + #[doc = "< Custom"] + pub const OAMS_CUSTOM: Type = 2; } extern "C" { - pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRGetAxisMappingStrategy(hSRS: OGRSpatialReferenceH) -> OSRAxisMappingStrategy::Type; } extern "C" { - pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetAxisMappingStrategy( + hSRS: OGRSpatialReferenceH, + strategy: OSRAxisMappingStrategy::Type, + ); } extern "C" { - pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRGetDataAxisToSRSAxisMapping( + hSRS: OGRSpatialReferenceH, + pnCount: *mut libc::c_int, + ) -> *const libc::c_int; } extern "C" { - pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; + #[doc = " Albers Conic Equal Area"] + pub fn OSRSetACEA( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; + #[doc = " Azimuthal Equidistant"] + pub fn OSRSetAE( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + #[doc = " Bonne"] + pub fn OSRSetBonne( + hSRS: OGRSpatialReferenceH, + dfStandardParallel: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + #[doc = " Cylindrical Equal Area"] + pub fn OSRSetCEA( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + #[doc = " Cassini-Soldner"] + pub fn OSRSetCS( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSameEx( - arg1: OGRSpatialReferenceH, - arg2: OGRSpatialReferenceH, - papszOptions: *const *const libc::c_char, - ) -> libc::c_int; + #[doc = " Equidistant Conic"] + pub fn OSRSetEC( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + #[doc = " Eckert I-VI"] + pub fn OSRSetEckert( + hSRS: OGRSpatialReferenceH, + nVariation: libc::c_int, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + #[doc = " Eckert IV"] + pub fn OSRSetEckertIV( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + #[doc = " Eckert VI"] + pub fn OSRSetEckertVI( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetWellKnownGeogCS( + #[doc = " Equirectangular"] + pub fn OSRSetEquirectangular( hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetFromUserInput( + #[doc = " Equirectangular generalized form"] + pub fn OSRSetEquirectangular2( hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfPseudoStdParallel1: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRCopyGeogCSFrom( + #[doc = " Gall Stereograpic"] + pub fn OSRSetGS( hSRS: OGRSpatialReferenceH, - hSrcSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetTOWGS84( + #[doc = " Goode Homolosine"] + pub fn OSRSetGH( hSRS: OGRSpatialReferenceH, - arg1: f64, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - arg6: f64, - arg7: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetTOWGS84( + #[doc = " Interrupted Goode Homolosine"] + pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + #[doc = " GEOS - Geostationary Satellite View"] + pub fn OSRSetGEOS( hSRS: OGRSpatialReferenceH, - arg1: *mut f64, - arg2: libc::c_int, + dfCentralMeridian: f64, + dfSatelliteHeight: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRAddGuessedTOWGS84(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + #[doc = " Gauss Schreiber Transverse Mercator"] + pub fn OSRSetGaussSchreiberTMercator( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetCompoundCS( + #[doc = " Gnomonic"] + pub fn OSRSetGnomonic( hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - hHorizSRS: OGRSpatialReferenceH, - hVertSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetGeogCS( + #[doc = " Hotine Oblique Mercator using azimuth angle"] + pub fn OSRSetHOM( hSRS: OGRSpatialReferenceH, - pszGeogName: *const libc::c_char, - pszDatumName: *const libc::c_char, - pszEllipsoidName: *const libc::c_char, - dfSemiMajor: f64, - dfInvFlattening: f64, - pszPMName: *const libc::c_char, - dfPMOffset: f64, - pszUnits: *const libc::c_char, - dfConvertToRadians: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfRectToSkew: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetVertCS( + pub fn OSRSetHOMAC( hSRS: OGRSpatialReferenceH, - pszVertCSName: *const libc::c_char, - pszVertDatumName: *const libc::c_char, - nVertDatumType: libc::c_int, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfRectToSkew: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + #[doc = " Hotine Oblique Mercator using two points on centerline"] + pub fn OSRSetHOM2PNO( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfLat1: f64, + dfLong1: f64, + dfLat2: f64, + dfLong2: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + #[doc = " International Map of the World Polyconic"] + pub fn OSRSetIWMPolyconic( + hSRS: OGRSpatialReferenceH, + dfLat1: f64, + dfLat2: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + #[doc = " Krovak Oblique Conic Conformal"] + pub fn OSRSetKrovak( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfPseudoStdParallelLat: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetAuthority( + #[doc = " Lambert Azimuthal Equal-Area"] + pub fn OSRSetLAEA( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszAuthority: *const libc::c_char, - nCode: libc::c_int, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAuthorityCode( + #[doc = " Lambert Conformal Conic"] + pub fn OSRSetLCC( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAuthorityName( + #[doc = " Lambert Conformal Conic 1SP"] + pub fn OSRSetLCC1SP( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAreaOfUse( + #[doc = " Lambert Conformal Conic (Belgium)"] + pub fn OSRSetLCCB( hSRS: OGRSpatialReferenceH, - pdfWestLongitudeDeg: *mut f64, - pdfSouthLatitudeDeg: *mut f64, - pdfEastLongitudeDeg: *mut f64, - pdfNorthLatitudeDeg: *mut f64, - ppszAreaName: *mut *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRSetProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetProjParm( + #[doc = " Miller Cylindrical"] + pub fn OSRSetMC( hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; -} -extern "C" { - pub fn OSRSetNormProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetNormProjParm( + #[doc = " Mercator"] + pub fn OSRSetMercator( hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetUTM( + #[doc = " Mercator 2SP"] + pub fn OSRSetMercator2SP( hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNorth: libc::c_int, + dfStdP1: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OSRSetStatePlane( + #[doc = " Mollweide"] + pub fn OSRSetMollweide( hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetStatePlaneWithUnits( + #[doc = " New Zealand Map Grid"] + pub fn OSRSetNZMG( hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - pszOverrideUnitName: *const libc::c_char, - dfOverrideUnit: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + #[doc = " Oblique Stereographic"] + pub fn OSRSetOS( + hSRS: OGRSpatialReferenceH, + dfOriginLat: f64, + dfCMeridian: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRFindMatches( + #[doc = " Orthographic"] + pub fn OSRSetOrthographic( hSRS: OGRSpatialReferenceH, - papszOptions: *mut *mut libc::c_char, - pnEntries: *mut libc::c_int, - ppanMatchConfidence: *mut *mut libc::c_int, - ) -> *mut OGRSpatialReferenceH; + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRFreeSRSArray(pahSRS: *mut OGRSpatialReferenceH); + #[doc = " Polyconic"] + pub fn OSRSetPolyconic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; + #[doc = " Polar Stereographic"] + pub fn OSRSetPS( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; + #[doc = " Robinson"] + pub fn OSRSetRobinson( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAxis( + #[doc = " Sinusoidal"] + pub fn OSRSetSinusoidal( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - iAxis: libc::c_int, - peOrientation: *mut OGRAxisOrientation::Type, - ) -> *const libc::c_char; + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetAxes( + #[doc = " Stereographic"] + pub fn OSRSetStereographic( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszXAxisName: *const libc::c_char, - eXAxisOrientation: OGRAxisOrientation::Type, - pszYAxisName: *const libc::c_char, - eYAxisOrientation: OGRAxisOrientation::Type, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } -pub mod OSRAxisMappingStrategy { - #[doc = " Data axis to CRS axis mapping strategy."] - pub type Type = u32; - #[doc = "< Traditional GIS order"] - pub const OAMS_TRADITIONAL_GIS_ORDER: Type = 0; - #[doc = "< Compliant with the order mandated by the CRS authority"] - pub const OAMS_AUTHORITY_COMPLIANT: Type = 1; - #[doc = "< Custom"] - pub const OAMS_CUSTOM: Type = 2; -} extern "C" { - pub fn OSRGetAxisMappingStrategy(hSRS: OGRSpatialReferenceH) -> OSRAxisMappingStrategy::Type; + #[doc = " Swiss Oblique Cylindrical"] + pub fn OSRSetSOC( + hSRS: OGRSpatialReferenceH, + dfLatitudeOfOrigin: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetAxisMappingStrategy( + #[doc = " Transverse Mercator"] + #[doc = ""] + #[doc = " Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 :"] + #[doc = " see OGRSpatialReference::exportToProj4()."] + pub fn OSRSetTM( hSRS: OGRSpatialReferenceH, - strategy: OSRAxisMappingStrategy::Type, - ); + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetDataAxisToSRSAxisMapping( + #[doc = " Transverse Mercator variant"] + pub fn OSRSetTMVariant( hSRS: OGRSpatialReferenceH, - pnCount: *mut libc::c_int, - ) -> *const libc::c_int; + pszVariantName: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - #[doc = " Albers Conic Equal Area"] - pub fn OSRSetACEA( + #[doc = " Tunesia Mining Grid"] + pub fn OSRSetTMG( hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, dfCenterLat: f64, dfCenterLong: f64, dfFalseEasting: f64, @@ -10121,784 +10640,1250 @@ extern "C" { ) -> OGRErr::Type; } extern "C" { - #[doc = " Azimuthal Equidistant"] - pub fn OSRSetAE( + #[doc = " Transverse Mercator (South Oriented)"] + pub fn OSRSetTMSO( hSRS: OGRSpatialReferenceH, dfCenterLat: f64, dfCenterLong: f64, + dfScale: f64, dfFalseEasting: f64, dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - #[doc = " Bonne"] - pub fn OSRSetBonne( + #[doc = " TPED (Two Point Equi Distant)"] + pub fn OSRSetTPED( hSRS: OGRSpatialReferenceH, - dfStandardParallel: f64, - dfCentralMeridian: f64, + dfLat1: f64, + dfLong1: f64, + dfLat2: f64, + dfLong2: f64, dfFalseEasting: f64, dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - #[doc = " Cylindrical Equal Area"] - pub fn OSRSetCEA( + #[doc = " VanDerGrinten"] + pub fn OSRSetVDG( hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCentralMeridian: f64, + dfCenterLong: f64, dfFalseEasting: f64, dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - #[doc = " Cassini-Soldner"] - pub fn OSRSetCS( + #[doc = " Wagner I -- VII"] + pub fn OSRSetWagner( hSRS: OGRSpatialReferenceH, + nVariation: libc::c_int, dfCenterLat: f64, - dfCenterLong: f64, dfFalseEasting: f64, dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - #[doc = " Equidistant Conic"] - pub fn OSRSetEC( + #[doc = " Quadrilateralized Spherical Cube"] + pub fn OSRSetQSC( hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, dfCenterLat: f64, dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - #[doc = " Eckert I-VI"] - pub fn OSRSetEckert( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + #[doc = " Spherical, Cross-track, Height"] + pub fn OSRSetSCH( + hSRS: OGRSpatialReferenceH, + dfPegLat: f64, + dfPegLong: f64, + dfPegHeading: f64, + dfPegHgt: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; +} +extern "C" { + pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; +} +extern "C" { + pub fn OSRCleanup(); +} +pub mod OSRCRSType { + #[doc = " \\brief Type of Coordinate Reference System (CRS)."] + pub type Type = libc::c_uint; + #[doc = " Geographic 2D CRS"] + pub const OSR_CRS_TYPE_GEOGRAPHIC_2D: Type = 0; + #[doc = " Geographic 3D CRS"] + pub const OSR_CRS_TYPE_GEOGRAPHIC_3D: Type = 1; + #[doc = " Geocentric CRS"] + pub const OSR_CRS_TYPE_GEOCENTRIC: Type = 2; + #[doc = " Projected CRS"] + pub const OSR_CRS_TYPE_PROJECTED: Type = 3; + #[doc = " Vertical CRS"] + pub const OSR_CRS_TYPE_VERTICAL: Type = 4; + #[doc = " Compound CRS"] + pub const OSR_CRS_TYPE_COMPOUND: Type = 5; + #[doc = " Other"] + pub const OSR_CRS_TYPE_OTHER: Type = 6; +} +#[doc = " \\brief Structure given overall description of a CRS."] +#[doc = ""] +#[doc = " This structure may grow over time, and should not be directly allocated by"] +#[doc = " client code."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OSRCRSInfo { + #[doc = " Authority name."] + pub pszAuthName: *mut libc::c_char, + #[doc = " Object code."] + pub pszCode: *mut libc::c_char, + #[doc = " Object name."] + pub pszName: *mut libc::c_char, + #[doc = " Object type."] + pub eType: OSRCRSType::Type, + #[doc = " Whether the object is deprecated"] + pub bDeprecated: libc::c_int, + #[doc = " Whereas the west_lon_degree, south_lat_degree, east_lon_degree and"] + #[doc = " north_lat_degree fields are valid."] + pub bBboxValid: libc::c_int, + #[doc = " Western-most longitude of the area of use, in degrees."] + pub dfWestLongitudeDeg: f64, + #[doc = " Southern-most latitude of the area of use, in degrees."] + pub dfSouthLatitudeDeg: f64, + #[doc = " Eastern-most longitude of the area of use, in degrees."] + pub dfEastLongitudeDeg: f64, + #[doc = " Northern-most latitude of the area of use, in degrees."] + pub dfNorthLatitudeDeg: f64, + #[doc = " Name of the area of use."] + pub pszAreaName: *mut libc::c_char, + #[doc = " Name of the projection method for a projected CRS. Might be NULL even"] + #[doc = "for projected CRS in some cases."] + pub pszProjectionMethod: *mut libc::c_char, +} +#[test] +fn bindgen_test_layout_OSRCRSInfo() { + assert_eq!( + ::std::mem::size_of::(), + 88usize, + concat!("Size of: ", stringify!(OSRCRSInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OSRCRSInfo)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszAuthName as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszAuthName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszCode as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszCode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszName as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(eType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bDeprecated as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(bDeprecated) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bBboxValid as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(bBboxValid) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfWestLongitudeDeg as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfWestLongitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfSouthLatitudeDeg as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfSouthLatitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfEastLongitudeDeg as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfEastLongitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfNorthLatitudeDeg as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfNorthLatitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszAreaName as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszAreaName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszProjectionMethod as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszProjectionMethod) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OSRCRSListParameters { + _unused: [u8; 0], +} +extern "C" { + pub fn OSRGetCRSInfoListFromDatabase( + pszAuthName: *const libc::c_char, + params: *const OSRCRSListParameters, + pnOutResultCount: *mut libc::c_int, + ) -> *mut *mut OSRCRSInfo; +} +extern "C" { + pub fn OSRDestroyCRSInfoList(list: *mut *mut OSRCRSInfo); +} +extern "C" { + pub fn OCTNewCoordinateTransformation( + hSourceSRS: OGRSpatialReferenceH, + hTargetSRS: OGRSpatialReferenceH, + ) -> OGRCoordinateTransformationH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRCoordinateTransformationOptions { + _unused: [u8; 0], +} +#[doc = " Coordinate transformation options."] +pub type OGRCoordinateTransformationOptionsH = *mut OGRCoordinateTransformationOptions; +extern "C" { + pub fn OCTNewCoordinateTransformationOptions() -> OGRCoordinateTransformationOptionsH; +} +extern "C" { + pub fn OCTCoordinateTransformationOptionsSetOperation( + hOptions: OGRCoordinateTransformationOptionsH, + pszCO: *const libc::c_char, + bReverseCO: libc::c_int, + ) -> libc::c_int; } extern "C" { - #[doc = " Eckert IV"] - pub fn OSRSetEckertIV( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTCoordinateTransformationOptionsSetAreaOfInterest( + hOptions: OGRCoordinateTransformationOptionsH, + dfWestLongitudeDeg: f64, + dfSouthLatitudeDeg: f64, + dfEastLongitudeDeg: f64, + dfNorthLatitudeDeg: f64, + ) -> libc::c_int; } extern "C" { - #[doc = " Eckert VI"] - pub fn OSRSetEckertVI( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTDestroyCoordinateTransformationOptions(arg1: OGRCoordinateTransformationOptionsH); } extern "C" { - #[doc = " Equirectangular"] - pub fn OSRSetEquirectangular( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTNewCoordinateTransformationEx( + hSourceSRS: OGRSpatialReferenceH, + hTargetSRS: OGRSpatialReferenceH, + hOptions: OGRCoordinateTransformationOptionsH, + ) -> OGRCoordinateTransformationH; } extern "C" { - #[doc = " Equirectangular generalized form"] - pub fn OSRSetEquirectangular2( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfPseudoStdParallel1: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); } extern "C" { - #[doc = " Gall Stereograpic"] - pub fn OSRSetGS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTTransform( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + ) -> libc::c_int; } extern "C" { - #[doc = " Goode Homolosine"] - pub fn OSRSetGH( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTTransformEx( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + pabSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - #[doc = " Interrupted Goode Homolosine"] - pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OCTTransform4D( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + t: *mut f64, + pabSuccess: *mut libc::c_int, + ) -> libc::c_int; } +pub type CPLThreadFunc = ::std::option::Option; extern "C" { - #[doc = " GEOS - Geostationary Satellite View"] - pub fn OSRSetGEOS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfSatelliteHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; } extern "C" { - #[doc = " Gauss Schreiber Transverse Mercator"] - pub fn OSRSetGaussSchreiberTMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLUnlockFile(hLock: *mut libc::c_void); } extern "C" { - #[doc = " Gnomonic"] - pub fn OSRSetGnomonic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateMutex() -> *mut libc::c_void; } extern "C" { - #[doc = " Hotine Oblique Mercator using azimuth angle"] - pub fn OSRSetHOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; } extern "C" { - pub fn OSRSetHOMAC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateOrAcquireMutex( + arg1: *mut *mut libc::c_void, + dfWaitInSeconds: f64, + ) -> libc::c_int; } extern "C" { - #[doc = " Hotine Oblique Mercator using two points on centerline"] - pub fn OSRSetHOM2PNO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateOrAcquireMutexEx( + arg1: *mut *mut libc::c_void, + dfWaitInSeconds: f64, + nOptions: libc::c_int, + ) -> libc::c_int; } extern "C" { - #[doc = " International Map of the World Polyconic"] - pub fn OSRSetIWMPolyconic( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLat2: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; } extern "C" { - #[doc = " Krovak Oblique Conic Conformal"] - pub fn OSRSetKrovak( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfPseudoStdParallelLat: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); } extern "C" { - #[doc = " Lambert Azimuthal Equal-Area"] - pub fn OSRSetLAEA( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); } extern "C" { - #[doc = " Lambert Conformal Conic"] - pub fn OSRSetLCC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCleanupMasterMutex(); } extern "C" { - #[doc = " Lambert Conformal Conic 1SP"] - pub fn OSRSetLCC1SP( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateCond() -> *mut libc::c_void; } extern "C" { - #[doc = " Lambert Conformal Conic (Belgium)"] - pub fn OSRSetLCCB( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); } extern "C" { - #[doc = " Miller Cylindrical"] - pub fn OSRSetMC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondSignal(hCond: *mut libc::c_void); } extern "C" { - #[doc = " Mercator"] - pub fn OSRSetMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondBroadcast(hCond: *mut libc::c_void); +} +extern "C" { + pub fn CPLDestroyCond(hCond: *mut libc::c_void); } extern "C" { - #[doc = " Mercator 2SP"] - pub fn OSRSetMercator2SP( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + #[doc = " Contrary to what its name suggests, CPLGetPID() actually returns the thread id"] + pub fn CPLGetPID() -> GIntBig; } extern "C" { - #[doc = " Mollweide"] - pub fn OSRSetMollweide( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetCurrentProcessID() -> libc::c_int; } extern "C" { - #[doc = " New Zealand Map Grid"] - pub fn OSRSetNZMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; } extern "C" { - #[doc = " Oblique Stereographic"] - pub fn OSRSetOS( - hSRS: OGRSpatialReferenceH, - dfOriginLat: f64, - dfCMeridian: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateJoinableThread( + pfnMain: CPLThreadFunc, + pArg: *mut libc::c_void, + ) -> *mut libc::c_void; } extern "C" { - #[doc = " Orthographic"] - pub fn OSRSetOrthographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); } extern "C" { - #[doc = " Polyconic"] - pub fn OSRSetPolyconic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLSleep(dfWaitInSeconds: f64); } extern "C" { - #[doc = " Polar Stereographic"] - pub fn OSRSetPS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetThreadingModel() -> *const libc::c_char; } extern "C" { - #[doc = " Robinson"] - pub fn OSRSetRobinson( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetNumCPUs() -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLLock { + _unused: [u8; 0], +} +pub type CPLLock = _CPLLock; +pub mod CPLLockType { + pub type Type = libc::c_uint; + pub const LOCK_RECURSIVE_MUTEX: Type = 0; + pub const LOCK_ADAPTIVE_MUTEX: Type = 1; + pub const LOCK_SPIN: Type = 2; } extern "C" { - #[doc = " Sinusoidal"] - pub fn OSRSetSinusoidal( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; } extern "C" { - #[doc = " Stereographic"] - pub fn OSRSetStereographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) + -> libc::c_int; } extern "C" { - #[doc = " Swiss Oblique Cylindrical"] - pub fn OSRSetSOC( - hSRS: OGRSpatialReferenceH, - dfLatitudeOfOrigin: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; } extern "C" { - #[doc = " Transverse Mercator"] - #[doc = ""] - #[doc = " Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 :"] - #[doc = " see OGRSpatialReference::exportToProj4()."] - pub fn OSRSetTM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLReleaseLock(arg1: *mut CPLLock); } extern "C" { - #[doc = " Transverse Mercator variant"] - pub fn OSRSetTMVariant( - hSRS: OGRSpatialReferenceH, - pszVariantName: *const libc::c_char, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLDestroyLock(arg1: *mut CPLLock); } extern "C" { - #[doc = " Tunesia Mining Grid"] - pub fn OSRSetTMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); } extern "C" { - #[doc = " Transverse Mercator (South Oriented)"] - pub fn OSRSetTMSO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; } extern "C" { - #[doc = " TPED (Two Point Equi Distant)"] - pub fn OSRSetTPED( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetTLSEx( + nIndex: libc::c_int, + pbMemoryErrorOccurred: *mut libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - #[doc = " VanDerGrinten"] - pub fn OSRSetVDG( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); } +pub type CPLTLSFreeFunc = ::std::option::Option; extern "C" { - #[doc = " Wagner I -- VII"] - pub fn OSRSetWagner( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCenterLat: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLSetTLSWithFreeFunc( + nIndex: libc::c_int, + pData: *mut libc::c_void, + pfnFree: CPLTLSFreeFunc, + ); } extern "C" { - #[doc = " Quadrilateralized Spherical Cube"] - pub fn OSRSetQSC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - ) -> OGRErr::Type; + pub fn CPLSetTLSWithFreeFuncEx( + nIndex: libc::c_int, + pData: *mut libc::c_void, + pfnFree: CPLTLSFreeFunc, + pbMemoryErrorOccurred: *mut libc::c_int, + ); +} +extern "C" { + pub fn CPLCleanupTLS(); +} +pub mod GDALResampleAlg { + #[doc = " Warp Resampling Algorithm"] + pub type Type = libc::c_uint; + #[doc = " Nearest neighbour (select on one input pixel)"] + pub const GRA_NearestNeighbour: Type = 0; + #[doc = " Bilinear (2x2 kernel)"] + pub const GRA_Bilinear: Type = 1; + #[doc = " Cubic Convolution Approximation (4x4 kernel)"] + pub const GRA_Cubic: Type = 2; + #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] + pub const GRA_CubicSpline: Type = 3; + #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] + pub const GRA_Lanczos: Type = 4; + #[doc = " Average (computes the average of all non-NODATA contributing pixels)"] + pub const GRA_Average: Type = 5; + #[doc = " Mode (selects the value which appears most often of all the sampled points)"] + pub const GRA_Mode: Type = 6; + #[doc = " Max (selects maximum of all non-NODATA contributing pixels)"] + pub const GRA_Max: Type = 8; + #[doc = " Min (selects minimum of all non-NODATA contributing pixels)"] + pub const GRA_Min: Type = 9; + #[doc = " Med (selects median of all non-NODATA contributing pixels)"] + pub const GRA_Med: Type = 10; + #[doc = " Q1 (selects first quartile of all non-NODATA contributing pixels)"] + pub const GRA_Q1: Type = 11; + #[doc = " Q3 (selects third quartile of all non-NODATA contributing pixels)"] + pub const GRA_Q3: Type = 12; +} +#[doc = " @cond Doxygen_Suppress"] +pub type GDALMaskFunc = ::std::option::Option< + unsafe extern "C" fn( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + papabyImageData: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pMask: *mut libc::c_void, + ) -> libc::c_int, +>; +extern "C" { + pub fn GDALWarpNoDataMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + papabyImageData: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + pbOutAllValid: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - #[doc = " Spherical, Cross-track, Height"] - pub fn OSRSetSCH( - hSRS: OGRSpatialReferenceH, - dfPegLat: f64, - dfPegLong: f64, - dfPegHeading: f64, - dfPegHgt: f64, - ) -> OGRErr::Type; + pub fn GDALWarpDstAlphaMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; + pub fn GDALWarpSrcAlphaMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + pbOutAllOpaque: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; + pub fn GDALWarpSrcMaskMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCleanup(); -} -pub mod OSRCRSType { - #[doc = " \\brief Type of Coordinate Reference System (CRS)."] - pub type Type = u32; - #[doc = " Geographic 2D CRS"] - pub const OSR_CRS_TYPE_GEOGRAPHIC_2D: Type = 0; - #[doc = " Geographic 3D CRS"] - pub const OSR_CRS_TYPE_GEOGRAPHIC_3D: Type = 1; - #[doc = " Geocentric CRS"] - pub const OSR_CRS_TYPE_GEOCENTRIC: Type = 2; - #[doc = " Projected CRS"] - pub const OSR_CRS_TYPE_PROJECTED: Type = 3; - #[doc = " Vertical CRS"] - pub const OSR_CRS_TYPE_VERTICAL: Type = 4; - #[doc = " Compound CRS"] - pub const OSR_CRS_TYPE_COMPOUND: Type = 5; - #[doc = " Other"] - pub const OSR_CRS_TYPE_OTHER: Type = 6; + pub fn GDALWarpCutlineMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; } -#[doc = " \\brief Structure given overall description of a CRS."] -#[doc = ""] -#[doc = " This structure may grow over time, and should not be directly allocated by"] -#[doc = " client code."] +#[doc = " Warp control options for use with GDALWarpOperation::Initialize()"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OSRCRSInfo { - #[doc = " Authority name."] - pub pszAuthName: *mut libc::c_char, - #[doc = " Object code."] - pub pszCode: *mut libc::c_char, - #[doc = " Object name."] - pub pszName: *mut libc::c_char, - #[doc = " Object type."] - pub eType: OSRCRSType::Type, - #[doc = " Whether the object is deprecated"] - pub bDeprecated: libc::c_int, - #[doc = " Whereas the west_lon_degree, south_lat_degree, east_lon_degree and"] - #[doc = " north_lat_degree fields are valid."] - pub bBboxValid: libc::c_int, - #[doc = " Western-most longitude of the area of use, in degrees."] - pub dfWestLongitudeDeg: f64, - #[doc = " Southern-most latitude of the area of use, in degrees."] - pub dfSouthLatitudeDeg: f64, - #[doc = " Eastern-most longitude of the area of use, in degrees."] - pub dfEastLongitudeDeg: f64, - #[doc = " Northern-most latitude of the area of use, in degrees."] - pub dfNorthLatitudeDeg: f64, - #[doc = " Name of the area of use."] - pub pszAreaName: *mut libc::c_char, - #[doc = " Name of the projection method for a projected CRS. Might be NULL even"] - #[doc = "for projected CRS in some cases."] - pub pszProjectionMethod: *mut libc::c_char, +pub struct GDALWarpOptions { + pub papszWarpOptions: *mut *mut libc::c_char, + #[doc = " In bytes, 0.0 for internal default"] + pub dfWarpMemoryLimit: f64, + #[doc = " Resampling algorithm to use"] + pub eResampleAlg: GDALResampleAlg::Type, + #[doc = " data type to use during warp operation, GDT_Unknown lets the algorithm"] + #[doc = "select the type"] + pub eWorkingDataType: GDALDataType::Type, + #[doc = " Source image dataset."] + pub hSrcDS: GDALDatasetH, + #[doc = " Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer()."] + pub hDstDS: GDALDatasetH, + #[doc = " Number of bands to process, may be 0 to select all bands."] + pub nBandCount: libc::c_int, + #[doc = " The band numbers for the source bands to process (1 based)"] + pub panSrcBands: *mut libc::c_int, + #[doc = " The band numbers for the destination bands to process (1 based)"] + pub panDstBands: *mut libc::c_int, + #[doc = " The source band so use as an alpha (transparency) value, 0=disabled"] + pub nSrcAlphaBand: libc::c_int, + #[doc = " The dest. band so use as an alpha (transparency) value, 0=disabled"] + pub nDstAlphaBand: libc::c_int, + #[doc = " The \"nodata\" value real component for each input band, if NULL there isn't one"] + pub padfSrcNoDataReal: *mut f64, + #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] + #[doc = "component is provided. This value is not used to flag invalid values."] + #[doc = "Only the real component is used."] + pub padfSrcNoDataImag: *mut f64, + #[doc = " The \"nodata\" value real component for each output band, if NULL there isn't one"] + pub padfDstNoDataReal: *mut f64, + #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] + #[doc = "component is provided. Note that warp operations only use real component"] + #[doc = "for flagging invalid data."] + pub padfDstNoDataImag: *mut f64, + #[doc = " GDALProgressFunc() compatible progress reporting function, or NULL"] + #[doc = "if there isn't one."] + pub pfnProgress: GDALProgressFunc, + #[doc = " Callback argument to be passed to pfnProgress."] + pub pProgressArg: *mut libc::c_void, + #[doc = " Type of spatial point transformer function"] + pub pfnTransformer: GDALTransformerFunc, + #[doc = " Handle to image transformer setup structure"] + pub pTransformerArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, + #[doc = " Unused. Must be NULL"] + pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnSrcValidityMaskFunc: GDALMaskFunc, + #[doc = " Unused. Must be NULL"] + pub pSrcValidityMaskFuncArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnSrcDensityMaskFunc: GDALMaskFunc, + #[doc = " Unused. Must be NULL"] + pub pSrcDensityMaskFuncArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnDstDensityMaskFunc: GDALMaskFunc, + #[doc = " Unused. Must be NULL"] + pub pDstDensityMaskFuncArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnDstValidityMaskFunc: GDALMaskFunc, + #[doc = " Unused. Must be NULL"] + pub pDstValidityMaskFuncArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnPreWarpChunkProcessor: ::std::option::Option< + unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, + >, + #[doc = " Unused. Must be NULL"] + pub pPreWarpProcessorArg: *mut libc::c_void, + #[doc = " Unused. Must be NULL"] + pub pfnPostWarpChunkProcessor: ::std::option::Option< + unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, + >, + #[doc = " Unused. Must be NULL"] + pub pPostWarpProcessorArg: *mut libc::c_void, + #[doc = " Optional OGRPolygonH for a masking cutline."] + pub hCutline: *mut libc::c_void, + #[doc = " Optional blending distance to apply across cutline in pixels, default is zero."] + pub dfCutlineBlendDist: f64, } #[test] -fn bindgen_test_layout_OSRCRSInfo() { +fn bindgen_test_layout_GDALWarpOptions() { + assert_eq!( + ::std::mem::size_of::(), + 264usize, + concat!("Size of: ", stringify!(GDALWarpOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALWarpOptions)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papszWarpOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(dfWarpMemoryLimit) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(eResampleAlg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(eWorkingDataType) + ) + ); assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hSrcDS) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hDstDS) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nBandCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(panSrcBands) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(panDstBands) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nSrcAlphaBand) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nDstAlphaBand) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfSrcNoDataReal) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfSrcNoDataImag) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize + }, 88usize, - concat!("Size of: ", stringify!(OSRCRSInfo)) + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfDstNoDataReal) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OSRCRSInfo)) + unsafe { + &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfDstNoDataImag) + ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAuthName as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, + 104usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszAuthName) + stringify!(pfnProgress) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszCode as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, + 112usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszCode) + stringify!(pProgressArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszName as *const _ as usize }, - 16usize, + unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, + 120usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszName) + stringify!(pfnTransformer) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 24usize, + unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, + 128usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(eType) + stringify!(pTransformerArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bDeprecated as *const _ as usize }, - 28usize, + unsafe { + &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ + as usize + }, + 136usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papfnSrcPerBandValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ + as usize + }, + 144usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papSrcPerBandValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnSrcValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize + }, + 160usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pSrcValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize + }, + 168usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnSrcDensityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize + }, + 176usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pSrcDensityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize + }, + 184usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnDstDensityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize + }, + 192usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pDstDensityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize + }, + 200usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(bDeprecated) + stringify!(pfnDstValidityMaskFunc) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bBboxValid as *const _ as usize }, - 32usize, + unsafe { + &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize + }, + 208usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(bBboxValid) + stringify!(pDstValidityMaskFuncArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfWestLongitudeDeg as *const _ as usize }, - 40usize, + unsafe { + &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ + as usize + }, + 216usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfWestLongitudeDeg) + stringify!(pfnPreWarpChunkProcessor) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSouthLatitudeDeg as *const _ as usize }, - 48usize, + unsafe { + &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize + }, + 224usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfSouthLatitudeDeg) + stringify!(pPreWarpProcessorArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfEastLongitudeDeg as *const _ as usize }, - 56usize, + unsafe { + &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ + as usize + }, + 232usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfEastLongitudeDeg) + stringify!(pfnPostWarpChunkProcessor) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfNorthLatitudeDeg as *const _ as usize }, - 64usize, + unsafe { + &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize + }, + 240usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfNorthLatitudeDeg) + stringify!(pPostWarpProcessorArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAreaName as *const _ as usize }, - 72usize, + unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, + 248usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszAreaName) + stringify!(hCutline) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszProjectionMethod as *const _ as usize }, - 80usize, + unsafe { + &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize + }, + 256usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszProjectionMethod) + stringify!(dfCutlineBlendDist) ) ); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OSRCRSListParameters { - _unused: [u8; 0], +extern "C" { + pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; } extern "C" { - pub fn OSRGetCRSInfoListFromDatabase( - pszAuthName: *const libc::c_char, - params: *const OSRCRSListParameters, - pnOutResultCount: *mut libc::c_int, - ) -> *mut *mut OSRCRSInfo; + pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); } extern "C" { - pub fn OSRDestroyCRSInfoList(list: *mut *mut OSRCRSInfo); + pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; } extern "C" { - pub fn OCTNewCoordinateTransformation( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - ) -> OGRCoordinateTransformationH; + pub fn GDALWarpInitDstNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRCoordinateTransformationOptions { - _unused: [u8; 0], +extern "C" { + pub fn GDALWarpInitSrcNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } -#[doc = " Coordinate transformation options."] -pub type OGRCoordinateTransformationOptionsH = *mut OGRCoordinateTransformationOptions; extern "C" { - pub fn OCTNewCoordinateTransformationOptions() -> OGRCoordinateTransformationOptionsH; + pub fn GDALWarpInitNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } extern "C" { - pub fn OCTCoordinateTransformationOptionsSetOperation( - hOptions: OGRCoordinateTransformationOptionsH, - pszCO: *const libc::c_char, - bReverseCO: libc::c_int, - ) -> libc::c_int; + pub fn GDALWarpInitDstNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); } extern "C" { - pub fn OCTCoordinateTransformationOptionsSetAreaOfInterest( - hOptions: OGRCoordinateTransformationOptionsH, - dfWestLongitudeDeg: f64, - dfSouthLatitudeDeg: f64, - dfEastLongitudeDeg: f64, - dfNorthLatitudeDeg: f64, - ) -> libc::c_int; + pub fn GDALWarpInitSrcNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); } extern "C" { - pub fn OCTDestroyCoordinateTransformationOptions(arg1: OGRCoordinateTransformationOptionsH); + pub fn GDALWarpResolveWorkingDataType(arg1: *mut GDALWarpOptions); } extern "C" { - pub fn OCTNewCoordinateTransformationEx( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - hOptions: OGRCoordinateTransformationOptionsH, - ) -> OGRCoordinateTransformationH; + pub fn GDALWarpInitDefaultBandMapping(arg1: *mut GDALWarpOptions, nBandCount: libc::c_int); } extern "C" { - pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); + #[doc = " @cond Doxygen_Suppress"] + pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; } extern "C" { - pub fn OCTTransform( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - ) -> libc::c_int; + pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; } extern "C" { - pub fn OCTTransformEx( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALReprojectImage( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + hDstDS: GDALDatasetH, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfWarpMemoryLimit: f64, + dfMaxError: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + psOptions: *mut GDALWarpOptions, + ) -> CPLErr::Type; } extern "C" { - pub fn OCTTransform4D( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - t: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALCreateAndReprojectImage( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstFilename: *const libc::c_char, + pszDstWKT: *const libc::c_char, + hDstDriver: GDALDriverH, + papszCreateOptions: *mut *mut libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfWarpMemoryLimit: f64, + dfMaxError: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + psOptions: *mut GDALWarpOptions, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALAutoCreateWarpedVRT( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfMaxError: f64, + psOptions: *const GDALWarpOptions, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALCreateWarpedVRT( + hSrcDS: GDALDatasetH, + nPixels: libc::c_int, + nLines: libc::c_int, + padfGeoTransform: *mut f64, + psOptions: *mut GDALWarpOptions, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; +} +#[doc = " Opaque type representing a GDALWarpOperation object"] +pub type GDALWarpOperationH = *mut libc::c_void; +extern "C" { + pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; +} +extern "C" { + pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); +} +extern "C" { + pub fn GDALChunkAndWarpImage( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALChunkAndWarpMulti( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpRegion( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: libc::c_int, + arg9: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpRegionToBuffer( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: *mut libc::c_void, + arg7: GDALDataType::Type, + arg8: libc::c_int, + arg9: libc::c_int, + arg10: libc::c_int, + arg11: libc::c_int, + ) -> CPLErr::Type; } pub mod OGRErr { #[doc = " Type for a OGR error"] #[doc = ""] #[doc = "
"] - pub type Type = u32; + pub type Type = libc::c_uint; #[doc = " Success"] #[doc = ""] #[doc = "
"] diff --git a/gdal-sys/prebuilt-bindings/gdal_3.1.rs b/gdal-sys/prebuilt-bindings/gdal_3.1.rs index 55126a1a..47c1d96d 100644 --- a/gdal-sys/prebuilt-bindings/gdal_3.1.rs +++ b/gdal-sys/prebuilt-bindings/gdal_3.1.rs @@ -1,6 +1,5 @@ -/* automatically generated by rust-bindgen 0.54.1 */ +/* automatically generated by rust-bindgen 0.59.1 */ -pub type size_t = libc::c_ulong; pub type va_list = __builtin_va_list; pub type __dev_t = libc::c_ulong; pub type __uid_t = libc::c_uint; @@ -60,7 +59,7 @@ pub struct _IO_FILE { pub _wide_data: *mut _IO_wide_data, pub _freeres_list: *mut _IO_FILE, pub _freeres_buf: *mut libc::c_void, - pub __pad5: size_t, + pub __pad5: usize, pub _mode: libc::c_int, pub _unused2: [libc::c_char; 20usize], } @@ -367,6 +366,7 @@ fn bindgen_test_layout__IO_FILE() { ) ); } +pub type wchar_t = libc::c_int; pub type time_t = __time_t; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -555,6 +555,16 @@ pub type GInt64 = GIntBig; pub type GUInt64 = GUIntBig; pub type GPtrDiff_t = GIntBig; pub type CSLConstList = *mut *mut libc::c_char; +extern "C" { + pub fn CPLAtomicAdd(ptr: *mut libc::c_int, increment: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn CPLAtomicCompareAndExchange( + ptr: *mut libc::c_int, + oldval: libc::c_int, + newval: libc::c_int, + ) -> libc::c_int; +} pub type GDALProgressFunc = ::std::option::Option< unsafe extern "C" fn( dfComplete: f64, @@ -795,16 +805,11 @@ extern "C" { pub fn VSIFFlush(arg1: *mut FILE); } extern "C" { - pub fn VSIFRead(arg1: *mut libc::c_void, arg2: size_t, arg3: size_t, arg4: *mut FILE) - -> size_t; + pub fn VSIFRead(arg1: *mut libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) -> usize; } extern "C" { - pub fn VSIFWrite( - arg1: *const libc::c_void, - arg2: size_t, - arg3: size_t, - arg4: *mut FILE, - ) -> size_t; + pub fn VSIFWrite(arg1: *const libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) + -> usize; } extern "C" { pub fn VSIFGets( @@ -862,27 +867,27 @@ extern "C" { extern "C" { pub fn VSIFReadL( arg1: *mut libc::c_void, - arg2: size_t, - arg3: size_t, + arg2: usize, + arg3: usize, arg4: *mut VSILFILE, - ) -> size_t; + ) -> usize; } extern "C" { pub fn VSIFReadMultiRangeL( nRanges: libc::c_int, ppData: *mut *mut libc::c_void, panOffsets: *const vsi_l_offset, - panSizes: *const size_t, + panSizes: *const usize, arg1: *mut VSILFILE, ) -> libc::c_int; } extern "C" { pub fn VSIFWriteL( arg1: *const libc::c_void, - arg2: size_t, - arg3: size_t, + arg2: usize, + arg3: usize, arg4: *mut VSILFILE, - ) -> size_t; + ) -> usize; } extern "C" { pub fn VSIFEofL(arg1: *mut VSILFILE) -> libc::c_int; @@ -900,7 +905,7 @@ extern "C" { pub fn VSIFPutcL(arg1: libc::c_int, arg2: *mut VSILFILE) -> libc::c_int; } pub mod VSIRangeStatus { - pub type Type = u32; + pub type Type = libc::c_uint; pub const VSI_RANGE_STATUS_UNKNOWN: Type = 0; pub const VSI_RANGE_STATUS_DATA: Type = 1; pub const VSI_RANGE_STATUS_HOLE: Type = 2; @@ -986,70 +991,70 @@ extern "C" { ) -> libc::c_int; } extern "C" { - pub fn VSICalloc(arg1: size_t, arg2: size_t) -> *mut libc::c_void; + pub fn VSICalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn VSIMalloc(arg1: size_t) -> *mut libc::c_void; + pub fn VSIMalloc(arg1: usize) -> *mut libc::c_void; } extern "C" { pub fn VSIFree(arg1: *mut libc::c_void); } extern "C" { - pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: size_t) -> *mut libc::c_void; + pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } extern "C" { pub fn VSIStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; } extern "C" { - pub fn VSIMallocAligned(nAlignment: size_t, nSize: size_t) -> *mut libc::c_void; + pub fn VSIMallocAligned(nAlignment: usize, nSize: usize) -> *mut libc::c_void; } extern "C" { - pub fn VSIMallocAlignedAuto(nSize: size_t) -> *mut libc::c_void; + pub fn VSIMallocAlignedAuto(nSize: usize) -> *mut libc::c_void; } extern "C" { pub fn VSIFreeAligned(ptr: *mut libc::c_void); } extern "C" { pub fn VSIMallocAlignedAutoVerbose( - nSize: size_t, + nSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; } extern "C" { - pub fn VSIMalloc2(nSize1: size_t, nSize2: size_t) -> *mut libc::c_void; + pub fn VSIMalloc2(nSize1: usize, nSize2: usize) -> *mut libc::c_void; } extern "C" { - pub fn VSIMalloc3(nSize1: size_t, nSize2: size_t, nSize3: size_t) -> *mut libc::c_void; + pub fn VSIMalloc3(nSize1: usize, nSize2: usize, nSize3: usize) -> *mut libc::c_void; } extern "C" { pub fn VSIMallocVerbose( - nSize: size_t, + nSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; } extern "C" { pub fn VSIMalloc2Verbose( - nSize1: size_t, - nSize2: size_t, + nSize1: usize, + nSize2: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; } extern "C" { pub fn VSIMalloc3Verbose( - nSize1: size_t, - nSize2: size_t, - nSize3: size_t, + nSize1: usize, + nSize2: usize, + nSize3: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; } extern "C" { pub fn VSICallocVerbose( - nCount: size_t, - nSize: size_t, + nCount: usize, + nSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; @@ -1057,7 +1062,7 @@ extern "C" { extern "C" { pub fn VSIReallocVerbose( pOldPtr: *mut libc::c_void, - nNewSize: size_t, + nNewSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; @@ -1349,10 +1354,10 @@ extern "C" { pub type VSIWriteFunction = ::std::option::Option< unsafe extern "C" fn( ptr: *const libc::c_void, - size: size_t, - nmemb: size_t, + size: usize, + nmemb: usize, stream: *mut FILE, - ) -> size_t, + ) -> usize, >; extern "C" { pub fn VSIStdoutSetRedirection(pFct: VSIWriteFunction, stream: *mut FILE); @@ -1418,9 +1423,9 @@ pub type VSIFilesystemPluginReadCallback = ::std::option::Option< unsafe extern "C" fn( pFile: *mut libc::c_void, pBuffer: *mut libc::c_void, - nSize: size_t, - nCount: size_t, - ) -> size_t, + nSize: usize, + nCount: usize, + ) -> usize, >; pub type VSIFilesystemPluginReadMultiRangeCallback = ::std::option::Option< unsafe extern "C" fn( @@ -1428,7 +1433,7 @@ pub type VSIFilesystemPluginReadMultiRangeCallback = ::std::option::Option< nRanges: libc::c_int, ppData: *mut *mut libc::c_void, panOffsets: *const vsi_l_offset, - panSizes: *const size_t, + panSizes: *const usize, ) -> libc::c_int, >; pub type VSIFilesystemPluginGetRangeStatusCallback = ::std::option::Option< @@ -1444,9 +1449,9 @@ pub type VSIFilesystemPluginWriteCallback = ::std::option::Option< unsafe extern "C" fn( pFile: *mut libc::c_void, pBuffer: *const libc::c_void, - nSize: size_t, - nCount: size_t, - ) -> size_t, + nSize: usize, + nCount: usize, + ) -> usize, >; pub type VSIFilesystemPluginFlushCallback = ::std::option::Option libc::c_int>; @@ -1746,7 +1751,7 @@ extern "C" { pub fn VSILocalTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; } pub mod CPLErr { - pub type Type = u32; + pub type Type = libc::c_uint; pub const CE_None: Type = 0; pub const CE_Debug: Type = 1; pub const CE_Warning: Type = 2; @@ -1872,13 +1877,13 @@ extern "C" { pub fn CPLSetThreadLocalConfigOptions(papszConfigOptions: *const *const libc::c_char); } extern "C" { - pub fn CPLMalloc(arg1: size_t) -> *mut libc::c_void; + pub fn CPLMalloc(arg1: usize) -> *mut libc::c_void; } extern "C" { - pub fn CPLCalloc(arg1: size_t, arg2: size_t) -> *mut libc::c_void; + pub fn CPLCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: size_t) -> *mut libc::c_void; + pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } extern "C" { pub fn CPLStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; @@ -2318,20 +2323,20 @@ extern "C" { extern "C" { pub fn CPLZLibDeflate( ptr: *const libc::c_void, - nBytes: size_t, + nBytes: usize, nLevel: libc::c_int, outptr: *mut libc::c_void, - nOutAvailableBytes: size_t, - pnOutBytes: *mut size_t, + nOutAvailableBytes: usize, + pnOutBytes: *mut usize, ) -> *mut libc::c_void; } extern "C" { pub fn CPLZLibInflate( ptr: *const libc::c_void, - nBytes: size_t, + nBytes: usize, outptr: *mut libc::c_void, - nOutAvailableBytes: size_t, - pnOutBytes: *mut size_t, + nOutAvailableBytes: usize, + pnOutBytes: *mut usize, ) -> *mut libc::c_void; } extern "C" { @@ -2350,1207 +2355,1794 @@ extern "C" { extern "C" { pub fn CPLIsPowerOfTwo(i: libc::c_uint) -> libc::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLVirtualMem { - _unused: [u8; 0], -} -pub type CPLVirtualMemCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: size_t, - pPageToFill: *mut libc::c_void, - nToFill: size_t, - pUserData: *mut libc::c_void, - ), ->; -pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: size_t, - pPageToBeEvicted: *const libc::c_void, - nToBeEvicted: size_t, - pUserData: *mut libc::c_void, - ), ->; -pub type CPLVirtualMemFreeUserData = - ::std::option::Option; -pub mod CPLVirtualMemAccessMode { - pub type Type = u32; - pub const VIRTUALMEM_READONLY: Type = 0; - pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; - pub const VIRTUALMEM_READWRITE: Type = 2; -} extern "C" { - pub fn CPLGetPageSize() -> size_t; + pub fn CSLAddString( + papszStrList: *mut *mut libc::c_char, + pszNewString: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLVirtualMemNew( - nSize: size_t, - nCacheSize: size_t, - nPageSizeHint: size_t, - bSingleThreadUsage: libc::c_int, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnCachePage: CPLVirtualMemCachePageCbk, - pfnUnCachePage: CPLVirtualMemUnCachePageCbk, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLAddStringMayFail( + papszStrList: *mut *mut libc::c_char, + pszNewString: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; + pub fn CSLCount(papszStrList: CSLConstList) -> libc::c_int; } extern "C" { - pub fn CPLVirtualMemFileMapNew( - fp: *mut VSILFILE, - nOffset: vsi_l_offset, - nLength: vsi_l_offset, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLGetField(arg1: CSLConstList, arg2: libc::c_int) -> *const libc::c_char; } extern "C" { - pub fn CPLVirtualMemDerivedNew( - pVMemBase: *mut CPLVirtualMem, - nOffset: vsi_l_offset, - nSize: vsi_l_offset, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLDestroy(papszStrList: *mut *mut libc::c_char); } extern "C" { - pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); + pub fn CSLDuplicate(papszStrList: CSLConstList) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; + pub fn CSLMerge( + papszOrig: *mut *mut libc::c_char, + papszOverride: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> size_t; + pub fn CSLTokenizeString(pszString: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; + pub fn CSLTokenizeStringComplex( + pszString: *const libc::c_char, + pszDelimiter: *const libc::c_char, + bHonourStrings: libc::c_int, + bAllowEmptyTokens: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; + pub fn CSLTokenizeString2( + pszString: *const libc::c_char, + pszDelimiter: *const libc::c_char, + nCSLTFlags: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> size_t; + pub fn CSLPrint(papszStrList: CSLConstList, fpOut: *mut FILE) -> libc::c_int; } extern "C" { - pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; + pub fn CSLLoad(pszFname: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); + pub fn CSLLoad2( + pszFname: *const libc::c_char, + nMaxLines: libc::c_int, + nMaxCols: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); + pub fn CSLSave(papszStrList: CSLConstList, pszFname: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLVirtualMemPin( - ctxt: *mut CPLVirtualMem, - pAddr: *mut libc::c_void, - nSize: size_t, - bWriteOp: libc::c_int, - ); + pub fn CSLInsertStrings( + papszStrList: *mut *mut libc::c_char, + nInsertAtLineNo: libc::c_int, + papszNewLines: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLVirtualMemManagerTerminate(); -} -pub mod CPLXMLNodeType { - pub type Type = u32; - pub const CXT_Element: Type = 0; - pub const CXT_Text: Type = 1; - pub const CXT_Attribute: Type = 2; - pub const CXT_Comment: Type = 3; - pub const CXT_Literal: Type = 4; + pub fn CSLInsertString( + papszStrList: *mut *mut libc::c_char, + nInsertAtLineNo: libc::c_int, + pszNewLine: *const libc::c_char, + ) -> *mut *mut libc::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLXMLNode { - pub eType: CPLXMLNodeType::Type, - pub pszValue: *mut libc::c_char, - pub psNext: *mut CPLXMLNode, - pub psChild: *mut CPLXMLNode, +extern "C" { + pub fn CSLRemoveStrings( + papszStrList: *mut *mut libc::c_char, + nFirstLineToDelete: libc::c_int, + nNumToRemove: libc::c_int, + ppapszRetStrings: *mut *mut *mut libc::c_char, + ) -> *mut *mut libc::c_char; } -#[test] -fn bindgen_test_layout_CPLXMLNode() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLXMLNode)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLXMLNode)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(eType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(pszValue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psNext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psChild) - ) - ); +extern "C" { + pub fn CSLFindString(papszList: CSLConstList, pszTarget: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CSLFindStringCaseSensitive( + papszList: CSLConstList, + pszTarget: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); + pub fn CSLPartialFindString( + papszHaystack: CSLConstList, + pszNeedle: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CSLFindName(papszStrList: CSLConstList, pszName: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLSearchXMLNode( - poRoot: *mut CPLXMLNode, - pszTarget: *const libc::c_char, - ) -> *mut CPLXMLNode; + pub fn CSLFetchBoolean( + papszStrList: CSLConstList, + pszKey: *const libc::c_char, + bDefault: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLGetXMLValue( - poRoot: *const CPLXMLNode, - pszPath: *const libc::c_char, - pszDefault: *const libc::c_char, - ) -> *const libc::c_char; + pub fn CSLTestBoolean(pszValue: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLCreateXMLNode( - poParent: *mut CPLXMLNode, - eType: CPLXMLNodeType::Type, - pszText: *const libc::c_char, - ) -> *mut CPLXMLNode; + pub fn CPLTestBoolean(pszValue: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; + pub fn CPLParseNameValue( + pszNameValue: *const libc::c_char, + ppszKey: *mut *mut libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); + pub fn CSLFetchNameValue( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; + pub fn CSLFetchNameValueDef( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + pszDefault: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); + pub fn CSLFetchNameValueMultiple( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLCreateXMLElementAndValue( - psParent: *mut CPLXMLNode, + pub fn CSLAddNameValue( + papszStrList: *mut *mut libc::c_char, pszName: *const libc::c_char, pszValue: *const libc::c_char, - ) -> *mut CPLXMLNode; + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLAddXMLAttributeAndValue( - psParent: *mut CPLXMLNode, + pub fn CSLSetNameValue( + papszStrList: *mut *mut libc::c_char, pszName: *const libc::c_char, pszValue: *const libc::c_char, + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn CSLSetNameValueSeparator( + papszStrList: *mut *mut libc::c_char, + pszSeparator: *const libc::c_char, ); } extern "C" { - pub fn CPLCloneXMLTree(psTree: *const CPLXMLNode) -> *mut CPLXMLNode; + pub fn CSLParseCommandLine(pszCommandLine: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLSetXMLValue( - psRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszValue: *const libc::c_char, + pub fn CPLEscapeString( + pszString: *const libc::c_char, + nLength: libc::c_int, + nScheme: libc::c_int, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLUnescapeString( + pszString: *const libc::c_char, + pnLength: *mut libc::c_int, + nScheme: libc::c_int, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLBinaryToHex(nBytes: libc::c_int, pabyData: *const GByte) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLHexToBinary(pszHex: *const libc::c_char, pnBytes: *mut libc::c_int) -> *mut GByte; +} +extern "C" { + pub fn CPLBase64Encode(nBytes: libc::c_int, pabyData: *const GByte) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLBase64DecodeInPlace(pszBase64: *mut GByte) -> libc::c_int; +} +pub mod CPLValueType { + pub type Type = libc::c_uint; + pub const CPL_VALUE_STRING: Type = 0; + pub const CPL_VALUE_REAL: Type = 1; + pub const CPL_VALUE_INTEGER: Type = 2; +} +extern "C" { + pub fn CPLGetValueType(pszValue: *const libc::c_char) -> CPLValueType::Type; +} +extern "C" { + pub fn CPLStrlcpy( + pszDest: *mut libc::c_char, + pszSrc: *const libc::c_char, + nDestSize: usize, + ) -> usize; +} +extern "C" { + pub fn CPLStrlcat( + pszDest: *mut libc::c_char, + pszSrc: *const libc::c_char, + nDestSize: usize, + ) -> usize; +} +extern "C" { + pub fn CPLStrnlen(pszStr: *const libc::c_char, nMaxLen: usize) -> usize; +} +extern "C" { + pub fn CPLvsnprintf( + str_: *mut libc::c_char, + size: usize, + fmt: *const libc::c_char, + args: *mut __va_list_tag, ) -> libc::c_int; } extern "C" { - pub fn CPLStripXMLNamespace( - psRoot: *mut CPLXMLNode, - pszNameSpace: *const libc::c_char, - bRecurse: libc::c_int, - ); + pub fn CPLsnprintf( + str_: *mut libc::c_char, + size: usize, + fmt: *const libc::c_char, + ... + ) -> libc::c_int; } extern "C" { - pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); + pub fn CPLsprintf(str_: *mut libc::c_char, fmt: *const libc::c_char, ...) -> libc::c_int; } extern "C" { - pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CPLprintf(fmt: *const libc::c_char, ...) -> libc::c_int; } extern "C" { - pub fn CPLSerializeXMLTreeToFile( - psTree: *const CPLXMLNode, - pszFilename: *const libc::c_char, + pub fn CPLsscanf(str_: *const libc::c_char, fmt: *const libc::c_char, ...) -> libc::c_int; +} +extern "C" { + pub fn CPLSPrintf(fmt: *const libc::c_char, ...) -> *const libc::c_char; +} +extern "C" { + pub fn CSLAppendPrintf( + papszStrList: *mut *mut libc::c_char, + fmt: *const libc::c_char, + ... + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn CPLVASPrintf( + buf: *mut *mut libc::c_char, + fmt: *const libc::c_char, + args: *mut __va_list_tag, ) -> libc::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, +extern "C" { + pub fn CPLEncodingCharSize(pszEncoding: *const libc::c_char) -> libc::c_int; } -#[test] -fn bindgen_test_layout_OGREnvelope() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(OGREnvelope)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope)) +extern "C" { + pub fn CPLClearRecodeWarningFlags(); +} +extern "C" { + pub fn CPLRecode( + pszSource: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLRecodeFromWChar( + pwszSource: *const wchar_t, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLRecodeToWChar( + pszSource: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut wchar_t; +} +extern "C" { + pub fn CPLIsUTF8(pabyData: *const libc::c_char, nLen: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn CPLForceToASCII( + pabyData: *const libc::c_char, + nLen: libc::c_int, + chReplacementChar: libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLStrlenUTF8(pszUTF8Str: *const libc::c_char) -> libc::c_int; +} +extern "C" { + pub fn CPLCanRecode( + pszTestStr: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLHashSet { + _unused: [u8; 0], +} +pub type CPLHashSet = _CPLHashSet; +pub type CPLHashSetHashFunc = + ::std::option::Option libc::c_ulong>; +pub type CPLHashSetEqualFunc = ::std::option::Option< + unsafe extern "C" fn(elt1: *const libc::c_void, elt2: *const libc::c_void) -> libc::c_int, +>; +pub type CPLHashSetFreeEltFunc = + ::std::option::Option; +pub type CPLHashSetIterEltFunc = ::std::option::Option< + unsafe extern "C" fn(elt: *mut libc::c_void, user_data: *mut libc::c_void) -> libc::c_int, +>; +extern "C" { + pub fn CPLHashSetNew( + fnHashFunc: CPLHashSetHashFunc, + fnEqualFunc: CPLHashSetEqualFunc, + fnFreeEltFunc: CPLHashSetFreeEltFunc, + ) -> *mut CPLHashSet; +} +extern "C" { + pub fn CPLHashSetDestroy(set: *mut CPLHashSet); +} +extern "C" { + pub fn CPLHashSetClear(set: *mut CPLHashSet); +} +extern "C" { + pub fn CPLHashSetSize(set: *const CPLHashSet) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetForeach( + set: *mut CPLHashSet, + fnIterFunc: CPLHashSetIterEltFunc, + user_data: *mut libc::c_void, ); +} +extern "C" { + pub fn CPLHashSetInsert(set: *mut CPLHashSet, elt: *mut libc::c_void) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetLookup(set: *mut CPLHashSet, elt: *const libc::c_void) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLHashSetRemove(set: *mut CPLHashSet, elt: *const libc::c_void) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetRemoveDeferRehash( + set: *mut CPLHashSet, + elt: *const libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetHashPointer(elt: *const libc::c_void) -> libc::c_ulong; +} +extern "C" { + pub fn CPLHashSetEqualPointer( + elt1: *const libc::c_void, + elt2: *const libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetHashStr(pszStr: *const libc::c_void) -> libc::c_ulong; +} +extern "C" { + pub fn CPLHashSetEqualStr( + pszStr1: *const libc::c_void, + pszStr2: *const libc::c_void, + ) -> libc::c_int; +} +pub type CPLList = _CPLList; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLList { + pub pData: *mut libc::c_void, + pub psNext: *mut _CPLList, +} +#[test] +fn bindgen_test_layout__CPLList() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinX) - ) + ::std::mem::size_of::<_CPLList>(), + 16usize, + concat!("Size of: ", stringify!(_CPLList)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + ::std::mem::align_of::<_CPLList>(), 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxX) - ) + concat!("Alignment of ", stringify!(_CPLList)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, + unsafe { &(*(::std::ptr::null::<_CPLList>())).pData as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(OGREnvelope), + stringify!(_CPLList), "::", - stringify!(MinY) + stringify!(pData) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, + unsafe { &(*(::std::ptr::null::<_CPLList>())).psNext as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGREnvelope), + stringify!(_CPLList), "::", - stringify!(MaxY) + stringify!(psNext) ) ); } +extern "C" { + pub fn CPLListAppend(psList: *mut CPLList, pData: *mut libc::c_void) -> *mut CPLList; +} +extern "C" { + pub fn CPLListInsert( + psList: *mut CPLList, + pData: *mut libc::c_void, + nPosition: libc::c_int, + ) -> *mut CPLList; +} +extern "C" { + pub fn CPLListGetLast(psList: *mut CPLList) -> *mut CPLList; +} +extern "C" { + pub fn CPLListGet(psList: *mut CPLList, nPosition: libc::c_int) -> *mut CPLList; +} +extern "C" { + pub fn CPLListCount(psList: *const CPLList) -> libc::c_int; +} +extern "C" { + pub fn CPLListRemove(psList: *mut CPLList, nPosition: libc::c_int) -> *mut CPLList; +} +extern "C" { + pub fn CPLListDestroy(psList: *mut CPLList); +} +extern "C" { + pub fn CPLListGetNext(psElement: *const CPLList) -> *mut CPLList; +} +extern "C" { + pub fn CPLListGetData(psElement: *const CPLList) -> *mut libc::c_void; +} +pub mod CPLXMLNodeType { + pub type Type = libc::c_uint; + pub const CXT_Element: Type = 0; + pub const CXT_Text: Type = 1; + pub const CXT_Attribute: Type = 2; + pub const CXT_Comment: Type = 3; + pub const CXT_Literal: Type = 4; +} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGREnvelope3D { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, - pub MinZ: f64, - pub MaxZ: f64, +pub struct CPLXMLNode { + pub eType: CPLXMLNodeType::Type, + pub pszValue: *mut libc::c_char, + pub psNext: *mut CPLXMLNode, + pub psChild: *mut CPLXMLNode, } #[test] -fn bindgen_test_layout_OGREnvelope3D() { +fn bindgen_test_layout_CPLXMLNode() { assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(OGREnvelope3D)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLXMLNode)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGREnvelope3D)) + concat!("Alignment of ", stringify!(CPLXMLNode)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MinX) + stringify!(eType) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MaxX) + stringify!(pszValue) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, 16usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MinY) + stringify!(psNext) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, 24usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MaxZ) + stringify!(psChild) ) ); } extern "C" { - pub fn OGRMalloc(arg1: size_t) -> *mut libc::c_void; + pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRCalloc(arg1: size_t, arg2: size_t) -> *mut libc::c_void; + pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); } extern "C" { - pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: size_t) -> *mut libc::c_void; + pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; + pub fn CPLSearchXMLNode( + poRoot: *mut CPLXMLNode, + pszTarget: *const libc::c_char, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRFree(arg1: *mut libc::c_void); -} -pub mod OGRwkbGeometryType { - pub type Type = u32; - pub const wkbUnknown: Type = 0; - pub const wkbPoint: Type = 1; - pub const wkbLineString: Type = 2; - pub const wkbPolygon: Type = 3; - pub const wkbMultiPoint: Type = 4; - pub const wkbMultiLineString: Type = 5; - pub const wkbMultiPolygon: Type = 6; - pub const wkbGeometryCollection: Type = 7; - pub const wkbCircularString: Type = 8; - pub const wkbCompoundCurve: Type = 9; - pub const wkbCurvePolygon: Type = 10; - pub const wkbMultiCurve: Type = 11; - pub const wkbMultiSurface: Type = 12; - pub const wkbCurve: Type = 13; - pub const wkbSurface: Type = 14; - pub const wkbPolyhedralSurface: Type = 15; - pub const wkbTIN: Type = 16; - pub const wkbTriangle: Type = 17; - pub const wkbNone: Type = 100; - pub const wkbLinearRing: Type = 101; - pub const wkbCircularStringZ: Type = 1008; - pub const wkbCompoundCurveZ: Type = 1009; - pub const wkbCurvePolygonZ: Type = 1010; - pub const wkbMultiCurveZ: Type = 1011; - pub const wkbMultiSurfaceZ: Type = 1012; - pub const wkbCurveZ: Type = 1013; - pub const wkbSurfaceZ: Type = 1014; - pub const wkbPolyhedralSurfaceZ: Type = 1015; - pub const wkbTINZ: Type = 1016; - pub const wkbTriangleZ: Type = 1017; - pub const wkbPointM: Type = 2001; - pub const wkbLineStringM: Type = 2002; - pub const wkbPolygonM: Type = 2003; - pub const wkbMultiPointM: Type = 2004; - pub const wkbMultiLineStringM: Type = 2005; - pub const wkbMultiPolygonM: Type = 2006; - pub const wkbGeometryCollectionM: Type = 2007; - pub const wkbCircularStringM: Type = 2008; - pub const wkbCompoundCurveM: Type = 2009; - pub const wkbCurvePolygonM: Type = 2010; - pub const wkbMultiCurveM: Type = 2011; - pub const wkbMultiSurfaceM: Type = 2012; - pub const wkbCurveM: Type = 2013; - pub const wkbSurfaceM: Type = 2014; - pub const wkbPolyhedralSurfaceM: Type = 2015; - pub const wkbTINM: Type = 2016; - pub const wkbTriangleM: Type = 2017; - pub const wkbPointZM: Type = 3001; - pub const wkbLineStringZM: Type = 3002; - pub const wkbPolygonZM: Type = 3003; - pub const wkbMultiPointZM: Type = 3004; - pub const wkbMultiLineStringZM: Type = 3005; - pub const wkbMultiPolygonZM: Type = 3006; - pub const wkbGeometryCollectionZM: Type = 3007; - pub const wkbCircularStringZM: Type = 3008; - pub const wkbCompoundCurveZM: Type = 3009; - pub const wkbCurvePolygonZM: Type = 3010; - pub const wkbMultiCurveZM: Type = 3011; - pub const wkbMultiSurfaceZM: Type = 3012; - pub const wkbCurveZM: Type = 3013; - pub const wkbSurfaceZM: Type = 3014; - pub const wkbPolyhedralSurfaceZM: Type = 3015; - pub const wkbTINZM: Type = 3016; - pub const wkbTriangleZM: Type = 3017; - pub const wkbPoint25D: Type = 2147483649; - pub const wkbLineString25D: Type = 2147483650; - pub const wkbPolygon25D: Type = 2147483651; - pub const wkbMultiPoint25D: Type = 2147483652; - pub const wkbMultiLineString25D: Type = 2147483653; - pub const wkbMultiPolygon25D: Type = 2147483654; - pub const wkbGeometryCollection25D: Type = 2147483655; + pub fn CPLGetXMLValue( + poRoot: *const CPLXMLNode, + pszPath: *const libc::c_char, + pszDefault: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGRMergeGeometryTypes( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - ) -> OGRwkbGeometryType::Type; + pub fn CPLCreateXMLNode( + poParent: *mut CPLXMLNode, + eType: CPLXMLNodeType::Type, + pszText: *const libc::c_char, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRMergeGeometryTypesEx( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - bAllowPromotingToCurves: libc::c_int, - ) -> OGRwkbGeometryType::Type; + pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; } extern "C" { - pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); } extern "C" { - pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; } extern "C" { - pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); } extern "C" { - pub fn OGR_GT_SetModifier( - eType: OGRwkbGeometryType::Type, - bSetZ: libc::c_int, - bSetM: libc::c_int, - ) -> OGRwkbGeometryType::Type; + pub fn CPLCreateXMLElementAndValue( + psParent: *mut CPLXMLNode, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLAddXMLAttributeAndValue( + psParent: *mut CPLXMLNode, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ); } extern "C" { - pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLCloneXMLTree(psTree: *const CPLXMLNode) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_GT_IsSubClassOf( - eType: OGRwkbGeometryType::Type, - eSuperType: OGRwkbGeometryType::Type, + pub fn CPLSetXMLValue( + psRoot: *mut CPLXMLNode, + pszPath: *const libc::c_char, + pszValue: *const libc::c_char, ) -> libc::c_int; } extern "C" { - pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLStripXMLNamespace( + psRoot: *mut CPLXMLNode, + pszNameSpace: *const libc::c_char, + bRecurse: libc::c_int, + ); } extern "C" { - pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); } extern "C" { - pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -pub mod OGRwkbByteOrder { - pub type Type = u32; - pub const wkbXDR: Type = 0; - pub const wkbNDR: Type = 1; -} -pub mod OGRFieldType { - pub type Type = u32; - pub const OFTInteger: Type = 0; - pub const OFTIntegerList: Type = 1; - pub const OFTReal: Type = 2; - pub const OFTRealList: Type = 3; - pub const OFTString: Type = 4; - pub const OFTStringList: Type = 5; - pub const OFTWideString: Type = 6; - pub const OFTWideStringList: Type = 7; - pub const OFTBinary: Type = 8; - pub const OFTDate: Type = 9; - pub const OFTTime: Type = 10; - pub const OFTDateTime: Type = 11; - pub const OFTInteger64: Type = 12; - pub const OFTInteger64List: Type = 13; - pub const OFTMaxType: Type = 13; -} -pub mod OGRFieldSubType { - pub type Type = u32; - pub const OFSTNone: Type = 0; - pub const OFSTBoolean: Type = 1; - pub const OFSTInt16: Type = 2; - pub const OFSTFloat32: Type = 3; - pub const OFSTJSON: Type = 4; - pub const OFSTMaxSubType: Type = 4; -} -pub mod OGRJustification { - pub type Type = u32; - pub const OJUndefined: Type = 0; - pub const OJLeft: Type = 1; - pub const OJRight: Type = 2; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union OGRField { - pub Integer: libc::c_int, - pub Integer64: GIntBig, - pub Real: f64, - pub String: *mut libc::c_char, - pub IntegerList: OGRField__bindgen_ty_1, - pub Integer64List: OGRField__bindgen_ty_2, - pub RealList: OGRField__bindgen_ty_3, - pub StringList: OGRField__bindgen_ty_4, - pub Binary: OGRField__bindgen_ty_5, - pub Set: OGRField__bindgen_ty_6, - pub Date: OGRField__bindgen_ty_7, - _bindgen_union_align: [u64; 2usize], + pub fn CPLSerializeXMLTreeToFile( + psTree: *const CPLXMLNode, + pszFilename: *const libc::c_char, + ) -> libc::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_1 { - pub nCount: libc::c_int, - pub paList: *mut libc::c_int, +pub struct CPLRectObj { + pub minx: f64, + pub miny: f64, + pub maxx: f64, + pub maxy: f64, } #[test] -fn bindgen_test_layout_OGRField__bindgen_ty_1() { +fn bindgen_test_layout_CPLRectObj() { assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLRectObj)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) + concat!("Alignment of ", stringify!(CPLRectObj)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).minx as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), + stringify!(CPLRectObj), "::", - stringify!(nCount) + stringify!(minx) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).miny as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), + stringify!(CPLRectObj), "::", - stringify!(paList) + stringify!(miny) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_2 { - pub nCount: libc::c_int, - pub paList: *mut GIntBig, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).maxx as *const _ as usize }, 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), + stringify!(CPLRectObj), "::", - stringify!(nCount) + stringify!(maxx) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).maxy as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), + stringify!(CPLRectObj), "::", - stringify!(paList) + stringify!(maxy) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_3 { - pub nCount: libc::c_int, - pub paList: *mut f64, +pub struct _CPLQuadTree { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) +pub type CPLQuadTree = _CPLQuadTree; +pub type CPLQuadTreeGetBoundsFunc = ::std::option::Option< + unsafe extern "C" fn(hFeature: *const libc::c_void, pBounds: *mut CPLRectObj), +>; +pub type CPLQuadTreeForeachFunc = ::std::option::Option< + unsafe extern "C" fn(pElt: *mut libc::c_void, pUserData: *mut libc::c_void) -> libc::c_int, +>; +pub type CPLQuadTreeDumpFeatureFunc = ::std::option::Option< + unsafe extern "C" fn( + hFeature: *const libc::c_void, + nIndentLevel: libc::c_int, + pUserData: *mut libc::c_void, + ), +>; +extern "C" { + pub fn CPLQuadTreeCreate( + pGlobalBounds: *const CPLRectObj, + pfnGetBounds: CPLQuadTreeGetBoundsFunc, + ) -> *mut CPLQuadTree; +} +extern "C" { + pub fn CPLQuadTreeDestroy(hQuadtree: *mut CPLQuadTree); +} +extern "C" { + pub fn CPLQuadTreeSetBucketCapacity(hQuadtree: *mut CPLQuadTree, nBucketCapacity: libc::c_int); +} +extern "C" { + pub fn CPLQuadTreeGetAdvisedMaxDepth(nExpectedFeatures: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn CPLQuadTreeSetMaxDepth(hQuadtree: *mut CPLQuadTree, nMaxDepth: libc::c_int); +} +extern "C" { + pub fn CPLQuadTreeInsert(hQuadtree: *mut CPLQuadTree, hFeature: *mut libc::c_void); +} +extern "C" { + pub fn CPLQuadTreeInsertWithBounds( + hQuadtree: *mut CPLQuadTree, + hFeature: *mut libc::c_void, + psBounds: *const CPLRectObj, ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) +} +extern "C" { + pub fn CPLQuadTreeSearch( + hQuadtree: *const CPLQuadTree, + pAoi: *const CPLRectObj, + pnFeatureCount: *mut libc::c_int, + ) -> *mut *mut libc::c_void; +} +extern "C" { + pub fn CPLQuadTreeForeach( + hQuadtree: *const CPLQuadTree, + pfnForeach: CPLQuadTreeForeachFunc, + pUserData: *mut libc::c_void, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(nCount) - ) +} +extern "C" { + pub fn CPLQuadTreeDump( + hQuadtree: *const CPLQuadTree, + pfnDumpFeatureFunc: CPLQuadTreeDumpFeatureFunc, + pUserData: *mut libc::c_void, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(paList) - ) +} +extern "C" { + pub fn CPLQuadTreeGetStats( + hQuadtree: *const CPLQuadTree, + pnFeatureCount: *mut libc::c_int, + pnNodeCount: *mut libc::c_int, + pnMaxDepth: *mut libc::c_int, + pnMaxBucketCapacity: *mut libc::c_int, ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_4 { - pub nCount: libc::c_int, - pub paList: *mut *mut libc::c_char, +pub struct CPLVirtualMem { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_4() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(paList) - ) +pub type CPLVirtualMemCachePageCbk = ::std::option::Option< + unsafe extern "C" fn( + ctxt: *mut CPLVirtualMem, + nOffset: usize, + pPageToFill: *mut libc::c_void, + nToFill: usize, + pUserData: *mut libc::c_void, + ), +>; +pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< + unsafe extern "C" fn( + ctxt: *mut CPLVirtualMem, + nOffset: usize, + pPageToBeEvicted: *const libc::c_void, + nToBeEvicted: usize, + pUserData: *mut libc::c_void, + ), +>; +pub type CPLVirtualMemFreeUserData = + ::std::option::Option; +pub mod CPLVirtualMemAccessMode { + pub type Type = libc::c_uint; + pub const VIRTUALMEM_READONLY: Type = 0; + pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; + pub const VIRTUALMEM_READWRITE: Type = 2; +} +extern "C" { + pub fn CPLGetPageSize() -> usize; +} +extern "C" { + pub fn CPLVirtualMemNew( + nSize: usize, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + eAccessMode: CPLVirtualMemAccessMode::Type, + pfnCachePage: CPLVirtualMemCachePageCbk, + pfnUnCachePage: CPLVirtualMemUnCachePageCbk, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; +} +extern "C" { + pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; +} +extern "C" { + pub fn CPLVirtualMemFileMapNew( + fp: *mut VSILFILE, + nOffset: vsi_l_offset, + nLength: vsi_l_offset, + eAccessMode: CPLVirtualMemAccessMode::Type, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; +} +extern "C" { + pub fn CPLVirtualMemDerivedNew( + pVMemBase: *mut CPLVirtualMem, + nOffset: vsi_l_offset, + nSize: vsi_l_offset, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; +} +extern "C" { + pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); +} +extern "C" { + pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; +} +extern "C" { + pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; +} +extern "C" { + pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; +} +extern "C" { + pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; +} +extern "C" { + pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; +} +extern "C" { + pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); +} +extern "C" { + pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); +} +extern "C" { + pub fn CPLVirtualMemPin( + ctxt: *mut CPLVirtualMem, + pAddr: *mut libc::c_void, + nSize: usize, + bWriteOp: libc::c_int, ); } +extern "C" { + pub fn CPLVirtualMemManagerTerminate(); +} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_5 { - pub nCount: libc::c_int, - pub paData: *mut GByte, +pub struct OGREnvelope { + pub MinX: f64, + pub MaxX: f64, + pub MinY: f64, + pub MaxY: f64, } #[test] -fn bindgen_test_layout_OGRField__bindgen_ty_5() { +fn bindgen_test_layout_OGREnvelope() { assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(OGREnvelope)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) + concat!("Alignment of ", stringify!(OGREnvelope)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), + stringify!(OGREnvelope), "::", - stringify!(nCount) + stringify!(MinX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), - "::", - stringify!(paData) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_6 { - pub nMarker1: libc::c_int, - pub nMarker2: libc::c_int, - pub nMarker3: libc::c_int, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_6() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), + stringify!(OGREnvelope), "::", - stringify!(nMarker1) + stringify!(MaxX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, - 4usize, + unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + 16usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), + stringify!(OGREnvelope), "::", - stringify!(nMarker2) + stringify!(MinY) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), + stringify!(OGREnvelope), "::", - stringify!(nMarker3) + stringify!(MaxY) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_7 { - pub Year: GInt16, - pub Month: GByte, - pub Day: GByte, - pub Hour: GByte, - pub Minute: GByte, - pub TZFlag: GByte, - pub Reserved: GByte, - pub Second: f32, +pub struct OGREnvelope3D { + pub MinX: f64, + pub MaxX: f64, + pub MinY: f64, + pub MaxY: f64, + pub MinZ: f64, + pub MaxZ: f64, } #[test] -fn bindgen_test_layout_OGRField__bindgen_ty_7() { +fn bindgen_test_layout_OGREnvelope3D() { assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(OGREnvelope3D)) ); assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGREnvelope3D)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), + stringify!(OGREnvelope3D), "::", - stringify!(Year) + stringify!(MinX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, - 2usize, + unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), + stringify!(OGREnvelope3D), "::", - stringify!(Month) + stringify!(MaxX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, - 3usize, + unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + 16usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), + stringify!(OGREnvelope3D), "::", - stringify!(Day) + stringify!(MinY) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, - 4usize, + unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), + stringify!(OGREnvelope3D), "::", - stringify!(Hour) + stringify!(MaxY) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, - 5usize, + unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, + 32usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), + stringify!(OGREnvelope3D), "::", - stringify!(Minute) + stringify!(MinZ) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, - 6usize, + unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, + 40usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), + stringify!(OGREnvelope3D), "::", - stringify!(TZFlag) + stringify!(MaxZ) ) ); +} +extern "C" { + pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; +} +extern "C" { + pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; +} +extern "C" { + pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; +} +extern "C" { + pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; +} +extern "C" { + pub fn OGRFree(arg1: *mut libc::c_void); +} +pub mod OGRwkbGeometryType { + pub type Type = libc::c_uint; + pub const wkbUnknown: Type = 0; + pub const wkbPoint: Type = 1; + pub const wkbLineString: Type = 2; + pub const wkbPolygon: Type = 3; + pub const wkbMultiPoint: Type = 4; + pub const wkbMultiLineString: Type = 5; + pub const wkbMultiPolygon: Type = 6; + pub const wkbGeometryCollection: Type = 7; + pub const wkbCircularString: Type = 8; + pub const wkbCompoundCurve: Type = 9; + pub const wkbCurvePolygon: Type = 10; + pub const wkbMultiCurve: Type = 11; + pub const wkbMultiSurface: Type = 12; + pub const wkbCurve: Type = 13; + pub const wkbSurface: Type = 14; + pub const wkbPolyhedralSurface: Type = 15; + pub const wkbTIN: Type = 16; + pub const wkbTriangle: Type = 17; + pub const wkbNone: Type = 100; + pub const wkbLinearRing: Type = 101; + pub const wkbCircularStringZ: Type = 1008; + pub const wkbCompoundCurveZ: Type = 1009; + pub const wkbCurvePolygonZ: Type = 1010; + pub const wkbMultiCurveZ: Type = 1011; + pub const wkbMultiSurfaceZ: Type = 1012; + pub const wkbCurveZ: Type = 1013; + pub const wkbSurfaceZ: Type = 1014; + pub const wkbPolyhedralSurfaceZ: Type = 1015; + pub const wkbTINZ: Type = 1016; + pub const wkbTriangleZ: Type = 1017; + pub const wkbPointM: Type = 2001; + pub const wkbLineStringM: Type = 2002; + pub const wkbPolygonM: Type = 2003; + pub const wkbMultiPointM: Type = 2004; + pub const wkbMultiLineStringM: Type = 2005; + pub const wkbMultiPolygonM: Type = 2006; + pub const wkbGeometryCollectionM: Type = 2007; + pub const wkbCircularStringM: Type = 2008; + pub const wkbCompoundCurveM: Type = 2009; + pub const wkbCurvePolygonM: Type = 2010; + pub const wkbMultiCurveM: Type = 2011; + pub const wkbMultiSurfaceM: Type = 2012; + pub const wkbCurveM: Type = 2013; + pub const wkbSurfaceM: Type = 2014; + pub const wkbPolyhedralSurfaceM: Type = 2015; + pub const wkbTINM: Type = 2016; + pub const wkbTriangleM: Type = 2017; + pub const wkbPointZM: Type = 3001; + pub const wkbLineStringZM: Type = 3002; + pub const wkbPolygonZM: Type = 3003; + pub const wkbMultiPointZM: Type = 3004; + pub const wkbMultiLineStringZM: Type = 3005; + pub const wkbMultiPolygonZM: Type = 3006; + pub const wkbGeometryCollectionZM: Type = 3007; + pub const wkbCircularStringZM: Type = 3008; + pub const wkbCompoundCurveZM: Type = 3009; + pub const wkbCurvePolygonZM: Type = 3010; + pub const wkbMultiCurveZM: Type = 3011; + pub const wkbMultiSurfaceZM: Type = 3012; + pub const wkbCurveZM: Type = 3013; + pub const wkbSurfaceZM: Type = 3014; + pub const wkbPolyhedralSurfaceZM: Type = 3015; + pub const wkbTINZM: Type = 3016; + pub const wkbTriangleZM: Type = 3017; + pub const wkbPoint25D: Type = 2147483649; + pub const wkbLineString25D: Type = 2147483650; + pub const wkbPolygon25D: Type = 2147483651; + pub const wkbMultiPoint25D: Type = 2147483652; + pub const wkbMultiLineString25D: Type = 2147483653; + pub const wkbMultiPolygon25D: Type = 2147483654; + pub const wkbGeometryCollection25D: Type = 2147483655; +} +extern "C" { + pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; +} +extern "C" { + pub fn OGRMergeGeometryTypes( + eMain: OGRwkbGeometryType::Type, + eExtra: OGRwkbGeometryType::Type, + ) -> OGRwkbGeometryType::Type; +} +extern "C" { + pub fn OGRMergeGeometryTypesEx( + eMain: OGRwkbGeometryType::Type, + eExtra: OGRwkbGeometryType::Type, + bAllowPromotingToCurves: libc::c_int, + ) -> OGRwkbGeometryType::Type; +} +extern "C" { + pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; +} +extern "C" { + pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; +} +extern "C" { + pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; +} +extern "C" { + pub fn OGR_GT_SetModifier( + eType: OGRwkbGeometryType::Type, + bSetZ: libc::c_int, + bSetM: libc::c_int, + ) -> OGRwkbGeometryType::Type; +} +extern "C" { + pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; +} +extern "C" { + pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; +} +extern "C" { + pub fn OGR_GT_IsSubClassOf( + eType: OGRwkbGeometryType::Type, + eSuperType: OGRwkbGeometryType::Type, + ) -> libc::c_int; +} +extern "C" { + pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; +} +extern "C" { + pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; +} +extern "C" { + pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; +} +extern "C" { + pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; +} +extern "C" { + pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; +} +extern "C" { + pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; +} +pub mod OGRwkbByteOrder { + pub type Type = libc::c_uint; + pub const wkbXDR: Type = 0; + pub const wkbNDR: Type = 1; +} +pub mod OGRFieldType { + pub type Type = libc::c_uint; + pub const OFTInteger: Type = 0; + pub const OFTIntegerList: Type = 1; + pub const OFTReal: Type = 2; + pub const OFTRealList: Type = 3; + pub const OFTString: Type = 4; + pub const OFTStringList: Type = 5; + pub const OFTWideString: Type = 6; + pub const OFTWideStringList: Type = 7; + pub const OFTBinary: Type = 8; + pub const OFTDate: Type = 9; + pub const OFTTime: Type = 10; + pub const OFTDateTime: Type = 11; + pub const OFTInteger64: Type = 12; + pub const OFTInteger64List: Type = 13; + pub const OFTMaxType: Type = 13; +} +pub mod OGRFieldSubType { + pub type Type = libc::c_uint; + pub const OFSTNone: Type = 0; + pub const OFSTBoolean: Type = 1; + pub const OFSTInt16: Type = 2; + pub const OFSTFloat32: Type = 3; + pub const OFSTJSON: Type = 4; + pub const OFSTMaxSubType: Type = 4; +} +pub mod OGRJustification { + pub type Type = libc::c_uint; + pub const OJUndefined: Type = 0; + pub const OJLeft: Type = 1; + pub const OJRight: Type = 2; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union OGRField { + pub Integer: libc::c_int, + pub Integer64: GIntBig, + pub Real: f64, + pub String: *mut libc::c_char, + pub IntegerList: OGRField__bindgen_ty_1, + pub Integer64List: OGRField__bindgen_ty_2, + pub RealList: OGRField__bindgen_ty_3, + pub StringList: OGRField__bindgen_ty_4, + pub Binary: OGRField__bindgen_ty_5, + pub Set: OGRField__bindgen_ty_6, + pub Date: OGRField__bindgen_ty_7, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_1 { + pub nCount: libc::c_int, + pub paList: *mut libc::c_int, +} +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) + ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, - 7usize, + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), + stringify!(OGRField__bindgen_ty_1), "::", - stringify!(Reserved) + stringify!(nCount) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), + stringify!(OGRField__bindgen_ty_1), "::", - stringify!(Second) + stringify!(paList) ) ); } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_2 { + pub nCount: libc::c_int, + pub paList: *mut GIntBig, +} #[test] -fn bindgen_test_layout_OGRField() { +fn bindgen_test_layout_OGRField__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(OGRField)) + concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGRField)) + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_2), "::", - stringify!(Integer) + stringify!(nCount) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_2), "::", - stringify!(Integer64) + stringify!(paList) ) ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_3 { + pub nCount: libc::c_int, + pub paList: *mut f64, +} +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_3() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) + ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_3), "::", - stringify!(Real) + stringify!(nCount) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_3), "::", - stringify!(String) + stringify!(paList) ) ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_4 { + pub nCount: libc::c_int, + pub paList: *mut *mut libc::c_char, +} +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_4() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) + ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_4), "::", - stringify!(IntegerList) + stringify!(nCount) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_4), "::", - stringify!(Integer64List) + stringify!(paList) ) ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_5 { + pub nCount: libc::c_int, + pub paData: *mut GByte, +} +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_5() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) + ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_5), "::", - stringify!(RealList) + stringify!(nCount) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_5), "::", - stringify!(StringList) + stringify!(paData) ) ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_6 { + pub nMarker1: libc::c_int, + pub nMarker2: libc::c_int, + pub nMarker3: libc::c_int, +} +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_6() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) + ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_6), "::", - stringify!(Binary) + stringify!(nMarker1) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, + 4usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_6), "::", - stringify!(Set) + stringify!(nMarker2) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGRField__bindgen_ty_6), "::", - stringify!(Date) + stringify!(nMarker3) ) ); } -extern "C" { - pub fn OGRParseDate( - pszInput: *const libc::c_char, - psOutput: *mut OGRField, - nOptions: libc::c_int, - ) -> libc::c_int; -} -pub mod ogr_style_tool_class_id { - pub type Type = u32; - pub const OGRSTCNone: Type = 0; - pub const OGRSTCPen: Type = 1; - pub const OGRSTCBrush: Type = 2; - pub const OGRSTCSymbol: Type = 3; - pub const OGRSTCLabel: Type = 4; - pub const OGRSTCVector: Type = 5; -} -pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; -pub mod ogr_style_tool_units_id { - pub type Type = u32; - pub const OGRSTUGround: Type = 0; - pub const OGRSTUPixel: Type = 1; - pub const OGRSTUPoints: Type = 2; - pub const OGRSTUMM: Type = 3; - pub const OGRSTUCM: Type = 4; - pub const OGRSTUInches: Type = 5; -} -pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; -extern "C" { - pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn GDALCheckVersion( - nVersionMajor: libc::c_int, - nVersionMinor: libc::c_int, - pszCallingComponentName: *const libc::c_char, - ) -> libc::c_int; -} -pub type OGRGeometryH = *mut libc::c_void; -pub type OGRSpatialReferenceH = *mut libc::c_void; -pub type OGRCoordinateTransformationH = *mut libc::c_void; -extern "C" { - pub fn OGR_G_CreateFromWkb( - arg1: *const libc::c_void, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromWkt( - arg1: *mut *mut libc::c_char, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_CreateFromFgf( - arg1: *const libc::c_void, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - arg5: *mut libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ApproximateArcAngles( - dfCenterX: f64, - dfCenterY: f64, - dfZ: f64, - dfPrimaryRadius: f64, - dfSecondaryAxis: f64, - dfRotation: f64, - dfStartAngle: f64, - dfEndAngle: f64, - dfMaxAngleStepSizeDegrees: f64, - ) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_7 { + pub Year: GInt16, + pub Month: GByte, + pub Day: GByte, + pub Hour: GByte, + pub Minute: GByte, + pub TZFlag: GByte, + pub Reserved: GByte, + pub Second: f32, } -extern "C" { - pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_7() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Year) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Month) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Day) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Hour) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Minute) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(TZFlag) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Reserved) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Second) + ) + ); } -extern "C" { - pub fn OGR_G_ForceTo( - hGeom: OGRGeometryH, - eTargetType: OGRwkbGeometryType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; +#[test] +fn bindgen_test_layout_OGRField() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer64) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Real) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(String) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(IntegerList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer64List) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(RealList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(StringList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Binary) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Set) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Date) + ) + ); } extern "C" { - pub fn OGR_G_RemoveLowerDimensionSubGeoms(hGeom: OGRGeometryH) -> OGRGeometryH; + pub fn OGRParseDate( + pszInput: *const libc::c_char, + psOutput: *mut OGRField, + nOptions: libc::c_int, + ) -> libc::c_int; } -extern "C" { - pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; +pub mod ogr_style_tool_class_id { + pub type Type = libc::c_uint; + pub const OGRSTCNone: Type = 0; + pub const OGRSTCPen: Type = 1; + pub const OGRSTCBrush: Type = 2; + pub const OGRSTCSymbol: Type = 3; + pub const OGRSTCLabel: Type = 4; + pub const OGRSTCVector: Type = 5; } -extern "C" { - pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; +pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; +pub mod ogr_style_tool_units_id { + pub type Type = libc::c_uint; + pub const OGRSTUGround: Type = 0; + pub const OGRSTUPixel: Type = 1; + pub const OGRSTUPoints: Type = 2; + pub const OGRSTUMM: Type = 3; + pub const OGRSTUCM: Type = 4; + pub const OGRSTUInches: Type = 5; } +pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; extern "C" { - pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; + pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; } extern "C" { - pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); + pub fn GDALCheckVersion( + nVersionMajor: libc::c_int, + nVersionMinor: libc::c_int, + pszCallingComponentName: *const libc::c_char, + ) -> libc::c_int; +} +pub type OGRGeometryH = *mut libc::c_void; +pub type OGRSpatialReferenceH = *mut libc::c_void; +pub type OGRCoordinateTransformationH = *mut libc::c_void; +extern "C" { + pub fn OGR_G_CreateFromWkb( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_CreateFromWkt( + arg1: *mut *mut libc::c_char, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_CreateFromFgf( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: libc::c_int, + arg5: *mut libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); +} +extern "C" { + pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ApproximateArcAngles( + dfCenterX: f64, + dfCenterY: f64, + dfZ: f64, + dfPrimaryRadius: f64, + dfSecondaryAxis: f64, + dfRotation: f64, + dfStartAngle: f64, + dfEndAngle: f64, + dfMaxAngleStepSizeDegrees: f64, + ) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceTo( + hGeom: OGRGeometryH, + eTargetType: OGRwkbGeometryType::Type, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_RemoveLowerDimensionSubGeoms(hGeom: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; +} +extern "C" { + pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; +} +extern "C" { + pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; +} +extern "C" { + pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); } extern "C" { pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; @@ -5058,7 +5650,7 @@ extern "C" { pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; } pub mod GDALDataType { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GDT_Unknown: Type = 0; pub const GDT_Byte: Type = 1; pub const GDT_UInt16: Type = 2; @@ -5142,7 +5734,7 @@ extern "C" { ) -> libc::c_int; } pub mod GDALAsyncStatusType { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GARIO_PENDING: Type = 0; pub const GARIO_UPDATE: Type = 1; pub const GARIO_ERROR: Type = 2; @@ -5156,17 +5748,17 @@ extern "C" { pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; } pub mod GDALAccess { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GA_ReadOnly: Type = 0; pub const GA_Update: Type = 1; } pub mod GDALRWFlag { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GF_Read: Type = 0; pub const GF_Write: Type = 1; } pub mod GDALRIOResampleAlg { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GRIORA_NearestNeighbour: Type = 0; pub const GRIORA_Bilinear: Type = 1; pub const GRIORA_Cubic: Type = 2; @@ -5175,6 +5767,7 @@ pub mod GDALRIOResampleAlg { pub const GRIORA_Average: Type = 5; pub const GRIORA_Mode: Type = 6; pub const GRIORA_Gauss: Type = 7; + pub const GRIORA_LAST: Type = 7; } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5302,7 +5895,7 @@ fn bindgen_test_layout_GDALRasterIOExtraArg() { ); } pub mod GDALColorInterp { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GCI_Undefined: Type = 0; pub const GCI_GrayIndex: Type = 1; pub const GCI_PaletteIndex: Type = 2; @@ -5329,7 +5922,7 @@ extern "C" { pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; } pub mod GDALPaletteInterp { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GPI_Gray: Type = 0; pub const GPI_RGB: Type = 1; pub const GPI_CMYK: Type = 2; @@ -5347,7 +5940,7 @@ pub type GDALRasterAttributeTableH = *mut libc::c_void; pub type GDALAsyncReaderH = *mut libc::c_void; pub type GSpacing = GIntBig; pub mod GDALExtendedDataTypeClass { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GEDTC_NUMERIC: Type = 0; pub const GEDTC_STRING: Type = 1; pub const GEDTC_COMPOUND: Type = 2; @@ -6365,7 +6958,7 @@ extern "C" { pub fn GDALSwapWordsEx( pData: *mut libc::c_void, nWordSize: libc::c_int, - nWordCount: size_t, + nWordCount: usize, nWordSkip: libc::c_int, ); } @@ -6786,13 +7379,13 @@ extern "C" { ); } pub mod GDALRATFieldType { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GFT_Integer: Type = 0; pub const GFT_Real: Type = 1; pub const GFT_String: Type = 2; } pub mod GDALRATFieldUsage { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GFU_Generic: Type = 0; pub const GFU_PixelCount: Type = 1; pub const GFU_Name: Type = 2; @@ -6814,7 +7407,7 @@ pub mod GDALRATFieldUsage { pub const GFU_MaxCount: Type = 18; } pub mod GDALRATTableType { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GRTT_THEMATIC: Type = 0; pub const GRTT_ATHEMATIC: Type = 1; } @@ -7030,8 +7623,8 @@ extern "C" { nPixelSpace: libc::c_int, nLineSpace: GIntBig, nBandSpace: GIntBig, - nCacheSize: size_t, - nPageSizeHint: size_t, + nCacheSize: usize, + nPageSizeHint: usize, bSingleThreadUsage: libc::c_int, papszOptions: CSLConstList, ) -> *mut CPLVirtualMem; @@ -7049,8 +7642,8 @@ extern "C" { eBufType: GDALDataType::Type, nPixelSpace: libc::c_int, nLineSpace: GIntBig, - nCacheSize: size_t, - nPageSizeHint: size_t, + nCacheSize: usize, + nPageSizeHint: usize, bSingleThreadUsage: libc::c_int, papszOptions: CSLConstList, ) -> *mut CPLVirtualMem; @@ -7065,7 +7658,7 @@ extern "C" { ) -> *mut CPLVirtualMem; } pub mod GDALTileOrganization { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GTO_TIP: Type = 0; pub const GTO_BIT: Type = 1; pub const GTO_BSQ: Type = 2; @@ -7084,7 +7677,7 @@ extern "C" { nBandCount: libc::c_int, panBandMap: *mut libc::c_int, eTileOrganization: GDALTileOrganization::Type, - nCacheSize: size_t, + nCacheSize: usize, bSingleThreadUsage: libc::c_int, papszOptions: CSLConstList, ) -> *mut CPLVirtualMem; @@ -7100,7 +7693,7 @@ extern "C" { nTileXSize: libc::c_int, nTileYSize: libc::c_int, eBufType: GDALDataType::Type, - nCacheSize: size_t, + nCacheSize: usize, bSingleThreadUsage: libc::c_int, papszOptions: CSLConstList, ) -> *mut CPLVirtualMem; @@ -7131,13 +7724,13 @@ extern "C" { pub fn GDALExtendedDataTypeCreate(eType: GDALDataType::Type) -> GDALExtendedDataTypeH; } extern "C" { - pub fn GDALExtendedDataTypeCreateString(nMaxStringLength: size_t) -> GDALExtendedDataTypeH; + pub fn GDALExtendedDataTypeCreateString(nMaxStringLength: usize) -> GDALExtendedDataTypeH; } extern "C" { pub fn GDALExtendedDataTypeCreateCompound( pszName: *const libc::c_char, - nTotalSize: size_t, - nComponents: size_t, + nTotalSize: usize, + nComponents: usize, comps: *const GDALEDTComponentH, ) -> GDALExtendedDataTypeH; } @@ -7158,19 +7751,19 @@ extern "C" { ) -> GDALDataType::Type; } extern "C" { - pub fn GDALExtendedDataTypeGetSize(hEDT: GDALExtendedDataTypeH) -> size_t; + pub fn GDALExtendedDataTypeGetSize(hEDT: GDALExtendedDataTypeH) -> usize; } extern "C" { - pub fn GDALExtendedDataTypeGetMaxStringLength(hEDT: GDALExtendedDataTypeH) -> size_t; + pub fn GDALExtendedDataTypeGetMaxStringLength(hEDT: GDALExtendedDataTypeH) -> usize; } extern "C" { pub fn GDALExtendedDataTypeGetComponents( hEDT: GDALExtendedDataTypeH, - pnCount: *mut size_t, + pnCount: *mut usize, ) -> *mut GDALEDTComponentH; } extern "C" { - pub fn GDALExtendedDataTypeFreeComponents(components: *mut GDALEDTComponentH, nCount: size_t); + pub fn GDALExtendedDataTypeFreeComponents(components: *mut GDALEDTComponentH, nCount: usize); } extern "C" { pub fn GDALExtendedDataTypeCanConvertTo( @@ -7187,7 +7780,7 @@ extern "C" { extern "C" { pub fn GDALEDTComponentCreate( pszName: *const libc::c_char, - nOffset: size_t, + nOffset: usize, hType: GDALExtendedDataTypeH, ) -> GDALEDTComponentH; } @@ -7198,7 +7791,7 @@ extern "C" { pub fn GDALEDTComponentGetName(hComp: GDALEDTComponentH) -> *const libc::c_char; } extern "C" { - pub fn GDALEDTComponentGetOffset(hComp: GDALEDTComponentH) -> size_t; + pub fn GDALEDTComponentGetOffset(hComp: GDALEDTComponentH) -> usize; } extern "C" { pub fn GDALEDTComponentGetType(hComp: GDALEDTComponentH) -> GDALExtendedDataTypeH; @@ -7244,7 +7837,7 @@ extern "C" { extern "C" { pub fn GDALGroupGetDimensions( hGroup: GDALGroupH, - pnCount: *mut size_t, + pnCount: *mut usize, papszOptions: CSLConstList, ) -> *mut GDALDimensionH; } @@ -7257,7 +7850,7 @@ extern "C" { extern "C" { pub fn GDALGroupGetAttributes( hGroup: GDALGroupH, - pnCount: *mut size_t, + pnCount: *mut usize, papszOptions: CSLConstList, ) -> *mut GDALAttributeH; } @@ -7285,7 +7878,7 @@ extern "C" { pub fn GDALGroupCreateMDArray( hGroup: GDALGroupH, pszName: *const libc::c_char, - nDimensions: size_t, + nDimensions: usize, pahDimensions: *mut GDALDimensionH, hEDT: GDALExtendedDataTypeH, papszOptions: CSLConstList, @@ -7295,7 +7888,7 @@ extern "C" { pub fn GDALGroupCreateAttribute( hGroup: GDALGroupH, pszName: *const libc::c_char, - nDimensions: size_t, + nDimensions: usize, panDimensions: *const GUInt64, hEDT: GDALExtendedDataTypeH, papszOptions: CSLConstList, @@ -7314,12 +7907,12 @@ extern "C" { pub fn GDALMDArrayGetTotalElementsCount(hArray: GDALMDArrayH) -> GUInt64; } extern "C" { - pub fn GDALMDArrayGetDimensionCount(hArray: GDALMDArrayH) -> size_t; + pub fn GDALMDArrayGetDimensionCount(hArray: GDALMDArrayH) -> usize; } extern "C" { pub fn GDALMDArrayGetDimensions( hArray: GDALMDArrayH, - pnCount: *mut size_t, + pnCount: *mut usize, ) -> *mut GDALDimensionH; } extern "C" { @@ -7329,26 +7922,26 @@ extern "C" { pub fn GDALMDArrayRead( hArray: GDALMDArrayH, arrayStartIdx: *const GUInt64, - count: *const size_t, + count: *const usize, arrayStep: *const GInt64, bufferStride: *const GPtrDiff_t, bufferDatatype: GDALExtendedDataTypeH, pDstBuffer: *mut libc::c_void, pDstBufferAllocStart: *const libc::c_void, - nDstBufferllocSize: size_t, + nDstBufferllocSize: usize, ) -> libc::c_int; } extern "C" { pub fn GDALMDArrayWrite( hArray: GDALMDArrayH, arrayStartIdx: *const GUInt64, - count: *const size_t, + count: *const usize, arrayStep: *const GInt64, bufferStride: *const GPtrDiff_t, bufferDatatype: GDALExtendedDataTypeH, pSrcBuffer: *const libc::c_void, psrcBufferAllocStart: *const libc::c_void, - nSrcBufferllocSize: size_t, + nSrcBufferllocSize: usize, ) -> libc::c_int; } extern "C" { @@ -7360,7 +7953,7 @@ extern "C" { extern "C" { pub fn GDALMDArrayGetAttributes( hArray: GDALMDArrayH, - pnCount: *mut size_t, + pnCount: *mut usize, papszOptions: CSLConstList, ) -> *mut GDALAttributeH; } @@ -7368,7 +7961,7 @@ extern "C" { pub fn GDALMDArrayCreateAttribute( hArray: GDALMDArrayH, pszName: *const libc::c_char, - nDimensions: size_t, + nDimensions: usize, panDimensions: *const GUInt64, hEDT: GDALExtendedDataTypeH, papszOptions: CSLConstList, @@ -7408,7 +8001,7 @@ extern "C" { pub fn GDALMDArrayGetOffset(hArray: GDALMDArrayH, pbHasValue: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALMDArrayGetBlockSize(hArray: GDALMDArrayH, pnCount: *mut size_t) -> *mut GUInt64; + pub fn GDALMDArrayGetBlockSize(hArray: GDALMDArrayH, pnCount: *mut usize) -> *mut GUInt64; } extern "C" { pub fn GDALMDArraySetUnit(hArray: GDALMDArrayH, arg1: *const libc::c_char) -> libc::c_int; @@ -7425,9 +8018,9 @@ extern "C" { extern "C" { pub fn GDALMDArrayGetProcessingChunkSize( hArray: GDALMDArrayH, - pnCount: *mut size_t, - nMaxChunkMemory: size_t, - ) -> *mut size_t; + pnCount: *mut usize, + nMaxChunkMemory: usize, + ) -> *mut usize; } extern "C" { pub fn GDALMDArrayGetStructuralInfo(hArray: GDALMDArrayH) -> CSLConstList; @@ -7441,7 +8034,7 @@ extern "C" { extern "C" { pub fn GDALMDArrayTranspose( hArray: GDALMDArrayH, - nNewAxisCount: size_t, + nNewAxisCount: usize, panMapNewAxisToOldAxis: *const libc::c_int, ) -> GDALMDArrayH; } @@ -7454,15 +8047,15 @@ extern "C" { extern "C" { pub fn GDALMDArrayAsClassicDataset( hArray: GDALMDArrayH, - iXDim: size_t, - iYDim: size_t, + iXDim: usize, + iYDim: usize, ) -> GDALDatasetH; } extern "C" { pub fn GDALAttributeRelease(hAttr: GDALAttributeH); } extern "C" { - pub fn GDALReleaseAttributes(attributes: *mut GDALAttributeH, nCount: size_t); + pub fn GDALReleaseAttributes(attributes: *mut GDALAttributeH, nCount: usize); } extern "C" { pub fn GDALAttributeGetName(hAttr: GDALAttributeH) -> *const libc::c_char; @@ -7474,22 +8067,22 @@ extern "C" { pub fn GDALAttributeGetTotalElementsCount(hAttr: GDALAttributeH) -> GUInt64; } extern "C" { - pub fn GDALAttributeGetDimensionCount(hAttr: GDALAttributeH) -> size_t; + pub fn GDALAttributeGetDimensionCount(hAttr: GDALAttributeH) -> usize; } extern "C" { pub fn GDALAttributeGetDimensionsSize( hAttr: GDALAttributeH, - pnCount: *mut size_t, + pnCount: *mut usize, ) -> *mut GUInt64; } extern "C" { pub fn GDALAttributeGetDataType(hAttr: GDALAttributeH) -> GDALExtendedDataTypeH; } extern "C" { - pub fn GDALAttributeReadAsRaw(hAttr: GDALAttributeH, pnSize: *mut size_t) -> *mut GByte; + pub fn GDALAttributeReadAsRaw(hAttr: GDALAttributeH, pnSize: *mut usize) -> *mut GByte; } extern "C" { - pub fn GDALAttributeFreeRawResult(hAttr: GDALAttributeH, raw: *mut GByte, nSize: size_t); + pub fn GDALAttributeFreeRawResult(hAttr: GDALAttributeH, raw: *mut GByte, nSize: usize); } extern "C" { pub fn GDALAttributeReadAsString(hAttr: GDALAttributeH) -> *const libc::c_char; @@ -7506,17 +8099,17 @@ extern "C" { extern "C" { pub fn GDALAttributeReadAsIntArray( hAttr: GDALAttributeH, - pnCount: *mut size_t, + pnCount: *mut usize, ) -> *mut libc::c_int; } extern "C" { - pub fn GDALAttributeReadAsDoubleArray(hAttr: GDALAttributeH, pnCount: *mut size_t) -> *mut f64; + pub fn GDALAttributeReadAsDoubleArray(hAttr: GDALAttributeH, pnCount: *mut usize) -> *mut f64; } extern "C" { pub fn GDALAttributeWriteRaw( hAttr: GDALAttributeH, arg1: *const libc::c_void, - arg2: size_t, + arg2: usize, ) -> libc::c_int; } extern "C" { @@ -7538,14 +8131,14 @@ extern "C" { pub fn GDALAttributeWriteDoubleArray( hAttr: GDALAttributeH, arg1: *const f64, - arg2: size_t, + arg2: usize, ) -> libc::c_int; } extern "C" { pub fn GDALDimensionRelease(hDim: GDALDimensionH); } extern "C" { - pub fn GDALReleaseDimensions(dims: *mut GDALDimensionH, nCount: size_t); + pub fn GDALReleaseDimensions(dims: *mut GDALDimensionH, nCount: usize); } extern "C" { pub fn GDALDimensionGetName(hDim: GDALDimensionH) -> *const libc::c_char; @@ -8027,14 +8620,14 @@ extern "C" { ) -> CPLErr::Type; } pub mod GDALViewshedMode { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GVM_Diagonal: Type = 1; pub const GVM_Edge: Type = 2; pub const GVM_Max: Type = 3; pub const GVM_Min: Type = 4; } pub mod GDALViewshedOutputType { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GVOT_NORMAL: Type = 1; pub const GVOT_MIN_TARGET_HEIGHT_FROM_DEM: Type = 2; pub const GVOT_MIN_TARGET_HEIGHT_FROM_GROUND: Type = 3; @@ -8113,7 +8706,7 @@ extern "C" { ) -> CPLErr::Type; } pub mod GDALGridAlgorithm { - pub type Type = u32; + pub type Type = libc::c_uint; pub const GGA_InverseDistanceToAPower: Type = 1; pub const GGA_MovingAverage: Type = 2; pub const GGA_NearestNeighbor: Type = 3; @@ -8441,2157 +9034,2533 @@ extern "C" { papszOptions: *const *const libc::c_char, ) -> GDALDatasetH; } -pub type CPLThreadFunc = ::std::option::Option; -extern "C" { - pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALInfoOptions { + _unused: [u8; 0], } -extern "C" { - pub fn CPLUnlockFile(hLock: *mut libc::c_void); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALInfoOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn CPLCreateMutex() -> *mut libc::c_void; + pub fn GDALInfoOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALInfoOptionsForBinary, + ) -> *mut GDALInfoOptions; } extern "C" { - pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; + pub fn GDALInfoOptionsFree(psOptions: *mut GDALInfoOptions); } extern "C" { - pub fn CPLCreateOrAcquireMutex( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - ) -> libc::c_int; + pub fn GDALInfo(hDataset: GDALDatasetH, psOptions: *const GDALInfoOptions) + -> *mut libc::c_char; } -extern "C" { - pub fn CPLCreateOrAcquireMutexEx( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - nOptions: libc::c_int, - ) -> libc::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTranslateOptions { + _unused: [u8; 0], } -extern "C" { - pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTranslateOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); + pub fn GDALTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALTranslateOptionsForBinary, + ) -> *mut GDALTranslateOptions; } extern "C" { - pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); + pub fn GDALTranslateOptionsFree(psOptions: *mut GDALTranslateOptions); } extern "C" { - pub fn CPLCleanupMasterMutex(); + pub fn GDALTranslateOptionsSetProgress( + psOptions: *mut GDALTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn CPLCreateCond() -> *mut libc::c_void; + pub fn GDALTranslate( + pszDestFilename: *const libc::c_char, + hSrcDataset: GDALDatasetH, + psOptions: *const GDALTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpAppOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpAppOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); + pub fn GDALWarpAppOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALWarpAppOptionsForBinary, + ) -> *mut GDALWarpAppOptions; } -pub mod CPLCondTimedWaitReason { - pub type Type = u32; - pub const COND_TIMED_WAIT_COND: Type = 0; - pub const COND_TIMED_WAIT_TIME_OUT: Type = 1; - pub const COND_TIMED_WAIT_OTHER: Type = 2; +extern "C" { + pub fn GDALWarpAppOptionsFree(psOptions: *mut GDALWarpAppOptions); } extern "C" { - pub fn CPLCondTimedWait( - hCond: *mut libc::c_void, - hMutex: *mut libc::c_void, - dfWaitInSeconds: f64, - ) -> CPLCondTimedWaitReason::Type; + pub fn GDALWarpAppOptionsSetProgress( + psOptions: *mut GDALWarpAppOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn CPLCondSignal(hCond: *mut libc::c_void); + pub fn GDALWarpAppOptionsSetQuiet(psOptions: *mut GDALWarpAppOptions, bQuiet: libc::c_int); } extern "C" { - pub fn CPLCondBroadcast(hCond: *mut libc::c_void); + pub fn GDALWarpAppOptionsSetWarpOption( + psOptions: *mut GDALWarpAppOptions, + pszKey: *const libc::c_char, + pszValue: *const libc::c_char, + ); } extern "C" { - pub fn CPLDestroyCond(hCond: *mut libc::c_void); + pub fn GDALWarp( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALWarpAppOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALVectorTranslateOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALVectorTranslateOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn CPLGetPID() -> GIntBig; + pub fn GDALVectorTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALVectorTranslateOptionsForBinary, + ) -> *mut GDALVectorTranslateOptions; } extern "C" { - pub fn CPLGetCurrentProcessID() -> libc::c_int; + pub fn GDALVectorTranslateOptionsFree(psOptions: *mut GDALVectorTranslateOptions); } extern "C" { - pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; + pub fn GDALVectorTranslateOptionsSetProgress( + psOptions: *mut GDALVectorTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn CPLCreateJoinableThread( - pfnMain: CPLThreadFunc, - pArg: *mut libc::c_void, - ) -> *mut libc::c_void; + pub fn GDALVectorTranslate( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALVectorTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDEMProcessingOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDEMProcessingOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); + pub fn GDALDEMProcessingOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALDEMProcessingOptionsForBinary, + ) -> *mut GDALDEMProcessingOptions; } extern "C" { - pub fn CPLSleep(dfWaitInSeconds: f64); + pub fn GDALDEMProcessingOptionsFree(psOptions: *mut GDALDEMProcessingOptions); } extern "C" { - pub fn CPLGetThreadingModel() -> *const libc::c_char; + pub fn GDALDEMProcessingOptionsSetProgress( + psOptions: *mut GDALDEMProcessingOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn CPLGetNumCPUs() -> libc::c_int; + pub fn GDALDEMProcessing( + pszDestFilename: *const libc::c_char, + hSrcDataset: GDALDatasetH, + pszProcessing: *const libc::c_char, + pszColorFilename: *const libc::c_char, + psOptions: *const GDALDEMProcessingOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _CPLLock { +pub struct GDALNearblackOptions { _unused: [u8; 0], } -pub type CPLLock = _CPLLock; -pub mod CPLLockType { - pub type Type = u32; - pub const LOCK_RECURSIVE_MUTEX: Type = 0; - pub const LOCK_ADAPTIVE_MUTEX: Type = 1; - pub const LOCK_SPIN: Type = 2; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALNearblackOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; + pub fn GDALNearblackOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALNearblackOptionsForBinary, + ) -> *mut GDALNearblackOptions; } extern "C" { - pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) - -> libc::c_int; + pub fn GDALNearblackOptionsFree(psOptions: *mut GDALNearblackOptions); } extern "C" { - pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; + pub fn GDALNearblackOptionsSetProgress( + psOptions: *mut GDALNearblackOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn CPLReleaseLock(arg1: *mut CPLLock); + pub fn GDALNearblack( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + hSrcDS: GDALDatasetH, + psOptions: *const GDALNearblackOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn CPLDestroyLock(arg1: *mut CPLLock); + pub fn GDALGridOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALGridOptionsForBinary, + ) -> *mut GDALGridOptions; } extern "C" { - pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); + pub fn GDALGridOptionsFree(psOptions: *mut GDALGridOptions); } extern "C" { - pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; + pub fn GDALGridOptionsSetProgress( + psOptions: *mut GDALGridOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn CPLGetTLSEx( - nIndex: libc::c_int, - pbMemoryErrorOccurred: *mut libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALGrid( + pszDest: *const libc::c_char, + hSrcDS: GDALDatasetH, + psOptions: *const GDALGridOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterizeOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterizeOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); + pub fn GDALRasterizeOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALRasterizeOptionsForBinary, + ) -> *mut GDALRasterizeOptions; } -pub type CPLTLSFreeFunc = ::std::option::Option; extern "C" { - pub fn CPLSetTLSWithFreeFunc( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - ); + pub fn GDALRasterizeOptionsFree(psOptions: *mut GDALRasterizeOptions); } extern "C" { - pub fn CPLSetTLSWithFreeFuncEx( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - pbMemoryErrorOccurred: *mut libc::c_int, + pub fn GDALRasterizeOptionsSetProgress( + psOptions: *mut GDALRasterizeOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ); } extern "C" { - pub fn CPLCleanupTLS(); + pub fn GDALRasterize( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + hSrcDS: GDALDatasetH, + psOptions: *const GDALRasterizeOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; } -pub mod GDALResampleAlg { - pub type Type = u32; - pub const GRA_NearestNeighbour: Type = 0; - pub const GRA_Bilinear: Type = 1; - pub const GRA_Cubic: Type = 2; - pub const GRA_CubicSpline: Type = 3; - pub const GRA_Lanczos: Type = 4; - pub const GRA_Average: Type = 5; - pub const GRA_Mode: Type = 6; - pub const GRA_Max: Type = 8; - pub const GRA_Min: Type = 9; - pub const GRA_Med: Type = 10; - pub const GRA_Q1: Type = 11; - pub const GRA_Q3: Type = 12; - pub const GRA_Sum: Type = 13; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALBuildVRTOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALBuildVRTOptionsForBinary { + _unused: [u8; 0], } -pub type GDALMaskFunc = ::std::option::Option< - unsafe extern "C" fn( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pMask: *mut libc::c_void, - ) -> libc::c_int, ->; extern "C" { - pub fn GDALWarpNoDataMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllValid: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn GDALBuildVRTOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALBuildVRTOptionsForBinary, + ) -> *mut GDALBuildVRTOptions; } extern "C" { - pub fn GDALWarpDstAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALBuildVRTOptionsFree(psOptions: *mut GDALBuildVRTOptions); } extern "C" { - pub fn GDALWarpSrcAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllOpaque: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn GDALBuildVRTOptionsSetProgress( + psOptions: *mut GDALBuildVRTOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); } extern "C" { - pub fn GDALWarpSrcMaskMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALBuildVRT( + pszDest: *const libc::c_char, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + papszSrcDSNames: *const *const libc::c_char, + psOptions: *const GDALBuildVRTOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimInfoOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimInfoOptionsForBinary { + _unused: [u8; 0], } extern "C" { - pub fn GDALWarpCutlineMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALMultiDimInfoOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALMultiDimInfoOptionsForBinary, + ) -> *mut GDALMultiDimInfoOptions; +} +extern "C" { + pub fn GDALMultiDimInfoOptionsFree(psOptions: *mut GDALMultiDimInfoOptions); +} +extern "C" { + pub fn GDALMultiDimInfo( + hDataset: GDALDatasetH, + psOptions: *const GDALMultiDimInfoOptions, + ) -> *mut libc::c_char; } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct GDALWarpOptions { - pub papszWarpOptions: *mut *mut libc::c_char, - pub dfWarpMemoryLimit: f64, - pub eResampleAlg: GDALResampleAlg::Type, - pub eWorkingDataType: GDALDataType::Type, - pub hSrcDS: GDALDatasetH, - pub hDstDS: GDALDatasetH, - pub nBandCount: libc::c_int, - pub panSrcBands: *mut libc::c_int, - pub panDstBands: *mut libc::c_int, - pub nSrcAlphaBand: libc::c_int, - pub nDstAlphaBand: libc::c_int, - pub padfSrcNoDataReal: *mut f64, - pub padfSrcNoDataImag: *mut f64, - pub padfDstNoDataReal: *mut f64, - pub padfDstNoDataImag: *mut f64, - pub pfnProgress: GDALProgressFunc, - pub pProgressArg: *mut libc::c_void, - pub pfnTransformer: GDALTransformerFunc, - pub pTransformerArg: *mut libc::c_void, - pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, - pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, - pub pfnSrcValidityMaskFunc: GDALMaskFunc, - pub pSrcValidityMaskFuncArg: *mut libc::c_void, - pub pfnSrcDensityMaskFunc: GDALMaskFunc, - pub pSrcDensityMaskFuncArg: *mut libc::c_void, - pub pfnDstDensityMaskFunc: GDALMaskFunc, - pub pDstDensityMaskFuncArg: *mut libc::c_void, - pub pfnDstValidityMaskFunc: GDALMaskFunc, - pub pDstValidityMaskFuncArg: *mut libc::c_void, - pub pfnPreWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - pub pPreWarpProcessorArg: *mut libc::c_void, - pub pfnPostWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - pub pPostWarpProcessorArg: *mut libc::c_void, - pub hCutline: *mut libc::c_void, - pub dfCutlineBlendDist: f64, +pub struct GDALMultiDimTranslateOptions { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_GDALWarpOptions() { - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papszWarpOptions) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfWarpMemoryLimit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eWorkingDataType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hSrcDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hDstDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nBandCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panSrcBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panDstBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nSrcAlphaBand) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nDstAlphaBand) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataImag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataImag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pProgressArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnTransformer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pTransformerArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ - as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papfnSrcPerBandValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ - as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papSrcPerBandValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnSrcDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pSrcDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstDensityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstDensityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstValidityMaskFunc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstValidityMaskFuncArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ - as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPreWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPreWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ - as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPostWarpChunkProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPostWarpProcessorArg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hCutline) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfCutlineBlendDist) - ) +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimTranslateOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALMultiDimTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALMultiDimTranslateOptionsForBinary, + ) -> *mut GDALMultiDimTranslateOptions; +} +extern "C" { + pub fn GDALMultiDimTranslateOptionsFree(psOptions: *mut GDALMultiDimTranslateOptions); +} +extern "C" { + pub fn GDALMultiDimTranslateOptionsSetProgress( + psOptions: *mut GDALMultiDimTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ); } extern "C" { - pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; + pub fn GDALMultiDimTranslate( + pszDest: *const libc::c_char, + hDstDataset: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALMultiDimTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +pub mod OGRAxisOrientation { + pub type Type = libc::c_uint; + pub const OAO_Other: Type = 0; + pub const OAO_North: Type = 1; + pub const OAO_South: Type = 2; + pub const OAO_East: Type = 3; + pub const OAO_West: Type = 4; + pub const OAO_Up: Type = 5; + pub const OAO_Down: Type = 6; } extern "C" { - pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); + pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; + pub fn OSRSetPROJSearchPaths(papszPaths: *const *const libc::c_char); } extern "C" { - pub fn GDALWarpInitDstNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + pub fn OSRGetPROJSearchPaths() -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALWarpInitSrcNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + pub fn OSRGetPROJVersion( + pnMajor: *mut libc::c_int, + pnMinor: *mut libc::c_int, + pnPatch: *mut libc::c_int, + ); } extern "C" { - pub fn GDALWarpInitNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALWarpInitDstNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); + pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALWarpInitSrcNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); + pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALWarpResolveWorkingDataType(arg1: *mut GDALWarpOptions); + pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); } extern "C" { - pub fn GDALWarpInitDefaultBandMapping(arg1: *mut GDALWarpOptions, nBandCount: libc::c_int); + pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; + pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; + pub fn OSRRelease(arg1: OGRSpatialReferenceH); } extern "C" { - pub fn GDALReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; + pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - pub fn GDALCreateAndReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstFilename: *const libc::c_char, - pszDstWKT: *const libc::c_char, - hDstDriver: GDALDriverH, - papszCreateOptions: *mut *mut libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; + pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALAutoCreateWarpedVRT( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfMaxError: f64, - psOptions: *const GDALWarpOptions, - ) -> GDALDatasetH; + pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromWkt( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromProj4( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromESRI( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromPCI( + hSRS: OGRSpatialReferenceH, + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromUSGS( + arg1: OGRSpatialReferenceH, + arg2: libc::c_long, + arg3: libc::c_long, + arg4: *mut f64, + arg5: libc::c_long, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromDict( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromPanorama( + arg1: OGRSpatialReferenceH, + arg2: libc::c_long, + arg3: libc::c_long, + arg4: libc::c_long, + arg5: *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromOzi( + arg1: OGRSpatialReferenceH, + arg2: *const *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromMICoordSys( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromERM( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) + -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToWktEx( + arg1: OGRSpatialReferenceH, + ppszResult: *mut *mut libc::c_char, + papszOptions: *const *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPrettyWkt( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPROJJSON( + hSRS: OGRSpatialReferenceH, + ppszReturn: *mut *mut libc::c_char, + papszOptions: *const *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToProj4( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPCI( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: *mut *mut libc::c_char, + arg4: *mut *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToUSGS( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_long, + arg3: *mut libc::c_long, + arg4: *mut *mut f64, + arg5: *mut libc::c_long, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToXML( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPanorama( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_long, + arg3: *mut libc::c_long, + arg4: *mut libc::c_long, + arg5: *mut libc::c_long, + arg6: *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToMICoordSys( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToERM( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_char, + arg3: *mut libc::c_char, + arg4: *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRConvertToOtherProjection( + hSRS: OGRSpatialReferenceH, + pszTargetProjection: *const libc::c_char, + papszOptions: *const *const libc::c_char, + ) -> OGRSpatialReferenceH; +} +extern "C" { + pub fn OSRGetName(hSRS: OGRSpatialReferenceH) -> *const libc::c_char; +} +extern "C" { + pub fn OSRSetAttrValue( + hSRS: OGRSpatialReferenceH, + pszNodePath: *const libc::c_char, + pszNewNodeValue: *const libc::c_char, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALCreateWarpedVRT( - hSrcDS: GDALDatasetH, - nPixels: libc::c_int, - nLines: libc::c_int, - padfGeoTransform: *mut f64, - psOptions: *mut GDALWarpOptions, - ) -> GDALDatasetH; + pub fn OSRGetAttrValue( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + iChild: libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; + pub fn OSRSetAngularUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; } -pub type GDALWarpOperationH = *mut libc::c_void; extern "C" { - pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; + pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; } extern "C" { - pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); + pub fn OSRSetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALChunkAndWarpImage( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; + pub fn OSRSetTargetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALChunkAndWarpMulti( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; + pub fn OSRSetLinearUnitsAndUpdateParameters( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALWarpRegion( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ) -> CPLErr::Type; + pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; } extern "C" { - pub fn GDALWarpRegionToBuffer( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_void, - arg7: GDALDataType::Type, - arg8: libc::c_int, - arg9: libc::c_int, - arg10: libc::c_int, - arg11: libc::c_int, - ) -> CPLErr::Type; + pub fn OSRGetTargetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *mut *mut libc::c_char, + ) -> f64; } -pub mod OGRAxisOrientation { - pub type Type = u32; - pub const OAO_Other: Type = 0; - pub const OAO_North: Type = 1; - pub const OAO_South: Type = 2; - pub const OAO_East: Type = 3; - pub const OAO_West: Type = 4; - pub const OAO_Up: Type = 5; - pub const OAO_Down: Type = 6; +extern "C" { + pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; } extern "C" { - pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; + pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRSetPROJSearchPaths(papszPaths: *const *const libc::c_char); + pub fn OSRIsDerivedGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRGetPROJSearchPaths() -> *mut *mut libc::c_char; + pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRGetPROJVersion( - pnMajor: *mut libc::c_int, - pnMinor: *mut libc::c_int, - pnPatch: *mut libc::c_int, - ); + pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; + pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; + pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; + pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); + pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRRelease(arg1: OGRSpatialReferenceH); + pub fn OSRIsSameEx( + arg1: OGRSpatialReferenceH, + arg2: OGRSpatialReferenceH, + papszOptions: *const *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; + pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; + pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, + pub fn OSRSetWellKnownGeogCS( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromProj4( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, + pub fn OSRSetFromUserInput( + hSRS: OGRSpatialReferenceH, + arg1: *const libc::c_char, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromESRI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, + pub fn OSRCopyGeogCSFrom( + hSRS: OGRSpatialReferenceH, + hSrcSRS: OGRSpatialReferenceH, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromPCI( + pub fn OSRSetTOWGS84( hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, + arg1: f64, + arg2: f64, + arg3: f64, + arg4: f64, + arg5: f64, + arg6: f64, + arg7: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromUSGS( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: *mut f64, - arg5: libc::c_long, + pub fn OSRGetTOWGS84( + hSRS: OGRSpatialReferenceH, + arg1: *mut f64, + arg2: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OSRAddGuessedTOWGS84(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromDict( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, + pub fn OSRSetCompoundCS( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + hHorizSRS: OGRSpatialReferenceH, + hVertSRS: OGRSpatialReferenceH, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromPanorama( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: libc::c_long, - arg5: *mut f64, + pub fn OSRPromoteTo3D(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) + -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGeogCS( + hSRS: OGRSpatialReferenceH, + pszGeogName: *const libc::c_char, + pszDatumName: *const libc::c_char, + pszEllipsoidName: *const libc::c_char, + dfSemiMajor: f64, + dfInvFlattening: f64, + pszPMName: *const libc::c_char, + dfPMOffset: f64, + pszUnits: *const libc::c_char, + dfConvertToRadians: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromOzi( - arg1: OGRSpatialReferenceH, - arg2: *const *const libc::c_char, + pub fn OSRSetVertCS( + hSRS: OGRSpatialReferenceH, + pszVertCSName: *const libc::c_char, + pszVertDatumName: *const libc::c_char, + nVertDatumType: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, + pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRSetAuthority( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + pszAuthority: *const libc::c_char, + nCode: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromERM( + pub fn OSRGetAuthorityCode( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRGetAuthorityName( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRGetAreaOfUse( + hSRS: OGRSpatialReferenceH, + pdfWestLongitudeDeg: *mut f64, + pdfSouthLatitudeDeg: *mut f64, + pdfEastLongitudeDeg: *mut f64, + pdfNorthLatitudeDeg: *mut f64, + ppszAreaName: *mut *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetProjParm( arg1: OGRSpatialReferenceH, arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, + arg3: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) - -> OGRErr::Type; -} -extern "C" { - pub fn OSRExportToWktEx( - arg1: OGRSpatialReferenceH, - ppszResult: *mut *mut libc::c_char, - papszOptions: *const *const libc::c_char, - ) -> OGRErr::Type; + pub fn OSRGetProjParm( + hSRS: OGRSpatialReferenceH, + pszParmName: *const libc::c_char, + dfDefault: f64, + arg1: *mut OGRErr::Type, + ) -> f64; } extern "C" { - pub fn OSRExportToPrettyWkt( + pub fn OSRSetNormProjParm( arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: libc::c_int, + arg2: *const libc::c_char, + arg3: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToPROJJSON( + pub fn OSRGetNormProjParm( hSRS: OGRSpatialReferenceH, - ppszReturn: *mut *mut libc::c_char, - papszOptions: *const *const libc::c_char, - ) -> OGRErr::Type; + pszParmName: *const libc::c_char, + dfDefault: f64, + arg1: *mut OGRErr::Type, + ) -> f64; } extern "C" { - pub fn OSRExportToProj4( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, + pub fn OSRSetUTM( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNorth: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToPCI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *mut *mut libc::c_char, - arg4: *mut *mut f64, - ) -> OGRErr::Type; + pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; } extern "C" { - pub fn OSRExportToUSGS( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut *mut f64, - arg5: *mut libc::c_long, + pub fn OSRSetStatePlane( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNAD83: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToXML( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, + pub fn OSRSetStatePlaneWithUnits( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNAD83: libc::c_int, + pszOverrideUnitName: *const libc::c_char, + dfOverrideUnit: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToPanorama( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut libc::c_long, - arg5: *mut libc::c_long, - arg6: *mut f64, - ) -> OGRErr::Type; + pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; + pub fn OSRFindMatches( + hSRS: OGRSpatialReferenceH, + papszOptions: *mut *mut libc::c_char, + pnEntries: *mut libc::c_int, + ppanMatchConfidence: *mut *mut libc::c_int, + ) -> *mut OGRSpatialReferenceH; } extern "C" { - pub fn OSRExportToERM( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_char, - arg3: *mut libc::c_char, - arg4: *mut libc::c_char, - ) -> OGRErr::Type; + pub fn OSRFreeSRSArray(pahSRS: *mut OGRSpatialReferenceH); } extern "C" { - pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRConvertToOtherProjection( + pub fn OSRGetAxis( hSRS: OGRSpatialReferenceH, - pszTargetProjection: *const libc::c_char, - papszOptions: *const *const libc::c_char, - ) -> OGRSpatialReferenceH; + pszTargetKey: *const libc::c_char, + iAxis: libc::c_int, + peOrientation: *mut OGRAxisOrientation::Type, + ) -> *const libc::c_char; } extern "C" { - pub fn OSRGetName(hSRS: OGRSpatialReferenceH) -> *const libc::c_char; + pub fn OSRGetAxesCount(hSRS: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRSetAttrValue( + pub fn OSRSetAxes( hSRS: OGRSpatialReferenceH, - pszNodePath: *const libc::c_char, - pszNewNodeValue: *const libc::c_char, + pszTargetKey: *const libc::c_char, + pszXAxisName: *const libc::c_char, + eXAxisOrientation: OGRAxisOrientation::Type, + pszYAxisName: *const libc::c_char, + eYAxisOrientation: OGRAxisOrientation::Type, ) -> OGRErr::Type; } -extern "C" { - pub fn OSRGetAttrValue( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - iChild: libc::c_int, - ) -> *const libc::c_char; +pub mod OSRAxisMappingStrategy { + pub type Type = libc::c_uint; + pub const OAMS_TRADITIONAL_GIS_ORDER: Type = 0; + pub const OAMS_AUTHORITY_COMPLIANT: Type = 1; + pub const OAMS_CUSTOM: Type = 2; } extern "C" { - pub fn OSRSetAngularUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; + pub fn OSRGetAxisMappingStrategy(hSRS: OGRSpatialReferenceH) -> OSRAxisMappingStrategy::Type; } extern "C" { - pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn OSRSetAxisMappingStrategy( + hSRS: OGRSpatialReferenceH, + strategy: OSRAxisMappingStrategy::Type, + ); } extern "C" { - pub fn OSRSetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; + pub fn OSRGetDataAxisToSRSAxisMapping( + hSRS: OGRSpatialReferenceH, + pnCount: *mut libc::c_int, + ) -> *const libc::c_int; } extern "C" { - pub fn OSRSetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: f64, + pub fn OSRSetDataAxisToSRSAxisMapping( + hSRS: OGRSpatialReferenceH, + nMappingSize: libc::c_int, + panMapping: *const libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetLinearUnitsAndUpdateParameters( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, + pub fn OSRSetACEA( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRGetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> f64; -} -extern "C" { - pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetAE( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsDerivedGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetBonne( + hSRS: OGRSpatialReferenceH, + dfStandardParallel: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetCEA( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetCS( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEC( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEckert( + hSRS: OGRSpatialReferenceH, + nVariation: libc::c_int, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEckertIV( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEckertVI( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEquirectangular( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEquirectangular2( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfPseudoStdParallel1: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSameEx( - arg1: OGRSpatialReferenceH, - arg2: OGRSpatialReferenceH, - papszOptions: *const *const libc::c_char, - ) -> libc::c_int; + pub fn OSRSetGS( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn OSRSetGH( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn OSRSetGEOS( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfSatelliteHeight: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetWellKnownGeogCS( + pub fn OSRSetGaussSchreiberTMercator( hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetFromUserInput( + pub fn OSRSetGnomonic( hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRCopyGeogCSFrom( + pub fn OSRSetHOM( hSRS: OGRSpatialReferenceH, - hSrcSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfRectToSkew: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetTOWGS84( + pub fn OSRSetHOMAC( hSRS: OGRSpatialReferenceH, - arg1: f64, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - arg6: f64, - arg7: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfRectToSkew: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetTOWGS84( + pub fn OSRSetHOM2PNO( hSRS: OGRSpatialReferenceH, - arg1: *mut f64, - arg2: libc::c_int, + dfCenterLat: f64, + dfLat1: f64, + dfLong1: f64, + dfLat2: f64, + dfLong2: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRAddGuessedTOWGS84(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OSRSetIWMPolyconic( + hSRS: OGRSpatialReferenceH, + dfLat1: f64, + dfLat2: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetCompoundCS( + pub fn OSRSetKrovak( hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - hHorizSRS: OGRSpatialReferenceH, - hVertSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfPseudoStdParallelLat: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRPromoteTo3D(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) - -> OGRErr::Type; + pub fn OSRSetLAEA( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetGeogCS( + pub fn OSRSetLCC( hSRS: OGRSpatialReferenceH, - pszGeogName: *const libc::c_char, - pszDatumName: *const libc::c_char, - pszEllipsoidName: *const libc::c_char, - dfSemiMajor: f64, - dfInvFlattening: f64, - pszPMName: *const libc::c_char, - dfPMOffset: f64, - pszUnits: *const libc::c_char, - dfConvertToRadians: f64, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetVertCS( + pub fn OSRSetLCC1SP( hSRS: OGRSpatialReferenceH, - pszVertCSName: *const libc::c_char, - pszVertDatumName: *const libc::c_char, - nVertDatumType: libc::c_int, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + pub fn OSRSetLCCB( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + pub fn OSRSetMC( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + pub fn OSRSetMercator( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetAuthority( + pub fn OSRSetMercator2SP( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszAuthority: *const libc::c_char, - nCode: libc::c_int, + dfStdP1: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAuthorityCode( + pub fn OSRSetMollweide( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAuthorityName( + pub fn OSRSetNZMG( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAreaOfUse( + pub fn OSRSetOS( hSRS: OGRSpatialReferenceH, - pdfWestLongitudeDeg: *mut f64, - pdfSouthLatitudeDeg: *mut f64, - pdfEastLongitudeDeg: *mut f64, - pdfNorthLatitudeDeg: *mut f64, - ppszAreaName: *mut *const libc::c_char, - ) -> libc::c_int; + dfOriginLat: f64, + dfCMeridian: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OSRSetOrthographic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, + pub fn OSRSetPolyconic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetProjParm( + pub fn OSRSetPS( hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetNormProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, + pub fn OSRSetRobinson( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetNormProjParm( + pub fn OSRSetSinusoidal( hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetUTM( + pub fn OSRSetStereographic( hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNorth: libc::c_int, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; + pub fn OSRSetSOC( + hSRS: OGRSpatialReferenceH, + dfLatitudeOfOrigin: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetStatePlane( + pub fn OSRSetTM( hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetStatePlaneWithUnits( + pub fn OSRSetTMVariant( hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - pszOverrideUnitName: *const libc::c_char, - dfOverrideUnit: f64, + pszVariantName: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OSRSetTMG( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRFindMatches( + pub fn OSRSetTMSO( hSRS: OGRSpatialReferenceH, - papszOptions: *mut *mut libc::c_char, - pnEntries: *mut libc::c_int, - ppanMatchConfidence: *mut *mut libc::c_int, - ) -> *mut OGRSpatialReferenceH; + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRFreeSRSArray(pahSRS: *mut OGRSpatialReferenceH); + pub fn OSRSetTPED( + hSRS: OGRSpatialReferenceH, + dfLat1: f64, + dfLong1: f64, + dfLat2: f64, + dfLong2: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetVDG( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetWagner( + hSRS: OGRSpatialReferenceH, + nVariation: libc::c_int, + dfCenterLat: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAxis( + pub fn OSRSetQSC( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - iAxis: libc::c_int, - peOrientation: *mut OGRAxisOrientation::Type, - ) -> *const libc::c_char; + dfCenterLat: f64, + dfCenterLong: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAxesCount(hSRS: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetSCH( + hSRS: OGRSpatialReferenceH, + dfPegLat: f64, + dfPegLong: f64, + dfPegHeading: f64, + dfPegHgt: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetAxes( + pub fn OSRSetVerticalPerspective( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszXAxisName: *const libc::c_char, - eXAxisOrientation: OGRAxisOrientation::Type, - pszYAxisName: *const libc::c_char, - eYAxisOrientation: OGRAxisOrientation::Type, + dfTopoOriginLat: f64, + dfTopoOriginLon: f64, + dfTopoOriginHeight: f64, + dfViewPointHeight: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } -pub mod OSRAxisMappingStrategy { - pub type Type = u32; - pub const OAMS_TRADITIONAL_GIS_ORDER: Type = 0; - pub const OAMS_AUTHORITY_COMPLIANT: Type = 1; - pub const OAMS_CUSTOM: Type = 2; +extern "C" { + pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; } extern "C" { - pub fn OSRGetAxisMappingStrategy(hSRS: OGRSpatialReferenceH) -> OSRAxisMappingStrategy::Type; + pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; } extern "C" { - pub fn OSRSetAxisMappingStrategy( - hSRS: OGRSpatialReferenceH, - strategy: OSRAxisMappingStrategy::Type, + pub fn OSRCleanup(); +} +pub mod OSRCRSType { + pub type Type = libc::c_uint; + pub const OSR_CRS_TYPE_GEOGRAPHIC_2D: Type = 0; + pub const OSR_CRS_TYPE_GEOGRAPHIC_3D: Type = 1; + pub const OSR_CRS_TYPE_GEOCENTRIC: Type = 2; + pub const OSR_CRS_TYPE_PROJECTED: Type = 3; + pub const OSR_CRS_TYPE_VERTICAL: Type = 4; + pub const OSR_CRS_TYPE_COMPOUND: Type = 5; + pub const OSR_CRS_TYPE_OTHER: Type = 6; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OSRCRSInfo { + pub pszAuthName: *mut libc::c_char, + pub pszCode: *mut libc::c_char, + pub pszName: *mut libc::c_char, + pub eType: OSRCRSType::Type, + pub bDeprecated: libc::c_int, + pub bBboxValid: libc::c_int, + pub dfWestLongitudeDeg: f64, + pub dfSouthLatitudeDeg: f64, + pub dfEastLongitudeDeg: f64, + pub dfNorthLatitudeDeg: f64, + pub pszAreaName: *mut libc::c_char, + pub pszProjectionMethod: *mut libc::c_char, +} +#[test] +fn bindgen_test_layout_OSRCRSInfo() { + assert_eq!( + ::std::mem::size_of::(), + 88usize, + concat!("Size of: ", stringify!(OSRCRSInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OSRCRSInfo)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszAuthName as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszAuthName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszCode as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszCode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszName as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(eType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bDeprecated as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(bDeprecated) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bBboxValid as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(bBboxValid) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfWestLongitudeDeg as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfWestLongitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfSouthLatitudeDeg as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfSouthLatitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfEastLongitudeDeg as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfEastLongitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfNorthLatitudeDeg as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfNorthLatitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszAreaName as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszAreaName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszProjectionMethod as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszProjectionMethod) + ) ); } -extern "C" { - pub fn OSRGetDataAxisToSRSAxisMapping( - hSRS: OGRSpatialReferenceH, - pnCount: *mut libc::c_int, - ) -> *const libc::c_int; -} -extern "C" { - pub fn OSRSetDataAxisToSRSAxisMapping( - hSRS: OGRSpatialReferenceH, - nMappingSize: libc::c_int, - panMapping: *const libc::c_int, - ) -> OGRErr::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OSRCRSListParameters { + _unused: [u8; 0], } extern "C" { - pub fn OSRSetACEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRGetCRSInfoListFromDatabase( + pszAuthName: *const libc::c_char, + params: *const OSRCRSListParameters, + pnOutResultCount: *mut libc::c_int, + ) -> *mut *mut OSRCRSInfo; } extern "C" { - pub fn OSRSetAE( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRDestroyCRSInfoList(list: *mut *mut OSRCRSInfo); } extern "C" { - pub fn OSRSetBonne( - hSRS: OGRSpatialReferenceH, - dfStandardParallel: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTNewCoordinateTransformation( + hSourceSRS: OGRSpatialReferenceH, + hTargetSRS: OGRSpatialReferenceH, + ) -> OGRCoordinateTransformationH; } -extern "C" { - pub fn OSRSetCEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRCoordinateTransformationOptions { + _unused: [u8; 0], } +pub type OGRCoordinateTransformationOptionsH = *mut OGRCoordinateTransformationOptions; extern "C" { - pub fn OSRSetCS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTNewCoordinateTransformationOptions() -> OGRCoordinateTransformationOptionsH; } extern "C" { - pub fn OSRSetEC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTCoordinateTransformationOptionsSetOperation( + hOptions: OGRCoordinateTransformationOptionsH, + pszCO: *const libc::c_char, + bReverseCO: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetEckert( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTCoordinateTransformationOptionsSetAreaOfInterest( + hOptions: OGRCoordinateTransformationOptionsH, + dfWestLongitudeDeg: f64, + dfSouthLatitudeDeg: f64, + dfEastLongitudeDeg: f64, + dfNorthLatitudeDeg: f64, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetEckertIV( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTDestroyCoordinateTransformationOptions(arg1: OGRCoordinateTransformationOptionsH); } extern "C" { - pub fn OSRSetEckertVI( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTNewCoordinateTransformationEx( + hSourceSRS: OGRSpatialReferenceH, + hTargetSRS: OGRSpatialReferenceH, + hOptions: OGRCoordinateTransformationOptionsH, + ) -> OGRCoordinateTransformationH; } extern "C" { - pub fn OSRSetEquirectangular( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); } extern "C" { - pub fn OSRSetEquirectangular2( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfPseudoStdParallel1: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTTransform( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetGS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTTransformEx( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + pabSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetGH( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTTransform4D( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + t: *mut f64, + pabSuccess: *mut libc::c_int, + ) -> libc::c_int; } +pub type CPLThreadFunc = ::std::option::Option; extern "C" { - pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; } extern "C" { - pub fn OSRSetGEOS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfSatelliteHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLUnlockFile(hLock: *mut libc::c_void); } extern "C" { - pub fn OSRSetGaussSchreiberTMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateMutex() -> *mut libc::c_void; } extern "C" { - pub fn OSRSetGnomonic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; } extern "C" { - pub fn OSRSetHOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateOrAcquireMutex( + arg1: *mut *mut libc::c_void, + dfWaitInSeconds: f64, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetHOMAC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateOrAcquireMutexEx( + arg1: *mut *mut libc::c_void, + dfWaitInSeconds: f64, + nOptions: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetHOM2PNO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; } extern "C" { - pub fn OSRSetIWMPolyconic( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLat2: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); } extern "C" { - pub fn OSRSetKrovak( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfPseudoStdParallelLat: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); } extern "C" { - pub fn OSRSetLAEA( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCleanupMasterMutex(); } extern "C" { - pub fn OSRSetLCC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateCond() -> *mut libc::c_void; } extern "C" { - pub fn OSRSetLCC1SP( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); +} +pub mod CPLCondTimedWaitReason { + pub type Type = libc::c_uint; + pub const COND_TIMED_WAIT_COND: Type = 0; + pub const COND_TIMED_WAIT_TIME_OUT: Type = 1; + pub const COND_TIMED_WAIT_OTHER: Type = 2; } extern "C" { - pub fn OSRSetLCCB( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondTimedWait( + hCond: *mut libc::c_void, + hMutex: *mut libc::c_void, + dfWaitInSeconds: f64, + ) -> CPLCondTimedWaitReason::Type; } extern "C" { - pub fn OSRSetMC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondSignal(hCond: *mut libc::c_void); } extern "C" { - pub fn OSRSetMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondBroadcast(hCond: *mut libc::c_void); } extern "C" { - pub fn OSRSetMercator2SP( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLDestroyCond(hCond: *mut libc::c_void); } extern "C" { - pub fn OSRSetMollweide( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetPID() -> GIntBig; } extern "C" { - pub fn OSRSetNZMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetCurrentProcessID() -> libc::c_int; } extern "C" { - pub fn OSRSetOS( - hSRS: OGRSpatialReferenceH, - dfOriginLat: f64, - dfCMeridian: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; } extern "C" { - pub fn OSRSetOrthographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateJoinableThread( + pfnMain: CPLThreadFunc, + pArg: *mut libc::c_void, + ) -> *mut libc::c_void; } extern "C" { - pub fn OSRSetPolyconic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); } extern "C" { - pub fn OSRSetPS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLSleep(dfWaitInSeconds: f64); } extern "C" { - pub fn OSRSetRobinson( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetThreadingModel() -> *const libc::c_char; } extern "C" { - pub fn OSRSetSinusoidal( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetNumCPUs() -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLLock { + _unused: [u8; 0], +} +pub type CPLLock = _CPLLock; +pub mod CPLLockType { + pub type Type = libc::c_uint; + pub const LOCK_RECURSIVE_MUTEX: Type = 0; + pub const LOCK_ADAPTIVE_MUTEX: Type = 1; + pub const LOCK_SPIN: Type = 2; } extern "C" { - pub fn OSRSetStereographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; } extern "C" { - pub fn OSRSetSOC( - hSRS: OGRSpatialReferenceH, - dfLatitudeOfOrigin: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) + -> libc::c_int; } extern "C" { - pub fn OSRSetTM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; } extern "C" { - pub fn OSRSetTMVariant( - hSRS: OGRSpatialReferenceH, - pszVariantName: *const libc::c_char, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLReleaseLock(arg1: *mut CPLLock); } extern "C" { - pub fn OSRSetTMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLDestroyLock(arg1: *mut CPLLock); } extern "C" { - pub fn OSRSetTMSO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); } extern "C" { - pub fn OSRSetTPED( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLGetTLSEx( + nIndex: libc::c_int, + pbMemoryErrorOccurred: *mut libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - pub fn OSRSetVDG( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); } +pub type CPLTLSFreeFunc = ::std::option::Option; extern "C" { - pub fn OSRSetWagner( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCenterLat: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLSetTLSWithFreeFunc( + nIndex: libc::c_int, + pData: *mut libc::c_void, + pfnFree: CPLTLSFreeFunc, + ); } extern "C" { - pub fn OSRSetQSC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - ) -> OGRErr::Type; + pub fn CPLSetTLSWithFreeFuncEx( + nIndex: libc::c_int, + pData: *mut libc::c_void, + pfnFree: CPLTLSFreeFunc, + pbMemoryErrorOccurred: *mut libc::c_int, + ); } extern "C" { - pub fn OSRSetSCH( - hSRS: OGRSpatialReferenceH, - dfPegLat: f64, - dfPegLong: f64, - dfPegHeading: f64, - dfPegHgt: f64, - ) -> OGRErr::Type; + pub fn CPLCleanupTLS(); +} +pub mod GDALResampleAlg { + pub type Type = libc::c_uint; + pub const GRA_NearestNeighbour: Type = 0; + pub const GRA_Bilinear: Type = 1; + pub const GRA_Cubic: Type = 2; + pub const GRA_CubicSpline: Type = 3; + pub const GRA_Lanczos: Type = 4; + pub const GRA_Average: Type = 5; + pub const GRA_Mode: Type = 6; + pub const GRA_Max: Type = 8; + pub const GRA_Min: Type = 9; + pub const GRA_Med: Type = 10; + pub const GRA_Q1: Type = 11; + pub const GRA_Q3: Type = 12; + pub const GRA_Sum: Type = 13; } +pub type GDALMaskFunc = ::std::option::Option< + unsafe extern "C" fn( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + papabyImageData: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pMask: *mut libc::c_void, + ) -> libc::c_int, +>; extern "C" { - pub fn OSRSetVerticalPerspective( - hSRS: OGRSpatialReferenceH, - dfTopoOriginLat: f64, - dfTopoOriginLon: f64, - dfTopoOriginHeight: f64, - dfViewPointHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpNoDataMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + papabyImageData: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + pbOutAllValid: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; + pub fn GDALWarpDstAlphaMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; + pub fn GDALWarpSrcAlphaMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + pbOutAllOpaque: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCleanup(); + pub fn GDALWarpSrcMaskMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; } -pub mod OSRCRSType { - pub type Type = u32; - pub const OSR_CRS_TYPE_GEOGRAPHIC_2D: Type = 0; - pub const OSR_CRS_TYPE_GEOGRAPHIC_3D: Type = 1; - pub const OSR_CRS_TYPE_GEOCENTRIC: Type = 2; - pub const OSR_CRS_TYPE_PROJECTED: Type = 3; - pub const OSR_CRS_TYPE_VERTICAL: Type = 4; - pub const OSR_CRS_TYPE_COMPOUND: Type = 5; - pub const OSR_CRS_TYPE_OTHER: Type = 6; +extern "C" { + pub fn GDALWarpCutlineMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OSRCRSInfo { - pub pszAuthName: *mut libc::c_char, - pub pszCode: *mut libc::c_char, - pub pszName: *mut libc::c_char, - pub eType: OSRCRSType::Type, - pub bDeprecated: libc::c_int, - pub bBboxValid: libc::c_int, - pub dfWestLongitudeDeg: f64, - pub dfSouthLatitudeDeg: f64, - pub dfEastLongitudeDeg: f64, - pub dfNorthLatitudeDeg: f64, - pub pszAreaName: *mut libc::c_char, - pub pszProjectionMethod: *mut libc::c_char, +pub struct GDALWarpOptions { + pub papszWarpOptions: *mut *mut libc::c_char, + pub dfWarpMemoryLimit: f64, + pub eResampleAlg: GDALResampleAlg::Type, + pub eWorkingDataType: GDALDataType::Type, + pub hSrcDS: GDALDatasetH, + pub hDstDS: GDALDatasetH, + pub nBandCount: libc::c_int, + pub panSrcBands: *mut libc::c_int, + pub panDstBands: *mut libc::c_int, + pub nSrcAlphaBand: libc::c_int, + pub nDstAlphaBand: libc::c_int, + pub padfSrcNoDataReal: *mut f64, + pub padfSrcNoDataImag: *mut f64, + pub padfDstNoDataReal: *mut f64, + pub padfDstNoDataImag: *mut f64, + pub pfnProgress: GDALProgressFunc, + pub pProgressArg: *mut libc::c_void, + pub pfnTransformer: GDALTransformerFunc, + pub pTransformerArg: *mut libc::c_void, + pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, + pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, + pub pfnSrcValidityMaskFunc: GDALMaskFunc, + pub pSrcValidityMaskFuncArg: *mut libc::c_void, + pub pfnSrcDensityMaskFunc: GDALMaskFunc, + pub pSrcDensityMaskFuncArg: *mut libc::c_void, + pub pfnDstDensityMaskFunc: GDALMaskFunc, + pub pDstDensityMaskFuncArg: *mut libc::c_void, + pub pfnDstValidityMaskFunc: GDALMaskFunc, + pub pDstValidityMaskFuncArg: *mut libc::c_void, + pub pfnPreWarpChunkProcessor: ::std::option::Option< + unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, + >, + pub pPreWarpProcessorArg: *mut libc::c_void, + pub pfnPostWarpChunkProcessor: ::std::option::Option< + unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, + >, + pub pPostWarpProcessorArg: *mut libc::c_void, + pub hCutline: *mut libc::c_void, + pub dfCutlineBlendDist: f64, } #[test] -fn bindgen_test_layout_OSRCRSInfo() { +fn bindgen_test_layout_GDALWarpOptions() { + assert_eq!( + ::std::mem::size_of::(), + 264usize, + concat!("Size of: ", stringify!(GDALWarpOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALWarpOptions)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papszWarpOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(dfWarpMemoryLimit) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(eResampleAlg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(eWorkingDataType) + ) + ); assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hSrcDS) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hDstDS) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nBandCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(panSrcBands) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(panDstBands) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nSrcAlphaBand) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nDstAlphaBand) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfSrcNoDataReal) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfSrcNoDataImag) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize + }, 88usize, - concat!("Size of: ", stringify!(OSRCRSInfo)) + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfDstNoDataReal) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OSRCRSInfo)) + unsafe { + &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfDstNoDataImag) + ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAuthName as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, + 104usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszAuthName) + stringify!(pfnProgress) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszCode as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, + 112usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszCode) + stringify!(pProgressArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszName as *const _ as usize }, - 16usize, + unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, + 120usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszName) + stringify!(pfnTransformer) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 24usize, + unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, + 128usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(eType) + stringify!(pTransformerArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bDeprecated as *const _ as usize }, - 28usize, + unsafe { + &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ + as usize + }, + 136usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papfnSrcPerBandValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ + as usize + }, + 144usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papSrcPerBandValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnSrcValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize + }, + 160usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pSrcValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize + }, + 168usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnSrcDensityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize + }, + 176usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pSrcDensityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize + }, + 184usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnDstDensityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize + }, + 192usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pDstDensityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize + }, + 200usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(bDeprecated) + stringify!(pfnDstValidityMaskFunc) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bBboxValid as *const _ as usize }, - 32usize, + unsafe { + &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize + }, + 208usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(bBboxValid) + stringify!(pDstValidityMaskFuncArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfWestLongitudeDeg as *const _ as usize }, - 40usize, + unsafe { + &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ + as usize + }, + 216usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfWestLongitudeDeg) + stringify!(pfnPreWarpChunkProcessor) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSouthLatitudeDeg as *const _ as usize }, - 48usize, + unsafe { + &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize + }, + 224usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfSouthLatitudeDeg) + stringify!(pPreWarpProcessorArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfEastLongitudeDeg as *const _ as usize }, - 56usize, + unsafe { + &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ + as usize + }, + 232usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfEastLongitudeDeg) + stringify!(pfnPostWarpChunkProcessor) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfNorthLatitudeDeg as *const _ as usize }, - 64usize, + unsafe { + &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize + }, + 240usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfNorthLatitudeDeg) + stringify!(pPostWarpProcessorArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAreaName as *const _ as usize }, - 72usize, + unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, + 248usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszAreaName) + stringify!(hCutline) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszProjectionMethod as *const _ as usize }, - 80usize, + unsafe { + &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize + }, + 256usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszProjectionMethod) + stringify!(dfCutlineBlendDist) ) ); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OSRCRSListParameters { - _unused: [u8; 0], +extern "C" { + pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; } extern "C" { - pub fn OSRGetCRSInfoListFromDatabase( - pszAuthName: *const libc::c_char, - params: *const OSRCRSListParameters, - pnOutResultCount: *mut libc::c_int, - ) -> *mut *mut OSRCRSInfo; + pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); } extern "C" { - pub fn OSRDestroyCRSInfoList(list: *mut *mut OSRCRSInfo); + pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; } extern "C" { - pub fn OCTNewCoordinateTransformation( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - ) -> OGRCoordinateTransformationH; + pub fn GDALWarpInitDstNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRCoordinateTransformationOptions { - _unused: [u8; 0], +extern "C" { + pub fn GDALWarpInitSrcNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } -pub type OGRCoordinateTransformationOptionsH = *mut OGRCoordinateTransformationOptions; extern "C" { - pub fn OCTNewCoordinateTransformationOptions() -> OGRCoordinateTransformationOptionsH; + pub fn GDALWarpInitNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } extern "C" { - pub fn OCTCoordinateTransformationOptionsSetOperation( - hOptions: OGRCoordinateTransformationOptionsH, - pszCO: *const libc::c_char, - bReverseCO: libc::c_int, - ) -> libc::c_int; + pub fn GDALWarpInitDstNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); } extern "C" { - pub fn OCTCoordinateTransformationOptionsSetAreaOfInterest( - hOptions: OGRCoordinateTransformationOptionsH, - dfWestLongitudeDeg: f64, - dfSouthLatitudeDeg: f64, - dfEastLongitudeDeg: f64, - dfNorthLatitudeDeg: f64, - ) -> libc::c_int; + pub fn GDALWarpInitSrcNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); } extern "C" { - pub fn OCTDestroyCoordinateTransformationOptions(arg1: OGRCoordinateTransformationOptionsH); + pub fn GDALWarpResolveWorkingDataType(arg1: *mut GDALWarpOptions); } extern "C" { - pub fn OCTNewCoordinateTransformationEx( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - hOptions: OGRCoordinateTransformationOptionsH, - ) -> OGRCoordinateTransformationH; + pub fn GDALWarpInitDefaultBandMapping(arg1: *mut GDALWarpOptions, nBandCount: libc::c_int); } extern "C" { - pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); + pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; } extern "C" { - pub fn OCTTransform( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - ) -> libc::c_int; + pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; } extern "C" { - pub fn OCTTransformEx( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALReprojectImage( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + hDstDS: GDALDatasetH, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfWarpMemoryLimit: f64, + dfMaxError: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + psOptions: *mut GDALWarpOptions, + ) -> CPLErr::Type; } extern "C" { - pub fn OCTTransform4D( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - t: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALCreateAndReprojectImage( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstFilename: *const libc::c_char, + pszDstWKT: *const libc::c_char, + hDstDriver: GDALDriverH, + papszCreateOptions: *mut *mut libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfWarpMemoryLimit: f64, + dfMaxError: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + psOptions: *mut GDALWarpOptions, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALAutoCreateWarpedVRT( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfMaxError: f64, + psOptions: *const GDALWarpOptions, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALCreateWarpedVRT( + hSrcDS: GDALDatasetH, + nPixels: libc::c_int, + nLines: libc::c_int, + padfGeoTransform: *mut f64, + psOptions: *mut GDALWarpOptions, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; +} +pub type GDALWarpOperationH = *mut libc::c_void; +extern "C" { + pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; +} +extern "C" { + pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); +} +extern "C" { + pub fn GDALChunkAndWarpImage( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALChunkAndWarpMulti( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpRegion( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: libc::c_int, + arg9: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpRegionToBuffer( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: *mut libc::c_void, + arg7: GDALDataType::Type, + arg8: libc::c_int, + arg9: libc::c_int, + arg10: libc::c_int, + arg11: libc::c_int, + ) -> CPLErr::Type; } pub mod OGRErr { #[doc = " Type for a OGR error"] #[doc = ""] #[doc = "
"] - pub type Type = u32; + pub type Type = libc::c_uint; #[doc = " Success"] #[doc = ""] #[doc = "
"] diff --git a/gdal-sys/prebuilt-bindings/gdal_3.2.rs b/gdal-sys/prebuilt-bindings/gdal_3.2.rs index ad71acf0..de9bea5b 100644 --- a/gdal-sys/prebuilt-bindings/gdal_3.2.rs +++ b/gdal-sys/prebuilt-bindings/gdal_3.2.rs @@ -1,330 +1,378 @@ -/* automatically generated by rust-bindgen 0.55.1 */ +/* automatically generated by rust-bindgen 0.59.1 */ -pub type __uint16_t = libc::c_ushort; -pub type __int32_t = libc::c_int; -pub type __uint32_t = libc::c_uint; -pub type __int64_t = libc::c_longlong; -pub type __uint64_t = libc::c_ulonglong; -pub type __darwin_size_t = libc::c_ulong; -pub type __darwin_va_list = __builtin_va_list; -pub type __darwin_time_t = libc::c_long; -pub type __darwin_blkcnt_t = __int64_t; -pub type __darwin_blksize_t = __int32_t; -pub type __darwin_dev_t = __int32_t; -pub type __darwin_gid_t = __uint32_t; -pub type __darwin_ino64_t = __uint64_t; -pub type __darwin_mode_t = __uint16_t; -pub type __darwin_off_t = __int64_t; -pub type __darwin_uid_t = __uint32_t; -pub type va_list = __darwin_va_list; -pub type size_t = __darwin_size_t; -pub type fpos_t = __darwin_off_t; +pub type va_list = __builtin_va_list; +pub type __dev_t = libc::c_ulong; +pub type __uid_t = libc::c_uint; +pub type __gid_t = libc::c_uint; +pub type __ino_t = libc::c_ulong; +pub type __mode_t = libc::c_uint; +pub type __nlink_t = libc::c_ulong; +pub type __off_t = libc::c_long; +pub type __off64_t = libc::c_long; +pub type __time_t = libc::c_long; +pub type __blksize_t = libc::c_long; +pub type __blkcnt_t = libc::c_long; +pub type __syscall_slong_t = libc::c_long; +pub type FILE = _IO_FILE; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __sbuf { - pub _base: *mut libc::c_uchar, - pub _size: libc::c_int, +pub struct _IO_marker { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout___sbuf() { - assert_eq!( - ::std::mem::size_of::<__sbuf>(), - 16usize, - concat!("Size of: ", stringify!(__sbuf)) - ); - assert_eq!( - ::std::mem::align_of::<__sbuf>(), - 8usize, - concat!("Alignment of ", stringify!(__sbuf)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sbuf>()))._base as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sbuf), - "::", - stringify!(_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sbuf>()))._size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sbuf), - "::", - stringify!(_size) - ) - ); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_codecvt { + _unused: [u8; 0], } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __sFILEX { +pub struct _IO_wide_data { _unused: [u8; 0], } +pub type _IO_lock_t = libc::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __sFILE { - pub _p: *mut libc::c_uchar, - pub _r: libc::c_int, - pub _w: libc::c_int, - pub _flags: libc::c_short, - pub _file: libc::c_short, - pub _bf: __sbuf, - pub _lbfsize: libc::c_int, - pub _cookie: *mut libc::c_void, - pub _close: ::std::option::Option libc::c_int>, - pub _read: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut libc::c_void, - arg2: *mut libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int, - >, - pub _seek: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut libc::c_void, arg2: fpos_t, arg3: libc::c_int) -> fpos_t, - >, - pub _write: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut libc::c_void, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int, - >, - pub _ub: __sbuf, - pub _extra: *mut __sFILEX, - pub _ur: libc::c_int, - pub _ubuf: [libc::c_uchar; 3usize], - pub _nbuf: [libc::c_uchar; 1usize], - pub _lb: __sbuf, - pub _blksize: libc::c_int, - pub _offset: fpos_t, +pub struct _IO_FILE { + pub _flags: libc::c_int, + pub _IO_read_ptr: *mut libc::c_char, + pub _IO_read_end: *mut libc::c_char, + pub _IO_read_base: *mut libc::c_char, + pub _IO_write_base: *mut libc::c_char, + pub _IO_write_ptr: *mut libc::c_char, + pub _IO_write_end: *mut libc::c_char, + pub _IO_buf_base: *mut libc::c_char, + pub _IO_buf_end: *mut libc::c_char, + pub _IO_save_base: *mut libc::c_char, + pub _IO_backup_base: *mut libc::c_char, + pub _IO_save_end: *mut libc::c_char, + pub _markers: *mut _IO_marker, + pub _chain: *mut _IO_FILE, + pub _fileno: libc::c_int, + pub _flags2: libc::c_int, + pub _old_offset: __off_t, + pub _cur_column: libc::c_ushort, + pub _vtable_offset: libc::c_schar, + pub _shortbuf: [libc::c_char; 1usize], + pub _lock: *mut _IO_lock_t, + pub _offset: __off64_t, + pub _codecvt: *mut _IO_codecvt, + pub _wide_data: *mut _IO_wide_data, + pub _freeres_list: *mut _IO_FILE, + pub _freeres_buf: *mut libc::c_void, + pub __pad5: usize, + pub _mode: libc::c_int, + pub _unused2: [libc::c_char; 20usize], } #[test] -fn bindgen_test_layout___sFILE() { +fn bindgen_test_layout__IO_FILE() { assert_eq!( - ::std::mem::size_of::<__sFILE>(), - 152usize, - concat!("Size of: ", stringify!(__sFILE)) + ::std::mem::size_of::<_IO_FILE>(), + 216usize, + concat!("Size of: ", stringify!(_IO_FILE)) ); assert_eq!( - ::std::mem::align_of::<__sFILE>(), + ::std::mem::align_of::<_IO_FILE>(), 8usize, - concat!("Alignment of ", stringify!(__sFILE)) + concat!("Alignment of ", stringify!(_IO_FILE)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._p as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_p) + stringify!(_flags) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._r as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_r) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._w as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_w) + stringify!(_IO_read_ptr) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._flags as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize }, 16usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_flags) + stringify!(_IO_read_end) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._file as *const _ as usize }, - 18usize, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_file) + stringify!(_IO_read_base) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._bf as *const _ as usize }, - 24usize, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize }, + 32usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_bf) + stringify!(_IO_write_base) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._lbfsize as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize }, 40usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_lbfsize) + stringify!(_IO_write_ptr) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._cookie as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize }, 48usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_cookie) + stringify!(_IO_write_end) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._close as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize }, 56usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_close) + stringify!(_IO_buf_base) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._read as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize }, 64usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_read) + stringify!(_IO_buf_end) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._seek as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize }, 72usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_seek) + stringify!(_IO_save_base) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._write as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize }, 80usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_write) + stringify!(_IO_backup_base) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._ub as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize }, 88usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), + "::", + stringify!(_IO_save_end) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), "::", - stringify!(_ub) + stringify!(_markers) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._extra as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize }, 104usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_extra) + stringify!(_chain) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._ur as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize }, 112usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_ur) + stringify!(_fileno) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._ubuf as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize }, 116usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_ubuf) + stringify!(_flags2) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._nbuf as *const _ as usize }, - 119usize, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize }, + 120usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_nbuf) + stringify!(_old_offset) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._lb as *const _ as usize }, - 120usize, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_cur_column) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize }, + 130usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_vtable_offset) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize }, + 131usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_lb) + stringify!(_shortbuf) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._blksize as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize }, 136usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", - stringify!(_blksize) + stringify!(_lock) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._offset as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize }, 144usize, concat!( "Offset of field: ", - stringify!(__sFILE), + stringify!(_IO_FILE), "::", stringify!(_offset) ) ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._codecvt as *const _ as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_codecvt) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._wide_data as *const _ as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_wide_data) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_list as *const _ as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_freeres_list) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_buf as *const _ as usize }, + 176usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_freeres_buf) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize }, + 184usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(__pad5) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_mode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize }, + 196usize, + concat!( + "Offset of field: ", + stringify!(_IO_FILE), + "::", + stringify!(_unused2) + ) + ); } -pub type FILE = __sFILE; -pub type off_t = __darwin_off_t; -pub type uid_t = __darwin_uid_t; -pub type dev_t = __darwin_dev_t; -pub type mode_t = __darwin_mode_t; -pub type time_t = __darwin_time_t; +pub type wchar_t = libc::c_int; +pub type time_t = __time_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timespec { - pub tv_sec: __darwin_time_t, - pub tv_nsec: libc::c_long, + pub tv_sec: __time_t, + pub tv_nsec: __syscall_slong_t, } #[test] fn bindgen_test_layout_timespec() { @@ -372,7 +420,7 @@ pub struct tm { pub tm_yday: libc::c_int, pub tm_isdst: libc::c_int, pub tm_gmtoff: libc::c_long, - pub tm_zone: *mut libc::c_char, + pub tm_zone: *const libc::c_char, } #[test] fn bindgen_test_layout_tm() { @@ -497,29 +545,26 @@ fn bindgen_test_layout_tm() { ) ); } -#[doc = " Int32 type"] pub type GInt32 = libc::c_int; -#[doc = " Unsigned int32 type"] pub type GUInt32 = libc::c_uint; -#[doc = " Int16 type"] pub type GInt16 = libc::c_short; -#[doc = " Unsigned byte type"] pub type GByte = libc::c_uchar; -#[doc = " Large signed integer type (generally 64-bit integer type)."] -#[doc = " Use GInt64 when exactly 64 bit is needed"] pub type GIntBig = libc::c_longlong; -#[doc = " Large unsigned integer type (generally 64-bit unsigned integer type)."] -#[doc = " Use GUInt64 when exactly 64 bit is needed"] pub type GUIntBig = libc::c_ulonglong; -#[doc = " Signed 64 bit integer type"] pub type GInt64 = GIntBig; -#[doc = " Unsigned 64 bit integer type"] pub type GUInt64 = GUIntBig; -#[doc = " Integer type large enough to hold the difference between 2 addresses"] pub type GPtrDiff_t = GIntBig; -#[doc = " Type of a constant null-terminated list of nul terminated strings."] -#[doc = " Seen as char** from C and const char* const* from C++"] pub type CSLConstList = *mut *mut libc::c_char; +extern "C" { + pub fn CPLAtomicAdd(ptr: *mut libc::c_int, increment: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn CPLAtomicCompareAndExchange( + ptr: *mut libc::c_int, + oldval: libc::c_int, + newval: libc::c_int, + ) -> libc::c_int; +} pub type GDALProgressFunc = ::std::option::Option< unsafe extern "C" fn( dfComplete: f64, @@ -559,31 +604,24 @@ extern "C" { extern "C" { pub fn GDALDestroyScaledProgress(arg1: *mut libc::c_void); } -pub type gid_t = __darwin_gid_t; -pub type blkcnt_t = __darwin_blkcnt_t; -pub type blksize_t = __darwin_blksize_t; -pub type nlink_t = __uint16_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct stat { - pub st_dev: dev_t, - pub st_mode: mode_t, - pub st_nlink: nlink_t, - pub st_ino: __darwin_ino64_t, - pub st_uid: uid_t, - pub st_gid: gid_t, - pub st_rdev: dev_t, - pub st_atimespec: timespec, - pub st_mtimespec: timespec, - pub st_ctimespec: timespec, - pub st_birthtimespec: timespec, - pub st_size: off_t, - pub st_blocks: blkcnt_t, - pub st_blksize: blksize_t, - pub st_flags: __uint32_t, - pub st_gen: __uint32_t, - pub st_lspare: __int32_t, - pub st_qspare: [__int64_t; 2usize], + pub st_dev: __dev_t, + pub st_ino: __ino_t, + pub st_nlink: __nlink_t, + pub st_mode: __mode_t, + pub st_uid: __uid_t, + pub st_gid: __gid_t, + pub __pad0: libc::c_int, + pub st_rdev: __dev_t, + pub st_size: __off_t, + pub st_blksize: __blksize_t, + pub st_blocks: __blkcnt_t, + pub st_atim: timespec, + pub st_mtim: timespec, + pub st_ctim: timespec, + pub __glibc_reserved: [__syscall_slong_t; 3usize], } #[test] fn bindgen_test_layout_stat() { @@ -608,18 +646,18 @@ fn bindgen_test_layout_stat() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_mode as *const _ as usize }, - 4usize, + unsafe { &(*(::std::ptr::null::())).st_ino as *const _ as usize }, + 8usize, concat!( "Offset of field: ", stringify!(stat), "::", - stringify!(st_mode) + stringify!(st_ino) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).st_nlink as *const _ as usize }, - 6usize, + 16usize, concat!( "Offset of field: ", stringify!(stat), @@ -628,18 +666,18 @@ fn bindgen_test_layout_stat() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_ino as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).st_mode as *const _ as usize }, + 24usize, concat!( "Offset of field: ", stringify!(stat), "::", - stringify!(st_ino) + stringify!(st_mode) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).st_uid as *const _ as usize }, - 16usize, + 28usize, concat!( "Offset of field: ", stringify!(stat), @@ -649,7 +687,7 @@ fn bindgen_test_layout_stat() { ); assert_eq!( unsafe { &(*(::std::ptr::null::())).st_gid as *const _ as usize }, - 20usize, + 32usize, concat!( "Offset of field: ", stringify!(stat), @@ -658,68 +696,48 @@ fn bindgen_test_layout_stat() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_rdev as *const _ as usize }, - 24usize, + unsafe { &(*(::std::ptr::null::())).__pad0 as *const _ as usize }, + 36usize, concat!( "Offset of field: ", stringify!(stat), "::", - stringify!(st_rdev) + stringify!(__pad0) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_atimespec as *const _ as usize }, - 32usize, + unsafe { &(*(::std::ptr::null::())).st_rdev as *const _ as usize }, + 40usize, concat!( "Offset of field: ", stringify!(stat), "::", - stringify!(st_atimespec) + stringify!(st_rdev) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_mtimespec as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).st_size as *const _ as usize }, 48usize, concat!( "Offset of field: ", stringify!(stat), "::", - stringify!(st_mtimespec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_ctimespec as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_ctimespec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_birthtimespec as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_birthtimespec) + stringify!(st_size) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_size as *const _ as usize }, - 96usize, + unsafe { &(*(::std::ptr::null::())).st_blksize as *const _ as usize }, + 56usize, concat!( "Offset of field: ", stringify!(stat), "::", - stringify!(st_size) + stringify!(st_blksize) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).st_blocks as *const _ as usize }, - 104usize, + 64usize, concat!( "Offset of field: ", stringify!(stat), @@ -728,58 +746,47 @@ fn bindgen_test_layout_stat() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_blksize as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(stat), - "::", - stringify!(st_blksize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_flags as *const _ as usize }, - 116usize, + unsafe { &(*(::std::ptr::null::())).st_atim as *const _ as usize }, + 72usize, concat!( "Offset of field: ", stringify!(stat), "::", - stringify!(st_flags) + stringify!(st_atim) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_gen as *const _ as usize }, - 120usize, + unsafe { &(*(::std::ptr::null::())).st_mtim as *const _ as usize }, + 88usize, concat!( "Offset of field: ", stringify!(stat), "::", - stringify!(st_gen) + stringify!(st_mtim) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_lspare as *const _ as usize }, - 124usize, + unsafe { &(*(::std::ptr::null::())).st_ctim as *const _ as usize }, + 104usize, concat!( "Offset of field: ", stringify!(stat), "::", - stringify!(st_lspare) + stringify!(st_ctim) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).st_qspare as *const _ as usize }, - 128usize, + unsafe { &(*(::std::ptr::null::())).__glibc_reserved as *const _ as usize }, + 120usize, concat!( "Offset of field: ", stringify!(stat), "::", - stringify!(st_qspare) + stringify!(__glibc_reserved) ) ); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn VSIFOpen(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut FILE; } extern "C" { @@ -798,16 +805,11 @@ extern "C" { pub fn VSIFFlush(arg1: *mut FILE); } extern "C" { - pub fn VSIFRead(arg1: *mut libc::c_void, arg2: size_t, arg3: size_t, arg4: *mut FILE) - -> size_t; + pub fn VSIFRead(arg1: *mut libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) -> usize; } extern "C" { - pub fn VSIFWrite( - arg1: *const libc::c_void, - arg2: size_t, - arg3: size_t, - arg4: *mut FILE, - ) -> size_t; + pub fn VSIFWrite(arg1: *const libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) + -> usize; } extern "C" { pub fn VSIFGets( @@ -834,14 +836,11 @@ extern "C" { extern "C" { pub fn VSIFEof(arg1: *mut FILE) -> libc::c_int; } -#[doc = " @cond Doxygen_Suppress"] pub type VSIStatBuf = stat; extern "C" { pub fn VSIStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; } -#[doc = " Type for a file offset"] pub type vsi_l_offset = GUIntBig; -#[doc = " Opaque type for a FILE that implements the VSIVirtualHandle API"] pub type VSILFILE = FILE; extern "C" { pub fn VSIFOpenL(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut VSILFILE; @@ -868,27 +867,27 @@ extern "C" { extern "C" { pub fn VSIFReadL( arg1: *mut libc::c_void, - arg2: size_t, - arg3: size_t, + arg2: usize, + arg3: usize, arg4: *mut VSILFILE, - ) -> size_t; + ) -> usize; } extern "C" { pub fn VSIFReadMultiRangeL( nRanges: libc::c_int, ppData: *mut *mut libc::c_void, panOffsets: *const vsi_l_offset, - panSizes: *const size_t, + panSizes: *const usize, arg1: *mut VSILFILE, ) -> libc::c_int; } extern "C" { pub fn VSIFWriteL( arg1: *const libc::c_void, - arg2: size_t, - arg3: size_t, + arg2: usize, + arg3: usize, arg4: *mut VSILFILE, - ) -> size_t; + ) -> usize; } extern "C" { pub fn VSIFEofL(arg1: *mut VSILFILE) -> libc::c_int; @@ -906,13 +905,9 @@ extern "C" { pub fn VSIFPutcL(arg1: libc::c_int, arg2: *mut VSILFILE) -> libc::c_int; } pub mod VSIRangeStatus { - #[doc = " Range status"] pub type Type = libc::c_uint; - #[doc = "< Unknown"] pub const VSI_RANGE_STATUS_UNKNOWN: Type = 0; - #[doc = "< Data present"] pub const VSI_RANGE_STATUS_DATA: Type = 1; - #[doc = "< Hole"] pub const VSI_RANGE_STATUS_HOLE: Type = 2; } extern "C" { @@ -937,8 +932,12 @@ extern "C" { pszSourceFilename: *const libc::c_char, ) -> libc::c_int; } -#[doc = " Type for VSIStatL()"] -pub type VSIStatBufL = stat; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct stat64 { + _unused: [u8; 0], +} +pub type VSIStatBufL = stat64; extern "C" { pub fn VSIStatL(arg1: *const libc::c_char, arg2: *mut VSIStatBufL) -> libc::c_int; } @@ -992,99 +991,83 @@ extern "C" { ) -> libc::c_int; } extern "C" { - pub fn VSICalloc(arg1: size_t, arg2: size_t) -> *mut libc::c_void; + pub fn VSICalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn VSIMalloc(arg1: size_t) -> *mut libc::c_void; + pub fn VSIMalloc(arg1: usize) -> *mut libc::c_void; } extern "C" { pub fn VSIFree(arg1: *mut libc::c_void); } extern "C" { - pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: size_t) -> *mut libc::c_void; + pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } extern "C" { pub fn VSIStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; } extern "C" { - pub fn VSIMallocAligned(nAlignment: size_t, nSize: size_t) -> *mut libc::c_void; + pub fn VSIMallocAligned(nAlignment: usize, nSize: usize) -> *mut libc::c_void; } extern "C" { - pub fn VSIMallocAlignedAuto(nSize: size_t) -> *mut libc::c_void; + pub fn VSIMallocAlignedAuto(nSize: usize) -> *mut libc::c_void; } extern "C" { pub fn VSIFreeAligned(ptr: *mut libc::c_void); } extern "C" { pub fn VSIMallocAlignedAutoVerbose( - nSize: size_t, + nSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; } extern "C" { - #[doc = "VSIMalloc2 allocates (nSize1 * nSize2) bytes."] - #[doc = "In case of overflow of the multiplication, or if memory allocation fails, a"] - #[doc = "NULL pointer is returned and a CE_Failure error is raised with CPLError()."] - #[doc = "If nSize1 == 0 || nSize2 == 0, a NULL pointer will also be returned."] - #[doc = "CPLFree() or VSIFree() can be used to free memory allocated by this function."] - pub fn VSIMalloc2(nSize1: size_t, nSize2: size_t) -> *mut libc::c_void; + pub fn VSIMalloc2(nSize1: usize, nSize2: usize) -> *mut libc::c_void; } extern "C" { - #[doc = "VSIMalloc3 allocates (nSize1 * nSize2 * nSize3) bytes."] - #[doc = "In case of overflow of the multiplication, or if memory allocation fails, a"] - #[doc = "NULL pointer is returned and a CE_Failure error is raised with CPLError()."] - #[doc = "If nSize1 == 0 || nSize2 == 0 || nSize3 == 0, a NULL pointer will also be returned."] - #[doc = "CPLFree() or VSIFree() can be used to free memory allocated by this function."] - pub fn VSIMalloc3(nSize1: size_t, nSize2: size_t, nSize3: size_t) -> *mut libc::c_void; + pub fn VSIMalloc3(nSize1: usize, nSize2: usize, nSize3: usize) -> *mut libc::c_void; } extern "C" { - #[doc = " VSIMallocVerbose"] pub fn VSIMallocVerbose( - nSize: size_t, + nSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; } extern "C" { - #[doc = " VSIMalloc2Verbose"] pub fn VSIMalloc2Verbose( - nSize1: size_t, - nSize2: size_t, + nSize1: usize, + nSize2: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; } extern "C" { - #[doc = " VSIMalloc3Verbose"] pub fn VSIMalloc3Verbose( - nSize1: size_t, - nSize2: size_t, - nSize3: size_t, + nSize1: usize, + nSize2: usize, + nSize3: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; } extern "C" { - #[doc = " VSICallocVerbose"] pub fn VSICallocVerbose( - nCount: size_t, - nSize: size_t, + nCount: usize, + nSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; } extern "C" { - #[doc = " VSIReallocVerbose"] pub fn VSIReallocVerbose( pOldPtr: *mut libc::c_void, - nNewSize: size_t, + nNewSize: usize, pszFile: *const libc::c_char, nLine: libc::c_int, ) -> *mut libc::c_void; } extern "C" { - #[doc = " VSIStrdupVerbose"] pub fn VSIStrdupVerbose( pszStr: *const libc::c_char, pszFile: *const libc::c_char, @@ -1124,25 +1107,16 @@ extern "C" { papszOptions: *const *const libc::c_char, ) -> *mut VSIDIR; } -#[doc = " Directory entry."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct VSIDIREntry { - #[doc = " Filename"] pub pszName: *mut libc::c_char, - #[doc = " File mode. See VSI_ISREG() / VSI_ISDIR()"] pub nMode: libc::c_int, - #[doc = " File size"] pub nSize: vsi_l_offset, - #[doc = " Last modification time (seconds since 1970/01/01)"] pub nMTime: GIntBig, - #[doc = " Whether nMode is known: 0 = unknown, 1 = known."] pub bModeKnown: libc::c_char, - #[doc = " Whether nSize is known: 0 = unknown, 1 = known."] pub bSizeKnown: libc::c_char, - #[doc = " Whether nMTime is known: 0 = unknown, 1 = known."] pub bMTimeKnown: libc::c_char, - #[doc = " NULL-terminated list of extra properties."] pub papszExtra: *mut *mut libc::c_char, } #[test] @@ -1293,11 +1267,9 @@ extern "C" { pub fn VSIInstallMemFileHandler(); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn VSIInstallLargeFileHandler(); } extern "C" { - #[doc = " @endcond"] pub fn VSIInstallSubFileHandler(); } extern "C" { @@ -1373,11 +1345,9 @@ extern "C" { pub fn VSISetCryptKey(pabyKey: *const GByte, nKeySize: libc::c_int); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn VSICleanupFileManager(); } extern "C" { - #[doc = " @endcond"] pub fn VSIFileFromMemBuffer( pszFilename: *const libc::c_char, pabyData: *mut GByte, @@ -1392,20 +1362,17 @@ extern "C" { bUnlinkAndSeize: libc::c_int, ) -> *mut GByte; } -#[doc = " Callback used by VSIStdoutSetRedirection()"] pub type VSIWriteFunction = ::std::option::Option< unsafe extern "C" fn( ptr: *const libc::c_void, - size: size_t, - nmemb: size_t, + size: usize, + nmemb: usize, stream: *mut FILE, - ) -> size_t, + ) -> usize, >; extern "C" { pub fn VSIStdoutSetRedirection(pFct: VSIWriteFunction, stream: *mut FILE); } -#[doc = " Return information about a handle. Optional (driver dependent)"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginStatCallback = ::std::option::Option< unsafe extern "C" fn( pUserData: *mut libc::c_void, @@ -1414,16 +1381,12 @@ pub type VSIFilesystemPluginStatCallback = ::std::option::Option< nFlags: libc::c_int, ) -> libc::c_int, >; -#[doc = " Remove handle by name. Optional"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginUnlinkCallback = ::std::option::Option< unsafe extern "C" fn( pUserData: *mut libc::c_void, pszFilename: *const libc::c_char, ) -> libc::c_int, >; -#[doc = " Rename handle. Optional"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginRenameCallback = ::std::option::Option< unsafe extern "C" fn( pUserData: *mut libc::c_void, @@ -1431,8 +1394,6 @@ pub type VSIFilesystemPluginRenameCallback = ::std::option::Option< newpath: *const libc::c_char, ) -> libc::c_int, >; -#[doc = " Create Directory. Optional"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginMkdirCallback = ::std::option::Option< unsafe extern "C" fn( pUserData: *mut libc::c_void, @@ -1440,16 +1401,12 @@ pub type VSIFilesystemPluginMkdirCallback = ::std::option::Option< nMode: libc::c_long, ) -> libc::c_int, >; -#[doc = " Delete Directory. Optional"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginRmdirCallback = ::std::option::Option< unsafe extern "C" fn( pUserData: *mut libc::c_void, pszDirname: *const libc::c_char, ) -> libc::c_int, >; -#[doc = " List directory content. Optional"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginReadDirCallback = ::std::option::Option< unsafe extern "C" fn( pUserData: *mut libc::c_void, @@ -1457,21 +1414,12 @@ pub type VSIFilesystemPluginReadDirCallback = ::std::option::Option< nMaxFiles: libc::c_int, ) -> *mut *mut libc::c_char, >; -#[doc = " List related files. Must return NULL if unknown, or a list of relative filenames"] -#[doc = " that can be opened along the main file. If no other file than pszFilename needs to"] -#[doc = " be opened, return static_cast (CPLCalloc(1,sizeof(char*)));"] -#[doc = ""] -#[doc = " Optional"] -#[doc = " @since GDAL 3.2"] pub type VSIFilesystemPluginSiblingFilesCallback = ::std::option::Option< unsafe extern "C" fn( pUserData: *mut libc::c_void, pszDirname: *const libc::c_char, ) -> *mut *mut libc::c_char, >; -#[doc = " Open a handle. Mandatory. Returns an opaque pointer that will be used in subsequent file I/O calls."] -#[doc = " Should return null and/or set errno if the handle does not exist or the access mode is incorrect."] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginOpenCallback = ::std::option::Option< unsafe extern "C" fn( pUserData: *mut libc::c_void, @@ -1479,12 +1427,8 @@ pub type VSIFilesystemPluginOpenCallback = ::std::option::Option< pszAccess: *const libc::c_char, ) -> *mut libc::c_void, >; -#[doc = " Return current position in handle. Mandatory"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginTellCallback = ::std::option::Option vsi_l_offset>; -#[doc = " Seek to position in handle. Mandatory except for write only handles"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginSeekCallback = ::std::option::Option< unsafe extern "C" fn( pFile: *mut libc::c_void, @@ -1492,30 +1436,23 @@ pub type VSIFilesystemPluginSeekCallback = ::std::option::Option< nWhence: libc::c_int, ) -> libc::c_int, >; -#[doc = " Read data from current position, returns the number of blocks correctly read."] -#[doc = " Mandatory except for write only handles"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginReadCallback = ::std::option::Option< unsafe extern "C" fn( pFile: *mut libc::c_void, pBuffer: *mut libc::c_void, - nSize: size_t, - nCount: size_t, - ) -> size_t, + nSize: usize, + nCount: usize, + ) -> usize, >; -#[doc = " Read from multiple offsets. Optional, will be replaced by multiple calls to Read() if not provided"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginReadMultiRangeCallback = ::std::option::Option< unsafe extern "C" fn( pFile: *mut libc::c_void, nRanges: libc::c_int, ppData: *mut *mut libc::c_void, panOffsets: *const vsi_l_offset, - panSizes: *const size_t, + panSizes: *const usize, ) -> libc::c_int, >; -#[doc = " Get empty ranges. Optional"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginGetRangeStatusCallback = ::std::option::Option< unsafe extern "C" fn( pFile: *mut libc::c_void, @@ -1523,81 +1460,46 @@ pub type VSIFilesystemPluginGetRangeStatusCallback = ::std::option::Option< nLength: vsi_l_offset, ) -> VSIRangeStatus::Type, >; -#[doc = " Has end of file been reached. Mandatory? for read handles."] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginEofCallback = ::std::option::Option libc::c_int>; -#[doc = " Write bytes at current offset. Mandatory for writable handles"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginWriteCallback = ::std::option::Option< unsafe extern "C" fn( pFile: *mut libc::c_void, pBuffer: *const libc::c_void, - nSize: size_t, - nCount: size_t, - ) -> size_t, + nSize: usize, + nCount: usize, + ) -> usize, >; -#[doc = " Sync written bytes. Optional"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginFlushCallback = ::std::option::Option libc::c_int>; -#[doc = " Truncate handle. Mandatory (driver dependent?) for write handles"] pub type VSIFilesystemPluginTruncateCallback = ::std::option::Option< unsafe extern "C" fn(pFile: *mut libc::c_void, nNewSize: vsi_l_offset) -> libc::c_int, >; -#[doc = " Close file handle. Optional"] -#[doc = " @since GDAL 3.0"] pub type VSIFilesystemPluginCloseCallback = ::std::option::Option libc::c_int>; -#[doc = " struct containing callbacks to used by the handler."] -#[doc = " (rw), (r), (w) or () at the end indicate whether the given callback is mandatory"] -#[doc = " for reading and or writing handlers. A (?) indicates that the callback might"] -#[doc = " be mandatory for certain drivers only."] -#[doc = " @since GDAL 3.0"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct VSIFilesystemPluginCallbacksStruct { - #[doc = " Optional opaque pointer passed back to filemanager callbacks (e.g. open, stat, rmdir)"] pub pUserData: *mut libc::c_void, - #[doc = "< stat handle by name (rw)"] pub stat: VSIFilesystemPluginStatCallback, - #[doc = "< unlink handle by name ()"] pub unlink: VSIFilesystemPluginUnlinkCallback, - #[doc = "< rename handle ()"] pub rename: VSIFilesystemPluginRenameCallback, - #[doc = "< make directory ()"] pub mkdir: VSIFilesystemPluginMkdirCallback, - #[doc = "< remove directory ()"] pub rmdir: VSIFilesystemPluginRmdirCallback, - #[doc = "< list directory content (r?)"] pub read_dir: VSIFilesystemPluginReadDirCallback, - #[doc = "< open handle by name (rw)"] pub open: VSIFilesystemPluginOpenCallback, - #[doc = "< get current position of handle (rw)"] pub tell: VSIFilesystemPluginTellCallback, - #[doc = "< set current position of handle (rw)"] pub seek: VSIFilesystemPluginSeekCallback, - #[doc = "< read from current position (r)"] pub read: VSIFilesystemPluginReadCallback, - #[doc = "< read multiple blocks ()"] pub read_multi_range: VSIFilesystemPluginReadMultiRangeCallback, - #[doc = "< get range status ()"] pub get_range_status: VSIFilesystemPluginGetRangeStatusCallback, - #[doc = "< has end of file been reached (r?)"] pub eof: VSIFilesystemPluginEofCallback, - #[doc = "< write bytes to current position (w)"] pub write: VSIFilesystemPluginWriteCallback, - #[doc = "< sync bytes (w)"] pub flush: VSIFilesystemPluginFlushCallback, - #[doc = "< truncate handle (w?)"] pub truncate: VSIFilesystemPluginTruncateCallback, - #[doc = "< close handle (rw)"] pub close: VSIFilesystemPluginCloseCallback, - #[doc = "< buffer small reads (makes handler read only)"] - pub nBufferSize: size_t, - #[doc = "< max mem to use per file when buffering"] - pub nCacheSize: size_t, - #[doc = "< list related files"] + pub nBufferSize: usize, + pub nCacheSize: usize, pub sibling_files: VSIFilesystemPluginSiblingFilesCallback, } #[test] @@ -1884,27 +1786,18 @@ fn bindgen_test_layout_VSIFilesystemPluginCallbacksStruct() { ); } extern "C" { - #[doc = " return a VSIFilesystemPluginCallbacksStruct to be populated at runtime with handler callbacks"] - #[doc = " @since GDAL 3.0"] pub fn VSIAllocFilesystemPluginCallbacksStruct() -> *mut VSIFilesystemPluginCallbacksStruct; } extern "C" { - #[doc = " free resources allocated by VSIAllocFilesystemPluginCallbacksStruct"] - #[doc = " @since GDAL 3.0"] pub fn VSIFreeFilesystemPluginCallbacksStruct(poCb: *mut VSIFilesystemPluginCallbacksStruct); } extern "C" { - #[doc = " register a handler on the given prefix. All IO on datasets opened with the filename /prefix/xxxxxx"] - #[doc = " will go through these callbacks."] - #[doc = " pszPrefix must begin and end with a '/'"] - #[doc = " @since GDAL 3.0"] pub fn VSIInstallPluginHandler( pszPrefix: *const libc::c_char, poCb: *const VSIFilesystemPluginCallbacksStruct, ) -> libc::c_int; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn VSITime(arg1: *mut libc::c_ulong) -> libc::c_ulong; } extern "C" { @@ -1917,7 +1810,6 @@ extern "C" { pub fn VSILocalTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; } pub mod CPLErr { - #[doc = " Error category"] pub type Type = libc::c_uint; pub const CE_None: Type = 0; pub const CE_Debug: Type = 1; @@ -1925,7 +1817,6 @@ pub mod CPLErr { pub const CE_Failure: Type = 3; pub const CE_Fatal: Type = 4; } -#[doc = " Error number"] pub type CPLErrorNum = libc::c_int; extern "C" { pub fn CPLError(eErrClass: CPLErr::Type, err_no: CPLErrorNum, fmt: *const libc::c_char, ...); @@ -1967,10 +1858,8 @@ extern "C" { ); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn CPLCleanupErrorMutex(); } -#[doc = " Callback for a custom error handler"] pub type CPLErrorHandler = ::std::option::Option< unsafe extern "C" fn(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char), >; @@ -2008,11 +1897,9 @@ extern "C" { pub fn CPLDebug(arg1: *const libc::c_char, arg2: *const libc::c_char, ...); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn CPLVerifyConfiguration(); } extern "C" { - #[doc = " @endcond"] pub fn CPLGetConfigOption( arg1: *const libc::c_char, arg2: *const libc::c_char, @@ -2034,11 +1921,9 @@ extern "C" { ); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn CPLFreeConfig(); } extern "C" { - #[doc = " @endcond"] pub fn CPLGetConfigOptions() -> *mut *mut libc::c_char; } extern "C" { @@ -2051,13 +1936,13 @@ extern "C" { pub fn CPLSetThreadLocalConfigOptions(papszConfigOptions: *const *const libc::c_char); } extern "C" { - pub fn CPLMalloc(arg1: size_t) -> *mut libc::c_void; + pub fn CPLMalloc(arg1: usize) -> *mut libc::c_void; } extern "C" { - pub fn CPLCalloc(arg1: size_t, arg2: size_t) -> *mut libc::c_void; + pub fn CPLCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: size_t) -> *mut libc::c_void; + pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } extern "C" { pub fn CPLStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; @@ -2294,7 +2179,6 @@ extern "C" { pszOutputPath: *const libc::c_char, ) -> *const libc::c_char; } -#[doc = " Callback for CPLPushFileFinder"] pub type CPLFileFinder = ::std::option::Option< unsafe extern "C" fn( arg1: *const libc::c_char, @@ -2331,19 +2215,13 @@ extern "C" { extern "C" { pub fn CPLStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; } -#[doc = " Information on a shared file"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CPLSharedFileInfo { - #[doc = "< File pointer"] pub fp: *mut FILE, - #[doc = "< Reference counter"] pub nRefCount: libc::c_int, - #[doc = "< Whether fp must be interpreted as VSIFILE*"] pub bLarge: libc::c_int, - #[doc = "< Filename"] pub pszFilename: *mut libc::c_char, - #[doc = "< Access mode"] pub pszAccess: *mut libc::c_char, } #[test] @@ -2426,11 +2304,9 @@ extern "C" { pub fn CPLDumpSharedList(arg1: *mut FILE); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn CPLCleanupSharedFileMutex(); } extern "C" { - #[doc = " @endcond"] pub fn CPLDMSToDec(is: *const libc::c_char) -> f64; } extern "C" { @@ -2478,7 +2354,6 @@ extern "C" { ) -> libc::c_int; } extern "C" { - #[doc = " @endcond"] pub fn CPLCreateZip( pszZipFilename: *const libc::c_char, papszOptions: *mut *mut libc::c_char, @@ -2507,20 +2382,20 @@ extern "C" { extern "C" { pub fn CPLZLibDeflate( ptr: *const libc::c_void, - nBytes: size_t, + nBytes: usize, nLevel: libc::c_int, outptr: *mut libc::c_void, - nOutAvailableBytes: size_t, - pnOutBytes: *mut size_t, + nOutAvailableBytes: usize, + pnOutBytes: *mut usize, ) -> *mut libc::c_void; } extern "C" { pub fn CPLZLibInflate( ptr: *const libc::c_void, - nBytes: size_t, + nBytes: usize, outptr: *mut libc::c_void, - nOutAvailableBytes: size_t, - pnOutBytes: *mut size_t, + nOutAvailableBytes: usize, + pnOutBytes: *mut usize, ) -> *mut libc::c_void; } extern "C" { @@ -2534,1807 +2409,1952 @@ extern "C" { pub fn CPLsetlocale(category: libc::c_int, locale: *const libc::c_char) -> *mut libc::c_char; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn CPLCleanupSetlocaleMutex(); } extern "C" { - #[doc = "CPLIsPowerOfTwo()"] - #[doc = "@param i - tested number"] - #[doc = "@return TRUE if i is power of two otherwise return FALSE"] pub fn CPLIsPowerOfTwo(i: libc::c_uint) -> libc::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLVirtualMem { - _unused: [u8; 0], +extern "C" { + pub fn CSLAddString( + papszStrList: *mut *mut libc::c_char, + pszNewString: *const libc::c_char, + ) -> *mut *mut libc::c_char; } -#[doc = " Callback triggered when a still unmapped page of virtual memory is accessed."] -#[doc = " The callback has the responsibility of filling the page with relevant values"] -#[doc = ""] -#[doc = " @param ctxt virtual memory handle."] -#[doc = " @param nOffset offset of the page in the memory mapping."] -#[doc = " @param pPageToFill address of the page to fill. Note that the address might"] -#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] -#[doc = " @param nToFill number of bytes of the page."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: size_t, - pPageToFill: *mut libc::c_void, - nToFill: size_t, - pUserData: *mut libc::c_void, - ), ->; -#[doc = " Callback triggered when a dirty mapped page is going to be freed."] -#[doc = " (saturation of cache, or termination of the virtual memory mapping)."] -#[doc = ""] -#[doc = " @param ctxt virtual memory handle."] -#[doc = " @param nOffset offset of the page in the memory mapping."] -#[doc = " @param pPageToBeEvicted address of the page that will be flushed. Note that the address might"] -#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] -#[doc = " @param nToBeEvicted number of bytes of the page."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: size_t, - pPageToBeEvicted: *const libc::c_void, - nToBeEvicted: size_t, - pUserData: *mut libc::c_void, - ), ->; -#[doc = " Callback triggered when a virtual memory mapping is destroyed."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemFreeUserData = - ::std::option::Option; -pub mod CPLVirtualMemAccessMode { - #[doc = " Access mode of a virtual memory mapping."] - pub type Type = libc::c_uint; - #[doc = " The mapping is meant at being read-only, but writes will not be prevented."] - #[doc = "Note that any content written will be lost."] - pub const VIRTUALMEM_READONLY: Type = 0; - #[doc = " The mapping is meant at being read-only, and this will be enforced"] - #[doc = "through the operating system page protection mechanism."] - pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; - #[doc = " The mapping is meant at being read-write, and modified pages can be saved"] - #[doc = "thanks to the pfnUnCachePage callback"] - pub const VIRTUALMEM_READWRITE: Type = 2; +extern "C" { + pub fn CSLAddStringMayFail( + papszStrList: *mut *mut libc::c_char, + pszNewString: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return the size of a page of virtual memory."] - #[doc = ""] - #[doc = " @return the page size."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLGetPageSize() -> size_t; + pub fn CSLCount(papszStrList: CSLConstList) -> libc::c_int; } extern "C" { - #[doc = " Create a new virtual memory mapping."] - #[doc = ""] - #[doc = " This will reserve an area of virtual memory of size nSize, whose size"] - #[doc = " might be potentially much larger than the physical memory available. Initially,"] - #[doc = " no physical memory will be allocated. As soon as memory pages will be accessed,"] - #[doc = " they will be allocated transparently and filled with the pfnCachePage callback."] - #[doc = " When the allowed cache size is reached, the least recently used pages will"] - #[doc = " be unallocated."] - #[doc = ""] - #[doc = " On Linux AMD64 platforms, the maximum value for nSize is 128 TB."] - #[doc = " On Linux x86 platforms, the maximum value for nSize is 2 GB."] - #[doc = ""] - #[doc = " Only supported on Linux for now."] - #[doc = ""] - #[doc = " Note that on Linux, this function will install a SIGSEGV handler. The"] - #[doc = " original handler will be restored by CPLVirtualMemManagerTerminate()."] - #[doc = ""] - #[doc = " @param nSize size in bytes of the virtual memory mapping."] - #[doc = " @param nCacheSize size in bytes of the maximum memory that will be really"] - #[doc = " allocated (must ideally fit into RAM)."] - #[doc = " @param nPageSizeHint hint for the page size. Must be a multiple of the"] - #[doc = " system page size, returned by CPLGetPageSize()."] - #[doc = " Minimum value is generally 4096. Might be set to 0 to"] - #[doc = " let the function determine a default page size."] - #[doc = " @param bSingleThreadUsage set to TRUE if there will be no concurrent threads"] - #[doc = " that will access the virtual memory mapping. This can"] - #[doc = " optimize performance a bit."] - #[doc = " @param eAccessMode permission to use for the virtual memory mapping."] - #[doc = " @param pfnCachePage callback triggered when a still unmapped page of virtual"] - #[doc = " memory is accessed. The callback has the responsibility"] - #[doc = " of filling the page with relevant values."] - #[doc = " @param pfnUnCachePage callback triggered when a dirty mapped page is going to"] - #[doc = " be freed (saturation of cache, or termination of the"] - #[doc = " virtual memory mapping). Might be NULL."] - #[doc = " @param pfnFreeUserData callback that can be used to free pCbkUserData. Might be"] - #[doc = " NULL"] - #[doc = " @param pCbkUserData user data passed to pfnCachePage and pfnUnCachePage."] - #[doc = ""] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemNew( - nSize: size_t, - nCacheSize: size_t, - nPageSizeHint: size_t, - bSingleThreadUsage: libc::c_int, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnCachePage: CPLVirtualMemCachePageCbk, - pfnUnCachePage: CPLVirtualMemUnCachePageCbk, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLGetField(arg1: CSLConstList, arg2: libc::c_int) -> *const libc::c_char; } extern "C" { - #[doc = " Return if virtual memory mapping of a file is available."] - #[doc = ""] - #[doc = " @return TRUE if virtual memory mapping of a file is available."] - #[doc = " @since GDAL 1.11"] - pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; + pub fn CSLDestroy(papszStrList: *mut *mut libc::c_char); } extern "C" { - #[doc = " Create a new virtual memory mapping from a file."] - #[doc = ""] - #[doc = " The file must be a \"real\" file recognized by the operating system, and not"] - #[doc = " a VSI extended virtual file."] - #[doc = ""] - #[doc = " In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written"] - #[doc = " in the file."] - #[doc = ""] - #[doc = " On Linux AMD64 platforms, the maximum value for nLength is 128 TB."] - #[doc = " On Linux x86 platforms, the maximum value for nLength is 2 GB."] - #[doc = ""] - #[doc = " Supported on Linux only in GDAL <= 2.0, and all POSIX systems supporting"] - #[doc = " mmap() in GDAL >= 2.1"] - #[doc = ""] - #[doc = " @param fp Virtual file handle."] - #[doc = " @param nOffset Offset in the file to start the mapping from."] - #[doc = " @param nLength Length of the portion of the file to map into memory."] - #[doc = " @param eAccessMode Permission to use for the virtual memory mapping. This must"] - #[doc = " be consistent with how the file has been opened."] - #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] - #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemFileMapNew( - fp: *mut VSILFILE, - nOffset: vsi_l_offset, - nLength: vsi_l_offset, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLDuplicate(papszStrList: CSLConstList) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Create a new virtual memory mapping derived from an other virtual memory"] - #[doc = " mapping."] - #[doc = ""] - #[doc = " This may be useful in case of creating mapping for pixel interleaved data."] - #[doc = ""] - #[doc = " The new mapping takes a reference on the base mapping."] - #[doc = ""] - #[doc = " @param pVMemBase Base virtual memory mapping"] - #[doc = " @param nOffset Offset in the base virtual memory mapping from which to start"] - #[doc = " the new mapping."] - #[doc = " @param nSize Size of the base virtual memory mapping to expose in the"] - #[doc = " the new mapping."] - #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] - #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemDerivedNew( - pVMemBase: *mut CPLVirtualMem, - nOffset: vsi_l_offset, - nSize: vsi_l_offset, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CSLMerge( + papszOrig: *mut *mut libc::c_char, + papszOverride: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Free a virtual memory mapping."] - #[doc = ""] - #[doc = " The pointer returned by CPLVirtualMemGetAddr() will no longer be valid."] - #[doc = " If the virtual memory mapping was created with read/write permissions and that"] - #[doc = " they are dirty (i.e. modified) pages, they will be flushed through the"] - #[doc = " pfnUnCachePage callback before being freed."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); + pub fn CSLTokenizeString(pszString: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return the pointer to the start of a virtual memory mapping."] - #[doc = ""] - #[doc = " The bytes in the range [p:p+CPLVirtualMemGetSize()-1] where p is the pointer"] - #[doc = " returned by this function will be valid, until CPLVirtualMemFree() is called."] - #[doc = ""] - #[doc = " Note that if a range of bytes used as an argument of a system call"] - #[doc = " (such as read() or write()) contains pages that have not been \"realized\", the"] - #[doc = " system call will fail with EFAULT. CPLVirtualMemPin() can be used to work"] - #[doc = " around this issue."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the pointer to the start of a virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; + pub fn CSLTokenizeStringComplex( + pszString: *const libc::c_char, + pszDelimiter: *const libc::c_char, + bHonourStrings: libc::c_int, + bAllowEmptyTokens: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return the size of the virtual memory mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the size of the virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> size_t; + pub fn CSLTokenizeString2( + pszString: *const libc::c_char, + pszDelimiter: *const libc::c_char, + nCSLTFlags: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return if the virtual memory mapping is a direct file mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return TRUE if the virtual memory mapping is a direct file mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; + pub fn CSLPrint(papszStrList: CSLConstList, fpOut: *mut FILE) -> libc::c_int; } extern "C" { - #[doc = " Return the access mode of the virtual memory mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the access mode of the virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; + pub fn CSLLoad(pszFname: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return the page size associated to a virtual memory mapping."] - #[doc = ""] - #[doc = " The value returned will be at least CPLGetPageSize(), but potentially"] - #[doc = " larger."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the page size"] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> size_t; + pub fn CSLLoad2( + pszFname: *const libc::c_char, + nMaxLines: libc::c_int, + nMaxCols: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Return TRUE if this memory mapping can be accessed safely from concurrent"] - #[doc = " threads."] - #[doc = ""] - #[doc = " The situation that can cause problems is when several threads try to access"] - #[doc = " a page of the mapping that is not yet mapped."] - #[doc = ""] - #[doc = " The return value of this function depends on whether bSingleThreadUsage has"] - #[doc = " been set of not in CPLVirtualMemNew() and/or the implementation."] - #[doc = ""] - #[doc = " On Linux, this will always return TRUE if bSingleThreadUsage = FALSE."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return TRUE if this memory mapping can be accessed safely from concurrent"] - #[doc = " threads."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; + pub fn CSLSave(papszStrList: CSLConstList, pszFname: *const libc::c_char) -> libc::c_int; } extern "C" { - #[doc = " Declare that a thread will access a virtual memory mapping."] - #[doc = ""] - #[doc = " This function must be called by a thread that wants to access the"] - #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] - #[doc = " been created with bSingleThreadUsage = TRUE."] - #[doc = ""] - #[doc = " This function must be paired with CPLVirtualMemUnDeclareThread()."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); + pub fn CSLInsertStrings( + papszStrList: *mut *mut libc::c_char, + nInsertAtLineNo: libc::c_int, + papszNewLines: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Declare that a thread will stop accessing a virtual memory mapping."] - #[doc = ""] - #[doc = " This function must be called by a thread that will no longer access the"] - #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] - #[doc = " been created with bSingleThreadUsage = TRUE."] - #[doc = ""] - #[doc = " This function must be paired with CPLVirtualMemDeclareThread()."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); + pub fn CSLInsertString( + papszStrList: *mut *mut libc::c_char, + nInsertAtLineNo: libc::c_int, + pszNewLine: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Make sure that a region of virtual memory will be realized."] - #[doc = ""] - #[doc = " Calling this function is not required, but might be useful when debugging"] - #[doc = " a process with tools like gdb or valgrind that do not naturally like"] - #[doc = " segmentation fault signals."] - #[doc = ""] - #[doc = " It is also needed when wanting to provide part of virtual memory mapping"] - #[doc = " to a system call such as read() or write(). If read() or write() is called"] - #[doc = " on a memory region not yet realized, the call will fail with EFAULT."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @param pAddr the memory region to pin."] - #[doc = " @param nSize the size of the memory region."] - #[doc = " @param bWriteOp set to TRUE if the memory are will be accessed in write mode."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemPin( - ctxt: *mut CPLVirtualMem, - pAddr: *mut libc::c_void, - nSize: size_t, - bWriteOp: libc::c_int, - ); + pub fn CSLRemoveStrings( + papszStrList: *mut *mut libc::c_char, + nFirstLineToDelete: libc::c_int, + nNumToRemove: libc::c_int, + ppapszRetStrings: *mut *mut *mut libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " Cleanup any resource and handlers related to virtual memory."] - #[doc = ""] - #[doc = " This function must be called after the last CPLVirtualMem object has"] - #[doc = " been freed."] - #[doc = ""] - #[doc = " @since GDAL 2.0"] - pub fn CPLVirtualMemManagerTerminate(); -} -pub mod CPLXMLNodeType { - #[doc = " XML node type"] - pub type Type = libc::c_uint; - #[doc = " Node is an element"] - pub const CXT_Element: Type = 0; - #[doc = " Node is a raw text value"] - pub const CXT_Text: Type = 1; - #[doc = " Node is attribute"] - pub const CXT_Attribute: Type = 2; - #[doc = " Node is an XML comment."] - pub const CXT_Comment: Type = 3; - #[doc = " Node is a special literal"] - pub const CXT_Literal: Type = 4; -} -#[doc = " Document node structure."] -#[doc = ""] -#[doc = " This C structure is used to hold a single text fragment representing a"] -#[doc = " component of the document when parsed. It should be allocated with the"] -#[doc = " appropriate CPL function, and freed with CPLDestroyXMLNode(). The structure"] -#[doc = " contents should not normally be altered by application code, but may be"] -#[doc = " freely examined by application code."] -#[doc = ""] -#[doc = " Using the psChild and psNext pointers, a hierarchical tree structure"] -#[doc = " for a document can be represented as a tree of CPLXMLNode structures."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLXMLNode { - #[doc = " \\brief Node type"] - #[doc = ""] - #[doc = " One of CXT_Element, CXT_Text, CXT_Attribute, CXT_Comment,"] - #[doc = " or CXT_Literal."] - pub eType: CPLXMLNodeType::Type, - #[doc = " \\brief Node value"] - #[doc = ""] - #[doc = " For CXT_Element this is the name of the element, without the angle"] - #[doc = " brackets. Note there is a single CXT_Element even when the document"] - #[doc = " contains a start and end element tag. The node represents the pair."] - #[doc = " All text or other elements between the start and end tag will appear"] - #[doc = " as children nodes of this CXT_Element node."] - #[doc = ""] - #[doc = " For CXT_Attribute the pszValue is the attribute name. The value of"] - #[doc = " the attribute will be a CXT_Text child."] - #[doc = ""] - #[doc = " For CXT_Text this is the text itself (value of an attribute, or a"] - #[doc = " text fragment between an element start and end tags."] - #[doc = ""] - #[doc = " For CXT_Literal it is all the literal text. Currently this is just"] - #[doc = " used for !DOCTYPE lines, and the value would be the entire line."] - #[doc = ""] - #[doc = " For CXT_Comment the value is all the literal text within the comment,"] - #[doc = " but not including the comment start/end indicators (\"<--\" and \"-->\")."] - pub pszValue: *mut libc::c_char, - #[doc = " \\brief Next sibling."] - #[doc = ""] - #[doc = " Pointer to next sibling, that is the next node appearing after this"] - #[doc = " one that has the same parent as this node. NULL if this node is the"] - #[doc = " last child of the parent element."] - pub psNext: *mut CPLXMLNode, - #[doc = " \\brief Child node."] - #[doc = ""] - #[doc = " Pointer to first child node, if any. Only CXT_Element and CXT_Attribute"] - #[doc = " nodes should have children. For CXT_Attribute it should be a single"] - #[doc = " CXT_Text value node, while CXT_Element can have any kind of child."] - #[doc = " The full list of children for a node are identified by walking the"] - #[doc = " psNext's starting with the psChild node."] - pub psChild: *mut CPLXMLNode, -} -#[test] -fn bindgen_test_layout_CPLXMLNode() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLXMLNode)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLXMLNode)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(eType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(pszValue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psNext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psChild) - ) - ); + pub fn CSLFindString(papszList: CSLConstList, pszTarget: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CSLFindStringCaseSensitive( + papszList: CSLConstList, + pszTarget: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); + pub fn CSLPartialFindString( + papszHaystack: CSLConstList, + pszNeedle: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CSLFindName(papszStrList: CSLConstList, pszName: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLSearchXMLNode( - poRoot: *mut CPLXMLNode, - pszTarget: *const libc::c_char, - ) -> *mut CPLXMLNode; + pub fn CSLFetchBoolean( + papszStrList: CSLConstList, + pszKey: *const libc::c_char, + bDefault: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLGetXMLValue( - poRoot: *const CPLXMLNode, - pszPath: *const libc::c_char, - pszDefault: *const libc::c_char, - ) -> *const libc::c_char; + pub fn CSLTestBoolean(pszValue: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLCreateXMLNode( - poParent: *mut CPLXMLNode, - eType: CPLXMLNodeType::Type, - pszText: *const libc::c_char, - ) -> *mut CPLXMLNode; + pub fn CPLTestBoolean(pszValue: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; + pub fn CPLParseNameValue( + pszNameValue: *const libc::c_char, + ppszKey: *mut *mut libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); + pub fn CSLFetchNameValue( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; + pub fn CSLFetchNameValueDef( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + pszDefault: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); + pub fn CSLFetchNameValueMultiple( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLCreateXMLElementAndValue( - psParent: *mut CPLXMLNode, + pub fn CSLAddNameValue( + papszStrList: *mut *mut libc::c_char, pszName: *const libc::c_char, pszValue: *const libc::c_char, - ) -> *mut CPLXMLNode; + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLAddXMLAttributeAndValue( - psParent: *mut CPLXMLNode, + pub fn CSLSetNameValue( + papszStrList: *mut *mut libc::c_char, pszName: *const libc::c_char, pszValue: *const libc::c_char, + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn CSLSetNameValueSeparator( + papszStrList: *mut *mut libc::c_char, + pszSeparator: *const libc::c_char, ); } extern "C" { - pub fn CPLCloneXMLTree(psTree: *const CPLXMLNode) -> *mut CPLXMLNode; + pub fn CSLParseCommandLine(pszCommandLine: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLSetXMLValue( - psRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszValue: *const libc::c_char, + pub fn CPLEscapeString( + pszString: *const libc::c_char, + nLength: libc::c_int, + nScheme: libc::c_int, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLUnescapeString( + pszString: *const libc::c_char, + pnLength: *mut libc::c_int, + nScheme: libc::c_int, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLBinaryToHex(nBytes: libc::c_int, pabyData: *const GByte) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLHexToBinary(pszHex: *const libc::c_char, pnBytes: *mut libc::c_int) -> *mut GByte; +} +extern "C" { + pub fn CPLBase64Encode(nBytes: libc::c_int, pabyData: *const GByte) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLBase64DecodeInPlace(pszBase64: *mut GByte) -> libc::c_int; +} +pub mod CPLValueType { + pub type Type = libc::c_uint; + pub const CPL_VALUE_STRING: Type = 0; + pub const CPL_VALUE_REAL: Type = 1; + pub const CPL_VALUE_INTEGER: Type = 2; +} +extern "C" { + pub fn CPLGetValueType(pszValue: *const libc::c_char) -> CPLValueType::Type; +} +extern "C" { + pub fn CPLStrlcpy( + pszDest: *mut libc::c_char, + pszSrc: *const libc::c_char, + nDestSize: usize, + ) -> usize; +} +extern "C" { + pub fn CPLStrlcat( + pszDest: *mut libc::c_char, + pszSrc: *const libc::c_char, + nDestSize: usize, + ) -> usize; +} +extern "C" { + pub fn CPLStrnlen(pszStr: *const libc::c_char, nMaxLen: usize) -> usize; +} +extern "C" { + pub fn CPLvsnprintf( + str_: *mut libc::c_char, + size: usize, + fmt: *const libc::c_char, + args: *mut __va_list_tag, ) -> libc::c_int; } extern "C" { - pub fn CPLStripXMLNamespace( - psRoot: *mut CPLXMLNode, - pszNameSpace: *const libc::c_char, - bRecurse: libc::c_int, - ); + pub fn CPLsnprintf( + str_: *mut libc::c_char, + size: usize, + fmt: *const libc::c_char, + ... + ) -> libc::c_int; } extern "C" { - pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); + pub fn CPLsprintf(str_: *mut libc::c_char, fmt: *const libc::c_char, ...) -> libc::c_int; } extern "C" { - pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CPLprintf(fmt: *const libc::c_char, ...) -> libc::c_int; } extern "C" { - pub fn CPLSerializeXMLTreeToFile( - psTree: *const CPLXMLNode, - pszFilename: *const libc::c_char, + pub fn CPLsscanf(str_: *const libc::c_char, fmt: *const libc::c_char, ...) -> libc::c_int; +} +extern "C" { + pub fn CPLSPrintf(fmt: *const libc::c_char, ...) -> *const libc::c_char; +} +extern "C" { + pub fn CSLAppendPrintf( + papszStrList: *mut *mut libc::c_char, + fmt: *const libc::c_char, + ... + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn CPLVASPrintf( + buf: *mut *mut libc::c_char, + fmt: *const libc::c_char, + args: *mut __va_list_tag, ) -> libc::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, +extern "C" { + pub fn CPLEncodingCharSize(pszEncoding: *const libc::c_char) -> libc::c_int; } -#[test] -fn bindgen_test_layout_OGREnvelope() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(OGREnvelope)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope)) +extern "C" { + pub fn CPLClearRecodeWarningFlags(); +} +extern "C" { + pub fn CPLRecode( + pszSource: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLRecodeFromWChar( + pwszSource: *const wchar_t, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLRecodeToWChar( + pszSource: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut wchar_t; +} +extern "C" { + pub fn CPLIsUTF8(pabyData: *const libc::c_char, nLen: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn CPLForceToASCII( + pabyData: *const libc::c_char, + nLen: libc::c_int, + chReplacementChar: libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLStrlenUTF8(pszUTF8Str: *const libc::c_char) -> libc::c_int; +} +extern "C" { + pub fn CPLCanRecode( + pszTestStr: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLHashSet { + _unused: [u8; 0], +} +pub type CPLHashSet = _CPLHashSet; +pub type CPLHashSetHashFunc = + ::std::option::Option libc::c_ulong>; +pub type CPLHashSetEqualFunc = ::std::option::Option< + unsafe extern "C" fn(elt1: *const libc::c_void, elt2: *const libc::c_void) -> libc::c_int, +>; +pub type CPLHashSetFreeEltFunc = + ::std::option::Option; +pub type CPLHashSetIterEltFunc = ::std::option::Option< + unsafe extern "C" fn(elt: *mut libc::c_void, user_data: *mut libc::c_void) -> libc::c_int, +>; +extern "C" { + pub fn CPLHashSetNew( + fnHashFunc: CPLHashSetHashFunc, + fnEqualFunc: CPLHashSetEqualFunc, + fnFreeEltFunc: CPLHashSetFreeEltFunc, + ) -> *mut CPLHashSet; +} +extern "C" { + pub fn CPLHashSetDestroy(set: *mut CPLHashSet); +} +extern "C" { + pub fn CPLHashSetClear(set: *mut CPLHashSet); +} +extern "C" { + pub fn CPLHashSetSize(set: *const CPLHashSet) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetForeach( + set: *mut CPLHashSet, + fnIterFunc: CPLHashSetIterEltFunc, + user_data: *mut libc::c_void, ); +} +extern "C" { + pub fn CPLHashSetInsert(set: *mut CPLHashSet, elt: *mut libc::c_void) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetLookup(set: *mut CPLHashSet, elt: *const libc::c_void) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLHashSetRemove(set: *mut CPLHashSet, elt: *const libc::c_void) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetRemoveDeferRehash( + set: *mut CPLHashSet, + elt: *const libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetHashPointer(elt: *const libc::c_void) -> libc::c_ulong; +} +extern "C" { + pub fn CPLHashSetEqualPointer( + elt1: *const libc::c_void, + elt2: *const libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLHashSetHashStr(pszStr: *const libc::c_void) -> libc::c_ulong; +} +extern "C" { + pub fn CPLHashSetEqualStr( + pszStr1: *const libc::c_void, + pszStr2: *const libc::c_void, + ) -> libc::c_int; +} +pub type CPLList = _CPLList; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLList { + pub pData: *mut libc::c_void, + pub psNext: *mut _CPLList, +} +#[test] +fn bindgen_test_layout__CPLList() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinX) - ) + ::std::mem::size_of::<_CPLList>(), + 16usize, + concat!("Size of: ", stringify!(_CPLList)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + ::std::mem::align_of::<_CPLList>(), 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxX) - ) + concat!("Alignment of ", stringify!(_CPLList)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, + unsafe { &(*(::std::ptr::null::<_CPLList>())).pData as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(OGREnvelope), + stringify!(_CPLList), "::", - stringify!(MinY) + stringify!(pData) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, + unsafe { &(*(::std::ptr::null::<_CPLList>())).psNext as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGREnvelope), + stringify!(_CPLList), "::", - stringify!(MaxY) + stringify!(psNext) ) ); } +extern "C" { + pub fn CPLListAppend(psList: *mut CPLList, pData: *mut libc::c_void) -> *mut CPLList; +} +extern "C" { + pub fn CPLListInsert( + psList: *mut CPLList, + pData: *mut libc::c_void, + nPosition: libc::c_int, + ) -> *mut CPLList; +} +extern "C" { + pub fn CPLListGetLast(psList: *mut CPLList) -> *mut CPLList; +} +extern "C" { + pub fn CPLListGet(psList: *mut CPLList, nPosition: libc::c_int) -> *mut CPLList; +} +extern "C" { + pub fn CPLListCount(psList: *const CPLList) -> libc::c_int; +} +extern "C" { + pub fn CPLListRemove(psList: *mut CPLList, nPosition: libc::c_int) -> *mut CPLList; +} +extern "C" { + pub fn CPLListDestroy(psList: *mut CPLList); +} +extern "C" { + pub fn CPLListGetNext(psElement: *const CPLList) -> *mut CPLList; +} +extern "C" { + pub fn CPLListGetData(psElement: *const CPLList) -> *mut libc::c_void; +} +pub mod CPLXMLNodeType { + pub type Type = libc::c_uint; + pub const CXT_Element: Type = 0; + pub const CXT_Text: Type = 1; + pub const CXT_Attribute: Type = 2; + pub const CXT_Comment: Type = 3; + pub const CXT_Literal: Type = 4; +} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGREnvelope3D { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, - pub MinZ: f64, - pub MaxZ: f64, +pub struct CPLXMLNode { + pub eType: CPLXMLNodeType::Type, + pub pszValue: *mut libc::c_char, + pub psNext: *mut CPLXMLNode, + pub psChild: *mut CPLXMLNode, } #[test] -fn bindgen_test_layout_OGREnvelope3D() { +fn bindgen_test_layout_CPLXMLNode() { assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(OGREnvelope3D)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLXMLNode)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGREnvelope3D)) + concat!("Alignment of ", stringify!(CPLXMLNode)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MinX) + stringify!(eType) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MaxX) + stringify!(pszValue) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, 16usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MinY) + stringify!(psNext) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, 24usize, concat!( "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), + stringify!(CPLXMLNode), "::", - stringify!(MinZ) + stringify!(psChild) ) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxZ) - ) +} +extern "C" { + pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; +} +extern "C" { + pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); +} +extern "C" { + pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; +} +extern "C" { + pub fn CPLSearchXMLNode( + poRoot: *mut CPLXMLNode, + pszTarget: *const libc::c_char, + ) -> *mut CPLXMLNode; +} +extern "C" { + pub fn CPLGetXMLValue( + poRoot: *const CPLXMLNode, + pszPath: *const libc::c_char, + pszDefault: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn CPLCreateXMLNode( + poParent: *mut CPLXMLNode, + eType: CPLXMLNodeType::Type, + pszText: *const libc::c_char, + ) -> *mut CPLXMLNode; +} +extern "C" { + pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; +} +extern "C" { + pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); +} +extern "C" { + pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; +} +extern "C" { + pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); +} +extern "C" { + pub fn CPLCreateXMLElementAndValue( + psParent: *mut CPLXMLNode, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ) -> *mut CPLXMLNode; +} +extern "C" { + pub fn CPLAddXMLAttributeAndValue( + psParent: *mut CPLXMLNode, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, ); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRMalloc(arg1: size_t) -> *mut libc::c_void; + pub fn CPLCloneXMLTree(psTree: *const CPLXMLNode) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRCalloc(arg1: size_t, arg2: size_t) -> *mut libc::c_void; + pub fn CPLSetXMLValue( + psRoot: *mut CPLXMLNode, + pszPath: *const libc::c_char, + pszValue: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: size_t) -> *mut libc::c_void; + pub fn CPLStripXMLNamespace( + psRoot: *mut CPLXMLNode, + pszNameSpace: *const libc::c_char, + bRecurse: libc::c_int, + ); } extern "C" { - pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; + pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); } extern "C" { - pub fn OGRFree(arg1: *mut libc::c_void); -} -pub mod OGRwkbGeometryType { - #[doc = " List of well known binary geometry types. These are used within the BLOBs"] - #[doc = " but are also returned from OGRGeometry::getGeometryType() to identify the"] - #[doc = " type of a geometry object."] - pub type Type = libc::c_uint; - #[doc = "< unknown type, non-standard"] - pub const wkbUnknown: Type = 0; - #[doc = "< 0-dimensional geometric object, standard WKB"] - pub const wkbPoint: Type = 1; - #[doc = "< 1-dimensional geometric object with linear"] - #[doc = " interpolation between Points, standard WKB"] - pub const wkbLineString: Type = 2; - #[doc = "< planar 2-dimensional geometric object defined"] - #[doc = " by 1 exterior boundary and 0 or more interior"] - #[doc = " boundaries, standard WKB"] - pub const wkbPolygon: Type = 3; - #[doc = "< GeometryCollection of Points, standard WKB"] - pub const wkbMultiPoint: Type = 4; - #[doc = "< GeometryCollection of LineStrings, standard WKB"] - pub const wkbMultiLineString: Type = 5; - #[doc = "< GeometryCollection of Polygons, standard WKB"] - pub const wkbMultiPolygon: Type = 6; - #[doc = "< geometric object that is a collection of 1"] - #[doc = "or more geometric objects, standard WKB"] - pub const wkbGeometryCollection: Type = 7; - #[doc = "< one or more circular arc segments connected end to end,"] - #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCircularString: Type = 8; - #[doc = "< sequence of contiguous curves, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCompoundCurve: Type = 9; - #[doc = "< planar surface, defined by 1 exterior boundary"] - #[doc = " and zero or more interior boundaries, that are curves."] - #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCurvePolygon: Type = 10; - #[doc = "< GeometryCollection of Curves, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiCurve: Type = 11; - #[doc = "< GeometryCollection of Surfaces, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiSurface: Type = 12; - #[doc = "< Curve (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurve: Type = 13; - #[doc = "< Surface (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurface: Type = 14; - #[doc = "< a contiguous collection of polygons, which share common boundary segments,"] - #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurface: Type = 15; - #[doc = "< a PolyhedralSurface consisting only of Triangle patches"] - #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTIN: Type = 16; - #[doc = "< a Triangle. ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangle: Type = 17; - #[doc = "< non-standard, for pure attribute records"] - pub const wkbNone: Type = 100; - #[doc = "< non-standard, just for createGeometry()"] - pub const wkbLinearRing: Type = 101; - #[doc = "< wkbCircularString with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCircularStringZ: Type = 1008; - #[doc = "< wkbCompoundCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCompoundCurveZ: Type = 1009; - #[doc = "< wkbCurvePolygon with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCurvePolygonZ: Type = 1010; - #[doc = "< wkbMultiCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiCurveZ: Type = 1011; - #[doc = "< wkbMultiSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiSurfaceZ: Type = 1012; - #[doc = "< wkbCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveZ: Type = 1013; - #[doc = "< wkbSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceZ: Type = 1014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceZ: Type = 1015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINZ: Type = 1016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleZ: Type = 1017; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPointM: Type = 2001; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbLineStringM: Type = 2002; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPolygonM: Type = 2003; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPointM: Type = 2004; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiLineStringM: Type = 2005; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPolygonM: Type = 2006; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbGeometryCollectionM: Type = 2007; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCircularStringM: Type = 2008; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCompoundCurveM: Type = 2009; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurvePolygonM: Type = 2010; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiCurveM: Type = 2011; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiSurfaceM: Type = 2012; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveM: Type = 2013; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceM: Type = 2014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceM: Type = 2015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINM: Type = 2016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleM: Type = 2017; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPointZM: Type = 3001; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbLineStringZM: Type = 3002; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPolygonZM: Type = 3003; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPointZM: Type = 3004; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiLineStringZM: Type = 3005; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPolygonZM: Type = 3006; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbGeometryCollectionZM: Type = 3007; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCircularStringZM: Type = 3008; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCompoundCurveZM: Type = 3009; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurvePolygonZM: Type = 3010; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiCurveZM: Type = 3011; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiSurfaceZM: Type = 3012; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveZM: Type = 3013; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceZM: Type = 3014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceZM: Type = 3015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINZM: Type = 3016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleZM: Type = 3017; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbPoint25D: Type = 2147483649; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbLineString25D: Type = 2147483650; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbPolygon25D: Type = 2147483651; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiPoint25D: Type = 2147483652; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiLineString25D: Type = 2147483653; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiPolygon25D: Type = 2147483654; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbGeometryCollection25D: Type = 2147483655; -} -extern "C" { - pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; -} -extern "C" { - pub fn OGRMergeGeometryTypes( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGRMergeGeometryTypesEx( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - bAllowPromotingToCurves: libc::c_int, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_SetModifier( - eType: OGRwkbGeometryType::Type, - bSetZ: libc::c_int, - bSetM: libc::c_int, - ) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_GT_IsSubClassOf( - eType: OGRwkbGeometryType::Type, - eSuperType: OGRwkbGeometryType::Type, + pub fn CPLSerializeXMLTreeToFile( + psTree: *const CPLXMLNode, + pszFilename: *const libc::c_char, ) -> libc::c_int; } -extern "C" { - pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; -} -extern "C" { - pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; -} -pub mod OGRwkbByteOrder { - #[doc = " Enumeration to describe byte order"] - pub type Type = libc::c_uint; - #[doc = "< MSB/Sun/Motoroloa: Most Significant Byte First"] - pub const wkbXDR: Type = 0; - #[doc = "< LSB/Intel/Vax: Least Significant Byte First"] - pub const wkbNDR: Type = 1; -} -pub mod OGRFieldType { - #[doc = " List of feature field types. This list is likely to be extended in the"] - #[doc = " future ... avoid coding applications based on the assumption that all"] - #[doc = " field types can be known."] - pub type Type = libc::c_uint; - #[doc = " Simple 32bit integer"] - pub const OFTInteger: Type = 0; - #[doc = " List of 32bit integers"] - pub const OFTIntegerList: Type = 1; - #[doc = " Double Precision floating point"] - pub const OFTReal: Type = 2; - #[doc = " List of doubles"] - pub const OFTRealList: Type = 3; - #[doc = " String of ASCII chars"] - pub const OFTString: Type = 4; - #[doc = " Array of strings"] - pub const OFTStringList: Type = 5; - #[doc = " deprecated"] - pub const OFTWideString: Type = 6; - #[doc = " deprecated"] - pub const OFTWideStringList: Type = 7; - #[doc = " Raw Binary data"] - pub const OFTBinary: Type = 8; - #[doc = " Date"] - pub const OFTDate: Type = 9; - #[doc = " Time"] - pub const OFTTime: Type = 10; - #[doc = " Date and Time"] - pub const OFTDateTime: Type = 11; - #[doc = " Single 64bit integer"] - pub const OFTInteger64: Type = 12; - #[doc = " List of 64bit integers"] - pub const OFTInteger64List: Type = 13; - #[doc = " List of 64bit integers"] - pub const OFTMaxType: Type = 13; -} -pub mod OGRFieldSubType { - #[doc = " List of field subtypes. A subtype represents a hint, a restriction of the"] - #[doc = " main type, that is not strictly necessary to consult."] - #[doc = " This list is likely to be extended in the"] - #[doc = " future ... avoid coding applications based on the assumption that all"] - #[doc = " field types can be known."] - #[doc = " Most subtypes only make sense for a restricted set of main types."] - #[doc = " @since GDAL 2.0"] - pub type Type = libc::c_uint; - #[doc = " No subtype. This is the default value"] - pub const OFSTNone: Type = 0; - #[doc = " Boolean integer. Only valid for OFTInteger and OFTIntegerList."] - pub const OFSTBoolean: Type = 1; - #[doc = " Signed 16-bit integer. Only valid for OFTInteger and OFTIntegerList."] - pub const OFSTInt16: Type = 2; - #[doc = " Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList."] - pub const OFSTFloat32: Type = 3; - #[doc = " JSON content. Only valid for OFTString."] - #[doc = " @since GDAL 2.4"] - pub const OFSTJSON: Type = 4; - #[doc = " JSON content. Only valid for OFTString."] - #[doc = " @since GDAL 2.4"] - pub const OFSTMaxSubType: Type = 4; -} -pub mod OGRJustification { - #[doc = " Display justification for field values."] - pub type Type = libc::c_uint; - pub const OJUndefined: Type = 0; - pub const OJLeft: Type = 1; - pub const OJRight: Type = 2; -} -#[doc = " OGRFeature field attribute value union."] -#[repr(C)] -#[derive(Copy, Clone)] -pub union OGRField { - #[doc = " @cond Doxygen_Suppress"] - pub Integer: libc::c_int, - pub Integer64: GIntBig, - pub Real: f64, - pub String: *mut libc::c_char, - pub IntegerList: OGRField__bindgen_ty_1, - pub Integer64List: OGRField__bindgen_ty_2, - pub RealList: OGRField__bindgen_ty_3, - pub StringList: OGRField__bindgen_ty_4, - pub Binary: OGRField__bindgen_ty_5, - pub Set: OGRField__bindgen_ty_6, - pub Date: OGRField__bindgen_ty_7, - _bindgen_union_align: [u64; 2usize], -} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_1 { - pub nCount: libc::c_int, - pub paList: *mut libc::c_int, +pub struct CPLRectObj { + pub minx: f64, + pub miny: f64, + pub maxx: f64, + pub maxy: f64, } #[test] -fn bindgen_test_layout_OGRField__bindgen_ty_1() { +fn bindgen_test_layout_CPLRectObj() { assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLRectObj)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) + concat!("Alignment of ", stringify!(CPLRectObj)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).minx as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), + stringify!(CPLRectObj), "::", - stringify!(nCount) + stringify!(minx) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).miny as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), + stringify!(CPLRectObj), "::", - stringify!(paList) + stringify!(miny) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_2 { - pub nCount: libc::c_int, - pub paList: *mut GIntBig, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).maxx as *const _ as usize }, 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), + stringify!(CPLRectObj), "::", - stringify!(nCount) + stringify!(maxx) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).maxy as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), + stringify!(CPLRectObj), "::", - stringify!(paList) + stringify!(maxy) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_3 { - pub nCount: libc::c_int, - pub paList: *mut f64, +pub struct _CPLQuadTree { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(paList) - ) +pub type CPLQuadTree = _CPLQuadTree; +pub type CPLQuadTreeGetBoundsFunc = ::std::option::Option< + unsafe extern "C" fn(hFeature: *const libc::c_void, pBounds: *mut CPLRectObj), +>; +pub type CPLQuadTreeForeachFunc = ::std::option::Option< + unsafe extern "C" fn(pElt: *mut libc::c_void, pUserData: *mut libc::c_void) -> libc::c_int, +>; +pub type CPLQuadTreeDumpFeatureFunc = ::std::option::Option< + unsafe extern "C" fn( + hFeature: *const libc::c_void, + nIndentLevel: libc::c_int, + pUserData: *mut libc::c_void, + ), +>; +extern "C" { + pub fn CPLQuadTreeCreate( + pGlobalBounds: *const CPLRectObj, + pfnGetBounds: CPLQuadTreeGetBoundsFunc, + ) -> *mut CPLQuadTree; +} +extern "C" { + pub fn CPLQuadTreeDestroy(hQuadtree: *mut CPLQuadTree); +} +extern "C" { + pub fn CPLQuadTreeSetBucketCapacity(hQuadtree: *mut CPLQuadTree, nBucketCapacity: libc::c_int); +} +extern "C" { + pub fn CPLQuadTreeGetAdvisedMaxDepth(nExpectedFeatures: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn CPLQuadTreeSetMaxDepth(hQuadtree: *mut CPLQuadTree, nMaxDepth: libc::c_int); +} +extern "C" { + pub fn CPLQuadTreeInsert(hQuadtree: *mut CPLQuadTree, hFeature: *mut libc::c_void); +} +extern "C" { + pub fn CPLQuadTreeInsertWithBounds( + hQuadtree: *mut CPLQuadTree, + hFeature: *mut libc::c_void, + psBounds: *const CPLRectObj, + ); +} +extern "C" { + pub fn CPLQuadTreeSearch( + hQuadtree: *const CPLQuadTree, + pAoi: *const CPLRectObj, + pnFeatureCount: *mut libc::c_int, + ) -> *mut *mut libc::c_void; +} +extern "C" { + pub fn CPLQuadTreeForeach( + hQuadtree: *const CPLQuadTree, + pfnForeach: CPLQuadTreeForeachFunc, + pUserData: *mut libc::c_void, + ); +} +extern "C" { + pub fn CPLQuadTreeDump( + hQuadtree: *const CPLQuadTree, + pfnDumpFeatureFunc: CPLQuadTreeDumpFeatureFunc, + pUserData: *mut libc::c_void, + ); +} +extern "C" { + pub fn CPLQuadTreeGetStats( + hQuadtree: *const CPLQuadTree, + pnFeatureCount: *mut libc::c_int, + pnNodeCount: *mut libc::c_int, + pnMaxDepth: *mut libc::c_int, + pnMaxBucketCapacity: *mut libc::c_int, ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_4 { - pub nCount: libc::c_int, - pub paList: *mut *mut libc::c_char, +pub struct CPLVirtualMem { + _unused: [u8; 0], +} +pub type CPLVirtualMemCachePageCbk = ::std::option::Option< + unsafe extern "C" fn( + ctxt: *mut CPLVirtualMem, + nOffset: usize, + pPageToFill: *mut libc::c_void, + nToFill: usize, + pUserData: *mut libc::c_void, + ), +>; +pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< + unsafe extern "C" fn( + ctxt: *mut CPLVirtualMem, + nOffset: usize, + pPageToBeEvicted: *const libc::c_void, + nToBeEvicted: usize, + pUserData: *mut libc::c_void, + ), +>; +pub type CPLVirtualMemFreeUserData = + ::std::option::Option; +pub mod CPLVirtualMemAccessMode { + pub type Type = libc::c_uint; + pub const VIRTUALMEM_READONLY: Type = 0; + pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; + pub const VIRTUALMEM_READWRITE: Type = 2; +} +extern "C" { + pub fn CPLGetPageSize() -> usize; +} +extern "C" { + pub fn CPLVirtualMemNew( + nSize: usize, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + eAccessMode: CPLVirtualMemAccessMode::Type, + pfnCachePage: CPLVirtualMemCachePageCbk, + pfnUnCachePage: CPLVirtualMemUnCachePageCbk, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; +} +extern "C" { + pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; +} +extern "C" { + pub fn CPLVirtualMemFileMapNew( + fp: *mut VSILFILE, + nOffset: vsi_l_offset, + nLength: vsi_l_offset, + eAccessMode: CPLVirtualMemAccessMode::Type, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; +} +extern "C" { + pub fn CPLVirtualMemDerivedNew( + pVMemBase: *mut CPLVirtualMem, + nOffset: vsi_l_offset, + nSize: vsi_l_offset, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; +} +extern "C" { + pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); +} +extern "C" { + pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; +} +extern "C" { + pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; +} +extern "C" { + pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; +} +extern "C" { + pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; +} +extern "C" { + pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; +} +extern "C" { + pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); +} +extern "C" { + pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); +} +extern "C" { + pub fn CPLVirtualMemPin( + ctxt: *mut CPLVirtualMem, + pAddr: *mut libc::c_void, + nSize: usize, + bWriteOp: libc::c_int, + ); +} +extern "C" { + pub fn CPLVirtualMemManagerTerminate(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGREnvelope { + pub MinX: f64, + pub MaxX: f64, + pub MinY: f64, + pub MaxY: f64, } #[test] -fn bindgen_test_layout_OGRField__bindgen_ty_4() { +fn bindgen_test_layout_OGREnvelope() { assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(OGREnvelope)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) + concat!("Alignment of ", stringify!(OGREnvelope)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), + stringify!(OGREnvelope), "::", - stringify!(nCount) + stringify!(MinX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), + stringify!(OGREnvelope), "::", - stringify!(paList) + stringify!(MaxX) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_5 { - pub nCount: libc::c_int, - pub paData: *mut GByte, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_5() { assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), + stringify!(OGREnvelope), "::", - stringify!(nCount) + stringify!(MinY) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), + stringify!(OGREnvelope), "::", - stringify!(paData) + stringify!(MaxY) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_6 { - pub nMarker1: libc::c_int, - pub nMarker2: libc::c_int, - pub nMarker3: libc::c_int, +pub struct OGREnvelope3D { + pub MinX: f64, + pub MaxX: f64, + pub MinY: f64, + pub MaxY: f64, + pub MinZ: f64, + pub MaxZ: f64, } #[test] -fn bindgen_test_layout_OGRField__bindgen_ty_6() { +fn bindgen_test_layout_OGREnvelope3D() { assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(OGREnvelope3D)) ); assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGREnvelope3D)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), + stringify!(OGREnvelope3D), "::", - stringify!(nMarker1) + stringify!(MinX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, - 4usize, + unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), + stringify!(OGREnvelope3D), "::", - stringify!(nMarker2) + stringify!(MaxX) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + 16usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), + stringify!(OGREnvelope3D), "::", - stringify!(nMarker3) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_7 { - pub Year: GInt16, - pub Month: GByte, - pub Day: GByte, - pub Hour: GByte, - pub Minute: GByte, - pub TZFlag: GByte, - pub Reserved: GByte, - pub Second: f32, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_7() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Month) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Day) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Minute) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(TZFlag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Reserved) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Second) - ) - ); -} -#[test] -fn bindgen_test_layout_OGRField() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Real) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(String) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(IntegerList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64List) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(RealList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(StringList) + stringify!(MinY) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope3D), "::", - stringify!(Binary) + stringify!(MaxY) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, + 32usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope3D), "::", - stringify!(Set) + stringify!(MinZ) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, + 40usize, concat!( "Offset of field: ", - stringify!(OGRField), + stringify!(OGREnvelope3D), "::", - stringify!(Date) + stringify!(MaxZ) ) ); } extern "C" { - pub fn OGRParseDate( - pszInput: *const libc::c_char, - psOutput: *mut OGRField, - nOptions: libc::c_int, - ) -> libc::c_int; -} -pub mod ogr_style_tool_class_id { - #[doc = " OGRStyleTool derived class types (returned by GetType())."] - pub type Type = libc::c_uint; - #[doc = "< None"] - pub const OGRSTCNone: Type = 0; - #[doc = "< Pen"] - pub const OGRSTCPen: Type = 1; - #[doc = "< Brush"] - pub const OGRSTCBrush: Type = 2; - #[doc = "< Symbol"] - pub const OGRSTCSymbol: Type = 3; - #[doc = "< Label"] - pub const OGRSTCLabel: Type = 4; - #[doc = "< Vector"] - pub const OGRSTCVector: Type = 5; -} -#[doc = " OGRStyleTool derived class types (returned by GetType())."] -pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; -pub mod ogr_style_tool_units_id { - #[doc = " List of units supported by OGRStyleTools."] - pub type Type = libc::c_uint; - #[doc = "< Ground unit"] - pub const OGRSTUGround: Type = 0; - #[doc = "< Pixel"] - pub const OGRSTUPixel: Type = 1; - #[doc = "< Points"] - pub const OGRSTUPoints: Type = 2; - #[doc = "< Millimeter"] - pub const OGRSTUMM: Type = 3; - #[doc = "< Centimeter"] - pub const OGRSTUCM: Type = 4; - #[doc = "< Inch"] - pub const OGRSTUInches: Type = 5; + pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; } -#[doc = " List of units supported by OGRStyleTools."] -pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; extern "C" { - pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; + pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - #[doc = " Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor."] - #[doc = ""] - #[doc = "The purpose of this method is to ensure that calling code will run with the GDAL"] - #[doc = "version it is compiled for. It is primarily indented for external plugins."] - #[doc = ""] - #[doc = "@param nVersionMajor Major version to be tested against"] - #[doc = "@param nVersionMinor Minor version to be tested against"] - #[doc = "@param pszCallingComponentName If not NULL, in case of version mismatch, the method"] - #[doc = "will issue a failure mentioning the name of"] - #[doc = "the calling component."] - pub fn GDALCheckVersion( - nVersionMajor: libc::c_int, - nVersionMinor: libc::c_int, - pszCallingComponentName: *const libc::c_char, - ) -> libc::c_int; + pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } -#[doc = " Opaque type for a geometry"] -pub type OGRGeometryH = *mut libc::c_void; -#[doc = " Opaque type for a spatial reference system"] -pub type OGRSpatialReferenceH = *mut libc::c_void; -#[doc = " Opaque type for a coordinate transformation object"] -pub type OGRCoordinateTransformationH = *mut libc::c_void; extern "C" { - pub fn OGR_G_CreateFromWkb( - arg1: *const libc::c_void, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - ) -> OGRErr::Type; + pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_CreateFromWkt( - arg1: *mut *mut libc::c_char, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - ) -> OGRErr::Type; + pub fn OGRFree(arg1: *mut libc::c_void); } -extern "C" { - pub fn OGR_G_CreateFromFgf( - arg1: *const libc::c_void, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - arg5: *mut libc::c_int, - ) -> OGRErr::Type; +pub mod OGRwkbGeometryType { + pub type Type = libc::c_uint; + pub const wkbUnknown: Type = 0; + pub const wkbPoint: Type = 1; + pub const wkbLineString: Type = 2; + pub const wkbPolygon: Type = 3; + pub const wkbMultiPoint: Type = 4; + pub const wkbMultiLineString: Type = 5; + pub const wkbMultiPolygon: Type = 6; + pub const wkbGeometryCollection: Type = 7; + pub const wkbCircularString: Type = 8; + pub const wkbCompoundCurve: Type = 9; + pub const wkbCurvePolygon: Type = 10; + pub const wkbMultiCurve: Type = 11; + pub const wkbMultiSurface: Type = 12; + pub const wkbCurve: Type = 13; + pub const wkbSurface: Type = 14; + pub const wkbPolyhedralSurface: Type = 15; + pub const wkbTIN: Type = 16; + pub const wkbTriangle: Type = 17; + pub const wkbNone: Type = 100; + pub const wkbLinearRing: Type = 101; + pub const wkbCircularStringZ: Type = 1008; + pub const wkbCompoundCurveZ: Type = 1009; + pub const wkbCurvePolygonZ: Type = 1010; + pub const wkbMultiCurveZ: Type = 1011; + pub const wkbMultiSurfaceZ: Type = 1012; + pub const wkbCurveZ: Type = 1013; + pub const wkbSurfaceZ: Type = 1014; + pub const wkbPolyhedralSurfaceZ: Type = 1015; + pub const wkbTINZ: Type = 1016; + pub const wkbTriangleZ: Type = 1017; + pub const wkbPointM: Type = 2001; + pub const wkbLineStringM: Type = 2002; + pub const wkbPolygonM: Type = 2003; + pub const wkbMultiPointM: Type = 2004; + pub const wkbMultiLineStringM: Type = 2005; + pub const wkbMultiPolygonM: Type = 2006; + pub const wkbGeometryCollectionM: Type = 2007; + pub const wkbCircularStringM: Type = 2008; + pub const wkbCompoundCurveM: Type = 2009; + pub const wkbCurvePolygonM: Type = 2010; + pub const wkbMultiCurveM: Type = 2011; + pub const wkbMultiSurfaceM: Type = 2012; + pub const wkbCurveM: Type = 2013; + pub const wkbSurfaceM: Type = 2014; + pub const wkbPolyhedralSurfaceM: Type = 2015; + pub const wkbTINM: Type = 2016; + pub const wkbTriangleM: Type = 2017; + pub const wkbPointZM: Type = 3001; + pub const wkbLineStringZM: Type = 3002; + pub const wkbPolygonZM: Type = 3003; + pub const wkbMultiPointZM: Type = 3004; + pub const wkbMultiLineStringZM: Type = 3005; + pub const wkbMultiPolygonZM: Type = 3006; + pub const wkbGeometryCollectionZM: Type = 3007; + pub const wkbCircularStringZM: Type = 3008; + pub const wkbCompoundCurveZM: Type = 3009; + pub const wkbCurvePolygonZM: Type = 3010; + pub const wkbMultiCurveZM: Type = 3011; + pub const wkbMultiSurfaceZM: Type = 3012; + pub const wkbCurveZM: Type = 3013; + pub const wkbSurfaceZM: Type = 3014; + pub const wkbPolyhedralSurfaceZM: Type = 3015; + pub const wkbTINZM: Type = 3016; + pub const wkbTriangleZM: Type = 3017; + pub const wkbPoint25D: Type = 2147483649; + pub const wkbLineString25D: Type = 2147483650; + pub const wkbPolygon25D: Type = 2147483651; + pub const wkbMultiPoint25D: Type = 2147483652; + pub const wkbMultiLineString25D: Type = 2147483653; + pub const wkbMultiPolygon25D: Type = 2147483654; + pub const wkbGeometryCollection25D: Type = 2147483655; } extern "C" { - pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); + pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; } extern "C" { - pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; + pub fn OGRMergeGeometryTypes( + eMain: OGRwkbGeometryType::Type, + eExtra: OGRwkbGeometryType::Type, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ApproximateArcAngles( - dfCenterX: f64, - dfCenterY: f64, - dfZ: f64, - dfPrimaryRadius: f64, - dfSecondaryAxis: f64, - dfRotation: f64, - dfStartAngle: f64, - dfEndAngle: f64, - dfMaxAngleStepSizeDegrees: f64, - ) -> OGRGeometryH; + pub fn OGRMergeGeometryTypesEx( + eMain: OGRwkbGeometryType::Type, + eExtra: OGRwkbGeometryType::Type, + bAllowPromotingToCurves: libc::c_int, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn OGR_GT_SetModifier( + eType: OGRwkbGeometryType::Type, + bSetZ: libc::c_int, + bSetM: libc::c_int, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_ForceTo( - hGeom: OGRGeometryH, - eTargetType: OGRwkbGeometryType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; + pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_RemoveLowerDimensionSubGeoms(hGeom: OGRGeometryH) -> OGRGeometryH; + pub fn OGR_GT_IsSubClassOf( + eType: OGRwkbGeometryType::Type, + eSuperType: OGRwkbGeometryType::Type, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; + pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; + pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; + pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); + pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; + pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_G_IsMeasured(arg1: OGRGeometryH) -> libc::c_int; + pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } -extern "C" { - pub fn OGR_G_Set3D(arg1: OGRGeometryH, arg2: libc::c_int); +pub mod OGRwkbByteOrder { + pub type Type = libc::c_uint; + pub const wkbXDR: Type = 0; + pub const wkbNDR: Type = 1; } -extern "C" { - pub fn OGR_G_SetMeasured(arg1: OGRGeometryH, arg2: libc::c_int); +pub mod OGRFieldType { + pub type Type = libc::c_uint; + pub const OFTInteger: Type = 0; + pub const OFTIntegerList: Type = 1; + pub const OFTReal: Type = 2; + pub const OFTRealList: Type = 3; + pub const OFTString: Type = 4; + pub const OFTStringList: Type = 5; + pub const OFTWideString: Type = 6; + pub const OFTWideStringList: Type = 7; + pub const OFTBinary: Type = 8; + pub const OFTDate: Type = 9; + pub const OFTTime: Type = 10; + pub const OFTDateTime: Type = 11; + pub const OFTInteger64: Type = 12; + pub const OFTInteger64List: Type = 13; + pub const OFTMaxType: Type = 13; } -extern "C" { - pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; +pub mod OGRFieldSubType { + pub type Type = libc::c_uint; + pub const OFSTNone: Type = 0; + pub const OFSTBoolean: Type = 1; + pub const OFSTInt16: Type = 2; + pub const OFSTFloat32: Type = 3; + pub const OFSTJSON: Type = 4; + pub const OFSTMaxSubType: Type = 4; } -extern "C" { - pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); +pub mod OGRJustification { + pub type Type = libc::c_uint; + pub const OJUndefined: Type = 0; + pub const OJLeft: Type = 1; + pub const OJRight: Type = 2; } -extern "C" { - pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); +#[repr(C)] +#[derive(Copy, Clone)] +pub union OGRField { + pub Integer: libc::c_int, + pub Integer64: GIntBig, + pub Real: f64, + pub String: *mut libc::c_char, + pub IntegerList: OGRField__bindgen_ty_1, + pub Integer64List: OGRField__bindgen_ty_2, + pub RealList: OGRField__bindgen_ty_3, + pub StringList: OGRField__bindgen_ty_4, + pub Binary: OGRField__bindgen_ty_5, + pub Set: OGRField__bindgen_ty_6, + pub Date: OGRField__bindgen_ty_7, } -extern "C" { - pub fn OGR_G_ImportFromWkb( - arg1: OGRGeometryH, - arg2: *const libc::c_void, - arg3: libc::c_int, - ) -> OGRErr::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_1 { + pub nCount: libc::c_int, + pub paList: *mut libc::c_int, } -extern "C" { - pub fn OGR_G_ExportToWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_1), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_1), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_G_ExportToIsoWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; -} -extern "C" { - pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; -} -extern "C" { - pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CloseRings(arg1: OGRGeometryH); -} -extern "C" { - pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToGMLEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; -} -extern "C" { - pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; -} -extern "C" { - pub fn OGR_G_ExportToKML( - arg1: OGRGeometryH, - pszAltitudeMode: *const libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; -} -extern "C" { - pub fn OGR_G_ExportToJsonEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; -} -extern "C" { - #[doc = " Create a OGR geometry from a GeoJSON geometry object"] - pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - #[doc = " Create a OGR geometry from a ESRI JSON geometry object"] - pub fn OGR_G_CreateGeometryFromEsriJson(arg1: *const libc::c_char) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_2 { + pub nCount: libc::c_int, + pub paList: *mut GIntBig, } -extern "C" { - pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_2), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_2), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_3 { + pub nCount: libc::c_int, + pub paList: *mut f64, } -extern "C" { - pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_3() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_3), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_3), + "::", + stringify!(paList) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRGeomTransformer { - _unused: [u8; 0], -} -#[doc = " Opaque type for a geometry transformer."] -pub type OGRGeomTransformerH = *mut OGRGeomTransformer; -extern "C" { - pub fn OGR_GeomTransformer_Create( - arg1: OGRCoordinateTransformationH, - papszOptions: CSLConstList, - ) -> OGRGeomTransformerH; +pub struct OGRField__bindgen_ty_4 { + pub nCount: libc::c_int, + pub paList: *mut *mut libc::c_char, } -extern "C" { - pub fn OGR_GeomTransformer_Transform( - hTransformer: OGRGeomTransformerH, - hGeom: OGRGeometryH, - ) -> OGRGeometryH; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_4() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_4), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_4), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_GeomTransformer_Destroy(hTransformer: OGRGeomTransformerH); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_5 { + pub nCount: libc::c_int, + pub paData: *mut GByte, } -extern "C" { - pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_5() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_5), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_5), + "::", + stringify!(paData) + ) + ); } -extern "C" { - pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_6 { + pub nMarker1: libc::c_int, + pub nMarker2: libc::c_int, + pub nMarker3: libc::c_int, } -extern "C" { - pub fn OGR_G_DelaunayTriangulation( +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_6() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker3) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_7 { + pub Year: GInt16, + pub Month: GByte, + pub Day: GByte, + pub Hour: GByte, + pub Minute: GByte, + pub TZFlag: GByte, + pub Reserved: GByte, + pub Second: f32, +} +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_7() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Year) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Month) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Day) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Hour) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Minute) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(TZFlag) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Reserved) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Second) + ) + ); +} +#[test] +fn bindgen_test_layout_OGRField() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer64) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Real) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(String) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(IntegerList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer64List) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(RealList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(StringList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Binary) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Set) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Date) + ) + ); +} +extern "C" { + pub fn OGRParseDate( + pszInput: *const libc::c_char, + psOutput: *mut OGRField, + nOptions: libc::c_int, + ) -> libc::c_int; +} +pub mod ogr_style_tool_class_id { + pub type Type = libc::c_uint; + pub const OGRSTCNone: Type = 0; + pub const OGRSTCPen: Type = 1; + pub const OGRSTCBrush: Type = 2; + pub const OGRSTCSymbol: Type = 3; + pub const OGRSTCLabel: Type = 4; + pub const OGRSTCVector: Type = 5; +} +pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; +pub mod ogr_style_tool_units_id { + pub type Type = libc::c_uint; + pub const OGRSTUGround: Type = 0; + pub const OGRSTUPixel: Type = 1; + pub const OGRSTUPoints: Type = 2; + pub const OGRSTUMM: Type = 3; + pub const OGRSTUCM: Type = 4; + pub const OGRSTUInches: Type = 5; +} +pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; +extern "C" { + pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; +} +extern "C" { + pub fn GDALCheckVersion( + nVersionMajor: libc::c_int, + nVersionMinor: libc::c_int, + pszCallingComponentName: *const libc::c_char, + ) -> libc::c_int; +} +pub type OGRGeometryH = *mut libc::c_void; +pub type OGRSpatialReferenceH = *mut libc::c_void; +pub type OGRCoordinateTransformationH = *mut libc::c_void; +extern "C" { + pub fn OGR_G_CreateFromWkb( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_CreateFromWkt( + arg1: *mut *mut libc::c_char, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_CreateFromFgf( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: libc::c_int, + arg5: *mut libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); +} +extern "C" { + pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ApproximateArcAngles( + dfCenterX: f64, + dfCenterY: f64, + dfZ: f64, + dfPrimaryRadius: f64, + dfSecondaryAxis: f64, + dfRotation: f64, + dfStartAngle: f64, + dfEndAngle: f64, + dfMaxAngleStepSizeDegrees: f64, + ) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ForceTo( + hGeom: OGRGeometryH, + eTargetType: OGRwkbGeometryType::Type, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_RemoveLowerDimensionSubGeoms(hGeom: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; +} +extern "C" { + pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; +} +extern "C" { + pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; +} +extern "C" { + pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); +} +extern "C" { + pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; +} +extern "C" { + pub fn OGR_G_IsMeasured(arg1: OGRGeometryH) -> libc::c_int; +} +extern "C" { + pub fn OGR_G_Set3D(arg1: OGRGeometryH, arg2: libc::c_int); +} +extern "C" { + pub fn OGR_G_SetMeasured(arg1: OGRGeometryH, arg2: libc::c_int); +} +extern "C" { + pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); +} +extern "C" { + pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); +} +extern "C" { + pub fn OGR_G_ImportFromWkb( + arg1: OGRGeometryH, + arg2: *const libc::c_void, + arg3: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_ExportToWkb( + arg1: OGRGeometryH, + arg2: OGRwkbByteOrder::Type, + arg3: *mut libc::c_uchar, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_ExportToIsoWkb( + arg1: OGRGeometryH, + arg2: OGRwkbByteOrder::Type, + arg3: *mut libc::c_uchar, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; +} +extern "C" { + pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; +} +extern "C" { + pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; +} +extern "C" { + pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); +} +extern "C" { + pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); +} +extern "C" { + pub fn OGR_G_CloseRings(arg1: OGRGeometryH); +} +extern "C" { + pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; +} +extern "C" { + pub fn OGR_G_ExportToGMLEx( + arg1: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; +} +extern "C" { + pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; +} +extern "C" { + pub fn OGR_G_ExportToKML( + arg1: OGRGeometryH, + pszAltitudeMode: *const libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; +} +extern "C" { + pub fn OGR_G_ExportToJsonEx( + arg1: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_char; +} +extern "C" { + pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_CreateGeometryFromEsriJson(arg1: *const libc::c_char) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); +} +extern "C" { + pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; +} +extern "C" { + pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; +} +extern "C" { + pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRGeomTransformer { + _unused: [u8; 0], +} +pub type OGRGeomTransformerH = *mut OGRGeomTransformer; +extern "C" { + pub fn OGR_GeomTransformer_Create( + arg1: OGRCoordinateTransformationH, + papszOptions: CSLConstList, + ) -> OGRGeomTransformerH; +} +extern "C" { + pub fn OGR_GeomTransformer_Transform( + hTransformer: OGRGeomTransformerH, + hGeom: OGRGeometryH, + ) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_GeomTransformer_Destroy(hTransformer: OGRGeomTransformerH); +} +extern "C" { + pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; +} +extern "C" { + pub fn OGR_G_DelaunayTriangulation( hThis: OGRGeometryH, dfTolerance: f64, bOnlyEdges: libc::c_int, @@ -4434,7 +4454,6 @@ extern "C" { pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { @@ -4450,7 +4469,6 @@ extern "C" { pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - #[doc = " @endcond"] pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { @@ -4625,7 +4643,6 @@ extern "C" { ) -> OGRGeometryH; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, ) -> OGRErr::Type; @@ -4634,26 +4651,20 @@ extern "C" { pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; } extern "C" { - #[doc = " @endcond"] pub fn OGRSetNonLinearGeometriesEnabledFlag(bFlag: libc::c_int); } extern "C" { pub fn OGRGetNonLinearGeometriesEnabledFlag() -> libc::c_int; } -#[doc = " Opaque type for a field definition (OGRFieldDefn)"] pub type OGRFieldDefnH = *mut libc::c_void; -#[doc = " Opaque type for a feature definition (OGRFeatureDefn)"] pub type OGRFeatureDefnH = *mut libc::c_void; -#[doc = " Opaque type for a feature (OGRFeature)"] pub type OGRFeatureH = *mut libc::c_void; -#[doc = " Opaque type for a style table (OGRStyleTable)"] pub type OGRStyleTableH = *mut libc::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct OGRGeomFieldDefnHS { _unused: [u8; 0], } -#[doc = " Opaque type for a geometry field definition (OGRGeomFieldDefn)"] pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; extern "C" { pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; @@ -5146,15 +5157,12 @@ extern "C" { pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); } extern "C" { - #[doc = " Return style table"] pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; } extern "C" { - #[doc = " Set style table and take ownership"] pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); } extern "C" { - #[doc = " Set style table"] pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); } extern "C" { @@ -5183,11 +5191,8 @@ extern "C" { bEmitError: libc::c_int, ) -> libc::c_int; } -#[doc = " Opaque type for a layer (OGRLayer)"] pub type OGRLayerH = *mut libc::c_void; -#[doc = " Opaque type for a OGR datasource (OGRDataSource)"] pub type OGRDataSourceH = *mut libc::c_void; -#[doc = " Opaque type for a OGR driver (OGRSFDriver)"] pub type OGRSFDriverH = *mut libc::c_void; extern "C" { pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; @@ -5320,7 +5325,6 @@ extern "C" { pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; } extern "C" { @@ -5330,30 +5334,24 @@ extern "C" { pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; } extern "C" { - #[doc = " @endcond"] pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; } extern "C" { - #[doc = " @endcond"] pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { - #[doc = " Get style table"] pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; } extern "C" { - #[doc = " Set style table (and take ownership)"] pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); } extern "C" { - #[doc = " Set style table"] pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); } extern "C" { @@ -5482,7 +5480,6 @@ extern "C" { pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { @@ -5495,19 +5492,15 @@ extern "C" { pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - #[doc = " @endcond */"] pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; } extern "C" { - #[doc = " Get style table"] pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; } extern "C" { - #[doc = " Set style table (and take ownership)"] pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); } extern "C" { - #[doc = " Set style table"] pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); } extern "C" { @@ -5542,6155 +5535,6175 @@ extern "C" { pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OGROpen( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGROpenShared( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; -} -extern "C" { - pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRRegisterDriver(arg1: OGRSFDriverH); -} -extern "C" { - pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); -} -extern "C" { - #[doc = " @endcond"] - pub fn OGRGetDriverCount() -> libc::c_int; -} -extern "C" { - pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; -} -extern "C" { - pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRGetOpenDSCount() -> libc::c_int; -} -extern "C" { - pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; -} -extern "C" { - #[doc = " @endcond"] - pub fn OGRRegisterAll(); -} -extern "C" { - #[doc = " Clean-up all drivers (including raster ones starting with GDAL 2.0."] - #[doc = " See GDALDestroyDriverManager()"] - pub fn OGRCleanupAll(); -} -#[doc = " Style manager opaque type"] -pub type OGRStyleMgrH = *mut libc::c_void; -#[doc = " Style tool opaque type"] -pub type OGRStyleToolH = *mut libc::c_void; -extern "C" { - pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; -} -extern "C" { - pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); -} -extern "C" { - pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_SM_InitStyleString( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_GetPartCount( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_GetPart( - hSM: OGRStyleMgrH, - nPartId: libc::c_int, - pszStyleString: *const libc::c_char, - ) -> OGRStyleToolH; -} -extern "C" { - pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; -} -extern "C" { - pub fn OGR_SM_AddStyle( - hSM: OGRStyleMgrH, - pszStyleName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; -} -extern "C" { - pub fn OGR_ST_Destroy(hST: OGRStyleToolH); -} -extern "C" { - pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; -} -extern "C" { - pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; -} -extern "C" { - pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); -} -extern "C" { - pub fn OGR_ST_GetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_ST_GetParamNum( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_ST_GetParamDbl( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> f64; -} -extern "C" { - pub fn OGR_ST_SetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - pszValue: *const libc::c_char, - ); -} -extern "C" { - pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); -} -extern "C" { - pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); -} -extern "C" { - pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_ST_GetRGBFromString( - hST: OGRStyleToolH, - pszColor: *const libc::c_char, - pnRed: *mut libc::c_int, - pnGreen: *mut libc::c_int, - pnBlue: *mut libc::c_int, - pnAlpha: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_Create() -> OGRStyleTableH; -} -extern "C" { - pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); -} -extern "C" { - pub fn OGR_STBL_AddStyle( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_SaveStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_LoadStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_STBL_Find( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); -} -extern "C" { - pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -pub mod GDALDataType { - #[doc = " Pixel data types"] - pub type Type = libc::c_uint; - #[doc = " Unknown or unspecified type"] - pub const GDT_Unknown: Type = 0; - #[doc = " Eight bit unsigned integer"] - pub const GDT_Byte: Type = 1; - #[doc = " Sixteen bit unsigned integer"] - pub const GDT_UInt16: Type = 2; - #[doc = " Sixteen bit signed integer"] - pub const GDT_Int16: Type = 3; - #[doc = " Thirty two bit unsigned integer"] - pub const GDT_UInt32: Type = 4; - #[doc = " Thirty two bit signed integer"] - pub const GDT_Int32: Type = 5; - #[doc = " Thirty two bit floating point"] - pub const GDT_Float32: Type = 6; - #[doc = " Sixty four bit floating point"] - pub const GDT_Float64: Type = 7; - #[doc = " Complex Int16"] - pub const GDT_CInt16: Type = 8; - #[doc = " Complex Int32"] - pub const GDT_CInt32: Type = 9; - #[doc = " Complex Float32"] - pub const GDT_CFloat32: Type = 10; - #[doc = " Complex Float64"] - pub const GDT_CFloat64: Type = 11; - #[doc = " Complex Float64"] - pub const GDT_TypeCount: Type = 12; -} -extern "C" { - pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGROpen( + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: *mut OGRSFDriverH, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALGetDataTypeSizeBits(eDataType: GDALDataType::Type) -> libc::c_int; + pub fn OGROpenShared( + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: *mut OGRSFDriverH, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALGetDataTypeSizeBytes(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; } extern "C" { - pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGRRegisterDriver(arg1: OGRSFDriverH); } extern "C" { - pub fn GDALDataTypeIsInteger(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); } extern "C" { - pub fn GDALDataTypeIsFloating(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGRGetDriverCount() -> libc::c_int; } extern "C" { - pub fn GDALDataTypeIsSigned(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; } extern "C" { - pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; + pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; } extern "C" { - pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; + pub fn OGRGetOpenDSCount() -> libc::c_int; } extern "C" { - pub fn GDALDataTypeUnion( - arg1: GDALDataType::Type, - arg2: GDALDataType::Type, - ) -> GDALDataType::Type; + pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; } extern "C" { - pub fn GDALDataTypeUnionWithValue( - eDT: GDALDataType::Type, - dValue: f64, - bComplex: libc::c_int, - ) -> GDALDataType::Type; + pub fn OGRRegisterAll(); } extern "C" { - pub fn GDALFindDataType( - nBits: libc::c_int, - bSigned: libc::c_int, - bFloating: libc::c_int, - bComplex: libc::c_int, - ) -> GDALDataType::Type; + pub fn OGRCleanupAll(); } +pub type OGRStyleMgrH = *mut libc::c_void; +pub type OGRStyleToolH = *mut libc::c_void; extern "C" { - pub fn GDALFindDataTypeForValue(dValue: f64, bComplex: libc::c_int) -> GDALDataType::Type; + pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; } extern "C" { - pub fn GDALAdjustValueToDataType( - eDT: GDALDataType::Type, - dfValue: f64, - pbClamped: *mut libc::c_int, - pbRounded: *mut libc::c_int, - ) -> f64; + pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); } extern "C" { - pub fn GDALGetNonComplexDataType(arg1: GDALDataType::Type) -> GDALDataType::Type; + pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn GDALDataTypeIsConversionLossy( - eTypeFrom: GDALDataType::Type, - eTypeTo: GDALDataType::Type, + pub fn OGR_SM_InitStyleString( + hSM: OGRStyleMgrH, + pszStyleString: *const libc::c_char, ) -> libc::c_int; } -pub mod GDALAsyncStatusType { - #[doc = " status of the asynchronous stream"] - pub type Type = libc::c_uint; - pub const GARIO_PENDING: Type = 0; - pub const GARIO_UPDATE: Type = 1; - pub const GARIO_ERROR: Type = 2; - pub const GARIO_COMPLETE: Type = 3; - pub const GARIO_TypeCount: Type = 4; -} extern "C" { - pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; + pub fn OGR_SM_GetPartCount( + hSM: OGRStyleMgrH, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; -} -pub mod GDALAccess { - #[doc = " Flag indicating read/write, or read-only access to data."] - pub type Type = libc::c_uint; - #[doc = " Read only (no update) access"] - pub const GA_ReadOnly: Type = 0; - #[doc = " Read/write access."] - pub const GA_Update: Type = 1; -} -pub mod GDALRWFlag { - #[doc = " Read/Write flag for RasterIO() method"] - pub type Type = libc::c_uint; - #[doc = " Read data"] - pub const GF_Read: Type = 0; - #[doc = " Write data"] - pub const GF_Write: Type = 1; -} -pub mod GDALRIOResampleAlg { - #[doc = " RasterIO() resampling method."] - #[doc = " @since GDAL 2.0"] - pub type Type = libc::c_uint; - #[doc = " Nearest neighbour"] - pub const GRIORA_NearestNeighbour: Type = 0; - #[doc = " Bilinear (2x2 kernel)"] - pub const GRIORA_Bilinear: Type = 1; - #[doc = " Cubic Convolution Approximation (4x4 kernel)"] - pub const GRIORA_Cubic: Type = 2; - #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] - pub const GRIORA_CubicSpline: Type = 3; - #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] - pub const GRIORA_Lanczos: Type = 4; - #[doc = " Average"] - pub const GRIORA_Average: Type = 5; - #[doc = " Mode (selects the value which appears most often of all the sampled points)"] - pub const GRIORA_Mode: Type = 6; - #[doc = " Gauss blurring"] - pub const GRIORA_Gauss: Type = 7; - #[doc = " @cond Doxygen_Suppress"] - pub const GRIORA_LAST: Type = 7; + pub fn OGR_SM_GetPart( + hSM: OGRStyleMgrH, + nPartId: libc::c_int, + pszStyleString: *const libc::c_char, + ) -> OGRStyleToolH; } -#[doc = " Structure to pass extra arguments to RasterIO() method"] -#[doc = " @since GDAL 2.0"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRasterIOExtraArg { - #[doc = " Version of structure (to allow future extensions of the structure)"] - pub nVersion: libc::c_int, - #[doc = " Resampling algorithm"] - pub eResampleAlg: GDALRIOResampleAlg::Type, - #[doc = " Progress callback"] - pub pfnProgress: GDALProgressFunc, - #[doc = " Progress callback user data"] - pub pProgressData: *mut libc::c_void, - #[doc = " Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set."] - #[doc = "Mostly reserved from the VRT driver to communicate a more precise"] - #[doc = "source window. Must be such that dfXOff - nXOff < 1.0 and"] - #[doc = "dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize < 1.0"] - pub bFloatingPointWindowValidity: libc::c_int, - #[doc = " Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfXOff: f64, - #[doc = " Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfYOff: f64, - #[doc = " Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfXSize: f64, - #[doc = " Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfYSize: f64, +extern "C" { + pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; } -#[test] -fn bindgen_test_layout_GDALRasterIOExtraArg() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(nVersion) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnProgress as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pProgressData as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pProgressData) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bFloatingPointWindowValidity - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(bFloatingPointWindowValidity) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYSize) - ) - ); +extern "C" { + pub fn OGR_SM_AddStyle( + hSM: OGRStyleMgrH, + pszStyleName: *const libc::c_char, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } -pub mod GDALColorInterp { - #[doc = " Types of color interpretation for raster bands."] - pub type Type = libc::c_uint; - #[doc = " Undefined"] - pub const GCI_Undefined: Type = 0; - #[doc = " Greyscale"] - pub const GCI_GrayIndex: Type = 1; - #[doc = " Paletted (see associated color table)"] - pub const GCI_PaletteIndex: Type = 2; - #[doc = " Red band of RGBA image"] - pub const GCI_RedBand: Type = 3; - #[doc = " Green band of RGBA image"] - pub const GCI_GreenBand: Type = 4; - #[doc = " Blue band of RGBA image"] - pub const GCI_BlueBand: Type = 5; - #[doc = " Alpha (0=transparent, 255=opaque)"] - pub const GCI_AlphaBand: Type = 6; - #[doc = " Hue band of HLS image"] - pub const GCI_HueBand: Type = 7; - #[doc = " Saturation band of HLS image"] - pub const GCI_SaturationBand: Type = 8; - #[doc = " Lightness band of HLS image"] - pub const GCI_LightnessBand: Type = 9; - #[doc = " Cyan band of CMYK image"] - pub const GCI_CyanBand: Type = 10; - #[doc = " Magenta band of CMYK image"] - pub const GCI_MagentaBand: Type = 11; - #[doc = " Yellow band of CMYK image"] - pub const GCI_YellowBand: Type = 12; - #[doc = " Black band of CMYK image"] - pub const GCI_BlackBand: Type = 13; - #[doc = " Y Luminance"] - pub const GCI_YCbCr_YBand: Type = 14; - #[doc = " Cb Chroma"] - pub const GCI_YCbCr_CbBand: Type = 15; - #[doc = " Cr Chroma"] - pub const GCI_YCbCr_CrBand: Type = 16; - #[doc = " Max current value (equals to GCI_YCbCr_CrBand currently)"] - pub const GCI_Max: Type = 16; +extern "C" { + pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; } extern "C" { - pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; + pub fn OGR_ST_Destroy(hST: OGRStyleToolH); } extern "C" { - pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; + pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; } -pub mod GDALPaletteInterp { - #[doc = " Types of color interpretations for a GDALColorTable."] - pub type Type = libc::c_uint; - #[doc = " Grayscale (in GDALColorEntry.c1)"] - pub const GPI_Gray: Type = 0; - #[doc = " Red, Green, Blue and Alpha in (in c1, c2, c3 and c4)"] - pub const GPI_RGB: Type = 1; - #[doc = " Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)"] - pub const GPI_CMYK: Type = 2; - #[doc = " Hue, Lightness and Saturation (in c1, c2, and c3)"] - pub const GPI_HLS: Type = 3; +extern "C" { + pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; } extern "C" { - pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; + pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); } -#[doc = " Opaque type used for the C bindings of the C++ GDALMajorObject class"] -pub type GDALMajorObjectH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALDataset class"] -pub type GDALDatasetH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALRasterBand class"] -pub type GDALRasterBandH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALDriver class"] -pub type GDALDriverH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALColorTable class"] -pub type GDALColorTableH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class"] -pub type GDALRasterAttributeTableH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALAsyncReader class"] -pub type GDALAsyncReaderH = *mut libc::c_void; -#[doc = " Type to express pixel, line or band spacing. Signed 64 bit integer."] -pub type GSpacing = GIntBig; -pub mod GDALExtendedDataTypeClass { - #[doc = " Enumeration giving the class of a GDALExtendedDataType."] - #[doc = " @since GDAL 3.1"] - pub type Type = libc::c_uint; - #[doc = " Numeric value. Based on GDALDataType enumeration"] - pub const GEDTC_NUMERIC: Type = 0; - #[doc = " String value."] - pub const GEDTC_STRING: Type = 1; - #[doc = " Compound data type."] - pub const GEDTC_COMPOUND: Type = 2; +extern "C" { + pub fn OGR_ST_GetParamStr( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> *const libc::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALExtendedDataTypeHS { - _unused: [u8; 0], +extern "C" { + pub fn OGR_ST_GetParamNum( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> libc::c_int; } -#[doc = " Opaque type for C++ GDALExtendedDataType"] -pub type GDALExtendedDataTypeH = *mut GDALExtendedDataTypeHS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALEDTComponentHS { - _unused: [u8; 0], +extern "C" { + pub fn OGR_ST_GetParamDbl( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> f64; } -#[doc = " Opaque type for C++ GDALEDTComponent"] -pub type GDALEDTComponentH = *mut GDALEDTComponentHS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALGroupHS { - _unused: [u8; 0], +extern "C" { + pub fn OGR_ST_SetParamStr( + hST: OGRStyleToolH, + eParam: libc::c_int, + pszValue: *const libc::c_char, + ); } -#[doc = " Opaque type for C++ GDALGroup"] -pub type GDALGroupH = *mut GDALGroupHS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALMDArrayHS { - _unused: [u8; 0], +extern "C" { + pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); } -#[doc = " Opaque type for C++ GDALMDArray"] -pub type GDALMDArrayH = *mut GDALMDArrayHS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALAttributeHS { - _unused: [u8; 0], +extern "C" { + pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); } -#[doc = " Opaque type for C++ GDALAttribute"] -pub type GDALAttributeH = *mut GDALAttributeHS; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALDimensionHS { - _unused: [u8; 0], +extern "C" { + pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; } -#[doc = " Opaque type for C++ GDALDimension"] -pub type GDALDimensionH = *mut GDALDimensionHS; extern "C" { - pub fn GDALAllRegister(); + pub fn OGR_ST_GetRGBFromString( + hST: OGRStyleToolH, + pszColor: *const libc::c_char, + pnRed: *mut libc::c_int, + pnGreen: *mut libc::c_int, + pnBlue: *mut libc::c_int, + pnAlpha: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALCreate( - hDriver: GDALDriverH, - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: GDALDataType::Type, - arg6: CSLConstList, - ) -> GDALDatasetH; + pub fn OGR_STBL_Create() -> OGRStyleTableH; } extern "C" { - pub fn GDALCreateCopy( - arg1: GDALDriverH, - arg2: *const libc::c_char, - arg3: GDALDatasetH, - arg4: libc::c_int, - arg5: CSLConstList, - arg6: GDALProgressFunc, - arg7: *mut libc::c_void, - ) -> GDALDatasetH; + pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); } extern "C" { - pub fn GDALIdentifyDriver( + pub fn OGR_STBL_AddStyle( + hStyleTable: OGRStyleTableH, + pszName: *const libc::c_char, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn OGR_STBL_SaveStyleTable( + hStyleTable: OGRStyleTableH, pszFilename: *const libc::c_char, - papszFileList: CSLConstList, - ) -> GDALDriverH; + ) -> libc::c_int; } extern "C" { - pub fn GDALIdentifyDriverEx( + pub fn OGR_STBL_LoadStyleTable( + hStyleTable: OGRStyleTableH, pszFilename: *const libc::c_char, - nIdentifyFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszFileList: *const *const libc::c_char, - ) -> GDALDriverH; + ) -> libc::c_int; } extern "C" { - pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; + pub fn OGR_STBL_Find( + hStyleTable: OGRStyleTableH, + pszName: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; + pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); } extern "C" { - pub fn GDALOpenEx( - pszFilename: *const libc::c_char, - nOpenFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszOpenOptions: *const *const libc::c_char, - papszSiblingFiles: *const *const libc::c_char, - ) -> GDALDatasetH; + pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; } extern "C" { - pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; + pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; +} +pub mod GDALDataType { + pub type Type = libc::c_uint; + pub const GDT_Unknown: Type = 0; + pub const GDT_Byte: Type = 1; + pub const GDT_UInt16: Type = 2; + pub const GDT_Int16: Type = 3; + pub const GDT_UInt32: Type = 4; + pub const GDT_Int32: Type = 5; + pub const GDT_Float32: Type = 6; + pub const GDT_Float64: Type = 7; + pub const GDT_CInt16: Type = 8; + pub const GDT_CInt32: Type = 9; + pub const GDT_CFloat32: Type = 10; + pub const GDT_CFloat64: Type = 11; + pub const GDT_TypeCount: Type = 12; } extern "C" { - pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; + pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetDriverCount() -> libc::c_int; + pub fn GDALGetDataTypeSizeBits(eDataType: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; + pub fn GDALGetDataTypeSizeBytes(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALCreateDriver() -> GDALDriverH; + pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALDestroyDriver(arg1: GDALDriverH); + pub fn GDALDataTypeIsInteger(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; + pub fn GDALDataTypeIsFloating(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALDeregisterDriver(arg1: GDALDriverH); + pub fn GDALDataTypeIsSigned(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALDestroyDriverManager(); + pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALDestroy(); + pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; } extern "C" { - pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; + pub fn GDALDataTypeUnion( + arg1: GDALDataType::Type, + arg2: GDALDataType::Type, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALRenameDataset( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; + pub fn GDALDataTypeUnionWithValue( + eDT: GDALDataType::Type, + dValue: f64, + bComplex: libc::c_int, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALCopyDatasetFiles( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; + pub fn GDALFindDataType( + nBits: libc::c_int, + bSigned: libc::c_int, + bFloating: libc::c_int, + bComplex: libc::c_int, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALValidateCreationOptions( - arg1: GDALDriverH, - papszCreationOptions: CSLConstList, - ) -> libc::c_int; + pub fn GDALFindDataTypeForValue(dValue: f64, bComplex: libc::c_int) -> GDALDataType::Type; } extern "C" { - pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; + pub fn GDALAdjustValueToDataType( + eDT: GDALDataType::Type, + dfValue: f64, + pbClamped: *mut libc::c_int, + pbRounded: *mut libc::c_int, + ) -> f64; } extern "C" { - pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; + pub fn GDALGetNonComplexDataType(arg1: GDALDataType::Type) -> GDALDataType::Type; } extern "C" { - pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; + pub fn GDALDataTypeIsConversionLossy( + eTypeFrom: GDALDataType::Type, + eTypeTo: GDALDataType::Type, + ) -> libc::c_int; +} +pub mod GDALAsyncStatusType { + pub type Type = libc::c_uint; + pub const GARIO_PENDING: Type = 0; + pub const GARIO_UPDATE: Type = 1; + pub const GARIO_ERROR: Type = 2; + pub const GARIO_COMPLETE: Type = 3; + pub const GARIO_TypeCount: Type = 4; +} +extern "C" { + pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; +} +extern "C" { + pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; +} +pub mod GDALAccess { + pub type Type = libc::c_uint; + pub const GA_ReadOnly: Type = 0; + pub const GA_Update: Type = 1; +} +pub mod GDALRWFlag { + pub type Type = libc::c_uint; + pub const GF_Read: Type = 0; + pub const GF_Write: Type = 1; } -extern "C" { - pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; +pub mod GDALRIOResampleAlg { + pub type Type = libc::c_uint; + pub const GRIORA_NearestNeighbour: Type = 0; + pub const GRIORA_Bilinear: Type = 1; + pub const GRIORA_Cubic: Type = 2; + pub const GRIORA_CubicSpline: Type = 3; + pub const GRIORA_Lanczos: Type = 4; + pub const GRIORA_Average: Type = 5; + pub const GRIORA_Mode: Type = 6; + pub const GRIORA_Gauss: Type = 7; + pub const GRIORA_LAST: Type = 7; } -#[doc = " Ground Control Point"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct GDAL_GCP { - #[doc = " Unique identifier, often numeric"] - pub pszId: *mut libc::c_char, - #[doc = " Informational message or \"\""] - pub pszInfo: *mut libc::c_char, - #[doc = " Pixel (x) location of GCP on raster"] - pub dfGCPPixel: f64, - #[doc = " Line (y) location of GCP on raster"] - pub dfGCPLine: f64, - #[doc = " X position of GCP in georeferenced space"] - pub dfGCPX: f64, - #[doc = " Y position of GCP in georeferenced space"] - pub dfGCPY: f64, - #[doc = " Elevation of GCP, or zero if not known"] - pub dfGCPZ: f64, +pub struct GDALRasterIOExtraArg { + pub nVersion: libc::c_int, + pub eResampleAlg: GDALRIOResampleAlg::Type, + pub pfnProgress: GDALProgressFunc, + pub pProgressData: *mut libc::c_void, + pub bFloatingPointWindowValidity: libc::c_int, + pub dfXOff: f64, + pub dfYOff: f64, + pub dfXSize: f64, + pub dfYSize: f64, } #[test] -fn bindgen_test_layout_GDAL_GCP() { +fn bindgen_test_layout_GDALRasterIOExtraArg() { assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(GDAL_GCP)) + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GDAL_GCP)) + concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszId) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), + stringify!(GDALRasterIOExtraArg), "::", - stringify!(pszInfo) + stringify!(nVersion) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, - 16usize, + unsafe { + &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize + }, + 4usize, concat!( "Offset of field: ", - stringify!(GDAL_GCP), + stringify!(GDALRasterIOExtraArg), "::", - stringify!(dfGCPPixel) + stringify!(eResampleAlg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, - 24usize, + unsafe { + &(*(::std::ptr::null::())).pfnProgress as *const _ as usize + }, + 8usize, concat!( "Offset of field: ", - stringify!(GDAL_GCP), + stringify!(GDALRasterIOExtraArg), "::", - stringify!(dfGCPLine) + stringify!(pfnProgress) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, - 32usize, + unsafe { + &(*(::std::ptr::null::())).pProgressData as *const _ as usize + }, + 16usize, concat!( "Offset of field: ", - stringify!(GDAL_GCP), + stringify!(GDALRasterIOExtraArg), "::", - stringify!(dfGCPX) + stringify!(pProgressData) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, - 40usize, + unsafe { + &(*(::std::ptr::null::())).bFloatingPointWindowValidity + as *const _ as usize + }, + 24usize, concat!( "Offset of field: ", - stringify!(GDAL_GCP), + stringify!(GDALRasterIOExtraArg), "::", - stringify!(dfGCPY) + stringify!(bFloatingPointWindowValidity) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPZ) - ) - ); -} -extern "C" { - pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); -} -extern "C" { - pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); -} -extern "C" { - pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; -} -extern "C" { - pub fn GDALGCPsToGeoTransform( - nGCPCount: libc::c_int, - pasGCPs: *const GDAL_GCP, - padfGeoTransform: *mut f64, - bApproxOK: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALInvGeoTransform( - padfGeoTransformIn: *mut f64, - padfInvGeoTransformOut: *mut f64, - ) -> libc::c_int; -} -extern "C" { - pub fn GDALApplyGeoTransform( - arg1: *mut f64, - arg2: f64, - arg3: f64, - arg4: *mut f64, - arg5: *mut f64, - ); -} -extern "C" { - pub fn GDALComposeGeoTransforms( - padfGeoTransform1: *const f64, - padfGeoTransform2: *const f64, - padfGeoTransformOut: *mut f64, - ); -} -extern "C" { - pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALGetMetadata( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALSetMetadata( - arg1: GDALMajorObjectH, - arg2: CSLConstList, - arg3: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); -} -extern "C" { - pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; -} -extern "C" { - pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALClose(arg1: GDALDatasetH); -} -extern "C" { - pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; -} -extern "C" { - pub fn GDALAddBand( - hDS: GDALDatasetH, - eType: GDALDataType::Type, - papszOptions: CSLConstList, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALBeginAsyncReader( - hDS: GDALDatasetH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - pBuf: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - papszOptions: CSLConstList, - ) -> GDALAsyncReaderH; -} -extern "C" { - pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); -} -extern "C" { - pub fn GDALDatasetRasterIO( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - ) -> CPLErr::Type; + unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfXOff) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfYOff) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfXSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfYSize) + ) + ); } -extern "C" { - pub fn GDALDatasetRasterIOEx( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - nBandSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; +pub mod GDALColorInterp { + pub type Type = libc::c_uint; + pub const GCI_Undefined: Type = 0; + pub const GCI_GrayIndex: Type = 1; + pub const GCI_PaletteIndex: Type = 2; + pub const GCI_RedBand: Type = 3; + pub const GCI_GreenBand: Type = 4; + pub const GCI_BlueBand: Type = 5; + pub const GCI_AlphaBand: Type = 6; + pub const GCI_HueBand: Type = 7; + pub const GCI_SaturationBand: Type = 8; + pub const GCI_LightnessBand: Type = 9; + pub const GCI_CyanBand: Type = 10; + pub const GCI_MagentaBand: Type = 11; + pub const GCI_YellowBand: Type = 12; + pub const GCI_BlackBand: Type = 13; + pub const GCI_YCbCr_YBand: Type = 14; + pub const GCI_YCbCr_CbBand: Type = 15; + pub const GCI_YCbCr_CrBand: Type = 16; + pub const GCI_Max: Type = 16; } extern "C" { - pub fn GDALDatasetAdviseRead( - hDS: GDALDatasetH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; + pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; } -extern "C" { - pub fn GDALGetSpatialRef(arg1: GDALDatasetH) -> OGRSpatialReferenceH; +pub mod GDALPaletteInterp { + pub type Type = libc::c_uint; + pub const GPI_Gray: Type = 0; + pub const GPI_RGB: Type = 1; + pub const GPI_CMYK: Type = 2; + pub const GPI_HLS: Type = 3; } extern "C" { - pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; + pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; } -extern "C" { - pub fn GDALSetSpatialRef(arg1: GDALDatasetH, arg2: OGRSpatialReferenceH) -> CPLErr::Type; +pub type GDALMajorObjectH = *mut libc::c_void; +pub type GDALDatasetH = *mut libc::c_void; +pub type GDALRasterBandH = *mut libc::c_void; +pub type GDALDriverH = *mut libc::c_void; +pub type GDALColorTableH = *mut libc::c_void; +pub type GDALRasterAttributeTableH = *mut libc::c_void; +pub type GDALAsyncReaderH = *mut libc::c_void; +pub type GSpacing = GIntBig; +pub mod GDALExtendedDataTypeClass { + pub type Type = libc::c_uint; + pub const GEDTC_NUMERIC: Type = 0; + pub const GEDTC_STRING: Type = 1; + pub const GEDTC_COMPOUND: Type = 2; } -extern "C" { - pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALExtendedDataTypeHS { + _unused: [u8; 0], } -extern "C" { - pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; +pub type GDALExtendedDataTypeH = *mut GDALExtendedDataTypeHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALEDTComponentHS { + _unused: [u8; 0], } -extern "C" { - pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; +pub type GDALEDTComponentH = *mut GDALEDTComponentHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGroupHS { + _unused: [u8; 0], } -extern "C" { - pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; +pub type GDALGroupH = *mut GDALGroupHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMDArrayHS { + _unused: [u8; 0], } -extern "C" { - pub fn GDALGetGCPSpatialRef(arg1: GDALDatasetH) -> OGRSpatialReferenceH; +pub type GDALMDArrayH = *mut GDALMDArrayHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALAttributeHS { + _unused: [u8; 0], } -extern "C" { - pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; +pub type GDALAttributeH = *mut GDALAttributeHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDimensionHS { + _unused: [u8; 0], } +pub type GDALDimensionH = *mut GDALDimensionHS; extern "C" { - pub fn GDALSetGCPs( - arg1: GDALDatasetH, - arg2: libc::c_int, - arg3: *const GDAL_GCP, - arg4: *const libc::c_char, - ) -> CPLErr::Type; + pub fn GDALAllRegister(); } extern "C" { - pub fn GDALSetGCPs2( - arg1: GDALDatasetH, + pub fn GDALCreate( + hDriver: GDALDriverH, + arg1: *const libc::c_char, arg2: libc::c_int, - arg3: *const GDAL_GCP, - arg4: OGRSpatialReferenceH, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetInternalHandle( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALReleaseDataset(arg1: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALBuildOverviews( - arg1: GDALDatasetH, - arg2: *const libc::c_char, arg3: libc::c_int, - arg4: *mut libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_int, - arg7: GDALProgressFunc, - arg8: *mut libc::c_void, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); -} -extern "C" { - pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; -} -extern "C" { - pub fn GDALFlushCache(hDS: GDALDatasetH); -} -extern "C" { - pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; + arg4: libc::c_int, + arg5: GDALDataType::Type, + arg6: CSLConstList, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALDatasetCopyWholeRaster( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: CSLConstList, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALCreateCopy( + arg1: GDALDriverH, + arg2: *const libc::c_char, + arg3: GDALDatasetH, + arg4: libc::c_int, + arg5: CSLConstList, + arg6: GDALProgressFunc, + arg7: *mut libc::c_void, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALRasterBandCopyWholeRaster( - hSrcBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - constpapszOptions: *const *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALIdentifyDriver( + pszFilename: *const libc::c_char, + papszFileList: CSLConstList, + ) -> GDALDriverH; } extern "C" { - pub fn GDALRegenerateOverviews( - hSrcBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviewBands: *mut GDALRasterBandH, - pszResampling: *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALIdentifyDriverEx( + pszFilename: *const libc::c_char, + nIdentifyFlags: libc::c_uint, + papszAllowedDrivers: *const *const libc::c_char, + papszFileList: *const *const libc::c_char, + ) -> GDALDriverH; } extern "C" { - pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; + pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; } extern "C" { - pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; + pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; } extern "C" { - pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; + pub fn GDALOpenEx( + pszFilename: *const libc::c_char, + nOpenFlags: libc::c_uint, + papszAllowedDrivers: *const *const libc::c_char, + papszOpenOptions: *const *const libc::c_char, + papszSiblingFiles: *const *const libc::c_char, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; + pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; } extern "C" { - pub fn GDALDatasetCreateLayer( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: CSLConstList, - ) -> OGRLayerH; + pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; } extern "C" { - pub fn GDALDatasetCopyLayer( - arg1: GDALDatasetH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: CSLConstList, - ) -> OGRLayerH; + pub fn GDALGetDriverCount() -> libc::c_int; } extern "C" { - pub fn GDALDatasetResetReading(arg1: GDALDatasetH); + pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; } extern "C" { - pub fn GDALDatasetGetNextFeature( - hDS: GDALDatasetH, - phBelongingLayer: *mut OGRLayerH, - pdfProgressPct: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> OGRFeatureH; + pub fn GDALCreateDriver() -> GDALDriverH; } extern "C" { - pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; + pub fn GDALDestroyDriver(arg1: GDALDriverH); } extern "C" { - pub fn GDALDatasetExecuteSQL( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; + pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; } extern "C" { - pub fn GDALDatasetAbortSQL(arg1: GDALDatasetH) -> OGRErr::Type; + pub fn GDALDeregisterDriver(arg1: GDALDriverH); } extern "C" { - pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); + pub fn GDALDestroyDriverManager(); } extern "C" { - pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; + pub fn GDALDestroy(); } extern "C" { - pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); + pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; } extern "C" { - pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); + pub fn GDALRenameDataset( + arg1: GDALDriverH, + pszNewName: *const libc::c_char, + pszOldName: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; + pub fn GDALCopyDatasetFiles( + arg1: GDALDriverH, + pszNewName: *const libc::c_char, + pszOldName: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; + pub fn GDALValidateCreationOptions( + arg1: GDALDriverH, + papszCreationOptions: CSLConstList, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; + pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; } extern "C" { - pub fn GDALDatasetClearStatistics(hDS: GDALDatasetH); + pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; } -#[doc = " Type of functions to pass to GDALAddDerivedBandPixelFunc."] -#[doc = " @since GDAL 2.2"] -pub type GDALDerivedPixelFunc = ::std::option::Option< - unsafe extern "C" fn( - papoSources: *mut *mut libc::c_void, - nSources: libc::c_int, - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eSrcType: GDALDataType::Type, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type, ->; extern "C" { - pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; + pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetBlockSize( - arg1: GDALRasterBandH, - pnXSize: *mut libc::c_int, - pnYSize: *mut libc::c_int, - ); + pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; } -extern "C" { - pub fn GDALGetActualBlockSize( - arg1: GDALRasterBandH, - nXBlockOff: libc::c_int, - nYBlockOff: libc::c_int, - pnXValid: *mut libc::c_int, - pnYValid: *mut libc::c_int, - ) -> CPLErr::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDAL_GCP { + pub pszId: *mut libc::c_char, + pub pszInfo: *mut libc::c_char, + pub dfGCPPixel: f64, + pub dfGCPLine: f64, + pub dfGCPX: f64, + pub dfGCPY: f64, + pub dfGCPZ: f64, +} +#[test] +fn bindgen_test_layout_GDAL_GCP() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(GDAL_GCP)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDAL_GCP)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(pszId) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(pszInfo) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(dfGCPPixel) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(dfGCPLine) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(dfGCPX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(dfGCPY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDAL_GCP), + "::", + stringify!(dfGCPZ) + ) + ); } extern "C" { - pub fn GDALRasterAdviseRead( - hRB: GDALRasterBandH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); } extern "C" { - pub fn GDALRasterIO( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); } extern "C" { - pub fn GDALRasterIOEx( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; + pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; } extern "C" { - pub fn GDALReadBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGCPsToGeoTransform( + nGCPCount: libc::c_int, + pasGCPs: *const GDAL_GCP, + padfGeoTransform: *mut f64, + bApproxOK: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALWriteBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALInvGeoTransform( + padfGeoTransformIn: *mut f64, + padfInvGeoTransformOut: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALApplyGeoTransform( + arg1: *mut f64, + arg2: f64, + arg3: f64, + arg4: *mut f64, + arg5: *mut f64, + ); } extern "C" { - pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALComposeGeoTransforms( + padfGeoTransform1: *const f64, + padfGeoTransform2: *const f64, + padfGeoTransformOut: *mut f64, + ); } extern "C" { - pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; + pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALGetMetadata( + arg1: GDALMajorObjectH, + arg2: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; + pub fn GDALSetMetadata( + arg1: GDALMajorObjectH, + arg2: CSLConstList, + arg3: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; + pub fn GDALGetMetadataItem( + arg1: GDALMajorObjectH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALSetRasterColorInterpretation( - arg1: GDALRasterBandH, - arg2: GDALColorInterp::Type, + pub fn GDALSetMetadataItem( + arg1: GDALMajorObjectH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: *const libc::c_char, ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; + pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; } extern "C" { - pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; + pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); } extern "C" { - pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; } extern "C" { - pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; + pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; + pub fn GDALClose(arg1: GDALDatasetH); } extern "C" { - pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; + pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; + pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALDeleteRasterNoDataValue(arg1: GDALRasterBandH) -> CPLErr::Type; + pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; + pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; } extern "C" { - pub fn GDALSetRasterCategoryNames(arg1: GDALRasterBandH, arg2: CSLConstList) -> CPLErr::Type; + pub fn GDALAddBand( + hDS: GDALDatasetH, + eType: GDALDataType::Type, + papszOptions: CSLConstList, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn GDALBeginAsyncReader( + hDS: GDALDatasetH, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + pBuf: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nBandSpace: libc::c_int, + papszOptions: CSLConstList, + ) -> GDALAsyncReaderH; } extern "C" { - pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); } extern "C" { - pub fn GDALGetRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - bForce: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, + pub fn GDALDatasetRasterIO( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nBandSpace: libc::c_int, ) -> CPLErr::Type; } extern "C" { - pub fn GDALComputeRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, + pub fn GDALDatasetRasterIOEx( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + nPixelSpace: GSpacing, + nLineSpace: GSpacing, + nBandSpace: GSpacing, + psExtraArg: *mut GDALRasterIOExtraArg, ) -> CPLErr::Type; } extern "C" { - pub fn GDALSetRasterStatistics( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - dfMean: f64, - dfStdDev: f64, + pub fn GDALDatasetAdviseRead( + hDS: GDALDatasetH, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + papszOptions: CSLConstList, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRasterBandAsMDArray(arg1: GDALRasterBandH) -> GDALMDArrayH; + pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; + pub fn GDALGetSpatialRef(arg1: GDALDatasetH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALSetRasterUnitType( - hBand: GDALRasterBandH, - pszNewValue: *const libc::c_char, - ) -> CPLErr::Type; + pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; } extern "C" { - pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn GDALSetSpatialRef(arg1: GDALDatasetH, arg2: OGRSpatialReferenceH) -> CPLErr::Type; } extern "C" { - pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; + pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; } extern "C" { - pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; } extern "C" { - pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; + pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALComputeRasterMinMax( - hBand: GDALRasterBandH, - bApproxOK: libc::c_int, - adfMinMax: *mut f64, - ); + pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; } extern "C" { - pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; + pub fn GDALGetGCPSpatialRef(arg1: GDALDatasetH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALGetRasterHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; } extern "C" { - pub fn GDALGetRasterHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, + pub fn GDALSetGCPs( + arg1: GDALDatasetH, + arg2: libc::c_int, + arg3: *const GDAL_GCP, + arg4: *const libc::c_char, ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetDefaultHistogram( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut libc::c_int, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, + pub fn GDALSetGCPs2( + arg1: GDALDatasetH, + arg2: libc::c_int, + arg3: *const GDAL_GCP, + arg4: OGRSpatialReferenceH, ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetDefaultHistogramEx( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut GUIntBig, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetInternalHandle( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn GDALSetDefaultHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; +} +extern "C" { + pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; +} +extern "C" { + pub fn GDALReleaseDataset(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALSetDefaultHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, + pub fn GDALBuildOverviews( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + arg3: libc::c_int, + arg4: *mut libc::c_int, + arg5: libc::c_int, + arg6: *mut libc::c_int, + arg7: GDALProgressFunc, + arg8: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetRandomRasterSample( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: *mut f32, - ) -> libc::c_int; + pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); } extern "C" { - pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) - -> GDALRasterBandH; + pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; + pub fn GDALFlushCache(hDS: GDALDatasetH); } extern "C" { - pub fn GDALFillRaster( - hBand: GDALRasterBandH, - dfRealValue: f64, - dfImaginaryValue: f64, + pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; +} +extern "C" { + pub fn GDALDatasetCopyWholeRaster( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + papszOptions: CSLConstList, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALComputeBandStats( - hBand: GDALRasterBandH, - nSampleStep: libc::c_int, - pdfMean: *mut f64, - pdfStdDev: *mut f64, + pub fn GDALRasterBandCopyWholeRaster( + hSrcBand: GDALRasterBandH, + hDstBand: GDALRasterBandH, + constpapszOptions: *const *const libc::c_char, pfnProgress: GDALProgressFunc, pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALOverviewMagnitudeCorrection( - hBaseBand: GDALRasterBandH, + pub fn GDALRegenerateOverviews( + hSrcBand: GDALRasterBandH, nOverviewCount: libc::c_int, - pahOverviews: *mut GDALRasterBandH, + pahOverviewBands: *mut GDALRasterBandH, + pszResampling: *const libc::c_char, pfnProgress: GDALProgressFunc, pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; + pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn GDALSetDefaultRAT( - arg1: GDALRasterBandH, - arg2: GDALRasterAttributeTableH, - ) -> CPLErr::Type; + pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; } extern "C" { - pub fn GDALAddDerivedBandPixelFunc( - pszName: *const libc::c_char, - pfnPixelFunc: GDALDerivedPixelFunc, - ) -> CPLErr::Type; + pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; } extern "C" { - pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; + pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; + pub fn GDALDatasetCreateLayer( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + arg3: OGRSpatialReferenceH, + arg4: OGRwkbGeometryType::Type, + arg5: CSLConstList, + ) -> OGRLayerH; } extern "C" { - pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; + pub fn GDALDatasetCopyLayer( + arg1: GDALDatasetH, + arg2: OGRLayerH, + arg3: *const libc::c_char, + arg4: CSLConstList, + ) -> OGRLayerH; } extern "C" { - pub fn GDALGetDataCoverageStatus( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nMaskFlagStop: libc::c_int, - pdfDataPct: *mut f64, - ) -> libc::c_int; + pub fn GDALDatasetResetReading(arg1: GDALDatasetH); } extern "C" { - pub fn GDALARGetNextUpdatedRegion( - hARIO: GDALAsyncReaderH, - dfTimeout: f64, - pnXBufOff: *mut libc::c_int, - pnYBufOff: *mut libc::c_int, - pnXBufSize: *mut libc::c_int, - pnYBufSize: *mut libc::c_int, - ) -> GDALAsyncStatusType::Type; + pub fn GDALDatasetGetNextFeature( + hDS: GDALDatasetH, + phBelongingLayer: *mut OGRLayerH, + pdfProgressPct: *mut f64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> OGRFeatureH; } extern "C" { - pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; + pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); + pub fn GDALDatasetExecuteSQL( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + arg3: OGRGeometryH, + arg4: *const libc::c_char, + ) -> OGRLayerH; } extern "C" { - pub fn GDALGeneralCmdLineProcessor( - nArgc: libc::c_int, - ppapszArgv: *mut *mut *mut libc::c_char, - nOptions: libc::c_int, - ) -> libc::c_int; + pub fn GDALDatasetAbortSQL(arg1: GDALDatasetH) -> OGRErr::Type; } extern "C" { - pub fn GDALSwapWords( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: libc::c_int, - nWordSkip: libc::c_int, - ); + pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); } extern "C" { - pub fn GDALSwapWordsEx( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: size_t, - nWordSkip: libc::c_int, - ); + pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; } extern "C" { - pub fn GDALCopyWords( - pSrcData: *const libc::c_void, - eSrcType: GDALDataType::Type, - nSrcPixelOffset: libc::c_int, - pDstData: *mut libc::c_void, - eDstType: GDALDataType::Type, - nDstPixelOffset: libc::c_int, - nWordCount: libc::c_int, - ); + pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALCopyWords64( - pSrcData: *const libc::c_void, - eSrcType: GDALDataType::Type, - nSrcPixelOffset: libc::c_int, - pDstData: *mut libc::c_void, - eDstType: GDALDataType::Type, - nDstPixelOffset: libc::c_int, - nWordCount: GPtrDiff_t, - ); + pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALCopyBits( - pabySrcData: *const GByte, - nSrcOffset: libc::c_int, - nSrcStep: libc::c_int, - pabyDstData: *mut GByte, - nDstOffset: libc::c_int, - nDstStep: libc::c_int, - nBitCount: libc::c_int, - nStepCount: libc::c_int, - ); + pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; + pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; } extern "C" { - pub fn GDALReadWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; + pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; } extern "C" { - pub fn GDALWriteWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; + pub fn GDALDatasetClearStatistics(hDS: GDALDatasetH); +} +pub type GDALDerivedPixelFunc = ::std::option::Option< + unsafe extern "C" fn( + papoSources: *mut *mut libc::c_void, + nSources: libc::c_int, + pData: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eSrcType: GDALDataType::Type, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + ) -> CPLErr::Type, +>; +extern "C" { + pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; } extern "C" { - pub fn GDALLoadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALGetBlockSize( + arg1: GDALRasterBandH, + pnXSize: *mut libc::c_int, + pnYSize: *mut libc::c_int, + ); } extern "C" { - pub fn GDALReadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALGetActualBlockSize( + arg1: GDALRasterBandH, + nXBlockOff: libc::c_int, + nYBlockOff: libc::c_int, + pnXValid: *mut libc::c_int, + pnYValid: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALLoadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALRasterAdviseRead( + hRB: GDALRasterBandH, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + papszOptions: CSLConstList, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRasterIO( + hRBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALReadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn GDALRasterIOEx( + hRBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nPixelSpace: GSpacing, + nLineSpace: GSpacing, + psExtraArg: *mut GDALRasterIOExtraArg, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDecToDMS( - arg1: f64, - arg2: *const libc::c_char, + pub fn GDALReadBlock( + arg1: GDALRasterBandH, + arg2: libc::c_int, arg3: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn GDALPackedDMSToDec(arg1: f64) -> f64; + arg4: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALDecToPackedDMS(arg1: f64) -> f64; -} -#[doc = " Structure to store Rational Polynomial Coefficients / Rigorous Projection"] -#[doc = " Model. See http://geotiff.maptools.org/rpc_prop.html"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRPCInfo { - #[doc = "< Line offset"] - pub dfLINE_OFF: f64, - #[doc = "< Sample/Pixel offset"] - pub dfSAMP_OFF: f64, - #[doc = "< Latitude offset"] - pub dfLAT_OFF: f64, - #[doc = "< Longitude offset"] - pub dfLONG_OFF: f64, - #[doc = "< Height offset"] - pub dfHEIGHT_OFF: f64, - #[doc = "< Line scale"] - pub dfLINE_SCALE: f64, - #[doc = "< Sample/Pixel scale"] - pub dfSAMP_SCALE: f64, - #[doc = "< Latitude scale"] - pub dfLAT_SCALE: f64, - #[doc = "< Longitude scale"] - pub dfLONG_SCALE: f64, - #[doc = "< Height scale"] - pub dfHEIGHT_SCALE: f64, - #[doc = "< Line Numerator Coefficients"] - pub adfLINE_NUM_COEFF: [f64; 20usize], - #[doc = "< Line Denominator Coefficients"] - pub adfLINE_DEN_COEFF: [f64; 20usize], - #[doc = "< Sample/Pixel Numerator Coefficients"] - pub adfSAMP_NUM_COEFF: [f64; 20usize], - #[doc = "< Sample/Pixel Denominator Coefficients"] - pub adfSAMP_DEN_COEFF: [f64; 20usize], - #[doc = "< Minimum longitude"] - pub dfMIN_LONG: f64, - #[doc = "< Minimum latitude"] - pub dfMIN_LAT: f64, - #[doc = "< Maximum longitude"] - pub dfMAX_LONG: f64, - #[doc = "< Maximum latitude"] - pub dfMAX_LAT: f64, -} -#[test] -fn bindgen_test_layout_GDALRPCInfo() { - assert_eq!( - ::std::mem::size_of::(), - 752usize, - concat!("Size of: ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LAT) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, - 744usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LAT) - ) - ); + pub fn GDALWriteBlock( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALExtractRPCInfo(arg1: CSLConstList, arg2: *mut GDALRPCInfo) -> libc::c_int; + pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; } -#[doc = " Color tuple"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALColorEntry { - #[doc = " gray, red, cyan or hue"] - pub c1: libc::c_short, - #[doc = " green, magenta, or lightness"] - pub c2: libc::c_short, - #[doc = " blue, yellow, or saturation"] - pub c3: libc::c_short, - #[doc = " alpha or blackband"] - pub c4: libc::c_short, +extern "C" { + pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; } -#[test] -fn bindgen_test_layout_GDALColorEntry() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(GDALColorEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(GDALColorEntry)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c4) - ) - ); +extern "C" { + pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; } extern "C" { - pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; + pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALDestroyColorTable(arg1: GDALColorTableH); + pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; } extern "C" { - pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; + pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; } extern "C" { - pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; + pub fn GDALSetRasterColorInterpretation( + arg1: GDALRasterBandH, + arg2: GDALColorInterp::Type, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; + pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; } extern "C" { - pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; + pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; } extern "C" { - pub fn GDALGetColorEntryAsRGB( - arg1: GDALColorTableH, - arg2: libc::c_int, - arg3: *mut GDALColorEntry, - ) -> libc::c_int; + pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); + pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALCreateColorRamp( - hTable: GDALColorTableH, - nStartIndex: libc::c_int, - psStartColor: *const GDALColorEntry, - nEndIndex: libc::c_int, - psEndColor: *const GDALColorEntry, - ); + pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; } -pub mod GDALRATFieldType { - #[doc = " Field type of raster attribute table"] - pub type Type = libc::c_uint; - #[doc = " Integer field"] - pub const GFT_Integer: Type = 0; - #[doc = " Floating point (double) field"] - pub const GFT_Real: Type = 1; - #[doc = " String field"] - pub const GFT_String: Type = 2; +extern "C" { + pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; } -pub mod GDALRATFieldUsage { - #[doc = " Field usage of raster attribute table"] - pub type Type = libc::c_uint; - #[doc = " General purpose field."] - pub const GFU_Generic: Type = 0; - #[doc = " Histogram pixel count"] - pub const GFU_PixelCount: Type = 1; - #[doc = " Class name"] - pub const GFU_Name: Type = 2; - #[doc = " Class range minimum"] - pub const GFU_Min: Type = 3; - #[doc = " Class range maximum"] - pub const GFU_Max: Type = 4; - #[doc = " Class value (min=max)"] - pub const GFU_MinMax: Type = 5; - #[doc = " Red class color (0-255)"] - pub const GFU_Red: Type = 6; - #[doc = " Green class color (0-255)"] - pub const GFU_Green: Type = 7; - #[doc = " Blue class color (0-255)"] - pub const GFU_Blue: Type = 8; - #[doc = " Alpha (0=transparent,255=opaque)"] - pub const GFU_Alpha: Type = 9; - #[doc = " Color Range Red Minimum"] - pub const GFU_RedMin: Type = 10; - #[doc = " Color Range Green Minimum"] - pub const GFU_GreenMin: Type = 11; - #[doc = " Color Range Blue Minimum"] - pub const GFU_BlueMin: Type = 12; - #[doc = " Color Range Alpha Minimum"] - pub const GFU_AlphaMin: Type = 13; - #[doc = " Color Range Red Maximum"] - pub const GFU_RedMax: Type = 14; - #[doc = " Color Range Green Maximum"] - pub const GFU_GreenMax: Type = 15; - #[doc = " Color Range Blue Maximum"] - pub const GFU_BlueMax: Type = 16; - #[doc = " Color Range Alpha Maximum"] - pub const GFU_AlphaMax: Type = 17; - #[doc = " Maximum GFU value (equals to GFU_AlphaMax+1 currently)"] - pub const GFU_MaxCount: Type = 18; +extern "C" { + pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; } -pub mod GDALRATTableType { - #[doc = " RAT table type (thematic or athematic)"] - #[doc = " @since GDAL 2.4"] - pub type Type = libc::c_uint; - #[doc = " Thematic table type"] - pub const GRTT_THEMATIC: Type = 0; - #[doc = " Athematic table type"] - pub const GRTT_ATHEMATIC: Type = 1; +extern "C" { + pub fn GDALDeleteRasterNoDataValue(arg1: GDALRasterBandH) -> CPLErr::Type; } extern "C" { - pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; + pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); + pub fn GDALSetRasterCategoryNames(arg1: GDALRasterBandH, arg2: CSLConstList) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; + pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALRATGetNameOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> *const libc::c_char; + pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALRATGetUsageOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldUsage::Type; + pub fn GDALGetRasterStatistics( + arg1: GDALRasterBandH, + bApproxOK: libc::c_int, + bForce: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetTypeOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldType::Type; + pub fn GDALComputeRasterStatistics( + arg1: GDALRasterBandH, + bApproxOK: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetColOfUsage( - arg1: GDALRasterAttributeTableH, - arg2: GDALRATFieldUsage::Type, - ) -> libc::c_int; + pub fn GDALSetRasterStatistics( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + dfMean: f64, + dfStdDev: f64, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; + pub fn GDALRasterBandAsMDArray(arg1: GDALRasterBandH) -> GDALMDArrayH; } extern "C" { - pub fn GDALRATGetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> *const libc::c_char; + pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; } extern "C" { - pub fn GDALRATGetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> libc::c_int; + pub fn GDALSetRasterUnitType( + hBand: GDALRasterBandH, + pszNewValue: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> f64; + pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALRATSetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_char, - ); + pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; } extern "C" { - pub fn GDALRATSetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, + pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; +} +extern "C" { + pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; +} +extern "C" { + pub fn GDALComputeRasterMinMax( + hBand: GDALRasterBandH, + bApproxOK: libc::c_int, + adfMinMax: *mut f64, ); } extern "C" { - pub fn GDALRATSetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: f64, - ); + pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRasterHistogram( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut libc::c_int, + bIncludeOutOfRange: libc::c_int, + bApproxOK: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRasterHistogramEx( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut GUIntBig, + bIncludeOutOfRange: libc::c_int, + bApproxOK: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetDefaultHistogram( + hBand: GDALRasterBandH, + pdfMin: *mut f64, + pdfMax: *mut f64, + pnBuckets: *mut libc::c_int, + ppanHistogram: *mut *mut libc::c_int, + bForce: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; + pub fn GDALGetDefaultHistogramEx( + hBand: GDALRasterBandH, + pdfMin: *mut f64, + pdfMax: *mut f64, + pnBuckets: *mut libc::c_int, + ppanHistogram: *mut *mut GUIntBig, + bForce: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATValuesIOAsDouble( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pdfData: *mut f64, + pub fn GDALSetDefaultHistogram( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut libc::c_int, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATValuesIOAsInteger( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pnData: *mut libc::c_int, + pub fn GDALSetDefaultHistogramEx( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut GUIntBig, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATValuesIOAsString( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - papszStrList: CSLConstList, - ) -> CPLErr::Type; + pub fn GDALGetRandomRasterSample( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: *mut f32, + ) -> libc::c_int; } extern "C" { - pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); + pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) + -> GDALRasterBandH; } extern "C" { - pub fn GDALRATCreateColumn( - arg1: GDALRasterAttributeTableH, - arg2: *const libc::c_char, - arg3: GDALRATFieldType::Type, - arg4: GDALRATFieldUsage::Type, - ) -> CPLErr::Type; + pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; } extern "C" { - pub fn GDALRATSetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: f64, - arg3: f64, + pub fn GDALFillRaster( + hBand: GDALRasterBandH, + dfRealValue: f64, + dfImaginaryValue: f64, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: *mut f64, - arg3: *mut f64, - ) -> libc::c_int; + pub fn GDALComputeBandStats( + hBand: GDALRasterBandH, + nSampleStep: libc::c_int, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATSetTableType( - hRAT: GDALRasterAttributeTableH, - eInTableType: GDALRATTableType::Type, + pub fn GDALOverviewMagnitudeCorrection( + hBaseBand: GDALRasterBandH, + nOverviewCount: libc::c_int, + pahOverviews: *mut GDALRasterBandH, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetTableType(hRAT: GDALRasterAttributeTableH) -> GDALRATTableType::Type; + pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; } extern "C" { - pub fn GDALRATInitializeFromColorTable( - arg1: GDALRasterAttributeTableH, - arg2: GDALColorTableH, + pub fn GDALSetDefaultRAT( + arg1: GDALRasterBandH, + arg2: GDALRasterAttributeTableH, ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATTranslateToColorTable( - arg1: GDALRasterAttributeTableH, - nEntryCount: libc::c_int, - ) -> GDALColorTableH; + pub fn GDALAddDerivedBandPixelFunc( + pszName: *const libc::c_char, + pfnPixelFunc: GDALDerivedPixelFunc, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); + pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; } extern "C" { - pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; + pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; } extern "C" { - pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; + pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; } extern "C" { - pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; + pub fn GDALGetDataCoverageStatus( + hBand: GDALRasterBandH, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nMaskFlagStop: libc::c_int, + pdfDataPct: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn GDALRATRemoveStatistics(arg1: GDALRasterAttributeTableH); + pub fn GDALARGetNextUpdatedRegion( + hARIO: GDALAsyncReaderH, + dfTimeout: f64, + pnXBufOff: *mut libc::c_int, + pnYBufOff: *mut libc::c_int, + pnXBufSize: *mut libc::c_int, + pnYBufSize: *mut libc::c_int, + ) -> GDALAsyncStatusType::Type; } extern "C" { - pub fn GDALSetCacheMax(nBytes: libc::c_int); + pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; } extern "C" { - pub fn GDALGetCacheMax() -> libc::c_int; + pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); } extern "C" { - pub fn GDALGetCacheUsed() -> libc::c_int; + pub fn GDALGeneralCmdLineProcessor( + nArgc: libc::c_int, + ppapszArgv: *mut *mut *mut libc::c_char, + nOptions: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALSetCacheMax64(nBytes: GIntBig); + pub fn GDALSwapWords( + pData: *mut libc::c_void, + nWordSize: libc::c_int, + nWordCount: libc::c_int, + nWordSkip: libc::c_int, + ); } extern "C" { - pub fn GDALGetCacheMax64() -> GIntBig; + pub fn GDALSwapWordsEx( + pData: *mut libc::c_void, + nWordSize: libc::c_int, + nWordCount: usize, + nWordSkip: libc::c_int, + ); } extern "C" { - pub fn GDALGetCacheUsed64() -> GIntBig; + pub fn GDALCopyWords( + pSrcData: *const libc::c_void, + eSrcType: GDALDataType::Type, + nSrcPixelOffset: libc::c_int, + pDstData: *mut libc::c_void, + eDstType: GDALDataType::Type, + nDstPixelOffset: libc::c_int, + nWordCount: libc::c_int, + ); } extern "C" { - pub fn GDALFlushCacheBlock() -> libc::c_int; + pub fn GDALCopyWords64( + pSrcData: *const libc::c_void, + eSrcType: GDALDataType::Type, + nSrcPixelOffset: libc::c_int, + pDstData: *mut libc::c_void, + eDstType: GDALDataType::Type, + nDstPixelOffset: libc::c_int, + nWordCount: GPtrDiff_t, + ); } extern "C" { - pub fn GDALDatasetGetVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nBandSpace: GIntBig, - nCacheSize: size_t, - nPageSizeHint: size_t, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn GDALCopyBits( + pabySrcData: *const GByte, + nSrcOffset: libc::c_int, + nSrcStep: libc::c_int, + pabyDstData: *mut GByte, + nDstOffset: libc::c_int, + nDstStep: libc::c_int, + nBitCount: libc::c_int, + nStepCount: libc::c_int, + ); } extern "C" { - pub fn GDALRasterBandGetVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nCacheSize: size_t, - nPageSizeHint: size_t, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; } extern "C" { - pub fn GDALGetVirtualMemAuto( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - pnPixelSpace: *mut libc::c_int, - pnLineSpace: *mut GIntBig, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn GDALReadWorldFile( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> libc::c_int; } -pub mod GDALTileOrganization { - #[doc = " Enumeration to describe the tile organization"] - pub type Type = libc::c_uint; - #[doc = " Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ..."] - pub const GTO_TIP: Type = 0; - #[doc = " Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ..."] - pub const GTO_BIT: Type = 1; - #[doc = " Band SeQuential : all the tiles of first band, all the tiles of following band..."] - pub const GTO_BSQ: Type = 2; +extern "C" { + pub fn GDALWriteWorldFile( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn GDALDatasetGetTiledVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - eTileOrganization: GDALTileOrganization::Type, - nCacheSize: size_t, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn GDALLoadTabFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; } extern "C" { - pub fn GDALRasterBandGetTiledVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nCacheSize: size_t, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn GDALReadTabFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; } extern "C" { - pub fn GDALCreatePansharpenedVRT( - pszXML: *const libc::c_char, - hPanchroBand: GDALRasterBandH, - nInputSpectralBands: libc::c_int, - pahInputSpectralBands: *mut GDALRasterBandH, - ) -> GDALDatasetH; + pub fn GDALLoadOziMapFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetJPEG2000Structure( - pszFilename: *const libc::c_char, - papszOptions: CSLConstList, - ) -> *mut CPLXMLNode; + pub fn GDALReadOziMapFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; } extern "C" { - pub fn GDALCreateMultiDimensional( - hDriver: GDALDriverH, - pszName: *const libc::c_char, - papszRootGroupOptions: CSLConstList, - papszOptions: CSLConstList, - ) -> GDALDatasetH; + pub fn GDALDecToDMS( + arg1: f64, + arg2: *const libc::c_char, + arg3: libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALExtendedDataTypeCreate(eType: GDALDataType::Type) -> GDALExtendedDataTypeH; + pub fn GDALPackedDMSToDec(arg1: f64) -> f64; } extern "C" { - pub fn GDALExtendedDataTypeCreateString(nMaxStringLength: size_t) -> GDALExtendedDataTypeH; + pub fn GDALDecToPackedDMS(arg1: f64) -> f64; } -extern "C" { - pub fn GDALExtendedDataTypeCreateCompound( - pszName: *const libc::c_char, - nTotalSize: size_t, - nComponents: size_t, - comps: *const GDALEDTComponentH, - ) -> GDALExtendedDataTypeH; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRPCInfo { + pub dfLINE_OFF: f64, + pub dfSAMP_OFF: f64, + pub dfLAT_OFF: f64, + pub dfLONG_OFF: f64, + pub dfHEIGHT_OFF: f64, + pub dfLINE_SCALE: f64, + pub dfSAMP_SCALE: f64, + pub dfLAT_SCALE: f64, + pub dfLONG_SCALE: f64, + pub dfHEIGHT_SCALE: f64, + pub adfLINE_NUM_COEFF: [f64; 20usize], + pub adfLINE_DEN_COEFF: [f64; 20usize], + pub adfSAMP_NUM_COEFF: [f64; 20usize], + pub adfSAMP_DEN_COEFF: [f64; 20usize], + pub dfMIN_LONG: f64, + pub dfMIN_LAT: f64, + pub dfMAX_LONG: f64, + pub dfMAX_LAT: f64, +} +#[test] +fn bindgen_test_layout_GDALRPCInfo() { + assert_eq!( + ::std::mem::size_of::(), + 752usize, + concat!("Size of: ", stringify!(GDALRPCInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALRPCInfo)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLINE_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfSAMP_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLAT_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLONG_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfHEIGHT_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLINE_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfSAMP_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLAT_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfLONG_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfHEIGHT_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(adfLINE_NUM_COEFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, + 240usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(adfLINE_DEN_COEFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, + 400usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(adfSAMP_NUM_COEFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, + 560usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(adfSAMP_DEN_COEFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, + 720usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMIN_LONG) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, + 728usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMIN_LAT) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, + 736usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMAX_LONG) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, + 744usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfo), + "::", + stringify!(dfMAX_LAT) + ) + ); } extern "C" { - pub fn GDALExtendedDataTypeRelease(hEDT: GDALExtendedDataTypeH); + pub fn GDALExtractRPCInfo(arg1: CSLConstList, arg2: *mut GDALRPCInfo) -> libc::c_int; } -extern "C" { - pub fn GDALExtendedDataTypeGetName(hEDT: GDALExtendedDataTypeH) -> *const libc::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALColorEntry { + pub c1: libc::c_short, + pub c2: libc::c_short, + pub c3: libc::c_short, + pub c4: libc::c_short, } -extern "C" { - pub fn GDALExtendedDataTypeGetClass( - hEDT: GDALExtendedDataTypeH, - ) -> GDALExtendedDataTypeClass::Type; +#[test] +fn bindgen_test_layout_GDALColorEntry() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(GDALColorEntry)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(GDALColorEntry)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALColorEntry), + "::", + stringify!(c1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(GDALColorEntry), + "::", + stringify!(c2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(GDALColorEntry), + "::", + stringify!(c3) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(GDALColorEntry), + "::", + stringify!(c4) + ) + ); } extern "C" { - pub fn GDALExtendedDataTypeGetNumericDataType( - hEDT: GDALExtendedDataTypeH, - ) -> GDALDataType::Type; + pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; } extern "C" { - pub fn GDALExtendedDataTypeGetSize(hEDT: GDALExtendedDataTypeH) -> size_t; + pub fn GDALDestroyColorTable(arg1: GDALColorTableH); } extern "C" { - pub fn GDALExtendedDataTypeGetMaxStringLength(hEDT: GDALExtendedDataTypeH) -> size_t; + pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; } extern "C" { - pub fn GDALExtendedDataTypeGetComponents( - hEDT: GDALExtendedDataTypeH, - pnCount: *mut size_t, - ) -> *mut GDALEDTComponentH; + pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; } extern "C" { - pub fn GDALExtendedDataTypeFreeComponents(components: *mut GDALEDTComponentH, nCount: size_t); + pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; } extern "C" { - pub fn GDALExtendedDataTypeCanConvertTo( - hSourceEDT: GDALExtendedDataTypeH, - hTargetEDT: GDALExtendedDataTypeH, - ) -> libc::c_int; + pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; } extern "C" { - pub fn GDALExtendedDataTypeEquals( - hFirstEDT: GDALExtendedDataTypeH, - hSecondEDT: GDALExtendedDataTypeH, + pub fn GDALGetColorEntryAsRGB( + arg1: GDALColorTableH, + arg2: libc::c_int, + arg3: *mut GDALColorEntry, ) -> libc::c_int; } extern "C" { - pub fn GDALEDTComponentCreate( - pszName: *const libc::c_char, - nOffset: size_t, - hType: GDALExtendedDataTypeH, - ) -> GDALEDTComponentH; -} -extern "C" { - pub fn GDALEDTComponentRelease(hComp: GDALEDTComponentH); -} -extern "C" { - pub fn GDALEDTComponentGetName(hComp: GDALEDTComponentH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALEDTComponentGetOffset(hComp: GDALEDTComponentH) -> size_t; -} -extern "C" { - pub fn GDALEDTComponentGetType(hComp: GDALEDTComponentH) -> GDALExtendedDataTypeH; -} -extern "C" { - pub fn GDALDatasetGetRootGroup(hDS: GDALDatasetH) -> GDALGroupH; -} -extern "C" { - pub fn GDALGroupRelease(hGroup: GDALGroupH); -} -extern "C" { - pub fn GDALGroupGetName(hGroup: GDALGroupH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGroupGetFullName(hGroup: GDALGroupH) -> *const libc::c_char; -} -extern "C" { - pub fn GDALGroupGetMDArrayNames( - hGroup: GDALGroupH, - papszOptions: CSLConstList, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALGroupOpenMDArray( - hGroup: GDALGroupH, - pszMDArrayName: *const libc::c_char, - papszOptions: CSLConstList, - ) -> GDALMDArrayH; -} -extern "C" { - pub fn GDALGroupOpenMDArrayFromFullname( - hGroup: GDALGroupH, - pszMDArrayName: *const libc::c_char, - papszOptions: CSLConstList, - ) -> GDALMDArrayH; -} -extern "C" { - pub fn GDALGroupResolveMDArray( - hGroup: GDALGroupH, - pszName: *const libc::c_char, - pszStartingPoint: *const libc::c_char, - papszOptions: CSLConstList, - ) -> GDALMDArrayH; -} -extern "C" { - pub fn GDALGroupGetGroupNames( - hGroup: GDALGroupH, - papszOptions: CSLConstList, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn GDALGroupOpenGroup( - hGroup: GDALGroupH, - pszSubGroupName: *const libc::c_char, - papszOptions: CSLConstList, - ) -> GDALGroupH; -} -extern "C" { - pub fn GDALGroupOpenGroupFromFullname( - hGroup: GDALGroupH, - pszMDArrayName: *const libc::c_char, - papszOptions: CSLConstList, - ) -> GDALGroupH; -} -extern "C" { - pub fn GDALGroupGetDimensions( - hGroup: GDALGroupH, - pnCount: *mut size_t, - papszOptions: CSLConstList, - ) -> *mut GDALDimensionH; -} -extern "C" { - pub fn GDALGroupGetAttribute( - hGroup: GDALGroupH, - pszName: *const libc::c_char, - ) -> GDALAttributeH; -} -extern "C" { - pub fn GDALGroupGetAttributes( - hGroup: GDALGroupH, - pnCount: *mut size_t, - papszOptions: CSLConstList, - ) -> *mut GDALAttributeH; -} -extern "C" { - pub fn GDALGroupGetStructuralInfo(hGroup: GDALGroupH) -> CSLConstList; + pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); } extern "C" { - pub fn GDALGroupCreateGroup( - hGroup: GDALGroupH, - pszSubGroupName: *const libc::c_char, - papszOptions: CSLConstList, - ) -> GDALGroupH; + pub fn GDALCreateColorRamp( + hTable: GDALColorTableH, + nStartIndex: libc::c_int, + psStartColor: *const GDALColorEntry, + nEndIndex: libc::c_int, + psEndColor: *const GDALColorEntry, + ); } -extern "C" { - pub fn GDALGroupCreateDimension( - hGroup: GDALGroupH, - pszName: *const libc::c_char, - pszType: *const libc::c_char, - pszDirection: *const libc::c_char, - nSize: GUInt64, - papszOptions: CSLConstList, - ) -> GDALDimensionH; +pub mod GDALRATFieldType { + pub type Type = libc::c_uint; + pub const GFT_Integer: Type = 0; + pub const GFT_Real: Type = 1; + pub const GFT_String: Type = 2; } -extern "C" { - pub fn GDALGroupCreateMDArray( - hGroup: GDALGroupH, - pszName: *const libc::c_char, - nDimensions: size_t, - pahDimensions: *mut GDALDimensionH, - hEDT: GDALExtendedDataTypeH, - papszOptions: CSLConstList, - ) -> GDALMDArrayH; +pub mod GDALRATFieldUsage { + pub type Type = libc::c_uint; + pub const GFU_Generic: Type = 0; + pub const GFU_PixelCount: Type = 1; + pub const GFU_Name: Type = 2; + pub const GFU_Min: Type = 3; + pub const GFU_Max: Type = 4; + pub const GFU_MinMax: Type = 5; + pub const GFU_Red: Type = 6; + pub const GFU_Green: Type = 7; + pub const GFU_Blue: Type = 8; + pub const GFU_Alpha: Type = 9; + pub const GFU_RedMin: Type = 10; + pub const GFU_GreenMin: Type = 11; + pub const GFU_BlueMin: Type = 12; + pub const GFU_AlphaMin: Type = 13; + pub const GFU_RedMax: Type = 14; + pub const GFU_GreenMax: Type = 15; + pub const GFU_BlueMax: Type = 16; + pub const GFU_AlphaMax: Type = 17; + pub const GFU_MaxCount: Type = 18; } -extern "C" { - pub fn GDALGroupCreateAttribute( - hGroup: GDALGroupH, - pszName: *const libc::c_char, - nDimensions: size_t, - panDimensions: *const GUInt64, - hEDT: GDALExtendedDataTypeH, - papszOptions: CSLConstList, - ) -> GDALAttributeH; +pub mod GDALRATTableType { + pub type Type = libc::c_uint; + pub const GRTT_THEMATIC: Type = 0; + pub const GRTT_ATHEMATIC: Type = 1; } extern "C" { - pub fn GDALMDArrayRelease(hMDArray: GDALMDArrayH); + pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; } extern "C" { - pub fn GDALMDArrayGetName(hArray: GDALMDArrayH) -> *const libc::c_char; + pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); } extern "C" { - pub fn GDALMDArrayGetFullName(hArray: GDALMDArrayH) -> *const libc::c_char; + pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn GDALMDArrayGetTotalElementsCount(hArray: GDALMDArrayH) -> GUInt64; + pub fn GDALRATGetNameOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALMDArrayGetDimensionCount(hArray: GDALMDArrayH) -> size_t; + pub fn GDALRATGetUsageOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> GDALRATFieldUsage::Type; } extern "C" { - pub fn GDALMDArrayGetDimensions( - hArray: GDALMDArrayH, - pnCount: *mut size_t, - ) -> *mut GDALDimensionH; + pub fn GDALRATGetTypeOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> GDALRATFieldType::Type; } extern "C" { - pub fn GDALMDArrayGetDataType(hArray: GDALMDArrayH) -> GDALExtendedDataTypeH; + pub fn GDALRATGetColOfUsage( + arg1: GDALRasterAttributeTableH, + arg2: GDALRATFieldUsage::Type, + ) -> libc::c_int; } extern "C" { - pub fn GDALMDArrayRead( - hArray: GDALMDArrayH, - arrayStartIdx: *const GUInt64, - count: *const size_t, - arrayStep: *const GInt64, - bufferStride: *const GPtrDiff_t, - bufferDatatype: GDALExtendedDataTypeH, - pDstBuffer: *mut libc::c_void, - pDstBufferAllocStart: *const libc::c_void, - nDstBufferllocSize: size_t, - ) -> libc::c_int; + pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn GDALMDArrayWrite( - hArray: GDALMDArrayH, - arrayStartIdx: *const GUInt64, - count: *const size_t, - arrayStep: *const GInt64, - bufferStride: *const GPtrDiff_t, - bufferDatatype: GDALExtendedDataTypeH, - pSrcBuffer: *const libc::c_void, - psrcBufferAllocStart: *const libc::c_void, - nSrcBufferllocSize: size_t, - ) -> libc::c_int; + pub fn GDALRATGetValueAsString( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALMDArrayAdviseRead( - hArray: GDALMDArrayH, - arrayStartIdx: *const GUInt64, - count: *const size_t, + pub fn GDALRATGetValueAsInt( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, ) -> libc::c_int; } extern "C" { - pub fn GDALMDArrayGetAttribute( - hArray: GDALMDArrayH, - pszName: *const libc::c_char, - ) -> GDALAttributeH; + pub fn GDALRATGetValueAsDouble( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + ) -> f64; } extern "C" { - pub fn GDALMDArrayGetAttributes( - hArray: GDALMDArrayH, - pnCount: *mut size_t, - papszOptions: CSLConstList, - ) -> *mut GDALAttributeH; + pub fn GDALRATSetValueAsString( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const libc::c_char, + ); } extern "C" { - pub fn GDALMDArrayCreateAttribute( - hArray: GDALMDArrayH, - pszName: *const libc::c_char, - nDimensions: size_t, - panDimensions: *const GUInt64, - hEDT: GDALExtendedDataTypeH, - papszOptions: CSLConstList, - ) -> GDALAttributeH; + pub fn GDALRATSetValueAsInt( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + ); } extern "C" { - pub fn GDALMDArrayGetRawNoDataValue(hArray: GDALMDArrayH) -> *const libc::c_void; + pub fn GDALRATSetValueAsDouble( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: f64, + ); } extern "C" { - pub fn GDALMDArrayGetNoDataValueAsDouble( - hArray: GDALMDArrayH, - pbHasNoDataValue: *mut libc::c_int, - ) -> f64; + pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn GDALMDArraySetRawNoDataValue( - hArray: GDALMDArrayH, - arg1: *const libc::c_void, - ) -> libc::c_int; + pub fn GDALRATValuesIOAsDouble( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + pdfData: *mut f64, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALMDArraySetNoDataValueAsDouble( - hArray: GDALMDArrayH, - dfNoDataValue: f64, - ) -> libc::c_int; + pub fn GDALRATValuesIOAsInteger( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + pnData: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALMDArraySetScale(hArray: GDALMDArrayH, dfScale: f64) -> libc::c_int; + pub fn GDALRATValuesIOAsString( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + papszStrList: CSLConstList, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALMDArrayGetScale(hArray: GDALMDArrayH, pbHasValue: *mut libc::c_int) -> f64; + pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); } extern "C" { - pub fn GDALMDArraySetOffset(hArray: GDALMDArrayH, dfOffset: f64) -> libc::c_int; + pub fn GDALRATCreateColumn( + arg1: GDALRasterAttributeTableH, + arg2: *const libc::c_char, + arg3: GDALRATFieldType::Type, + arg4: GDALRATFieldUsage::Type, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALMDArrayGetOffset(hArray: GDALMDArrayH, pbHasValue: *mut libc::c_int) -> f64; + pub fn GDALRATSetLinearBinning( + arg1: GDALRasterAttributeTableH, + arg2: f64, + arg3: f64, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALMDArrayGetBlockSize(hArray: GDALMDArrayH, pnCount: *mut size_t) -> *mut GUInt64; + pub fn GDALRATGetLinearBinning( + arg1: GDALRasterAttributeTableH, + arg2: *mut f64, + arg3: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn GDALMDArraySetUnit(hArray: GDALMDArrayH, arg1: *const libc::c_char) -> libc::c_int; + pub fn GDALRATSetTableType( + hRAT: GDALRasterAttributeTableH, + eInTableType: GDALRATTableType::Type, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALMDArrayGetUnit(hArray: GDALMDArrayH) -> *const libc::c_char; + pub fn GDALRATGetTableType(hRAT: GDALRasterAttributeTableH) -> GDALRATTableType::Type; } extern "C" { - pub fn GDALMDArraySetSpatialRef(arg1: GDALMDArrayH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALRATInitializeFromColorTable( + arg1: GDALRasterAttributeTableH, + arg2: GDALColorTableH, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALMDArrayGetSpatialRef(hArray: GDALMDArrayH) -> OGRSpatialReferenceH; + pub fn GDALRATTranslateToColorTable( + arg1: GDALRasterAttributeTableH, + nEntryCount: libc::c_int, + ) -> GDALColorTableH; } extern "C" { - pub fn GDALMDArrayGetProcessingChunkSize( - hArray: GDALMDArrayH, - pnCount: *mut size_t, - nMaxChunkMemory: size_t, - ) -> *mut size_t; + pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); } extern "C" { - pub fn GDALMDArrayGetStructuralInfo(hArray: GDALMDArrayH) -> CSLConstList; + pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; } extern "C" { - pub fn GDALMDArrayGetView( - hArray: GDALMDArrayH, - pszViewExpr: *const libc::c_char, - ) -> GDALMDArrayH; + pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; } extern "C" { - pub fn GDALMDArrayTranspose( - hArray: GDALMDArrayH, - nNewAxisCount: size_t, - panMapNewAxisToOldAxis: *const libc::c_int, - ) -> GDALMDArrayH; + pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; } extern "C" { - pub fn GDALMDArrayGetUnscaled(hArray: GDALMDArrayH) -> GDALMDArrayH; + pub fn GDALRATRemoveStatistics(arg1: GDALRasterAttributeTableH); } extern "C" { - pub fn GDALMDArrayGetMask(hArray: GDALMDArrayH, papszOptions: CSLConstList) -> GDALMDArrayH; + pub fn GDALSetCacheMax(nBytes: libc::c_int); } extern "C" { - pub fn GDALMDArrayAsClassicDataset( - hArray: GDALMDArrayH, - iXDim: size_t, - iYDim: size_t, - ) -> GDALDatasetH; + pub fn GDALGetCacheMax() -> libc::c_int; } extern "C" { - pub fn GDALMDArrayGetStatistics( - hArray: GDALMDArrayH, - arg1: GDALDatasetH, - bApproxOK: libc::c_int, - bForce: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pnValidCount: *mut GUInt64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetCacheUsed() -> libc::c_int; +} +extern "C" { + pub fn GDALSetCacheMax64(nBytes: GIntBig); } extern "C" { - pub fn GDALMDArrayComputeStatistics( - hArray: GDALMDArrayH, - arg1: GDALDatasetH, - bApproxOK: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pnValidCount: *mut GUInt64, - arg2: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> libc::c_int; + pub fn GDALGetCacheMax64() -> GIntBig; } extern "C" { - pub fn GDALAttributeRelease(hAttr: GDALAttributeH); + pub fn GDALGetCacheUsed64() -> GIntBig; } extern "C" { - pub fn GDALReleaseAttributes(attributes: *mut GDALAttributeH, nCount: size_t); + pub fn GDALFlushCacheBlock() -> libc::c_int; } extern "C" { - pub fn GDALAttributeGetName(hAttr: GDALAttributeH) -> *const libc::c_char; + pub fn GDALDatasetGetVirtualMem( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: GIntBig, + nBandSpace: GIntBig, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALAttributeGetFullName(hAttr: GDALAttributeH) -> *const libc::c_char; + pub fn GDALRasterBandGetVirtualMem( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: GIntBig, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALAttributeGetTotalElementsCount(hAttr: GDALAttributeH) -> GUInt64; + pub fn GDALGetVirtualMemAuto( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + pnPixelSpace: *mut libc::c_int, + pnLineSpace: *mut GIntBig, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; +} +pub mod GDALTileOrganization { + pub type Type = libc::c_uint; + pub const GTO_TIP: Type = 0; + pub const GTO_BIT: Type = 1; + pub const GTO_BSQ: Type = 2; } extern "C" { - pub fn GDALAttributeGetDimensionCount(hAttr: GDALAttributeH) -> size_t; + pub fn GDALDatasetGetTiledVirtualMem( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nTileXSize: libc::c_int, + nTileYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + eTileOrganization: GDALTileOrganization::Type, + nCacheSize: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALAttributeGetDimensionsSize( - hAttr: GDALAttributeH, - pnCount: *mut size_t, - ) -> *mut GUInt64; + pub fn GDALRasterBandGetTiledVirtualMem( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nTileXSize: libc::c_int, + nTileYSize: libc::c_int, + eBufType: GDALDataType::Type, + nCacheSize: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn GDALAttributeGetDataType(hAttr: GDALAttributeH) -> GDALExtendedDataTypeH; + pub fn GDALCreatePansharpenedVRT( + pszXML: *const libc::c_char, + hPanchroBand: GDALRasterBandH, + nInputSpectralBands: libc::c_int, + pahInputSpectralBands: *mut GDALRasterBandH, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALAttributeReadAsRaw(hAttr: GDALAttributeH, pnSize: *mut size_t) -> *mut GByte; + pub fn GDALGetJPEG2000Structure( + pszFilename: *const libc::c_char, + papszOptions: CSLConstList, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn GDALAttributeFreeRawResult(hAttr: GDALAttributeH, raw: *mut GByte, nSize: size_t); + pub fn GDALCreateMultiDimensional( + hDriver: GDALDriverH, + pszName: *const libc::c_char, + papszRootGroupOptions: CSLConstList, + papszOptions: CSLConstList, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALAttributeReadAsString(hAttr: GDALAttributeH) -> *const libc::c_char; + pub fn GDALExtendedDataTypeCreate(eType: GDALDataType::Type) -> GDALExtendedDataTypeH; } extern "C" { - pub fn GDALAttributeReadAsInt(hAttr: GDALAttributeH) -> libc::c_int; + pub fn GDALExtendedDataTypeCreateString(nMaxStringLength: usize) -> GDALExtendedDataTypeH; } extern "C" { - pub fn GDALAttributeReadAsDouble(hAttr: GDALAttributeH) -> f64; + pub fn GDALExtendedDataTypeCreateCompound( + pszName: *const libc::c_char, + nTotalSize: usize, + nComponents: usize, + comps: *const GDALEDTComponentH, + ) -> GDALExtendedDataTypeH; } extern "C" { - pub fn GDALAttributeReadAsStringArray(hAttr: GDALAttributeH) -> *mut *mut libc::c_char; + pub fn GDALExtendedDataTypeRelease(hEDT: GDALExtendedDataTypeH); } extern "C" { - pub fn GDALAttributeReadAsIntArray( - hAttr: GDALAttributeH, - pnCount: *mut size_t, - ) -> *mut libc::c_int; + pub fn GDALExtendedDataTypeGetName(hEDT: GDALExtendedDataTypeH) -> *const libc::c_char; } extern "C" { - pub fn GDALAttributeReadAsDoubleArray(hAttr: GDALAttributeH, pnCount: *mut size_t) -> *mut f64; + pub fn GDALExtendedDataTypeGetClass( + hEDT: GDALExtendedDataTypeH, + ) -> GDALExtendedDataTypeClass::Type; } extern "C" { - pub fn GDALAttributeWriteRaw( - hAttr: GDALAttributeH, - arg1: *const libc::c_void, - arg2: size_t, - ) -> libc::c_int; + pub fn GDALExtendedDataTypeGetNumericDataType( + hEDT: GDALExtendedDataTypeH, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALAttributeWriteString( - hAttr: GDALAttributeH, - arg1: *const libc::c_char, - ) -> libc::c_int; + pub fn GDALExtendedDataTypeGetSize(hEDT: GDALExtendedDataTypeH) -> usize; } extern "C" { - pub fn GDALAttributeWriteStringArray(hAttr: GDALAttributeH, arg1: CSLConstList) -> libc::c_int; + pub fn GDALExtendedDataTypeGetMaxStringLength(hEDT: GDALExtendedDataTypeH) -> usize; } extern "C" { - pub fn GDALAttributeWriteInt(hAttr: GDALAttributeH, arg1: libc::c_int) -> libc::c_int; + pub fn GDALExtendedDataTypeGetComponents( + hEDT: GDALExtendedDataTypeH, + pnCount: *mut usize, + ) -> *mut GDALEDTComponentH; } extern "C" { - pub fn GDALAttributeWriteDouble(hAttr: GDALAttributeH, arg1: f64) -> libc::c_int; + pub fn GDALExtendedDataTypeFreeComponents(components: *mut GDALEDTComponentH, nCount: usize); } extern "C" { - pub fn GDALAttributeWriteDoubleArray( - hAttr: GDALAttributeH, - arg1: *const f64, - arg2: size_t, + pub fn GDALExtendedDataTypeCanConvertTo( + hSourceEDT: GDALExtendedDataTypeH, + hTargetEDT: GDALExtendedDataTypeH, ) -> libc::c_int; } extern "C" { - pub fn GDALDimensionRelease(hDim: GDALDimensionH); + pub fn GDALExtendedDataTypeEquals( + hFirstEDT: GDALExtendedDataTypeH, + hSecondEDT: GDALExtendedDataTypeH, + ) -> libc::c_int; } extern "C" { - pub fn GDALReleaseDimensions(dims: *mut GDALDimensionH, nCount: size_t); + pub fn GDALEDTComponentCreate( + pszName: *const libc::c_char, + nOffset: usize, + hType: GDALExtendedDataTypeH, + ) -> GDALEDTComponentH; } extern "C" { - pub fn GDALDimensionGetName(hDim: GDALDimensionH) -> *const libc::c_char; + pub fn GDALEDTComponentRelease(hComp: GDALEDTComponentH); } extern "C" { - pub fn GDALDimensionGetFullName(hDim: GDALDimensionH) -> *const libc::c_char; + pub fn GDALEDTComponentGetName(hComp: GDALEDTComponentH) -> *const libc::c_char; } extern "C" { - pub fn GDALDimensionGetType(hDim: GDALDimensionH) -> *const libc::c_char; + pub fn GDALEDTComponentGetOffset(hComp: GDALEDTComponentH) -> usize; } extern "C" { - pub fn GDALDimensionGetDirection(hDim: GDALDimensionH) -> *const libc::c_char; + pub fn GDALEDTComponentGetType(hComp: GDALEDTComponentH) -> GDALExtendedDataTypeH; } extern "C" { - pub fn GDALDimensionGetSize(hDim: GDALDimensionH) -> GUInt64; + pub fn GDALDatasetGetRootGroup(hDS: GDALDatasetH) -> GDALGroupH; } extern "C" { - pub fn GDALDimensionGetIndexingVariable(hDim: GDALDimensionH) -> GDALMDArrayH; + pub fn GDALGroupRelease(hGroup: GDALGroupH); } extern "C" { - pub fn GDALDimensionSetIndexingVariable( - hDim: GDALDimensionH, - hArray: GDALMDArrayH, - ) -> libc::c_int; + pub fn GDALGroupGetName(hGroup: GDALGroupH) -> *const libc::c_char; } extern "C" { - pub fn GDALComputeMedianCutPCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - pfnIncludePixel: ::std::option::Option< - unsafe extern "C" fn( - arg1: libc::c_int, - arg2: libc::c_int, - arg3: *mut libc::c_void, - ) -> libc::c_int, - >, - nColors: libc::c_int, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; + pub fn GDALGroupGetFullName(hGroup: GDALGroupH) -> *const libc::c_char; } extern "C" { - pub fn GDALDitherRGB2PCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - hTarget: GDALRasterBandH, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; + pub fn GDALGroupGetMDArrayNames( + hGroup: GDALGroupH, + papszOptions: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALChecksumImage( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - ) -> libc::c_int; + pub fn GDALGroupOpenMDArray( + hGroup: GDALGroupH, + pszMDArrayName: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALMDArrayH; } extern "C" { - pub fn GDALComputeProximity( - hSrcBand: GDALRasterBandH, - hProximityBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGroupOpenMDArrayFromFullname( + hGroup: GDALGroupH, + pszMDArrayName: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALMDArrayH; +} +extern "C" { + pub fn GDALGroupResolveMDArray( + hGroup: GDALGroupH, + pszName: *const libc::c_char, + pszStartingPoint: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALMDArrayH; +} +extern "C" { + pub fn GDALGroupGetGroupNames( + hGroup: GDALGroupH, + papszOptions: CSLConstList, + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn GDALGroupOpenGroup( + hGroup: GDALGroupH, + pszSubGroupName: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALGroupH; } extern "C" { - pub fn GDALFillNodata( - hTargetBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - dfMaxSearchDist: f64, - bDeprecatedOption: libc::c_int, - nSmoothingIterations: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGroupOpenGroupFromFullname( + hGroup: GDALGroupH, + pszMDArrayName: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALGroupH; } extern "C" { - pub fn GDALPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGroupGetDimensions( + hGroup: GDALGroupH, + pnCount: *mut usize, + papszOptions: CSLConstList, + ) -> *mut GDALDimensionH; } extern "C" { - pub fn GDALFPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGroupGetAttribute( + hGroup: GDALGroupH, + pszName: *const libc::c_char, + ) -> GDALAttributeH; } extern "C" { - pub fn GDALSieveFilter( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - nSizeThreshold: libc::c_int, - nConnectedness: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGroupGetAttributes( + hGroup: GDALGroupH, + pnCount: *mut usize, + papszOptions: CSLConstList, + ) -> *mut GDALAttributeH; } -pub type GDALTransformerFunc = ::std::option::Option< - unsafe extern "C" fn( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int, ->; extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); + pub fn GDALGroupGetStructuralInfo(hGroup: GDALGroupH) -> CSLConstList; } extern "C" { - pub fn GDALUseTransformer( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGroupCreateGroup( + hGroup: GDALGroupH, + pszSubGroupName: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALGroupH; } extern "C" { - pub fn GDALCreateSimilarTransformer( - psTransformerArg: *mut libc::c_void, - dfSrcRatioX: f64, - dfSrcRatioY: f64, - ) -> *mut libc::c_void; + pub fn GDALGroupCreateDimension( + hGroup: GDALGroupH, + pszName: *const libc::c_char, + pszType: *const libc::c_char, + pszDirection: *const libc::c_char, + nSize: GUInt64, + papszOptions: CSLConstList, + ) -> GDALDimensionH; } extern "C" { - #[doc = " @endcond"] - pub fn GDALCreateGenImgProjTransformer( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - bGCPUseOK: libc::c_int, - dfGCPErrorThreshold: f64, - nOrder: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALGroupCreateMDArray( + hGroup: GDALGroupH, + pszName: *const libc::c_char, + nDimensions: usize, + pahDimensions: *mut GDALDimensionH, + hEDT: GDALExtendedDataTypeH, + papszOptions: CSLConstList, + ) -> GDALMDArrayH; } extern "C" { - pub fn GDALCreateGenImgProjTransformer2( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALGroupCreateAttribute( + hGroup: GDALGroupH, + pszName: *const libc::c_char, + nDimensions: usize, + panDimensions: *const GUInt64, + hEDT: GDALExtendedDataTypeH, + papszOptions: CSLConstList, + ) -> GDALAttributeH; } extern "C" { - pub fn GDALCreateGenImgProjTransformer3( - pszSrcWKT: *const libc::c_char, - padfSrcGeoTransform: *const f64, - pszDstWKT: *const libc::c_char, - padfDstGeoTransform: *const f64, - ) -> *mut libc::c_void; + pub fn GDALMDArrayRelease(hMDArray: GDALMDArrayH); } extern "C" { - pub fn GDALCreateGenImgProjTransformer4( - hSrcSRS: OGRSpatialReferenceH, - padfSrcGeoTransform: *const f64, - hDstSRS: OGRSpatialReferenceH, - padfDstGeoTransform: *const f64, - papszOptions: *const *const libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALMDArrayGetName(hArray: GDALMDArrayH) -> *const libc::c_char; } extern "C" { - pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); + pub fn GDALMDArrayGetFullName(hArray: GDALMDArrayH) -> *const libc::c_char; } extern "C" { - pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); + pub fn GDALMDArrayGetTotalElementsCount(hArray: GDALMDArrayH) -> GUInt64; } extern "C" { - pub fn GDALGenImgProjTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALMDArrayGetDimensionCount(hArray: GDALMDArrayH) -> usize; } extern "C" { - pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); + pub fn GDALMDArrayGetDimensions( + hArray: GDALMDArrayH, + pnCount: *mut usize, + ) -> *mut GDALDimensionH; } extern "C" { - pub fn GDALGetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *mut f64); + pub fn GDALMDArrayGetDataType(hArray: GDALMDArrayH) -> GDALExtendedDataTypeH; } extern "C" { - pub fn GDALCreateReprojectionTransformer( - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALMDArrayRead( + hArray: GDALMDArrayH, + arrayStartIdx: *const GUInt64, + count: *const usize, + arrayStep: *const GInt64, + bufferStride: *const GPtrDiff_t, + bufferDatatype: GDALExtendedDataTypeH, + pDstBuffer: *mut libc::c_void, + pDstBufferAllocStart: *const libc::c_void, + nDstBufferllocSize: usize, + ) -> libc::c_int; } extern "C" { - pub fn GDALCreateReprojectionTransformerEx( - hSrcSRS: OGRSpatialReferenceH, - hDstSRS: OGRSpatialReferenceH, - papszOptions: *const *const libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALMDArrayWrite( + hArray: GDALMDArrayH, + arrayStartIdx: *const GUInt64, + count: *const usize, + arrayStep: *const GInt64, + bufferStride: *const GPtrDiff_t, + bufferDatatype: GDALExtendedDataTypeH, + pSrcBuffer: *const libc::c_void, + psrcBufferAllocStart: *const libc::c_void, + nSrcBufferllocSize: usize, + ) -> libc::c_int; } extern "C" { - pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); + pub fn GDALMDArrayAdviseRead( + hArray: GDALMDArrayH, + arrayStartIdx: *const GUInt64, + count: *const usize, + ) -> libc::c_int; } extern "C" { - pub fn GDALReprojectionTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALMDArrayGetAttribute( + hArray: GDALMDArrayH, + pszName: *const libc::c_char, + ) -> GDALAttributeH; } extern "C" { - pub fn GDALCreateGCPTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALMDArrayGetAttributes( + hArray: GDALMDArrayH, + pnCount: *mut usize, + papszOptions: CSLConstList, + ) -> *mut GDALAttributeH; } extern "C" { - pub fn GDALCreateGCPRefineTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - tolerance: f64, - minimumGcps: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALMDArrayCreateAttribute( + hArray: GDALMDArrayH, + pszName: *const libc::c_char, + nDimensions: usize, + panDimensions: *const GUInt64, + hEDT: GDALExtendedDataTypeH, + papszOptions: CSLConstList, + ) -> GDALAttributeH; } extern "C" { - pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALMDArrayGetRawNoDataValue(hArray: GDALMDArrayH) -> *const libc::c_void; } extern "C" { - pub fn GDALGCPTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALMDArrayGetNoDataValueAsDouble( + hArray: GDALMDArrayH, + pbHasNoDataValue: *mut libc::c_int, + ) -> f64; } extern "C" { - pub fn GDALCreateTPSTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - bReversed: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALMDArraySetRawNoDataValue( + hArray: GDALMDArrayH, + arg1: *const libc::c_void, + ) -> libc::c_int; } extern "C" { - pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALMDArraySetNoDataValueAsDouble( + hArray: GDALMDArrayH, + dfNoDataValue: f64, + ) -> libc::c_int; } extern "C" { - pub fn GDALTPSTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALMDArraySetScale(hArray: GDALMDArrayH, dfScale: f64) -> libc::c_int; } extern "C" { - #[doc = " @endcond"] - pub fn GDALCreateRPCTransformer( - psRPC: *mut GDALRPCInfo, - bReversed: libc::c_int, - dfPixErrThreshold: f64, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALMDArrayGetScale(hArray: GDALMDArrayH, pbHasValue: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALMDArraySetOffset(hArray: GDALMDArrayH, dfOffset: f64) -> libc::c_int; } extern "C" { - pub fn GDALRPCTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALMDArrayGetOffset(hArray: GDALMDArrayH, pbHasValue: *mut libc::c_int) -> f64; } extern "C" { - pub fn GDALCreateGeoLocTransformer( - hBaseDS: GDALDatasetH, - papszGeolocationInfo: *mut *mut libc::c_char, - bReversed: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALMDArrayGetBlockSize(hArray: GDALMDArrayH, pnCount: *mut usize) -> *mut GUInt64; } extern "C" { - pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALMDArraySetUnit(hArray: GDALMDArrayH, arg1: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALGeoLocTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALMDArrayGetUnit(hArray: GDALMDArrayH) -> *const libc::c_char; } extern "C" { - pub fn GDALCreateApproxTransformer( - pfnRawTransformer: GDALTransformerFunc, - pRawTransformerArg: *mut libc::c_void, - dfMaxError: f64, - ) -> *mut libc::c_void; + pub fn GDALMDArraySetSpatialRef(arg1: GDALMDArrayH, arg2: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn GDALApproxTransformerOwnsSubtransformer( - pCBData: *mut libc::c_void, - bOwnFlag: libc::c_int, - ); + pub fn GDALMDArrayGetSpatialRef(hArray: GDALMDArrayH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); + pub fn GDALMDArrayGetProcessingChunkSize( + hArray: GDALMDArrayH, + pnCount: *mut usize, + nMaxChunkMemory: usize, + ) -> *mut usize; } extern "C" { - pub fn GDALApproxTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALMDArrayGetStructuralInfo(hArray: GDALMDArrayH) -> CSLConstList; } extern "C" { - pub fn GDALSimpleImageWarp( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - pfnTransform: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszWarpOptions: *mut *mut libc::c_char, - ) -> libc::c_int; + pub fn GDALMDArrayGetView( + hArray: GDALMDArrayH, + pszViewExpr: *const libc::c_char, + ) -> GDALMDArrayH; } extern "C" { - pub fn GDALSuggestedWarpOutput( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn GDALMDArrayTranspose( + hArray: GDALMDArrayH, + nNewAxisCount: usize, + panMapNewAxisToOldAxis: *const libc::c_int, + ) -> GDALMDArrayH; } extern "C" { - pub fn GDALSuggestedWarpOutput2( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - padfExtents: *mut f64, - nOptions: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALMDArrayGetUnscaled(hArray: GDALMDArrayH) -> GDALMDArrayH; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALSerializeTransformer( - pfnFunc: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - ) -> *mut CPLXMLNode; + pub fn GDALMDArrayGetMask(hArray: GDALMDArrayH, papszOptions: CSLConstList) -> GDALMDArrayH; } extern "C" { - pub fn GDALDeserializeTransformer( - psTree: *mut CPLXMLNode, - ppfnFunc: *mut GDALTransformerFunc, - ppTransformArg: *mut *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALMDArrayAsClassicDataset( + hArray: GDALMDArrayH, + iXDim: usize, + iYDim: usize, + ) -> GDALDatasetH; } extern "C" { - #[doc = " @endcond"] - pub fn GDALTransformGeolocations( - hXBand: GDALRasterBandH, - hYBand: GDALRasterBandH, - hZBand: GDALRasterBandH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, + pub fn GDALMDArrayGetStatistics( + hArray: GDALMDArrayH, + arg1: GDALDatasetH, + bApproxOK: libc::c_int, + bForce: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + pnValidCount: *mut GUInt64, pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszOptions: *mut *mut libc::c_char, + pProgressData: *mut libc::c_void, ) -> CPLErr::Type; } -#[doc = " Contour writer callback type"] -pub type GDALContourWriter = ::std::option::Option< - unsafe extern "C" fn( - dfLevel: f64, - nPoints: libc::c_int, - padfX: *mut f64, - padfY: *mut f64, - arg1: *mut libc::c_void, - ) -> CPLErr::Type, ->; -#[doc = " Contour generator opaque type"] -pub type GDALContourGeneratorH = *mut libc::c_void; extern "C" { - pub fn GDAL_CG_Create( - nWidth: libc::c_int, - nHeight: libc::c_int, - bNoDataSet: libc::c_int, - dfNoDataValue: f64, - dfContourInterval: f64, - dfContourBase: f64, - pfnWriter: GDALContourWriter, - pCBData: *mut libc::c_void, - ) -> GDALContourGeneratorH; + pub fn GDALMDArrayComputeStatistics( + hArray: GDALMDArrayH, + arg1: GDALDatasetH, + bApproxOK: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + pnValidCount: *mut GUInt64, + arg2: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> libc::c_int; } extern "C" { - pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; + pub fn GDALAttributeRelease(hAttr: GDALAttributeH); } extern "C" { - pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); + pub fn GDALReleaseAttributes(attributes: *mut GDALAttributeH, nCount: usize); } extern "C" { - pub fn OGRContourWriter( - arg1: f64, - arg2: libc::c_int, - arg3: *mut f64, - arg4: *mut f64, - pInfo: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALAttributeGetName(hAttr: GDALAttributeH) -> *const libc::c_char; } extern "C" { - #[doc = " @endcond"] - pub fn GDALContourGenerate( - hBand: GDALRasterBandH, - dfContourInterval: f64, - dfContourBase: f64, - nFixedLevelCount: libc::c_int, - padfFixedLevels: *mut f64, - bUseNoData: libc::c_int, - dfNoDataValue: f64, - hLayer: *mut libc::c_void, - iIDField: libc::c_int, - iElevField: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALAttributeGetFullName(hAttr: GDALAttributeH) -> *const libc::c_char; } extern "C" { - pub fn GDALContourGenerateEx( - hBand: GDALRasterBandH, - hLayer: *mut libc::c_void, - options: CSLConstList, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; -} -pub mod GDALViewshedMode { - #[doc = " Viewshed Modes"] - pub type Type = libc::c_uint; - pub const GVM_Diagonal: Type = 1; - pub const GVM_Edge: Type = 2; - pub const GVM_Max: Type = 3; - pub const GVM_Min: Type = 4; -} -pub mod GDALViewshedOutputType { - #[doc = " Viewshed output types"] - pub type Type = libc::c_uint; - pub const GVOT_NORMAL: Type = 1; - pub const GVOT_MIN_TARGET_HEIGHT_FROM_DEM: Type = 2; - pub const GVOT_MIN_TARGET_HEIGHT_FROM_GROUND: Type = 3; + pub fn GDALAttributeGetTotalElementsCount(hAttr: GDALAttributeH) -> GUInt64; } extern "C" { - pub fn GDALViewshedGenerate( - hBand: GDALRasterBandH, - pszDriverName: *const libc::c_char, - pszTargetRasterName: *const libc::c_char, - papszCreationOptions: CSLConstList, - dfObserverX: f64, - dfObserverY: f64, - dfObserverHeight: f64, - dfTargetHeight: f64, - dfVisibleVal: f64, - dfInvisibleVal: f64, - dfOutOfRangeVal: f64, - dfNoDataVal: f64, - dfCurvCoeff: f64, - eMode: GDALViewshedMode::Type, - dfMaxDistance: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - heightMode: GDALViewshedOutputType::Type, - papszExtraOptions: CSLConstList, - ) -> GDALDatasetH; + pub fn GDALAttributeGetDimensionCount(hAttr: GDALAttributeH) -> usize; } extern "C" { - pub fn GDALRasterizeGeometries( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nGeomCount: libc::c_int, - pahGeometries: *mut OGRGeometryH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeomBurnValue: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALAttributeGetDimensionsSize( + hAttr: GDALAttributeH, + pnCount: *mut usize, + ) -> *mut GUInt64; } extern "C" { - pub fn GDALRasterizeLayers( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfLayerBurnValues: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALAttributeGetDataType(hAttr: GDALAttributeH) -> GDALExtendedDataTypeH; } extern "C" { - pub fn GDALRasterizeLayersBuf( - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pszDstProjection: *const libc::c_char, - padfDstGeoTransform: *mut f64, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - dfBurnValue: f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALAttributeReadAsRaw(hAttr: GDALAttributeH, pnSize: *mut usize) -> *mut GByte; } -pub mod GDALGridAlgorithm { - #[doc = " Gridding Algorithms"] - pub type Type = libc::c_uint; - #[doc = " Inverse distance to a power"] - pub const GGA_InverseDistanceToAPower: Type = 1; - #[doc = " Moving Average"] - pub const GGA_MovingAverage: Type = 2; - #[doc = " Nearest Neighbor"] - pub const GGA_NearestNeighbor: Type = 3; - #[doc = " Minimum Value (Data Metric)"] - pub const GGA_MetricMinimum: Type = 4; - #[doc = " Maximum Value (Data Metric)"] - pub const GGA_MetricMaximum: Type = 5; - #[doc = " Data Range (Data Metric)"] - pub const GGA_MetricRange: Type = 6; - #[doc = " Number of Points (Data Metric)"] - pub const GGA_MetricCount: Type = 7; - #[doc = " Average Distance (Data Metric)"] - pub const GGA_MetricAverageDistance: Type = 8; - #[doc = " Average Distance Between Data Points (Data Metric)"] - pub const GGA_MetricAverageDistancePts: Type = 9; - #[doc = " Linear interpolation (from Delaunay triangulation. Since GDAL 2.1"] - pub const GGA_Linear: Type = 10; - #[doc = " Inverse distance to a power with nearest neighbor search for max points"] - pub const GGA_InverseDistanceToAPowerNearestNeighbor: Type = 11; +extern "C" { + pub fn GDALAttributeFreeRawResult(hAttr: GDALAttributeH, raw: *mut GByte, nSize: usize); } extern "C" { - pub fn GDALGridCreate( - arg1: GDALGridAlgorithm::Type, - arg2: *const libc::c_void, - arg3: GUInt32, - arg4: *const f64, - arg5: *const f64, - arg6: *const f64, - arg7: f64, - arg8: f64, - arg9: f64, - arg10: f64, - arg11: GUInt32, - arg12: GUInt32, - arg13: GDALDataType::Type, - arg14: *mut libc::c_void, - arg15: GDALProgressFunc, - arg16: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALAttributeReadAsString(hAttr: GDALAttributeH) -> *const libc::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALGridContext { - _unused: [u8; 0], +extern "C" { + pub fn GDALAttributeReadAsInt(hAttr: GDALAttributeH) -> libc::c_int; } extern "C" { - pub fn GDALGridContextCreate( - eAlgorithm: GDALGridAlgorithm::Type, - poOptions: *const libc::c_void, - nPoints: GUInt32, - padfX: *const f64, - padfY: *const f64, - padfZ: *const f64, - bCallerWillKeepPointArraysAlive: libc::c_int, - ) -> *mut GDALGridContext; + pub fn GDALAttributeReadAsDouble(hAttr: GDALAttributeH) -> f64; } extern "C" { - pub fn GDALGridContextFree(psContext: *mut GDALGridContext); + pub fn GDALAttributeReadAsStringArray(hAttr: GDALAttributeH) -> *mut *mut libc::c_char; } extern "C" { - pub fn GDALGridContextProcess( - psContext: *mut GDALGridContext, - dfXMin: f64, - dfXMax: f64, - dfYMin: f64, - dfYMax: f64, - nXSize: GUInt32, - nYSize: GUInt32, - eType: GDALDataType::Type, - pData: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALAttributeReadAsIntArray( + hAttr: GDALAttributeH, + pnCount: *mut usize, + ) -> *mut libc::c_int; } extern "C" { - pub fn GDALComputeMatchingPoints( - hFirstImage: GDALDatasetH, - hSecondImage: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pnGCPCount: *mut libc::c_int, - ) -> *mut GDAL_GCP; + pub fn GDALAttributeReadAsDoubleArray(hAttr: GDALAttributeH, pnCount: *mut usize) -> *mut f64; } -#[doc = " Triangle fact"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriFacet { - #[doc = "< index to the padfX/padfY arrays"] - pub anVertexIdx: [libc::c_int; 3usize], - #[doc = "< index to GDALDelaunayTriangulation.pasFacets, or -1"] - pub anNeighborIdx: [libc::c_int; 3usize], +extern "C" { + pub fn GDALAttributeWriteRaw( + hAttr: GDALAttributeH, + arg1: *const libc::c_void, + arg2: usize, + ) -> libc::c_int; } -#[test] -fn bindgen_test_layout_GDALTriFacet() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriFacet)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(GDALTriFacet)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).anVertexIdx as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriFacet), - "::", - stringify!(anVertexIdx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).anNeighborIdx as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(GDALTriFacet), - "::", - stringify!(anNeighborIdx) - ) - ); +extern "C" { + pub fn GDALAttributeWriteString( + hAttr: GDALAttributeH, + arg1: *const libc::c_char, + ) -> libc::c_int; } -#[doc = " Triangle barycentric coefficients."] -#[doc = ""] -#[doc = " Conversion from cartesian (x,y) to barycentric (l1,l2,l3) with :"] -#[doc = " l1 = dfMul1X * (x - dfCxtX) + dfMul1Y * (y - dfCstY)"] -#[doc = " l2 = dfMul2X * (x - dfCxtX) + dfMul2Y * (y - dfCstY)"] -#[doc = " l3 = 1 - l1 - l2"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriBarycentricCoefficients { - #[doc = "< dfMul1X"] - pub dfMul1X: f64, - #[doc = "< dfMul1Y"] - pub dfMul1Y: f64, - #[doc = "< dfMul2X"] - pub dfMul2X: f64, - #[doc = "< dfMul2Y"] - pub dfMul2Y: f64, - #[doc = "< dfCstX"] - pub dfCstX: f64, - #[doc = "< dfCstY"] - pub dfCstY: f64, +extern "C" { + pub fn GDALAttributeWriteStringArray(hAttr: GDALAttributeH, arg1: CSLConstList) -> libc::c_int; } -#[test] -fn bindgen_test_layout_GDALTriBarycentricCoefficients() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(GDALTriBarycentricCoefficients)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriBarycentricCoefficients)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1X as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul1X) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1Y as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul1Y) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2X as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul2X) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2Y as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfMul2Y) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstX as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfCstX) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstY as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfCstY) - ) - ); +extern "C" { + pub fn GDALAttributeWriteInt(hAttr: GDALAttributeH, arg1: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn GDALAttributeWriteDouble(hAttr: GDALAttributeH, arg1: f64) -> libc::c_int; +} +extern "C" { + pub fn GDALAttributeWriteDoubleArray( + hAttr: GDALAttributeH, + arg1: *const f64, + arg2: usize, + ) -> libc::c_int; } -#[doc = " Triangulation structure"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriangulation { - #[doc = "< number of facets"] - pub nFacets: libc::c_int, - #[doc = "< array of nFacets facets"] - pub pasFacets: *mut GDALTriFacet, - #[doc = "< arra of nFacets barycentric coefficients"] - pub pasFacetCoefficients: *mut GDALTriBarycentricCoefficients, +extern "C" { + pub fn GDALDimensionRelease(hDim: GDALDimensionH); } -#[test] -fn bindgen_test_layout_GDALTriangulation() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriangulation)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriangulation)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nFacets as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), - "::", - stringify!(nFacets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pasFacets as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), - "::", - stringify!(pasFacets) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pasFacetCoefficients as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), - "::", - stringify!(pasFacetCoefficients) - ) - ); +extern "C" { + pub fn GDALReleaseDimensions(dims: *mut GDALDimensionH, nCount: usize); } extern "C" { - pub fn GDALHasTriangulation() -> libc::c_int; + pub fn GDALDimensionGetName(hDim: GDALDimensionH) -> *const libc::c_char; } extern "C" { - pub fn GDALTriangulationCreateDelaunay( - nPoints: libc::c_int, - padfX: *const f64, - padfY: *const f64, - ) -> *mut GDALTriangulation; + pub fn GDALDimensionGetFullName(hDim: GDALDimensionH) -> *const libc::c_char; } extern "C" { - pub fn GDALTriangulationComputeBarycentricCoefficients( - psDT: *mut GDALTriangulation, - padfX: *const f64, - padfY: *const f64, + pub fn GDALDimensionGetType(hDim: GDALDimensionH) -> *const libc::c_char; +} +extern "C" { + pub fn GDALDimensionGetDirection(hDim: GDALDimensionH) -> *const libc::c_char; +} +extern "C" { + pub fn GDALDimensionGetSize(hDim: GDALDimensionH) -> GUInt64; +} +extern "C" { + pub fn GDALDimensionGetIndexingVariable(hDim: GDALDimensionH) -> GDALMDArrayH; +} +extern "C" { + pub fn GDALDimensionSetIndexingVariable( + hDim: GDALDimensionH, + hArray: GDALMDArrayH, ) -> libc::c_int; } extern "C" { - pub fn GDALTriangulationComputeBarycentricCoordinates( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - pdfL1: *mut f64, - pdfL2: *mut f64, - pdfL3: *mut f64, + pub fn GDALComputeMedianCutPCT( + hRed: GDALRasterBandH, + hGreen: GDALRasterBandH, + hBlue: GDALRasterBandH, + pfnIncludePixel: ::std::option::Option< + unsafe extern "C" fn( + arg1: libc::c_int, + arg2: libc::c_int, + arg3: *mut libc::c_void, + ) -> libc::c_int, + >, + nColors: libc::c_int, + hColorTable: GDALColorTableH, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, ) -> libc::c_int; } extern "C" { - pub fn GDALTriangulationFindFacetBruteForce( - psDT: *const GDALTriangulation, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, + pub fn GDALDitherRGB2PCT( + hRed: GDALRasterBandH, + hGreen: GDALRasterBandH, + hBlue: GDALRasterBandH, + hTarget: GDALRasterBandH, + hColorTable: GDALColorTableH, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, ) -> libc::c_int; } extern "C" { - pub fn GDALTriangulationFindFacetDirected( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, + pub fn GDALChecksumImage( + hBand: GDALRasterBandH, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, ) -> libc::c_int; } extern "C" { - pub fn GDALTriangulationFree(psDT: *mut GDALTriangulation); + pub fn GDALComputeProximity( + hSrcBand: GDALRasterBandH, + hProximityBand: GDALRasterBandH, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALTriangulationTerminate(); + pub fn GDALFillNodata( + hTargetBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + dfMaxSearchDist: f64, + bDeprecatedOption: libc::c_int, + nSmoothingIterations: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - #[doc = " @endcond"] - pub fn GDALOpenVerticalShiftGrid( - pszProj4Geoidgrids: *const libc::c_char, - pbError: *mut libc::c_int, - ) -> GDALDatasetH; + pub fn GDALPolygonize( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hOutLayer: OGRLayerH, + iPixValField: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALApplyVerticalShiftGrid( - hSrcDataset: GDALDatasetH, - hGridDataset: GDALDatasetH, - bInverse: libc::c_int, - dfSrcUnitToMeter: f64, - dfDstUnitToMeter: f64, + pub fn GDALFPolygonize( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hOutLayer: OGRLayerH, + iPixValField: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALSieveFilter( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hDstBand: GDALRasterBandH, + nSizeThreshold: libc::c_int, + nConnectedness: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +pub type GDALTransformerFunc = ::std::option::Option< + unsafe extern "C" fn( + pTransformerArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int, +>; +extern "C" { + pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALUseTransformer( + pTransformerArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateSimilarTransformer( + psTransformerArg: *mut libc::c_void, + dfSrcRatioX: f64, + dfSrcRatioY: f64, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + hDstDS: GDALDatasetH, + pszDstWKT: *const libc::c_char, + bGCPUseOK: libc::c_int, + dfGCPErrorThreshold: f64, + nOrder: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer2( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer3( + pszSrcWKT: *const libc::c_char, + padfSrcGeoTransform: *const f64, + pszDstWKT: *const libc::c_char, + padfDstGeoTransform: *const f64, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer4( + hSrcSRS: OGRSpatialReferenceH, + padfSrcGeoTransform: *const f64, + hDstSRS: OGRSpatialReferenceH, + padfDstGeoTransform: *const f64, papszOptions: *const *const libc::c_char, - ) -> GDALDatasetH; + ) -> *mut libc::c_void; } -pub type CPLThreadFunc = ::std::option::Option; extern "C" { - pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; + pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); } extern "C" { - pub fn CPLUnlockFile(hLock: *mut libc::c_void); + pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); } extern "C" { - pub fn CPLCreateMutex() -> *mut libc::c_void; + pub fn GDALGenImgProjTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; + pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); } extern "C" { - pub fn CPLCreateOrAcquireMutex( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - ) -> libc::c_int; + pub fn GDALGetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *mut f64); } extern "C" { - pub fn CPLCreateOrAcquireMutexEx( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - nOptions: libc::c_int, - ) -> libc::c_int; + pub fn GDALCreateReprojectionTransformer( + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; + pub fn GDALCreateReprojectionTransformerEx( + hSrcSRS: OGRSpatialReferenceH, + hDstSRS: OGRSpatialReferenceH, + papszOptions: *const *const libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); + pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); } extern "C" { - pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); + pub fn GDALReprojectionTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLCleanupMasterMutex(); + pub fn GDALCreateGCPTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + nReqOrder: libc::c_int, + bReversed: libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - pub fn CPLCreateCond() -> *mut libc::c_void; + pub fn GDALCreateGCPRefineTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + nReqOrder: libc::c_int, + bReversed: libc::c_int, + tolerance: f64, + minimumGcps: libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); -} -pub mod CPLCondTimedWaitReason { - pub type Type = libc::c_uint; - pub const COND_TIMED_WAIT_COND: Type = 0; - pub const COND_TIMED_WAIT_TIME_OUT: Type = 1; - pub const COND_TIMED_WAIT_OTHER: Type = 2; + pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); } extern "C" { - pub fn CPLCondTimedWait( - hCond: *mut libc::c_void, - hMutex: *mut libc::c_void, - dfWaitInSeconds: f64, - ) -> CPLCondTimedWaitReason::Type; + pub fn GDALGCPTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLCondSignal(hCond: *mut libc::c_void); + pub fn GDALCreateTPSTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + bReversed: libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - pub fn CPLCondBroadcast(hCond: *mut libc::c_void); + pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); } extern "C" { - pub fn CPLDestroyCond(hCond: *mut libc::c_void); + pub fn GDALTPSTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - #[doc = " Contrary to what its name suggests, CPLGetPID() actually returns the thread id"] - pub fn CPLGetPID() -> GIntBig; + pub fn GDALCreateRPCTransformer( + psRPC: *mut GDALRPCInfo, + bReversed: libc::c_int, + dfPixErrThreshold: f64, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn CPLGetCurrentProcessID() -> libc::c_int; + pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); } extern "C" { - pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; + pub fn GDALRPCTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLCreateJoinableThread( - pfnMain: CPLThreadFunc, - pArg: *mut libc::c_void, + pub fn GDALCreateGeoLocTransformer( + hBaseDS: GDALDatasetH, + papszGeolocationInfo: *mut *mut libc::c_char, + bReversed: libc::c_int, ) -> *mut libc::c_void; } extern "C" { - pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); + pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); } extern "C" { - pub fn CPLSleep(dfWaitInSeconds: f64); + pub fn GDALGeoLocTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLGetThreadingModel() -> *const libc::c_char; + pub fn GDALCreateApproxTransformer( + pfnRawTransformer: GDALTransformerFunc, + pRawTransformerArg: *mut libc::c_void, + dfMaxError: f64, + ) -> *mut libc::c_void; } extern "C" { - pub fn CPLGetNumCPUs() -> libc::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CPLLock { - _unused: [u8; 0], + pub fn GDALApproxTransformerOwnsSubtransformer( + pCBData: *mut libc::c_void, + bOwnFlag: libc::c_int, + ); } -pub type CPLLock = _CPLLock; -pub mod CPLLockType { - pub type Type = libc::c_uint; - pub const LOCK_RECURSIVE_MUTEX: Type = 0; - pub const LOCK_ADAPTIVE_MUTEX: Type = 1; - pub const LOCK_SPIN: Type = 2; +extern "C" { + pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); } extern "C" { - pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; + pub fn GDALApproxTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) - -> libc::c_int; + pub fn GDALSimpleImageWarp( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + nBandCount: libc::c_int, + panBandList: *mut libc::c_int, + pfnTransform: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + papszWarpOptions: *mut *mut libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; + pub fn GDALSuggestedWarpOutput( + hSrcDS: GDALDatasetH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeoTransformOut: *mut f64, + pnPixels: *mut libc::c_int, + pnLines: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLReleaseLock(arg1: *mut CPLLock); + pub fn GDALSuggestedWarpOutput2( + hSrcDS: GDALDatasetH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeoTransformOut: *mut f64, + pnPixels: *mut libc::c_int, + pnLines: *mut libc::c_int, + padfExtents: *mut f64, + nOptions: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLDestroyLock(arg1: *mut CPLLock); + pub fn GDALSerializeTransformer( + pfnFunc: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); + pub fn GDALDeserializeTransformer( + psTree: *mut CPLXMLNode, + ppfnFunc: *mut GDALTransformerFunc, + ppTransformArg: *mut *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; + pub fn GDALTransformGeolocations( + hXBand: GDALRasterBandH, + hYBand: GDALRasterBandH, + hZBand: GDALRasterBandH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + papszOptions: *mut *mut libc::c_char, + ) -> CPLErr::Type; } +pub type GDALContourWriter = ::std::option::Option< + unsafe extern "C" fn( + dfLevel: f64, + nPoints: libc::c_int, + padfX: *mut f64, + padfY: *mut f64, + arg1: *mut libc::c_void, + ) -> CPLErr::Type, +>; +pub type GDALContourGeneratorH = *mut libc::c_void; extern "C" { - pub fn CPLGetTLSEx( - nIndex: libc::c_int, - pbMemoryErrorOccurred: *mut libc::c_int, - ) -> *mut libc::c_void; + pub fn GDAL_CG_Create( + nWidth: libc::c_int, + nHeight: libc::c_int, + bNoDataSet: libc::c_int, + dfNoDataValue: f64, + dfContourInterval: f64, + dfContourBase: f64, + pfnWriter: GDALContourWriter, + pCBData: *mut libc::c_void, + ) -> GDALContourGeneratorH; } extern "C" { - pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); + pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; } -pub type CPLTLSFreeFunc = ::std::option::Option; extern "C" { - pub fn CPLSetTLSWithFreeFunc( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - ); + pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); } extern "C" { - pub fn CPLSetTLSWithFreeFuncEx( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - pbMemoryErrorOccurred: *mut libc::c_int, - ); + pub fn OGRContourWriter( + arg1: f64, + arg2: libc::c_int, + arg3: *mut f64, + arg4: *mut f64, + pInfo: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLCleanupTLS(); + pub fn GDALContourGenerate( + hBand: GDALRasterBandH, + dfContourInterval: f64, + dfContourBase: f64, + nFixedLevelCount: libc::c_int, + padfFixedLevels: *mut f64, + bUseNoData: libc::c_int, + dfNoDataValue: f64, + hLayer: *mut libc::c_void, + iIDField: libc::c_int, + iElevField: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; } -pub mod GDALResampleAlg { - #[doc = " Warp Resampling Algorithm"] +extern "C" { + pub fn GDALContourGenerateEx( + hBand: GDALRasterBandH, + hLayer: *mut libc::c_void, + options: CSLConstList, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +pub mod GDALViewshedMode { pub type Type = libc::c_uint; - #[doc = " Nearest neighbour (select on one input pixel)"] - pub const GRA_NearestNeighbour: Type = 0; - #[doc = " Bilinear (2x2 kernel)"] - pub const GRA_Bilinear: Type = 1; - #[doc = " Cubic Convolution Approximation (4x4 kernel)"] - pub const GRA_Cubic: Type = 2; - #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] - pub const GRA_CubicSpline: Type = 3; - #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] - pub const GRA_Lanczos: Type = 4; - #[doc = " Average (computes the weighted average of all non-NODATA contributing pixels)"] - pub const GRA_Average: Type = 5; - #[doc = " Mode (selects the value which appears most often of all the sampled points)"] - pub const GRA_Mode: Type = 6; - #[doc = " Max (selects maximum of all non-NODATA contributing pixels)"] - pub const GRA_Max: Type = 8; - #[doc = " Min (selects minimum of all non-NODATA contributing pixels)"] - pub const GRA_Min: Type = 9; - #[doc = " Med (selects median of all non-NODATA contributing pixels)"] - pub const GRA_Med: Type = 10; - #[doc = " Q1 (selects first quartile of all non-NODATA contributing pixels)"] - pub const GRA_Q1: Type = 11; - #[doc = " Q3 (selects third quartile of all non-NODATA contributing pixels)"] - pub const GRA_Q3: Type = 12; - #[doc = " Sum (computes the weighed sum of all non-NODATA contributing pixels). Added in GDAL 3.1"] - pub const GRA_Sum: Type = 13; + pub const GVM_Diagonal: Type = 1; + pub const GVM_Edge: Type = 2; + pub const GVM_Max: Type = 3; + pub const GVM_Min: Type = 4; +} +pub mod GDALViewshedOutputType { + pub type Type = libc::c_uint; + pub const GVOT_NORMAL: Type = 1; + pub const GVOT_MIN_TARGET_HEIGHT_FROM_DEM: Type = 2; + pub const GVOT_MIN_TARGET_HEIGHT_FROM_GROUND: Type = 3; } -#[doc = " @cond Doxygen_Suppress"] -pub type GDALMaskFunc = ::std::option::Option< - unsafe extern "C" fn( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pMask: *mut libc::c_void, - ) -> libc::c_int, ->; extern "C" { - pub fn GDALWarpNoDataMasker( - pMaskFuncArg: *mut libc::c_void, + pub fn GDALViewshedGenerate( + hBand: GDALRasterBandH, + pszDriverName: *const libc::c_char, + pszTargetRasterName: *const libc::c_char, + papszCreationOptions: CSLConstList, + dfObserverX: f64, + dfObserverY: f64, + dfObserverHeight: f64, + dfTargetHeight: f64, + dfVisibleVal: f64, + dfInvisibleVal: f64, + dfOutOfRangeVal: f64, + dfNoDataVal: f64, + dfCurvCoeff: f64, + eMode: GDALViewshedMode::Type, + dfMaxDistance: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + heightMode: GDALViewshedOutputType::Type, + papszExtraOptions: CSLConstList, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALRasterizeGeometries( + hDS: GDALDatasetH, nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllValid: *mut libc::c_int, + panBandList: *mut libc::c_int, + nGeomCount: libc::c_int, + pahGeometries: *mut OGRGeometryH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeomBurnValue: *mut f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALWarpDstAlphaMasker( - pMaskFuncArg: *mut libc::c_void, + pub fn GDALRasterizeLayers( + hDS: GDALDatasetH, nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, + panBandList: *mut libc::c_int, + nLayerCount: libc::c_int, + pahLayers: *mut OGRLayerH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfLayerBurnValues: *mut f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, ) -> CPLErr::Type; } extern "C" { - pub fn GDALWarpSrcAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllOpaque: *mut libc::c_int, + pub fn GDALRasterizeLayersBuf( + pData: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nLayerCount: libc::c_int, + pahLayers: *mut OGRLayerH, + pszDstProjection: *const libc::c_char, + padfDstGeoTransform: *mut f64, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + dfBurnValue: f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, ) -> CPLErr::Type; } +pub mod GDALGridAlgorithm { + pub type Type = libc::c_uint; + pub const GGA_InverseDistanceToAPower: Type = 1; + pub const GGA_MovingAverage: Type = 2; + pub const GGA_NearestNeighbor: Type = 3; + pub const GGA_MetricMinimum: Type = 4; + pub const GGA_MetricMaximum: Type = 5; + pub const GGA_MetricRange: Type = 6; + pub const GGA_MetricCount: Type = 7; + pub const GGA_MetricAverageDistance: Type = 8; + pub const GGA_MetricAverageDistancePts: Type = 9; + pub const GGA_Linear: Type = 10; + pub const GGA_InverseDistanceToAPowerNearestNeighbor: Type = 11; +} extern "C" { - pub fn GDALWarpSrcMaskMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, + pub fn GDALGridCreate( + arg1: GDALGridAlgorithm::Type, + arg2: *const libc::c_void, + arg3: GUInt32, + arg4: *const f64, + arg5: *const f64, + arg6: *const f64, + arg7: f64, + arg8: f64, + arg9: f64, + arg10: f64, + arg11: GUInt32, + arg12: GUInt32, + arg13: GDALDataType::Type, + arg14: *mut libc::c_void, + arg15: GDALProgressFunc, + arg16: *mut libc::c_void, ) -> CPLErr::Type; } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridContext { + _unused: [u8; 0], +} extern "C" { - pub fn GDALWarpCutlineMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, + pub fn GDALGridContextCreate( + eAlgorithm: GDALGridAlgorithm::Type, + poOptions: *const libc::c_void, + nPoints: GUInt32, + padfX: *const f64, + padfY: *const f64, + padfZ: *const f64, + bCallerWillKeepPointArraysAlive: libc::c_int, + ) -> *mut GDALGridContext; +} +extern "C" { + pub fn GDALGridContextFree(psContext: *mut GDALGridContext); +} +extern "C" { + pub fn GDALGridContextProcess( + psContext: *mut GDALGridContext, + dfXMin: f64, + dfXMax: f64, + dfYMin: f64, + dfYMax: f64, + nXSize: GUInt32, + nYSize: GUInt32, + eType: GDALDataType::Type, + pData: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, ) -> CPLErr::Type; } -#[doc = " Warp control options for use with GDALWarpOperation::Initialize()"] +extern "C" { + pub fn GDALComputeMatchingPoints( + hFirstImage: GDALDatasetH, + hSecondImage: GDALDatasetH, + papszOptions: *mut *mut libc::c_char, + pnGCPCount: *mut libc::c_int, + ) -> *mut GDAL_GCP; +} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct GDALWarpOptions { - pub papszWarpOptions: *mut *mut libc::c_char, - #[doc = " In bytes, 0.0 for internal default"] - pub dfWarpMemoryLimit: f64, - #[doc = " Resampling algorithm to use"] - pub eResampleAlg: GDALResampleAlg::Type, - #[doc = " data type to use during warp operation, GDT_Unknown lets the algorithm"] - #[doc = "select the type"] - pub eWorkingDataType: GDALDataType::Type, - #[doc = " Source image dataset."] - pub hSrcDS: GDALDatasetH, - #[doc = " Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer()."] - pub hDstDS: GDALDatasetH, - #[doc = " Number of bands to process, may be 0 to select all bands."] - pub nBandCount: libc::c_int, - #[doc = " The band numbers for the source bands to process (1 based)"] - pub panSrcBands: *mut libc::c_int, - #[doc = " The band numbers for the destination bands to process (1 based)"] - pub panDstBands: *mut libc::c_int, - #[doc = " The source band so use as an alpha (transparency) value, 0=disabled"] - pub nSrcAlphaBand: libc::c_int, - #[doc = " The dest. band so use as an alpha (transparency) value, 0=disabled"] - pub nDstAlphaBand: libc::c_int, - #[doc = " The \"nodata\" value real component for each input band, if NULL there isn't one"] - pub padfSrcNoDataReal: *mut f64, - #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] - #[doc = "component is provided. This value is not used to flag invalid values."] - #[doc = "Only the real component is used."] - pub padfSrcNoDataImag: *mut f64, - #[doc = " The \"nodata\" value real component for each output band, if NULL there isn't one"] - pub padfDstNoDataReal: *mut f64, - #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] - #[doc = "component is provided. Note that warp operations only use real component"] - #[doc = "for flagging invalid data."] - pub padfDstNoDataImag: *mut f64, - #[doc = " GDALProgressFunc() compatible progress reporting function, or NULL"] - #[doc = "if there isn't one."] - pub pfnProgress: GDALProgressFunc, - #[doc = " Callback argument to be passed to pfnProgress."] - pub pProgressArg: *mut libc::c_void, - #[doc = " Type of spatial point transformer function"] - pub pfnTransformer: GDALTransformerFunc, - #[doc = " Handle to image transformer setup structure"] - pub pTransformerArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnSrcValidityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pSrcValidityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnSrcDensityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pSrcDensityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnDstDensityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pDstDensityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnDstValidityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pDstValidityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnPreWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - #[doc = " Unused. Must be NULL"] - pub pPreWarpProcessorArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnPostWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - #[doc = " Unused. Must be NULL"] - pub pPostWarpProcessorArg: *mut libc::c_void, - #[doc = " Optional OGRPolygonH for a masking cutline."] - pub hCutline: *mut libc::c_void, - #[doc = " Optional blending distance to apply across cutline in pixels, default is zero."] - pub dfCutlineBlendDist: f64, +pub struct GDALTriFacet { + pub anVertexIdx: [libc::c_int; 3usize], + pub anNeighborIdx: [libc::c_int; 3usize], } #[test] -fn bindgen_test_layout_GDALWarpOptions() { - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papszWarpOptions) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfWarpMemoryLimit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eWorkingDataType) - ) - ); +fn bindgen_test_layout_GDALTriFacet() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, + ::std::mem::size_of::(), 24usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hSrcDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hDstDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nBandCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panSrcBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panDstBands) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nSrcAlphaBand) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nDstAlphaBand) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataImag) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataReal) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfDstNoDataImag) - ) + concat!("Size of: ", stringify!(GDALTriFacet)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnProgress) - ) + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(GDALTriFacet)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, - 112usize, + unsafe { &(*(::std::ptr::null::())).anVertexIdx as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriFacet), "::", - stringify!(pProgressArg) + stringify!(anVertexIdx) ) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, - 120usize, + assert_eq!( + unsafe { &(*(::std::ptr::null::())).anNeighborIdx as *const _ as usize }, + 12usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriFacet), "::", - stringify!(pfnTransformer) + stringify!(anNeighborIdx) ) ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriBarycentricCoefficients { + pub dfMul1X: f64, + pub dfMul1Y: f64, + pub dfMul2X: f64, + pub dfMul2Y: f64, + pub dfCstX: f64, + pub dfCstY: f64, +} +#[test] +fn bindgen_test_layout_GDALTriBarycentricCoefficients() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(GDALTriBarycentricCoefficients)) + ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, - 128usize, + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALTriBarycentricCoefficients)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfMul1X as *const _ as usize + }, + 0usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(pTransformerArg) + stringify!(dfMul1X) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ - as usize + &(*(::std::ptr::null::())).dfMul1Y as *const _ as usize }, - 136usize, + 8usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(papfnSrcPerBandValidityMaskFunc) + stringify!(dfMul1Y) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ - as usize + &(*(::std::ptr::null::())).dfMul2X as *const _ as usize }, - 144usize, + 16usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(papSrcPerBandValidityMaskFuncArg) + stringify!(dfMul2X) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize + &(*(::std::ptr::null::())).dfMul2Y as *const _ as usize }, - 152usize, + 24usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(pfnSrcValidityMaskFunc) + stringify!(dfMul2Y) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize + &(*(::std::ptr::null::())).dfCstX as *const _ as usize }, - 160usize, + 32usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(pSrcValidityMaskFuncArg) + stringify!(dfCstX) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize + &(*(::std::ptr::null::())).dfCstY as *const _ as usize }, - 168usize, + 40usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriBarycentricCoefficients), "::", - stringify!(pfnSrcDensityMaskFunc) + stringify!(dfCstY) ) ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriangulation { + pub nFacets: libc::c_int, + pub pasFacets: *mut GDALTriFacet, + pub pasFacetCoefficients: *mut GDALTriBarycentricCoefficients, +} +#[test] +fn bindgen_test_layout_GDALTriangulation() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize - }, - 176usize, + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(GDALTriangulation)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALTriangulation)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nFacets as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriangulation), "::", - stringify!(pSrcDensityMaskFuncArg) + stringify!(nFacets) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize - }, - 184usize, + unsafe { &(*(::std::ptr::null::())).pasFacets as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriangulation), "::", - stringify!(pfnDstDensityMaskFunc) + stringify!(pasFacets) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize + &(*(::std::ptr::null::())).pasFacetCoefficients as *const _ as usize }, - 192usize, + 16usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALTriangulation), "::", - stringify!(pDstDensityMaskFuncArg) + stringify!(pasFacetCoefficients) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnDstValidityMaskFunc) - ) +} +extern "C" { + pub fn GDALHasTriangulation() -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationCreateDelaunay( + nPoints: libc::c_int, + padfX: *const f64, + padfY: *const f64, + ) -> *mut GDALTriangulation; +} +extern "C" { + pub fn GDALTriangulationComputeBarycentricCoefficients( + psDT: *mut GDALTriangulation, + padfX: *const f64, + padfY: *const f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationComputeBarycentricCoordinates( + psDT: *const GDALTriangulation, + nFacetIdx: libc::c_int, + dfX: f64, + dfY: f64, + pdfL1: *mut f64, + pdfL2: *mut f64, + pdfL3: *mut f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationFindFacetBruteForce( + psDT: *const GDALTriangulation, + dfX: f64, + dfY: f64, + panOutputFacetIdx: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationFindFacetDirected( + psDT: *const GDALTriangulation, + nFacetIdx: libc::c_int, + dfX: f64, + dfY: f64, + panOutputFacetIdx: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationFree(psDT: *mut GDALTriangulation); +} +extern "C" { + pub fn GDALTriangulationTerminate(); +} +extern "C" { + pub fn GDALOpenVerticalShiftGrid( + pszProj4Geoidgrids: *const libc::c_char, + pbError: *mut libc::c_int, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALApplyVerticalShiftGrid( + hSrcDataset: GDALDatasetH, + hGridDataset: GDALDatasetH, + bInverse: libc::c_int, + dfSrcUnitToMeter: f64, + dfDstUnitToMeter: f64, + papszOptions: *const *const libc::c_char, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALInfoOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALInfoOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALInfoOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALInfoOptionsForBinary, + ) -> *mut GDALInfoOptions; +} +extern "C" { + pub fn GDALInfoOptionsFree(psOptions: *mut GDALInfoOptions); +} +extern "C" { + pub fn GDALInfo(hDataset: GDALDatasetH, psOptions: *const GDALInfoOptions) + -> *mut libc::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTranslateOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTranslateOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALTranslateOptionsForBinary, + ) -> *mut GDALTranslateOptions; +} +extern "C" { + pub fn GDALTranslateOptionsFree(psOptions: *mut GDALTranslateOptions); +} +extern "C" { + pub fn GDALTranslateOptionsSetProgress( + psOptions: *mut GDALTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALTranslate( + pszDestFilename: *const libc::c_char, + hSrcDataset: GDALDatasetH, + psOptions: *const GDALTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpAppOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpAppOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALWarpAppOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALWarpAppOptionsForBinary, + ) -> *mut GDALWarpAppOptions; +} +extern "C" { + pub fn GDALWarpAppOptionsFree(psOptions: *mut GDALWarpAppOptions); +} +extern "C" { + pub fn GDALWarpAppOptionsSetProgress( + psOptions: *mut GDALWarpAppOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALWarpAppOptionsSetQuiet(psOptions: *mut GDALWarpAppOptions, bQuiet: libc::c_int); +} +extern "C" { + pub fn GDALWarpAppOptionsSetWarpOption( + psOptions: *mut GDALWarpAppOptions, + pszKey: *const libc::c_char, + pszValue: *const libc::c_char, + ); +} +extern "C" { + pub fn GDALWarp( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALWarpAppOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALVectorTranslateOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALVectorTranslateOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALVectorTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALVectorTranslateOptionsForBinary, + ) -> *mut GDALVectorTranslateOptions; +} +extern "C" { + pub fn GDALVectorTranslateOptionsFree(psOptions: *mut GDALVectorTranslateOptions); +} +extern "C" { + pub fn GDALVectorTranslateOptionsSetProgress( + psOptions: *mut GDALVectorTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pDstValidityMaskFuncArg) - ) +} +extern "C" { + pub fn GDALVectorTranslate( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALVectorTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDEMProcessingOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDEMProcessingOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALDEMProcessingOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALDEMProcessingOptionsForBinary, + ) -> *mut GDALDEMProcessingOptions; +} +extern "C" { + pub fn GDALDEMProcessingOptionsFree(psOptions: *mut GDALDEMProcessingOptions); +} +extern "C" { + pub fn GDALDEMProcessingOptionsSetProgress( + psOptions: *mut GDALDEMProcessingOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ - as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPreWarpChunkProcessor) - ) +} +extern "C" { + pub fn GDALDEMProcessing( + pszDestFilename: *const libc::c_char, + hSrcDataset: GDALDatasetH, + pszProcessing: *const libc::c_char, + pszColorFilename: *const libc::c_char, + psOptions: *const GDALDEMProcessingOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALNearblackOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALNearblackOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALNearblackOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALNearblackOptionsForBinary, + ) -> *mut GDALNearblackOptions; +} +extern "C" { + pub fn GDALNearblackOptionsFree(psOptions: *mut GDALNearblackOptions); +} +extern "C" { + pub fn GDALNearblackOptionsSetProgress( + psOptions: *mut GDALNearblackOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPreWarpProcessorArg) - ) +} +extern "C" { + pub fn GDALNearblack( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + hSrcDS: GDALDatasetH, + psOptions: *const GDALNearblackOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALGridOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALGridOptionsForBinary, + ) -> *mut GDALGridOptions; +} +extern "C" { + pub fn GDALGridOptionsFree(psOptions: *mut GDALGridOptions); +} +extern "C" { + pub fn GDALGridOptionsSetProgress( + psOptions: *mut GDALGridOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ - as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pfnPostWarpChunkProcessor) - ) +} +extern "C" { + pub fn GDALGrid( + pszDest: *const libc::c_char, + hSrcDS: GDALDatasetH, + psOptions: *const GDALGridOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterizeOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterizeOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALRasterizeOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALRasterizeOptionsForBinary, + ) -> *mut GDALRasterizeOptions; +} +extern "C" { + pub fn GDALRasterizeOptionsFree(psOptions: *mut GDALRasterizeOptions); +} +extern "C" { + pub fn GDALRasterizeOptionsSetProgress( + psOptions: *mut GDALRasterizeOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(pPostWarpProcessorArg) - ) +} +extern "C" { + pub fn GDALRasterize( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + hSrcDS: GDALDatasetH, + psOptions: *const GDALRasterizeOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALBuildVRTOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALBuildVRTOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALBuildVRTOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALBuildVRTOptionsForBinary, + ) -> *mut GDALBuildVRTOptions; +} +extern "C" { + pub fn GDALBuildVRTOptionsFree(psOptions: *mut GDALBuildVRTOptions); +} +extern "C" { + pub fn GDALBuildVRTOptionsSetProgress( + psOptions: *mut GDALBuildVRTOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hCutline) - ) +} +extern "C" { + pub fn GDALBuildVRT( + pszDest: *const libc::c_char, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + papszSrcDSNames: *const *const libc::c_char, + psOptions: *const GDALBuildVRTOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimInfoOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimInfoOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALMultiDimInfoOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALMultiDimInfoOptionsForBinary, + ) -> *mut GDALMultiDimInfoOptions; +} +extern "C" { + pub fn GDALMultiDimInfoOptionsFree(psOptions: *mut GDALMultiDimInfoOptions); +} +extern "C" { + pub fn GDALMultiDimInfo( + hDataset: GDALDatasetH, + psOptions: *const GDALMultiDimInfoOptions, + ) -> *mut libc::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimTranslateOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimTranslateOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALMultiDimTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALMultiDimTranslateOptionsForBinary, + ) -> *mut GDALMultiDimTranslateOptions; +} +extern "C" { + pub fn GDALMultiDimTranslateOptionsFree(psOptions: *mut GDALMultiDimTranslateOptions); +} +extern "C" { + pub fn GDALMultiDimTranslateOptionsSetProgress( + psOptions: *mut GDALMultiDimTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfCutlineBlendDist) - ) +} +extern "C" { + pub fn GDALMultiDimTranslate( + pszDest: *const libc::c_char, + hDstDataset: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALMultiDimTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +pub mod OGRAxisOrientation { + pub type Type = libc::c_uint; + pub const OAO_Other: Type = 0; + pub const OAO_North: Type = 1; + pub const OAO_South: Type = 2; + pub const OAO_East: Type = 3; + pub const OAO_West: Type = 4; + pub const OAO_Up: Type = 5; + pub const OAO_Down: Type = 6; +} +extern "C" { + pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; +} +extern "C" { + pub fn OSRSetPROJSearchPaths(papszPaths: *const *const libc::c_char); +} +extern "C" { + pub fn OSRGetPROJSearchPaths() -> *mut *mut libc::c_char; +} +extern "C" { + pub fn OSRGetPROJVersion( + pnMajor: *mut libc::c_int, + pnMinor: *mut libc::c_int, + pnPatch: *mut libc::c_int, ); } extern "C" { - pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; + pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); + pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; + pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALWarpInitDstNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); } extern "C" { - pub fn GDALWarpInitSrcNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn GDALWarpInitNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn GDALWarpInitDstNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); + pub fn OSRRelease(arg1: OGRSpatialReferenceH); } extern "C" { - pub fn GDALWarpInitSrcNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); + pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - pub fn GDALWarpResolveWorkingDataType(arg1: *mut GDALWarpOptions); + pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALWarpInitDefaultBandMapping(arg1: *mut GDALWarpOptions, nBandCount: libc::c_int); + pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; + pub fn OSRImportFromWkt( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; + pub fn OSRImportFromProj4( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; + pub fn OSRImportFromESRI( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALCreateAndReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstFilename: *const libc::c_char, - pszDstWKT: *const libc::c_char, - hDstDriver: GDALDriverH, - papszCreateOptions: *mut *mut libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; + pub fn OSRImportFromPCI( + hSRS: OGRSpatialReferenceH, + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALAutoCreateWarpedVRT( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfMaxError: f64, - psOptions: *const GDALWarpOptions, - ) -> GDALDatasetH; + pub fn OSRImportFromUSGS( + arg1: OGRSpatialReferenceH, + arg2: libc::c_long, + arg3: libc::c_long, + arg4: *mut f64, + arg5: libc::c_long, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALAutoCreateWarpedVRTEx( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfMaxError: f64, - psOptions: *const GDALWarpOptions, - papszTransformerOptions: CSLConstList, - ) -> GDALDatasetH; + pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn GDALCreateWarpedVRT( - hSrcDS: GDALDatasetH, - nPixels: libc::c_int, - nLines: libc::c_int, - padfGeoTransform: *mut f64, - psOptions: *mut GDALWarpOptions, - ) -> GDALDatasetH; + pub fn OSRImportFromDict( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromPanorama( + arg1: OGRSpatialReferenceH, + arg2: libc::c_long, + arg3: libc::c_long, + arg4: libc::c_long, + arg5: *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromOzi( + arg1: OGRSpatialReferenceH, + arg2: *const *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromMICoordSys( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromERM( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) + -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToWktEx( + arg1: OGRSpatialReferenceH, + ppszResult: *mut *mut libc::c_char, + papszOptions: *const *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPrettyWkt( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPROJJSON( + hSRS: OGRSpatialReferenceH, + ppszReturn: *mut *mut libc::c_char, + papszOptions: *const *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToProj4( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPCI( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: *mut *mut libc::c_char, + arg4: *mut *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToUSGS( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_long, + arg3: *mut libc::c_long, + arg4: *mut *mut f64, + arg5: *mut libc::c_long, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToXML( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPanorama( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_long, + arg3: *mut libc::c_long, + arg4: *mut libc::c_long, + arg5: *mut libc::c_long, + arg6: *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToMICoordSys( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToERM( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_char, + arg3: *mut libc::c_char, + arg4: *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRConvertToOtherProjection( + hSRS: OGRSpatialReferenceH, + pszTargetProjection: *const libc::c_char, + papszOptions: *const *const libc::c_char, + ) -> OGRSpatialReferenceH; +} +extern "C" { + pub fn OSRGetName(hSRS: OGRSpatialReferenceH) -> *const libc::c_char; +} +extern "C" { + pub fn OSRSetAttrValue( + hSRS: OGRSpatialReferenceH, + pszNodePath: *const libc::c_char, + pszNewNodeValue: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetAttrValue( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + iChild: libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; + pub fn OSRSetAngularUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; } -#[doc = " Opaque type representing a GDALWarpOperation object"] -pub type GDALWarpOperationH = *mut libc::c_void; extern "C" { - pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; + pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; } extern "C" { - pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); + pub fn OSRSetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALChunkAndWarpImage( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; + pub fn OSRSetTargetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALChunkAndWarpMulti( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; + pub fn OSRSetLinearUnitsAndUpdateParameters( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALWarpRegion( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ) -> CPLErr::Type; + pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; } extern "C" { - pub fn GDALWarpRegionToBuffer( - arg1: GDALWarpOperationH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_void, - arg7: GDALDataType::Type, - arg8: libc::c_int, - arg9: libc::c_int, - arg10: libc::c_int, - arg11: libc::c_int, - ) -> CPLErr::Type; + pub fn OSRGetTargetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *mut *mut libc::c_char, + ) -> f64; } -pub mod OGRAxisOrientation { - #[doc = " Axis orientations (corresponds to CS_AxisOrientationEnum)."] - pub type Type = libc::c_uint; - #[doc = "< Other"] - pub const OAO_Other: Type = 0; - #[doc = "< North"] - pub const OAO_North: Type = 1; - #[doc = "< South"] - pub const OAO_South: Type = 2; - #[doc = "< East"] - pub const OAO_East: Type = 3; - #[doc = "< West"] - pub const OAO_West: Type = 4; - #[doc = "< Up (to space)"] - pub const OAO_Up: Type = 5; - #[doc = "< Down (to Earth center)"] - pub const OAO_Down: Type = 6; +extern "C" { + pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; } extern "C" { - pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; + pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRSetPROJSearchPaths(papszPaths: *const *const libc::c_char); + pub fn OSRIsDerivedGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRGetPROJSearchPaths() -> *mut *mut libc::c_char; + pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRGetPROJVersion( - pnMajor: *mut libc::c_int, - pnMinor: *mut libc::c_int, - pnPatch: *mut libc::c_int, - ); + pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; + pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; + pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; + pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); + pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRRelease(arg1: OGRSpatialReferenceH); + pub fn OSRIsSameEx( + arg1: OGRSpatialReferenceH, + arg2: OGRSpatialReferenceH, + papszOptions: *const *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; + pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; + pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, + pub fn OSRSetWellKnownGeogCS( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromProj4( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, + pub fn OSRSetFromUserInput( + hSRS: OGRSpatialReferenceH, + arg1: *const libc::c_char, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromESRI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, + pub fn OSRCopyGeogCSFrom( + hSRS: OGRSpatialReferenceH, + hSrcSRS: OGRSpatialReferenceH, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromPCI( + pub fn OSRSetTOWGS84( hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, + arg1: f64, + arg2: f64, + arg3: f64, + arg4: f64, + arg5: f64, + arg6: f64, + arg7: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromUSGS( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: *mut f64, - arg5: libc::c_long, + pub fn OSRGetTOWGS84( + hSRS: OGRSpatialReferenceH, + arg1: *mut f64, + arg2: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OSRAddGuessedTOWGS84(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromDict( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, + pub fn OSRSetCompoundCS( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + hHorizSRS: OGRSpatialReferenceH, + hVertSRS: OGRSpatialReferenceH, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromPanorama( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: libc::c_long, - arg5: *mut f64, - ) -> OGRErr::Type; + pub fn OSRPromoteTo3D(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) + -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromOzi( - arg1: OGRSpatialReferenceH, - arg2: *const *const libc::c_char, - ) -> OGRErr::Type; + pub fn OSRDemoteTo2D(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, + pub fn OSRSetGeogCS( + hSRS: OGRSpatialReferenceH, + pszGeogName: *const libc::c_char, + pszDatumName: *const libc::c_char, + pszEllipsoidName: *const libc::c_char, + dfSemiMajor: f64, + dfInvFlattening: f64, + pszPMName: *const libc::c_char, + dfPMOffset: f64, + pszUnits: *const libc::c_char, + dfConvertToRadians: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromERM( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, + pub fn OSRSetVertCS( + hSRS: OGRSpatialReferenceH, + pszVertCSName: *const libc::c_char, + pszVertDatumName: *const libc::c_char, + nVertDatumType: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; } extern "C" { - pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) - -> OGRErr::Type; + pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; } extern "C" { - pub fn OSRExportToWktEx( - arg1: OGRSpatialReferenceH, - ppszResult: *mut *mut libc::c_char, - papszOptions: *const *const libc::c_char, + pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRSetAuthority( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + pszAuthority: *const libc::c_char, + nCode: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToPrettyWkt( + pub fn OSRGetAuthorityCode( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRGetAuthorityName( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRGetAreaOfUse( + hSRS: OGRSpatialReferenceH, + pdfWestLongitudeDeg: *mut f64, + pdfSouthLatitudeDeg: *mut f64, + pdfEastLongitudeDeg: *mut f64, + pdfNorthLatitudeDeg: *mut f64, + ppszAreaName: *mut *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetProjParm( arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: libc::c_int, + arg2: *const libc::c_char, + arg3: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToPROJJSON( + pub fn OSRGetProjParm( hSRS: OGRSpatialReferenceH, - ppszReturn: *mut *mut libc::c_char, - papszOptions: *const *const libc::c_char, - ) -> OGRErr::Type; + pszParmName: *const libc::c_char, + dfDefault: f64, + arg1: *mut OGRErr::Type, + ) -> f64; } extern "C" { - pub fn OSRExportToProj4( + pub fn OSRSetNormProjParm( arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, + arg2: *const libc::c_char, + arg3: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToPCI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *mut *mut libc::c_char, - arg4: *mut *mut f64, - ) -> OGRErr::Type; + pub fn OSRGetNormProjParm( + hSRS: OGRSpatialReferenceH, + pszParmName: *const libc::c_char, + dfDefault: f64, + arg1: *mut OGRErr::Type, + ) -> f64; } extern "C" { - pub fn OSRExportToUSGS( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut *mut f64, - arg5: *mut libc::c_long, + pub fn OSRSetUTM( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNorth: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToXML( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; + pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; } extern "C" { - pub fn OSRExportToPanorama( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut libc::c_long, - arg5: *mut libc::c_long, - arg6: *mut f64, + pub fn OSRSetStatePlane( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNAD83: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, + pub fn OSRSetStatePlaneWithUnits( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNAD83: libc::c_int, + pszOverrideUnitName: *const libc::c_char, + dfOverrideUnit: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRExportToERM( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_char, - arg3: *mut libc::c_char, - arg4: *mut libc::c_char, - ) -> OGRErr::Type; + pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OSRFindMatches( + hSRS: OGRSpatialReferenceH, + papszOptions: *mut *mut libc::c_char, + pnEntries: *mut libc::c_int, + ppanMatchConfidence: *mut *mut libc::c_int, + ) -> *mut OGRSpatialReferenceH; } extern "C" { - pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OSRFreeSRSArray(pahSRS: *mut OGRSpatialReferenceH); } extern "C" { - pub fn OSRConvertToOtherProjection( - hSRS: OGRSpatialReferenceH, - pszTargetProjection: *const libc::c_char, - papszOptions: *const *const libc::c_char, - ) -> OGRSpatialReferenceH; + pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRGetName(hSRS: OGRSpatialReferenceH) -> *const libc::c_char; + pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRSetAttrValue( + pub fn OSRGetAxis( hSRS: OGRSpatialReferenceH, - pszNodePath: *const libc::c_char, - pszNewNodeValue: *const libc::c_char, - ) -> OGRErr::Type; + pszTargetKey: *const libc::c_char, + iAxis: libc::c_int, + peOrientation: *mut OGRAxisOrientation::Type, + ) -> *const libc::c_char; } extern "C" { - pub fn OSRGetAttrValue( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - iChild: libc::c_int, - ) -> *const libc::c_char; + pub fn OSRGetAxesCount(hSRS: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - pub fn OSRSetAngularUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, + pub fn OSRSetAxes( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + pszXAxisName: *const libc::c_char, + eXAxisOrientation: OGRAxisOrientation::Type, + pszYAxisName: *const libc::c_char, + eYAxisOrientation: OGRAxisOrientation::Type, ) -> OGRErr::Type; } +pub mod OSRAxisMappingStrategy { + pub type Type = libc::c_uint; + pub const OAMS_TRADITIONAL_GIS_ORDER: Type = 0; + pub const OAMS_AUTHORITY_COMPLIANT: Type = 1; + pub const OAMS_CUSTOM: Type = 2; +} extern "C" { - pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn OSRGetAxisMappingStrategy(hSRS: OGRSpatialReferenceH) -> OSRAxisMappingStrategy::Type; } extern "C" { - pub fn OSRSetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; + pub fn OSRSetAxisMappingStrategy( + hSRS: OGRSpatialReferenceH, + strategy: OSRAxisMappingStrategy::Type, + ); } extern "C" { - pub fn OSRSetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: f64, - ) -> OGRErr::Type; + pub fn OSRGetDataAxisToSRSAxisMapping( + hSRS: OGRSpatialReferenceH, + pnCount: *mut libc::c_int, + ) -> *const libc::c_int; } extern "C" { - pub fn OSRSetLinearUnitsAndUpdateParameters( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, + pub fn OSRSetDataAxisToSRSAxisMapping( + hSRS: OGRSpatialReferenceH, + nMappingSize: libc::c_int, + panMapping: *const libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn OSRSetACEA( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> f64; + pub fn OSRSetAE( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn OSRSetBonne( + hSRS: OGRSpatialReferenceH, + dfStandardParallel: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetCEA( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsDerivedGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetCS( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEC( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEckert( + hSRS: OGRSpatialReferenceH, + nVariation: libc::c_int, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEckertIV( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEckertVI( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEquirectangular( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetEquirectangular2( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfPseudoStdParallel1: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetGS( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetGH( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRIsSameEx( - arg1: OGRSpatialReferenceH, - arg2: OGRSpatialReferenceH, - papszOptions: *const *const libc::c_char, - ) -> libc::c_int; + pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; } extern "C" { - pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn OSRSetGEOS( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfSatelliteHeight: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn OSRSetGaussSchreiberTMercator( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn OSRSetGnomonic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetWellKnownGeogCS( + pub fn OSRSetHOM( hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfRectToSkew: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetFromUserInput( + pub fn OSRSetHOMAC( hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfRectToSkew: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRCopyGeogCSFrom( + pub fn OSRSetHOM2PNO( hSRS: OGRSpatialReferenceH, - hSrcSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfLat1: f64, + dfLong1: f64, + dfLat2: f64, + dfLong2: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetTOWGS84( + pub fn OSRSetIWMPolyconic( hSRS: OGRSpatialReferenceH, - arg1: f64, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - arg6: f64, - arg7: f64, + dfLat1: f64, + dfLat2: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetTOWGS84( + pub fn OSRSetKrovak( hSRS: OGRSpatialReferenceH, - arg1: *mut f64, - arg2: libc::c_int, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfPseudoStdParallelLat: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRAddGuessedTOWGS84(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OSRSetLAEA( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetCompoundCS( + pub fn OSRSetLCC( hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - hHorizSRS: OGRSpatialReferenceH, - hVertSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRPromoteTo3D(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) - -> OGRErr::Type; + pub fn OSRSetLCC1SP( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRDemoteTo2D(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn OSRSetLCCB( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetGeogCS( + pub fn OSRSetMC( hSRS: OGRSpatialReferenceH, - pszGeogName: *const libc::c_char, - pszDatumName: *const libc::c_char, - pszEllipsoidName: *const libc::c_char, - dfSemiMajor: f64, - dfInvFlattening: f64, - pszPMName: *const libc::c_char, - dfPMOffset: f64, - pszUnits: *const libc::c_char, - dfConvertToRadians: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetVertCS( + pub fn OSRSetMercator( hSRS: OGRSpatialReferenceH, - pszVertCSName: *const libc::c_char, - pszVertDatumName: *const libc::c_char, - nVertDatumType: libc::c_int, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + pub fn OSRSetMercator2SP( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + pub fn OSRSetMollweide( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + pub fn OSRSetNZMG( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetAuthority( + pub fn OSRSetOS( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszAuthority: *const libc::c_char, - nCode: libc::c_int, + dfOriginLat: f64, + dfCMeridian: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAuthorityCode( + pub fn OSRSetOrthographic( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAuthorityName( + pub fn OSRSetPolyconic( hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAreaOfUse( + pub fn OSRSetPS( hSRS: OGRSpatialReferenceH, - pdfWestLongitudeDeg: *mut f64, - pdfSouthLatitudeDeg: *mut f64, - pdfEastLongitudeDeg: *mut f64, - pdfNorthLatitudeDeg: *mut f64, - ppszAreaName: *mut *const libc::c_char, - ) -> libc::c_int; + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OSRSetRobinson( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, + pub fn OSRSetSinusoidal( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetProjParm( + pub fn OSRSetStereographic( hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetNormProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, + pub fn OSRSetSOC( + hSRS: OGRSpatialReferenceH, + dfLatitudeOfOrigin: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetNormProjParm( + pub fn OSRSetTM( hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetUTM( + pub fn OSRSetTMVariant( hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNorth: libc::c_int, + pszVariantName: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; + pub fn OSRSetTMG( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetStatePlane( + pub fn OSRSetTMSO( hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRSetStatePlaneWithUnits( + pub fn OSRSetTPED( hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - pszOverrideUnitName: *const libc::c_char, - dfOverrideUnit: f64, + dfLat1: f64, + dfLong1: f64, + dfLat2: f64, + dfLong2: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, ) -> OGRErr::Type; } extern "C" { - pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn OSRSetVDG( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRFindMatches( + pub fn OSRSetWagner( hSRS: OGRSpatialReferenceH, - papszOptions: *mut *mut libc::c_char, - pnEntries: *mut libc::c_int, - ppanMatchConfidence: *mut *mut libc::c_int, - ) -> *mut OGRSpatialReferenceH; + nVariation: libc::c_int, + dfCenterLat: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRFreeSRSArray(pahSRS: *mut OGRSpatialReferenceH); + pub fn OSRSetQSC( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetSCH( + hSRS: OGRSpatialReferenceH, + dfPegLat: f64, + dfPegLong: f64, + dfPegHeading: f64, + dfPegHgt: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRSetVerticalPerspective( + hSRS: OGRSpatialReferenceH, + dfTopoOriginLat: f64, + dfTopoOriginLon: f64, + dfTopoOriginHeight: f64, + dfViewPointHeight: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; } extern "C" { - pub fn OSRGetAxis( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - iAxis: libc::c_int, - peOrientation: *mut OGRAxisOrientation::Type, - ) -> *const libc::c_char; + pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; } extern "C" { - pub fn OSRGetAxesCount(hSRS: OGRSpatialReferenceH) -> libc::c_int; + pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; } extern "C" { - pub fn OSRSetAxes( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszXAxisName: *const libc::c_char, - eXAxisOrientation: OGRAxisOrientation::Type, - pszYAxisName: *const libc::c_char, - eYAxisOrientation: OGRAxisOrientation::Type, - ) -> OGRErr::Type; + pub fn OSRCleanup(); } -pub mod OSRAxisMappingStrategy { - #[doc = " Data axis to CRS axis mapping strategy."] +pub mod OSRCRSType { pub type Type = libc::c_uint; - #[doc = "< Traditional GIS order"] - pub const OAMS_TRADITIONAL_GIS_ORDER: Type = 0; - #[doc = "< Compliant with the order mandated by the CRS authority"] - pub const OAMS_AUTHORITY_COMPLIANT: Type = 1; - #[doc = "< Custom"] - pub const OAMS_CUSTOM: Type = 2; + pub const OSR_CRS_TYPE_GEOGRAPHIC_2D: Type = 0; + pub const OSR_CRS_TYPE_GEOGRAPHIC_3D: Type = 1; + pub const OSR_CRS_TYPE_GEOCENTRIC: Type = 2; + pub const OSR_CRS_TYPE_PROJECTED: Type = 3; + pub const OSR_CRS_TYPE_VERTICAL: Type = 4; + pub const OSR_CRS_TYPE_COMPOUND: Type = 5; + pub const OSR_CRS_TYPE_OTHER: Type = 6; } -extern "C" { - pub fn OSRGetAxisMappingStrategy(hSRS: OGRSpatialReferenceH) -> OSRAxisMappingStrategy::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OSRCRSInfo { + pub pszAuthName: *mut libc::c_char, + pub pszCode: *mut libc::c_char, + pub pszName: *mut libc::c_char, + pub eType: OSRCRSType::Type, + pub bDeprecated: libc::c_int, + pub bBboxValid: libc::c_int, + pub dfWestLongitudeDeg: f64, + pub dfSouthLatitudeDeg: f64, + pub dfEastLongitudeDeg: f64, + pub dfNorthLatitudeDeg: f64, + pub pszAreaName: *mut libc::c_char, + pub pszProjectionMethod: *mut libc::c_char, } -extern "C" { - pub fn OSRSetAxisMappingStrategy( - hSRS: OGRSpatialReferenceH, - strategy: OSRAxisMappingStrategy::Type, +#[test] +fn bindgen_test_layout_OSRCRSInfo() { + assert_eq!( + ::std::mem::size_of::(), + 88usize, + concat!("Size of: ", stringify!(OSRCRSInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OSRCRSInfo)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszAuthName as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszAuthName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszCode as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszCode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszName as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(eType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bDeprecated as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(bDeprecated) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bBboxValid as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(bBboxValid) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfWestLongitudeDeg as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfWestLongitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfSouthLatitudeDeg as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfSouthLatitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfEastLongitudeDeg as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfEastLongitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfNorthLatitudeDeg as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfNorthLatitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszAreaName as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszAreaName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszProjectionMethod as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszProjectionMethod) + ) ); } -extern "C" { - pub fn OSRGetDataAxisToSRSAxisMapping( - hSRS: OGRSpatialReferenceH, - pnCount: *mut libc::c_int, - ) -> *const libc::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OSRCRSListParameters { + _unused: [u8; 0], } extern "C" { - pub fn OSRSetDataAxisToSRSAxisMapping( - hSRS: OGRSpatialReferenceH, - nMappingSize: libc::c_int, - panMapping: *const libc::c_int, - ) -> OGRErr::Type; + pub fn OSRGetCRSInfoListFromDatabase( + pszAuthName: *const libc::c_char, + params: *const OSRCRSListParameters, + pnOutResultCount: *mut libc::c_int, + ) -> *mut *mut OSRCRSInfo; } extern "C" { - #[doc = " Albers Conic Equal Area"] - pub fn OSRSetACEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OSRDestroyCRSInfoList(list: *mut *mut OSRCRSInfo); } extern "C" { - #[doc = " Azimuthal Equidistant"] - pub fn OSRSetAE( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTNewCoordinateTransformation( + hSourceSRS: OGRSpatialReferenceH, + hTargetSRS: OGRSpatialReferenceH, + ) -> OGRCoordinateTransformationH; } -extern "C" { - #[doc = " Bonne"] - pub fn OSRSetBonne( - hSRS: OGRSpatialReferenceH, - dfStandardParallel: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRCoordinateTransformationOptions { + _unused: [u8; 0], } +pub type OGRCoordinateTransformationOptionsH = *mut OGRCoordinateTransformationOptions; extern "C" { - #[doc = " Cylindrical Equal Area"] - pub fn OSRSetCEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTNewCoordinateTransformationOptions() -> OGRCoordinateTransformationOptionsH; } extern "C" { - #[doc = " Cassini-Soldner"] - pub fn OSRSetCS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTCoordinateTransformationOptionsSetOperation( + hOptions: OGRCoordinateTransformationOptionsH, + pszCO: *const libc::c_char, + bReverseCO: libc::c_int, + ) -> libc::c_int; } extern "C" { - #[doc = " Equidistant Conic"] - pub fn OSRSetEC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTCoordinateTransformationOptionsSetAreaOfInterest( + hOptions: OGRCoordinateTransformationOptionsH, + dfWestLongitudeDeg: f64, + dfSouthLatitudeDeg: f64, + dfEastLongitudeDeg: f64, + dfNorthLatitudeDeg: f64, + ) -> libc::c_int; } extern "C" { - #[doc = " Eckert I-VI"] - pub fn OSRSetEckert( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTDestroyCoordinateTransformationOptions(arg1: OGRCoordinateTransformationOptionsH); } extern "C" { - #[doc = " Eckert IV"] - pub fn OSRSetEckertIV( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTNewCoordinateTransformationEx( + hSourceSRS: OGRSpatialReferenceH, + hTargetSRS: OGRSpatialReferenceH, + hOptions: OGRCoordinateTransformationOptionsH, + ) -> OGRCoordinateTransformationH; } extern "C" { - #[doc = " Eckert VI"] - pub fn OSRSetEckertVI( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); } extern "C" { - #[doc = " Equirectangular"] - pub fn OSRSetEquirectangular( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTTransform( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + ) -> libc::c_int; } extern "C" { - #[doc = " Equirectangular generalized form"] - pub fn OSRSetEquirectangular2( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfPseudoStdParallel1: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTTransformEx( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + pabSuccess: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - #[doc = " Gall Stereograpic"] - pub fn OSRSetGS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn OCTTransform4D( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + t: *mut f64, + pabSuccess: *mut libc::c_int, + ) -> libc::c_int; } +pub type CPLThreadFunc = ::std::option::Option; extern "C" { - #[doc = " Goode Homolosine"] - pub fn OSRSetGH( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; } extern "C" { - #[doc = " Interrupted Goode Homolosine"] - pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn CPLUnlockFile(hLock: *mut libc::c_void); } extern "C" { - #[doc = " GEOS - Geostationary Satellite View"] - pub fn OSRSetGEOS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfSatelliteHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateMutex() -> *mut libc::c_void; } extern "C" { - #[doc = " Gauss Schreiber Transverse Mercator"] - pub fn OSRSetGaussSchreiberTMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; } extern "C" { - #[doc = " Gnomonic"] - pub fn OSRSetGnomonic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateOrAcquireMutex( + arg1: *mut *mut libc::c_void, + dfWaitInSeconds: f64, + ) -> libc::c_int; } extern "C" { - #[doc = " Hotine Oblique Mercator using azimuth angle"] - pub fn OSRSetHOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateOrAcquireMutexEx( + arg1: *mut *mut libc::c_void, + dfWaitInSeconds: f64, + nOptions: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetHOMAC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; } -extern "C" { - #[doc = " Hotine Oblique Mercator using two points on centerline"] - pub fn OSRSetHOM2PNO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; +extern "C" { + pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); } extern "C" { - #[doc = " International Map of the World Polyconic"] - pub fn OSRSetIWMPolyconic( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLat2: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); } extern "C" { - #[doc = " Krovak Oblique Conic Conformal"] - pub fn OSRSetKrovak( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfPseudoStdParallelLat: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCleanupMasterMutex(); } extern "C" { - #[doc = " Lambert Azimuthal Equal-Area"] - pub fn OSRSetLAEA( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateCond() -> *mut libc::c_void; } extern "C" { - #[doc = " Lambert Conformal Conic"] - pub fn OSRSetLCC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); +} +pub mod CPLCondTimedWaitReason { + pub type Type = libc::c_uint; + pub const COND_TIMED_WAIT_COND: Type = 0; + pub const COND_TIMED_WAIT_TIME_OUT: Type = 1; + pub const COND_TIMED_WAIT_OTHER: Type = 2; } extern "C" { - #[doc = " Lambert Conformal Conic 1SP"] - pub fn OSRSetLCC1SP( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondTimedWait( + hCond: *mut libc::c_void, + hMutex: *mut libc::c_void, + dfWaitInSeconds: f64, + ) -> CPLCondTimedWaitReason::Type; } extern "C" { - #[doc = " Lambert Conformal Conic (Belgium)"] - pub fn OSRSetLCCB( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondSignal(hCond: *mut libc::c_void); } extern "C" { - #[doc = " Miller Cylindrical"] - pub fn OSRSetMC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCondBroadcast(hCond: *mut libc::c_void); } extern "C" { - #[doc = " Mercator"] - pub fn OSRSetMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLDestroyCond(hCond: *mut libc::c_void); } extern "C" { - #[doc = " Mercator 2SP"] - pub fn OSRSetMercator2SP( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetPID() -> GIntBig; } extern "C" { - #[doc = " Mollweide"] - pub fn OSRSetMollweide( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetCurrentProcessID() -> libc::c_int; } extern "C" { - #[doc = " New Zealand Map Grid"] - pub fn OSRSetNZMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; } extern "C" { - #[doc = " Oblique Stereographic"] - pub fn OSRSetOS( - hSRS: OGRSpatialReferenceH, - dfOriginLat: f64, - dfCMeridian: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateJoinableThread( + pfnMain: CPLThreadFunc, + pArg: *mut libc::c_void, + ) -> *mut libc::c_void; } extern "C" { - #[doc = " Orthographic"] - pub fn OSRSetOrthographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); } extern "C" { - #[doc = " Polyconic"] - pub fn OSRSetPolyconic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLSleep(dfWaitInSeconds: f64); } extern "C" { - #[doc = " Polar Stereographic"] - pub fn OSRSetPS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetThreadingModel() -> *const libc::c_char; } extern "C" { - #[doc = " Robinson"] - pub fn OSRSetRobinson( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetNumCPUs() -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLLock { + _unused: [u8; 0], +} +pub type CPLLock = _CPLLock; +pub mod CPLLockType { + pub type Type = libc::c_uint; + pub const LOCK_RECURSIVE_MUTEX: Type = 0; + pub const LOCK_ADAPTIVE_MUTEX: Type = 1; + pub const LOCK_SPIN: Type = 2; } extern "C" { - #[doc = " Sinusoidal"] - pub fn OSRSetSinusoidal( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; } extern "C" { - #[doc = " Stereographic"] - pub fn OSRSetStereographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) + -> libc::c_int; } extern "C" { - #[doc = " Swiss Oblique Cylindrical"] - pub fn OSRSetSOC( - hSRS: OGRSpatialReferenceH, - dfLatitudeOfOrigin: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; } extern "C" { - #[doc = " Transverse Mercator"] - #[doc = ""] - #[doc = " Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 :"] - #[doc = " see OGRSpatialReference::exportToProj4()."] - pub fn OSRSetTM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLReleaseLock(arg1: *mut CPLLock); } extern "C" { - #[doc = " Transverse Mercator variant"] - pub fn OSRSetTMVariant( - hSRS: OGRSpatialReferenceH, - pszVariantName: *const libc::c_char, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLDestroyLock(arg1: *mut CPLLock); } extern "C" { - #[doc = " Tunesia Mining Grid"] - pub fn OSRSetTMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); } extern "C" { - #[doc = " Transverse Mercator (South Oriented)"] - pub fn OSRSetTMSO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; } extern "C" { - #[doc = " TPED (Two Point Equi Distant)"] - pub fn OSRSetTPED( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLGetTLSEx( + nIndex: libc::c_int, + pbMemoryErrorOccurred: *mut libc::c_int, + ) -> *mut libc::c_void; } extern "C" { - #[doc = " VanDerGrinten"] - pub fn OSRSetVDG( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); +} +pub type CPLTLSFreeFunc = ::std::option::Option; +extern "C" { + pub fn CPLSetTLSWithFreeFunc( + nIndex: libc::c_int, + pData: *mut libc::c_void, + pfnFree: CPLTLSFreeFunc, + ); } extern "C" { - #[doc = " Wagner I -- VII"] - pub fn OSRSetWagner( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCenterLat: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn CPLSetTLSWithFreeFuncEx( + nIndex: libc::c_int, + pData: *mut libc::c_void, + pfnFree: CPLTLSFreeFunc, + pbMemoryErrorOccurred: *mut libc::c_int, + ); } extern "C" { - #[doc = " Quadrilateralized Spherical Cube"] - pub fn OSRSetQSC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - ) -> OGRErr::Type; + pub fn CPLCleanupTLS(); } -extern "C" { - #[doc = " Spherical, Cross-track, Height"] - pub fn OSRSetSCH( - hSRS: OGRSpatialReferenceH, - dfPegLat: f64, - dfPegLong: f64, - dfPegHeading: f64, - dfPegHgt: f64, - ) -> OGRErr::Type; +pub mod GDALResampleAlg { + pub type Type = libc::c_uint; + pub const GRA_NearestNeighbour: Type = 0; + pub const GRA_Bilinear: Type = 1; + pub const GRA_Cubic: Type = 2; + pub const GRA_CubicSpline: Type = 3; + pub const GRA_Lanczos: Type = 4; + pub const GRA_Average: Type = 5; + pub const GRA_Mode: Type = 6; + pub const GRA_Max: Type = 8; + pub const GRA_Min: Type = 9; + pub const GRA_Med: Type = 10; + pub const GRA_Q1: Type = 11; + pub const GRA_Q3: Type = 12; + pub const GRA_Sum: Type = 13; } +pub type GDALMaskFunc = ::std::option::Option< + unsafe extern "C" fn( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + papabyImageData: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pMask: *mut libc::c_void, + ) -> libc::c_int, +>; extern "C" { - #[doc = " Vertical Perspective / Near-sided Perspective"] - pub fn OSRSetVerticalPerspective( - hSRS: OGRSpatialReferenceH, - dfTopoOriginLat: f64, - dfTopoOriginLon: f64, - dfTopoOriginHeight: f64, - dfViewPointHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpNoDataMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + papabyImageData: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + pbOutAllValid: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; + pub fn GDALWarpDstAlphaMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; + pub fn GDALWarpSrcAlphaMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + pbOutAllOpaque: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCleanup(); + pub fn GDALWarpSrcMaskMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; } -pub mod OSRCRSType { - #[doc = " \\brief Type of Coordinate Reference System (CRS)."] - pub type Type = libc::c_uint; - #[doc = " Geographic 2D CRS"] - pub const OSR_CRS_TYPE_GEOGRAPHIC_2D: Type = 0; - #[doc = " Geographic 3D CRS"] - pub const OSR_CRS_TYPE_GEOGRAPHIC_3D: Type = 1; - #[doc = " Geocentric CRS"] - pub const OSR_CRS_TYPE_GEOCENTRIC: Type = 2; - #[doc = " Projected CRS"] - pub const OSR_CRS_TYPE_PROJECTED: Type = 3; - #[doc = " Vertical CRS"] - pub const OSR_CRS_TYPE_VERTICAL: Type = 4; - #[doc = " Compound CRS"] - pub const OSR_CRS_TYPE_COMPOUND: Type = 5; - #[doc = " Other"] - pub const OSR_CRS_TYPE_OTHER: Type = 6; +extern "C" { + pub fn GDALWarpCutlineMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; } -#[doc = " \\brief Structure given overall description of a CRS."] -#[doc = ""] -#[doc = " This structure may grow over time, and should not be directly allocated by"] -#[doc = " client code."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OSRCRSInfo { - #[doc = " Authority name."] - pub pszAuthName: *mut libc::c_char, - #[doc = " Object code."] - pub pszCode: *mut libc::c_char, - #[doc = " Object name."] - pub pszName: *mut libc::c_char, - #[doc = " Object type."] - pub eType: OSRCRSType::Type, - #[doc = " Whether the object is deprecated"] - pub bDeprecated: libc::c_int, - #[doc = " Whereas the west_lon_degree, south_lat_degree, east_lon_degree and"] - #[doc = " north_lat_degree fields are valid."] - pub bBboxValid: libc::c_int, - #[doc = " Western-most longitude of the area of use, in degrees."] - pub dfWestLongitudeDeg: f64, - #[doc = " Southern-most latitude of the area of use, in degrees."] - pub dfSouthLatitudeDeg: f64, - #[doc = " Eastern-most longitude of the area of use, in degrees."] - pub dfEastLongitudeDeg: f64, - #[doc = " Northern-most latitude of the area of use, in degrees."] - pub dfNorthLatitudeDeg: f64, - #[doc = " Name of the area of use."] - pub pszAreaName: *mut libc::c_char, - #[doc = " Name of the projection method for a projected CRS. Might be NULL even"] - #[doc = "for projected CRS in some cases."] - pub pszProjectionMethod: *mut libc::c_char, +pub struct GDALWarpOptions { + pub papszWarpOptions: *mut *mut libc::c_char, + pub dfWarpMemoryLimit: f64, + pub eResampleAlg: GDALResampleAlg::Type, + pub eWorkingDataType: GDALDataType::Type, + pub hSrcDS: GDALDatasetH, + pub hDstDS: GDALDatasetH, + pub nBandCount: libc::c_int, + pub panSrcBands: *mut libc::c_int, + pub panDstBands: *mut libc::c_int, + pub nSrcAlphaBand: libc::c_int, + pub nDstAlphaBand: libc::c_int, + pub padfSrcNoDataReal: *mut f64, + pub padfSrcNoDataImag: *mut f64, + pub padfDstNoDataReal: *mut f64, + pub padfDstNoDataImag: *mut f64, + pub pfnProgress: GDALProgressFunc, + pub pProgressArg: *mut libc::c_void, + pub pfnTransformer: GDALTransformerFunc, + pub pTransformerArg: *mut libc::c_void, + pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, + pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, + pub pfnSrcValidityMaskFunc: GDALMaskFunc, + pub pSrcValidityMaskFuncArg: *mut libc::c_void, + pub pfnSrcDensityMaskFunc: GDALMaskFunc, + pub pSrcDensityMaskFuncArg: *mut libc::c_void, + pub pfnDstDensityMaskFunc: GDALMaskFunc, + pub pDstDensityMaskFuncArg: *mut libc::c_void, + pub pfnDstValidityMaskFunc: GDALMaskFunc, + pub pDstValidityMaskFuncArg: *mut libc::c_void, + pub pfnPreWarpChunkProcessor: ::std::option::Option< + unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, + >, + pub pPreWarpProcessorArg: *mut libc::c_void, + pub pfnPostWarpChunkProcessor: ::std::option::Option< + unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, + >, + pub pPostWarpProcessorArg: *mut libc::c_void, + pub hCutline: *mut libc::c_void, + pub dfCutlineBlendDist: f64, } #[test] -fn bindgen_test_layout_OSRCRSInfo() { +fn bindgen_test_layout_GDALWarpOptions() { + assert_eq!( + ::std::mem::size_of::(), + 264usize, + concat!("Size of: ", stringify!(GDALWarpOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALWarpOptions)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papszWarpOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(dfWarpMemoryLimit) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(eResampleAlg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(eWorkingDataType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hSrcDS) + ) + ); assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hDstDS) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nBandCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(panSrcBands) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(panDstBands) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nSrcAlphaBand) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nDstAlphaBand) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfSrcNoDataReal) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfSrcNoDataImag) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize + }, 88usize, - concat!("Size of: ", stringify!(OSRCRSInfo)) + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfDstNoDataReal) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OSRCRSInfo)) + unsafe { + &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfDstNoDataImag) + ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAuthName as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, + 104usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszAuthName) + stringify!(pfnProgress) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszCode as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, + 112usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszCode) + stringify!(pProgressArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszName as *const _ as usize }, - 16usize, + unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, + 120usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszName) + stringify!(pfnTransformer) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 24usize, + unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, + 128usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(eType) + stringify!(pTransformerArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bDeprecated as *const _ as usize }, - 28usize, + unsafe { + &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ + as usize + }, + 136usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(bDeprecated) + stringify!(papfnSrcPerBandValidityMaskFunc) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bBboxValid as *const _ as usize }, - 32usize, + unsafe { + &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ + as usize + }, + 144usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papSrcPerBandValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnSrcValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize + }, + 160usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pSrcValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize + }, + 168usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnSrcDensityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize + }, + 176usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pSrcDensityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize + }, + 184usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnDstDensityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize + }, + 192usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pDstDensityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize + }, + 200usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnDstValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize + }, + 208usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(bBboxValid) + stringify!(pDstValidityMaskFuncArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfWestLongitudeDeg as *const _ as usize }, - 40usize, + unsafe { + &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ + as usize + }, + 216usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfWestLongitudeDeg) + stringify!(pfnPreWarpChunkProcessor) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSouthLatitudeDeg as *const _ as usize }, - 48usize, + unsafe { + &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize + }, + 224usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfSouthLatitudeDeg) + stringify!(pPreWarpProcessorArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfEastLongitudeDeg as *const _ as usize }, - 56usize, + unsafe { + &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ + as usize + }, + 232usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfEastLongitudeDeg) + stringify!(pfnPostWarpChunkProcessor) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfNorthLatitudeDeg as *const _ as usize }, - 64usize, + unsafe { + &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize + }, + 240usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(dfNorthLatitudeDeg) + stringify!(pPostWarpProcessorArg) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAreaName as *const _ as usize }, - 72usize, + unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, + 248usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszAreaName) + stringify!(hCutline) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszProjectionMethod as *const _ as usize }, - 80usize, + unsafe { + &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize + }, + 256usize, concat!( "Offset of field: ", - stringify!(OSRCRSInfo), + stringify!(GDALWarpOptions), "::", - stringify!(pszProjectionMethod) + stringify!(dfCutlineBlendDist) ) ); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OSRCRSListParameters { - _unused: [u8; 0], +extern "C" { + pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; } extern "C" { - pub fn OSRGetCRSInfoListFromDatabase( - pszAuthName: *const libc::c_char, - params: *const OSRCRSListParameters, - pnOutResultCount: *mut libc::c_int, - ) -> *mut *mut OSRCRSInfo; + pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); } extern "C" { - pub fn OSRDestroyCRSInfoList(list: *mut *mut OSRCRSInfo); + pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; } extern "C" { - pub fn OCTNewCoordinateTransformation( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - ) -> OGRCoordinateTransformationH; + pub fn GDALWarpInitDstNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRCoordinateTransformationOptions { - _unused: [u8; 0], +extern "C" { + pub fn GDALWarpInitSrcNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } -#[doc = " Coordinate transformation options."] -pub type OGRCoordinateTransformationOptionsH = *mut OGRCoordinateTransformationOptions; extern "C" { - pub fn OCTNewCoordinateTransformationOptions() -> OGRCoordinateTransformationOptionsH; + pub fn GDALWarpInitNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } extern "C" { - pub fn OCTCoordinateTransformationOptionsSetOperation( - hOptions: OGRCoordinateTransformationOptionsH, - pszCO: *const libc::c_char, - bReverseCO: libc::c_int, - ) -> libc::c_int; + pub fn GDALWarpInitDstNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); } extern "C" { - pub fn OCTCoordinateTransformationOptionsSetAreaOfInterest( - hOptions: OGRCoordinateTransformationOptionsH, - dfWestLongitudeDeg: f64, - dfSouthLatitudeDeg: f64, - dfEastLongitudeDeg: f64, - dfNorthLatitudeDeg: f64, - ) -> libc::c_int; + pub fn GDALWarpInitSrcNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); } extern "C" { - pub fn OCTDestroyCoordinateTransformationOptions(arg1: OGRCoordinateTransformationOptionsH); + pub fn GDALWarpResolveWorkingDataType(arg1: *mut GDALWarpOptions); } extern "C" { - pub fn OCTNewCoordinateTransformationEx( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - hOptions: OGRCoordinateTransformationOptionsH, - ) -> OGRCoordinateTransformationH; + pub fn GDALWarpInitDefaultBandMapping(arg1: *mut GDALWarpOptions, nBandCount: libc::c_int); } extern "C" { - pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); + pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; } extern "C" { - pub fn OCTTransform( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - ) -> libc::c_int; + pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; } extern "C" { - pub fn OCTTransformEx( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALReprojectImage( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + hDstDS: GDALDatasetH, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfWarpMemoryLimit: f64, + dfMaxError: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + psOptions: *mut GDALWarpOptions, + ) -> CPLErr::Type; } extern "C" { - pub fn OCTTransform4D( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - t: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALCreateAndReprojectImage( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstFilename: *const libc::c_char, + pszDstWKT: *const libc::c_char, + hDstDriver: GDALDriverH, + papszCreateOptions: *mut *mut libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfWarpMemoryLimit: f64, + dfMaxError: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + psOptions: *mut GDALWarpOptions, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALAutoCreateWarpedVRT( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfMaxError: f64, + psOptions: *const GDALWarpOptions, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALAutoCreateWarpedVRTEx( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfMaxError: f64, + psOptions: *const GDALWarpOptions, + papszTransformerOptions: CSLConstList, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALCreateWarpedVRT( + hSrcDS: GDALDatasetH, + nPixels: libc::c_int, + nLines: libc::c_int, + padfGeoTransform: *mut f64, + psOptions: *mut GDALWarpOptions, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; +} +pub type GDALWarpOperationH = *mut libc::c_void; +extern "C" { + pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; +} +extern "C" { + pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); +} +extern "C" { + pub fn GDALChunkAndWarpImage( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALChunkAndWarpMulti( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpRegion( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: libc::c_int, + arg9: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpRegionToBuffer( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: *mut libc::c_void, + arg7: GDALDataType::Type, + arg8: libc::c_int, + arg9: libc::c_int, + arg10: libc::c_int, + arg11: libc::c_int, + ) -> CPLErr::Type; } pub mod OGRErr { #[doc = " Type for a OGR error"] diff --git a/gdal-sys/prebuilt-bindings/gdal_2.3.rs b/gdal-sys/prebuilt-bindings/gdal_3.3.rs similarity index 72% rename from gdal-sys/prebuilt-bindings/gdal_2.3.rs rename to gdal-sys/prebuilt-bindings/gdal_3.3.rs index f29b578a..476b8e21 100644 --- a/gdal-sys/prebuilt-bindings/gdal_2.3.rs +++ b/gdal-sys/prebuilt-bindings/gdal_3.3.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen */ +/* automatically generated by rust-bindgen 0.59.1 */ pub type va_list = __builtin_va_list; pub type __dev_t = libc::c_ulong; @@ -366,6 +366,7 @@ fn bindgen_test_layout__IO_FILE() { ) ); } +pub type wchar_t = libc::c_int; pub type time_t = __time_t; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -544,23 +545,65 @@ fn bindgen_test_layout_tm() { ) ); } -#[doc = " Int32 type"] pub type GInt32 = libc::c_int; -#[doc = " Unsigned int32 type"] pub type GUInt32 = libc::c_uint; -#[doc = " Int16 type"] pub type GInt16 = libc::c_short; -#[doc = " Unsigned byte type"] pub type GByte = libc::c_uchar; -#[doc = " Large signed integer type (generally 64-bit integer type)."] -#[doc = " Use GInt64 when exactly 64 bit is needed"] pub type GIntBig = libc::c_longlong; -#[doc = " Large unsigned integer type (generally 64-bit unsigned integer type)."] -#[doc = " Use GUInt64 when exactly 64 bit is needed"] pub type GUIntBig = libc::c_ulonglong; -#[doc = " Type of a constant null-terminated list of nul terminated strings."] -#[doc = " Seen as char** from C and const char* const* from C++"] +pub type GInt64 = GIntBig; +pub type GUInt64 = GUIntBig; +pub type GPtrDiff_t = GIntBig; pub type CSLConstList = *mut *mut libc::c_char; +extern "C" { + pub fn CPLAtomicAdd(ptr: *mut libc::c_int, increment: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn CPLAtomicCompareAndExchange( + ptr: *mut libc::c_int, + oldval: libc::c_int, + newval: libc::c_int, + ) -> libc::c_int; +} +pub type GDALProgressFunc = ::std::option::Option< + unsafe extern "C" fn( + dfComplete: f64, + pszMessage: *const libc::c_char, + pProgressArg: *mut libc::c_void, + ) -> libc::c_int, +>; +extern "C" { + pub fn GDALDummyProgress( + arg1: f64, + arg2: *const libc::c_char, + arg3: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTermProgress( + arg1: f64, + arg2: *const libc::c_char, + arg3: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALScaledProgress( + arg1: f64, + arg2: *const libc::c_char, + arg3: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateScaledProgress( + arg1: f64, + arg2: f64, + arg3: GDALProgressFunc, + arg4: *mut libc::c_void, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyScaledProgress(arg1: *mut libc::c_void); +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct stat { @@ -744,7 +787,6 @@ fn bindgen_test_layout_stat() { ); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn VSIFOpen(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut FILE; } extern "C" { @@ -794,14 +836,11 @@ extern "C" { extern "C" { pub fn VSIFEof(arg1: *mut FILE) -> libc::c_int; } -#[doc = " @cond Doxygen_Suppress"] pub type VSIStatBuf = stat; extern "C" { pub fn VSIStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; } -#[doc = " Type for a file offset"] pub type vsi_l_offset = GUIntBig; -#[doc = " Opaque type for a FILE that implements the VSIVirtualHandle API"] pub type VSILFILE = FILE; extern "C" { pub fn VSIFOpenL(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut VSILFILE; @@ -813,6 +852,14 @@ extern "C" { arg3: libc::c_int, ) -> *mut VSILFILE; } +extern "C" { + pub fn VSIFOpenEx2L( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: libc::c_int, + arg4: CSLConstList, + ) -> *mut VSILFILE; +} extern "C" { pub fn VSIFCloseL(arg1: *mut VSILFILE) -> libc::c_int; } @@ -866,13 +913,9 @@ extern "C" { pub fn VSIFPutcL(arg1: libc::c_int, arg2: *mut VSILFILE) -> libc::c_int; } pub mod VSIRangeStatus { - #[doc = " Range status"] - pub type Type = u32; - #[doc = "< Unknown"] + pub type Type = libc::c_uint; pub const VSI_RANGE_STATUS_UNKNOWN: Type = 0; - #[doc = "< Data present"] pub const VSI_RANGE_STATUS_DATA: Type = 1; - #[doc = "< Hole"] pub const VSI_RANGE_STATUS_HOLE: Type = 2; } extern "C" { @@ -891,12 +934,17 @@ extern "C" { nMaxSize: GIntBig, ) -> libc::c_int; } +extern "C" { + pub fn VSIOverwriteFile( + fpTarget: *mut VSILFILE, + pszSourceFilename: *const libc::c_char, + ) -> libc::c_int; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct stat64 { _unused: [u8; 0], } -#[doc = " Type for VSIStatL()"] pub type VSIStatBufL = stat64; extern "C" { pub fn VSIStatL(arg1: *const libc::c_char, arg2: *mut VSIStatBufL) -> libc::c_int; @@ -935,6 +983,21 @@ extern "C" { extern "C" { pub fn VSIFGetNativeFileDescriptorL(arg1: *mut VSILFILE) -> *mut libc::c_void; } +extern "C" { + pub fn VSIGetFileMetadata( + pszFilename: *const libc::c_char, + pszDomain: *const libc::c_char, + papszOptions: CSLConstList, + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn VSISetFileMetadata( + pszFilename: *const libc::c_char, + papszMetadata: CSLConstList, + pszDomain: *const libc::c_char, + papszOptions: CSLConstList, + ) -> libc::c_int; +} extern "C" { pub fn VSICalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } @@ -967,23 +1030,12 @@ extern "C" { ) -> *mut libc::c_void; } extern "C" { - #[doc = "VSIMalloc2 allocates (nSize1 * nSize2) bytes."] - #[doc = "In case of overflow of the multiplication, or if memory allocation fails, a"] - #[doc = "NULL pointer is returned and a CE_Failure error is raised with CPLError()."] - #[doc = "If nSize1 == 0 || nSize2 == 0, a NULL pointer will also be returned."] - #[doc = "CPLFree() or VSIFree() can be used to free memory allocated by this function."] pub fn VSIMalloc2(nSize1: usize, nSize2: usize) -> *mut libc::c_void; } extern "C" { - #[doc = "VSIMalloc3 allocates (nSize1 * nSize2 * nSize3) bytes."] - #[doc = "In case of overflow of the multiplication, or if memory allocation fails, a"] - #[doc = "NULL pointer is returned and a CE_Failure error is raised with CPLError()."] - #[doc = "If nSize1 == 0 || nSize2 == 0 || nSize3 == 0, a NULL pointer will also be returned."] - #[doc = "CPLFree() or VSIFree() can be used to free memory allocated by this function."] pub fn VSIMalloc3(nSize1: usize, nSize2: usize, nSize3: usize) -> *mut libc::c_void; } extern "C" { - #[doc = " VSIMallocVerbose"] pub fn VSIMallocVerbose( nSize: usize, pszFile: *const libc::c_char, @@ -991,7 +1043,6 @@ extern "C" { ) -> *mut libc::c_void; } extern "C" { - #[doc = " VSIMalloc2Verbose"] pub fn VSIMalloc2Verbose( nSize1: usize, nSize2: usize, @@ -1000,7 +1051,6 @@ extern "C" { ) -> *mut libc::c_void; } extern "C" { - #[doc = " VSIMalloc3Verbose"] pub fn VSIMalloc3Verbose( nSize1: usize, nSize2: usize, @@ -1010,7 +1060,6 @@ extern "C" { ) -> *mut libc::c_void; } extern "C" { - #[doc = " VSICallocVerbose"] pub fn VSICallocVerbose( nCount: usize, nSize: usize, @@ -1019,7 +1068,6 @@ extern "C" { ) -> *mut libc::c_void; } extern "C" { - #[doc = " VSIReallocVerbose"] pub fn VSIReallocVerbose( pOldPtr: *mut libc::c_void, nNewSize: usize, @@ -1028,7 +1076,6 @@ extern "C" { ) -> *mut libc::c_void; } extern "C" { - #[doc = " VSIStrdupVerbose"] pub fn VSIStrdupVerbose( pszStr: *const libc::c_char, pszFile: *const libc::c_char, @@ -1053,6 +1100,132 @@ extern "C" { nMaxFiles: libc::c_int, ) -> *mut *mut libc::c_char; } +extern "C" { + pub fn VSISiblingFiles(pszPath: *const libc::c_char) -> *mut *mut libc::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct VSIDIR { + _unused: [u8; 0], +} +extern "C" { + pub fn VSIOpenDir( + pszPath: *const libc::c_char, + nRecurseDepth: libc::c_int, + papszOptions: *const *const libc::c_char, + ) -> *mut VSIDIR; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct VSIDIREntry { + pub pszName: *mut libc::c_char, + pub nMode: libc::c_int, + pub nSize: vsi_l_offset, + pub nMTime: GIntBig, + pub bModeKnown: libc::c_char, + pub bSizeKnown: libc::c_char, + pub bMTimeKnown: libc::c_char, + pub papszExtra: *mut *mut libc::c_char, +} +#[test] +fn bindgen_test_layout_VSIDIREntry() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(VSIDIREntry)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(VSIDIREntry)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszName as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(VSIDIREntry), + "::", + stringify!(pszName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMode as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(VSIDIREntry), + "::", + stringify!(nMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nSize as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(VSIDIREntry), + "::", + stringify!(nSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMTime as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(VSIDIREntry), + "::", + stringify!(nMTime) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bModeKnown as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(VSIDIREntry), + "::", + stringify!(bModeKnown) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bSizeKnown as *const _ as usize }, + 33usize, + concat!( + "Offset of field: ", + stringify!(VSIDIREntry), + "::", + stringify!(bSizeKnown) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bMTimeKnown as *const _ as usize }, + 34usize, + concat!( + "Offset of field: ", + stringify!(VSIDIREntry), + "::", + stringify!(bMTimeKnown) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).papszExtra as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(VSIDIREntry), + "::", + stringify!(papszExtra) + ) + ); +} +extern "C" { + pub fn VSIGetNextDirEntry(dir: *mut VSIDIR) -> *const VSIDIREntry; +} +extern "C" { + pub fn VSICloseDir(dir: *mut VSIDIR); +} extern "C" { pub fn VSIMkdir(pszPathname: *const libc::c_char, mode: libc::c_long) -> libc::c_int; } @@ -1068,24 +1241,43 @@ extern "C" { extern "C" { pub fn VSIUnlink(pszFilename: *const libc::c_char) -> libc::c_int; } +extern "C" { + pub fn VSIUnlinkBatch(papszFiles: CSLConstList) -> *mut libc::c_int; +} extern "C" { pub fn VSIRename(oldpath: *const libc::c_char, newpath: *const libc::c_char) -> libc::c_int; } +extern "C" { + pub fn VSISync( + pszSource: *const libc::c_char, + pszTarget: *const libc::c_char, + papszOptions: *const *const libc::c_char, + pProgressFunc: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ppapszOutputs: *mut *mut *mut libc::c_char, + ) -> libc::c_int; +} extern "C" { pub fn VSIStrerror(arg1: libc::c_int) -> *mut libc::c_char; } extern "C" { pub fn VSIGetDiskFreeSpace(pszDirname: *const libc::c_char) -> GIntBig; } +extern "C" { + pub fn VSINetworkStatsReset(); +} +extern "C" { + pub fn VSINetworkStatsGetAsSerializedJSON( + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_char; +} extern "C" { pub fn VSIInstallMemFileHandler(); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn VSIInstallLargeFileHandler(); } extern "C" { - #[doc = " @endcond"] pub fn VSIInstallSubFileHandler(); } extern "C" { @@ -1094,6 +1286,9 @@ extern "C" { extern "C" { pub fn VSICurlClearCache(); } +extern "C" { + pub fn VSICurlPartialClearCache(pszFilenamePrefix: *const libc::c_char); +} extern "C" { pub fn VSIInstallCurlStreamingFileHandler(); } @@ -1115,6 +1310,9 @@ extern "C" { extern "C" { pub fn VSIInstallAzureStreamingFileHandler(); } +extern "C" { + pub fn VSIInstallADLSFileHandler(); +} extern "C" { pub fn VSIInstallOSSFileHandler(); } @@ -1136,6 +1334,12 @@ extern "C" { extern "C" { pub fn VSIInstallStdinHandler(); } +extern "C" { + pub fn VSIInstallHdfsHandler(); +} +extern "C" { + pub fn VSIInstallWebHdfsHandler(); +} extern "C" { pub fn VSIInstallStdoutHandler(); } @@ -1152,11 +1356,9 @@ extern "C" { pub fn VSISetCryptKey(pabyKey: *const GByte, nKeySize: libc::c_int); } extern "C" { - #[doc = " @cond Doxygen_Suppress"] pub fn VSICleanupFileManager(); } extern "C" { - #[doc = " @endcond"] pub fn VSIFileFromMemBuffer( pszFilename: *const libc::c_char, pabyData: *mut GByte, @@ -1171,7 +1373,6 @@ extern "C" { bUnlinkAndSeize: libc::c_int, ) -> *mut GByte; } -#[doc = " Callback used by VSIStdoutSetRedirection()"] pub type VSIWriteFunction = ::std::option::Option< unsafe extern "C" fn( ptr: *const libc::c_void, @@ -1183,8731 +1384,10870 @@ pub type VSIWriteFunction = ::std::option::Option< extern "C" { pub fn VSIStdoutSetRedirection(pFct: VSIWriteFunction, stream: *mut FILE); } -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn VSITime(arg1: *mut libc::c_ulong) -> libc::c_ulong; -} -extern "C" { - pub fn VSICTime(arg1: libc::c_ulong) -> *const libc::c_char; -} -extern "C" { - pub fn VSIGMTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; -} -extern "C" { - pub fn VSILocalTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; -} -pub mod CPLErr { - #[doc = " Error category"] - pub type Type = u32; - pub const CE_None: Type = 0; - pub const CE_Debug: Type = 1; - pub const CE_Warning: Type = 2; - pub const CE_Failure: Type = 3; - pub const CE_Fatal: Type = 4; -} -#[doc = " Error number"] -pub type CPLErrorNum = libc::c_int; -extern "C" { - pub fn CPLError(eErrClass: CPLErr::Type, err_no: CPLErrorNum, fmt: *const libc::c_char, ...); -} -extern "C" { - pub fn CPLErrorV( - arg1: CPLErr::Type, - arg2: CPLErrorNum, - arg3: *const libc::c_char, - arg4: *mut __va_list_tag, - ); -} -extern "C" { - pub fn CPLEmergencyError(arg1: *const libc::c_char); -} -extern "C" { - pub fn CPLErrorReset(); -} -extern "C" { - pub fn CPLGetLastErrorNo() -> CPLErrorNum; -} -extern "C" { - pub fn CPLGetLastErrorType() -> CPLErr::Type; -} -extern "C" { - pub fn CPLGetLastErrorMsg() -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetErrorCounter() -> GUInt32; -} -extern "C" { - pub fn CPLGetErrorHandlerUserData() -> *mut libc::c_void; -} -extern "C" { - pub fn CPLErrorSetState( - eErrClass: CPLErr::Type, - err_no: CPLErrorNum, - pszMsg: *const libc::c_char, - ); -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn CPLCleanupErrorMutex(); -} -#[doc = " Callback for a custom error handler"] -pub type CPLErrorHandler = ::std::option::Option< - unsafe extern "C" fn(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char), +pub type VSIFilesystemPluginStatCallback = ::std::option::Option< + unsafe extern "C" fn( + pUserData: *mut libc::c_void, + pszFilename: *const libc::c_char, + pStatBuf: *mut VSIStatBufL, + nFlags: libc::c_int, + ) -> libc::c_int, >; -extern "C" { - pub fn CPLLoggingErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLDefaultErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLQuietErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); -} -extern "C" { - pub fn CPLTurnFailureIntoWarning(bOn: libc::c_int); -} -extern "C" { - pub fn CPLSetErrorHandler(arg1: CPLErrorHandler) -> CPLErrorHandler; -} -extern "C" { - pub fn CPLSetErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void) -> CPLErrorHandler; -} -extern "C" { - pub fn CPLPushErrorHandler(arg1: CPLErrorHandler); -} -extern "C" { - pub fn CPLPushErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void); -} -extern "C" { - pub fn CPLSetCurrentErrorHandlerCatchDebug(bCatchDebug: libc::c_int); -} -extern "C" { - pub fn CPLPopErrorHandler(); -} -extern "C" { - pub fn CPLDebug(arg1: *const libc::c_char, arg2: *const libc::c_char, ...); -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn CPLVerifyConfiguration(); -} -extern "C" { - #[doc = " @endcond"] - pub fn CPLGetConfigOption( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetThreadLocalConfigOption( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLSetConfigOption(arg1: *const libc::c_char, arg2: *const libc::c_char); +pub type VSIFilesystemPluginUnlinkCallback = ::std::option::Option< + unsafe extern "C" fn( + pUserData: *mut libc::c_void, + pszFilename: *const libc::c_char, + ) -> libc::c_int, +>; +pub type VSIFilesystemPluginRenameCallback = ::std::option::Option< + unsafe extern "C" fn( + pUserData: *mut libc::c_void, + oldpath: *const libc::c_char, + newpath: *const libc::c_char, + ) -> libc::c_int, +>; +pub type VSIFilesystemPluginMkdirCallback = ::std::option::Option< + unsafe extern "C" fn( + pUserData: *mut libc::c_void, + pszDirname: *const libc::c_char, + nMode: libc::c_long, + ) -> libc::c_int, +>; +pub type VSIFilesystemPluginRmdirCallback = ::std::option::Option< + unsafe extern "C" fn( + pUserData: *mut libc::c_void, + pszDirname: *const libc::c_char, + ) -> libc::c_int, +>; +pub type VSIFilesystemPluginReadDirCallback = ::std::option::Option< + unsafe extern "C" fn( + pUserData: *mut libc::c_void, + pszDirname: *const libc::c_char, + nMaxFiles: libc::c_int, + ) -> *mut *mut libc::c_char, +>; +pub type VSIFilesystemPluginSiblingFilesCallback = ::std::option::Option< + unsafe extern "C" fn( + pUserData: *mut libc::c_void, + pszDirname: *const libc::c_char, + ) -> *mut *mut libc::c_char, +>; +pub type VSIFilesystemPluginOpenCallback = ::std::option::Option< + unsafe extern "C" fn( + pUserData: *mut libc::c_void, + pszFilename: *const libc::c_char, + pszAccess: *const libc::c_char, + ) -> *mut libc::c_void, +>; +pub type VSIFilesystemPluginTellCallback = + ::std::option::Option vsi_l_offset>; +pub type VSIFilesystemPluginSeekCallback = ::std::option::Option< + unsafe extern "C" fn( + pFile: *mut libc::c_void, + nOffset: vsi_l_offset, + nWhence: libc::c_int, + ) -> libc::c_int, +>; +pub type VSIFilesystemPluginReadCallback = ::std::option::Option< + unsafe extern "C" fn( + pFile: *mut libc::c_void, + pBuffer: *mut libc::c_void, + nSize: usize, + nCount: usize, + ) -> usize, +>; +pub type VSIFilesystemPluginReadMultiRangeCallback = ::std::option::Option< + unsafe extern "C" fn( + pFile: *mut libc::c_void, + nRanges: libc::c_int, + ppData: *mut *mut libc::c_void, + panOffsets: *const vsi_l_offset, + panSizes: *const usize, + ) -> libc::c_int, +>; +pub type VSIFilesystemPluginGetRangeStatusCallback = ::std::option::Option< + unsafe extern "C" fn( + pFile: *mut libc::c_void, + nOffset: vsi_l_offset, + nLength: vsi_l_offset, + ) -> VSIRangeStatus::Type, +>; +pub type VSIFilesystemPluginEofCallback = + ::std::option::Option libc::c_int>; +pub type VSIFilesystemPluginWriteCallback = ::std::option::Option< + unsafe extern "C" fn( + pFile: *mut libc::c_void, + pBuffer: *const libc::c_void, + nSize: usize, + nCount: usize, + ) -> usize, +>; +pub type VSIFilesystemPluginFlushCallback = + ::std::option::Option libc::c_int>; +pub type VSIFilesystemPluginTruncateCallback = ::std::option::Option< + unsafe extern "C" fn(pFile: *mut libc::c_void, nNewSize: vsi_l_offset) -> libc::c_int, +>; +pub type VSIFilesystemPluginCloseCallback = + ::std::option::Option libc::c_int>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct VSIFilesystemPluginCallbacksStruct { + pub pUserData: *mut libc::c_void, + pub stat: VSIFilesystemPluginStatCallback, + pub unlink: VSIFilesystemPluginUnlinkCallback, + pub rename: VSIFilesystemPluginRenameCallback, + pub mkdir: VSIFilesystemPluginMkdirCallback, + pub rmdir: VSIFilesystemPluginRmdirCallback, + pub read_dir: VSIFilesystemPluginReadDirCallback, + pub open: VSIFilesystemPluginOpenCallback, + pub tell: VSIFilesystemPluginTellCallback, + pub seek: VSIFilesystemPluginSeekCallback, + pub read: VSIFilesystemPluginReadCallback, + pub read_multi_range: VSIFilesystemPluginReadMultiRangeCallback, + pub get_range_status: VSIFilesystemPluginGetRangeStatusCallback, + pub eof: VSIFilesystemPluginEofCallback, + pub write: VSIFilesystemPluginWriteCallback, + pub flush: VSIFilesystemPluginFlushCallback, + pub truncate: VSIFilesystemPluginTruncateCallback, + pub close: VSIFilesystemPluginCloseCallback, + pub nBufferSize: usize, + pub nCacheSize: usize, + pub sibling_files: VSIFilesystemPluginSiblingFilesCallback, } -extern "C" { - pub fn CPLSetThreadLocalConfigOption( - pszKey: *const libc::c_char, - pszValue: *const libc::c_char, - ); -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn CPLFreeConfig(); -} -extern "C" { - #[doc = " @endcond"] - pub fn CPLGetConfigOptions() -> *mut *mut libc::c_char; -} -extern "C" { - pub fn CPLSetConfigOptions(papszConfigOptions: *const *const libc::c_char); -} -extern "C" { - pub fn CPLGetThreadLocalConfigOptions() -> *mut *mut libc::c_char; -} -extern "C" { - pub fn CPLSetThreadLocalConfigOptions(papszConfigOptions: *const *const libc::c_char); -} -extern "C" { - pub fn CPLMalloc(arg1: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLStrlwr(arg1: *mut libc::c_char) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLFGets( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *mut FILE, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLReadLine(arg1: *mut FILE) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLineL(arg1: *mut VSILFILE) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLine2L( - arg1: *mut VSILFILE, - arg2: libc::c_int, - arg3: CSLConstList, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLReadLine3L( - arg1: *mut VSILFILE, - arg2: libc::c_int, - arg3: *mut libc::c_int, - arg4: CSLConstList, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLAtof(arg1: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLAtofDelim(arg1: *const libc::c_char, arg2: libc::c_char) -> f64; -} -extern "C" { - pub fn CPLStrtod(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f64; -} -extern "C" { - pub fn CPLStrtodDelim( - arg1: *const libc::c_char, - arg2: *mut *mut libc::c_char, - arg3: libc::c_char, - ) -> f64; -} -extern "C" { - pub fn CPLStrtof(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f32; -} -extern "C" { - pub fn CPLStrtofDelim( - arg1: *const libc::c_char, - arg2: *mut *mut libc::c_char, - arg3: libc::c_char, - ) -> f32; -} -extern "C" { - pub fn CPLAtofM(arg1: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLScanString( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ) -> *mut libc::c_char; -} -extern "C" { - pub fn CPLScanDouble(arg1: *const libc::c_char, arg2: libc::c_int) -> f64; -} -extern "C" { - pub fn CPLScanLong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_long; -} -extern "C" { - pub fn CPLScanULong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_ulong; -} -extern "C" { - pub fn CPLScanUIntBig(arg1: *const libc::c_char, arg2: libc::c_int) -> GUIntBig; -} -extern "C" { - pub fn CPLAtoGIntBig(pszString: *const libc::c_char) -> GIntBig; -} -extern "C" { - pub fn CPLAtoGIntBigEx( - pszString: *const libc::c_char, - bWarn: libc::c_int, - pbOverflow: *mut libc::c_int, - ) -> GIntBig; -} -extern "C" { - pub fn CPLScanPointer(arg1: *const libc::c_char, arg2: libc::c_int) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLPrintString( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintStringFill( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintInt32(arg1: *mut libc::c_char, arg2: GInt32, arg3: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintUIntBig( - arg1: *mut libc::c_char, - arg2: GUIntBig, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintDouble( - arg1: *mut libc::c_char, - arg2: *const libc::c_char, - arg3: f64, - arg4: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintTime( - arg1: *mut libc::c_char, - arg2: libc::c_int, - arg3: *const libc::c_char, - arg4: *const tm, - arg5: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLPrintPointer( - arg1: *mut libc::c_char, - arg2: *mut libc::c_void, - arg3: libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLGetSymbol(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLGetExecPath(pszPathBuf: *mut libc::c_char, nMaxLength: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn CPLGetPath(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetDirname(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetFilename(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetBasename(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetExtension(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetCurrentDir() -> *mut libc::c_char; -} -extern "C" { - pub fn CPLFormFilename( - pszPath: *const libc::c_char, - pszBasename: *const libc::c_char, - pszExtension: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLFormCIFilename( - pszPath: *const libc::c_char, - pszBasename: *const libc::c_char, - pszExtension: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLResetExtension( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLProjectRelativeFilename( - pszProjectDir: *const libc::c_char, - pszSecondaryFilename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLIsFilenameRelative(pszFilename: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn CPLExtractRelativePath( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCleanTrailingSlash(arg1: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLCorrespondingPaths( - pszOldFilename: *const libc::c_char, - pszNewFilename: *const libc::c_char, - papszFileList: *mut *mut libc::c_char, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn CPLCheckForFile( - pszFilename: *mut libc::c_char, - papszSiblingList: *mut *mut libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLGenerateTempFilename(pszStem: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLExpandTilde(pszFilename: *const libc::c_char) -> *const libc::c_char; -} -extern "C" { - pub fn CPLGetHomeDir() -> *const libc::c_char; -} -#[doc = " Callback for CPLPushFileFinder"] -pub type CPLFileFinder = ::std::option::Option< - unsafe extern "C" fn( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - ) -> *const libc::c_char, ->; -extern "C" { - pub fn CPLFindFile( - pszClass: *const libc::c_char, - pszBasename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLDefaultFindFile( - pszClass: *const libc::c_char, - pszBasename: *const libc::c_char, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLPushFileFinder(pfnFinder: CPLFileFinder); -} -extern "C" { - pub fn CPLPopFileFinder() -> CPLFileFinder; -} -extern "C" { - pub fn CPLPushFinderLocation(arg1: *const libc::c_char); -} -extern "C" { - pub fn CPLPopFinderLocation(); -} -extern "C" { - pub fn CPLFinderClean(); -} -extern "C" { - pub fn CPLStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; -} -#[doc = " Information on a shared file"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLSharedFileInfo { - #[doc = "< File pointer"] - pub fp: *mut FILE, - #[doc = "< Reference counter"] - pub nRefCount: libc::c_int, - #[doc = "< Whether fp must be interpreted as VSIFILE*"] - pub bLarge: libc::c_int, - #[doc = "< Filename"] - pub pszFilename: *mut libc::c_char, - #[doc = "< Access mode"] - pub pszAccess: *mut libc::c_char, -} -#[test] -fn bindgen_test_layout_CPLSharedFileInfo() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLSharedFileInfo)) +#[test] +fn bindgen_test_layout_VSIFilesystemPluginCallbacksStruct() { + assert_eq!( + ::std::mem::size_of::(), + 168usize, + concat!("Size of: ", stringify!(VSIFilesystemPluginCallbacksStruct)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(CPLSharedFileInfo)) + concat!( + "Alignment of ", + stringify!(VSIFilesystemPluginCallbacksStruct) + ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::())).pUserData as *const _ + as usize + }, 0usize, concat!( "Offset of field: ", - stringify!(CPLSharedFileInfo), + stringify!(VSIFilesystemPluginCallbacksStruct), "::", - stringify!(fp) + stringify!(pUserData) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nRefCount as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::())).stat as *const _ as usize + }, 8usize, concat!( "Offset of field: ", - stringify!(CPLSharedFileInfo), + stringify!(VSIFilesystemPluginCallbacksStruct), "::", - stringify!(nRefCount) + stringify!(stat) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bLarge as *const _ as usize }, - 12usize, + unsafe { + &(*(::std::ptr::null::())).unlink as *const _ + as usize + }, + 16usize, concat!( "Offset of field: ", - stringify!(CPLSharedFileInfo), + stringify!(VSIFilesystemPluginCallbacksStruct), "::", - stringify!(bLarge) + stringify!(unlink) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszFilename as *const _ as usize }, - 16usize, + unsafe { + &(*(::std::ptr::null::())).rename as *const _ + as usize + }, + 24usize, concat!( "Offset of field: ", - stringify!(CPLSharedFileInfo), + stringify!(VSIFilesystemPluginCallbacksStruct), "::", - stringify!(pszFilename) + stringify!(rename) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszAccess as *const _ as usize }, - 24usize, + unsafe { + &(*(::std::ptr::null::())).mkdir as *const _ + as usize + }, + 32usize, concat!( "Offset of field: ", - stringify!(CPLSharedFileInfo), + stringify!(VSIFilesystemPluginCallbacksStruct), "::", - stringify!(pszAccess) + stringify!(mkdir) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).rmdir as *const _ + as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(rmdir) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).read_dir as *const _ + as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(read_dir) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).open as *const _ as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(open) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).tell as *const _ as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(tell) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).seek as *const _ as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(seek) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).read as *const _ as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(read) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).read_multi_range + as *const _ as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(read_multi_range) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).get_range_status + as *const _ as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(get_range_status) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).eof as *const _ as usize + }, + 104usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(eof) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).write as *const _ + as usize + }, + 112usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(write) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).flush as *const _ + as usize + }, + 120usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(flush) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).truncate as *const _ + as usize + }, + 128usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(truncate) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).close as *const _ + as usize + }, + 136usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(close) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).nBufferSize as *const _ + as usize + }, + 144usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(nBufferSize) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).nCacheSize as *const _ + as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(nCacheSize) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).sibling_files as *const _ + as usize + }, + 160usize, + concat!( + "Offset of field: ", + stringify!(VSIFilesystemPluginCallbacksStruct), + "::", + stringify!(sibling_files) ) ); } extern "C" { - pub fn CPLOpenShared( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *mut FILE; -} -extern "C" { - pub fn CPLCloseShared(arg1: *mut FILE); -} -extern "C" { - pub fn CPLGetSharedList(arg1: *mut libc::c_int) -> *mut CPLSharedFileInfo; -} -extern "C" { - pub fn CPLDumpSharedList(arg1: *mut FILE); -} -extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn CPLCleanupSharedFileMutex(); -} -extern "C" { - #[doc = " @endcond"] - pub fn CPLDMSToDec(is: *const libc::c_char) -> f64; -} -extern "C" { - pub fn CPLDecToDMS( - dfAngle: f64, - pszAxis: *const libc::c_char, - nPrecision: libc::c_int, - ) -> *const libc::c_char; -} -extern "C" { - pub fn CPLPackedDMSToDec(arg1: f64) -> f64; -} -extern "C" { - pub fn CPLDecToPackedDMS(dfDec: f64) -> f64; -} -extern "C" { - pub fn CPLStringToComplex(pszString: *const libc::c_char, pdfReal: *mut f64, pdfImag: *mut f64); -} -extern "C" { - pub fn CPLUnlinkTree(arg1: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn CPLCopyFile( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLCopyTree( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLMoveFile( - pszNewPath: *const libc::c_char, - pszOldPath: *const libc::c_char, - ) -> libc::c_int; -} -extern "C" { - pub fn CPLSymlink( - pszOldPath: *const libc::c_char, - pszNewPath: *const libc::c_char, - papszOptions: CSLConstList, - ) -> libc::c_int; -} -extern "C" { - #[doc = " @endcond"] - pub fn CPLCreateZip( - pszZipFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn CPLCreateFileInZip( - hZip: *mut libc::c_void, - pszFilename: *const libc::c_char, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; -} -extern "C" { - pub fn CPLWriteFileInZip( - hZip: *mut libc::c_void, - pBuffer: *const libc::c_void, - nBufferSize: libc::c_int, - ) -> CPLErr::Type; + pub fn VSIAllocFilesystemPluginCallbacksStruct() -> *mut VSIFilesystemPluginCallbacksStruct; } extern "C" { - pub fn CPLCloseFileInZip(hZip: *mut libc::c_void) -> CPLErr::Type; + pub fn VSIFreeFilesystemPluginCallbacksStruct(poCb: *mut VSIFilesystemPluginCallbacksStruct); } extern "C" { - pub fn CPLCloseZip(hZip: *mut libc::c_void) -> CPLErr::Type; + pub fn VSIInstallPluginHandler( + pszPrefix: *const libc::c_char, + poCb: *const VSIFilesystemPluginCallbacksStruct, + ) -> libc::c_int; } extern "C" { - pub fn CPLZLibDeflate( - ptr: *const libc::c_void, - nBytes: usize, - nLevel: libc::c_int, - outptr: *mut libc::c_void, - nOutAvailableBytes: usize, - pnOutBytes: *mut usize, - ) -> *mut libc::c_void; + pub fn VSITime(arg1: *mut libc::c_ulong) -> libc::c_ulong; } extern "C" { - pub fn CPLZLibInflate( - ptr: *const libc::c_void, - nBytes: usize, - outptr: *mut libc::c_void, - nOutAvailableBytes: usize, - pnOutBytes: *mut usize, - ) -> *mut libc::c_void; + pub fn VSICTime(arg1: libc::c_ulong) -> *const libc::c_char; } extern "C" { - pub fn CPLValidateXML( - pszXMLFilename: *const libc::c_char, - pszXSDFilename: *const libc::c_char, - papszOptions: CSLConstList, - ) -> libc::c_int; + pub fn VSIGMTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; } extern "C" { - pub fn CPLsetlocale(category: libc::c_int, locale: *const libc::c_char) -> *mut libc::c_char; + pub fn VSILocalTime(pnTime: *const time_t, poBrokenTime: *mut tm) -> *mut tm; +} +pub mod CPLErr { + pub type Type = libc::c_uint; + pub const CE_None: Type = 0; + pub const CE_Debug: Type = 1; + pub const CE_Warning: Type = 2; + pub const CE_Failure: Type = 3; + pub const CE_Fatal: Type = 4; } +pub type CPLErrorNum = libc::c_int; extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn CPLCleanupSetlocaleMutex(); + pub fn CPLError(eErrClass: CPLErr::Type, err_no: CPLErrorNum, fmt: *const libc::c_char, ...); } extern "C" { - #[doc = "CPLIsPowerOfTwo()"] - #[doc = "@param i - tested number"] - #[doc = "@return TRUE if i is power of two otherwise return FALSE"] - pub fn CPLIsPowerOfTwo(i: libc::c_uint) -> libc::c_int; + pub fn CPLErrorV( + arg1: CPLErr::Type, + arg2: CPLErrorNum, + arg3: *const libc::c_char, + arg4: *mut __va_list_tag, + ); } -pub type GDALProgressFunc = ::std::option::Option< - unsafe extern "C" fn( - dfComplete: f64, - pszMessage: *const libc::c_char, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int, ->; extern "C" { - pub fn GDALDummyProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; + pub fn CPLEmergencyError(arg1: *const libc::c_char); } extern "C" { - pub fn GDALTermProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; + pub fn CPLErrorReset(); } extern "C" { - pub fn GDALScaledProgress( - arg1: f64, - arg2: *const libc::c_char, - arg3: *mut libc::c_void, - ) -> libc::c_int; + pub fn CPLGetLastErrorNo() -> CPLErrorNum; } extern "C" { - pub fn GDALCreateScaledProgress( - arg1: f64, - arg2: f64, - arg3: GDALProgressFunc, - arg4: *mut libc::c_void, - ) -> *mut libc::c_void; + pub fn CPLGetLastErrorType() -> CPLErr::Type; } extern "C" { - pub fn GDALDestroyScaledProgress(arg1: *mut libc::c_void); + pub fn CPLGetLastErrorMsg() -> *const libc::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLVirtualMem { - _unused: [u8; 0], -} -#[doc = " Callback triggered when a still unmapped page of virtual memory is accessed."] -#[doc = " The callback has the responsibility of filling the page with relevant values"] -#[doc = ""] -#[doc = " @param ctxt virtual memory handle."] -#[doc = " @param nOffset offset of the page in the memory mapping."] -#[doc = " @param pPageToFill address of the page to fill. Note that the address might"] -#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] -#[doc = " @param nToFill number of bytes of the page."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToFill: *mut libc::c_void, - nToFill: usize, - pUserData: *mut libc::c_void, - ), ->; -#[doc = " Callback triggered when a dirty mapped page is going to be freed."] -#[doc = " (saturation of cache, or termination of the virtual memory mapping)."] -#[doc = ""] -#[doc = " @param ctxt virtual memory handle."] -#[doc = " @param nOffset offset of the page in the memory mapping."] -#[doc = " @param pPageToBeEvicted address of the page that will be flushed. Note that the address might"] -#[doc = " be a temporary location, and not at CPLVirtualMemGetAddr() + nOffset."] -#[doc = " @param nToBeEvicted number of bytes of the page."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< - unsafe extern "C" fn( - ctxt: *mut CPLVirtualMem, - nOffset: usize, - pPageToBeEvicted: *const libc::c_void, - nToBeEvicted: usize, - pUserData: *mut libc::c_void, - ), ->; -#[doc = " Callback triggered when a virtual memory mapping is destroyed."] -#[doc = " @param pUserData user data that was passed to CPLVirtualMemNew()."] -pub type CPLVirtualMemFreeUserData = - ::std::option::Option; -pub mod CPLVirtualMemAccessMode { - #[doc = " Access mode of a virtual memory mapping."] - pub type Type = u32; - #[doc = " The mapping is meant at being read-only, but writes will not be prevented."] - #[doc = "Note that any content written will be lost."] - pub const VIRTUALMEM_READONLY: Type = 0; - #[doc = " The mapping is meant at being read-only, and this will be enforced"] - #[doc = "through the operating system page protection mechanism."] - pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; - #[doc = " The mapping is meant at being read-write, and modified pages can be saved"] - #[doc = "thanks to the pfnUnCachePage callback"] - pub const VIRTUALMEM_READWRITE: Type = 2; +extern "C" { + pub fn CPLGetErrorCounter() -> GUInt32; } extern "C" { - #[doc = " Return the size of a page of virtual memory."] - #[doc = ""] - #[doc = " @return the page size."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLGetPageSize() -> usize; + pub fn CPLGetErrorHandlerUserData() -> *mut libc::c_void; } extern "C" { - #[doc = " Create a new virtual memory mapping."] - #[doc = ""] - #[doc = " This will reserve an area of virtual memory of size nSize, whose size"] - #[doc = " might be potentially much larger than the physical memory available. Initially,"] - #[doc = " no physical memory will be allocated. As soon as memory pages will be accessed,"] - #[doc = " they will be allocated transparently and filled with the pfnCachePage callback."] - #[doc = " When the allowed cache size is reached, the least recently used pages will"] - #[doc = " be unallocated."] - #[doc = ""] - #[doc = " On Linux AMD64 platforms, the maximum value for nSize is 128 TB."] - #[doc = " On Linux x86 platforms, the maximum value for nSize is 2 GB."] - #[doc = ""] - #[doc = " Only supported on Linux for now."] - #[doc = ""] - #[doc = " Note that on Linux, this function will install a SIGSEGV handler. The"] - #[doc = " original handler will be restored by CPLVirtualMemManagerTerminate()."] - #[doc = ""] - #[doc = " @param nSize size in bytes of the virtual memory mapping."] - #[doc = " @param nCacheSize size in bytes of the maximum memory that will be really"] - #[doc = " allocated (must ideally fit into RAM)."] - #[doc = " @param nPageSizeHint hint for the page size. Must be a multiple of the"] - #[doc = " system page size, returned by CPLGetPageSize()."] - #[doc = " Minimum value is generally 4096. Might be set to 0 to"] - #[doc = " let the function determine a default page size."] - #[doc = " @param bSingleThreadUsage set to TRUE if there will be no concurrent threads"] - #[doc = " that will access the virtual memory mapping. This can"] - #[doc = " optimize performance a bit."] - #[doc = " @param eAccessMode permission to use for the virtual memory mapping."] - #[doc = " @param pfnCachePage callback triggered when a still unmapped page of virtual"] - #[doc = " memory is accessed. The callback has the responsibility"] - #[doc = " of filling the page with relevant values."] - #[doc = " @param pfnUnCachePage callback triggered when a dirty mapped page is going to"] - #[doc = " be freed (saturation of cache, or termination of the"] - #[doc = " virtual memory mapping). Might be NULL."] - #[doc = " @param pfnFreeUserData callback that can be used to free pCbkUserData. Might be"] - #[doc = " NULL"] - #[doc = " @param pCbkUserData user data passed to pfnCachePage and pfnUnCachePage."] - #[doc = ""] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemNew( - nSize: usize, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnCachePage: CPLVirtualMemCachePageCbk, - pfnUnCachePage: CPLVirtualMemUnCachePageCbk, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CPLErrorSetState( + eErrClass: CPLErr::Type, + err_no: CPLErrorNum, + pszMsg: *const libc::c_char, + ); } extern "C" { - #[doc = " Return if virtual memory mapping of a file is available."] - #[doc = ""] - #[doc = " @return TRUE if virtual memory mapping of a file is available."] - #[doc = " @since GDAL 1.11"] - pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; + pub fn CPLCleanupErrorMutex(); } +pub type CPLErrorHandler = ::std::option::Option< + unsafe extern "C" fn(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char), +>; extern "C" { - #[doc = " Create a new virtual memory mapping from a file."] - #[doc = ""] - #[doc = " The file must be a \"real\" file recognized by the operating system, and not"] - #[doc = " a VSI extended virtual file."] - #[doc = ""] - #[doc = " In VIRTUALMEM_READWRITE mode, updates to the memory mapping will be written"] - #[doc = " in the file."] - #[doc = ""] - #[doc = " On Linux AMD64 platforms, the maximum value for nLength is 128 TB."] - #[doc = " On Linux x86 platforms, the maximum value for nLength is 2 GB."] - #[doc = ""] - #[doc = " Supported on Linux only in GDAL <= 2.0, and all POSIX systems supporting"] - #[doc = " mmap() in GDAL >= 2.1"] - #[doc = ""] - #[doc = " @param fp Virtual file handle."] - #[doc = " @param nOffset Offset in the file to start the mapping from."] - #[doc = " @param nLength Length of the portion of the file to map into memory."] - #[doc = " @param eAccessMode Permission to use for the virtual memory mapping. This must"] - #[doc = " be consistent with how the file has been opened."] - #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] - #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemFileMapNew( - fp: *mut VSILFILE, - nOffset: vsi_l_offset, - nLength: vsi_l_offset, - eAccessMode: CPLVirtualMemAccessMode::Type, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CPLLoggingErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); } extern "C" { - #[doc = " Create a new virtual memory mapping derived from an other virtual memory"] - #[doc = " mapping."] - #[doc = ""] - #[doc = " This may be useful in case of creating mapping for pixel interleaved data."] - #[doc = ""] - #[doc = " The new mapping takes a reference on the base mapping."] - #[doc = ""] - #[doc = " @param pVMemBase Base virtual memory mapping"] - #[doc = " @param nOffset Offset in the base virtual memory mapping from which to start"] - #[doc = " the new mapping."] - #[doc = " @param nSize Size of the base virtual memory mapping to expose in the"] - #[doc = " the new mapping."] - #[doc = " @param pfnFreeUserData callback that is called when the object is destroyed."] - #[doc = " @param pCbkUserData user data passed to pfnFreeUserData."] - #[doc = " @return a virtual memory object that must be freed by CPLVirtualMemFree(),"] - #[doc = " or NULL in case of failure."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemDerivedNew( - pVMemBase: *mut CPLVirtualMem, - nOffset: vsi_l_offset, - nSize: vsi_l_offset, - pfnFreeUserData: CPLVirtualMemFreeUserData, - pCbkUserData: *mut libc::c_void, - ) -> *mut CPLVirtualMem; + pub fn CPLDefaultErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); } extern "C" { - #[doc = " Free a virtual memory mapping."] - #[doc = ""] - #[doc = " The pointer returned by CPLVirtualMemGetAddr() will no longer be valid."] - #[doc = " If the virtual memory mapping was created with read/write permissions and that"] - #[doc = " they are dirty (i.e. modified) pages, they will be flushed through the"] - #[doc = " pfnUnCachePage callback before being freed."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); + pub fn CPLQuietErrorHandler(arg1: CPLErr::Type, arg2: CPLErrorNum, arg3: *const libc::c_char); } extern "C" { - #[doc = " Return the pointer to the start of a virtual memory mapping."] - #[doc = ""] - #[doc = " The bytes in the range [p:p+CPLVirtualMemGetSize()-1] where p is the pointer"] - #[doc = " returned by this function will be valid, until CPLVirtualMemFree() is called."] - #[doc = ""] - #[doc = " Note that if a range of bytes used as an argument of a system call"] - #[doc = " (such as read() or write()) contains pages that have not been \"realized\", the"] - #[doc = " system call will fail with EFAULT. CPLVirtualMemPin() can be used to work"] - #[doc = " around this issue."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the pointer to the start of a virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; + pub fn CPLTurnFailureIntoWarning(bOn: libc::c_int); } extern "C" { - #[doc = " Return the size of the virtual memory mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the size of the virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; + pub fn CPLSetErrorHandler(arg1: CPLErrorHandler) -> CPLErrorHandler; } extern "C" { - #[doc = " Return if the virtual memory mapping is a direct file mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return TRUE if the virtual memory mapping is a direct file mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; + pub fn CPLSetErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void) -> CPLErrorHandler; } extern "C" { - #[doc = " Return the access mode of the virtual memory mapping."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the access mode of the virtual memory mapping."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; + pub fn CPLPushErrorHandler(arg1: CPLErrorHandler); } extern "C" { - #[doc = " Return the page size associated to a virtual memory mapping."] - #[doc = ""] - #[doc = " The value returned will be at least CPLGetPageSize(), but potentially"] - #[doc = " larger."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return the page size"] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; + pub fn CPLPushErrorHandlerEx(arg1: CPLErrorHandler, arg2: *mut libc::c_void); } extern "C" { - #[doc = " Return TRUE if this memory mapping can be accessed safely from concurrent"] - #[doc = " threads."] - #[doc = ""] - #[doc = " The situation that can cause problems is when several threads try to access"] - #[doc = " a page of the mapping that is not yet mapped."] - #[doc = ""] - #[doc = " The return value of this function depends on whether bSingleThreadUsage has"] - #[doc = " been set of not in CPLVirtualMemNew() and/or the implementation."] - #[doc = ""] - #[doc = " On Linux, this will always return TRUE if bSingleThreadUsage = FALSE."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @return TRUE if this memory mapping can be accessed safely from concurrent"] - #[doc = " threads."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; + pub fn CPLSetCurrentErrorHandlerCatchDebug(bCatchDebug: libc::c_int); } extern "C" { - #[doc = " Declare that a thread will access a virtual memory mapping."] - #[doc = ""] - #[doc = " This function must be called by a thread that wants to access the"] - #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] - #[doc = " been created with bSingleThreadUsage = TRUE."] - #[doc = ""] - #[doc = " This function must be paired with CPLVirtualMemUnDeclareThread()."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); + pub fn CPLPopErrorHandler(); } extern "C" { - #[doc = " Declare that a thread will stop accessing a virtual memory mapping."] - #[doc = ""] - #[doc = " This function must be called by a thread that will no longer access the"] - #[doc = " content of a virtual memory mapping, except if the virtual memory mapping has"] - #[doc = " been created with bSingleThreadUsage = TRUE."] - #[doc = ""] - #[doc = " This function must be paired with CPLVirtualMemDeclareThread()."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); + pub fn CPLDebug(arg1: *const libc::c_char, arg2: *const libc::c_char, ...); } extern "C" { - #[doc = " Make sure that a region of virtual memory will be realized."] - #[doc = ""] - #[doc = " Calling this function is not required, but might be useful when debugging"] - #[doc = " a process with tools like gdb or valgrind that do not naturally like"] - #[doc = " segmentation fault signals."] - #[doc = ""] - #[doc = " It is also needed when wanting to provide part of virtual memory mapping"] - #[doc = " to a system call such as read() or write(). If read() or write() is called"] - #[doc = " on a memory region not yet realized, the call will fail with EFAULT."] - #[doc = ""] - #[doc = " @param ctxt context returned by CPLVirtualMemNew()."] - #[doc = " @param pAddr the memory region to pin."] - #[doc = " @param nSize the size of the memory region."] - #[doc = " @param bWriteOp set to TRUE if the memory are will be accessed in write mode."] - #[doc = ""] - #[doc = " @since GDAL 1.11"] - pub fn CPLVirtualMemPin( - ctxt: *mut CPLVirtualMem, - pAddr: *mut libc::c_void, - nSize: usize, - bWriteOp: libc::c_int, - ); + pub fn CPLVerifyConfiguration(); } extern "C" { - #[doc = " Cleanup any resource and handlers related to virtual memory."] - #[doc = ""] - #[doc = " This function must be called after the last CPLVirtualMem object has"] - #[doc = " been freed."] - #[doc = ""] - #[doc = " @since GDAL 2.0"] - pub fn CPLVirtualMemManagerTerminate(); + pub fn CPLGetConfigOption( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + ) -> *const libc::c_char; } -pub mod CPLXMLNodeType { - #[doc = " XML node type"] - pub type Type = u32; - #[doc = " Node is an element"] - pub const CXT_Element: Type = 0; - #[doc = " Node is a raw text value"] - pub const CXT_Text: Type = 1; - #[doc = " Node is attribute"] - pub const CXT_Attribute: Type = 2; - #[doc = " Node is an XML comment."] - pub const CXT_Comment: Type = 3; - #[doc = " Node is a special literal"] - pub const CXT_Literal: Type = 4; +extern "C" { + pub fn CPLGetThreadLocalConfigOption( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + ) -> *const libc::c_char; } -#[doc = " Document node structure."] -#[doc = ""] -#[doc = " This C structure is used to hold a single text fragment representing a"] -#[doc = " component of the document when parsed. It should be allocated with the"] -#[doc = " appropriate CPL function, and freed with CPLDestroyXMLNode(). The structure"] -#[doc = " contents should not normally be altered by application code, but may be"] -#[doc = " freely examined by application code."] -#[doc = ""] -#[doc = " Using the psChild and psNext pointers, a hierarchical tree structure"] -#[doc = " for a document can be represented as a tree of CPLXMLNode structures."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPLXMLNode { - #[doc = " \\brief Node type"] - #[doc = ""] - #[doc = " One of CXT_Element, CXT_Text, CXT_Attribute, CXT_Comment,"] - #[doc = " or CXT_Literal."] - pub eType: CPLXMLNodeType::Type, - #[doc = " \\brief Node value"] - #[doc = ""] - #[doc = " For CXT_Element this is the name of the element, without the angle"] - #[doc = " brackets. Note there is a single CXT_Element even when the document"] - #[doc = " contains a start and end element tag. The node represents the pair."] - #[doc = " All text or other elements between the start and end tag will appear"] - #[doc = " as children nodes of this CXT_Element node."] - #[doc = ""] - #[doc = " For CXT_Attribute the pszValue is the attribute name. The value of"] - #[doc = " the attribute will be a CXT_Text child."] - #[doc = ""] - #[doc = " For CXT_Text this is the text itself (value of an attribute, or a"] - #[doc = " text fragment between an element start and end tags."] - #[doc = ""] - #[doc = " For CXT_Literal it is all the literal text. Currently this is just"] - #[doc = " used for !DOCTYPE lines, and the value would be the entire line."] - #[doc = ""] - #[doc = " For CXT_Comment the value is all the literal text within the comment,"] - #[doc = " but not including the comment start/end indicators (\"<--\" and \"-->\")."] - pub pszValue: *mut libc::c_char, - #[doc = " \\brief Next sibling."] - #[doc = ""] - #[doc = " Pointer to next sibling, that is the next node appearing after this"] - #[doc = " one that has the same parent as this node. NULL if this node is the"] - #[doc = " last child of the parent element."] - pub psNext: *mut CPLXMLNode, - #[doc = " \\brief Child node."] - #[doc = ""] - #[doc = " Pointer to first child node, if any. Only CXT_Element and CXT_Attribute"] - #[doc = " nodes should have children. For CXT_Attribute it should be a single"] - #[doc = " CXT_Text value node, while CXT_Element can have any kind of child."] - #[doc = " The full list of children for a node are identified by walking the"] - #[doc = " psNext\'s starting with the psChild node."] - pub psChild: *mut CPLXMLNode, +extern "C" { + pub fn CPLSetConfigOption(arg1: *const libc::c_char, arg2: *const libc::c_char); } -#[test] -fn bindgen_test_layout_CPLXMLNode() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(CPLXMLNode)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(CPLXMLNode)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(eType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(pszValue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psNext) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(CPLXMLNode), - "::", - stringify!(psChild) - ) +extern "C" { + pub fn CPLSetThreadLocalConfigOption( + pszKey: *const libc::c_char, + pszValue: *const libc::c_char, ); } extern "C" { - pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CPLFreeConfig(); } extern "C" { - pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); + pub fn CPLGetConfigOptions() -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CPLSetConfigOptions(papszConfigOptions: *const *const libc::c_char); } extern "C" { - pub fn CPLSearchXMLNode( - poRoot: *mut CPLXMLNode, - pszTarget: *const libc::c_char, - ) -> *mut CPLXMLNode; + pub fn CPLGetThreadLocalConfigOptions() -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLGetXMLValue( - poRoot: *const CPLXMLNode, - pszPath: *const libc::c_char, - pszDefault: *const libc::c_char, - ) -> *const libc::c_char; + pub fn CPLSetThreadLocalConfigOptions(papszConfigOptions: *const *const libc::c_char); } extern "C" { - pub fn CPLCreateXMLNode( - poParent: *mut CPLXMLNode, - eType: CPLXMLNodeType::Type, - pszText: *const libc::c_char, - ) -> *mut CPLXMLNode; + pub fn CPLLoadConfigOptionsFromFile( + pszFilename: *const libc::c_char, + bOverrideEnvVars: libc::c_int, + ); } extern "C" { - pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; + pub fn CPLLoadConfigOptionsFromPredefinedFiles(); } extern "C" { - pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); + pub fn CPLMalloc(arg1: usize) -> *mut libc::c_void; } extern "C" { - pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; + pub fn CPLCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); + pub fn CPLRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn CPLCreateXMLElementAndValue( - psParent: *mut CPLXMLNode, - pszName: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> *mut CPLXMLNode; + pub fn CPLStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; } extern "C" { - pub fn CPLAddXMLAttributeAndValue( - psParent: *mut CPLXMLNode, - pszName: *const libc::c_char, - pszValue: *const libc::c_char, - ); + pub fn CPLStrlwr(arg1: *mut libc::c_char) -> *mut libc::c_char; } extern "C" { - pub fn CPLCloneXMLTree(psTree: *const CPLXMLNode) -> *mut CPLXMLNode; + pub fn CPLFGets( + arg1: *mut libc::c_char, + arg2: libc::c_int, + arg3: *mut FILE, + ) -> *mut libc::c_char; } extern "C" { - pub fn CPLSetXMLValue( - psRoot: *mut CPLXMLNode, - pszPath: *const libc::c_char, - pszValue: *const libc::c_char, - ) -> libc::c_int; + pub fn CPLReadLine(arg1: *mut FILE) -> *const libc::c_char; } extern "C" { - pub fn CPLStripXMLNamespace( - psRoot: *mut CPLXMLNode, - pszNameSpace: *const libc::c_char, - bRecurse: libc::c_int, - ); + pub fn CPLReadLineL(arg1: *mut VSILFILE) -> *const libc::c_char; } extern "C" { - pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); + pub fn CPLReadLine2L( + arg1: *mut VSILFILE, + arg2: libc::c_int, + arg3: CSLConstList, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; + pub fn CPLReadLine3L( + arg1: *mut VSILFILE, + arg2: libc::c_int, + arg3: *mut libc::c_int, + arg4: CSLConstList, + ) -> *const libc::c_char; } extern "C" { - pub fn CPLSerializeXMLTreeToFile( - psTree: *const CPLXMLNode, - pszFilename: *const libc::c_char, - ) -> libc::c_int; + pub fn CPLAtof(arg1: *const libc::c_char) -> f64; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, +extern "C" { + pub fn CPLAtofDelim(arg1: *const libc::c_char, arg2: libc::c_char) -> f64; } -#[test] -fn bindgen_test_layout_OGREnvelope() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(OGREnvelope)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope), - "::", - stringify!(MaxY) - ) - ); +extern "C" { + pub fn CPLStrtod(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f64; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGREnvelope3D { - pub MinX: f64, - pub MaxX: f64, - pub MinY: f64, - pub MaxY: f64, - pub MinZ: f64, - pub MaxZ: f64, +extern "C" { + pub fn CPLStrtodDelim( + arg1: *const libc::c_char, + arg2: *mut *mut libc::c_char, + arg3: libc::c_char, + ) -> f64; } -#[test] -fn bindgen_test_layout_OGREnvelope3D() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(OGREnvelope3D)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGREnvelope3D)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MinZ) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(OGREnvelope3D), - "::", - stringify!(MaxZ) - ) - ); +extern "C" { + pub fn CPLStrtof(arg1: *const libc::c_char, arg2: *mut *mut libc::c_char) -> f32; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; + pub fn CPLStrtofDelim( + arg1: *const libc::c_char, + arg2: *mut *mut libc::c_char, + arg3: libc::c_char, + ) -> f32; } extern "C" { - pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; + pub fn CPLAtofM(arg1: *const libc::c_char) -> f64; } extern "C" { - pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; + pub fn CPLScanString( + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; + pub fn CPLScanDouble(arg1: *const libc::c_char, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGRFree(arg1: *mut libc::c_void); + pub fn CPLScanLong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_long; } -pub mod OGRwkbGeometryType { - #[doc = " List of well known binary geometry types. These are used within the BLOBs"] - #[doc = " but are also returned from OGRGeometry::getGeometryType() to identify the"] - #[doc = " type of a geometry object."] - pub type Type = u32; - #[doc = "< unknown type, non-standard"] - pub const wkbUnknown: Type = 0; - #[doc = "< 0-dimensional geometric object, standard WKB"] - pub const wkbPoint: Type = 1; - #[doc = "< 1-dimensional geometric object with linear"] - #[doc = " interpolation between Points, standard WKB"] - pub const wkbLineString: Type = 2; - #[doc = "< planar 2-dimensional geometric object defined"] - #[doc = " by 1 exterior boundary and 0 or more interior"] - #[doc = " boundaries, standard WKB"] - pub const wkbPolygon: Type = 3; - #[doc = "< GeometryCollection of Points, standard WKB"] - pub const wkbMultiPoint: Type = 4; - #[doc = "< GeometryCollection of LineStrings, standard WKB"] - pub const wkbMultiLineString: Type = 5; - #[doc = "< GeometryCollection of Polygons, standard WKB"] - pub const wkbMultiPolygon: Type = 6; - #[doc = "< geometric object that is a collection of 1"] - #[doc = "or more geometric objects, standard WKB"] - pub const wkbGeometryCollection: Type = 7; - #[doc = "< one or more circular arc segments connected end to end,"] - #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCircularString: Type = 8; - #[doc = "< sequence of contiguous curves, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCompoundCurve: Type = 9; - #[doc = "< planar surface, defined by 1 exterior boundary"] - #[doc = " and zero or more interior boundaries, that are curves."] - #[doc = " ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCurvePolygon: Type = 10; - #[doc = "< GeometryCollection of Curves, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiCurve: Type = 11; - #[doc = "< GeometryCollection of Surfaces, ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiSurface: Type = 12; - #[doc = "< Curve (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurve: Type = 13; - #[doc = "< Surface (abstract type). ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurface: Type = 14; - #[doc = "< a contiguous collection of polygons, which share common boundary segments,"] - #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurface: Type = 15; - #[doc = "< a PolyhedralSurface consisting only of Triangle patches"] - #[doc = " ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTIN: Type = 16; - #[doc = "< a Triangle. ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangle: Type = 17; - #[doc = "< non-standard, for pure attribute records"] - pub const wkbNone: Type = 100; - #[doc = "< non-standard, just for createGeometry()"] - pub const wkbLinearRing: Type = 101; - #[doc = "< wkbCircularString with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCircularStringZ: Type = 1008; - #[doc = "< wkbCompoundCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCompoundCurveZ: Type = 1009; - #[doc = "< wkbCurvePolygon with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbCurvePolygonZ: Type = 1010; - #[doc = "< wkbMultiCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiCurveZ: Type = 1011; - #[doc = "< wkbMultiSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.0"] - pub const wkbMultiSurfaceZ: Type = 1012; - #[doc = "< wkbCurve with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveZ: Type = 1013; - #[doc = "< wkbSurface with Z component. ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceZ: Type = 1014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceZ: Type = 1015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINZ: Type = 1016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleZ: Type = 1017; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPointM: Type = 2001; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbLineStringM: Type = 2002; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPolygonM: Type = 2003; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPointM: Type = 2004; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiLineStringM: Type = 2005; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPolygonM: Type = 2006; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbGeometryCollectionM: Type = 2007; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCircularStringM: Type = 2008; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCompoundCurveM: Type = 2009; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurvePolygonM: Type = 2010; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiCurveM: Type = 2011; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiSurfaceM: Type = 2012; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveM: Type = 2013; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceM: Type = 2014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceM: Type = 2015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINM: Type = 2016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleM: Type = 2017; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPointZM: Type = 3001; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbLineStringZM: Type = 3002; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbPolygonZM: Type = 3003; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPointZM: Type = 3004; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiLineStringZM: Type = 3005; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiPolygonZM: Type = 3006; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbGeometryCollectionZM: Type = 3007; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCircularStringZM: Type = 3008; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCompoundCurveZM: Type = 3009; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurvePolygonZM: Type = 3010; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiCurveZM: Type = 3011; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbMultiSurfaceZM: Type = 3012; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbCurveZM: Type = 3013; - #[doc = "< ISO SQL/MM Part 3. GDAL >= 2.1"] - pub const wkbSurfaceZM: Type = 3014; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbPolyhedralSurfaceZM: Type = 3015; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTINZM: Type = 3016; - #[doc = "< ISO SQL/MM Part 3. Reserved in GDAL >= 2.1 but not yet implemented"] - pub const wkbTriangleZM: Type = 3017; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbPoint25D: Type = 2147483649; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbLineString25D: Type = 2147483650; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbPolygon25D: Type = 2147483651; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiPoint25D: Type = 2147483652; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiLineString25D: Type = 2147483653; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbMultiPolygon25D: Type = 2147483654; - #[doc = "< 2.5D extension as per 99-402"] - pub const wkbGeometryCollection25D: Type = 2147483655; +extern "C" { + pub fn CPLScanULong(arg1: *const libc::c_char, arg2: libc::c_int) -> libc::c_ulong; } extern "C" { - pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; + pub fn CPLScanUIntBig(arg1: *const libc::c_char, arg2: libc::c_int) -> GUIntBig; } extern "C" { - pub fn OGRMergeGeometryTypes( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - ) -> OGRwkbGeometryType::Type; + pub fn CPLAtoGIntBig(pszString: *const libc::c_char) -> GIntBig; } extern "C" { - pub fn OGRMergeGeometryTypesEx( - eMain: OGRwkbGeometryType::Type, - eExtra: OGRwkbGeometryType::Type, - bAllowPromotingToCurves: libc::c_int, - ) -> OGRwkbGeometryType::Type; + pub fn CPLAtoGIntBigEx( + pszString: *const libc::c_char, + bWarn: libc::c_int, + pbOverflow: *mut libc::c_int, + ) -> GIntBig; } extern "C" { - pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLScanPointer(arg1: *const libc::c_char, arg2: libc::c_int) -> *mut libc::c_void; } extern "C" { - pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLPrintString( + arg1: *mut libc::c_char, + arg2: *const libc::c_char, + arg3: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLPrintStringFill( + arg1: *mut libc::c_char, + arg2: *const libc::c_char, + arg3: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_GT_SetModifier( - eType: OGRwkbGeometryType::Type, - bSetZ: libc::c_int, - bSetM: libc::c_int, - ) -> OGRwkbGeometryType::Type; + pub fn CPLPrintInt32(arg1: *mut libc::c_char, arg2: GInt32, arg3: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLPrintUIntBig( + arg1: *mut libc::c_char, + arg2: GUIntBig, + arg3: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLPrintDouble( + arg1: *mut libc::c_char, + arg2: *const libc::c_char, + arg3: f64, + arg4: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OGR_GT_IsSubClassOf( - eType: OGRwkbGeometryType::Type, - eSuperType: OGRwkbGeometryType::Type, + pub fn CPLPrintTime( + arg1: *mut libc::c_char, + arg2: libc::c_int, + arg3: *const libc::c_char, + arg4: *const tm, + arg5: *const libc::c_char, ) -> libc::c_int; } extern "C" { - pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLPrintPointer( + arg1: *mut libc::c_char, + arg2: *mut libc::c_void, + arg3: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLGetSymbol(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut libc::c_void; } extern "C" { - pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; + pub fn CPLGetExecPath(pszPathBuf: *mut libc::c_char, nMaxLength: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLGetPath(arg1: *const libc::c_char) -> *const libc::c_char; } extern "C" { - pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLGetDirname(arg1: *const libc::c_char) -> *const libc::c_char; } extern "C" { - pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; + pub fn CPLGetFilename(arg1: *const libc::c_char) -> *const libc::c_char; } -pub mod OGRwkbByteOrder { - #[doc = " Enumeration to describe byte order"] - pub type Type = u32; - #[doc = "< MSB/Sun/Motoroloa: Most Significant Byte First"] - pub const wkbXDR: Type = 0; - #[doc = "< LSB/Intel/Vax: Least Significant Byte First"] - pub const wkbNDR: Type = 1; +extern "C" { + pub fn CPLGetBasename(arg1: *const libc::c_char) -> *const libc::c_char; } -pub mod OGRFieldType { - #[doc = " List of feature field types. This list is likely to be extended in the"] - #[doc = " future ... avoid coding applications based on the assumption that all"] - #[doc = " field types can be known."] - pub type Type = u32; - #[doc = " Simple 32bit integer"] - pub const OFTInteger: Type = 0; - #[doc = " List of 32bit integers"] - pub const OFTIntegerList: Type = 1; - #[doc = " Double Precision floating point"] - pub const OFTReal: Type = 2; - #[doc = " List of doubles"] - pub const OFTRealList: Type = 3; - #[doc = " String of ASCII chars"] - pub const OFTString: Type = 4; - #[doc = " Array of strings"] - pub const OFTStringList: Type = 5; - #[doc = " deprecated"] - pub const OFTWideString: Type = 6; - #[doc = " deprecated"] - pub const OFTWideStringList: Type = 7; - #[doc = " Raw Binary data"] - pub const OFTBinary: Type = 8; - #[doc = " Date"] - pub const OFTDate: Type = 9; - #[doc = " Time"] - pub const OFTTime: Type = 10; - #[doc = " Date and Time"] - pub const OFTDateTime: Type = 11; - #[doc = " Single 64bit integer"] - pub const OFTInteger64: Type = 12; - #[doc = " List of 64bit integers"] - pub const OFTInteger64List: Type = 13; - #[doc = " List of 64bit integers"] - pub const OFTMaxType: Type = 13; +extern "C" { + pub fn CPLGetExtension(arg1: *const libc::c_char) -> *const libc::c_char; } -pub mod OGRFieldSubType { - #[doc = " List of field subtypes. A subtype represents a hint, a restriction of the"] - #[doc = " main type, that is not strictly necessary to consult."] - #[doc = " This list is likely to be extended in the"] - #[doc = " future ... avoid coding applications based on the assumption that all"] - #[doc = " field types can be known."] - #[doc = " Most subtypes only make sense for a restricted set of main types."] - #[doc = " @since GDAL 2.0"] - pub type Type = u32; - #[doc = " No subtype. This is the default value"] - pub const OFSTNone: Type = 0; - #[doc = " Boolean integer. Only valid for OFTInteger and OFTIntegerList."] - pub const OFSTBoolean: Type = 1; - #[doc = " Signed 16-bit integer. Only valid for OFTInteger and OFTIntegerList."] - pub const OFSTInt16: Type = 2; - #[doc = " Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList."] - pub const OFSTFloat32: Type = 3; - #[doc = " Single precision (32 bit) floating point. Only valid for OFTReal and OFTRealList."] - pub const OFSTMaxSubType: Type = 3; +extern "C" { + pub fn CPLGetCurrentDir() -> *mut libc::c_char; } -pub mod OGRJustification { - #[doc = " Display justification for field values."] - pub type Type = u32; - pub const OJUndefined: Type = 0; - pub const OJLeft: Type = 1; - pub const OJRight: Type = 2; +extern "C" { + pub fn CPLFormFilename( + pszPath: *const libc::c_char, + pszBasename: *const libc::c_char, + pszExtension: *const libc::c_char, + ) -> *const libc::c_char; } -#[doc = " OGRFeature field attribute value union."] -#[repr(C)] -#[derive(Copy, Clone)] -pub union OGRField { - #[doc = " @cond Doxygen_Suppress"] - pub Integer: libc::c_int, - pub Integer64: GIntBig, - pub Real: f64, - pub String: *mut libc::c_char, - pub IntegerList: OGRField__bindgen_ty_1, - pub Integer64List: OGRField__bindgen_ty_2, - pub RealList: OGRField__bindgen_ty_3, - pub StringList: OGRField__bindgen_ty_4, - pub Binary: OGRField__bindgen_ty_5, - pub Set: OGRField__bindgen_ty_6, - pub Date: OGRField__bindgen_ty_7, - _bindgen_union_align: [u64; 2usize], +extern "C" { + pub fn CPLFormCIFilename( + pszPath: *const libc::c_char, + pszBasename: *const libc::c_char, + pszExtension: *const libc::c_char, + ) -> *const libc::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_1 { - pub nCount: libc::c_int, - pub paList: *mut libc::c_int, +extern "C" { + pub fn CPLResetExtension( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + ) -> *const libc::c_char; } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_1), - "::", - stringify!(paList) - ) - ); +extern "C" { + pub fn CPLProjectRelativeFilename( + pszProjectDir: *const libc::c_char, + pszSecondaryFilename: *const libc::c_char, + ) -> *const libc::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_2 { - pub nCount: libc::c_int, - pub paList: *mut GIntBig, +extern "C" { + pub fn CPLIsFilenameRelative(pszFilename: *const libc::c_char) -> libc::c_int; } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_2), - "::", - stringify!(paList) - ) - ); +extern "C" { + pub fn CPLExtractRelativePath( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut libc::c_int, + ) -> *const libc::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_3 { - pub nCount: libc::c_int, - pub paList: *mut f64, +extern "C" { + pub fn CPLCleanTrailingSlash(arg1: *const libc::c_char) -> *const libc::c_char; } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_3), - "::", - stringify!(paList) - ) - ); +extern "C" { + pub fn CPLCorrespondingPaths( + pszOldFilename: *const libc::c_char, + pszNewFilename: *const libc::c_char, + papszFileList: *mut *mut libc::c_char, + ) -> *mut *mut libc::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_4 { - pub nCount: libc::c_int, - pub paList: *mut *mut libc::c_char, +extern "C" { + pub fn CPLCheckForFile( + pszFilename: *mut libc::c_char, + papszSiblingList: *mut *mut libc::c_char, + ) -> libc::c_int; } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_4() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(nCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_4), - "::", - stringify!(paList) - ) - ); +extern "C" { + pub fn CPLGenerateTempFilename(pszStem: *const libc::c_char) -> *const libc::c_char; +} +extern "C" { + pub fn CPLExpandTilde(pszFilename: *const libc::c_char) -> *const libc::c_char; +} +extern "C" { + pub fn CPLGetHomeDir() -> *const libc::c_char; +} +extern "C" { + pub fn CPLLaunderForFilename( + pszName: *const libc::c_char, + pszOutputPath: *const libc::c_char, + ) -> *const libc::c_char; +} +pub type CPLFileFinder = ::std::option::Option< + unsafe extern "C" fn( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + ) -> *const libc::c_char, +>; +extern "C" { + pub fn CPLFindFile( + pszClass: *const libc::c_char, + pszBasename: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn CPLDefaultFindFile( + pszClass: *const libc::c_char, + pszBasename: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn CPLPushFileFinder(pfnFinder: CPLFileFinder); +} +extern "C" { + pub fn CPLPopFileFinder() -> CPLFileFinder; +} +extern "C" { + pub fn CPLPushFinderLocation(arg1: *const libc::c_char); +} +extern "C" { + pub fn CPLPopFinderLocation(); +} +extern "C" { + pub fn CPLFinderClean(); +} +extern "C" { + pub fn CPLStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_5 { - pub nCount: libc::c_int, - pub paData: *mut GByte, +pub struct CPLSharedFileInfo { + pub fp: *mut FILE, + pub nRefCount: libc::c_int, + pub bLarge: libc::c_int, + pub pszFilename: *mut libc::c_char, + pub pszAccess: *mut libc::c_char, } #[test] -fn bindgen_test_layout_OGRField__bindgen_ty_5() { +fn bindgen_test_layout_CPLSharedFileInfo() { assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLSharedFileInfo)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) + concat!("Alignment of ", stringify!(CPLSharedFileInfo)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), + stringify!(CPLSharedFileInfo), "::", - stringify!(nCount) + stringify!(fp) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).nRefCount as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_5), + stringify!(CPLSharedFileInfo), "::", - stringify!(paData) + stringify!(nRefCount) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_6 { - pub nMarker1: libc::c_int, - pub nMarker2: libc::c_int, - pub nMarker3: libc::c_int, -} -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_6() { assert_eq!( - ::std::mem::size_of::(), + unsafe { &(*(::std::ptr::null::())).bLarge as *const _ as usize }, 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, - 0usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), + stringify!(CPLSharedFileInfo), "::", - stringify!(nMarker1) + stringify!(bLarge) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, - 4usize, + unsafe { &(*(::std::ptr::null::())).pszFilename as *const _ as usize }, + 16usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), + stringify!(CPLSharedFileInfo), "::", - stringify!(nMarker2) + stringify!(pszFilename) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, - 8usize, + unsafe { &(*(::std::ptr::null::())).pszAccess as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(OGRField__bindgen_ty_6), + stringify!(CPLSharedFileInfo), "::", - stringify!(nMarker3) + stringify!(pszAccess) ) ); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct OGRField__bindgen_ty_7 { - pub Year: GInt16, - pub Month: GByte, - pub Day: GByte, - pub Hour: GByte, - pub Minute: GByte, - pub TZFlag: GByte, - pub Reserved: GByte, - pub Second: f32, +extern "C" { + pub fn CPLOpenShared( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: libc::c_int, + ) -> *mut FILE; } -#[test] -fn bindgen_test_layout_OGRField__bindgen_ty_7() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Year) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Month) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, - 3usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Day) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Hour) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Minute) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(TZFlag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Reserved) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(OGRField__bindgen_ty_7), - "::", - stringify!(Second) - ) - ); +extern "C" { + pub fn CPLCloseShared(arg1: *mut FILE); } -#[test] -fn bindgen_test_layout_OGRField() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(OGRField)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(OGRField)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Real) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(String) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(IntegerList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Integer64List) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(RealList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(StringList) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Binary) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Set) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(OGRField), - "::", - stringify!(Date) - ) - ); +extern "C" { + pub fn CPLGetSharedList(arg1: *mut libc::c_int) -> *mut CPLSharedFileInfo; } extern "C" { - pub fn OGRParseDate( - pszInput: *const libc::c_char, - psOutput: *mut OGRField, - nOptions: libc::c_int, - ) -> libc::c_int; + pub fn CPLDumpSharedList(arg1: *mut FILE); } -pub mod ogr_style_tool_class_id { - #[doc = " OGRStyleTool derived class types (returned by GetType())."] - pub type Type = u32; - #[doc = "< None"] - pub const OGRSTCNone: Type = 0; - #[doc = "< Pen"] - pub const OGRSTCPen: Type = 1; - #[doc = "< Brush"] - pub const OGRSTCBrush: Type = 2; - #[doc = "< Symbol"] - pub const OGRSTCSymbol: Type = 3; - #[doc = "< Label"] - pub const OGRSTCLabel: Type = 4; - #[doc = "< Vector"] - pub const OGRSTCVector: Type = 5; +extern "C" { + pub fn CPLCleanupSharedFileMutex(); } -pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; -pub mod ogr_style_tool_units_id { - #[doc = " List of units supported by OGRStyleTools."] - pub type Type = u32; - #[doc = "< Ground unit"] - pub const OGRSTUGround: Type = 0; - #[doc = "< Pixel"] - pub const OGRSTUPixel: Type = 1; - #[doc = "< Points"] - pub const OGRSTUPoints: Type = 2; - #[doc = "< Millimeter"] - pub const OGRSTUMM: Type = 3; - #[doc = "< Centimeter"] - pub const OGRSTUCM: Type = 4; - #[doc = "< Inch"] - pub const OGRSTUInches: Type = 5; +extern "C" { + pub fn CPLDMSToDec(is: *const libc::c_char) -> f64; } -pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; extern "C" { - pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; + pub fn CPLDecToDMS( + dfAngle: f64, + pszAxis: *const libc::c_char, + nPrecision: libc::c_int, + ) -> *const libc::c_char; } extern "C" { - #[doc = " Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor."] - #[doc = ""] - #[doc = "The purpose of this method is to ensure that calling code will run with the GDAL"] - #[doc = "version it is compiled for. It is primarily indented for external plugins."] - #[doc = ""] - #[doc = "@param nVersionMajor Major version to be tested against"] - #[doc = "@param nVersionMinor Minor version to be tested against"] - #[doc = "@param pszCallingComponentName If not NULL, in case of version mismatch, the method"] - #[doc = "will issue a failure mentioning the name of"] - #[doc = "the calling component."] - pub fn GDALCheckVersion( - nVersionMajor: libc::c_int, - nVersionMinor: libc::c_int, - pszCallingComponentName: *const libc::c_char, - ) -> libc::c_int; + pub fn CPLPackedDMSToDec(arg1: f64) -> f64; } -#[doc = " Opaque type for a geometry"] -pub type OGRGeometryH = *mut libc::c_void; -#[doc = " Opaque type for a spatial reference system"] -pub type OGRSpatialReferenceH = *mut libc::c_void; -#[doc = " Opaque type for a coordinate transformation object"] -pub type OGRCoordinateTransformationH = *mut libc::c_void; extern "C" { - pub fn OGR_G_CreateFromWkb( - arg1: *const libc::c_void, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - ) -> OGRErr::Type; + pub fn CPLDecToPackedDMS(dfDec: f64) -> f64; } extern "C" { - pub fn OGR_G_CreateFromWkt( - arg1: *mut *mut libc::c_char, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - ) -> OGRErr::Type; + pub fn CPLStringToComplex(pszString: *const libc::c_char, pdfReal: *mut f64, pdfImag: *mut f64); } extern "C" { - pub fn OGR_G_CreateFromFgf( - arg1: *const libc::c_void, - arg2: OGRSpatialReferenceH, - arg3: *mut OGRGeometryH, - arg4: libc::c_int, - arg5: *mut libc::c_int, - ) -> OGRErr::Type; + pub fn CPLUnlinkTree(arg1: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); + pub fn CPLCopyFile( + pszNewPath: *const libc::c_char, + pszOldPath: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; + pub fn CPLCopyTree( + pszNewPath: *const libc::c_char, + pszOldPath: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_ApproximateArcAngles( - dfCenterX: f64, - dfCenterY: f64, - dfZ: f64, - dfPrimaryRadius: f64, - dfSecondaryAxis: f64, - dfRotation: f64, - dfStartAngle: f64, - dfEndAngle: f64, - dfMaxAngleStepSizeDegrees: f64, - ) -> OGRGeometryH; + pub fn CPLMoveFile( + pszNewPath: *const libc::c_char, + pszOldPath: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CPLSymlink( + pszOldPath: *const libc::c_char, + pszNewPath: *const libc::c_char, + papszOptions: CSLConstList, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CPLCreateZip( + pszZipFilename: *const libc::c_char, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CPLCreateFileInZip( + hZip: *mut libc::c_void, + pszFilename: *const libc::c_char, + papszOptions: *mut *mut libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CPLWriteFileInZip( + hZip: *mut libc::c_void, + pBuffer: *const libc::c_void, + nBufferSize: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CPLCloseFileInZip(hZip: *mut libc::c_void) -> CPLErr::Type; } extern "C" { - pub fn OGR_G_ForceTo( - hGeom: OGRGeometryH, - eTargetType: OGRwkbGeometryType::Type, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; + pub fn CPLCloseZip(hZip: *mut libc::c_void) -> CPLErr::Type; } extern "C" { - pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLZLibDeflate( + ptr: *const libc::c_void, + nBytes: usize, + nLevel: libc::c_int, + outptr: *mut libc::c_void, + nOutAvailableBytes: usize, + pnOutBytes: *mut usize, + ) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLZLibInflate( + ptr: *const libc::c_void, + nBytes: usize, + outptr: *mut libc::c_void, + nOutAvailableBytes: usize, + pnOutBytes: *mut usize, + ) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLValidateXML( + pszXMLFilename: *const libc::c_char, + pszXSDFilename: *const libc::c_char, + papszOptions: CSLConstList, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); + pub fn CPLsetlocale(category: libc::c_int, locale: *const libc::c_char) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLCleanupSetlocaleMutex(); } extern "C" { - pub fn OGR_G_IsMeasured(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLIsPowerOfTwo(i: libc::c_uint) -> libc::c_int; } extern "C" { - pub fn OGR_G_Set3D(arg1: OGRGeometryH, arg2: libc::c_int); + pub fn CSLAddString( + papszStrList: *mut *mut libc::c_char, + pszNewString: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_SetMeasured(arg1: OGRGeometryH, arg2: libc::c_int); + pub fn CSLAddStringMayFail( + papszStrList: *mut *mut libc::c_char, + pszNewString: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CSLCount(papszStrList: CSLConstList) -> libc::c_int; } extern "C" { - pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); + pub fn CSLGetField(arg1: CSLConstList, arg2: libc::c_int) -> *const libc::c_char; } extern "C" { - pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); + pub fn CSLDestroy(papszStrList: *mut *mut libc::c_char); } extern "C" { - pub fn OGR_G_ImportFromWkb( - arg1: OGRGeometryH, - arg2: *const libc::c_void, - arg3: libc::c_int, - ) -> OGRErr::Type; + pub fn CSLDuplicate(papszStrList: CSLConstList) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_ExportToWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; + pub fn CSLMerge( + papszOrig: *mut *mut libc::c_char, + papszOverride: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_ExportToIsoWkb( - arg1: OGRGeometryH, - arg2: OGRwkbByteOrder::Type, - arg3: *mut libc::c_uchar, - ) -> OGRErr::Type; + pub fn CSLTokenizeString(pszString: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; + pub fn CSLTokenizeStringComplex( + pszString: *const libc::c_char, + pszDelimiter: *const libc::c_char, + bHonourStrings: libc::c_int, + bAllowEmptyTokens: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; + pub fn CSLTokenizeString2( + pszString: *const libc::c_char, + pszDelimiter: *const libc::c_char, + nCSLTFlags: libc::c_int, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; + pub fn CSLPrint(papszStrList: CSLConstList, fpOut: *mut FILE) -> libc::c_int; } extern "C" { - pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; + pub fn CSLLoad(pszFname: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; + pub fn CSLLoad2( + pszFname: *const libc::c_char, + nMaxLines: libc::c_int, + nMaxCols: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; + pub fn CSLSave(papszStrList: CSLConstList, pszFname: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); + pub fn CSLInsertStrings( + papszStrList: *mut *mut libc::c_char, + nInsertAtLineNo: libc::c_int, + papszNewLines: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); + pub fn CSLInsertString( + papszStrList: *mut *mut libc::c_char, + nInsertAtLineNo: libc::c_int, + pszNewLine: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_CloseRings(arg1: OGRGeometryH); + pub fn CSLRemoveStrings( + papszStrList: *mut *mut libc::c_char, + nFirstLineToDelete: libc::c_int, + nNumToRemove: libc::c_int, + ppapszRetStrings: *mut *mut *mut libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; + pub fn CSLFindString(papszList: CSLConstList, pszTarget: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; + pub fn CSLFindStringCaseSensitive( + papszList: CSLConstList, + pszTarget: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_ExportToGMLEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; + pub fn CSLPartialFindString( + papszHaystack: CSLConstList, + pszNeedle: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; + pub fn CSLFindName(papszStrList: CSLConstList, pszName: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; + pub fn CSLFetchBoolean( + papszStrList: CSLConstList, + pszKey: *const libc::c_char, + bDefault: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; + pub fn CSLTestBoolean(pszValue: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_G_ExportToKML( - arg1: OGRGeometryH, - pszAltitudeMode: *const libc::c_char, - ) -> *mut libc::c_char; + pub fn CPLTestBoolean(pszValue: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; + pub fn CPLParseNameValue( + pszNameValue: *const libc::c_char, + ppszKey: *mut *mut libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn OGR_G_ExportToJsonEx( - arg1: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_char; + pub fn CSLFetchNameValue( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - #[doc = " Create a OGR geometry from a GeoJSON geometry object"] - pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; + pub fn CSLFetchNameValueDef( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + pszDefault: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); + pub fn CSLFetchNameValueMultiple( + papszStrList: CSLConstList, + pszName: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; + pub fn CSLAddNameValue( + papszStrList: *mut *mut libc::c_char, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; + pub fn CSLSetNameValue( + papszStrList: *mut *mut libc::c_char, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn CSLSetNameValueSeparator( + papszStrList: *mut *mut libc::c_char, + pszSeparator: *const libc::c_char, + ); } extern "C" { - pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; + pub fn CSLParseCommandLine(pszCommandLine: *const libc::c_char) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; + pub fn CPLEscapeString( + pszString: *const libc::c_char, + nLength: libc::c_int, + nScheme: libc::c_int, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_DelaunayTriangulation( - hThis: OGRGeometryH, - dfTolerance: f64, - bOnlyEdges: libc::c_int, - ) -> OGRGeometryH; + pub fn CPLUnescapeString( + pszString: *const libc::c_char, + pnLength: *mut libc::c_int, + nScheme: libc::c_int, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_Segmentize(hGeom: OGRGeometryH, dfMaxLength: f64); + pub fn CPLBinaryToHex(nBytes: libc::c_int, pabyData: *const GByte) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_Intersects(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn CPLHexToBinary(pszHex: *const libc::c_char, pnBytes: *mut libc::c_int) -> *mut GByte; } extern "C" { - pub fn OGR_G_Equals(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn CPLBase64Encode(nBytes: libc::c_int, pabyData: *const GByte) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_Disjoint(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn CPLBase64DecodeInPlace(pszBase64: *mut GByte) -> libc::c_int; } -extern "C" { - pub fn OGR_G_Touches(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; +pub mod CPLValueType { + pub type Type = libc::c_uint; + pub const CPL_VALUE_STRING: Type = 0; + pub const CPL_VALUE_REAL: Type = 1; + pub const CPL_VALUE_INTEGER: Type = 2; } extern "C" { - pub fn OGR_G_Crosses(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn CPLGetValueType(pszValue: *const libc::c_char) -> CPLValueType::Type; } extern "C" { - pub fn OGR_G_Within(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn CPLStrlcpy( + pszDest: *mut libc::c_char, + pszSrc: *const libc::c_char, + nDestSize: usize, + ) -> usize; } extern "C" { - pub fn OGR_G_Contains(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn CPLStrlcat( + pszDest: *mut libc::c_char, + pszSrc: *const libc::c_char, + nDestSize: usize, + ) -> usize; } extern "C" { - pub fn OGR_G_Overlaps(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn CPLStrnlen(pszStr: *const libc::c_char, nMaxLen: usize) -> usize; } extern "C" { - pub fn OGR_G_Boundary(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CPLvsnprintf( + str_: *mut libc::c_char, + size: usize, + fmt: *const libc::c_char, + args: *mut __va_list_tag, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_ConvexHull(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CPLsnprintf( + str_: *mut libc::c_char, + size: usize, + fmt: *const libc::c_char, + ... + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_Buffer(arg1: OGRGeometryH, arg2: f64, arg3: libc::c_int) -> OGRGeometryH; + pub fn CPLsprintf(str_: *mut libc::c_char, fmt: *const libc::c_char, ...) -> libc::c_int; } extern "C" { - pub fn OGR_G_Intersection(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; + pub fn CPLprintf(fmt: *const libc::c_char, ...) -> libc::c_int; } extern "C" { - pub fn OGR_G_Union(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; + pub fn CPLsscanf(str_: *const libc::c_char, fmt: *const libc::c_char, ...) -> libc::c_int; } extern "C" { - pub fn OGR_G_UnionCascaded(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CPLSPrintf(fmt: *const libc::c_char, ...) -> *const libc::c_char; } extern "C" { - pub fn OGR_G_PointOnSurface(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CSLAppendPrintf( + papszStrList: *mut *mut libc::c_char, + fmt: *const libc::c_char, + ... + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OGR_G_Difference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; + pub fn CPLVASPrintf( + buf: *mut *mut libc::c_char, + fmt: *const libc::c_char, + args: *mut __va_list_tag, + ) -> libc::c_int; } extern "C" { - pub fn OGR_G_SymDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; + pub fn CPLEncodingCharSize(pszEncoding: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_G_Distance(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; + pub fn CPLClearRecodeWarningFlags(); } extern "C" { - pub fn OGR_G_Distance3D(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; + pub fn CPLRecode( + pszSource: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_Length(arg1: OGRGeometryH) -> f64; + pub fn CPLRecodeFromWChar( + pwszSource: *const wchar_t, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_Area(arg1: OGRGeometryH) -> f64; + pub fn CPLRecodeToWChar( + pszSource: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> *mut wchar_t; } extern "C" { - pub fn OGR_G_Centroid(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn CPLIsUTF8(pabyData: *const libc::c_char, nLen: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGR_G_Value(arg1: OGRGeometryH, dfDistance: f64) -> OGRGeometryH; + pub fn CPLForceToASCII( + pabyData: *const libc::c_char, + nLen: libc::c_int, + chReplacementChar: libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_Empty(arg1: OGRGeometryH); + pub fn CPLStrlenUTF8(pszUTF8Str: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn OGR_G_IsEmpty(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLCanRecode( + pszTestStr: *const libc::c_char, + pszSrcEncoding: *const libc::c_char, + pszDstEncoding: *const libc::c_char, + ) -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLHashSet { + _unused: [u8; 0], } +pub type CPLHashSet = _CPLHashSet; +pub type CPLHashSetHashFunc = + ::std::option::Option libc::c_ulong>; +pub type CPLHashSetEqualFunc = ::std::option::Option< + unsafe extern "C" fn(elt1: *const libc::c_void, elt2: *const libc::c_void) -> libc::c_int, +>; +pub type CPLHashSetFreeEltFunc = + ::std::option::Option; +pub type CPLHashSetIterEltFunc = ::std::option::Option< + unsafe extern "C" fn(elt: *mut libc::c_void, user_data: *mut libc::c_void) -> libc::c_int, +>; extern "C" { - pub fn OGR_G_IsValid(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLHashSetNew( + fnHashFunc: CPLHashSetHashFunc, + fnEqualFunc: CPLHashSetEqualFunc, + fnFreeEltFunc: CPLHashSetFreeEltFunc, + ) -> *mut CPLHashSet; } extern "C" { - pub fn OGR_G_IsSimple(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLHashSetDestroy(set: *mut CPLHashSet); } extern "C" { - pub fn OGR_G_IsRing(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLHashSetClear(set: *mut CPLHashSet); } extern "C" { - pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CPLHashSetSize(set: *const CPLHashSet) -> libc::c_int; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn CPLHashSetForeach( + set: *mut CPLHashSet, + fnIterFunc: CPLHashSetIterEltFunc, + user_data: *mut libc::c_void, + ); } extern "C" { - pub fn OGR_G_Equal(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; + pub fn CPLHashSetInsert(set: *mut CPLHashSet, elt: *mut libc::c_void) -> libc::c_int; } extern "C" { - pub fn OGR_G_SymmetricDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; + pub fn CPLHashSetLookup(set: *mut CPLHashSet, elt: *const libc::c_void) -> *mut libc::c_void; } extern "C" { - pub fn OGR_G_GetArea(arg1: OGRGeometryH) -> f64; + pub fn CPLHashSetRemove(set: *mut CPLHashSet, elt: *const libc::c_void) -> libc::c_int; } extern "C" { - pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; + pub fn CPLHashSetRemoveDeferRehash( + set: *mut CPLHashSet, + elt: *const libc::c_void, + ) -> libc::c_int; } extern "C" { - #[doc = " @endcond"] - pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLHashSetHashPointer(elt: *const libc::c_void) -> libc::c_ulong; } extern "C" { - pub fn OGR_G_GetPoints( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, + pub fn CPLHashSetEqualPointer( + elt1: *const libc::c_void, + elt2: *const libc::c_void, ) -> libc::c_int; } extern "C" { - pub fn OGR_G_GetPointsZM( - hGeom: OGRGeometryH, - pabyX: *mut libc::c_void, - nXStride: libc::c_int, - pabyY: *mut libc::c_void, - nYStride: libc::c_int, - pabyZ: *mut libc::c_void, - nZStride: libc::c_int, - pabyM: *mut libc::c_void, - nMStride: libc::c_int, - ) -> libc::c_int; + pub fn CPLHashSetHashStr(pszStr: *const libc::c_void) -> libc::c_ulong; } extern "C" { - pub fn OGR_G_GetX(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; + pub fn CPLHashSetEqualStr( + pszStr1: *const libc::c_void, + pszStr2: *const libc::c_void, + ) -> libc::c_int; } -extern "C" { - pub fn OGR_G_GetY(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; +pub type CPLList = _CPLList; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLList { + pub pData: *mut libc::c_void, + pub psNext: *mut _CPLList, } -extern "C" { - pub fn OGR_G_GetZ(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; +#[test] +fn bindgen_test_layout__CPLList() { + assert_eq!( + ::std::mem::size_of::<_CPLList>(), + 16usize, + concat!("Size of: ", stringify!(_CPLList)) + ); + assert_eq!( + ::std::mem::align_of::<_CPLList>(), + 8usize, + concat!("Alignment of ", stringify!(_CPLList)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_CPLList>())).pData as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_CPLList), + "::", + stringify!(pData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_CPLList>())).psNext as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_CPLList), + "::", + stringify!(psNext) + ) + ); } extern "C" { - pub fn OGR_G_GetM(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; + pub fn CPLListAppend(psList: *mut CPLList, pData: *mut libc::c_void) -> *mut CPLList; } extern "C" { - pub fn OGR_G_GetPoint( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, - ); + pub fn CPLListInsert( + psList: *mut CPLList, + pData: *mut libc::c_void, + nPosition: libc::c_int, + ) -> *mut CPLList; } extern "C" { - pub fn OGR_G_GetPointZM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: *mut f64, - arg3: *mut f64, - arg4: *mut f64, - arg5: *mut f64, - ); + pub fn CPLListGetLast(psList: *mut CPLList) -> *mut CPLList; } extern "C" { - pub fn OGR_G_SetPointCount(hGeom: OGRGeometryH, nNewPointCount: libc::c_int); + pub fn CPLListGet(psList: *mut CPLList, nPosition: libc::c_int) -> *mut CPLList; } extern "C" { - pub fn OGR_G_SetPoint(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64, arg4: f64); + pub fn CPLListCount(psList: *const CPLList) -> libc::c_int; } extern "C" { - pub fn OGR_G_SetPoint_2D(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64); + pub fn CPLListRemove(psList: *mut CPLList, nPosition: libc::c_int) -> *mut CPLList; } extern "C" { - pub fn OGR_G_SetPointM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: f64, - arg3: f64, - arg4: f64, - ); + pub fn CPLListDestroy(psList: *mut CPLList); } extern "C" { - pub fn OGR_G_SetPointZM( - arg1: OGRGeometryH, - iPoint: libc::c_int, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - ); + pub fn CPLListGetNext(psElement: *const CPLList) -> *mut CPLList; } extern "C" { - pub fn OGR_G_AddPoint(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); + pub fn CPLListGetData(psElement: *const CPLList) -> *mut libc::c_void; } -extern "C" { - pub fn OGR_G_AddPoint_2D(arg1: OGRGeometryH, arg2: f64, arg3: f64); +pub mod CPLXMLNodeType { + pub type Type = libc::c_uint; + pub const CXT_Element: Type = 0; + pub const CXT_Text: Type = 1; + pub const CXT_Attribute: Type = 2; + pub const CXT_Comment: Type = 3; + pub const CXT_Literal: Type = 4; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CPLXMLNode { + pub eType: CPLXMLNodeType::Type, + pub pszValue: *mut libc::c_char, + pub psNext: *mut CPLXMLNode, + pub psChild: *mut CPLXMLNode, +} +#[test] +fn bindgen_test_layout_CPLXMLNode() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLXMLNode)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CPLXMLNode)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CPLXMLNode), + "::", + stringify!(eType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CPLXMLNode), + "::", + stringify!(pszValue) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).psNext as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CPLXMLNode), + "::", + stringify!(psNext) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).psChild as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CPLXMLNode), + "::", + stringify!(psChild) + ) + ); } extern "C" { - pub fn OGR_G_AddPointM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); + pub fn CPLParseXMLString(arg1: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_G_AddPointZM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); + pub fn CPLDestroyXMLNode(arg1: *mut CPLXMLNode); } extern "C" { - pub fn OGR_G_SetPoints( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *const libc::c_void, - nXStride: libc::c_int, - pabyY: *const libc::c_void, - nYStride: libc::c_int, - pabyZ: *const libc::c_void, - nZStride: libc::c_int, - ); + pub fn CPLGetXMLNode(poRoot: *mut CPLXMLNode, pszPath: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_G_SetPointsZM( - hGeom: OGRGeometryH, - nPointsIn: libc::c_int, - pabyX: *const libc::c_void, - nXStride: libc::c_int, - pabyY: *const libc::c_void, - nYStride: libc::c_int, - pabyZ: *const libc::c_void, - nZStride: libc::c_int, - pabyM: *const libc::c_void, - nMStride: libc::c_int, - ); + pub fn CPLSearchXMLNode( + poRoot: *mut CPLXMLNode, + pszTarget: *const libc::c_char, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_G_SwapXY(hGeom: OGRGeometryH); + pub fn CPLGetXMLValue( + poRoot: *const CPLXMLNode, + pszPath: *const libc::c_char, + pszDefault: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn OGR_G_GetGeometryCount(arg1: OGRGeometryH) -> libc::c_int; + pub fn CPLCreateXMLNode( + poParent: *mut CPLXMLNode, + eType: CPLXMLNodeType::Type, + pszText: *const libc::c_char, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_G_GetGeometryRef(arg1: OGRGeometryH, arg2: libc::c_int) -> OGRGeometryH; + pub fn CPLSerializeXMLTree(psNode: *const CPLXMLNode) -> *mut libc::c_char; } extern "C" { - pub fn OGR_G_AddGeometry(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; + pub fn CPLAddXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode); } extern "C" { - pub fn OGR_G_AddGeometryDirectly(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; + pub fn CPLRemoveXMLChild(psParent: *mut CPLXMLNode, psChild: *mut CPLXMLNode) -> libc::c_int; } extern "C" { - pub fn OGR_G_RemoveGeometry( - arg1: OGRGeometryH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> OGRErr::Type; + pub fn CPLAddXMLSibling(psOlderSibling: *mut CPLXMLNode, psNewSibling: *mut CPLXMLNode); } extern "C" { - pub fn OGR_G_HasCurveGeometry( - arg1: OGRGeometryH, - bLookForNonLinear: libc::c_int, - ) -> libc::c_int; + pub fn CPLCreateXMLElementAndValue( + psParent: *mut CPLXMLNode, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_G_GetLinearGeometry( - hGeom: OGRGeometryH, - dfMaxAngleStepSizeDegrees: f64, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; + pub fn CPLAddXMLAttributeAndValue( + psParent: *mut CPLXMLNode, + pszName: *const libc::c_char, + pszValue: *const libc::c_char, + ); } extern "C" { - pub fn OGR_G_GetCurveGeometry( - hGeom: OGRGeometryH, - papszOptions: *mut *mut libc::c_char, - ) -> OGRGeometryH; + pub fn CPLCloneXMLTree(psTree: *const CPLXMLNode) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRBuildPolygonFromEdges( - hLinesAsCollection: OGRGeometryH, - bBestEffort: libc::c_int, - bAutoClose: libc::c_int, - dfTolerance: f64, - peErr: *mut OGRErr::Type, - ) -> OGRGeometryH; + pub fn CPLSetXMLValue( + psRoot: *mut CPLXMLNode, + pszPath: *const libc::c_char, + pszValue: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( - bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, - ) -> OGRErr::Type; + pub fn CPLStripXMLNamespace( + psRoot: *mut CPLXMLNode, + pszNameSpace: *const libc::c_char, + bRecurse: libc::c_int, + ); } extern "C" { - pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; + pub fn CPLCleanXMLElementName(arg1: *mut libc::c_char); } extern "C" { - #[doc = " @endcond"] - pub fn OGRSetNonLinearGeometriesEnabledFlag(bFlag: libc::c_int); + pub fn CPLParseXMLFile(pszFilename: *const libc::c_char) -> *mut CPLXMLNode; } extern "C" { - pub fn OGRGetNonLinearGeometriesEnabledFlag() -> libc::c_int; + pub fn CPLSerializeXMLTreeToFile( + psTree: *const CPLXMLNode, + pszFilename: *const libc::c_char, + ) -> libc::c_int; } -#[doc = " Opaque type for a field definition (OGRFieldDefn)"] -pub type OGRFieldDefnH = *mut libc::c_void; -#[doc = " Opaque type for a feature definition (OGRFeatureDefn)"] -pub type OGRFeatureDefnH = *mut libc::c_void; -#[doc = " Opaque type for a feature (OGRFeature)"] -pub type OGRFeatureH = *mut libc::c_void; -#[doc = " Opaque type for a style table (OGRStyleTable)"] -pub type OGRStyleTableH = *mut libc::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct OGRGeomFieldDefnHS { - _unused: [u8; 0], -} -#[doc = " Opaque type for a geometry field definition (OGRGeomFieldDefn)"] -pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; -extern "C" { - pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; +pub struct CPLRectObj { + pub minx: f64, + pub miny: f64, + pub maxx: f64, + pub maxy: f64, } -extern "C" { - pub fn OGR_Fld_Destroy(arg1: OGRFieldDefnH); -} -extern "C" { - pub fn OGR_Fld_SetName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_Fld_GetNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; +#[test] +fn bindgen_test_layout_CPLRectObj() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CPLRectObj)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CPLRectObj)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).minx as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CPLRectObj), + "::", + stringify!(minx) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).miny as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CPLRectObj), + "::", + stringify!(miny) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxx as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CPLRectObj), + "::", + stringify!(maxx) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).maxy as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CPLRectObj), + "::", + stringify!(maxy) + ) + ); } -extern "C" { - pub fn OGR_Fld_GetType(arg1: OGRFieldDefnH) -> OGRFieldType::Type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLQuadTree { + _unused: [u8; 0], } +pub type CPLQuadTree = _CPLQuadTree; +pub type CPLQuadTreeGetBoundsFunc = ::std::option::Option< + unsafe extern "C" fn(hFeature: *const libc::c_void, pBounds: *mut CPLRectObj), +>; +pub type CPLQuadTreeForeachFunc = ::std::option::Option< + unsafe extern "C" fn(pElt: *mut libc::c_void, pUserData: *mut libc::c_void) -> libc::c_int, +>; +pub type CPLQuadTreeDumpFeatureFunc = ::std::option::Option< + unsafe extern "C" fn( + hFeature: *const libc::c_void, + nIndentLevel: libc::c_int, + pUserData: *mut libc::c_void, + ), +>; extern "C" { - pub fn OGR_Fld_SetType(arg1: OGRFieldDefnH, arg2: OGRFieldType::Type); + pub fn CPLQuadTreeCreate( + pGlobalBounds: *const CPLRectObj, + pfnGetBounds: CPLQuadTreeGetBoundsFunc, + ) -> *mut CPLQuadTree; } extern "C" { - pub fn OGR_Fld_GetSubType(arg1: OGRFieldDefnH) -> OGRFieldSubType::Type; + pub fn CPLQuadTreeDestroy(hQuadtree: *mut CPLQuadTree); } extern "C" { - pub fn OGR_Fld_SetSubType(arg1: OGRFieldDefnH, arg2: OGRFieldSubType::Type); + pub fn CPLQuadTreeSetBucketCapacity(hQuadtree: *mut CPLQuadTree, nBucketCapacity: libc::c_int); } extern "C" { - pub fn OGR_Fld_GetJustify(arg1: OGRFieldDefnH) -> OGRJustification::Type; + pub fn CPLQuadTreeGetAdvisedMaxDepth(nExpectedFeatures: libc::c_int) -> libc::c_int; } extern "C" { - pub fn OGR_Fld_SetJustify(arg1: OGRFieldDefnH, arg2: OGRJustification::Type); + pub fn CPLQuadTreeSetMaxDepth(hQuadtree: *mut CPLQuadTree, nMaxDepth: libc::c_int); } extern "C" { - pub fn OGR_Fld_GetWidth(arg1: OGRFieldDefnH) -> libc::c_int; + pub fn CPLQuadTreeInsert(hQuadtree: *mut CPLQuadTree, hFeature: *mut libc::c_void); } extern "C" { - pub fn OGR_Fld_SetWidth(arg1: OGRFieldDefnH, arg2: libc::c_int); + pub fn CPLQuadTreeInsertWithBounds( + hQuadtree: *mut CPLQuadTree, + hFeature: *mut libc::c_void, + psBounds: *const CPLRectObj, + ); } extern "C" { - pub fn OGR_Fld_GetPrecision(arg1: OGRFieldDefnH) -> libc::c_int; + pub fn CPLQuadTreeSearch( + hQuadtree: *const CPLQuadTree, + pAoi: *const CPLRectObj, + pnFeatureCount: *mut libc::c_int, + ) -> *mut *mut libc::c_void; } extern "C" { - pub fn OGR_Fld_SetPrecision(arg1: OGRFieldDefnH, arg2: libc::c_int); + pub fn CPLQuadTreeForeach( + hQuadtree: *const CPLQuadTree, + pfnForeach: CPLQuadTreeForeachFunc, + pUserData: *mut libc::c_void, + ); } extern "C" { - pub fn OGR_Fld_Set( - arg1: OGRFieldDefnH, - arg2: *const libc::c_char, - arg3: OGRFieldType::Type, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: OGRJustification::Type, + pub fn CPLQuadTreeDump( + hQuadtree: *const CPLQuadTree, + pfnDumpFeatureFunc: CPLQuadTreeDumpFeatureFunc, + pUserData: *mut libc::c_void, ); } extern "C" { - pub fn OGR_Fld_IsIgnored(hDefn: OGRFieldDefnH) -> libc::c_int; + pub fn CPLQuadTreeGetStats( + hQuadtree: *const CPLQuadTree, + pnFeatureCount: *mut libc::c_int, + pnNodeCount: *mut libc::c_int, + pnMaxDepth: *mut libc::c_int, + pnMaxBucketCapacity: *mut libc::c_int, + ); } -extern "C" { - pub fn OGR_Fld_SetIgnored(hDefn: OGRFieldDefnH, arg1: libc::c_int); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CPLVirtualMem { + _unused: [u8; 0], } -extern "C" { - pub fn OGR_Fld_IsNullable(hDefn: OGRFieldDefnH) -> libc::c_int; +pub type CPLVirtualMemCachePageCbk = ::std::option::Option< + unsafe extern "C" fn( + ctxt: *mut CPLVirtualMem, + nOffset: usize, + pPageToFill: *mut libc::c_void, + nToFill: usize, + pUserData: *mut libc::c_void, + ), +>; +pub type CPLVirtualMemUnCachePageCbk = ::std::option::Option< + unsafe extern "C" fn( + ctxt: *mut CPLVirtualMem, + nOffset: usize, + pPageToBeEvicted: *const libc::c_void, + nToBeEvicted: usize, + pUserData: *mut libc::c_void, + ), +>; +pub type CPLVirtualMemFreeUserData = + ::std::option::Option; +pub mod CPLVirtualMemAccessMode { + pub type Type = libc::c_uint; + pub const VIRTUALMEM_READONLY: Type = 0; + pub const VIRTUALMEM_READONLY_ENFORCED: Type = 1; + pub const VIRTUALMEM_READWRITE: Type = 2; } extern "C" { - pub fn OGR_Fld_SetNullable(hDefn: OGRFieldDefnH, arg1: libc::c_int); + pub fn CPLGetPageSize() -> usize; } extern "C" { - pub fn OGR_Fld_GetDefault(hDefn: OGRFieldDefnH) -> *const libc::c_char; + pub fn CPLVirtualMemNew( + nSize: usize, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + eAccessMode: CPLVirtualMemAccessMode::Type, + pfnCachePage: CPLVirtualMemCachePageCbk, + pfnUnCachePage: CPLVirtualMemUnCachePageCbk, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn OGR_Fld_SetDefault(hDefn: OGRFieldDefnH, arg1: *const libc::c_char); + pub fn CPLIsVirtualMemFileMapAvailable() -> libc::c_int; } extern "C" { - pub fn OGR_Fld_IsDefaultDriverSpecific(hDefn: OGRFieldDefnH) -> libc::c_int; + pub fn CPLVirtualMemFileMapNew( + fp: *mut VSILFILE, + nOffset: vsi_l_offset, + nLength: vsi_l_offset, + eAccessMode: CPLVirtualMemAccessMode::Type, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn OGR_GetFieldTypeName(arg1: OGRFieldType::Type) -> *const libc::c_char; + pub fn CPLVirtualMemDerivedNew( + pVMemBase: *mut CPLVirtualMem, + nOffset: vsi_l_offset, + nSize: vsi_l_offset, + pfnFreeUserData: CPLVirtualMemFreeUserData, + pCbkUserData: *mut libc::c_void, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn OGR_GetFieldSubTypeName(arg1: OGRFieldSubType::Type) -> *const libc::c_char; + pub fn CPLVirtualMemFree(ctxt: *mut CPLVirtualMem); } extern "C" { - pub fn OGR_AreTypeSubTypeCompatible( - eType: OGRFieldType::Type, - eSubType: OGRFieldSubType::Type, - ) -> libc::c_int; + pub fn CPLVirtualMemGetAddr(ctxt: *mut CPLVirtualMem) -> *mut libc::c_void; } extern "C" { - pub fn OGR_GFld_Create( - arg1: *const libc::c_char, - arg2: OGRwkbGeometryType::Type, - ) -> OGRGeomFieldDefnH; + pub fn CPLVirtualMemGetSize(ctxt: *mut CPLVirtualMem) -> usize; } extern "C" { - pub fn OGR_GFld_Destroy(arg1: OGRGeomFieldDefnH); + pub fn CPLVirtualMemIsFileMapping(ctxt: *mut CPLVirtualMem) -> libc::c_int; } extern "C" { - pub fn OGR_GFld_SetName(arg1: OGRGeomFieldDefnH, arg2: *const libc::c_char); + pub fn CPLVirtualMemGetAccessMode(ctxt: *mut CPLVirtualMem) -> CPLVirtualMemAccessMode::Type; } extern "C" { - pub fn OGR_GFld_GetNameRef(arg1: OGRGeomFieldDefnH) -> *const libc::c_char; + pub fn CPLVirtualMemGetPageSize(ctxt: *mut CPLVirtualMem) -> usize; } extern "C" { - pub fn OGR_GFld_GetType(arg1: OGRGeomFieldDefnH) -> OGRwkbGeometryType::Type; + pub fn CPLVirtualMemIsAccessThreadSafe(ctxt: *mut CPLVirtualMem) -> libc::c_int; } extern "C" { - pub fn OGR_GFld_SetType(arg1: OGRGeomFieldDefnH, arg2: OGRwkbGeometryType::Type); + pub fn CPLVirtualMemDeclareThread(ctxt: *mut CPLVirtualMem); } extern "C" { - pub fn OGR_GFld_GetSpatialRef(arg1: OGRGeomFieldDefnH) -> OGRSpatialReferenceH; + pub fn CPLVirtualMemUnDeclareThread(ctxt: *mut CPLVirtualMem); } extern "C" { - pub fn OGR_GFld_SetSpatialRef(arg1: OGRGeomFieldDefnH, hSRS: OGRSpatialReferenceH); + pub fn CPLVirtualMemPin( + ctxt: *mut CPLVirtualMem, + pAddr: *mut libc::c_void, + nSize: usize, + bWriteOp: libc::c_int, + ); } extern "C" { - pub fn OGR_GFld_IsNullable(hDefn: OGRGeomFieldDefnH) -> libc::c_int; + pub fn CPLVirtualMemManagerTerminate(); } -extern "C" { - pub fn OGR_GFld_SetNullable(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGREnvelope { + pub MinX: f64, + pub MaxX: f64, + pub MinY: f64, + pub MaxY: f64, } -extern "C" { - pub fn OGR_GFld_IsIgnored(hDefn: OGRGeomFieldDefnH) -> libc::c_int; +#[test] +fn bindgen_test_layout_OGREnvelope() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(OGREnvelope)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGREnvelope)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope), + "::", + stringify!(MinX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope), + "::", + stringify!(MaxX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope), + "::", + stringify!(MinY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope), + "::", + stringify!(MaxY) + ) + ); } -extern "C" { - pub fn OGR_GFld_SetIgnored(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGREnvelope3D { + pub MinX: f64, + pub MaxX: f64, + pub MinY: f64, + pub MaxY: f64, + pub MinZ: f64, + pub MaxZ: f64, } -extern "C" { - pub fn OGR_FD_Create(arg1: *const libc::c_char) -> OGRFeatureDefnH; -} -extern "C" { - pub fn OGR_FD_Destroy(arg1: OGRFeatureDefnH); -} -extern "C" { - pub fn OGR_FD_Release(arg1: OGRFeatureDefnH); -} -extern "C" { - pub fn OGR_FD_GetName(arg1: OGRFeatureDefnH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_FD_GetFieldCount(arg1: OGRFeatureDefnH) -> libc::c_int; -} -extern "C" { - pub fn OGR_FD_GetFieldDefn(arg1: OGRFeatureDefnH, arg2: libc::c_int) -> OGRFieldDefnH; +#[test] +fn bindgen_test_layout_OGREnvelope3D() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(OGREnvelope3D)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGREnvelope3D)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinX as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MinX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MaxX as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MaxX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinY as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MinY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MaxY as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MaxY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MinZ as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MinZ) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MaxZ as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OGREnvelope3D), + "::", + stringify!(MaxZ) + ) + ); } extern "C" { - pub fn OGR_FD_GetFieldIndex(arg1: OGRFeatureDefnH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGRMalloc(arg1: usize) -> *mut libc::c_void; } extern "C" { - pub fn OGR_FD_AddFieldDefn(arg1: OGRFeatureDefnH, arg2: OGRFieldDefnH); + pub fn OGRCalloc(arg1: usize, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn OGR_FD_DeleteFieldDefn(hDefn: OGRFeatureDefnH, iField: libc::c_int) -> OGRErr::Type; + pub fn OGRRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void; } extern "C" { - pub fn OGR_FD_ReorderFieldDefns( - hDefn: OGRFeatureDefnH, - panMap: *mut libc::c_int, - ) -> OGRErr::Type; + pub fn OGRStrdup(arg1: *const libc::c_char) -> *mut libc::c_char; } extern "C" { - pub fn OGR_FD_GetGeomType(arg1: OGRFeatureDefnH) -> OGRwkbGeometryType::Type; + pub fn OGRFree(arg1: *mut libc::c_void); } -extern "C" { - pub fn OGR_FD_SetGeomType(arg1: OGRFeatureDefnH, arg2: OGRwkbGeometryType::Type); +pub mod OGRwkbGeometryType { + pub type Type = libc::c_uint; + pub const wkbUnknown: Type = 0; + pub const wkbPoint: Type = 1; + pub const wkbLineString: Type = 2; + pub const wkbPolygon: Type = 3; + pub const wkbMultiPoint: Type = 4; + pub const wkbMultiLineString: Type = 5; + pub const wkbMultiPolygon: Type = 6; + pub const wkbGeometryCollection: Type = 7; + pub const wkbCircularString: Type = 8; + pub const wkbCompoundCurve: Type = 9; + pub const wkbCurvePolygon: Type = 10; + pub const wkbMultiCurve: Type = 11; + pub const wkbMultiSurface: Type = 12; + pub const wkbCurve: Type = 13; + pub const wkbSurface: Type = 14; + pub const wkbPolyhedralSurface: Type = 15; + pub const wkbTIN: Type = 16; + pub const wkbTriangle: Type = 17; + pub const wkbNone: Type = 100; + pub const wkbLinearRing: Type = 101; + pub const wkbCircularStringZ: Type = 1008; + pub const wkbCompoundCurveZ: Type = 1009; + pub const wkbCurvePolygonZ: Type = 1010; + pub const wkbMultiCurveZ: Type = 1011; + pub const wkbMultiSurfaceZ: Type = 1012; + pub const wkbCurveZ: Type = 1013; + pub const wkbSurfaceZ: Type = 1014; + pub const wkbPolyhedralSurfaceZ: Type = 1015; + pub const wkbTINZ: Type = 1016; + pub const wkbTriangleZ: Type = 1017; + pub const wkbPointM: Type = 2001; + pub const wkbLineStringM: Type = 2002; + pub const wkbPolygonM: Type = 2003; + pub const wkbMultiPointM: Type = 2004; + pub const wkbMultiLineStringM: Type = 2005; + pub const wkbMultiPolygonM: Type = 2006; + pub const wkbGeometryCollectionM: Type = 2007; + pub const wkbCircularStringM: Type = 2008; + pub const wkbCompoundCurveM: Type = 2009; + pub const wkbCurvePolygonM: Type = 2010; + pub const wkbMultiCurveM: Type = 2011; + pub const wkbMultiSurfaceM: Type = 2012; + pub const wkbCurveM: Type = 2013; + pub const wkbSurfaceM: Type = 2014; + pub const wkbPolyhedralSurfaceM: Type = 2015; + pub const wkbTINM: Type = 2016; + pub const wkbTriangleM: Type = 2017; + pub const wkbPointZM: Type = 3001; + pub const wkbLineStringZM: Type = 3002; + pub const wkbPolygonZM: Type = 3003; + pub const wkbMultiPointZM: Type = 3004; + pub const wkbMultiLineStringZM: Type = 3005; + pub const wkbMultiPolygonZM: Type = 3006; + pub const wkbGeometryCollectionZM: Type = 3007; + pub const wkbCircularStringZM: Type = 3008; + pub const wkbCompoundCurveZM: Type = 3009; + pub const wkbCurvePolygonZM: Type = 3010; + pub const wkbMultiCurveZM: Type = 3011; + pub const wkbMultiSurfaceZM: Type = 3012; + pub const wkbCurveZM: Type = 3013; + pub const wkbSurfaceZM: Type = 3014; + pub const wkbPolyhedralSurfaceZM: Type = 3015; + pub const wkbTINZM: Type = 3016; + pub const wkbTriangleZM: Type = 3017; + pub const wkbPoint25D: Type = 2147483649; + pub const wkbLineString25D: Type = 2147483650; + pub const wkbPolygon25D: Type = 2147483651; + pub const wkbMultiPoint25D: Type = 2147483652; + pub const wkbMultiLineString25D: Type = 2147483653; + pub const wkbMultiPolygon25D: Type = 2147483654; + pub const wkbGeometryCollection25D: Type = 2147483655; } extern "C" { - pub fn OGR_FD_IsGeometryIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGRGeometryTypeToName(eType: OGRwkbGeometryType::Type) -> *const libc::c_char; } extern "C" { - pub fn OGR_FD_SetGeometryIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); + pub fn OGRMergeGeometryTypes( + eMain: OGRwkbGeometryType::Type, + eExtra: OGRwkbGeometryType::Type, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_FD_IsStyleIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGRMergeGeometryTypesEx( + eMain: OGRwkbGeometryType::Type, + eExtra: OGRwkbGeometryType::Type, + bAllowPromotingToCurves: libc::c_int, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_FD_SetStyleIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); + pub fn OGR_GT_Flatten(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_FD_Reference(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_GT_SetZ(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_FD_Dereference(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_GT_SetM(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_FD_GetReferenceCount(arg1: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_GT_SetModifier( + eType: OGRwkbGeometryType::Type, + bSetZ: libc::c_int, + bSetM: libc::c_int, + ) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_FD_GetGeomFieldCount(hFDefn: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_GT_HasZ(eType: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_FD_GetGeomFieldDefn(hFDefn: OGRFeatureDefnH, i: libc::c_int) -> OGRGeomFieldDefnH; + pub fn OGR_GT_HasM(eType: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_FD_GetGeomFieldIndex( - hFDefn: OGRFeatureDefnH, - pszName: *const libc::c_char, + pub fn OGR_GT_IsSubClassOf( + eType: OGRwkbGeometryType::Type, + eSuperType: OGRwkbGeometryType::Type, ) -> libc::c_int; } extern "C" { - pub fn OGR_FD_AddGeomFieldDefn(hFDefn: OGRFeatureDefnH, hGFldDefn: OGRGeomFieldDefnH); + pub fn OGR_GT_IsCurve(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_FD_DeleteGeomFieldDefn( - hFDefn: OGRFeatureDefnH, - iGeomField: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_GT_IsSurface(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_FD_IsSame(hFDefn: OGRFeatureDefnH, hOtherFDefn: OGRFeatureDefnH) -> libc::c_int; + pub fn OGR_GT_IsNonLinear(arg1: OGRwkbGeometryType::Type) -> libc::c_int; } extern "C" { - pub fn OGR_F_Create(arg1: OGRFeatureDefnH) -> OGRFeatureH; + pub fn OGR_GT_GetCollection(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_F_Destroy(arg1: OGRFeatureH); + pub fn OGR_GT_GetCurve(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn OGR_F_GetDefnRef(arg1: OGRFeatureH) -> OGRFeatureDefnH; + pub fn OGR_GT_GetLinear(eType: OGRwkbGeometryType::Type) -> OGRwkbGeometryType::Type; } -extern "C" { - pub fn OGR_F_SetGeometryDirectly(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; +pub mod OGRwkbByteOrder { + pub type Type = libc::c_uint; + pub const wkbXDR: Type = 0; + pub const wkbNDR: Type = 1; } -extern "C" { - pub fn OGR_F_SetGeometry(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; +pub mod OGRFieldType { + pub type Type = libc::c_uint; + pub const OFTInteger: Type = 0; + pub const OFTIntegerList: Type = 1; + pub const OFTReal: Type = 2; + pub const OFTRealList: Type = 3; + pub const OFTString: Type = 4; + pub const OFTStringList: Type = 5; + pub const OFTWideString: Type = 6; + pub const OFTWideStringList: Type = 7; + pub const OFTBinary: Type = 8; + pub const OFTDate: Type = 9; + pub const OFTTime: Type = 10; + pub const OFTDateTime: Type = 11; + pub const OFTInteger64: Type = 12; + pub const OFTInteger64List: Type = 13; + pub const OFTMaxType: Type = 13; } -extern "C" { - pub fn OGR_F_GetGeometryRef(arg1: OGRFeatureH) -> OGRGeometryH; +pub mod OGRFieldSubType { + pub type Type = libc::c_uint; + pub const OFSTNone: Type = 0; + pub const OFSTBoolean: Type = 1; + pub const OFSTInt16: Type = 2; + pub const OFSTFloat32: Type = 3; + pub const OFSTJSON: Type = 4; + pub const OFSTUUID: Type = 5; + pub const OFSTMaxSubType: Type = 5; } -extern "C" { - pub fn OGR_F_StealGeometry(arg1: OGRFeatureH) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_Clone(arg1: OGRFeatureH) -> OGRFeatureH; -} -extern "C" { - pub fn OGR_F_Equal(arg1: OGRFeatureH, arg2: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldCount(arg1: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldDefnRef(arg1: OGRFeatureH, arg2: libc::c_int) -> OGRFieldDefnH; -} -extern "C" { - pub fn OGR_F_GetFieldIndex(arg1: OGRFeatureH, arg2: *const libc::c_char) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_IsFieldSet(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_UnsetField(arg1: OGRFeatureH, arg2: libc::c_int); +pub mod OGRJustification { + pub type Type = libc::c_uint; + pub const OJUndefined: Type = 0; + pub const OJLeft: Type = 1; + pub const OJRight: Type = 2; } -extern "C" { - pub fn OGR_F_IsFieldNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; +#[repr(C)] +#[derive(Copy, Clone)] +pub union OGRField { + pub Integer: libc::c_int, + pub Integer64: GIntBig, + pub Real: f64, + pub String: *mut libc::c_char, + pub IntegerList: OGRField__bindgen_ty_1, + pub Integer64List: OGRField__bindgen_ty_2, + pub RealList: OGRField__bindgen_ty_3, + pub StringList: OGRField__bindgen_ty_4, + pub Binary: OGRField__bindgen_ty_5, + pub Set: OGRField__bindgen_ty_6, + pub Date: OGRField__bindgen_ty_7, } -extern "C" { - pub fn OGR_F_IsFieldSetAndNotNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_1 { + pub nCount: libc::c_int, + pub paList: *mut libc::c_int, } -extern "C" { - pub fn OGR_F_SetFieldNull(arg1: OGRFeatureH, arg2: libc::c_int); +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_1)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_1), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_1), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_F_GetRawFieldRef(arg1: OGRFeatureH, arg2: libc::c_int) -> *mut OGRField; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_2 { + pub nCount: libc::c_int, + pub paList: *mut GIntBig, } -extern "C" { - pub fn OGR_RawField_IsUnset(arg1: *const OGRField) -> libc::c_int; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_2)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_2), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_2), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_RawField_IsNull(arg1: *const OGRField) -> libc::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_3 { + pub nCount: libc::c_int, + pub paList: *mut f64, } -extern "C" { - pub fn OGR_RawField_SetUnset(arg1: *mut OGRField); +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_3() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_3)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_3)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_3), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_3), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_RawField_SetNull(arg1: *mut OGRField); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_4 { + pub nCount: libc::c_int, + pub paList: *mut *mut libc::c_char, } -extern "C" { - pub fn OGR_F_GetFieldAsInteger(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_4() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_4)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_4)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_4), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paList as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_4), + "::", + stringify!(paList) + ) + ); } -extern "C" { - pub fn OGR_F_GetFieldAsInteger64(arg1: OGRFeatureH, arg2: libc::c_int) -> GIntBig; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_5 { + pub nCount: libc::c_int, + pub paData: *mut GByte, } -extern "C" { - pub fn OGR_F_GetFieldAsDouble(arg1: OGRFeatureH, arg2: libc::c_int) -> f64; +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_5() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_5)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_5)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_5), + "::", + stringify!(nCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).paData as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_5), + "::", + stringify!(paData) + ) + ); } -extern "C" { - pub fn OGR_F_GetFieldAsString(arg1: OGRFeatureH, arg2: libc::c_int) -> *const libc::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_6 { + pub nMarker1: libc::c_int, + pub nMarker2: libc::c_int, + pub nMarker3: libc::c_int, } -extern "C" { - pub fn OGR_F_GetFieldAsIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const GIntBig; -} -extern "C" { - pub fn OGR_F_GetFieldAsDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *const f64; -} -extern "C" { - pub fn OGR_F_GetFieldAsStringList( - arg1: OGRFeatureH, - arg2: libc::c_int, - ) -> *mut *mut libc::c_char; -} -extern "C" { - pub fn OGR_F_GetFieldAsBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - ) -> *mut GByte; -} -extern "C" { - pub fn OGR_F_GetFieldAsDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: *mut libc::c_int, - arg4: *mut libc::c_int, - arg5: *mut libc::c_int, - arg6: *mut libc::c_int, - arg7: *mut libc::c_int, - arg8: *mut libc::c_int, - arg9: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetFieldAsDateTimeEx( - hFeat: OGRFeatureH, - iField: libc::c_int, - pnYear: *mut libc::c_int, - pnMonth: *mut libc::c_int, - pnDay: *mut libc::c_int, - pnHour: *mut libc::c_int, - pnMinute: *mut libc::c_int, - pfSecond: *mut f32, - pnTZFlag: *mut libc::c_int, - ) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_SetFieldInteger(arg1: OGRFeatureH, arg2: libc::c_int, arg3: libc::c_int); -} -extern "C" { - pub fn OGR_F_SetFieldInteger64(arg1: OGRFeatureH, arg2: libc::c_int, arg3: GIntBig); -} -extern "C" { - pub fn OGR_F_SetFieldDouble(arg1: OGRFeatureH, arg2: libc::c_int, arg3: f64); -} -extern "C" { - pub fn OGR_F_SetFieldString(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_SetFieldIntegerList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_int, +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_6() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_6)) ); -} -extern "C" { - pub fn OGR_F_SetFieldInteger64List( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const GIntBig, + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_6)) ); -} -extern "C" { - pub fn OGR_F_SetFieldDoubleList( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const f64, + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker1 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker2 as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nMarker3 as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_6), + "::", + stringify!(nMarker3) + ) ); } -extern "C" { - pub fn OGR_F_SetFieldStringList(arg1: OGRFeatureH, arg2: libc::c_int, arg3: CSLConstList); -} -extern "C" { - pub fn OGR_F_SetFieldRaw(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *mut OGRField); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRField__bindgen_ty_7 { + pub Year: GInt16, + pub Month: GByte, + pub Day: GByte, + pub Hour: GByte, + pub Minute: GByte, + pub TZFlag: GByte, + pub Reserved: GByte, + pub Second: f32, } -extern "C" { - pub fn OGR_F_SetFieldBinary( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut GByte, +#[test] +fn bindgen_test_layout_OGRField__bindgen_ty_7() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OGRField__bindgen_ty_7)) ); -} -extern "C" { - pub fn OGR_F_SetFieldDateTime( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OGRField__bindgen_ty_7)) ); -} -extern "C" { - pub fn OGR_F_SetFieldDateTimeEx( - arg1: OGRFeatureH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: f32, - arg9: libc::c_int, + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Year as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Year) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Month as *const _ as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Month) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Day as *const _ as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Day) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Hour as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Hour) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Minute as *const _ as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Minute) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TZFlag as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(TZFlag) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Reserved as *const _ as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Reserved) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Second as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRField__bindgen_ty_7), + "::", + stringify!(Second) + ) ); } -extern "C" { - pub fn OGR_F_GetGeomFieldCount(hFeat: OGRFeatureH) -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetGeomFieldDefnRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeomFieldDefnH; -} -extern "C" { - pub fn OGR_F_GetGeomFieldIndex(hFeat: OGRFeatureH, pszName: *const libc::c_char) - -> libc::c_int; -} -extern "C" { - pub fn OGR_F_GetGeomFieldRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeometryH; -} -extern "C" { - pub fn OGR_F_SetGeomFieldDirectly( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetGeomField( - hFeat: OGRFeatureH, - iField: libc::c_int, - hGeom: OGRGeometryH, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetFID(arg1: OGRFeatureH) -> GIntBig; -} -extern "C" { - pub fn OGR_F_SetFID(arg1: OGRFeatureH, arg2: GIntBig) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_DumpReadable(arg1: OGRFeatureH, arg2: *mut FILE); -} -extern "C" { - pub fn OGR_F_SetFrom(arg1: OGRFeatureH, arg2: OGRFeatureH, arg3: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_SetFromWithMap( - arg1: OGRFeatureH, - arg2: OGRFeatureH, - arg3: libc::c_int, - arg4: *const libc::c_int, - ) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_F_GetStyleString(arg1: OGRFeatureH) -> *const libc::c_char; -} -extern "C" { - pub fn OGR_F_SetStyleString(arg1: OGRFeatureH, arg2: *const libc::c_char); -} -extern "C" { - pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); -} -extern "C" { - #[doc = " Return style table"] - pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; -} -extern "C" { - #[doc = " Set style table and take ownership"] - pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); -} -extern "C" { - #[doc = " Set style table"] - pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); +#[test] +fn bindgen_test_layout_OGRField() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRField)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRField)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer64 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer64) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Real as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Real) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).String as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(String) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IntegerList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(IntegerList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Integer64List as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Integer64List) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).RealList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(RealList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).StringList as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(StringList) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Binary as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Binary) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Set as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Set) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Date as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRField), + "::", + stringify!(Date) + ) + ); } extern "C" { - pub fn OGR_F_GetNativeData(arg1: OGRFeatureH) -> *const libc::c_char; + pub fn OGRParseDate( + pszInput: *const libc::c_char, + psOutput: *mut OGRField, + nOptions: libc::c_int, + ) -> libc::c_int; } -extern "C" { - pub fn OGR_F_SetNativeData(arg1: OGRFeatureH, arg2: *const libc::c_char); +pub mod ogr_style_tool_class_id { + pub type Type = libc::c_uint; + pub const OGRSTCNone: Type = 0; + pub const OGRSTCPen: Type = 1; + pub const OGRSTCBrush: Type = 2; + pub const OGRSTCSymbol: Type = 3; + pub const OGRSTCLabel: Type = 4; + pub const OGRSTCVector: Type = 5; } -extern "C" { - pub fn OGR_F_GetNativeMediaType(arg1: OGRFeatureH) -> *const libc::c_char; +pub use self::ogr_style_tool_class_id::Type as OGRSTClassId; +pub mod ogr_style_tool_units_id { + pub type Type = libc::c_uint; + pub const OGRSTUGround: Type = 0; + pub const OGRSTUPixel: Type = 1; + pub const OGRSTUPoints: Type = 2; + pub const OGRSTUMM: Type = 3; + pub const OGRSTUCM: Type = 4; + pub const OGRSTUInches: Type = 5; } -extern "C" { - pub fn OGR_F_SetNativeMediaType(arg1: OGRFeatureH, arg2: *const libc::c_char); +pub use self::ogr_style_tool_units_id::Type as OGRSTUnitId; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRCodedValue { + pub pszCode: *mut libc::c_char, + pub pszValue: *mut libc::c_char, } -extern "C" { - pub fn OGR_F_FillUnsetWithDefault( - hFeat: OGRFeatureH, - bNotNullableOnly: libc::c_int, - papszOptions: *mut *mut libc::c_char, +#[test] +fn bindgen_test_layout_OGRCodedValue() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OGRCodedValue)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OGRCodedValue)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszCode as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OGRCodedValue), + "::", + stringify!(pszCode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszValue as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OGRCodedValue), + "::", + stringify!(pszValue) + ) ); } +pub mod OGRFieldDomainType { + pub type Type = libc::c_uint; + pub const OFDT_CODED: Type = 0; + pub const OFDT_RANGE: Type = 1; + pub const OFDT_GLOB: Type = 2; +} +pub mod OGRFieldDomainSplitPolicy { + pub type Type = libc::c_uint; + pub const OFDSP_DEFAULT_VALUE: Type = 0; + pub const OFDSP_DUPLICATE: Type = 1; + pub const OFDSP_GEOMETRY_RATIO: Type = 2; +} +pub mod OGRFieldDomainMergePolicy { + pub type Type = libc::c_uint; + pub const OFDMP_DEFAULT_VALUE: Type = 0; + pub const OFDMP_SUM: Type = 1; + pub const OFDMP_GEOMETRY_WEIGHTED: Type = 2; +} extern "C" { - pub fn OGR_F_Validate( - arg1: OGRFeatureH, - nValidateFlags: libc::c_int, - bEmitError: libc::c_int, - ) -> libc::c_int; + pub fn GDALVersionInfo(arg1: *const libc::c_char) -> *const libc::c_char; } -#[doc = " Opaque type for a layer (OGRLayer)"] -pub type OGRLayerH = *mut libc::c_void; -#[doc = " Opaque type for a OGR datasource (OGRDataSource)"] -pub type OGRDataSourceH = *mut libc::c_void; -#[doc = " Opaque type for a OGR driver (OGRSFDriver)"] -pub type OGRSFDriverH = *mut libc::c_void; extern "C" { - pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; + pub fn GDALCheckVersion( + nVersionMajor: libc::c_int, + nVersionMinor: libc::c_int, + pszCallingComponentName: *const libc::c_char, + ) -> libc::c_int; } +pub type OGRGeometryH = *mut libc::c_void; +pub type OGRSpatialReferenceH = *mut libc::c_void; +pub type OGRCoordinateTransformationH = *mut libc::c_void; extern "C" { - pub fn OGR_L_GetGeomType(arg1: OGRLayerH) -> OGRwkbGeometryType::Type; + pub fn OGR_G_CreateFromWkb( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_GetSpatialFilter(arg1: OGRLayerH) -> OGRGeometryH; + pub fn OGR_G_CreateFromWkbEx( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: usize, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_SetSpatialFilter(arg1: OGRLayerH, arg2: OGRGeometryH); + pub fn OGR_G_CreateFromWkt( + arg1: *mut *mut libc::c_char, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_SetSpatialFilterRect(arg1: OGRLayerH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); + pub fn OGR_G_CreateFromFgf( + arg1: *const libc::c_void, + arg2: OGRSpatialReferenceH, + arg3: *mut OGRGeometryH, + arg4: libc::c_int, + arg5: *mut libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_SetSpatialFilterEx(arg1: OGRLayerH, iGeomField: libc::c_int, hGeom: OGRGeometryH); + pub fn OGR_G_DestroyGeometry(arg1: OGRGeometryH); } extern "C" { - pub fn OGR_L_SetSpatialFilterRectEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - dfMinX: f64, - dfMinY: f64, - dfMaxX: f64, - dfMaxY: f64, - ); + pub fn OGR_G_CreateGeometry(arg1: OGRwkbGeometryType::Type) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_SetAttributeFilter(arg1: OGRLayerH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OGR_G_ApproximateArcAngles( + dfCenterX: f64, + dfCenterY: f64, + dfZ: f64, + dfPrimaryRadius: f64, + dfSecondaryAxis: f64, + dfRotation: f64, + dfStartAngle: f64, + dfEndAngle: f64, + dfMaxAngleStepSizeDegrees: f64, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_ResetReading(arg1: OGRLayerH); + pub fn OGR_G_ForceToPolygon(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_GetNextFeature(arg1: OGRLayerH) -> OGRFeatureH; + pub fn OGR_G_ForceToLineString(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_SetNextByIndex(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; + pub fn OGR_G_ForceToMultiPolygon(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_GetFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRFeatureH; + pub fn OGR_G_ForceToMultiPoint(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_SetFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; + pub fn OGR_G_ForceToMultiLineString(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_CreateFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; + pub fn OGR_G_ForceTo( + hGeom: OGRGeometryH, + eTargetType: OGRwkbGeometryType::Type, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_DeleteFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; + pub fn OGR_G_RemoveLowerDimensionSubGeoms(hGeom: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_GetLayerDefn(arg1: OGRLayerH) -> OGRFeatureDefnH; + pub fn OGR_G_GetDimension(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_L_GetSpatialRef(arg1: OGRLayerH) -> OGRSpatialReferenceH; + pub fn OGR_G_GetCoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_L_FindFieldIndex( - arg1: OGRLayerH, - arg2: *const libc::c_char, - bExactMatch: libc::c_int, - ) -> libc::c_int; + pub fn OGR_G_CoordinateDimension(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_L_GetFeatureCount(arg1: OGRLayerH, arg2: libc::c_int) -> GIntBig; + pub fn OGR_G_SetCoordinateDimension(arg1: OGRGeometryH, arg2: libc::c_int); } extern "C" { - pub fn OGR_L_GetExtent( - arg1: OGRLayerH, - arg2: *mut OGREnvelope, - arg3: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_G_Is3D(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_L_GetExtentEx( - arg1: OGRLayerH, - iGeomField: libc::c_int, - psExtent: *mut OGREnvelope, - bForce: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_G_IsMeasured(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_L_TestCapability(arg1: OGRLayerH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_G_Set3D(arg1: OGRGeometryH, arg2: libc::c_int); } extern "C" { - pub fn OGR_L_CreateField( - arg1: OGRLayerH, - arg2: OGRFieldDefnH, - arg3: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_G_SetMeasured(arg1: OGRGeometryH, arg2: libc::c_int); } extern "C" { - pub fn OGR_L_CreateGeomField( - hLayer: OGRLayerH, - hFieldDefn: OGRGeomFieldDefnH, - bForce: libc::c_int, - ) -> OGRErr::Type; + pub fn OGR_G_Clone(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_DeleteField(arg1: OGRLayerH, iField: libc::c_int) -> OGRErr::Type; + pub fn OGR_G_GetEnvelope(arg1: OGRGeometryH, arg2: *mut OGREnvelope); } extern "C" { - pub fn OGR_L_ReorderFields(arg1: OGRLayerH, panMap: *mut libc::c_int) -> OGRErr::Type; + pub fn OGR_G_GetEnvelope3D(arg1: OGRGeometryH, arg2: *mut OGREnvelope3D); } extern "C" { - pub fn OGR_L_ReorderField( - arg1: OGRLayerH, - iOldFieldPos: libc::c_int, - iNewFieldPos: libc::c_int, + pub fn OGR_G_ImportFromWkb( + arg1: OGRGeometryH, + arg2: *const libc::c_void, + arg3: libc::c_int, ) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_AlterFieldDefn( - arg1: OGRLayerH, - iField: libc::c_int, - hNewFieldDefn: OGRFieldDefnH, - nFlags: libc::c_int, + pub fn OGR_G_ExportToWkb( + arg1: OGRGeometryH, + arg2: OGRwkbByteOrder::Type, + arg3: *mut libc::c_uchar, ) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_StartTransaction(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_G_ExportToIsoWkb( + arg1: OGRGeometryH, + arg2: OGRwkbByteOrder::Type, + arg3: *mut libc::c_uchar, + ) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_CommitTransaction(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_G_WkbSize(hGeom: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_G_WkbSizeEx(hGeom: OGRGeometryH) -> usize; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; + pub fn OGR_G_ImportFromWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_Dereference(arg1: OGRLayerH) -> libc::c_int; + pub fn OGR_G_ExportToWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; + pub fn OGR_G_ExportToIsoWkt(arg1: OGRGeometryH, arg2: *mut *mut libc::c_char) -> OGRErr::Type; } extern "C" { - #[doc = " @endcond"] - pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; + pub fn OGR_G_GetGeometryType(arg1: OGRGeometryH) -> OGRwkbGeometryType::Type; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; + pub fn OGR_G_GetGeometryName(arg1: OGRGeometryH) -> *const libc::c_char; } extern "C" { - #[doc = " @endcond"] - pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; + pub fn OGR_G_DumpReadable(arg1: OGRGeometryH, arg2: *mut FILE, arg3: *const libc::c_char); } extern "C" { - pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; + pub fn OGR_G_FlattenTo2D(arg1: OGRGeometryH); } extern "C" { - #[doc = " Get style table"] - pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; + pub fn OGR_G_CloseRings(arg1: OGRGeometryH); } extern "C" { - #[doc = " Set style table (and take ownership)"] - pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); + pub fn OGR_G_CreateFromGML(arg1: *const libc::c_char) -> OGRGeometryH; } extern "C" { - #[doc = " Set style table"] - pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); + pub fn OGR_G_ExportToGML(arg1: OGRGeometryH) -> *mut libc::c_char; } extern "C" { - pub fn OGR_L_SetIgnoredFields(arg1: OGRLayerH, arg2: *mut *const libc::c_char) -> OGRErr::Type; + pub fn OGR_G_ExportToGMLEx( + arg1: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_L_Intersection( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_G_CreateFromGMLTree(arg1: *const CPLXMLNode) -> OGRGeometryH; } extern "C" { - pub fn OGR_L_Union( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_G_ExportToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_L_SymDifference( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_G_ExportEnvelopeToGMLTree(arg1: OGRGeometryH) -> *mut CPLXMLNode; } extern "C" { - pub fn OGR_L_Identity( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_G_ExportToKML( + arg1: OGRGeometryH, + pszAltitudeMode: *const libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_L_Update( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_G_ExportToJson(arg1: OGRGeometryH) -> *mut libc::c_char; } extern "C" { - pub fn OGR_L_Clip( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_G_ExportToJsonEx( + arg1: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_char; } extern "C" { - pub fn OGR_L_Erase( - arg1: OGRLayerH, - arg2: OGRLayerH, - arg3: OGRLayerH, - arg4: *mut *mut libc::c_char, - arg5: GDALProgressFunc, - arg6: *mut libc::c_void, - ) -> OGRErr::Type; + pub fn OGR_G_CreateGeometryFromJson(arg1: *const libc::c_char) -> OGRGeometryH; } extern "C" { - pub fn OGR_DS_Destroy(arg1: OGRDataSourceH); + pub fn OGR_G_CreateGeometryFromEsriJson(arg1: *const libc::c_char) -> OGRGeometryH; } extern "C" { - pub fn OGR_DS_GetName(arg1: OGRDataSourceH) -> *const libc::c_char; + pub fn OGR_G_AssignSpatialReference(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH); } extern "C" { - pub fn OGR_DS_GetLayerCount(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_G_GetSpatialReference(arg1: OGRGeometryH) -> OGRSpatialReferenceH; } extern "C" { - pub fn OGR_DS_GetLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRLayerH; + pub fn OGR_G_Transform(arg1: OGRGeometryH, arg2: OGRCoordinateTransformationH) -> OGRErr::Type; } extern "C" { - pub fn OGR_DS_GetLayerByName(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> OGRLayerH; + pub fn OGR_G_TransformTo(arg1: OGRGeometryH, arg2: OGRSpatialReferenceH) -> OGRErr::Type; } -extern "C" { - pub fn OGR_DS_DeleteLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRErr::Type; -} -extern "C" { - pub fn OGR_DS_GetDriver(arg1: OGRDataSourceH) -> OGRSFDriverH; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRGeomTransformer { + _unused: [u8; 0], } +pub type OGRGeomTransformerH = *mut OGRGeomTransformer; extern "C" { - pub fn OGR_DS_CreateLayer( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: *mut *mut libc::c_char, - ) -> OGRLayerH; + pub fn OGR_GeomTransformer_Create( + arg1: OGRCoordinateTransformationH, + papszOptions: CSLConstList, + ) -> OGRGeomTransformerH; } extern "C" { - pub fn OGR_DS_CopyLayer( - arg1: OGRDataSourceH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRLayerH; + pub fn OGR_GeomTransformer_Transform( + hTransformer: OGRGeomTransformerH, + hGeom: OGRGeometryH, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_DS_TestCapability(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_GeomTransformer_Destroy(hTransformer: OGRGeomTransformerH); } extern "C" { - pub fn OGR_DS_ExecuteSQL( - arg1: OGRDataSourceH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; + pub fn OGR_G_Simplify(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; } extern "C" { - pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); + pub fn OGR_G_SimplifyPreserveTopology(hThis: OGRGeometryH, tolerance: f64) -> OGRGeometryH; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_G_DelaunayTriangulation( + hThis: OGRGeometryH, + dfTolerance: f64, + bOnlyEdges: libc::c_int, + ) -> OGRGeometryH; } extern "C" { - pub fn OGR_DS_Dereference(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_G_Segmentize(hGeom: OGRGeometryH, dfMaxLength: f64); } extern "C" { - pub fn OGR_DS_GetRefCount(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_G_Intersects(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; + pub fn OGR_G_Equals(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - #[doc = " @endcond */"] - pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; + pub fn OGR_G_Disjoint(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - #[doc = " Get style table"] - pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; + pub fn OGR_G_Touches(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - #[doc = " Set style table (and take ownership)"] - pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); + pub fn OGR_G_Crosses(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - #[doc = " Set style table"] - pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); + pub fn OGR_G_Within(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_GetName(arg1: OGRSFDriverH) -> *const libc::c_char; + pub fn OGR_G_Contains(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_Open( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> OGRDataSourceH; + pub fn OGR_G_Overlaps(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_Dr_TestCapability(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_G_Boundary(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_Dr_CreateDataSource( - arg1: OGRSFDriverH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> OGRDataSourceH; + pub fn OGR_G_ConvexHull(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_Dr_CopyDataSource( - arg1: OGRSFDriverH, - arg2: OGRDataSourceH, - arg3: *const libc::c_char, - arg4: *mut *mut libc::c_char, - ) -> OGRDataSourceH; + pub fn OGR_G_Buffer(arg1: OGRGeometryH, arg2: f64, arg3: libc::c_int) -> OGRGeometryH; } extern "C" { - pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn OGR_G_Intersection(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGROpen( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; + pub fn OGR_G_Union(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGROpenShared( - arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: *mut OGRSFDriverH, - ) -> OGRDataSourceH; + pub fn OGR_G_UnionCascaded(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; + pub fn OGR_G_PointOnSurface(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRRegisterDriver(arg1: OGRSFDriverH); + pub fn OGR_G_Difference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); + pub fn OGR_G_SymDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - #[doc = " @endcond"] - pub fn OGRGetDriverCount() -> libc::c_int; + pub fn OGR_G_Distance(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; } extern "C" { - pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; + pub fn OGR_G_Distance3D(arg1: OGRGeometryH, arg2: OGRGeometryH) -> f64; } extern "C" { - pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; + pub fn OGR_G_Length(arg1: OGRGeometryH) -> f64; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OGRGetOpenDSCount() -> libc::c_int; + pub fn OGR_G_Area(arg1: OGRGeometryH) -> f64; } extern "C" { - pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; + pub fn OGR_G_Centroid(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - #[doc = " @endcond"] - pub fn OGRRegisterAll(); + pub fn OGR_G_Value(arg1: OGRGeometryH, dfDistance: f64) -> OGRGeometryH; } extern "C" { - #[doc = " Clean-up all drivers (including raster ones starting with GDAL 2.0."] - #[doc = " See GDALDestroyDriverManager()"] - pub fn OGRCleanupAll(); + pub fn OGR_G_Empty(arg1: OGRGeometryH); } -#[doc = " Style manager opaque type"] -pub type OGRStyleMgrH = *mut libc::c_void; -#[doc = " Style tool opaque type"] -pub type OGRStyleToolH = *mut libc::c_void; extern "C" { - pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; + pub fn OGR_G_IsEmpty(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); + pub fn OGR_G_IsValid(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; + pub fn OGR_G_MakeValid(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_SM_InitStyleString( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_G_Normalize(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_SM_GetPartCount( - hSM: OGRStyleMgrH, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_G_IsSimple(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_SM_GetPart( - hSM: OGRStyleMgrH, - nPartId: libc::c_int, - pszStyleString: *const libc::c_char, - ) -> OGRStyleToolH; + pub fn OGR_G_IsRing(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; + pub fn OGR_G_Polygonize(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_SM_AddStyle( - hSM: OGRStyleMgrH, - pszStyleName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_G_Intersect(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; + pub fn OGR_G_Equal(arg1: OGRGeometryH, arg2: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_ST_Destroy(hST: OGRStyleToolH); + pub fn OGR_G_SymmetricDifference(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; + pub fn OGR_G_GetArea(arg1: OGRGeometryH) -> f64; } extern "C" { - pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; + pub fn OGR_G_GetBoundary(arg1: OGRGeometryH) -> OGRGeometryH; } extern "C" { - pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); + pub fn OGR_G_GetPointCount(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn OGR_ST_GetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> *const libc::c_char; + pub fn OGR_G_GetPoints( + hGeom: OGRGeometryH, + pabyX: *mut libc::c_void, + nXStride: libc::c_int, + pabyY: *mut libc::c_void, + nYStride: libc::c_int, + pabyZ: *mut libc::c_void, + nZStride: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn OGR_ST_GetParamNum( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, + pub fn OGR_G_GetPointsZM( + hGeom: OGRGeometryH, + pabyX: *mut libc::c_void, + nXStride: libc::c_int, + pabyY: *mut libc::c_void, + nYStride: libc::c_int, + pabyZ: *mut libc::c_void, + nZStride: libc::c_int, + pabyM: *mut libc::c_void, + nMStride: libc::c_int, ) -> libc::c_int; } extern "C" { - pub fn OGR_ST_GetParamDbl( - hST: OGRStyleToolH, - eParam: libc::c_int, - bValueIsNull: *mut libc::c_int, - ) -> f64; + pub fn OGR_G_GetX(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_ST_SetParamStr( - hST: OGRStyleToolH, - eParam: libc::c_int, - pszValue: *const libc::c_char, - ); + pub fn OGR_G_GetY(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); + pub fn OGR_G_GetZ(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); + pub fn OGR_G_GetM(arg1: OGRGeometryH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; + pub fn OGR_G_GetPoint( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: *mut f64, + arg3: *mut f64, + arg4: *mut f64, + ); } extern "C" { - pub fn OGR_ST_GetRGBFromString( - hST: OGRStyleToolH, - pszColor: *const libc::c_char, - pnRed: *mut libc::c_int, - pnGreen: *mut libc::c_int, - pnBlue: *mut libc::c_int, - pnAlpha: *mut libc::c_int, - ) -> libc::c_int; + pub fn OGR_G_GetPointZM( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: *mut f64, + arg3: *mut f64, + arg4: *mut f64, + arg5: *mut f64, + ); } extern "C" { - pub fn OGR_STBL_Create() -> OGRStyleTableH; + pub fn OGR_G_SetPointCount(hGeom: OGRGeometryH, nNewPointCount: libc::c_int); } extern "C" { - pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); + pub fn OGR_G_SetPoint(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64, arg4: f64); } extern "C" { - pub fn OGR_STBL_AddStyle( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - pszStyleString: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_G_SetPoint_2D(arg1: OGRGeometryH, iPoint: libc::c_int, arg2: f64, arg3: f64); } extern "C" { - pub fn OGR_STBL_SaveStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_G_SetPointM( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: f64, + arg3: f64, + arg4: f64, + ); } extern "C" { - pub fn OGR_STBL_LoadStyleTable( - hStyleTable: OGRStyleTableH, - pszFilename: *const libc::c_char, - ) -> libc::c_int; + pub fn OGR_G_SetPointZM( + arg1: OGRGeometryH, + iPoint: libc::c_int, + arg2: f64, + arg3: f64, + arg4: f64, + arg5: f64, + ); } extern "C" { - pub fn OGR_STBL_Find( - hStyleTable: OGRStyleTableH, - pszName: *const libc::c_char, - ) -> *const libc::c_char; + pub fn OGR_G_AddPoint(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); } extern "C" { - pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); + pub fn OGR_G_AddPoint_2D(arg1: OGRGeometryH, arg2: f64, arg3: f64); } extern "C" { - pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; + pub fn OGR_G_AddPointM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64); } extern "C" { - pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; -} -pub mod GDALDataType { - #[doc = " Pixel data types"] - pub type Type = u32; - #[doc = " Unknown or unspecified type"] - pub const GDT_Unknown: Type = 0; - #[doc = " Eight bit unsigned integer"] - pub const GDT_Byte: Type = 1; - #[doc = " Sixteen bit unsigned integer"] - pub const GDT_UInt16: Type = 2; - #[doc = " Sixteen bit signed integer"] - pub const GDT_Int16: Type = 3; - #[doc = " Thirty two bit unsigned integer"] - pub const GDT_UInt32: Type = 4; - #[doc = " Thirty two bit signed integer"] - pub const GDT_Int32: Type = 5; - #[doc = " Thirty two bit floating point"] - pub const GDT_Float32: Type = 6; - #[doc = " Sixty four bit floating point"] - pub const GDT_Float64: Type = 7; - #[doc = " Complex Int16"] - pub const GDT_CInt16: Type = 8; - #[doc = " Complex Int32"] - pub const GDT_CInt32: Type = 9; - #[doc = " Complex Float32"] - pub const GDT_CFloat32: Type = 10; - #[doc = " Complex Float64"] - pub const GDT_CFloat64: Type = 11; - #[doc = " Complex Float64"] - pub const GDT_TypeCount: Type = 12; + pub fn OGR_G_AddPointZM(arg1: OGRGeometryH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); } extern "C" { - pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_G_SetPoints( + hGeom: OGRGeometryH, + nPointsIn: libc::c_int, + pabyX: *const libc::c_void, + nXStride: libc::c_int, + pabyY: *const libc::c_void, + nYStride: libc::c_int, + pabyZ: *const libc::c_void, + nZStride: libc::c_int, + ); } extern "C" { - pub fn GDALGetDataTypeSizeBits(eDataType: GDALDataType::Type) -> libc::c_int; + pub fn OGR_G_SetPointsZM( + hGeom: OGRGeometryH, + nPointsIn: libc::c_int, + pabyX: *const libc::c_void, + nXStride: libc::c_int, + pabyY: *const libc::c_void, + nYStride: libc::c_int, + pabyZ: *const libc::c_void, + nZStride: libc::c_int, + pabyM: *const libc::c_void, + nMStride: libc::c_int, + ); } extern "C" { - pub fn GDALGetDataTypeSizeBytes(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_G_SwapXY(hGeom: OGRGeometryH); } extern "C" { - pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_G_GetGeometryCount(arg1: OGRGeometryH) -> libc::c_int; } extern "C" { - pub fn GDALDataTypeIsInteger(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_G_GetGeometryRef(arg1: OGRGeometryH, arg2: libc::c_int) -> OGRGeometryH; } extern "C" { - pub fn GDALDataTypeIsFloating(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_G_AddGeometry(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn GDALDataTypeIsSigned(arg1: GDALDataType::Type) -> libc::c_int; + pub fn OGR_G_AddGeometryDirectly(arg1: OGRGeometryH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; + pub fn OGR_G_RemoveGeometry( + arg1: OGRGeometryH, + arg2: libc::c_int, + arg3: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; + pub fn OGR_G_HasCurveGeometry( + arg1: OGRGeometryH, + bLookForNonLinear: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALDataTypeUnion( - arg1: GDALDataType::Type, - arg2: GDALDataType::Type, - ) -> GDALDataType::Type; + pub fn OGR_G_GetLinearGeometry( + hGeom: OGRGeometryH, + dfMaxAngleStepSizeDegrees: f64, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; } extern "C" { - pub fn GDALDataTypeUnionWithValue( - eDT: GDALDataType::Type, - dValue: f64, - bComplex: libc::c_int, - ) -> GDALDataType::Type; + pub fn OGR_G_GetCurveGeometry( + hGeom: OGRGeometryH, + papszOptions: *mut *mut libc::c_char, + ) -> OGRGeometryH; } extern "C" { - pub fn GDALFindDataType( - nBits: libc::c_int, - bSigned: libc::c_int, - bFloating: libc::c_int, - bComplex: libc::c_int, - ) -> GDALDataType::Type; + pub fn OGRBuildPolygonFromEdges( + hLinesAsCollection: OGRGeometryH, + bBestEffort: libc::c_int, + bAutoClose: libc::c_int, + dfTolerance: f64, + peErr: *mut OGRErr::Type, + ) -> OGRGeometryH; } extern "C" { - pub fn GDALFindDataTypeForValue(dValue: f64, bComplex: libc::c_int) -> GDALDataType::Type; + pub fn OGRSetGenerate_DB2_V72_BYTE_ORDER( + bGenerate_DB2_V72_BYTE_ORDER: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALAdjustValueToDataType( - eDT: GDALDataType::Type, - dfValue: f64, - pbClamped: *mut libc::c_int, - pbRounded: *mut libc::c_int, - ) -> f64; + pub fn OGRGetGenerate_DB2_V72_BYTE_ORDER() -> libc::c_int; } extern "C" { - pub fn GDALGetNonComplexDataType(arg1: GDALDataType::Type) -> GDALDataType::Type; + pub fn OGRSetNonLinearGeometriesEnabledFlag(bFlag: libc::c_int); } extern "C" { - pub fn GDALDataTypeIsConversionLossy( - eTypeFrom: GDALDataType::Type, - eTypeTo: GDALDataType::Type, - ) -> libc::c_int; + pub fn OGRGetNonLinearGeometriesEnabledFlag() -> libc::c_int; } -pub mod GDALAsyncStatusType { - #[doc = " status of the asynchronous stream"] - pub type Type = u32; - pub const GARIO_PENDING: Type = 0; - pub const GARIO_UPDATE: Type = 1; - pub const GARIO_ERROR: Type = 2; - pub const GARIO_COMPLETE: Type = 3; - pub const GARIO_TypeCount: Type = 4; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _OGRPreparedGeometry { + _unused: [u8; 0], } +pub type OGRPreparedGeometryH = *mut _OGRPreparedGeometry; extern "C" { - pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; + pub fn OGRHasPreparedGeometrySupport() -> libc::c_int; } extern "C" { - pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; + pub fn OGRCreatePreparedGeometry(hGeom: OGRGeometryH) -> OGRPreparedGeometryH; } -pub mod GDALAccess { - #[doc = " Flag indicating read/write, or read-only access to data."] - pub type Type = u32; - #[doc = " Read only (no update) access"] - pub const GA_ReadOnly: Type = 0; - #[doc = " Read/write access."] - pub const GA_Update: Type = 1; +extern "C" { + pub fn OGRDestroyPreparedGeometry(hPreparedGeom: OGRPreparedGeometryH); } -pub mod GDALRWFlag { - #[doc = " Read/Write flag for RasterIO() method"] - pub type Type = u32; - #[doc = " Read data"] - pub const GF_Read: Type = 0; - #[doc = " Write data"] - pub const GF_Write: Type = 1; +extern "C" { + pub fn OGRPreparedGeometryIntersects( + hPreparedGeom: OGRPreparedGeometryH, + hOtherGeom: OGRGeometryH, + ) -> libc::c_int; } -pub mod GDALRIOResampleAlg { - #[doc = " RasterIO() resampling method."] - #[doc = " @since GDAL 2.0"] - pub type Type = u32; - #[doc = " Nearest neighbour"] - pub const GRIORA_NearestNeighbour: Type = 0; - #[doc = " Bilinear (2x2 kernel)"] - pub const GRIORA_Bilinear: Type = 1; - #[doc = " Cubic Convolution Approximation (4x4 kernel)"] - pub const GRIORA_Cubic: Type = 2; - #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] - pub const GRIORA_CubicSpline: Type = 3; - #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] - pub const GRIORA_Lanczos: Type = 4; - #[doc = " Average"] - pub const GRIORA_Average: Type = 5; - #[doc = " Mode (selects the value which appears most often of all the sampled points)"] - pub const GRIORA_Mode: Type = 6; - #[doc = " Gauss blurring"] - pub const GRIORA_Gauss: Type = 7; +extern "C" { + pub fn OGRPreparedGeometryContains( + hPreparedGeom: OGRPreparedGeometryH, + hOtherGeom: OGRGeometryH, + ) -> libc::c_int; } -#[doc = " Structure to pass extra arguments to RasterIO() method"] -#[doc = " @since GDAL 2.0"] +pub type OGRFieldDefnH = *mut libc::c_void; +pub type OGRFeatureDefnH = *mut libc::c_void; +pub type OGRFeatureH = *mut libc::c_void; +pub type OGRStyleTableH = *mut libc::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct GDALRasterIOExtraArg { - #[doc = " Version of structure (to allow future extensions of the structure)"] - pub nVersion: libc::c_int, - #[doc = " Resampling algorithm"] - pub eResampleAlg: GDALRIOResampleAlg::Type, - #[doc = " Progress callback"] - pub pfnProgress: GDALProgressFunc, - #[doc = " Progress callback user data"] - pub pProgressData: *mut libc::c_void, - #[doc = " Indicate if dfXOff, dfYOff, dfXSize and dfYSize are set."] - #[doc = "Mostly reserved from the VRT driver to communicate a more precise"] - #[doc = "source window. Must be such that dfXOff - nXOff < 1.0 and"] - #[doc = "dfYOff - nYOff < 1.0 and nXSize - dfXSize < 1.0 and nYSize - dfYSize < 1.0"] - pub bFloatingPointWindowValidity: libc::c_int, - #[doc = " Pixel offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfXOff: f64, - #[doc = " Line offset to the top left corner. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfYOff: f64, - #[doc = " Width in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfXSize: f64, - #[doc = " Height in pixels of the area of interest. Only valid if bFloatingPointWindowValidity = TRUE"] - pub dfYSize: f64, +pub struct OGRGeomFieldDefnHS { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_GDALRasterIOExtraArg() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(nVersion) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnProgress as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pfnProgress) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pProgressData as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(pProgressData) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bFloatingPointWindowValidity - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(bFloatingPointWindowValidity) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYOff) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfXSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRasterIOExtraArg), - "::", - stringify!(dfYSize) - ) +pub type OGRGeomFieldDefnH = *mut OGRGeomFieldDefnHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRFieldDomainHS { + _unused: [u8; 0], +} +pub type OGRFieldDomainH = *mut OGRFieldDomainHS; +extern "C" { + pub fn OGR_Fld_Create(arg1: *const libc::c_char, arg2: OGRFieldType::Type) -> OGRFieldDefnH; +} +extern "C" { + pub fn OGR_Fld_Destroy(arg1: OGRFieldDefnH); +} +extern "C" { + pub fn OGR_Fld_SetName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); +} +extern "C" { + pub fn OGR_Fld_GetNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; +} +extern "C" { + pub fn OGR_Fld_SetAlternativeName(arg1: OGRFieldDefnH, arg2: *const libc::c_char); +} +extern "C" { + pub fn OGR_Fld_GetAlternativeNameRef(arg1: OGRFieldDefnH) -> *const libc::c_char; +} +extern "C" { + pub fn OGR_Fld_GetType(arg1: OGRFieldDefnH) -> OGRFieldType::Type; +} +extern "C" { + pub fn OGR_Fld_SetType(arg1: OGRFieldDefnH, arg2: OGRFieldType::Type); +} +extern "C" { + pub fn OGR_Fld_GetSubType(arg1: OGRFieldDefnH) -> OGRFieldSubType::Type; +} +extern "C" { + pub fn OGR_Fld_SetSubType(arg1: OGRFieldDefnH, arg2: OGRFieldSubType::Type); +} +extern "C" { + pub fn OGR_Fld_GetJustify(arg1: OGRFieldDefnH) -> OGRJustification::Type; +} +extern "C" { + pub fn OGR_Fld_SetJustify(arg1: OGRFieldDefnH, arg2: OGRJustification::Type); +} +extern "C" { + pub fn OGR_Fld_GetWidth(arg1: OGRFieldDefnH) -> libc::c_int; +} +extern "C" { + pub fn OGR_Fld_SetWidth(arg1: OGRFieldDefnH, arg2: libc::c_int); +} +extern "C" { + pub fn OGR_Fld_GetPrecision(arg1: OGRFieldDefnH) -> libc::c_int; +} +extern "C" { + pub fn OGR_Fld_SetPrecision(arg1: OGRFieldDefnH, arg2: libc::c_int); +} +extern "C" { + pub fn OGR_Fld_Set( + arg1: OGRFieldDefnH, + arg2: *const libc::c_char, + arg3: OGRFieldType::Type, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: OGRJustification::Type, ); } -pub mod GDALColorInterp { - #[doc = " Types of color interpretation for raster bands."] - pub type Type = u32; - #[doc = " Undefined"] - pub const GCI_Undefined: Type = 0; - #[doc = " Greyscale"] - pub const GCI_GrayIndex: Type = 1; - #[doc = " Paletted (see associated color table)"] - pub const GCI_PaletteIndex: Type = 2; - #[doc = " Red band of RGBA image"] - pub const GCI_RedBand: Type = 3; - #[doc = " Green band of RGBA image"] - pub const GCI_GreenBand: Type = 4; - #[doc = " Blue band of RGBA image"] - pub const GCI_BlueBand: Type = 5; - #[doc = " Alpha (0=transparent, 255=opaque)"] - pub const GCI_AlphaBand: Type = 6; - #[doc = " Hue band of HLS image"] - pub const GCI_HueBand: Type = 7; - #[doc = " Saturation band of HLS image"] - pub const GCI_SaturationBand: Type = 8; - #[doc = " Lightness band of HLS image"] - pub const GCI_LightnessBand: Type = 9; - #[doc = " Cyan band of CMYK image"] - pub const GCI_CyanBand: Type = 10; - #[doc = " Magenta band of CMYK image"] - pub const GCI_MagentaBand: Type = 11; - #[doc = " Yellow band of CMYK image"] - pub const GCI_YellowBand: Type = 12; - #[doc = " Black band of CMLY image"] - pub const GCI_BlackBand: Type = 13; - #[doc = " Y Luminance"] - pub const GCI_YCbCr_YBand: Type = 14; - #[doc = " Cb Chroma"] - pub const GCI_YCbCr_CbBand: Type = 15; - #[doc = " Cr Chroma"] - pub const GCI_YCbCr_CrBand: Type = 16; - #[doc = " Max current value (equals to GCI_YCbCr_CrBand currently)"] - pub const GCI_Max: Type = 16; +extern "C" { + pub fn OGR_Fld_IsIgnored(hDefn: OGRFieldDefnH) -> libc::c_int; } extern "C" { - pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; + pub fn OGR_Fld_SetIgnored(hDefn: OGRFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; + pub fn OGR_Fld_IsNullable(hDefn: OGRFieldDefnH) -> libc::c_int; } -pub mod GDALPaletteInterp { - #[doc = " Types of color interpretations for a GDALColorTable."] - pub type Type = u32; - #[doc = " Grayscale (in GDALColorEntry.c1)"] - pub const GPI_Gray: Type = 0; - #[doc = " Red, Green, Blue and Alpha in (in c1, c2, c3 and c4)"] - pub const GPI_RGB: Type = 1; - #[doc = " Cyan, Magenta, Yellow and Black (in c1, c2, c3 and c4)"] - pub const GPI_CMYK: Type = 2; - #[doc = " Hue, Lightness and Saturation (in c1, c2, and c3)"] - pub const GPI_HLS: Type = 3; +extern "C" { + pub fn OGR_Fld_SetNullable(hDefn: OGRFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; + pub fn OGR_Fld_IsUnique(hDefn: OGRFieldDefnH) -> libc::c_int; } -#[doc = " Opaque type used for the C bindings of the C++ GDALMajorObject class"] -pub type GDALMajorObjectH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALDataset class"] -pub type GDALDatasetH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALRasterBand class"] -pub type GDALRasterBandH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALDriver class"] -pub type GDALDriverH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALColorTable class"] -pub type GDALColorTableH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALRasterAttributeTable class"] -pub type GDALRasterAttributeTableH = *mut libc::c_void; -#[doc = " Opaque type used for the C bindings of the C++ GDALAsyncReader class"] -pub type GDALAsyncReaderH = *mut libc::c_void; -#[doc = " Type to express pixel, line or band spacing. Signed 64 bit integer."] -pub type GSpacing = GIntBig; extern "C" { - pub fn GDALAllRegister(); + pub fn OGR_Fld_SetUnique(hDefn: OGRFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn GDALCreate( - hDriver: GDALDriverH, + pub fn OGR_Fld_GetDefault(hDefn: OGRFieldDefnH) -> *const libc::c_char; +} +extern "C" { + pub fn OGR_Fld_SetDefault(hDefn: OGRFieldDefnH, arg1: *const libc::c_char); +} +extern "C" { + pub fn OGR_Fld_IsDefaultDriverSpecific(hDefn: OGRFieldDefnH) -> libc::c_int; +} +extern "C" { + pub fn OGR_Fld_GetDomainName(hDefn: OGRFieldDefnH) -> *const libc::c_char; +} +extern "C" { + pub fn OGR_Fld_SetDomainName(hDefn: OGRFieldDefnH, arg1: *const libc::c_char); +} +extern "C" { + pub fn OGR_GetFieldTypeName(arg1: OGRFieldType::Type) -> *const libc::c_char; +} +extern "C" { + pub fn OGR_GetFieldSubTypeName(arg1: OGRFieldSubType::Type) -> *const libc::c_char; +} +extern "C" { + pub fn OGR_AreTypeSubTypeCompatible( + eType: OGRFieldType::Type, + eSubType: OGRFieldSubType::Type, + ) -> libc::c_int; +} +extern "C" { + pub fn OGR_GFld_Create( arg1: *const libc::c_char, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - arg5: GDALDataType::Type, - arg6: CSLConstList, - ) -> GDALDatasetH; + arg2: OGRwkbGeometryType::Type, + ) -> OGRGeomFieldDefnH; } extern "C" { - pub fn GDALCreateCopy( - arg1: GDALDriverH, - arg2: *const libc::c_char, - arg3: GDALDatasetH, - arg4: libc::c_int, - arg5: CSLConstList, - arg6: GDALProgressFunc, - arg7: *mut libc::c_void, - ) -> GDALDatasetH; + pub fn OGR_GFld_Destroy(arg1: OGRGeomFieldDefnH); } extern "C" { - pub fn GDALIdentifyDriver( - pszFilename: *const libc::c_char, - papszFileList: CSLConstList, - ) -> GDALDriverH; + pub fn OGR_GFld_SetName(arg1: OGRGeomFieldDefnH, arg2: *const libc::c_char); } extern "C" { - pub fn GDALIdentifyDriverEx( - pszFilename: *const libc::c_char, - nIdentifyFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszFileList: *const *const libc::c_char, - ) -> GDALDriverH; + pub fn OGR_GFld_GetNameRef(arg1: OGRGeomFieldDefnH) -> *const libc::c_char; } extern "C" { - pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; + pub fn OGR_GFld_GetType(arg1: OGRGeomFieldDefnH) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; + pub fn OGR_GFld_SetType(arg1: OGRGeomFieldDefnH, arg2: OGRwkbGeometryType::Type); } extern "C" { - pub fn GDALOpenEx( - pszFilename: *const libc::c_char, - nOpenFlags: libc::c_uint, - papszAllowedDrivers: *const *const libc::c_char, - papszOpenOptions: *const *const libc::c_char, - papszSiblingFiles: *const *const libc::c_char, - ) -> GDALDatasetH; + pub fn OGR_GFld_GetSpatialRef(arg1: OGRGeomFieldDefnH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; + pub fn OGR_GFld_SetSpatialRef(arg1: OGRGeomFieldDefnH, hSRS: OGRSpatialReferenceH); } extern "C" { - pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; + pub fn OGR_GFld_IsNullable(hDefn: OGRGeomFieldDefnH) -> libc::c_int; } extern "C" { - pub fn GDALGetDriverCount() -> libc::c_int; + pub fn OGR_GFld_SetNullable(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; + pub fn OGR_GFld_IsIgnored(hDefn: OGRGeomFieldDefnH) -> libc::c_int; } extern "C" { - pub fn GDALCreateDriver() -> GDALDriverH; + pub fn OGR_GFld_SetIgnored(hDefn: OGRGeomFieldDefnH, arg1: libc::c_int); } extern "C" { - pub fn GDALDestroyDriver(arg1: GDALDriverH); + pub fn OGR_FD_Create(arg1: *const libc::c_char) -> OGRFeatureDefnH; } extern "C" { - pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; + pub fn OGR_FD_Destroy(arg1: OGRFeatureDefnH); } extern "C" { - pub fn GDALDeregisterDriver(arg1: GDALDriverH); + pub fn OGR_FD_Release(arg1: OGRFeatureDefnH); } extern "C" { - pub fn GDALDestroyDriverManager(); + pub fn OGR_FD_GetName(arg1: OGRFeatureDefnH) -> *const libc::c_char; } extern "C" { - pub fn GDALDestroy(); + pub fn OGR_FD_GetFieldCount(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; + pub fn OGR_FD_GetFieldDefn(arg1: OGRFeatureDefnH, arg2: libc::c_int) -> OGRFieldDefnH; } extern "C" { - pub fn GDALRenameDataset( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; + pub fn OGR_FD_GetFieldIndex(arg1: OGRFeatureDefnH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALCopyDatasetFiles( - arg1: GDALDriverH, - pszNewName: *const libc::c_char, - pszOldName: *const libc::c_char, - ) -> CPLErr::Type; + pub fn OGR_FD_AddFieldDefn(arg1: OGRFeatureDefnH, arg2: OGRFieldDefnH); } extern "C" { - pub fn GDALValidateCreationOptions( - arg1: GDALDriverH, - papszCreationOptions: CSLConstList, - ) -> libc::c_int; + pub fn OGR_FD_DeleteFieldDefn(hDefn: OGRFeatureDefnH, iField: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; + pub fn OGR_FD_ReorderFieldDefns( + hDefn: OGRFeatureDefnH, + panMap: *mut libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; + pub fn OGR_FD_GetGeomType(arg1: OGRFeatureDefnH) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; + pub fn OGR_FD_SetGeomType(arg1: OGRFeatureDefnH, arg2: OGRwkbGeometryType::Type); } extern "C" { - pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; + pub fn OGR_FD_IsGeometryIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; } -#[doc = " Ground Control Point"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDAL_GCP { - #[doc = " Unique identifier, often numeric"] - pub pszId: *mut libc::c_char, - #[doc = " Informational message or \"\""] - pub pszInfo: *mut libc::c_char, - #[doc = " Pixel (x) location of GCP on raster"] - pub dfGCPPixel: f64, - #[doc = " Line (y) location of GCP on raster"] - pub dfGCPLine: f64, - #[doc = " X position of GCP in georeferenced space"] - pub dfGCPX: f64, - #[doc = " Y position of GCP in georeferenced space"] - pub dfGCPY: f64, - #[doc = " Elevation of GCP, or zero if not known"] - pub dfGCPZ: f64, -} -#[test] -fn bindgen_test_layout_GDAL_GCP() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(GDAL_GCP)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDAL_GCP)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszId) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(pszInfo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPPixel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPLine) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDAL_GCP), - "::", - stringify!(dfGCPZ) - ) - ); +extern "C" { + pub fn OGR_FD_SetGeometryIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); } extern "C" { - pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); + pub fn OGR_FD_IsStyleIgnored(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); + pub fn OGR_FD_SetStyleIgnored(arg1: OGRFeatureDefnH, arg2: libc::c_int); } extern "C" { - pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; + pub fn OGR_FD_Reference(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn GDALGCPsToGeoTransform( - nGCPCount: libc::c_int, - pasGCPs: *const GDAL_GCP, - padfGeoTransform: *mut f64, - bApproxOK: libc::c_int, - ) -> libc::c_int; + pub fn OGR_FD_Dereference(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn GDALInvGeoTransform( - padfGeoTransformIn: *mut f64, - padfInvGeoTransformOut: *mut f64, - ) -> libc::c_int; + pub fn OGR_FD_GetReferenceCount(arg1: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn GDALApplyGeoTransform( - arg1: *mut f64, - arg2: f64, - arg3: f64, - arg4: *mut f64, - arg5: *mut f64, - ); + pub fn OGR_FD_GetGeomFieldCount(hFDefn: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn GDALComposeGeoTransforms( - padfGeoTransform1: *const f64, - padfGeoTransform2: *const f64, - padfGeoTransformOut: *mut f64, - ); + pub fn OGR_FD_GetGeomFieldDefn(hFDefn: OGRFeatureDefnH, i: libc::c_int) -> OGRGeomFieldDefnH; } extern "C" { - pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; + pub fn OGR_FD_GetGeomFieldIndex( + hFDefn: OGRFeatureDefnH, + pszName: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetMetadata( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - ) -> *mut *mut libc::c_char; + pub fn OGR_FD_AddGeomFieldDefn(hFDefn: OGRFeatureDefnH, hGFldDefn: OGRGeomFieldDefnH); } extern "C" { - pub fn GDALSetMetadata( - arg1: GDALMajorObjectH, - arg2: CSLConstList, - arg3: *const libc::c_char, - ) -> CPLErr::Type; + pub fn OGR_FD_DeleteGeomFieldDefn( + hFDefn: OGRFeatureDefnH, + iGeomField: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> *const libc::c_char; + pub fn OGR_FD_IsSame(hFDefn: OGRFeatureDefnH, hOtherFDefn: OGRFeatureDefnH) -> libc::c_int; } extern "C" { - pub fn GDALSetMetadataItem( - arg1: GDALMajorObjectH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> CPLErr::Type; + pub fn OGR_F_Create(arg1: OGRFeatureDefnH) -> OGRFeatureH; } extern "C" { - pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; + pub fn OGR_F_Destroy(arg1: OGRFeatureH); } extern "C" { - pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); + pub fn OGR_F_GetDefnRef(arg1: OGRFeatureH) -> OGRFeatureDefnH; } extern "C" { - pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; + pub fn OGR_F_SetGeometryDirectly(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; + pub fn OGR_F_SetGeometry(arg1: OGRFeatureH, arg2: OGRGeometryH) -> OGRErr::Type; } extern "C" { - pub fn GDALClose(arg1: GDALDatasetH); + pub fn OGR_F_GetGeometryRef(arg1: OGRFeatureH) -> OGRGeometryH; } extern "C" { - pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_F_StealGeometry(arg1: OGRFeatureH) -> OGRGeometryH; } extern "C" { - pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_F_Clone(arg1: OGRFeatureH) -> OGRFeatureH; } extern "C" { - pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_F_Equal(arg1: OGRFeatureH, arg2: OGRFeatureH) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; + pub fn OGR_F_GetFieldCount(arg1: OGRFeatureH) -> libc::c_int; } extern "C" { - pub fn GDALAddBand( - hDS: GDALDatasetH, - eType: GDALDataType::Type, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + pub fn OGR_F_GetFieldDefnRef(arg1: OGRFeatureH, arg2: libc::c_int) -> OGRFieldDefnH; } extern "C" { - pub fn GDALBeginAsyncReader( - hDS: GDALDatasetH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - pBuf: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - papszOptions: CSLConstList, - ) -> GDALAsyncReaderH; + pub fn OGR_F_GetFieldIndex(arg1: OGRFeatureH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); + pub fn OGR_F_IsFieldSet(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn GDALDatasetRasterIO( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nBandSpace: libc::c_int, - ) -> CPLErr::Type; + pub fn OGR_F_UnsetField(arg1: OGRFeatureH, arg2: libc::c_int); } extern "C" { - pub fn GDALDatasetRasterIOEx( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - nBandSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; + pub fn OGR_F_IsFieldNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn GDALDatasetAdviseRead( - hDS: GDALDatasetH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandCount: *mut libc::c_int, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + pub fn OGR_F_IsFieldSetAndNotNull(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; + pub fn OGR_F_SetFieldNull(arg1: OGRFeatureH, arg2: libc::c_int); } extern "C" { - pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; + pub fn OGR_F_GetRawFieldRef(arg1: OGRFeatureH, arg2: libc::c_int) -> *mut OGRField; } extern "C" { - pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; + pub fn OGR_RawField_IsUnset(arg1: *const OGRField) -> libc::c_int; } extern "C" { - pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; + pub fn OGR_RawField_IsNull(arg1: *const OGRField) -> libc::c_int; } extern "C" { - pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_RawField_SetUnset(arg1: *mut OGRField); } extern "C" { - pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; + pub fn OGR_RawField_SetNull(arg1: *mut OGRField); } extern "C" { - pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; + pub fn OGR_F_GetFieldAsInteger(arg1: OGRFeatureH, arg2: libc::c_int) -> libc::c_int; } extern "C" { - pub fn GDALSetGCPs( - arg1: GDALDatasetH, - arg2: libc::c_int, - arg3: *const GDAL_GCP, - arg4: *const libc::c_char, - ) -> CPLErr::Type; + pub fn OGR_F_GetFieldAsInteger64(arg1: OGRFeatureH, arg2: libc::c_int) -> GIntBig; } extern "C" { - pub fn GDALGetInternalHandle( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - ) -> *mut libc::c_void; + pub fn OGR_F_GetFieldAsDouble(arg1: OGRFeatureH, arg2: libc::c_int) -> f64; } extern "C" { - pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_F_GetFieldAsString(arg1: OGRFeatureH, arg2: libc::c_int) -> *const libc::c_char; } extern "C" { - pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_F_GetFieldAsIntegerList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *const libc::c_int; } extern "C" { - pub fn GDALReleaseDataset(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_F_GetFieldAsInteger64List( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *const GIntBig; } extern "C" { - pub fn GDALBuildOverviews( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: libc::c_int, + pub fn OGR_F_GetFieldAsDoubleList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *const f64; +} +extern "C" { + pub fn OGR_F_GetFieldAsStringList( + arg1: OGRFeatureH, + arg2: libc::c_int, + ) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn OGR_F_GetFieldAsBinary( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, + ) -> *mut GByte; +} +extern "C" { + pub fn OGR_F_GetFieldAsDateTime( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: *mut libc::c_int, arg4: *mut libc::c_int, - arg5: libc::c_int, + arg5: *mut libc::c_int, arg6: *mut libc::c_int, - arg7: GDALProgressFunc, - arg8: *mut libc::c_void, - ) -> CPLErr::Type; + arg7: *mut libc::c_int, + arg8: *mut libc::c_int, + arg9: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); + pub fn OGR_F_GetFieldAsDateTimeEx( + hFeat: OGRFeatureH, + iField: libc::c_int, + pnYear: *mut libc::c_int, + pnMonth: *mut libc::c_int, + pnDay: *mut libc::c_int, + pnHour: *mut libc::c_int, + pnMinute: *mut libc::c_int, + pfSecond: *mut f32, + pnTZFlag: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; + pub fn OGR_F_SetFieldInteger(arg1: OGRFeatureH, arg2: libc::c_int, arg3: libc::c_int); } extern "C" { - pub fn GDALFlushCache(hDS: GDALDatasetH); + pub fn OGR_F_SetFieldInteger64(arg1: OGRFeatureH, arg2: libc::c_int, arg3: GIntBig); } extern "C" { - pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; + pub fn OGR_F_SetFieldDouble(arg1: OGRFeatureH, arg2: libc::c_int, arg3: f64); } extern "C" { - pub fn GDALDatasetCopyWholeRaster( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: CSLConstList, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_F_SetFieldString(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *const libc::c_char); } extern "C" { - pub fn GDALRasterBandCopyWholeRaster( - hSrcBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - constpapszOptions: *const *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_F_SetFieldIntegerList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const libc::c_int, + ); } extern "C" { - pub fn GDALRegenerateOverviews( - hSrcBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviewBands: *mut GDALRasterBandH, - pszResampling: *const libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_F_SetFieldInteger64List( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const GIntBig, + ); } extern "C" { - pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; + pub fn OGR_F_SetFieldDoubleList( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const f64, + ); } extern "C" { - pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; + pub fn OGR_F_SetFieldStringList(arg1: OGRFeatureH, arg2: libc::c_int, arg3: CSLConstList); } extern "C" { - pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; + pub fn OGR_F_SetFieldRaw(arg1: OGRFeatureH, arg2: libc::c_int, arg3: *mut OGRField); } extern "C" { - pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; + pub fn OGR_F_SetFieldBinary( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const libc::c_void, + ); } extern "C" { - pub fn GDALDatasetCreateLayer( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRSpatialReferenceH, - arg4: OGRwkbGeometryType::Type, - arg5: CSLConstList, - ) -> OGRLayerH; + pub fn OGR_F_SetFieldDateTime( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: libc::c_int, + arg9: libc::c_int, + ); } extern "C" { - pub fn GDALDatasetCopyLayer( - arg1: GDALDatasetH, - arg2: OGRLayerH, - arg3: *const libc::c_char, - arg4: CSLConstList, - ) -> OGRLayerH; + pub fn OGR_F_SetFieldDateTimeEx( + arg1: OGRFeatureH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: f32, + arg9: libc::c_int, + ); } extern "C" { - pub fn GDALDatasetResetReading(arg1: GDALDatasetH); + pub fn OGR_F_GetGeomFieldCount(hFeat: OGRFeatureH) -> libc::c_int; } extern "C" { - pub fn GDALDatasetGetNextFeature( - hDS: GDALDatasetH, - phBelongingLayer: *mut OGRLayerH, - pdfProgressPct: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> OGRFeatureH; + pub fn OGR_F_GetGeomFieldDefnRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeomFieldDefnH; } extern "C" { - pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; + pub fn OGR_F_GetGeomFieldIndex(hFeat: OGRFeatureH, pszName: *const libc::c_char) + -> libc::c_int; } extern "C" { - pub fn GDALDatasetExecuteSQL( - arg1: GDALDatasetH, - arg2: *const libc::c_char, - arg3: OGRGeometryH, - arg4: *const libc::c_char, - ) -> OGRLayerH; + pub fn OGR_F_GetGeomFieldRef(hFeat: OGRFeatureH, iField: libc::c_int) -> OGRGeometryH; } extern "C" { - pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); + pub fn OGR_F_SetGeomFieldDirectly( + hFeat: OGRFeatureH, + iField: libc::c_int, + hGeom: OGRGeometryH, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; + pub fn OGR_F_SetGeomField( + hFeat: OGRFeatureH, + iField: libc::c_int, + hGeom: OGRGeometryH, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); + pub fn OGR_F_GetFID(arg1: OGRFeatureH) -> GIntBig; } extern "C" { - pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); + pub fn OGR_F_SetFID(arg1: OGRFeatureH, arg2: GIntBig) -> OGRErr::Type; } extern "C" { - pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; + pub fn OGR_F_DumpReadable(arg1: OGRFeatureH, arg2: *mut FILE); } extern "C" { - pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; + pub fn OGR_F_SetFrom(arg1: OGRFeatureH, arg2: OGRFeatureH, arg3: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; + pub fn OGR_F_SetFromWithMap( + arg1: OGRFeatureH, + arg2: OGRFeatureH, + arg3: libc::c_int, + arg4: *const libc::c_int, + ) -> OGRErr::Type; } -#[doc = " Type of functions to pass to GDALAddDerivedBandPixelFunc."] -#[doc = " @since GDAL 2.2"] -pub type GDALDerivedPixelFunc = ::std::option::Option< - unsafe extern "C" fn( - papoSources: *mut *mut libc::c_void, - nSources: libc::c_int, - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eSrcType: GDALDataType::Type, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type, ->; extern "C" { - pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; + pub fn OGR_F_GetStyleString(arg1: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetBlockSize( - arg1: GDALRasterBandH, - pnXSize: *mut libc::c_int, - pnYSize: *mut libc::c_int, - ); + pub fn OGR_F_SetStyleString(arg1: OGRFeatureH, arg2: *const libc::c_char); } extern "C" { - pub fn GDALGetActualBlockSize( - arg1: GDALRasterBandH, - nXBlockOff: libc::c_int, - nYBlockOff: libc::c_int, - pnXValid: *mut libc::c_int, - pnYValid: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn OGR_F_SetStyleStringDirectly(arg1: OGRFeatureH, arg2: *mut libc::c_char); } extern "C" { - pub fn GDALRasterAdviseRead( - hRB: GDALRasterBandH, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - papszOptions: CSLConstList, - ) -> CPLErr::Type; + pub fn OGR_F_GetStyleTable(arg1: OGRFeatureH) -> OGRStyleTableH; } extern "C" { - pub fn GDALRasterIO( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - ) -> CPLErr::Type; -} -extern "C" { - pub fn GDALRasterIOEx( - hRBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nDSXOff: libc::c_int, - nDSYOff: libc::c_int, - nDSXSize: libc::c_int, - nDSYSize: libc::c_int, - pBuffer: *mut libc::c_void, - nBXSize: libc::c_int, - nBYSize: libc::c_int, - eBDataType: GDALDataType::Type, - nPixelSpace: GSpacing, - nLineSpace: GSpacing, - psExtraArg: *mut GDALRasterIOExtraArg, - ) -> CPLErr::Type; + pub fn OGR_F_SetStyleTableDirectly(arg1: OGRFeatureH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALReadBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_F_SetStyleTable(arg1: OGRFeatureH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALWriteBlock( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_F_GetNativeData(arg1: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; + pub fn OGR_F_SetNativeData(arg1: OGRFeatureH, arg2: *const libc::c_char); } extern "C" { - pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; + pub fn OGR_F_GetNativeMediaType(arg1: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; + pub fn OGR_F_SetNativeMediaType(arg1: OGRFeatureH, arg2: *const libc::c_char); } extern "C" { - pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; + pub fn OGR_F_FillUnsetWithDefault( + hFeat: OGRFeatureH, + bNotNullableOnly: libc::c_int, + papszOptions: *mut *mut libc::c_char, + ); } extern "C" { - pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; + pub fn OGR_F_Validate( + arg1: OGRFeatureH, + nValidateFlags: libc::c_int, + bEmitError: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; + pub fn OGR_FldDomain_Destroy(arg1: OGRFieldDomainH); } extern "C" { - pub fn GDALSetRasterColorInterpretation( - arg1: GDALRasterBandH, - arg2: GDALColorInterp::Type, - ) -> CPLErr::Type; + pub fn OGR_FldDomain_GetName(arg1: OGRFieldDomainH) -> *const libc::c_char; } extern "C" { - pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; + pub fn OGR_FldDomain_GetDescription(arg1: OGRFieldDomainH) -> *const libc::c_char; } extern "C" { - pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; + pub fn OGR_FldDomain_GetDomainType(arg1: OGRFieldDomainH) -> OGRFieldDomainType::Type; } extern "C" { - pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; + pub fn OGR_FldDomain_GetFieldType(arg1: OGRFieldDomainH) -> OGRFieldType::Type; } extern "C" { - pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; + pub fn OGR_FldDomain_GetFieldSubType(arg1: OGRFieldDomainH) -> OGRFieldSubType::Type; } extern "C" { - pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; + pub fn OGR_FldDomain_GetSplitPolicy(arg1: OGRFieldDomainH) -> OGRFieldDomainSplitPolicy::Type; } extern "C" { - pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; + pub fn OGR_FldDomain_SetSplitPolicy( + arg1: OGRFieldDomainH, + arg2: OGRFieldDomainSplitPolicy::Type, + ); } extern "C" { - pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; + pub fn OGR_FldDomain_GetMergePolicy(arg1: OGRFieldDomainH) -> OGRFieldDomainMergePolicy::Type; } extern "C" { - pub fn GDALDeleteRasterNoDataValue(arg1: GDALRasterBandH) -> CPLErr::Type; + pub fn OGR_FldDomain_SetMergePolicy( + arg1: OGRFieldDomainH, + arg2: OGRFieldDomainMergePolicy::Type, + ); } extern "C" { - pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; + pub fn OGR_CodedFldDomain_Create( + pszName: *const libc::c_char, + pszDescription: *const libc::c_char, + eFieldType: OGRFieldType::Type, + eFieldSubType: OGRFieldSubType::Type, + enumeration: *const OGRCodedValue, + ) -> OGRFieldDomainH; } extern "C" { - pub fn GDALSetRasterCategoryNames(arg1: GDALRasterBandH, arg2: CSLConstList) -> CPLErr::Type; + pub fn OGR_CodedFldDomain_GetEnumeration(arg1: OGRFieldDomainH) -> *const OGRCodedValue; } extern "C" { - pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn OGR_RangeFldDomain_Create( + pszName: *const libc::c_char, + pszDescription: *const libc::c_char, + eFieldType: OGRFieldType::Type, + eFieldSubType: OGRFieldSubType::Type, + psMin: *const OGRField, + bMinIsInclusive: bool, + psMax: *const OGRField, + bMaxIsInclusive: bool, + ) -> OGRFieldDomainH; } extern "C" { - pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn OGR_RangeFldDomain_GetMin( + arg1: OGRFieldDomainH, + pbIsInclusiveOut: *mut bool, + ) -> *const OGRField; } extern "C" { - pub fn GDALGetRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - bForce: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - ) -> CPLErr::Type; + pub fn OGR_RangeFldDomain_GetMax( + arg1: OGRFieldDomainH, + pbIsInclusiveOut: *mut bool, + ) -> *const OGRField; } extern "C" { - pub fn GDALComputeRasterStatistics( - arg1: GDALRasterBandH, - bApproxOK: libc::c_int, - pdfMin: *mut f64, - pdfMax: *mut f64, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_GlobFldDomain_Create( + pszName: *const libc::c_char, + pszDescription: *const libc::c_char, + eFieldType: OGRFieldType::Type, + eFieldSubType: OGRFieldSubType::Type, + pszGlob: *const libc::c_char, + ) -> OGRFieldDomainH; } extern "C" { - pub fn GDALSetRasterStatistics( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - dfMean: f64, - dfStdDev: f64, - ) -> CPLErr::Type; + pub fn OGR_GlobFldDomain_GetGlob(arg1: OGRFieldDomainH) -> *const libc::c_char; } +pub type OGRLayerH = *mut libc::c_void; +pub type OGRDataSourceH = *mut libc::c_void; +pub type OGRSFDriverH = *mut libc::c_void; extern "C" { - pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; + pub fn OGR_L_GetName(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { - pub fn GDALSetRasterUnitType( - hBand: GDALRasterBandH, - pszNewValue: *const libc::c_char, - ) -> CPLErr::Type; + pub fn OGR_L_GetGeomType(arg1: OGRLayerH) -> OGRwkbGeometryType::Type; } extern "C" { - pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn OGR_L_GetSpatialFilter(arg1: OGRLayerH) -> OGRGeometryH; } extern "C" { - pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; + pub fn OGR_L_SetSpatialFilter(arg1: OGRLayerH, arg2: OGRGeometryH); } extern "C" { - pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; + pub fn OGR_L_SetSpatialFilterRect(arg1: OGRLayerH, arg2: f64, arg3: f64, arg4: f64, arg5: f64); } extern "C" { - pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; + pub fn OGR_L_SetSpatialFilterEx(arg1: OGRLayerH, iGeomField: libc::c_int, hGeom: OGRGeometryH); } extern "C" { - pub fn GDALComputeRasterMinMax( - hBand: GDALRasterBandH, - bApproxOK: libc::c_int, - adfMinMax: *mut f64, + pub fn OGR_L_SetSpatialFilterRectEx( + arg1: OGRLayerH, + iGeomField: libc::c_int, + dfMinX: f64, + dfMinY: f64, + dfMaxX: f64, + dfMaxY: f64, ); } extern "C" { - pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; + pub fn OGR_L_SetAttributeFilter(arg1: OGRLayerH, arg2: *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn GDALGetRasterHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_L_ResetReading(arg1: OGRLayerH); } extern "C" { - pub fn GDALGetRasterHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - bIncludeOutOfRange: libc::c_int, - bApproxOK: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_L_GetNextFeature(arg1: OGRLayerH) -> OGRFeatureH; } extern "C" { - pub fn GDALGetDefaultHistogram( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut libc::c_int, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_L_SetNextByIndex(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDefaultHistogramEx( - hBand: GDALRasterBandH, - pdfMin: *mut f64, - pdfMax: *mut f64, - pnBuckets: *mut libc::c_int, - ppanHistogram: *mut *mut GUIntBig, - bForce: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_L_GetFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRFeatureH; } extern "C" { - pub fn GDALSetDefaultHistogram( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn OGR_L_SetFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; } extern "C" { - pub fn GDALSetDefaultHistogramEx( - hBand: GDALRasterBandH, - dfMin: f64, - dfMax: f64, - nBuckets: libc::c_int, - panHistogram: *mut GUIntBig, - ) -> CPLErr::Type; + pub fn OGR_L_CreateFeature(arg1: OGRLayerH, arg2: OGRFeatureH) -> OGRErr::Type; } extern "C" { - pub fn GDALGetRandomRasterSample( - arg1: GDALRasterBandH, - arg2: libc::c_int, - arg3: *mut f32, - ) -> libc::c_int; + pub fn OGR_L_DeleteFeature(arg1: OGRLayerH, arg2: GIntBig) -> OGRErr::Type; } extern "C" { - pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) - -> GDALRasterBandH; + pub fn OGR_L_GetLayerDefn(arg1: OGRLayerH) -> OGRFeatureDefnH; } extern "C" { - pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; + pub fn OGR_L_GetSpatialRef(arg1: OGRLayerH) -> OGRSpatialReferenceH; } extern "C" { - pub fn GDALFillRaster( - hBand: GDALRasterBandH, - dfRealValue: f64, - dfImaginaryValue: f64, - ) -> CPLErr::Type; + pub fn OGR_L_FindFieldIndex( + arg1: OGRLayerH, + arg2: *const libc::c_char, + bExactMatch: libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALComputeBandStats( - hBand: GDALRasterBandH, - nSampleStep: libc::c_int, - pdfMean: *mut f64, - pdfStdDev: *mut f64, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_L_GetFeatureCount(arg1: OGRLayerH, arg2: libc::c_int) -> GIntBig; } extern "C" { - pub fn GDALOverviewMagnitudeCorrection( - hBaseBand: GDALRasterBandH, - nOverviewCount: libc::c_int, - pahOverviews: *mut GDALRasterBandH, - pfnProgress: GDALProgressFunc, - pProgressData: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_L_GetExtent( + arg1: OGRLayerH, + arg2: *mut OGREnvelope, + arg3: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; + pub fn OGR_L_GetExtentEx( + arg1: OGRLayerH, + iGeomField: libc::c_int, + psExtent: *mut OGREnvelope, + bForce: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALSetDefaultRAT( - arg1: GDALRasterBandH, - arg2: GDALRasterAttributeTableH, - ) -> CPLErr::Type; + pub fn OGR_L_TestCapability(arg1: OGRLayerH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALAddDerivedBandPixelFunc( - pszName: *const libc::c_char, - pfnPixelFunc: GDALDerivedPixelFunc, - ) -> CPLErr::Type; + pub fn OGR_L_CreateField( + arg1: OGRLayerH, + arg2: OGRFieldDefnH, + arg3: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; + pub fn OGR_L_CreateGeomField( + hLayer: OGRLayerH, + hFieldDefn: OGRGeomFieldDefnH, + bForce: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; + pub fn OGR_L_DeleteField(arg1: OGRLayerH, iField: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; + pub fn OGR_L_ReorderFields(arg1: OGRLayerH, panMap: *mut libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALGetDataCoverageStatus( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nMaskFlagStop: libc::c_int, - pdfDataPct: *mut f64, - ) -> libc::c_int; + pub fn OGR_L_ReorderField( + arg1: OGRLayerH, + iOldFieldPos: libc::c_int, + iNewFieldPos: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALARGetNextUpdatedRegion( - hARIO: GDALAsyncReaderH, - dfTimeout: f64, - pnXBufOff: *mut libc::c_int, - pnYBufOff: *mut libc::c_int, - pnXBufSize: *mut libc::c_int, - pnYBufSize: *mut libc::c_int, - ) -> GDALAsyncStatusType::Type; + pub fn OGR_L_AlterFieldDefn( + arg1: OGRLayerH, + iField: libc::c_int, + hNewFieldDefn: OGRFieldDefnH, + nFlags: libc::c_int, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; + pub fn OGR_L_StartTransaction(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); + pub fn OGR_L_CommitTransaction(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALGeneralCmdLineProcessor( - nArgc: libc::c_int, - ppapszArgv: *mut *mut *mut libc::c_char, - nOptions: libc::c_int, - ) -> libc::c_int; + pub fn OGR_L_RollbackTransaction(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALSwapWords( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: libc::c_int, - nWordSkip: libc::c_int, - ); + pub fn OGR_L_Reference(arg1: OGRLayerH) -> libc::c_int; } extern "C" { - pub fn GDALSwapWordsEx( - pData: *mut libc::c_void, - nWordSize: libc::c_int, - nWordCount: usize, - nWordSkip: libc::c_int, - ); + pub fn OGR_L_Dereference(arg1: OGRLayerH) -> libc::c_int; } extern "C" { - pub fn GDALCopyWords( - pSrcData: *const libc::c_void, - eSrcType: GDALDataType::Type, - nSrcPixelOffset: libc::c_int, - pDstData: *mut libc::c_void, - eDstType: GDALDataType::Type, - nDstPixelOffset: libc::c_int, - nWordCount: libc::c_int, - ); + pub fn OGR_L_GetRefCount(arg1: OGRLayerH) -> libc::c_int; } extern "C" { - pub fn GDALCopyBits( - pabySrcData: *const GByte, - nSrcOffset: libc::c_int, - nSrcStep: libc::c_int, - pabyDstData: *mut GByte, - nDstOffset: libc::c_int, - nDstStep: libc::c_int, - nBitCount: libc::c_int, - nStepCount: libc::c_int, - ); + pub fn OGR_L_SyncToDisk(arg1: OGRLayerH) -> OGRErr::Type; } extern "C" { - pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; + pub fn OGR_L_GetFeaturesRead(arg1: OGRLayerH) -> GIntBig; } extern "C" { - pub fn GDALReadWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; + pub fn OGR_L_GetFIDColumn(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { - pub fn GDALWriteWorldFile( - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> libc::c_int; + pub fn OGR_L_GetGeometryColumn(arg1: OGRLayerH) -> *const libc::c_char; } extern "C" { - pub fn GDALLoadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn OGR_L_GetStyleTable(arg1: OGRLayerH) -> OGRStyleTableH; } extern "C" { - pub fn GDALReadTabFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn OGR_L_SetStyleTableDirectly(arg1: OGRLayerH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALLoadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn OGR_L_SetStyleTable(arg1: OGRLayerH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALReadOziMapFile( - arg1: *const libc::c_char, - arg2: *mut f64, - arg3: *mut *mut libc::c_char, - arg4: *mut libc::c_int, - arg5: *mut *mut GDAL_GCP, - ) -> libc::c_int; + pub fn OGR_L_SetIgnoredFields(arg1: OGRLayerH, arg2: *mut *const libc::c_char) -> OGRErr::Type; } extern "C" { - pub fn GDALDecToDMS( - arg1: f64, - arg2: *const libc::c_char, - arg3: libc::c_int, - ) -> *const libc::c_char; + pub fn OGR_L_Intersection( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALPackedDMSToDec(arg1: f64) -> f64; + pub fn OGR_L_Union( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALDecToPackedDMS(arg1: f64) -> f64; + pub fn OGR_L_SymDifference( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } -#[doc = " Structure to store Rational Polynomial Coefficients / Rigorous Projection"] -#[doc = " Model. See http://geotiff.maptools.org/rpc_prop.html"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALRPCInfo { - #[doc = "< Line offset"] - pub dfLINE_OFF: f64, - #[doc = "< Sample/Pixel offset"] - pub dfSAMP_OFF: f64, - #[doc = "< Latitude offset"] - pub dfLAT_OFF: f64, - #[doc = "< Longitude offset"] - pub dfLONG_OFF: f64, - #[doc = "< Height offset"] - pub dfHEIGHT_OFF: f64, - #[doc = "< Line scale"] - pub dfLINE_SCALE: f64, - #[doc = "< Sample/Pixel scale"] - pub dfSAMP_SCALE: f64, - #[doc = "< Latitude scale"] - pub dfLAT_SCALE: f64, - #[doc = "< Longitude scale"] - pub dfLONG_SCALE: f64, - #[doc = "< Height scale"] - pub dfHEIGHT_SCALE: f64, - #[doc = "< Line Numerator Coefficients"] - pub adfLINE_NUM_COEFF: [f64; 20usize], - #[doc = "< Line Denominator Coefficients"] - pub adfLINE_DEN_COEFF: [f64; 20usize], - #[doc = "< Sample/Pixel Numerator Coefficients"] - pub adfSAMP_NUM_COEFF: [f64; 20usize], - #[doc = "< Sample/Pixel Denominator Coefficients"] - pub adfSAMP_DEN_COEFF: [f64; 20usize], - #[doc = "< Minimum longitude"] - pub dfMIN_LONG: f64, - #[doc = "< Minimum latitude"] - pub dfMIN_LAT: f64, - #[doc = "< Maximum longitude"] - pub dfMAX_LONG: f64, - #[doc = "< Maximum latitude"] - pub dfMAX_LAT: f64, +extern "C" { + pub fn OGR_L_Identity( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } -#[test] -fn bindgen_test_layout_GDALRPCInfo() { - assert_eq!( - ::std::mem::size_of::(), - 752usize, - concat!("Size of: ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALRPCInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_OFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLINE_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfSAMP_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLAT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfLONG_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfHEIGHT_SCALE) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfLINE_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_NUM_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, - 560usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(adfSAMP_DEN_COEFF) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, - 720usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, - 728usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMIN_LAT) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, - 736usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LONG) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, - 744usize, - concat!( - "Offset of field: ", - stringify!(GDALRPCInfo), - "::", - stringify!(dfMAX_LAT) - ) - ); +extern "C" { + pub fn OGR_L_Update( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } extern "C" { - pub fn GDALExtractRPCInfo(arg1: CSLConstList, arg2: *mut GDALRPCInfo) -> libc::c_int; + pub fn OGR_L_Clip( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } -#[doc = " Color tuple"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALColorEntry { - #[doc = " gray, red, cyan or hue"] - pub c1: libc::c_short, - #[doc = " green, magenta, or lightness"] - pub c2: libc::c_short, - #[doc = " blue, yellow, or saturation"] - pub c3: libc::c_short, - #[doc = " alpha or blackband"] - pub c4: libc::c_short, +extern "C" { + pub fn OGR_L_Erase( + arg1: OGRLayerH, + arg2: OGRLayerH, + arg3: OGRLayerH, + arg4: *mut *mut libc::c_char, + arg5: GDALProgressFunc, + arg6: *mut libc::c_void, + ) -> OGRErr::Type; } -#[test] -fn bindgen_test_layout_GDALColorEntry() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(GDALColorEntry)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(GDALColorEntry)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(GDALColorEntry), - "::", - stringify!(c4) - ) - ); +extern "C" { + pub fn OGR_DS_Destroy(arg1: OGRDataSourceH); } extern "C" { - pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; + pub fn OGR_DS_GetName(arg1: OGRDataSourceH) -> *const libc::c_char; } extern "C" { - pub fn GDALDestroyColorTable(arg1: GDALColorTableH); + pub fn OGR_DS_GetLayerCount(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; + pub fn OGR_DS_GetLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRLayerH; } extern "C" { - pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; + pub fn OGR_DS_GetLayerByName(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> OGRLayerH; } extern "C" { - pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; + pub fn OGR_DS_DeleteLayer(arg1: OGRDataSourceH, arg2: libc::c_int) -> OGRErr::Type; } extern "C" { - pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; + pub fn OGR_DS_GetDriver(arg1: OGRDataSourceH) -> OGRSFDriverH; } extern "C" { - pub fn GDALGetColorEntryAsRGB( - arg1: GDALColorTableH, - arg2: libc::c_int, - arg3: *mut GDALColorEntry, - ) -> libc::c_int; + pub fn OGR_DS_CreateLayer( + arg1: OGRDataSourceH, + arg2: *const libc::c_char, + arg3: OGRSpatialReferenceH, + arg4: OGRwkbGeometryType::Type, + arg5: *mut *mut libc::c_char, + ) -> OGRLayerH; } extern "C" { - pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); + pub fn OGR_DS_CopyLayer( + arg1: OGRDataSourceH, + arg2: OGRLayerH, + arg3: *const libc::c_char, + arg4: *mut *mut libc::c_char, + ) -> OGRLayerH; } extern "C" { - pub fn GDALCreateColorRamp( - hTable: GDALColorTableH, - nStartIndex: libc::c_int, - psStartColor: *const GDALColorEntry, - nEndIndex: libc::c_int, - psEndColor: *const GDALColorEntry, - ); + pub fn OGR_DS_TestCapability(arg1: OGRDataSourceH, arg2: *const libc::c_char) -> libc::c_int; } -pub mod GDALRATFieldType { - #[doc = " Field type of raster attribute table"] - pub type Type = u32; - #[doc = " Integer field"] - pub const GFT_Integer: Type = 0; - #[doc = " Floating point (double) field"] - pub const GFT_Real: Type = 1; - #[doc = " String field"] - pub const GFT_String: Type = 2; +extern "C" { + pub fn OGR_DS_ExecuteSQL( + arg1: OGRDataSourceH, + arg2: *const libc::c_char, + arg3: OGRGeometryH, + arg4: *const libc::c_char, + ) -> OGRLayerH; } -pub mod GDALRATFieldUsage { - #[doc = " Field usage of raster attribute table"] - pub type Type = u32; - #[doc = " General purpose field."] - pub const GFU_Generic: Type = 0; - #[doc = " Histogram pixel count"] - pub const GFU_PixelCount: Type = 1; - #[doc = " Class name"] - pub const GFU_Name: Type = 2; - #[doc = " Class range minimum"] - pub const GFU_Min: Type = 3; - #[doc = " Class range maximum"] - pub const GFU_Max: Type = 4; - #[doc = " Class value (min=max)"] - pub const GFU_MinMax: Type = 5; - #[doc = " Red class color (0-255)"] - pub const GFU_Red: Type = 6; - #[doc = " Green class color (0-255)"] - pub const GFU_Green: Type = 7; - #[doc = " Blue class color (0-255)"] - pub const GFU_Blue: Type = 8; - #[doc = " Alpha (0=transparent,255=opaque)"] - pub const GFU_Alpha: Type = 9; - #[doc = " Color Range Red Minimum"] - pub const GFU_RedMin: Type = 10; - #[doc = " Color Range Green Minimum"] - pub const GFU_GreenMin: Type = 11; - #[doc = " Color Range Blue Minimum"] - pub const GFU_BlueMin: Type = 12; - #[doc = " Color Range Alpha Minimum"] - pub const GFU_AlphaMin: Type = 13; - #[doc = " Color Range Red Maximum"] - pub const GFU_RedMax: Type = 14; - #[doc = " Color Range Green Maximum"] - pub const GFU_GreenMax: Type = 15; - #[doc = " Color Range Blue Maximum"] - pub const GFU_BlueMax: Type = 16; - #[doc = " Color Range Alpha Maximum"] - pub const GFU_AlphaMax: Type = 17; - #[doc = " Maximum GFU value (equals to GFU_AlphaMax+1 currently)"] - pub const GFU_MaxCount: Type = 18; +extern "C" { + pub fn OGR_DS_ReleaseResultSet(arg1: OGRDataSourceH, arg2: OGRLayerH); } extern "C" { - pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; + pub fn OGR_DS_Reference(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); + pub fn OGR_DS_Dereference(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; + pub fn OGR_DS_GetRefCount(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALRATGetNameOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> *const libc::c_char; + pub fn OGR_DS_GetSummaryRefCount(arg1: OGRDataSourceH) -> libc::c_int; } extern "C" { - pub fn GDALRATGetUsageOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldUsage::Type; + pub fn OGR_DS_SyncToDisk(arg1: OGRDataSourceH) -> OGRErr::Type; } extern "C" { - pub fn GDALRATGetTypeOfCol( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - ) -> GDALRATFieldType::Type; + pub fn OGR_DS_GetStyleTable(arg1: OGRDataSourceH) -> OGRStyleTableH; } extern "C" { - pub fn GDALRATGetColOfUsage( - arg1: GDALRasterAttributeTableH, - arg2: GDALRATFieldUsage::Type, - ) -> libc::c_int; + pub fn OGR_DS_SetStyleTableDirectly(arg1: OGRDataSourceH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; + pub fn OGR_DS_SetStyleTable(arg1: OGRDataSourceH, arg2: OGRStyleTableH); } extern "C" { - pub fn GDALRATGetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> *const libc::c_char; + pub fn OGR_Dr_GetName(arg1: OGRSFDriverH) -> *const libc::c_char; } extern "C" { - pub fn GDALRATGetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, + pub fn OGR_Dr_Open( + arg1: OGRSFDriverH, + arg2: *const libc::c_char, arg3: libc::c_int, - ) -> libc::c_int; + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALRATGetValueAsDouble( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - ) -> f64; + pub fn OGR_Dr_TestCapability(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> libc::c_int; } extern "C" { - pub fn GDALRATSetValueAsString( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: *const libc::c_char, - ); + pub fn OGR_Dr_CreateDataSource( + arg1: OGRSFDriverH, + arg2: *const libc::c_char, + arg3: *mut *mut libc::c_char, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALRATSetValueAsInt( - arg1: GDALRasterAttributeTableH, - arg2: libc::c_int, - arg3: libc::c_int, - arg4: libc::c_int, - ); + pub fn OGR_Dr_CopyDataSource( + arg1: OGRSFDriverH, + arg2: OGRDataSourceH, + arg3: *const libc::c_char, + arg4: *mut *mut libc::c_char, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALRATSetValueAsDouble( - arg1: GDALRasterAttributeTableH, + pub fn OGR_Dr_DeleteDataSource(arg1: OGRSFDriverH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OGROpen( + arg1: *const libc::c_char, arg2: libc::c_int, - arg3: libc::c_int, - arg4: f64, - ); + arg3: *mut OGRSFDriverH, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; + pub fn OGROpenShared( + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: *mut OGRSFDriverH, + ) -> OGRDataSourceH; } extern "C" { - pub fn GDALRATValuesIOAsDouble( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pdfData: *mut f64, - ) -> CPLErr::Type; + pub fn OGRReleaseDataSource(arg1: OGRDataSourceH) -> OGRErr::Type; } extern "C" { - pub fn GDALRATValuesIOAsInteger( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - pnData: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn OGRRegisterDriver(arg1: OGRSFDriverH); } extern "C" { - pub fn GDALRATValuesIOAsString( - hRAT: GDALRasterAttributeTableH, - eRWFlag: GDALRWFlag::Type, - iField: libc::c_int, - iStartRow: libc::c_int, - iLength: libc::c_int, - papszStrList: CSLConstList, - ) -> CPLErr::Type; + pub fn OGRDeregisterDriver(arg1: OGRSFDriverH); } extern "C" { - pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); + pub fn OGRGetDriverCount() -> libc::c_int; } extern "C" { - pub fn GDALRATCreateColumn( - arg1: GDALRasterAttributeTableH, - arg2: *const libc::c_char, - arg3: GDALRATFieldType::Type, - arg4: GDALRATFieldUsage::Type, - ) -> CPLErr::Type; + pub fn OGRGetDriver(arg1: libc::c_int) -> OGRSFDriverH; } extern "C" { - pub fn GDALRATSetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: f64, - arg3: f64, - ) -> CPLErr::Type; + pub fn OGRGetDriverByName(arg1: *const libc::c_char) -> OGRSFDriverH; } extern "C" { - pub fn GDALRATGetLinearBinning( - arg1: GDALRasterAttributeTableH, - arg2: *mut f64, - arg3: *mut f64, - ) -> libc::c_int; + pub fn OGRGetOpenDSCount() -> libc::c_int; } extern "C" { - pub fn GDALRATInitializeFromColorTable( - arg1: GDALRasterAttributeTableH, - arg2: GDALColorTableH, - ) -> CPLErr::Type; + pub fn OGRGetOpenDS(iDS: libc::c_int) -> OGRDataSourceH; } extern "C" { - pub fn GDALRATTranslateToColorTable( - arg1: GDALRasterAttributeTableH, - nEntryCount: libc::c_int, - ) -> GDALColorTableH; + pub fn OGRRegisterAll(); } extern "C" { - pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); + pub fn OGRCleanupAll(); } +pub type OGRStyleMgrH = *mut libc::c_void; +pub type OGRStyleToolH = *mut libc::c_void; extern "C" { - pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; + pub fn OGR_SM_Create(hStyleTable: OGRStyleTableH) -> OGRStyleMgrH; } extern "C" { - pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; + pub fn OGR_SM_Destroy(hSM: OGRStyleMgrH); } extern "C" { - pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; + pub fn OGR_SM_InitFromFeature(hSM: OGRStyleMgrH, hFeat: OGRFeatureH) -> *const libc::c_char; } extern "C" { - pub fn GDALSetCacheMax(nBytes: libc::c_int); + pub fn OGR_SM_InitStyleString( + hSM: OGRStyleMgrH, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetCacheMax() -> libc::c_int; + pub fn OGR_SM_GetPartCount( + hSM: OGRStyleMgrH, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetCacheUsed() -> libc::c_int; + pub fn OGR_SM_GetPart( + hSM: OGRStyleMgrH, + nPartId: libc::c_int, + pszStyleString: *const libc::c_char, + ) -> OGRStyleToolH; } extern "C" { - pub fn GDALSetCacheMax64(nBytes: GIntBig); + pub fn OGR_SM_AddPart(hSM: OGRStyleMgrH, hST: OGRStyleToolH) -> libc::c_int; } extern "C" { - pub fn GDALGetCacheMax64() -> GIntBig; + pub fn OGR_SM_AddStyle( + hSM: OGRStyleMgrH, + pszStyleName: *const libc::c_char, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALGetCacheUsed64() -> GIntBig; + pub fn OGR_ST_Create(eClassId: OGRSTClassId) -> OGRStyleToolH; } extern "C" { - pub fn GDALFlushCacheBlock() -> libc::c_int; + pub fn OGR_ST_Destroy(hST: OGRStyleToolH); } extern "C" { - pub fn GDALDatasetGetVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nBandSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn OGR_ST_GetType(hST: OGRStyleToolH) -> OGRSTClassId; } extern "C" { - pub fn GDALRasterBandGetVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: GIntBig, - nCacheSize: usize, - nPageSizeHint: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn OGR_ST_GetUnit(hST: OGRStyleToolH) -> OGRSTUnitId; } extern "C" { - pub fn GDALGetVirtualMemAuto( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - pnPixelSpace: *mut libc::c_int, - pnLineSpace: *mut GIntBig, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn OGR_ST_SetUnit(hST: OGRStyleToolH, eUnit: OGRSTUnitId, dfGroundPaperScale: f64); } -pub mod GDALTileOrganization { - #[doc = " Enumeration to describe the tile organization"] - pub type Type = u32; - #[doc = " Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ..."] - pub const GTO_TIP: Type = 0; - #[doc = " Band Interleaved by Tile : tile (0,0) of first band, tile (0,0) of second band, ... tile (1,0) of first band, tile (1,0) of second band, ..."] - pub const GTO_BIT: Type = 1; - #[doc = " Band SeQuential : all the tiles of first band, all the tiles of following band..."] - pub const GTO_BSQ: Type = 2; +extern "C" { + pub fn OGR_ST_GetParamStr( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALDatasetGetTiledVirtualMem( - hDS: GDALDatasetH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nBandCount: libc::c_int, - panBandMap: *mut libc::c_int, - eTileOrganization: GDALTileOrganization::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn OGR_ST_GetParamNum( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> libc::c_int; } extern "C" { - pub fn GDALRasterBandGetTiledVirtualMem( - hBand: GDALRasterBandH, - eRWFlag: GDALRWFlag::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - nTileXSize: libc::c_int, - nTileYSize: libc::c_int, - eBufType: GDALDataType::Type, - nCacheSize: usize, - bSingleThreadUsage: libc::c_int, - papszOptions: CSLConstList, - ) -> *mut CPLVirtualMem; + pub fn OGR_ST_GetParamDbl( + hST: OGRStyleToolH, + eParam: libc::c_int, + bValueIsNull: *mut libc::c_int, + ) -> f64; } extern "C" { - pub fn GDALCreatePansharpenedVRT( - pszXML: *const libc::c_char, - hPanchroBand: GDALRasterBandH, - nInputSpectralBands: libc::c_int, - pahInputSpectralBands: *mut GDALRasterBandH, - ) -> GDALDatasetH; + pub fn OGR_ST_SetParamStr( + hST: OGRStyleToolH, + eParam: libc::c_int, + pszValue: *const libc::c_char, + ); } extern "C" { - pub fn GDALGetJPEG2000Structure( - pszFilename: *const libc::c_char, - papszOptions: CSLConstList, - ) -> *mut CPLXMLNode; + pub fn OGR_ST_SetParamNum(hST: OGRStyleToolH, eParam: libc::c_int, nValue: libc::c_int); } extern "C" { - pub fn GDALComputeMedianCutPCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - pfnIncludePixel: ::std::option::Option< - unsafe extern "C" fn( - hRed: libc::c_int, - hGreen: libc::c_int, - hBlue: *mut libc::c_void, - ) -> libc::c_int, - >, - nColors: libc::c_int, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; + pub fn OGR_ST_SetParamDbl(hST: OGRStyleToolH, eParam: libc::c_int, dfValue: f64); } extern "C" { - pub fn GDALDitherRGB2PCT( - hRed: GDALRasterBandH, - hGreen: GDALRasterBandH, - hBlue: GDALRasterBandH, - hTarget: GDALRasterBandH, - hColorTable: GDALColorTableH, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> libc::c_int; + pub fn OGR_ST_GetStyleString(hST: OGRStyleToolH) -> *const libc::c_char; } extern "C" { - pub fn GDALChecksumImage( - hBand: GDALRasterBandH, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, + pub fn OGR_ST_GetRGBFromString( + hST: OGRStyleToolH, + pszColor: *const libc::c_char, + pnRed: *mut libc::c_int, + pnGreen: *mut libc::c_int, + pnBlue: *mut libc::c_int, + pnAlpha: *mut libc::c_int, ) -> libc::c_int; } extern "C" { - pub fn GDALComputeProximity( - hSrcBand: GDALRasterBandH, - hProximityBand: GDALRasterBandH, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_STBL_Create() -> OGRStyleTableH; } extern "C" { - pub fn GDALFillNodata( - hTargetBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - dfMaxSearchDist: f64, - bDeprecatedOption: libc::c_int, - nSmoothingIterations: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_STBL_Destroy(hSTBL: OGRStyleTableH); } extern "C" { - pub fn GDALPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_STBL_AddStyle( + hStyleTable: OGRStyleTableH, + pszName: *const libc::c_char, + pszStyleString: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALFPolygonize( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hOutLayer: OGRLayerH, - iPixValField: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_STBL_SaveStyleTable( + hStyleTable: OGRStyleTableH, + pszFilename: *const libc::c_char, + ) -> libc::c_int; } extern "C" { - pub fn GDALSieveFilter( - hSrcBand: GDALRasterBandH, - hMaskBand: GDALRasterBandH, - hDstBand: GDALRasterBandH, - nSizeThreshold: libc::c_int, - nConnectedness: libc::c_int, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn OGR_STBL_LoadStyleTable( + hStyleTable: OGRStyleTableH, + pszFilename: *const libc::c_char, + ) -> libc::c_int; } -pub type GDALTransformerFunc = ::std::option::Option< - unsafe extern "C" fn( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int, ->; extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); + pub fn OGR_STBL_Find( + hStyleTable: OGRStyleTableH, + pszName: *const libc::c_char, + ) -> *const libc::c_char; } extern "C" { - pub fn GDALUseTransformer( - pTransformerArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn OGR_STBL_ResetStyleStringReading(hStyleTable: OGRStyleTableH); } extern "C" { - pub fn GDALCreateSimilarTransformer( - psTransformerArg: *mut libc::c_void, - dfSrcRatioX: f64, - dfSrcRatioY: f64, - ) -> *mut libc::c_void; + pub fn OGR_STBL_GetNextStyle(hStyleTable: OGRStyleTableH) -> *const libc::c_char; } extern "C" { - #[doc = " @endcond"] - pub fn GDALCreateGenImgProjTransformer( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - bGCPUseOK: libc::c_int, - dfGCPErrorThreshold: f64, - nOrder: libc::c_int, - ) -> *mut libc::c_void; + pub fn OGR_STBL_GetLastStyleName(hStyleTable: OGRStyleTableH) -> *const libc::c_char; +} +pub mod GDALDataType { + pub type Type = libc::c_uint; + pub const GDT_Unknown: Type = 0; + pub const GDT_Byte: Type = 1; + pub const GDT_UInt16: Type = 2; + pub const GDT_Int16: Type = 3; + pub const GDT_UInt32: Type = 4; + pub const GDT_Int32: Type = 5; + pub const GDT_Float32: Type = 6; + pub const GDT_Float64: Type = 7; + pub const GDT_CInt16: Type = 8; + pub const GDT_CInt32: Type = 9; + pub const GDT_CFloat32: Type = 10; + pub const GDT_CFloat64: Type = 11; + pub const GDT_TypeCount: Type = 12; } extern "C" { - pub fn GDALCreateGenImgProjTransformer2( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALGetDataTypeSize(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALCreateGenImgProjTransformer3( - pszSrcWKT: *const libc::c_char, - padfSrcGeoTransform: *const f64, - pszDstWKT: *const libc::c_char, - padfDstGeoTransform: *const f64, - ) -> *mut libc::c_void; + pub fn GDALGetDataTypeSizeBits(eDataType: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); + pub fn GDALGetDataTypeSizeBytes(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); + pub fn GDALDataTypeIsComplex(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGenImgProjTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALDataTypeIsInteger(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); + pub fn GDALDataTypeIsFloating(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALGetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *mut f64); + pub fn GDALDataTypeIsSigned(arg1: GDALDataType::Type) -> libc::c_int; } extern "C" { - pub fn GDALCreateReprojectionTransformer( - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - ) -> *mut libc::c_void; + pub fn GDALGetDataTypeName(arg1: GDALDataType::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); + pub fn GDALGetDataTypeByName(arg1: *const libc::c_char) -> GDALDataType::Type; } extern "C" { - pub fn GDALReprojectionTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALDataTypeUnion( + arg1: GDALDataType::Type, + arg2: GDALDataType::Type, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALCreateGCPTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALDataTypeUnionWithValue( + eDT: GDALDataType::Type, + dValue: f64, + bComplex: libc::c_int, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALCreateGCPRefineTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - nReqOrder: libc::c_int, - bReversed: libc::c_int, - tolerance: f64, - minimumGcps: libc::c_int, - ) -> *mut libc::c_void; -} -extern "C" { - pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALFindDataType( + nBits: libc::c_int, + bSigned: libc::c_int, + bFloating: libc::c_int, + bComplex: libc::c_int, + ) -> GDALDataType::Type; } extern "C" { - pub fn GDALGCPTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALFindDataTypeForValue(dValue: f64, bComplex: libc::c_int) -> GDALDataType::Type; } extern "C" { - pub fn GDALCreateTPSTransformer( - nGCPCount: libc::c_int, - pasGCPList: *const GDAL_GCP, - bReversed: libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALAdjustValueToDataType( + eDT: GDALDataType::Type, + dfValue: f64, + pbClamped: *mut libc::c_int, + pbRounded: *mut libc::c_int, + ) -> f64; } extern "C" { - pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALGetNonComplexDataType(arg1: GDALDataType::Type) -> GDALDataType::Type; } extern "C" { - pub fn GDALTPSTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, + pub fn GDALDataTypeIsConversionLossy( + eTypeFrom: GDALDataType::Type, + eTypeTo: GDALDataType::Type, ) -> libc::c_int; } -extern "C" { - #[doc = " @endcond"] - pub fn GDALCreateRPCTransformer( - psRPC: *mut GDALRPCInfo, - bReversed: libc::c_int, - dfPixErrThreshold: f64, - papszOptions: *mut *mut libc::c_char, - ) -> *mut libc::c_void; +pub mod GDALAsyncStatusType { + pub type Type = libc::c_uint; + pub const GARIO_PENDING: Type = 0; + pub const GARIO_UPDATE: Type = 1; + pub const GARIO_ERROR: Type = 2; + pub const GARIO_COMPLETE: Type = 3; + pub const GARIO_TypeCount: Type = 4; } extern "C" { - pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); + pub fn GDALGetAsyncStatusTypeName(arg1: GDALAsyncStatusType::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALRPCTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetAsyncStatusTypeByName(arg1: *const libc::c_char) -> GDALAsyncStatusType::Type; } -extern "C" { - pub fn GDALCreateGeoLocTransformer( - hBaseDS: GDALDatasetH, - papszGeolocationInfo: *mut *mut libc::c_char, - bReversed: libc::c_int, - ) -> *mut libc::c_void; +pub mod GDALAccess { + pub type Type = libc::c_uint; + pub const GA_ReadOnly: Type = 0; + pub const GA_Update: Type = 1; } -extern "C" { - pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); +pub mod GDALRWFlag { + pub type Type = libc::c_uint; + pub const GF_Read: Type = 0; + pub const GF_Write: Type = 1; } -extern "C" { - pub fn GDALGeoLocTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; +pub mod GDALRIOResampleAlg { + pub type Type = libc::c_uint; + pub const GRIORA_NearestNeighbour: Type = 0; + pub const GRIORA_Bilinear: Type = 1; + pub const GRIORA_Cubic: Type = 2; + pub const GRIORA_CubicSpline: Type = 3; + pub const GRIORA_Lanczos: Type = 4; + pub const GRIORA_Average: Type = 5; + pub const GRIORA_Mode: Type = 6; + pub const GRIORA_Gauss: Type = 7; + pub const GRIORA_RESERVED_START: Type = 8; + pub const GRIORA_RESERVED_END: Type = 13; + pub const GRIORA_RMS: Type = 14; + pub const GRIORA_LAST: Type = 14; } -extern "C" { - pub fn GDALCreateApproxTransformer( - pfnRawTransformer: GDALTransformerFunc, - pRawTransformerArg: *mut libc::c_void, - dfMaxError: f64, - ) -> *mut libc::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterIOExtraArg { + pub nVersion: libc::c_int, + pub eResampleAlg: GDALRIOResampleAlg::Type, + pub pfnProgress: GDALProgressFunc, + pub pProgressData: *mut libc::c_void, + pub bFloatingPointWindowValidity: libc::c_int, + pub dfXOff: f64, + pub dfYOff: f64, + pub dfXSize: f64, + pub dfYSize: f64, } -extern "C" { - pub fn GDALApproxTransformerOwnsSubtransformer( - pCBData: *mut libc::c_void, - bOwnFlag: libc::c_int, +#[test] +fn bindgen_test_layout_GDALRasterIOExtraArg() { + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(GDALRasterIOExtraArg)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALRasterIOExtraArg)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nVersion as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(nVersion) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(eResampleAlg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnProgress as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(pfnProgress) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pProgressData as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(pProgressData) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).bFloatingPointWindowValidity + as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(bFloatingPointWindowValidity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfXOff as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfXOff) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfYOff as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfYOff) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfXSize as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfXSize) + ) ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfYSize as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALRasterIOExtraArg), + "::", + stringify!(dfYSize) + ) + ); +} +pub mod GDALColorInterp { + pub type Type = libc::c_uint; + pub const GCI_Undefined: Type = 0; + pub const GCI_GrayIndex: Type = 1; + pub const GCI_PaletteIndex: Type = 2; + pub const GCI_RedBand: Type = 3; + pub const GCI_GreenBand: Type = 4; + pub const GCI_BlueBand: Type = 5; + pub const GCI_AlphaBand: Type = 6; + pub const GCI_HueBand: Type = 7; + pub const GCI_SaturationBand: Type = 8; + pub const GCI_LightnessBand: Type = 9; + pub const GCI_CyanBand: Type = 10; + pub const GCI_MagentaBand: Type = 11; + pub const GCI_YellowBand: Type = 12; + pub const GCI_BlackBand: Type = 13; + pub const GCI_YCbCr_YBand: Type = 14; + pub const GCI_YCbCr_CbBand: Type = 15; + pub const GCI_YCbCr_CrBand: Type = 16; + pub const GCI_Max: Type = 16; } extern "C" { - pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); + pub fn GDALGetColorInterpretationName(arg1: GDALColorInterp::Type) -> *const libc::c_char; } extern "C" { - pub fn GDALApproxTransform( - pTransformArg: *mut libc::c_void, - bDstToSrc: libc::c_int, - nPointCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - panSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALGetColorInterpretationByName(pszName: *const libc::c_char) -> GDALColorInterp::Type; +} +pub mod GDALPaletteInterp { + pub type Type = libc::c_uint; + pub const GPI_Gray: Type = 0; + pub const GPI_RGB: Type = 1; + pub const GPI_CMYK: Type = 2; + pub const GPI_HLS: Type = 3; } extern "C" { - pub fn GDALSimpleImageWarp( - hSrcDS: GDALDatasetH, - hDstDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - pfnTransform: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszWarpOptions: *mut *mut libc::c_char, - ) -> libc::c_int; + pub fn GDALGetPaletteInterpretationName(arg1: GDALPaletteInterp::Type) -> *const libc::c_char; +} +pub type GDALMajorObjectH = *mut libc::c_void; +pub type GDALDatasetH = *mut libc::c_void; +pub type GDALRasterBandH = *mut libc::c_void; +pub type GDALDriverH = *mut libc::c_void; +pub type GDALColorTableH = *mut libc::c_void; +pub type GDALRasterAttributeTableH = *mut libc::c_void; +pub type GDALAsyncReaderH = *mut libc::c_void; +pub type GSpacing = GIntBig; +pub mod GDALExtendedDataTypeClass { + pub type Type = libc::c_uint; + pub const GEDTC_NUMERIC: Type = 0; + pub const GEDTC_STRING: Type = 1; + pub const GEDTC_COMPOUND: Type = 2; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALExtendedDataTypeHS { + _unused: [u8; 0], +} +pub type GDALExtendedDataTypeH = *mut GDALExtendedDataTypeHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALEDTComponentHS { + _unused: [u8; 0], +} +pub type GDALEDTComponentH = *mut GDALEDTComponentHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGroupHS { + _unused: [u8; 0], +} +pub type GDALGroupH = *mut GDALGroupHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMDArrayHS { + _unused: [u8; 0], +} +pub type GDALMDArrayH = *mut GDALMDArrayHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALAttributeHS { + _unused: [u8; 0], +} +pub type GDALAttributeH = *mut GDALAttributeHS; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDimensionHS { + _unused: [u8; 0], } +pub type GDALDimensionH = *mut GDALDimensionHS; extern "C" { - pub fn GDALSuggestedWarpOutput( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn GDALAllRegister(); } extern "C" { - pub fn GDALSuggestedWarpOutput2( - hSrcDS: GDALDatasetH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeoTransformOut: *mut f64, - pnPixels: *mut libc::c_int, - pnLines: *mut libc::c_int, - padfExtents: *mut f64, - nOptions: libc::c_int, - ) -> CPLErr::Type; + pub fn GDALCreate( + hDriver: GDALDriverH, + arg1: *const libc::c_char, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: GDALDataType::Type, + arg6: CSLConstList, + ) -> GDALDatasetH; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALSerializeTransformer( - pfnFunc: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - ) -> *mut CPLXMLNode; + pub fn GDALCreateCopy( + arg1: GDALDriverH, + arg2: *const libc::c_char, + arg3: GDALDatasetH, + arg4: libc::c_int, + arg5: CSLConstList, + arg6: GDALProgressFunc, + arg7: *mut libc::c_void, + ) -> GDALDatasetH; } extern "C" { - pub fn GDALDeserializeTransformer( - psTree: *mut CPLXMLNode, - ppfnFunc: *mut GDALTransformerFunc, - ppTransformArg: *mut *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALIdentifyDriver( + pszFilename: *const libc::c_char, + papszFileList: CSLConstList, + ) -> GDALDriverH; } extern "C" { - #[doc = " @endcond"] - pub fn GDALTransformGeolocations( - hXBand: GDALRasterBandH, - hYBand: GDALRasterBandH, - hZBand: GDALRasterBandH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - papszOptions: *mut *mut libc::c_char, - ) -> CPLErr::Type; + pub fn GDALIdentifyDriverEx( + pszFilename: *const libc::c_char, + nIdentifyFlags: libc::c_uint, + papszAllowedDrivers: *const *const libc::c_char, + papszFileList: *const *const libc::c_char, + ) -> GDALDriverH; } -#[doc = " Contour writer callback type"] -pub type GDALContourWriter = ::std::option::Option< - unsafe extern "C" fn( - dfLevel: f64, - nPoints: libc::c_int, - padfX: *mut f64, - padfY: *mut f64, - arg1: *mut libc::c_void, - ) -> CPLErr::Type, ->; -#[doc = " Contour generator opaque type"] -pub type GDALContourGeneratorH = *mut libc::c_void; extern "C" { - pub fn GDAL_CG_Create( - nWidth: libc::c_int, - nHeight: libc::c_int, - bNoDataSet: libc::c_int, - dfNoDataValue: f64, - dfContourInterval: f64, - dfContourBase: f64, - pfnWriter: GDALContourWriter, - pCBData: *mut libc::c_void, - ) -> GDALContourGeneratorH; + pub fn GDALOpen(pszFilename: *const libc::c_char, eAccess: GDALAccess::Type) -> GDALDatasetH; } extern "C" { - pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; + pub fn GDALOpenShared(arg1: *const libc::c_char, arg2: GDALAccess::Type) -> GDALDatasetH; } extern "C" { - pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); + pub fn GDALOpenEx( + pszFilename: *const libc::c_char, + nOpenFlags: libc::c_uint, + papszAllowedDrivers: *const *const libc::c_char, + papszOpenOptions: *const *const libc::c_char, + papszSiblingFiles: *const *const libc::c_char, + ) -> GDALDatasetH; } extern "C" { - pub fn OGRContourWriter( - arg1: f64, - arg2: libc::c_int, - arg3: *mut f64, - arg4: *mut f64, - pInfo: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALDumpOpenDatasets(arg1: *mut FILE) -> libc::c_int; } extern "C" { - #[doc = " @endcond"] - pub fn GDALContourGenerate( - hBand: GDALRasterBandH, - dfContourInterval: f64, - dfContourBase: f64, - nFixedLevelCount: libc::c_int, - padfFixedLevels: *mut f64, - bUseNoData: libc::c_int, - dfNoDataValue: f64, - hLayer: *mut libc::c_void, - iIDField: libc::c_int, - iElevField: libc::c_int, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetDriverByName(arg1: *const libc::c_char) -> GDALDriverH; } extern "C" { - pub fn GDALRasterizeGeometries( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nGeomCount: libc::c_int, - pahGeometries: *mut OGRGeometryH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfGeomBurnValue: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetDriverCount() -> libc::c_int; } extern "C" { - pub fn GDALRasterizeLayers( - hDS: GDALDatasetH, - nBandCount: libc::c_int, - panBandList: *mut libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - padfLayerBurnValues: *mut f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALGetDriver(arg1: libc::c_int) -> GDALDriverH; } extern "C" { - pub fn GDALRasterizeLayersBuf( - pData: *mut libc::c_void, - nBufXSize: libc::c_int, - nBufYSize: libc::c_int, - eBufType: GDALDataType::Type, - nPixelSpace: libc::c_int, - nLineSpace: libc::c_int, - nLayerCount: libc::c_int, - pahLayers: *mut OGRLayerH, - pszDstProjection: *const libc::c_char, - padfDstGeoTransform: *mut f64, - pfnTransformer: GDALTransformerFunc, - pTransformArg: *mut libc::c_void, - dfBurnValue: f64, - papszOptions: *mut *mut libc::c_char, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALCreateDriver() -> GDALDriverH; } -pub mod GDALGridAlgorithm { - #[doc = " Gridding Algorithms"] - pub type Type = u32; - #[doc = " Inverse distance to a power"] - pub const GGA_InverseDistanceToAPower: Type = 1; - #[doc = " Moving Average"] - pub const GGA_MovingAverage: Type = 2; - #[doc = " Nearest Neighbor"] - pub const GGA_NearestNeighbor: Type = 3; - #[doc = " Minimum Value (Data Metric)"] - pub const GGA_MetricMinimum: Type = 4; - #[doc = " Maximum Value (Data Metric)"] - pub const GGA_MetricMaximum: Type = 5; - #[doc = " Data Range (Data Metric)"] - pub const GGA_MetricRange: Type = 6; - #[doc = " Number of Points (Data Metric)"] - pub const GGA_MetricCount: Type = 7; - #[doc = " Average Distance (Data Metric)"] - pub const GGA_MetricAverageDistance: Type = 8; - #[doc = " Average Distance Between Data Points (Data Metric)"] - pub const GGA_MetricAverageDistancePts: Type = 9; - #[doc = " Linear interpolation (from Delaunay triangulation. Since GDAL 2.1"] - pub const GGA_Linear: Type = 10; - #[doc = " Inverse distance to a power with nearest neighbor search for max points"] - pub const GGA_InverseDistanceToAPowerNearestNeighbor: Type = 11; +extern "C" { + pub fn GDALDestroyDriver(arg1: GDALDriverH); } extern "C" { - pub fn GDALGridCreate( - arg1: GDALGridAlgorithm::Type, - arg2: *const libc::c_void, - arg3: GUInt32, - arg4: *const f64, - arg5: *const f64, - arg6: *const f64, - arg7: f64, - arg8: f64, - arg9: f64, - arg10: f64, - arg11: GUInt32, - arg12: GUInt32, - arg13: GDALDataType::Type, - arg14: *mut libc::c_void, - arg15: GDALProgressFunc, - arg16: *mut libc::c_void, - ) -> CPLErr::Type; + pub fn GDALRegisterDriver(arg1: GDALDriverH) -> libc::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALGridContext { - _unused: [u8; 0], +extern "C" { + pub fn GDALDeregisterDriver(arg1: GDALDriverH); } extern "C" { - pub fn GDALGridContextCreate( - eAlgorithm: GDALGridAlgorithm::Type, - poOptions: *const libc::c_void, - nPoints: GUInt32, - padfX: *const f64, - padfY: *const f64, - padfZ: *const f64, - bCallerWillKeepPointArraysAlive: libc::c_int, - ) -> *mut GDALGridContext; + pub fn GDALDestroyDriverManager(); } extern "C" { - pub fn GDALGridContextFree(psContext: *mut GDALGridContext); + pub fn GDALDestroy(); } extern "C" { - pub fn GDALGridContextProcess( - psContext: *mut GDALGridContext, - dfXMin: f64, - dfXMax: f64, - dfYMin: f64, - dfYMax: f64, - nXSize: GUInt32, - nYSize: GUInt32, - eType: GDALDataType::Type, - pData: *mut libc::c_void, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, + pub fn GDALDeleteDataset(arg1: GDALDriverH, arg2: *const libc::c_char) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRenameDataset( + arg1: GDALDriverH, + pszNewName: *const libc::c_char, + pszOldName: *const libc::c_char, ) -> CPLErr::Type; } extern "C" { - pub fn GDALComputeMatchingPoints( - hFirstImage: GDALDatasetH, - hSecondImage: GDALDatasetH, - papszOptions: *mut *mut libc::c_char, - pnGCPCount: *mut libc::c_int, - ) -> *mut GDAL_GCP; + pub fn GDALCopyDatasetFiles( + arg1: GDALDriverH, + pszNewName: *const libc::c_char, + pszOldName: *const libc::c_char, + ) -> CPLErr::Type; } -#[doc = " Triangle fact"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriFacet { - #[doc = "< index to the padfX/padfY arrays"] - pub anVertexIdx: [libc::c_int; 3usize], - #[doc = "< index to GDALDelaunayTriangulation.pasFacets, or -1"] - pub anNeighborIdx: [libc::c_int; 3usize], +extern "C" { + pub fn GDALValidateCreationOptions( + arg1: GDALDriverH, + papszCreationOptions: CSLConstList, + ) -> libc::c_int; } -#[test] -fn bindgen_test_layout_GDALTriFacet() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriFacet)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(GDALTriFacet)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).anVertexIdx as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriFacet), - "::", - stringify!(anVertexIdx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).anNeighborIdx as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(GDALTriFacet), - "::", - stringify!(anNeighborIdx) - ) - ); +extern "C" { + pub fn GDALGetDriverShortName(arg1: GDALDriverH) -> *const libc::c_char; +} +extern "C" { + pub fn GDALGetDriverLongName(arg1: GDALDriverH) -> *const libc::c_char; +} +extern "C" { + pub fn GDALGetDriverHelpTopic(arg1: GDALDriverH) -> *const libc::c_char; +} +extern "C" { + pub fn GDALGetDriverCreationOptionList(arg1: GDALDriverH) -> *const libc::c_char; } -#[doc = " Triangle barycentric coefficients."] -#[doc = ""] -#[doc = " Conversion from cartesian (x,y) to barycentric (l1,l2,l3) with :"] -#[doc = " l1 = dfMul1X * (x - dfCxtX) + dfMul1Y * (y - dfCstY)"] -#[doc = " l2 = dfMul2X * (x - dfCxtX) + dfMul2Y * (y - dfCstY)"] -#[doc = " l3 = 1 - l1 - l2"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct GDALTriBarycentricCoefficients { - #[doc = "< dfMul1X"] - pub dfMul1X: f64, - #[doc = "< dfMul1Y"] - pub dfMul1Y: f64, - #[doc = "< dfMul2X"] - pub dfMul2X: f64, - #[doc = "< dfMul2Y"] - pub dfMul2Y: f64, - #[doc = "< dfCstX"] - pub dfCstX: f64, - #[doc = "< dfCstY"] - pub dfCstY: f64, +pub struct GDAL_GCP { + pub pszId: *mut libc::c_char, + pub pszInfo: *mut libc::c_char, + pub dfGCPPixel: f64, + pub dfGCPLine: f64, + pub dfGCPX: f64, + pub dfGCPY: f64, + pub dfGCPZ: f64, } #[test] -fn bindgen_test_layout_GDALTriBarycentricCoefficients() { +fn bindgen_test_layout_GDAL_GCP() { assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(GDALTriBarycentricCoefficients)) + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(GDAL_GCP)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(GDALTriBarycentricCoefficients)) + concat!("Alignment of ", stringify!(GDAL_GCP)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1X as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).pszId as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDAL_GCP), "::", - stringify!(dfMul1X) + stringify!(pszId) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul1Y as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).pszInfo as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDAL_GCP), "::", - stringify!(dfMul1Y) + stringify!(pszInfo) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2X as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).dfGCPPixel as *const _ as usize }, 16usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDAL_GCP), "::", - stringify!(dfMul2X) + stringify!(dfGCPPixel) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfMul2Y as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).dfGCPLine as *const _ as usize }, 24usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDAL_GCP), "::", - stringify!(dfMul2Y) + stringify!(dfGCPLine) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstX as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).dfGCPX as *const _ as usize }, 32usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), + stringify!(GDAL_GCP), "::", - stringify!(dfCstX) + stringify!(dfGCPX) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCstY as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).dfGCPY as *const _ as usize }, 40usize, concat!( "Offset of field: ", - stringify!(GDALTriBarycentricCoefficients), - "::", - stringify!(dfCstY) - ) - ); -} -#[doc = " Triangulation structure"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALTriangulation { - #[doc = "< number of facets"] - pub nFacets: libc::c_int, - #[doc = "< array of nFacets facets"] - pub pasFacets: *mut GDALTriFacet, - #[doc = "< arra of nFacets barycentric coefficients"] - pub pasFacetCoefficients: *mut GDALTriBarycentricCoefficients, -} -#[test] -fn bindgen_test_layout_GDALTriangulation() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(GDALTriangulation)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALTriangulation)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nFacets as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), - "::", - stringify!(nFacets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pasFacets as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALTriangulation), + stringify!(GDAL_GCP), "::", - stringify!(pasFacets) + stringify!(dfGCPY) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pasFacetCoefficients as *const _ as usize - }, - 16usize, + unsafe { &(*(::std::ptr::null::())).dfGCPZ as *const _ as usize }, + 48usize, concat!( "Offset of field: ", - stringify!(GDALTriangulation), + stringify!(GDAL_GCP), "::", - stringify!(pasFacetCoefficients) + stringify!(dfGCPZ) ) ); } extern "C" { - pub fn GDALHasTriangulation() -> libc::c_int; + pub fn GDALInitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); } extern "C" { - pub fn GDALTriangulationCreateDelaunay( - nPoints: libc::c_int, - padfX: *const f64, - padfY: *const f64, - ) -> *mut GDALTriangulation; + pub fn GDALDeinitGCPs(arg1: libc::c_int, arg2: *mut GDAL_GCP); } extern "C" { - pub fn GDALTriangulationComputeBarycentricCoefficients( - psDT: *mut GDALTriangulation, - padfX: *const f64, - padfY: *const f64, + pub fn GDALDuplicateGCPs(arg1: libc::c_int, arg2: *const GDAL_GCP) -> *mut GDAL_GCP; +} +extern "C" { + pub fn GDALGCPsToGeoTransform( + nGCPCount: libc::c_int, + pasGCPs: *const GDAL_GCP, + padfGeoTransform: *mut f64, + bApproxOK: libc::c_int, ) -> libc::c_int; } extern "C" { - pub fn GDALTriangulationComputeBarycentricCoordinates( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - pdfL1: *mut f64, - pdfL2: *mut f64, - pdfL3: *mut f64, + pub fn GDALInvGeoTransform( + padfGeoTransformIn: *mut f64, + padfInvGeoTransformOut: *mut f64, ) -> libc::c_int; } extern "C" { - pub fn GDALTriangulationFindFacetBruteForce( - psDT: *const GDALTriangulation, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALApplyGeoTransform( + arg1: *mut f64, + arg2: f64, + arg3: f64, + arg4: *mut f64, + arg5: *mut f64, + ); } extern "C" { - pub fn GDALTriangulationFindFacetDirected( - psDT: *const GDALTriangulation, - nFacetIdx: libc::c_int, - dfX: f64, - dfY: f64, - panOutputFacetIdx: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALComposeGeoTransforms( + padfGeoTransform1: *const f64, + padfGeoTransform2: *const f64, + padfGeoTransformOut: *mut f64, + ); } extern "C" { - pub fn GDALTriangulationFree(psDT: *mut GDALTriangulation); + pub fn GDALGetMetadataDomainList(hObject: GDALMajorObjectH) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALTriangulationTerminate(); + pub fn GDALGetMetadata( + arg1: GDALMajorObjectH, + arg2: *const libc::c_char, + ) -> *mut *mut libc::c_char; } extern "C" { - #[doc = " @endcond"] - pub fn GDALOpenVerticalShiftGrid( - pszProj4Geoidgrids: *const libc::c_char, - pbError: *mut libc::c_int, - ) -> GDALDatasetH; + pub fn GDALSetMetadata( + arg1: GDALMajorObjectH, + arg2: CSLConstList, + arg3: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn GDALApplyVerticalShiftGrid( - hSrcDataset: GDALDatasetH, - hGridDataset: GDALDatasetH, - bInverse: libc::c_int, - dfSrcUnitToMeter: f64, - dfDstUnitToMeter: f64, - papszOptions: *const *const libc::c_char, - ) -> GDALDatasetH; + pub fn GDALGetMetadataItem( + arg1: GDALMajorObjectH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + ) -> *const libc::c_char; } -pub type CPLThreadFunc = ::std::option::Option; extern "C" { - pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; + pub fn GDALSetMetadataItem( + arg1: GDALMajorObjectH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLUnlockFile(hLock: *mut libc::c_void); + pub fn GDALGetDescription(arg1: GDALMajorObjectH) -> *const libc::c_char; } extern "C" { - pub fn CPLCreateMutex() -> *mut libc::c_void; + pub fn GDALSetDescription(arg1: GDALMajorObjectH, arg2: *const libc::c_char); } extern "C" { - pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; + pub fn GDALGetDatasetDriver(arg1: GDALDatasetH) -> GDALDriverH; } extern "C" { - pub fn CPLCreateOrAcquireMutex( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - ) -> libc::c_int; + pub fn GDALGetFileList(arg1: GDALDatasetH) -> *mut *mut libc::c_char; } extern "C" { - pub fn CPLCreateOrAcquireMutexEx( - arg1: *mut *mut libc::c_void, - dfWaitInSeconds: f64, - nOptions: libc::c_int, - ) -> libc::c_int; + pub fn GDALClose(arg1: GDALDatasetH); } extern "C" { - pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; + pub fn GDALGetRasterXSize(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); + pub fn GDALGetRasterYSize(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); + pub fn GDALGetRasterCount(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn CPLCleanupMasterMutex(); + pub fn GDALGetRasterBand(arg1: GDALDatasetH, arg2: libc::c_int) -> GDALRasterBandH; } extern "C" { - pub fn CPLCreateCond() -> *mut libc::c_void; + pub fn GDALAddBand( + hDS: GDALDatasetH, + eType: GDALDataType::Type, + papszOptions: CSLConstList, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); + pub fn GDALBeginAsyncReader( + hDS: GDALDatasetH, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + pBuf: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nBandSpace: libc::c_int, + papszOptions: CSLConstList, + ) -> GDALAsyncReaderH; } extern "C" { - pub fn CPLCondSignal(hCond: *mut libc::c_void); + pub fn GDALEndAsyncReader(hDS: GDALDatasetH, hAsynchReaderH: GDALAsyncReaderH); } extern "C" { - pub fn CPLCondBroadcast(hCond: *mut libc::c_void); + pub fn GDALDatasetRasterIO( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nBandSpace: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLDestroyCond(hCond: *mut libc::c_void); + pub fn GDALDatasetRasterIOEx( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + nPixelSpace: GSpacing, + nLineSpace: GSpacing, + nBandSpace: GSpacing, + psExtraArg: *mut GDALRasterIOExtraArg, + ) -> CPLErr::Type; } extern "C" { - #[doc = " Contrary to what its name suggests, CPLGetPID() actually returns the thread id"] - pub fn CPLGetPID() -> GIntBig; + pub fn GDALDatasetAdviseRead( + hDS: GDALDatasetH, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandCount: *mut libc::c_int, + papszOptions: CSLConstList, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLGetCurrentProcessID() -> libc::c_int; + pub fn GDALGetProjectionRef(arg1: GDALDatasetH) -> *const libc::c_char; } extern "C" { - pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; + pub fn GDALGetSpatialRef(arg1: GDALDatasetH) -> OGRSpatialReferenceH; } extern "C" { - pub fn CPLCreateJoinableThread( - pfnMain: CPLThreadFunc, - pArg: *mut libc::c_void, - ) -> *mut libc::c_void; + pub fn GDALSetProjection(arg1: GDALDatasetH, arg2: *const libc::c_char) -> CPLErr::Type; } extern "C" { - pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); + pub fn GDALSetSpatialRef(arg1: GDALDatasetH, arg2: OGRSpatialReferenceH) -> CPLErr::Type; } extern "C" { - pub fn CPLSleep(dfWaitInSeconds: f64); + pub fn GDALGetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; } extern "C" { - pub fn CPLGetThreadingModel() -> *const libc::c_char; + pub fn GDALSetGeoTransform(arg1: GDALDatasetH, arg2: *mut f64) -> CPLErr::Type; } extern "C" { - pub fn CPLGetNumCPUs() -> libc::c_int; + pub fn GDALGetGCPCount(arg1: GDALDatasetH) -> libc::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _CPLLock { - _unused: [u8; 0], +extern "C" { + pub fn GDALGetGCPProjection(arg1: GDALDatasetH) -> *const libc::c_char; } -pub type CPLLock = _CPLLock; -pub mod CPLLockType { - pub type Type = u32; - pub const LOCK_RECURSIVE_MUTEX: Type = 0; - pub const LOCK_ADAPTIVE_MUTEX: Type = 1; - pub const LOCK_SPIN: Type = 2; +extern "C" { + pub fn GDALGetGCPSpatialRef(arg1: GDALDatasetH) -> OGRSpatialReferenceH; } extern "C" { - pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; + pub fn GDALGetGCPs(arg1: GDALDatasetH) -> *const GDAL_GCP; } extern "C" { - pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) - -> libc::c_int; + pub fn GDALSetGCPs( + arg1: GDALDatasetH, + arg2: libc::c_int, + arg3: *const GDAL_GCP, + arg4: *const libc::c_char, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; + pub fn GDALSetGCPs2( + arg1: GDALDatasetH, + arg2: libc::c_int, + arg3: *const GDAL_GCP, + arg4: OGRSpatialReferenceH, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLReleaseLock(arg1: *mut CPLLock); + pub fn GDALGetInternalHandle( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + ) -> *mut libc::c_void; } extern "C" { - pub fn CPLDestroyLock(arg1: *mut CPLLock); + pub fn GDALReferenceDataset(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); + pub fn GDALDereferenceDataset(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; + pub fn GDALReleaseDataset(arg1: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn CPLGetTLSEx( - nIndex: libc::c_int, - pbMemoryErrorOccurred: *mut libc::c_int, - ) -> *mut libc::c_void; + pub fn GDALBuildOverviews( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + arg3: libc::c_int, + arg4: *mut libc::c_int, + arg5: libc::c_int, + arg6: *mut libc::c_int, + arg7: GDALProgressFunc, + arg8: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); + pub fn GDALGetOpenDatasets(hDS: *mut *mut GDALDatasetH, pnCount: *mut libc::c_int); } -pub type CPLTLSFreeFunc = ::std::option::Option; extern "C" { - pub fn CPLSetTLSWithFreeFunc( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - ); + pub fn GDALGetAccess(hDS: GDALDatasetH) -> libc::c_int; } extern "C" { - pub fn CPLSetTLSWithFreeFuncEx( - nIndex: libc::c_int, - pData: *mut libc::c_void, - pfnFree: CPLTLSFreeFunc, - pbMemoryErrorOccurred: *mut libc::c_int, - ); + pub fn GDALFlushCache(hDS: GDALDatasetH); } extern "C" { - pub fn CPLCleanupTLS(); + pub fn GDALCreateDatasetMaskBand(hDS: GDALDatasetH, nFlags: libc::c_int) -> CPLErr::Type; } -pub mod GDALResampleAlg { - #[doc = " Warp Resampling Algorithm"] - pub type Type = u32; - #[doc = " Nearest neighbour (select on one input pixel)"] - pub const GRA_NearestNeighbour: Type = 0; - #[doc = " Bilinear (2x2 kernel)"] - pub const GRA_Bilinear: Type = 1; - #[doc = " Cubic Convolution Approximation (4x4 kernel)"] - pub const GRA_Cubic: Type = 2; - #[doc = " Cubic B-Spline Approximation (4x4 kernel)"] - pub const GRA_CubicSpline: Type = 3; - #[doc = " Lanczos windowed sinc interpolation (6x6 kernel)"] - pub const GRA_Lanczos: Type = 4; - #[doc = " Average (computes the average of all non-NODATA contributing pixels)"] - pub const GRA_Average: Type = 5; - #[doc = " Mode (selects the value which appears most often of all the sampled points)"] - pub const GRA_Mode: Type = 6; - #[doc = " Max (selects maximum of all non-NODATA contributing pixels)"] - pub const GRA_Max: Type = 8; - #[doc = " Min (selects minimum of all non-NODATA contributing pixels)"] - pub const GRA_Min: Type = 9; - #[doc = " Med (selects median of all non-NODATA contributing pixels)"] - pub const GRA_Med: Type = 10; - #[doc = " Q1 (selects first quartile of all non-NODATA contributing pixels)"] - pub const GRA_Q1: Type = 11; - #[doc = " Q3 (selects third quartile of all non-NODATA contributing pixels)"] - pub const GRA_Q3: Type = 12; +extern "C" { + pub fn GDALDatasetCopyWholeRaster( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + papszOptions: CSLConstList, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } -#[doc = " @cond Doxygen_Suppress"] -pub type GDALMaskFunc = ::std::option::Option< +extern "C" { + pub fn GDALRasterBandCopyWholeRaster( + hSrcBand: GDALRasterBandH, + hDstBand: GDALRasterBandH, + constpapszOptions: *const *const libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRegenerateOverviews( + hSrcBand: GDALRasterBandH, + nOverviewCount: libc::c_int, + pahOverviewBands: *mut GDALRasterBandH, + pszResampling: *const libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALDatasetGetLayerCount(arg1: GDALDatasetH) -> libc::c_int; +} +extern "C" { + pub fn GDALDatasetGetLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRLayerH; +} +extern "C" { + pub fn GDALDatasetGetLayerByName(arg1: GDALDatasetH, arg2: *const libc::c_char) -> OGRLayerH; +} +extern "C" { + pub fn GDALDatasetDeleteLayer(arg1: GDALDatasetH, arg2: libc::c_int) -> OGRErr::Type; +} +extern "C" { + pub fn GDALDatasetCreateLayer( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + arg3: OGRSpatialReferenceH, + arg4: OGRwkbGeometryType::Type, + arg5: CSLConstList, + ) -> OGRLayerH; +} +extern "C" { + pub fn GDALDatasetCopyLayer( + arg1: GDALDatasetH, + arg2: OGRLayerH, + arg3: *const libc::c_char, + arg4: CSLConstList, + ) -> OGRLayerH; +} +extern "C" { + pub fn GDALDatasetResetReading(arg1: GDALDatasetH); +} +extern "C" { + pub fn GDALDatasetGetNextFeature( + hDS: GDALDatasetH, + phBelongingLayer: *mut OGRLayerH, + pdfProgressPct: *mut f64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> OGRFeatureH; +} +extern "C" { + pub fn GDALDatasetTestCapability(arg1: GDALDatasetH, arg2: *const libc::c_char) -> libc::c_int; +} +extern "C" { + pub fn GDALDatasetExecuteSQL( + arg1: GDALDatasetH, + arg2: *const libc::c_char, + arg3: OGRGeometryH, + arg4: *const libc::c_char, + ) -> OGRLayerH; +} +extern "C" { + pub fn GDALDatasetAbortSQL(arg1: GDALDatasetH) -> OGRErr::Type; +} +extern "C" { + pub fn GDALDatasetReleaseResultSet(arg1: GDALDatasetH, arg2: OGRLayerH); +} +extern "C" { + pub fn GDALDatasetGetStyleTable(arg1: GDALDatasetH) -> OGRStyleTableH; +} +extern "C" { + pub fn GDALDatasetSetStyleTableDirectly(arg1: GDALDatasetH, arg2: OGRStyleTableH); +} +extern "C" { + pub fn GDALDatasetSetStyleTable(arg1: GDALDatasetH, arg2: OGRStyleTableH); +} +extern "C" { + pub fn GDALDatasetStartTransaction(hDS: GDALDatasetH, bForce: libc::c_int) -> OGRErr::Type; +} +extern "C" { + pub fn GDALDatasetCommitTransaction(hDS: GDALDatasetH) -> OGRErr::Type; +} +extern "C" { + pub fn GDALDatasetRollbackTransaction(hDS: GDALDatasetH) -> OGRErr::Type; +} +extern "C" { + pub fn GDALDatasetClearStatistics(hDS: GDALDatasetH); +} +extern "C" { + pub fn GDALDatasetGetFieldDomain( + hDS: GDALDatasetH, + pszName: *const libc::c_char, + ) -> OGRFieldDomainH; +} +extern "C" { + pub fn GDALDatasetAddFieldDomain( + hDS: GDALDatasetH, + hFieldDomain: OGRFieldDomainH, + ppszFailureReason: *mut *mut libc::c_char, + ) -> bool; +} +pub type GDALDerivedPixelFunc = ::std::option::Option< unsafe extern "C" fn( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pMask: *mut libc::c_void, - ) -> libc::c_int, + papoSources: *mut *mut libc::c_void, + nSources: libc::c_int, + pData: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eSrcType: GDALDataType::Type, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + ) -> CPLErr::Type, >; extern "C" { - pub fn GDALWarpNoDataMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - papabyImageData: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllValid: *mut libc::c_int, - ) -> CPLErr::Type; + pub fn GDALGetRasterDataType(arg1: GDALRasterBandH) -> GDALDataType::Type; } extern "C" { - pub fn GDALWarpDstAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, + pub fn GDALGetBlockSize( + arg1: GDALRasterBandH, + pnXSize: *mut libc::c_int, + pnYSize: *mut libc::c_int, + ); +} +extern "C" { + pub fn GDALGetActualBlockSize( + arg1: GDALRasterBandH, + nXBlockOff: libc::c_int, + nYBlockOff: libc::c_int, + pnXValid: *mut libc::c_int, + pnYValid: *mut libc::c_int, ) -> CPLErr::Type; } extern "C" { - pub fn GDALWarpSrcAlphaMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, - pbOutAllOpaque: *mut libc::c_int, + pub fn GDALRasterAdviseRead( + hRB: GDALRasterBandH, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + papszOptions: CSLConstList, ) -> CPLErr::Type; } extern "C" { - pub fn GDALWarpSrcMaskMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, + pub fn GDALRasterIO( + hRBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, ) -> CPLErr::Type; } extern "C" { - pub fn GDALWarpCutlineMasker( - pMaskFuncArg: *mut libc::c_void, - nBandCount: libc::c_int, - eType: GDALDataType::Type, - nXOff: libc::c_int, - nYOff: libc::c_int, - nXSize: libc::c_int, - nYSize: libc::c_int, - arg1: *mut *mut GByte, - bMaskIsFloat: libc::c_int, - pValidityMask: *mut libc::c_void, + pub fn GDALRasterIOEx( + hRBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + nDSXOff: libc::c_int, + nDSYOff: libc::c_int, + nDSXSize: libc::c_int, + nDSYSize: libc::c_int, + pBuffer: *mut libc::c_void, + nBXSize: libc::c_int, + nBYSize: libc::c_int, + eBDataType: GDALDataType::Type, + nPixelSpace: GSpacing, + nLineSpace: GSpacing, + psExtraArg: *mut GDALRasterIOExtraArg, ) -> CPLErr::Type; } -#[doc = " Warp control options for use with GDALWarpOperation::Initialize()"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GDALWarpOptions { - pub papszWarpOptions: *mut *mut libc::c_char, - #[doc = " In bytes, 0.0 for internal default"] - pub dfWarpMemoryLimit: f64, - #[doc = " Resampling algorithm to use"] - pub eResampleAlg: GDALResampleAlg::Type, - #[doc = " data type to use during warp operation, GDT_Unknown lets the algorithm"] - #[doc = "select the type"] - pub eWorkingDataType: GDALDataType::Type, - #[doc = " Source image dataset."] - pub hSrcDS: GDALDatasetH, - #[doc = " Destination image dataset - may be NULL if only using GDALWarpOperation::WarpRegionToBuffer()."] - pub hDstDS: GDALDatasetH, - #[doc = " Number of bands to process, may be 0 to select all bands."] - pub nBandCount: libc::c_int, - #[doc = " The band numbers for the source bands to process (1 based)"] - pub panSrcBands: *mut libc::c_int, - #[doc = " The band numbers for the destination bands to process (1 based)"] - pub panDstBands: *mut libc::c_int, - #[doc = " The source band so use as an alpha (transparency) value, 0=disabled"] - pub nSrcAlphaBand: libc::c_int, - #[doc = " The dest. band so use as an alpha (transparency) value, 0=disabled"] - pub nDstAlphaBand: libc::c_int, - #[doc = " The \"nodata\" value real component for each input band, if NULL there isn\'t one"] - pub padfSrcNoDataReal: *mut f64, - #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] - #[doc = "component is provided."] - pub padfSrcNoDataImag: *mut f64, - #[doc = " The \"nodata\" value real component for each output band, if NULL there isn\'t one"] - pub padfDstNoDataReal: *mut f64, - #[doc = " The \"nodata\" value imaginary component - may be NULL even if real"] - #[doc = "component is provided."] - pub padfDstNoDataImag: *mut f64, - #[doc = " GDALProgressFunc() compatible progress reporting function, or NULL"] - #[doc = "if there isn\'t one."] - pub pfnProgress: GDALProgressFunc, - #[doc = " Callback argument to be passed to pfnProgress."] - pub pProgressArg: *mut libc::c_void, - #[doc = " Type of spatial point transformer function"] - pub pfnTransformer: GDALTransformerFunc, - #[doc = " Handle to image transformer setup structure"] - pub pTransformerArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnSrcValidityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pSrcValidityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnSrcDensityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pSrcDensityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnDstDensityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pDstDensityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnDstValidityMaskFunc: GDALMaskFunc, - #[doc = " Unused. Must be NULL"] - pub pDstValidityMaskFuncArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnPreWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - #[doc = " Unused. Must be NULL"] - pub pPreWarpProcessorArg: *mut libc::c_void, - #[doc = " Unused. Must be NULL"] - pub pfnPostWarpChunkProcessor: ::std::option::Option< - unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, - >, - #[doc = " Unused. Must be NULL"] - pub pPostWarpProcessorArg: *mut libc::c_void, - #[doc = " Optional OGRPolygonH for a masking cutline."] - pub hCutline: *mut libc::c_void, - #[doc = " Optional blending distance to apply across cutline in pixels, default is zero."] - pub dfCutlineBlendDist: f64, +extern "C" { + pub fn GDALReadBlock( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *mut libc::c_void, + ) -> CPLErr::Type; } -#[test] -fn bindgen_test_layout_GDALWarpOptions() { - assert_eq!( - ::std::mem::size_of::(), - 264usize, - concat!("Size of: ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(GDALWarpOptions)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(papszWarpOptions) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(dfWarpMemoryLimit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eResampleAlg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(eWorkingDataType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hSrcDS) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(hDstDS) - ) +extern "C" { + pub fn GDALWriteBlock( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRasterBandXSize(arg1: GDALRasterBandH) -> libc::c_int; +} +extern "C" { + pub fn GDALGetRasterBandYSize(arg1: GDALRasterBandH) -> libc::c_int; +} +extern "C" { + pub fn GDALGetRasterAccess(arg1: GDALRasterBandH) -> GDALAccess::Type; +} +extern "C" { + pub fn GDALGetBandNumber(arg1: GDALRasterBandH) -> libc::c_int; +} +extern "C" { + pub fn GDALGetBandDataset(arg1: GDALRasterBandH) -> GDALDatasetH; +} +extern "C" { + pub fn GDALGetRasterColorInterpretation(arg1: GDALRasterBandH) -> GDALColorInterp::Type; +} +extern "C" { + pub fn GDALSetRasterColorInterpretation( + arg1: GDALRasterBandH, + arg2: GDALColorInterp::Type, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRasterColorTable(arg1: GDALRasterBandH) -> GDALColorTableH; +} +extern "C" { + pub fn GDALSetRasterColorTable(arg1: GDALRasterBandH, arg2: GDALColorTableH) -> CPLErr::Type; +} +extern "C" { + pub fn GDALHasArbitraryOverviews(arg1: GDALRasterBandH) -> libc::c_int; +} +extern "C" { + pub fn GDALGetOverviewCount(arg1: GDALRasterBandH) -> libc::c_int; +} +extern "C" { + pub fn GDALGetOverview(arg1: GDALRasterBandH, arg2: libc::c_int) -> GDALRasterBandH; +} +extern "C" { + pub fn GDALGetRasterNoDataValue(arg1: GDALRasterBandH, arg2: *mut libc::c_int) -> f64; +} +extern "C" { + pub fn GDALSetRasterNoDataValue(arg1: GDALRasterBandH, arg2: f64) -> CPLErr::Type; +} +extern "C" { + pub fn GDALDeleteRasterNoDataValue(arg1: GDALRasterBandH) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRasterCategoryNames(arg1: GDALRasterBandH) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn GDALSetRasterCategoryNames(arg1: GDALRasterBandH, arg2: CSLConstList) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRasterMinimum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; +} +extern "C" { + pub fn GDALGetRasterMaximum(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; +} +extern "C" { + pub fn GDALGetRasterStatistics( + arg1: GDALRasterBandH, + bApproxOK: libc::c_int, + bForce: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALComputeRasterStatistics( + arg1: GDALRasterBandH, + bApproxOK: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALSetRasterStatistics( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + dfMean: f64, + dfStdDev: f64, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRasterBandAsMDArray(arg1: GDALRasterBandH) -> GDALMDArrayH; +} +extern "C" { + pub fn GDALGetRasterUnitType(arg1: GDALRasterBandH) -> *const libc::c_char; +} +extern "C" { + pub fn GDALSetRasterUnitType( + hBand: GDALRasterBandH, + pszNewValue: *const libc::c_char, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRasterOffset(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; +} +extern "C" { + pub fn GDALSetRasterOffset(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRasterScale(arg1: GDALRasterBandH, pbSuccess: *mut libc::c_int) -> f64; +} +extern "C" { + pub fn GDALSetRasterScale(hBand: GDALRasterBandH, dfNewOffset: f64) -> CPLErr::Type; +} +extern "C" { + pub fn GDALComputeRasterMinMax( + hBand: GDALRasterBandH, + bApproxOK: libc::c_int, + adfMinMax: *mut f64, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nBandCount) - ) +} +extern "C" { + pub fn GDALFlushRasterCache(hBand: GDALRasterBandH) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRasterHistogram( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut libc::c_int, + bIncludeOutOfRange: libc::c_int, + bApproxOK: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRasterHistogramEx( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut GUIntBig, + bIncludeOutOfRange: libc::c_int, + bApproxOK: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetDefaultHistogram( + hBand: GDALRasterBandH, + pdfMin: *mut f64, + pdfMax: *mut f64, + pnBuckets: *mut libc::c_int, + ppanHistogram: *mut *mut libc::c_int, + bForce: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetDefaultHistogramEx( + hBand: GDALRasterBandH, + pdfMin: *mut f64, + pdfMax: *mut f64, + pnBuckets: *mut libc::c_int, + ppanHistogram: *mut *mut GUIntBig, + bForce: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALSetDefaultHistogram( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALSetDefaultHistogramEx( + hBand: GDALRasterBandH, + dfMin: f64, + dfMax: f64, + nBuckets: libc::c_int, + panHistogram: *mut GUIntBig, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetRandomRasterSample( + arg1: GDALRasterBandH, + arg2: libc::c_int, + arg3: *mut f32, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALGetRasterSampleOverview(arg1: GDALRasterBandH, arg2: libc::c_int) + -> GDALRasterBandH; +} +extern "C" { + pub fn GDALGetRasterSampleOverviewEx(arg1: GDALRasterBandH, arg2: GUIntBig) -> GDALRasterBandH; +} +extern "C" { + pub fn GDALFillRaster( + hBand: GDALRasterBandH, + dfRealValue: f64, + dfImaginaryValue: f64, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALComputeBandStats( + hBand: GDALRasterBandH, + nSampleStep: libc::c_int, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALOverviewMagnitudeCorrection( + hBaseBand: GDALRasterBandH, + nOverviewCount: libc::c_int, + pahOverviews: *mut GDALRasterBandH, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetDefaultRAT(hBand: GDALRasterBandH) -> GDALRasterAttributeTableH; +} +extern "C" { + pub fn GDALSetDefaultRAT( + arg1: GDALRasterBandH, + arg2: GDALRasterAttributeTableH, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALAddDerivedBandPixelFunc( + pszName: *const libc::c_char, + pfnPixelFunc: GDALDerivedPixelFunc, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetMaskBand(hBand: GDALRasterBandH) -> GDALRasterBandH; +} +extern "C" { + pub fn GDALGetMaskFlags(hBand: GDALRasterBandH) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateMaskBand(hBand: GDALRasterBandH, nFlags: libc::c_int) -> CPLErr::Type; +} +extern "C" { + pub fn GDALGetDataCoverageStatus( + hBand: GDALRasterBandH, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nMaskFlagStop: libc::c_int, + pdfDataPct: *mut f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALARGetNextUpdatedRegion( + hARIO: GDALAsyncReaderH, + dfTimeout: f64, + pnXBufOff: *mut libc::c_int, + pnYBufOff: *mut libc::c_int, + pnXBufSize: *mut libc::c_int, + pnYBufSize: *mut libc::c_int, + ) -> GDALAsyncStatusType::Type; +} +extern "C" { + pub fn GDALARLockBuffer(hARIO: GDALAsyncReaderH, dfTimeout: f64) -> libc::c_int; +} +extern "C" { + pub fn GDALARUnlockBuffer(hARIO: GDALAsyncReaderH); +} +extern "C" { + pub fn GDALGeneralCmdLineProcessor( + nArgc: libc::c_int, + ppapszArgv: *mut *mut *mut libc::c_char, + nOptions: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALSwapWords( + pData: *mut libc::c_void, + nWordSize: libc::c_int, + nWordCount: libc::c_int, + nWordSkip: libc::c_int, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panSrcBands) - ) +} +extern "C" { + pub fn GDALSwapWordsEx( + pData: *mut libc::c_void, + nWordSize: libc::c_int, + nWordCount: usize, + nWordSkip: libc::c_int, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(panDstBands) - ) +} +extern "C" { + pub fn GDALCopyWords( + pSrcData: *const libc::c_void, + eSrcType: GDALDataType::Type, + nSrcPixelOffset: libc::c_int, + pDstData: *mut libc::c_void, + eDstType: GDALDataType::Type, + nDstPixelOffset: libc::c_int, + nWordCount: libc::c_int, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nSrcAlphaBand) - ) +} +extern "C" { + pub fn GDALCopyWords64( + pSrcData: *const libc::c_void, + eSrcType: GDALDataType::Type, + nSrcPixelOffset: libc::c_int, + pDstData: *mut libc::c_void, + eDstType: GDALDataType::Type, + nDstPixelOffset: libc::c_int, + nWordCount: GPtrDiff_t, ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(nDstAlphaBand) - ) +} +extern "C" { + pub fn GDALCopyBits( + pabySrcData: *const GByte, + nSrcOffset: libc::c_int, + nSrcStep: libc::c_int, + pabyDstData: *mut GByte, + nDstOffset: libc::c_int, + nDstStep: libc::c_int, + nBitCount: libc::c_int, + nStepCount: libc::c_int, ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataReal) - ) +} +extern "C" { + pub fn GDALLoadWorldFile(arg1: *const libc::c_char, arg2: *mut f64) -> libc::c_int; +} +extern "C" { + pub fn GDALReadWorldFile( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALWriteWorldFile( + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALLoadTabFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALReadTabFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALLoadOziMapFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALReadOziMapFile( + arg1: *const libc::c_char, + arg2: *mut f64, + arg3: *mut *mut libc::c_char, + arg4: *mut libc::c_int, + arg5: *mut *mut GDAL_GCP, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALDecToDMS( + arg1: f64, + arg2: *const libc::c_char, + arg3: libc::c_int, + ) -> *const libc::c_char; +} +extern "C" { + pub fn GDALPackedDMSToDec(arg1: f64) -> f64; +} +extern "C" { + pub fn GDALDecToPackedDMS(arg1: f64) -> f64; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRPCInfoV1 { + pub dfLINE_OFF: f64, + pub dfSAMP_OFF: f64, + pub dfLAT_OFF: f64, + pub dfLONG_OFF: f64, + pub dfHEIGHT_OFF: f64, + pub dfLINE_SCALE: f64, + pub dfSAMP_SCALE: f64, + pub dfLAT_SCALE: f64, + pub dfLONG_SCALE: f64, + pub dfHEIGHT_SCALE: f64, + pub adfLINE_NUM_COEFF: [f64; 20usize], + pub adfLINE_DEN_COEFF: [f64; 20usize], + pub adfSAMP_NUM_COEFF: [f64; 20usize], + pub adfSAMP_DEN_COEFF: [f64; 20usize], + pub dfMIN_LONG: f64, + pub dfMIN_LAT: f64, + pub dfMAX_LONG: f64, + pub dfMAX_LAT: f64, +} +#[test] +fn bindgen_test_layout_GDALRPCInfoV1() { + assert_eq!( + ::std::mem::size_of::(), + 752usize, + concat!("Size of: ", stringify!(GDALRPCInfoV1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(GDALWarpOptions), - "::", - stringify!(padfSrcNoDataImag) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALRPCInfoV1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize - }, - 88usize, + unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(padfDstNoDataReal) + stringify!(dfLINE_OFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize - }, - 96usize, + unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(padfDstNoDataImag) + stringify!(dfSAMP_OFF) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, - 104usize, + unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, + 16usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pfnProgress) + stringify!(dfLAT_OFF) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, - 112usize, + unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pProgressArg) + stringify!(dfLONG_OFF) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, - 120usize, + unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, + 32usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pfnTransformer) + stringify!(dfHEIGHT_OFF) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, - 128usize, + unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, + 40usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pTransformerArg) + stringify!(dfLINE_SCALE) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ - as usize - }, - 136usize, + unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, + 48usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(papfnSrcPerBandValidityMaskFunc) + stringify!(dfSAMP_SCALE) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ - as usize - }, - 144usize, + unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, + 56usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(papSrcPerBandValidityMaskFuncArg) + stringify!(dfLAT_SCALE) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize - }, - 152usize, + unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, + 64usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pfnSrcValidityMaskFunc) + stringify!(dfLONG_SCALE) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize - }, - 160usize, + unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, + 72usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pSrcValidityMaskFuncArg) + stringify!(dfHEIGHT_SCALE) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize - }, - 168usize, + unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, + 80usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pfnSrcDensityMaskFunc) + stringify!(adfLINE_NUM_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize - }, - 176usize, + unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, + 240usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pSrcDensityMaskFuncArg) + stringify!(adfLINE_DEN_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize - }, - 184usize, + unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, + 400usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pfnDstDensityMaskFunc) + stringify!(adfSAMP_NUM_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize - }, - 192usize, + unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, + 560usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pDstDensityMaskFuncArg) + stringify!(adfSAMP_DEN_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize - }, - 200usize, + unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, + 720usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pfnDstValidityMaskFunc) + stringify!(dfMIN_LONG) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize - }, - 208usize, + unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, + 728usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pDstValidityMaskFuncArg) + stringify!(dfMIN_LAT) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ - as usize - }, - 216usize, + unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, + 736usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pfnPreWarpChunkProcessor) + stringify!(dfMAX_LONG) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize - }, - 224usize, + unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, + 744usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV1), "::", - stringify!(pPreWarpProcessorArg) + stringify!(dfMAX_LAT) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ - as usize - }, - 232usize, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRPCInfoV2 { + pub dfLINE_OFF: f64, + pub dfSAMP_OFF: f64, + pub dfLAT_OFF: f64, + pub dfLONG_OFF: f64, + pub dfHEIGHT_OFF: f64, + pub dfLINE_SCALE: f64, + pub dfSAMP_SCALE: f64, + pub dfLAT_SCALE: f64, + pub dfLONG_SCALE: f64, + pub dfHEIGHT_SCALE: f64, + pub adfLINE_NUM_COEFF: [f64; 20usize], + pub adfLINE_DEN_COEFF: [f64; 20usize], + pub adfSAMP_NUM_COEFF: [f64; 20usize], + pub adfSAMP_DEN_COEFF: [f64; 20usize], + pub dfMIN_LONG: f64, + pub dfMIN_LAT: f64, + pub dfMAX_LONG: f64, + pub dfMAX_LAT: f64, + pub dfERR_BIAS: f64, + pub dfERR_RAND: f64, +} +#[test] +fn bindgen_test_layout_GDALRPCInfoV2() { + assert_eq!( + ::std::mem::size_of::(), + 768usize, + concat!("Size of: ", stringify!(GDALRPCInfoV2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALRPCInfoV2)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLINE_OFF as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV2), "::", - stringify!(pfnPostWarpChunkProcessor) + stringify!(dfLINE_OFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).dfSAMP_OFF as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfSAMP_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLAT_OFF as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfLAT_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLONG_OFF as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfLONG_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfHEIGHT_OFF as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfHEIGHT_OFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLINE_SCALE as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfLINE_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfSAMP_SCALE as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfSAMP_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLAT_SCALE as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfLAT_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfLONG_SCALE as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfLONG_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfHEIGHT_SCALE as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfHEIGHT_SCALE) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).adfLINE_NUM_COEFF as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(adfLINE_NUM_COEFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).adfLINE_DEN_COEFF as *const _ as usize }, 240usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV2), "::", - stringify!(pPostWarpProcessorArg) + stringify!(adfLINE_DEN_COEFF) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, - 248usize, + unsafe { &(*(::std::ptr::null::())).adfSAMP_NUM_COEFF as *const _ as usize }, + 400usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV2), "::", - stringify!(hCutline) + stringify!(adfSAMP_NUM_COEFF) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize - }, - 256usize, + unsafe { &(*(::std::ptr::null::())).adfSAMP_DEN_COEFF as *const _ as usize }, + 560usize, concat!( "Offset of field: ", - stringify!(GDALWarpOptions), + stringify!(GDALRPCInfoV2), "::", - stringify!(dfCutlineBlendDist) + stringify!(adfSAMP_DEN_COEFF) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMIN_LONG as *const _ as usize }, + 720usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfMIN_LONG) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMIN_LAT as *const _ as usize }, + 728usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfMIN_LAT) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMAX_LONG as *const _ as usize }, + 736usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfMAX_LONG) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfMAX_LAT as *const _ as usize }, + 744usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfMAX_LAT) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfERR_BIAS as *const _ as usize }, + 752usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfERR_BIAS) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfERR_RAND as *const _ as usize }, + 760usize, + concat!( + "Offset of field: ", + stringify!(GDALRPCInfoV2), + "::", + stringify!(dfERR_RAND) ) ); } extern "C" { - pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; + pub fn GDALExtractRPCInfoV1(arg1: CSLConstList, arg2: *mut GDALRPCInfoV1) -> libc::c_int; } extern "C" { - pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); + pub fn GDALExtractRPCInfoV2(arg1: CSLConstList, arg2: *mut GDALRPCInfoV2) -> libc::c_int; } -extern "C" { - pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALColorEntry { + pub c1: libc::c_short, + pub c2: libc::c_short, + pub c3: libc::c_short, + pub c4: libc::c_short, } -extern "C" { - pub fn GDALWarpInitDstNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); +#[test] +fn bindgen_test_layout_GDALColorEntry() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(GDALColorEntry)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(GDALColorEntry)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).c1 as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALColorEntry), + "::", + stringify!(c1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).c2 as *const _ as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(GDALColorEntry), + "::", + stringify!(c2) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).c3 as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(GDALColorEntry), + "::", + stringify!(c3) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).c4 as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(GDALColorEntry), + "::", + stringify!(c4) + ) + ); } extern "C" { - pub fn GDALWarpInitSrcNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + pub fn GDALCreateColorTable(arg1: GDALPaletteInterp::Type) -> GDALColorTableH; } extern "C" { - pub fn GDALWarpInitNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); + pub fn GDALDestroyColorTable(arg1: GDALColorTableH); } extern "C" { - pub fn GDALWarpInitDstNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); + pub fn GDALCloneColorTable(arg1: GDALColorTableH) -> GDALColorTableH; } extern "C" { - pub fn GDALWarpInitSrcNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); + pub fn GDALGetPaletteInterpretation(arg1: GDALColorTableH) -> GDALPaletteInterp::Type; } extern "C" { - pub fn GDALWarpResolveWorkingDataType(arg1: *mut GDALWarpOptions); + pub fn GDALGetColorEntryCount(arg1: GDALColorTableH) -> libc::c_int; } extern "C" { - pub fn GDALWarpInitDefaultBandMapping(arg1: *mut GDALWarpOptions, nBandCount: libc::c_int); + pub fn GDALGetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int) -> *const GDALColorEntry; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; + pub fn GDALGetColorEntryAsRGB( + arg1: GDALColorTableH, + arg2: libc::c_int, + arg3: *mut GDALColorEntry, + ) -> libc::c_int; } extern "C" { - pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; + pub fn GDALSetColorEntry(arg1: GDALColorTableH, arg2: libc::c_int, arg3: *const GDALColorEntry); } extern "C" { - pub fn GDALReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - hDstDS: GDALDatasetH, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; + pub fn GDALCreateColorRamp( + hTable: GDALColorTableH, + nStartIndex: libc::c_int, + psStartColor: *const GDALColorEntry, + nEndIndex: libc::c_int, + psEndColor: *const GDALColorEntry, + ); +} +pub mod GDALRATFieldType { + pub type Type = libc::c_uint; + pub const GFT_Integer: Type = 0; + pub const GFT_Real: Type = 1; + pub const GFT_String: Type = 2; +} +pub mod GDALRATFieldUsage { + pub type Type = libc::c_uint; + pub const GFU_Generic: Type = 0; + pub const GFU_PixelCount: Type = 1; + pub const GFU_Name: Type = 2; + pub const GFU_Min: Type = 3; + pub const GFU_Max: Type = 4; + pub const GFU_MinMax: Type = 5; + pub const GFU_Red: Type = 6; + pub const GFU_Green: Type = 7; + pub const GFU_Blue: Type = 8; + pub const GFU_Alpha: Type = 9; + pub const GFU_RedMin: Type = 10; + pub const GFU_GreenMin: Type = 11; + pub const GFU_BlueMin: Type = 12; + pub const GFU_AlphaMin: Type = 13; + pub const GFU_RedMax: Type = 14; + pub const GFU_GreenMax: Type = 15; + pub const GFU_BlueMax: Type = 16; + pub const GFU_AlphaMax: Type = 17; + pub const GFU_MaxCount: Type = 18; +} +pub mod GDALRATTableType { + pub type Type = libc::c_uint; + pub const GRTT_THEMATIC: Type = 0; + pub const GRTT_ATHEMATIC: Type = 1; } extern "C" { - pub fn GDALCreateAndReprojectImage( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstFilename: *const libc::c_char, - pszDstWKT: *const libc::c_char, - hDstDriver: GDALDriverH, - papszCreateOptions: *mut *mut libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfWarpMemoryLimit: f64, - dfMaxError: f64, - pfnProgress: GDALProgressFunc, - pProgressArg: *mut libc::c_void, - psOptions: *mut GDALWarpOptions, - ) -> CPLErr::Type; + pub fn GDALCreateRasterAttributeTable() -> GDALRasterAttributeTableH; } extern "C" { - pub fn GDALAutoCreateWarpedVRT( - hSrcDS: GDALDatasetH, - pszSrcWKT: *const libc::c_char, - pszDstWKT: *const libc::c_char, - eResampleAlg: GDALResampleAlg::Type, - dfMaxError: f64, - psOptions: *const GDALWarpOptions, - ) -> GDALDatasetH; + pub fn GDALDestroyRasterAttributeTable(arg1: GDALRasterAttributeTableH); } extern "C" { - pub fn GDALCreateWarpedVRT( - hSrcDS: GDALDatasetH, - nPixels: libc::c_int, - nLines: libc::c_int, - padfGeoTransform: *mut f64, - psOptions: *mut GDALWarpOptions, - ) -> GDALDatasetH; + pub fn GDALRATGetColumnCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; + pub fn GDALRATGetNameOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> *const libc::c_char; } -#[doc = " Opaque type representing a GDALWarpOperation object"] -pub type GDALWarpOperationH = *mut libc::c_void; extern "C" { - pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; + pub fn GDALRATGetUsageOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> GDALRATFieldUsage::Type; } extern "C" { - pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); + pub fn GDALRATGetTypeOfCol( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + ) -> GDALRATFieldType::Type; } extern "C" { - pub fn GDALChunkAndWarpImage( - arg1: GDALWarpOperationH, + pub fn GDALRATGetColOfUsage( + arg1: GDALRasterAttributeTableH, + arg2: GDALRATFieldUsage::Type, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALRATGetRowCount(arg1: GDALRasterAttributeTableH) -> libc::c_int; +} +extern "C" { + pub fn GDALRATGetValueAsString( + arg1: GDALRasterAttributeTableH, arg2: libc::c_int, arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; + ) -> *const libc::c_char; } extern "C" { - pub fn GDALChunkAndWarpMulti( - arg1: GDALWarpOperationH, + pub fn GDALRATGetValueAsInt( + arg1: GDALRasterAttributeTableH, arg2: libc::c_int, arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - ) -> CPLErr::Type; + ) -> libc::c_int; } extern "C" { - pub fn GDALWarpRegion( - arg1: GDALWarpOperationH, + pub fn GDALRATGetValueAsDouble( + arg1: GDALRasterAttributeTableH, arg2: libc::c_int, arg3: libc::c_int, - arg4: libc::c_int, - arg5: libc::c_int, - arg6: libc::c_int, - arg7: libc::c_int, - arg8: libc::c_int, - arg9: libc::c_int, - ) -> CPLErr::Type; + ) -> f64; } extern "C" { - pub fn GDALWarpRegionToBuffer( - arg1: GDALWarpOperationH, + pub fn GDALRATSetValueAsString( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: *const libc::c_char, + ); +} +extern "C" { + pub fn GDALRATSetValueAsInt( + arg1: GDALRasterAttributeTableH, arg2: libc::c_int, arg3: libc::c_int, arg4: libc::c_int, - arg5: libc::c_int, - arg6: *mut libc::c_void, - arg7: GDALDataType::Type, - arg8: libc::c_int, - arg9: libc::c_int, - arg10: libc::c_int, - arg11: libc::c_int, - ) -> CPLErr::Type; + ); } -pub mod OGRAxisOrientation { - #[doc = " Axis orientations (corresponds to CS_AxisOrientationEnum)."] - pub type Type = u32; - #[doc = "< Other"] - pub const OAO_Other: Type = 0; - #[doc = "< North"] - pub const OAO_North: Type = 1; - #[doc = "< South"] - pub const OAO_South: Type = 2; - #[doc = "< East"] - pub const OAO_East: Type = 3; - #[doc = "< West"] - pub const OAO_West: Type = 4; - #[doc = "< Up (to space)"] - pub const OAO_Up: Type = 5; - #[doc = "< Down (to Earth center)"] - pub const OAO_Down: Type = 6; +extern "C" { + pub fn GDALRATSetValueAsDouble( + arg1: GDALRasterAttributeTableH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: f64, + ); } extern "C" { - pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; + pub fn GDALRATChangesAreWrittenToFile(hRAT: GDALRasterAttributeTableH) -> libc::c_int; } extern "C" { - pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; + pub fn GDALRATValuesIOAsDouble( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + pdfData: *mut f64, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; + pub fn GDALRATValuesIOAsInteger( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + pnData: *mut libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; + pub fn GDALRATValuesIOAsString( + hRAT: GDALRasterAttributeTableH, + eRWFlag: GDALRWFlag::Type, + iField: libc::c_int, + iStartRow: libc::c_int, + iLength: libc::c_int, + papszStrList: CSLConstList, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); + pub fn GDALRATSetRowCount(arg1: GDALRasterAttributeTableH, arg2: libc::c_int); } extern "C" { - pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALRATCreateColumn( + arg1: GDALRasterAttributeTableH, + arg2: *const libc::c_char, + arg3: GDALRATFieldType::Type, + arg4: GDALRATFieldUsage::Type, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALRATSetLinearBinning( + arg1: GDALRasterAttributeTableH, + arg2: f64, + arg3: f64, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRRelease(arg1: OGRSpatialReferenceH); + pub fn GDALRATGetLinearBinning( + arg1: GDALRasterAttributeTableH, + arg2: *mut f64, + arg3: *mut f64, + ) -> libc::c_int; } extern "C" { - pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALRATSetTableType( + hRAT: GDALRasterAttributeTableH, + eInTableType: GDALRATTableType::Type, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRFixupOrdering(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALRATGetTableType(hRAT: GDALRasterAttributeTableH) -> GDALRATTableType::Type; } extern "C" { - pub fn OSRFixup(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALRATInitializeFromColorTable( + arg1: GDALRasterAttributeTableH, + arg2: GDALColorTableH, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRStripCTParms(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALRATTranslateToColorTable( + arg1: GDALRasterAttributeTableH, + nEntryCount: libc::c_int, + ) -> GDALColorTableH; } extern "C" { - pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; + pub fn GDALRATDumpReadable(arg1: GDALRasterAttributeTableH, arg2: *mut FILE); } extern "C" { - pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; + pub fn GDALRATClone(arg1: GDALRasterAttributeTableH) -> GDALRasterAttributeTableH; } extern "C" { - pub fn OSRImportFromWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; + pub fn GDALRATSerializeJSON(arg1: GDALRasterAttributeTableH) -> *mut libc::c_void; } extern "C" { - pub fn OSRImportFromProj4( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALRATGetRowOfValue(arg1: GDALRasterAttributeTableH, arg2: f64) -> libc::c_int; } extern "C" { - pub fn OSRImportFromESRI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; + pub fn GDALRATRemoveStatistics(arg1: GDALRasterAttributeTableH); } extern "C" { - pub fn OSRImportFromPCI( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - arg2: *const libc::c_char, - arg3: *mut f64, - ) -> OGRErr::Type; + pub fn GDALSetCacheMax(nBytes: libc::c_int); } extern "C" { - pub fn OSRImportFromUSGS( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: *mut f64, - arg5: libc::c_long, - ) -> OGRErr::Type; + pub fn GDALGetCacheMax() -> libc::c_int; } extern "C" { - pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn GDALGetCacheUsed() -> libc::c_int; } extern "C" { - pub fn OSRImportFromDict( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALSetCacheMax64(nBytes: GIntBig); } extern "C" { - pub fn OSRImportFromPanorama( - arg1: OGRSpatialReferenceH, - arg2: libc::c_long, - arg3: libc::c_long, - arg4: libc::c_long, - arg5: *mut f64, - ) -> OGRErr::Type; + pub fn GDALGetCacheMax64() -> GIntBig; } extern "C" { - pub fn OSRImportFromOzi( - arg1: OGRSpatialReferenceH, - arg2: *const *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALGetCacheUsed64() -> GIntBig; } extern "C" { - pub fn OSRImportFromMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALFlushCacheBlock() -> libc::c_int; } extern "C" { - pub fn OSRImportFromERM( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALDatasetGetVirtualMem( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + nPixelSpace: libc::c_int, + nLineSpace: GIntBig, + nBandSpace: GIntBig, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn GDALRasterBandGetVirtualMem( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: GIntBig, + nCacheSize: usize, + nPageSizeHint: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) - -> OGRErr::Type; + pub fn GDALGetVirtualMemAuto( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + pnPixelSpace: *mut libc::c_int, + pnLineSpace: *mut GIntBig, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } -extern "C" { - pub fn OSRExportToPrettyWkt( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: libc::c_int, - ) -> OGRErr::Type; +pub mod GDALTileOrganization { + pub type Type = libc::c_uint; + pub const GTO_TIP: Type = 0; + pub const GTO_BIT: Type = 1; + pub const GTO_BSQ: Type = 2; } extern "C" { - pub fn OSRExportToProj4( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; + pub fn GDALDatasetGetTiledVirtualMem( + hDS: GDALDatasetH, + eRWFlag: GDALRWFlag::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nTileXSize: libc::c_int, + nTileYSize: libc::c_int, + eBufType: GDALDataType::Type, + nBandCount: libc::c_int, + panBandMap: *mut libc::c_int, + eTileOrganization: GDALTileOrganization::Type, + nCacheSize: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn OSRExportToPCI( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *mut *mut libc::c_char, - arg4: *mut *mut f64, - ) -> OGRErr::Type; + pub fn GDALRasterBandGetTiledVirtualMem( + hBand: GDALRasterBandH, + eRWFlag: GDALRWFlag::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + nTileXSize: libc::c_int, + nTileYSize: libc::c_int, + eBufType: GDALDataType::Type, + nCacheSize: usize, + bSingleThreadUsage: libc::c_int, + papszOptions: CSLConstList, + ) -> *mut CPLVirtualMem; } extern "C" { - pub fn OSRExportToUSGS( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut *mut f64, - arg5: *mut libc::c_long, - ) -> OGRErr::Type; + pub fn GDALCreatePansharpenedVRT( + pszXML: *const libc::c_char, + hPanchroBand: GDALRasterBandH, + nInputSpectralBands: libc::c_int, + pahInputSpectralBands: *mut GDALRasterBandH, + ) -> GDALDatasetH; } extern "C" { - pub fn OSRExportToXML( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - arg3: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALGetJPEG2000Structure( + pszFilename: *const libc::c_char, + papszOptions: CSLConstList, + ) -> *mut CPLXMLNode; } extern "C" { - pub fn OSRExportToPanorama( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_long, - arg3: *mut libc::c_long, - arg4: *mut libc::c_long, - arg5: *mut libc::c_long, - arg6: *mut f64, - ) -> OGRErr::Type; + pub fn GDALCreateMultiDimensional( + hDriver: GDALDriverH, + pszName: *const libc::c_char, + papszRootGroupOptions: CSLConstList, + papszOptions: CSLConstList, + ) -> GDALDatasetH; } extern "C" { - pub fn OSRExportToMICoordSys( - arg1: OGRSpatialReferenceH, - arg2: *mut *mut libc::c_char, - ) -> OGRErr::Type; + pub fn GDALExtendedDataTypeCreate(eType: GDALDataType::Type) -> GDALExtendedDataTypeH; } extern "C" { - pub fn OSRExportToERM( - arg1: OGRSpatialReferenceH, - arg2: *mut libc::c_char, - arg3: *mut libc::c_char, - arg4: *mut libc::c_char, - ) -> OGRErr::Type; + pub fn GDALExtendedDataTypeCreateString(nMaxStringLength: usize) -> GDALExtendedDataTypeH; } extern "C" { - pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALExtendedDataTypeCreateCompound( + pszName: *const libc::c_char, + nTotalSize: usize, + nComponents: usize, + comps: *const GDALEDTComponentH, + ) -> GDALExtendedDataTypeH; } extern "C" { - pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALExtendedDataTypeRelease(hEDT: GDALExtendedDataTypeH); } extern "C" { - pub fn OSRConvertToOtherProjection( - hSRS: OGRSpatialReferenceH, - pszTargetProjection: *const libc::c_char, - papszOptions: *const *const libc::c_char, - ) -> OGRSpatialReferenceH; + pub fn GDALExtendedDataTypeGetName(hEDT: GDALExtendedDataTypeH) -> *const libc::c_char; } extern "C" { - pub fn OSRSetAttrValue( - hSRS: OGRSpatialReferenceH, - pszNodePath: *const libc::c_char, - pszNewNodeValue: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALExtendedDataTypeGetClass( + hEDT: GDALExtendedDataTypeH, + ) -> GDALExtendedDataTypeClass::Type; } extern "C" { - pub fn OSRGetAttrValue( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - iChild: libc::c_int, - ) -> *const libc::c_char; + pub fn GDALExtendedDataTypeGetNumericDataType( + hEDT: GDALExtendedDataTypeH, + ) -> GDALDataType::Type; } extern "C" { - pub fn OSRSetAngularUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; + pub fn GDALExtendedDataTypeGetSize(hEDT: GDALExtendedDataTypeH) -> usize; } extern "C" { - pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn GDALExtendedDataTypeGetMaxStringLength(hEDT: GDALExtendedDataTypeH) -> usize; } extern "C" { - pub fn OSRSetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; + pub fn GDALExtendedDataTypeGetComponents( + hEDT: GDALExtendedDataTypeH, + pnCount: *mut usize, + ) -> *mut GDALEDTComponentH; } extern "C" { - pub fn OSRSetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *const libc::c_char, - arg4: f64, - ) -> OGRErr::Type; + pub fn GDALExtendedDataTypeFreeComponents(components: *mut GDALEDTComponentH, nCount: usize); } extern "C" { - pub fn OSRSetLinearUnitsAndUpdateParameters( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; + pub fn GDALExtendedDataTypeCanConvertTo( + hSourceEDT: GDALExtendedDataTypeH, + hTargetEDT: GDALExtendedDataTypeH, + ) -> libc::c_int; } extern "C" { - pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn GDALExtendedDataTypeEquals( + hFirstEDT: GDALExtendedDataTypeH, + hSecondEDT: GDALExtendedDataTypeH, + ) -> libc::c_int; } extern "C" { - pub fn OSRGetTargetLinearUnits( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: *mut *mut libc::c_char, - ) -> f64; + pub fn GDALEDTComponentCreate( + pszName: *const libc::c_char, + nOffset: usize, + hType: GDALExtendedDataTypeH, + ) -> GDALEDTComponentH; } extern "C" { - pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; + pub fn GDALEDTComponentRelease(hComp: GDALEDTComponentH); } extern "C" { - pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALEDTComponentGetName(hComp: GDALEDTComponentH) -> *const libc::c_char; } extern "C" { - pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALEDTComponentGetOffset(hComp: GDALEDTComponentH) -> usize; } extern "C" { - pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALEDTComponentGetType(hComp: GDALEDTComponentH) -> GDALExtendedDataTypeH; } extern "C" { - pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALDatasetGetRootGroup(hDS: GDALDatasetH) -> GDALGroupH; } extern "C" { - pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALGroupRelease(hGroup: GDALGroupH); } extern "C" { - pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALGroupGetName(hGroup: GDALGroupH) -> *const libc::c_char; } extern "C" { - pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALGroupGetFullName(hGroup: GDALGroupH) -> *const libc::c_char; } extern "C" { - pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALGroupGetMDArrayNames( + hGroup: GDALGroupH, + papszOptions: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALGroupOpenMDArray( + hGroup: GDALGroupH, + pszMDArrayName: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALMDArrayH; } extern "C" { - pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn GDALGroupOpenMDArrayFromFullname( + hGroup: GDALGroupH, + pszMDArrayName: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALMDArrayH; } extern "C" { - pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn GDALGroupResolveMDArray( + hGroup: GDALGroupH, + pszName: *const libc::c_char, + pszStartingPoint: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALMDArrayH; } extern "C" { - pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; + pub fn GDALGroupGetGroupNames( + hGroup: GDALGroupH, + papszOptions: CSLConstList, + ) -> *mut *mut libc::c_char; } extern "C" { - pub fn OSRSetWellKnownGeogCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALGroupOpenGroup( + hGroup: GDALGroupH, + pszSubGroupName: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALGroupH; } extern "C" { - pub fn OSRSetFromUserInput( - hSRS: OGRSpatialReferenceH, - arg1: *const libc::c_char, - ) -> OGRErr::Type; + pub fn GDALGroupOpenGroupFromFullname( + hGroup: GDALGroupH, + pszMDArrayName: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALGroupH; } extern "C" { - pub fn OSRCopyGeogCSFrom( - hSRS: OGRSpatialReferenceH, - hSrcSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; + pub fn GDALGroupGetDimensions( + hGroup: GDALGroupH, + pnCount: *mut usize, + papszOptions: CSLConstList, + ) -> *mut GDALDimensionH; } extern "C" { - pub fn OSRSetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: f64, - arg2: f64, - arg3: f64, - arg4: f64, - arg5: f64, - arg6: f64, - arg7: f64, - ) -> OGRErr::Type; + pub fn GDALGroupGetAttribute( + hGroup: GDALGroupH, + pszName: *const libc::c_char, + ) -> GDALAttributeH; } extern "C" { - pub fn OSRGetTOWGS84( - hSRS: OGRSpatialReferenceH, - arg1: *mut f64, - arg2: libc::c_int, - ) -> OGRErr::Type; + pub fn GDALGroupGetAttributes( + hGroup: GDALGroupH, + pnCount: *mut usize, + papszOptions: CSLConstList, + ) -> *mut GDALAttributeH; } extern "C" { - pub fn OSRSetCompoundCS( - hSRS: OGRSpatialReferenceH, - pszName: *const libc::c_char, - hHorizSRS: OGRSpatialReferenceH, - hVertSRS: OGRSpatialReferenceH, - ) -> OGRErr::Type; + pub fn GDALGroupGetStructuralInfo(hGroup: GDALGroupH) -> CSLConstList; } extern "C" { - pub fn OSRSetGeogCS( - hSRS: OGRSpatialReferenceH, - pszGeogName: *const libc::c_char, - pszDatumName: *const libc::c_char, - pszEllipsoidName: *const libc::c_char, - dfSemiMajor: f64, - dfInvFlattening: f64, - pszPMName: *const libc::c_char, - dfPMOffset: f64, - pszUnits: *const libc::c_char, - dfConvertToRadians: f64, - ) -> OGRErr::Type; + pub fn GDALGroupCreateGroup( + hGroup: GDALGroupH, + pszSubGroupName: *const libc::c_char, + papszOptions: CSLConstList, + ) -> GDALGroupH; } extern "C" { - pub fn OSRSetVertCS( - hSRS: OGRSpatialReferenceH, - pszVertCSName: *const libc::c_char, - pszVertDatumName: *const libc::c_char, - nVertDatumType: libc::c_int, - ) -> OGRErr::Type; + pub fn GDALGroupCreateDimension( + hGroup: GDALGroupH, + pszName: *const libc::c_char, + pszType: *const libc::c_char, + pszDirection: *const libc::c_char, + nSize: GUInt64, + papszOptions: CSLConstList, + ) -> GDALDimensionH; } extern "C" { - pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + pub fn GDALGroupCreateMDArray( + hGroup: GDALGroupH, + pszName: *const libc::c_char, + nDimensions: usize, + pahDimensions: *mut GDALDimensionH, + hEDT: GDALExtendedDataTypeH, + papszOptions: CSLConstList, + ) -> GDALMDArrayH; } extern "C" { - pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + pub fn GDALGroupCreateAttribute( + hGroup: GDALGroupH, + pszName: *const libc::c_char, + nDimensions: usize, + panDimensions: *const GUInt64, + hEDT: GDALExtendedDataTypeH, + papszOptions: CSLConstList, + ) -> GDALAttributeH; } extern "C" { - pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; + pub fn GDALMDArrayRelease(hMDArray: GDALMDArrayH); } extern "C" { - pub fn OSRSetAuthority( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszAuthority: *const libc::c_char, - nCode: libc::c_int, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetName(hArray: GDALMDArrayH) -> *const libc::c_char; } extern "C" { - pub fn OSRGetAuthorityCode( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; + pub fn GDALMDArrayGetFullName(hArray: GDALMDArrayH) -> *const libc::c_char; } extern "C" { - pub fn OSRGetAuthorityName( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - ) -> *const libc::c_char; + pub fn GDALMDArrayGetTotalElementsCount(hArray: GDALMDArrayH) -> GUInt64; } extern "C" { - pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; + pub fn GDALMDArrayGetDimensionCount(hArray: GDALMDArrayH) -> usize; } extern "C" { - pub fn OSRSetProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetDimensions( + hArray: GDALMDArrayH, + pnCount: *mut usize, + ) -> *mut GDALDimensionH; } extern "C" { - pub fn OSRGetProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; + pub fn GDALMDArrayGetDataType(hArray: GDALMDArrayH) -> GDALExtendedDataTypeH; } extern "C" { - pub fn OSRSetNormProjParm( - arg1: OGRSpatialReferenceH, - arg2: *const libc::c_char, - arg3: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayRead( + hArray: GDALMDArrayH, + arrayStartIdx: *const GUInt64, + count: *const usize, + arrayStep: *const GInt64, + bufferStride: *const GPtrDiff_t, + bufferDatatype: GDALExtendedDataTypeH, + pDstBuffer: *mut libc::c_void, + pDstBufferAllocStart: *const libc::c_void, + nDstBufferllocSize: usize, + ) -> libc::c_int; } extern "C" { - pub fn OSRGetNormProjParm( - hSRS: OGRSpatialReferenceH, - pszParmName: *const libc::c_char, - dfDefault: f64, - arg1: *mut OGRErr::Type, - ) -> f64; + pub fn GDALMDArrayWrite( + hArray: GDALMDArrayH, + arrayStartIdx: *const GUInt64, + count: *const usize, + arrayStep: *const GInt64, + bufferStride: *const GPtrDiff_t, + bufferDatatype: GDALExtendedDataTypeH, + pSrcBuffer: *const libc::c_void, + psrcBufferAllocStart: *const libc::c_void, + nSrcBufferllocSize: usize, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetUTM( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNorth: libc::c_int, - ) -> OGRErr::Type; + pub fn GDALMDArrayAdviseRead( + hArray: GDALMDArrayH, + arrayStartIdx: *const GUInt64, + count: *const usize, + ) -> libc::c_int; } extern "C" { - pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; + pub fn GDALMDArrayGetAttribute( + hArray: GDALMDArrayH, + pszName: *const libc::c_char, + ) -> GDALAttributeH; } extern "C" { - pub fn OSRSetStatePlane( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetAttributes( + hArray: GDALMDArrayH, + pnCount: *mut usize, + papszOptions: CSLConstList, + ) -> *mut GDALAttributeH; } extern "C" { - pub fn OSRSetStatePlaneWithUnits( - hSRS: OGRSpatialReferenceH, - nZone: libc::c_int, - bNAD83: libc::c_int, - pszOverrideUnitName: *const libc::c_char, - dfOverrideUnit: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayCreateAttribute( + hArray: GDALMDArrayH, + pszName: *const libc::c_char, + nDimensions: usize, + panDimensions: *const GUInt64, + hEDT: GDALExtendedDataTypeH, + papszOptions: CSLConstList, + ) -> GDALAttributeH; } extern "C" { - pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALMDArrayGetRawNoDataValue(hArray: GDALMDArrayH) -> *const libc::c_void; } extern "C" { - pub fn OSRFindMatches( - hSRS: OGRSpatialReferenceH, - papszOptions: *mut *mut libc::c_char, - pnEntries: *mut libc::c_int, - ppanMatchConfidence: *mut *mut libc::c_int, - ) -> *mut OGRSpatialReferenceH; + pub fn GDALMDArrayGetNoDataValueAsDouble( + hArray: GDALMDArrayH, + pbHasNoDataValue: *mut libc::c_int, + ) -> f64; } extern "C" { - pub fn OSRFreeSRSArray(pahSRS: *mut OGRSpatialReferenceH); + pub fn GDALMDArraySetRawNoDataValue( + hArray: GDALMDArrayH, + arg1: *const libc::c_void, + ) -> libc::c_int; } extern "C" { - pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALMDArraySetNoDataValueAsDouble( + hArray: GDALMDArrayH, + dfNoDataValue: f64, + ) -> libc::c_int; } extern "C" { - pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; + pub fn GDALMDArraySetScale(hArray: GDALMDArrayH, dfScale: f64) -> libc::c_int; } extern "C" { - pub fn OSRGetAxis( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - iAxis: libc::c_int, - peOrientation: *mut OGRAxisOrientation::Type, - ) -> *const libc::c_char; + pub fn GDALMDArraySetScaleEx( + hArray: GDALMDArrayH, + dfScale: f64, + eStorageType: GDALDataType::Type, + ) -> libc::c_int; } extern "C" { - pub fn OSRSetAxes( - hSRS: OGRSpatialReferenceH, - pszTargetKey: *const libc::c_char, - pszXAxisName: *const libc::c_char, - eXAxisOrientation: OGRAxisOrientation::Type, - pszYAxisName: *const libc::c_char, - eYAxisOrientation: OGRAxisOrientation::Type, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetScale(hArray: GDALMDArrayH, pbHasValue: *mut libc::c_int) -> f64; } extern "C" { - #[doc = " Albers Conic Equal Area"] - pub fn OSRSetACEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetScaleEx( + hArray: GDALMDArrayH, + pbHasValue: *mut libc::c_int, + peStorageType: *mut GDALDataType::Type, + ) -> f64; } extern "C" { - #[doc = " Azimuthal Equidistant"] - pub fn OSRSetAE( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArraySetOffset(hArray: GDALMDArrayH, dfOffset: f64) -> libc::c_int; } extern "C" { - #[doc = " Bonne"] - pub fn OSRSetBonne( - hSRS: OGRSpatialReferenceH, - dfStandardParallel: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArraySetOffsetEx( + hArray: GDALMDArrayH, + dfOffset: f64, + eStorageType: GDALDataType::Type, + ) -> libc::c_int; } extern "C" { - #[doc = " Cylindrical Equal Area"] - pub fn OSRSetCEA( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetOffset(hArray: GDALMDArrayH, pbHasValue: *mut libc::c_int) -> f64; } extern "C" { - #[doc = " Cassini-Soldner"] - pub fn OSRSetCS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetOffsetEx( + hArray: GDALMDArrayH, + pbHasValue: *mut libc::c_int, + peStorageType: *mut GDALDataType::Type, + ) -> f64; } extern "C" { - #[doc = " Equidistant Conic"] - pub fn OSRSetEC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetBlockSize(hArray: GDALMDArrayH, pnCount: *mut usize) -> *mut GUInt64; } extern "C" { - #[doc = " Eckert I-VI"] - pub fn OSRSetEckert( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArraySetUnit(hArray: GDALMDArrayH, arg1: *const libc::c_char) -> libc::c_int; } extern "C" { - #[doc = " Eckert IV"] - pub fn OSRSetEckertIV( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetUnit(hArray: GDALMDArrayH) -> *const libc::c_char; } extern "C" { - #[doc = " Eckert VI"] - pub fn OSRSetEckertVI( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArraySetSpatialRef(arg1: GDALMDArrayH, arg2: OGRSpatialReferenceH) -> libc::c_int; } extern "C" { - #[doc = " Equirectangular"] - pub fn OSRSetEquirectangular( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetSpatialRef(hArray: GDALMDArrayH) -> OGRSpatialReferenceH; } extern "C" { - #[doc = " Equirectangular generalized form"] - pub fn OSRSetEquirectangular2( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfPseudoStdParallel1: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetProcessingChunkSize( + hArray: GDALMDArrayH, + pnCount: *mut usize, + nMaxChunkMemory: usize, + ) -> *mut usize; } extern "C" { - #[doc = " Gall Stereograpic"] - pub fn OSRSetGS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetStructuralInfo(hArray: GDALMDArrayH) -> CSLConstList; } extern "C" { - #[doc = " Goode Homolosine"] - pub fn OSRSetGH( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetView( + hArray: GDALMDArrayH, + pszViewExpr: *const libc::c_char, + ) -> GDALMDArrayH; } extern "C" { - #[doc = " Interrupted Goode Homolosine"] - pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; + pub fn GDALMDArrayTranspose( + hArray: GDALMDArrayH, + nNewAxisCount: usize, + panMapNewAxisToOldAxis: *const libc::c_int, + ) -> GDALMDArrayH; } extern "C" { - #[doc = " GEOS - Geostationary Satellite View"] - pub fn OSRSetGEOS( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfSatelliteHeight: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetUnscaled(hArray: GDALMDArrayH) -> GDALMDArrayH; } extern "C" { - #[doc = " Gauss Schreiber Transverse Mercator"] - pub fn OSRSetGaussSchreiberTMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetMask(hArray: GDALMDArrayH, papszOptions: CSLConstList) -> GDALMDArrayH; } extern "C" { - #[doc = " Gnomonic"] - pub fn OSRSetGnomonic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayAsClassicDataset( + hArray: GDALMDArrayH, + iXDim: usize, + iYDim: usize, + ) -> GDALDatasetH; } extern "C" { - #[doc = " Hotine Oblique Mercator using azimuth angle"] - pub fn OSRSetHOM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayGetStatistics( + hArray: GDALMDArrayH, + arg1: GDALDatasetH, + bApproxOK: libc::c_int, + bForce: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + pnValidCount: *mut GUInt64, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> CPLErr::Type; } extern "C" { - pub fn OSRSetHOMAC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfRectToSkew: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALMDArrayComputeStatistics( + hArray: GDALMDArrayH, + arg1: GDALDatasetH, + bApproxOK: libc::c_int, + pdfMin: *mut f64, + pdfMax: *mut f64, + pdfMean: *mut f64, + pdfStdDev: *mut f64, + pnValidCount: *mut GUInt64, + arg2: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ) -> libc::c_int; } extern "C" { - #[doc = " Hotine Oblique Mercator using two points on centerline"] - pub fn OSRSetHOM2PNO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeRelease(hAttr: GDALAttributeH); } extern "C" { - #[doc = " International Map of the World Polyconic"] - pub fn OSRSetIWMPolyconic( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLat2: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALReleaseAttributes(attributes: *mut GDALAttributeH, nCount: usize); } extern "C" { - #[doc = " Krovak Oblique Conic Conformal"] - pub fn OSRSetKrovak( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfAzimuth: f64, - dfPseudoStdParallelLat: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeGetName(hAttr: GDALAttributeH) -> *const libc::c_char; } extern "C" { - #[doc = " Lambert Azimuthal Equal-Area"] - pub fn OSRSetLAEA( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeGetFullName(hAttr: GDALAttributeH) -> *const libc::c_char; } extern "C" { - #[doc = " Lambert Conformal Conic"] - pub fn OSRSetLCC( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeGetTotalElementsCount(hAttr: GDALAttributeH) -> GUInt64; } extern "C" { - #[doc = " Lambert Conformal Conic 1SP"] - pub fn OSRSetLCC1SP( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeGetDimensionCount(hAttr: GDALAttributeH) -> usize; } extern "C" { - #[doc = " Lambert Conformal Conic (Belgium)"] - pub fn OSRSetLCCB( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfStdP2: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeGetDimensionsSize( + hAttr: GDALAttributeH, + pnCount: *mut usize, + ) -> *mut GUInt64; } extern "C" { - #[doc = " Miller Cylindrical"] - pub fn OSRSetMC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeGetDataType(hAttr: GDALAttributeH) -> GDALExtendedDataTypeH; } extern "C" { - #[doc = " Mercator"] - pub fn OSRSetMercator( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeReadAsRaw(hAttr: GDALAttributeH, pnSize: *mut usize) -> *mut GByte; } extern "C" { - #[doc = " Mercator 2SP"] - pub fn OSRSetMercator2SP( - hSRS: OGRSpatialReferenceH, - dfStdP1: f64, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeFreeRawResult(hAttr: GDALAttributeH, raw: *mut GByte, nSize: usize); } extern "C" { - #[doc = " Mollweide"] - pub fn OSRSetMollweide( - hSRS: OGRSpatialReferenceH, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeReadAsString(hAttr: GDALAttributeH) -> *const libc::c_char; } extern "C" { - #[doc = " New Zealand Map Grid"] - pub fn OSRSetNZMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeReadAsInt(hAttr: GDALAttributeH) -> libc::c_int; } extern "C" { - #[doc = " Oblique Stereographic"] - pub fn OSRSetOS( - hSRS: OGRSpatialReferenceH, - dfOriginLat: f64, - dfCMeridian: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeReadAsDouble(hAttr: GDALAttributeH) -> f64; } extern "C" { - #[doc = " Orthographic"] - pub fn OSRSetOrthographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALAttributeReadAsStringArray(hAttr: GDALAttributeH) -> *mut *mut libc::c_char; +} +extern "C" { + pub fn GDALAttributeReadAsIntArray( + hAttr: GDALAttributeH, + pnCount: *mut usize, + ) -> *mut libc::c_int; +} +extern "C" { + pub fn GDALAttributeReadAsDoubleArray(hAttr: GDALAttributeH, pnCount: *mut usize) -> *mut f64; +} +extern "C" { + pub fn GDALAttributeWriteRaw( + hAttr: GDALAttributeH, + arg1: *const libc::c_void, + arg2: usize, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALAttributeWriteString( + hAttr: GDALAttributeH, + arg1: *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALAttributeWriteStringArray(hAttr: GDALAttributeH, arg1: CSLConstList) -> libc::c_int; +} +extern "C" { + pub fn GDALAttributeWriteInt(hAttr: GDALAttributeH, arg1: libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn GDALAttributeWriteDouble(hAttr: GDALAttributeH, arg1: f64) -> libc::c_int; +} +extern "C" { + pub fn GDALAttributeWriteDoubleArray( + hAttr: GDALAttributeH, + arg1: *const f64, + arg2: usize, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALDimensionRelease(hDim: GDALDimensionH); +} +extern "C" { + pub fn GDALReleaseDimensions(dims: *mut GDALDimensionH, nCount: usize); +} +extern "C" { + pub fn GDALDimensionGetName(hDim: GDALDimensionH) -> *const libc::c_char; +} +extern "C" { + pub fn GDALDimensionGetFullName(hDim: GDALDimensionH) -> *const libc::c_char; +} +extern "C" { + pub fn GDALDimensionGetType(hDim: GDALDimensionH) -> *const libc::c_char; +} +extern "C" { + pub fn GDALDimensionGetDirection(hDim: GDALDimensionH) -> *const libc::c_char; +} +extern "C" { + pub fn GDALDimensionGetSize(hDim: GDALDimensionH) -> GUInt64; +} +extern "C" { + pub fn GDALDimensionGetIndexingVariable(hDim: GDALDimensionH) -> GDALMDArrayH; +} +extern "C" { + pub fn GDALDimensionSetIndexingVariable( + hDim: GDALDimensionH, + hArray: GDALMDArrayH, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALComputeMedianCutPCT( + hRed: GDALRasterBandH, + hGreen: GDALRasterBandH, + hBlue: GDALRasterBandH, + pfnIncludePixel: ::std::option::Option< + unsafe extern "C" fn( + arg1: libc::c_int, + arg2: libc::c_int, + arg3: *mut libc::c_void, + ) -> libc::c_int, + >, + nColors: libc::c_int, + hColorTable: GDALColorTableH, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALDitherRGB2PCT( + hRed: GDALRasterBandH, + hGreen: GDALRasterBandH, + hBlue: GDALRasterBandH, + hTarget: GDALRasterBandH, + hColorTable: GDALColorTableH, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALChecksumImage( + hBand: GDALRasterBandH, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALComputeProximity( + hSrcBand: GDALRasterBandH, + hProximityBand: GDALRasterBandH, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALFillNodata( + hTargetBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + dfMaxSearchDist: f64, + bDeprecatedOption: libc::c_int, + nSmoothingIterations: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALPolygonize( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hOutLayer: OGRLayerH, + iPixValField: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALFPolygonize( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hOutLayer: OGRLayerH, + iPixValField: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALSieveFilter( + hSrcBand: GDALRasterBandH, + hMaskBand: GDALRasterBandH, + hDstBand: GDALRasterBandH, + nSizeThreshold: libc::c_int, + nConnectedness: libc::c_int, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +pub type GDALTransformerFunc = ::std::option::Option< + unsafe extern "C" fn( + pTransformerArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int, +>; +extern "C" { + pub fn GDALDestroyTransformer(pTransformerArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALUseTransformer( + pTransformerArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateSimilarTransformer( + psTransformerArg: *mut libc::c_void, + dfSrcRatioX: f64, + dfSrcRatioY: f64, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + hDstDS: GDALDatasetH, + pszDstWKT: *const libc::c_char, + bGCPUseOK: libc::c_int, + dfGCPErrorThreshold: f64, + nOrder: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer2( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer3( + pszSrcWKT: *const libc::c_char, + padfSrcGeoTransform: *const f64, + pszDstWKT: *const libc::c_char, + padfDstGeoTransform: *const f64, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGenImgProjTransformer4( + hSrcSRS: OGRSpatialReferenceH, + padfSrcGeoTransform: *const f64, + hDstSRS: OGRSpatialReferenceH, + padfDstGeoTransform: *const f64, + papszOptions: *const *const libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALSetGenImgProjTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); +} +extern "C" { + pub fn GDALDestroyGenImgProjTransformer(arg1: *mut libc::c_void); +} +extern "C" { + pub fn GDALGenImgProjTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALSetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *const f64); +} +extern "C" { + pub fn GDALGetTransformerDstGeoTransform(arg1: *mut libc::c_void, arg2: *mut f64); +} +extern "C" { + pub fn GDALCreateReprojectionTransformer( + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateReprojectionTransformerEx( + hSrcSRS: OGRSpatialReferenceH, + hDstSRS: OGRSpatialReferenceH, + papszOptions: *const *const libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyReprojectionTransformer(arg1: *mut libc::c_void); +} +extern "C" { + pub fn GDALReprojectionTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateGCPTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + nReqOrder: libc::c_int, + bReversed: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateGCPRefineTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + nReqOrder: libc::c_int, + bReversed: libc::c_int, + tolerance: f64, + minimumGcps: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyGCPTransformer(pTransformArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALGCPTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateTPSTransformer( + nGCPCount: libc::c_int, + pasGCPList: *const GDAL_GCP, + bReversed: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyTPSTransformer(pTransformArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALTPSTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateRPCTransformerV1( + psRPC: *mut GDALRPCInfoV1, + bReversed: libc::c_int, + dfPixErrThreshold: f64, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALCreateRPCTransformerV2( + psRPC: *const GDALRPCInfoV2, + bReversed: libc::c_int, + dfPixErrThreshold: f64, + papszOptions: *mut *mut libc::c_char, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyRPCTransformer(pTransformArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALRPCTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateGeoLocTransformer( + hBaseDS: GDALDatasetH, + papszGeolocationInfo: *mut *mut libc::c_char, + bReversed: libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALDestroyGeoLocTransformer(pTransformArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALGeoLocTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALCreateApproxTransformer( + pfnRawTransformer: GDALTransformerFunc, + pRawTransformerArg: *mut libc::c_void, + dfMaxError: f64, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn GDALApproxTransformerOwnsSubtransformer( + pCBData: *mut libc::c_void, + bOwnFlag: libc::c_int, + ); +} +extern "C" { + pub fn GDALDestroyApproxTransformer(pApproxArg: *mut libc::c_void); +} +extern "C" { + pub fn GDALApproxTransform( + pTransformArg: *mut libc::c_void, + bDstToSrc: libc::c_int, + nPointCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + panSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALSimpleImageWarp( + hSrcDS: GDALDatasetH, + hDstDS: GDALDatasetH, + nBandCount: libc::c_int, + panBandList: *mut libc::c_int, + pfnTransform: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + papszWarpOptions: *mut *mut libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALSuggestedWarpOutput( + hSrcDS: GDALDatasetH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeoTransformOut: *mut f64, + pnPixels: *mut libc::c_int, + pnLines: *mut libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALSuggestedWarpOutput2( + hSrcDS: GDALDatasetH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeoTransformOut: *mut f64, + pnPixels: *mut libc::c_int, + pnLines: *mut libc::c_int, + padfExtents: *mut f64, + nOptions: libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALSerializeTransformer( + pfnFunc: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + ) -> *mut CPLXMLNode; +} +extern "C" { + pub fn GDALDeserializeTransformer( + psTree: *mut CPLXMLNode, + ppfnFunc: *mut GDALTransformerFunc, + ppTransformArg: *mut *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALTransformGeolocations( + hXBand: GDALRasterBandH, + hYBand: GDALRasterBandH, + hZBand: GDALRasterBandH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + papszOptions: *mut *mut libc::c_char, + ) -> CPLErr::Type; +} +pub type GDALContourWriter = ::std::option::Option< + unsafe extern "C" fn( + dfLevel: f64, + nPoints: libc::c_int, + padfX: *mut f64, + padfY: *mut f64, + arg1: *mut libc::c_void, + ) -> CPLErr::Type, +>; +pub type GDALContourGeneratorH = *mut libc::c_void; +extern "C" { + pub fn GDAL_CG_Create( + nWidth: libc::c_int, + nHeight: libc::c_int, + bNoDataSet: libc::c_int, + dfNoDataValue: f64, + dfContourInterval: f64, + dfContourBase: f64, + pfnWriter: GDALContourWriter, + pCBData: *mut libc::c_void, + ) -> GDALContourGeneratorH; +} +extern "C" { + pub fn GDAL_CG_FeedLine(hCG: GDALContourGeneratorH, padfScanline: *mut f64) -> CPLErr::Type; +} +extern "C" { + pub fn GDAL_CG_Destroy(hCG: GDALContourGeneratorH); +} +extern "C" { + pub fn OGRContourWriter( + arg1: f64, + arg2: libc::c_int, + arg3: *mut f64, + arg4: *mut f64, + pInfo: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALContourGenerate( + hBand: GDALRasterBandH, + dfContourInterval: f64, + dfContourBase: f64, + nFixedLevelCount: libc::c_int, + padfFixedLevels: *mut f64, + bUseNoData: libc::c_int, + dfNoDataValue: f64, + hLayer: *mut libc::c_void, + iIDField: libc::c_int, + iElevField: libc::c_int, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALContourGenerateEx( + hBand: GDALRasterBandH, + hLayer: *mut libc::c_void, + options: CSLConstList, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +pub mod GDALViewshedMode { + pub type Type = libc::c_uint; + pub const GVM_Diagonal: Type = 1; + pub const GVM_Edge: Type = 2; + pub const GVM_Max: Type = 3; + pub const GVM_Min: Type = 4; +} +pub mod GDALViewshedOutputType { + pub type Type = libc::c_uint; + pub const GVOT_NORMAL: Type = 1; + pub const GVOT_MIN_TARGET_HEIGHT_FROM_DEM: Type = 2; + pub const GVOT_MIN_TARGET_HEIGHT_FROM_GROUND: Type = 3; +} +extern "C" { + pub fn GDALViewshedGenerate( + hBand: GDALRasterBandH, + pszDriverName: *const libc::c_char, + pszTargetRasterName: *const libc::c_char, + papszCreationOptions: CSLConstList, + dfObserverX: f64, + dfObserverY: f64, + dfObserverHeight: f64, + dfTargetHeight: f64, + dfVisibleVal: f64, + dfInvisibleVal: f64, + dfOutOfRangeVal: f64, + dfNoDataVal: f64, + dfCurvCoeff: f64, + eMode: GDALViewshedMode::Type, + dfMaxDistance: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + heightMode: GDALViewshedOutputType::Type, + papszExtraOptions: CSLConstList, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALRasterizeGeometries( + hDS: GDALDatasetH, + nBandCount: libc::c_int, + panBandList: *mut libc::c_int, + nGeomCount: libc::c_int, + pahGeometries: *mut OGRGeometryH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfGeomBurnValue: *mut f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRasterizeLayers( + hDS: GDALDatasetH, + nBandCount: libc::c_int, + panBandList: *mut libc::c_int, + nLayerCount: libc::c_int, + pahLayers: *mut OGRLayerH, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + padfLayerBurnValues: *mut f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALRasterizeLayersBuf( + pData: *mut libc::c_void, + nBufXSize: libc::c_int, + nBufYSize: libc::c_int, + eBufType: GDALDataType::Type, + nPixelSpace: libc::c_int, + nLineSpace: libc::c_int, + nLayerCount: libc::c_int, + pahLayers: *mut OGRLayerH, + pszDstProjection: *const libc::c_char, + padfDstGeoTransform: *mut f64, + pfnTransformer: GDALTransformerFunc, + pTransformArg: *mut libc::c_void, + dfBurnValue: f64, + papszOptions: *mut *mut libc::c_char, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +pub mod GDALGridAlgorithm { + pub type Type = libc::c_uint; + pub const GGA_InverseDistanceToAPower: Type = 1; + pub const GGA_MovingAverage: Type = 2; + pub const GGA_NearestNeighbor: Type = 3; + pub const GGA_MetricMinimum: Type = 4; + pub const GGA_MetricMaximum: Type = 5; + pub const GGA_MetricRange: Type = 6; + pub const GGA_MetricCount: Type = 7; + pub const GGA_MetricAverageDistance: Type = 8; + pub const GGA_MetricAverageDistancePts: Type = 9; + pub const GGA_Linear: Type = 10; + pub const GGA_InverseDistanceToAPowerNearestNeighbor: Type = 11; +} +extern "C" { + pub fn GDALGridCreate( + arg1: GDALGridAlgorithm::Type, + arg2: *const libc::c_void, + arg3: GUInt32, + arg4: *const f64, + arg5: *const f64, + arg6: *const f64, + arg7: f64, + arg8: f64, + arg9: f64, + arg10: f64, + arg11: GUInt32, + arg12: GUInt32, + arg13: GDALDataType::Type, + arg14: *mut libc::c_void, + arg15: GDALProgressFunc, + arg16: *mut libc::c_void, + ) -> CPLErr::Type; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridContext { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALGridContextCreate( + eAlgorithm: GDALGridAlgorithm::Type, + poOptions: *const libc::c_void, + nPoints: GUInt32, + padfX: *const f64, + padfY: *const f64, + padfZ: *const f64, + bCallerWillKeepPointArraysAlive: libc::c_int, + ) -> *mut GDALGridContext; +} +extern "C" { + pub fn GDALGridContextFree(psContext: *mut GDALGridContext); +} +extern "C" { + pub fn GDALGridContextProcess( + psContext: *mut GDALGridContext, + dfXMin: f64, + dfXMax: f64, + dfYMin: f64, + dfYMax: f64, + nXSize: GUInt32, + nYSize: GUInt32, + eType: GDALDataType::Type, + pData: *mut libc::c_void, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALComputeMatchingPoints( + hFirstImage: GDALDatasetH, + hSecondImage: GDALDatasetH, + papszOptions: *mut *mut libc::c_char, + pnGCPCount: *mut libc::c_int, + ) -> *mut GDAL_GCP; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriFacet { + pub anVertexIdx: [libc::c_int; 3usize], + pub anNeighborIdx: [libc::c_int; 3usize], +} +#[test] +fn bindgen_test_layout_GDALTriFacet() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(GDALTriFacet)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(GDALTriFacet)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).anVertexIdx as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALTriFacet), + "::", + stringify!(anVertexIdx) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).anNeighborIdx as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(GDALTriFacet), + "::", + stringify!(anNeighborIdx) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriBarycentricCoefficients { + pub dfMul1X: f64, + pub dfMul1Y: f64, + pub dfMul2X: f64, + pub dfMul2Y: f64, + pub dfCstX: f64, + pub dfCstY: f64, +} +#[test] +fn bindgen_test_layout_GDALTriBarycentricCoefficients() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(GDALTriBarycentricCoefficients)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALTriBarycentricCoefficients)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfMul1X as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfMul1X) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfMul1Y as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfMul1Y) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfMul2X as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfMul2X) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfMul2Y as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfMul2Y) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfCstX as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfCstX) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfCstY as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALTriBarycentricCoefficients), + "::", + stringify!(dfCstY) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTriangulation { + pub nFacets: libc::c_int, + pub pasFacets: *mut GDALTriFacet, + pub pasFacetCoefficients: *mut GDALTriBarycentricCoefficients, +} +#[test] +fn bindgen_test_layout_GDALTriangulation() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(GDALTriangulation)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALTriangulation)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nFacets as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALTriangulation), + "::", + stringify!(nFacets) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pasFacets as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALTriangulation), + "::", + stringify!(pasFacets) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pasFacetCoefficients as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALTriangulation), + "::", + stringify!(pasFacetCoefficients) + ) + ); +} +extern "C" { + pub fn GDALHasTriangulation() -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationCreateDelaunay( + nPoints: libc::c_int, + padfX: *const f64, + padfY: *const f64, + ) -> *mut GDALTriangulation; +} +extern "C" { + pub fn GDALTriangulationComputeBarycentricCoefficients( + psDT: *mut GDALTriangulation, + padfX: *const f64, + padfY: *const f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationComputeBarycentricCoordinates( + psDT: *const GDALTriangulation, + nFacetIdx: libc::c_int, + dfX: f64, + dfY: f64, + pdfL1: *mut f64, + pdfL2: *mut f64, + pdfL3: *mut f64, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationFindFacetBruteForce( + psDT: *const GDALTriangulation, + dfX: f64, + dfY: f64, + panOutputFacetIdx: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationFindFacetDirected( + psDT: *const GDALTriangulation, + nFacetIdx: libc::c_int, + dfX: f64, + dfY: f64, + panOutputFacetIdx: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn GDALTriangulationFree(psDT: *mut GDALTriangulation); +} +extern "C" { + pub fn GDALTriangulationTerminate(); +} +extern "C" { + pub fn GDALOpenVerticalShiftGrid( + pszProj4Geoidgrids: *const libc::c_char, + pbError: *mut libc::c_int, + ) -> GDALDatasetH; +} +extern "C" { + pub fn GDALApplyVerticalShiftGrid( + hSrcDataset: GDALDatasetH, + hGridDataset: GDALDatasetH, + bInverse: libc::c_int, + dfSrcUnitToMeter: f64, + dfDstUnitToMeter: f64, + papszOptions: *const *const libc::c_char, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALInfoOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALInfoOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALInfoOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALInfoOptionsForBinary, + ) -> *mut GDALInfoOptions; +} +extern "C" { + pub fn GDALInfoOptionsFree(psOptions: *mut GDALInfoOptions); +} +extern "C" { + pub fn GDALInfo(hDataset: GDALDatasetH, psOptions: *const GDALInfoOptions) + -> *mut libc::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTranslateOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALTranslateOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALTranslateOptionsForBinary, + ) -> *mut GDALTranslateOptions; +} +extern "C" { + pub fn GDALTranslateOptionsFree(psOptions: *mut GDALTranslateOptions); +} +extern "C" { + pub fn GDALTranslateOptionsSetProgress( + psOptions: *mut GDALTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALTranslate( + pszDestFilename: *const libc::c_char, + hSrcDataset: GDALDatasetH, + psOptions: *const GDALTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpAppOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpAppOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALWarpAppOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALWarpAppOptionsForBinary, + ) -> *mut GDALWarpAppOptions; +} +extern "C" { + pub fn GDALWarpAppOptionsFree(psOptions: *mut GDALWarpAppOptions); +} +extern "C" { + pub fn GDALWarpAppOptionsSetProgress( + psOptions: *mut GDALWarpAppOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALWarpAppOptionsSetQuiet(psOptions: *mut GDALWarpAppOptions, bQuiet: libc::c_int); +} +extern "C" { + pub fn GDALWarpAppOptionsSetWarpOption( + psOptions: *mut GDALWarpAppOptions, + pszKey: *const libc::c_char, + pszValue: *const libc::c_char, + ); +} +extern "C" { + pub fn GDALWarp( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALWarpAppOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALVectorTranslateOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALVectorTranslateOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALVectorTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALVectorTranslateOptionsForBinary, + ) -> *mut GDALVectorTranslateOptions; +} +extern "C" { + pub fn GDALVectorTranslateOptionsFree(psOptions: *mut GDALVectorTranslateOptions); +} +extern "C" { + pub fn GDALVectorTranslateOptionsSetProgress( + psOptions: *mut GDALVectorTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALVectorTranslate( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALVectorTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDEMProcessingOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALDEMProcessingOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALDEMProcessingOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALDEMProcessingOptionsForBinary, + ) -> *mut GDALDEMProcessingOptions; +} +extern "C" { + pub fn GDALDEMProcessingOptionsFree(psOptions: *mut GDALDEMProcessingOptions); +} +extern "C" { + pub fn GDALDEMProcessingOptionsSetProgress( + psOptions: *mut GDALDEMProcessingOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALDEMProcessing( + pszDestFilename: *const libc::c_char, + hSrcDataset: GDALDatasetH, + pszProcessing: *const libc::c_char, + pszColorFilename: *const libc::c_char, + psOptions: *const GDALDEMProcessingOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALNearblackOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALNearblackOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALNearblackOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALNearblackOptionsForBinary, + ) -> *mut GDALNearblackOptions; +} +extern "C" { + pub fn GDALNearblackOptionsFree(psOptions: *mut GDALNearblackOptions); +} +extern "C" { + pub fn GDALNearblackOptionsSetProgress( + psOptions: *mut GDALNearblackOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALNearblack( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + hSrcDS: GDALDatasetH, + psOptions: *const GDALNearblackOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALGridOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALGridOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALGridOptionsForBinary, + ) -> *mut GDALGridOptions; +} +extern "C" { + pub fn GDALGridOptionsFree(psOptions: *mut GDALGridOptions); +} +extern "C" { + pub fn GDALGridOptionsSetProgress( + psOptions: *mut GDALGridOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALGrid( + pszDest: *const libc::c_char, + hSrcDS: GDALDatasetH, + psOptions: *const GDALGridOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterizeOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALRasterizeOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALRasterizeOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALRasterizeOptionsForBinary, + ) -> *mut GDALRasterizeOptions; +} +extern "C" { + pub fn GDALRasterizeOptionsFree(psOptions: *mut GDALRasterizeOptions); +} +extern "C" { + pub fn GDALRasterizeOptionsSetProgress( + psOptions: *mut GDALRasterizeOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALRasterize( + pszDest: *const libc::c_char, + hDstDS: GDALDatasetH, + hSrcDS: GDALDatasetH, + psOptions: *const GDALRasterizeOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALBuildVRTOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALBuildVRTOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALBuildVRTOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALBuildVRTOptionsForBinary, + ) -> *mut GDALBuildVRTOptions; +} +extern "C" { + pub fn GDALBuildVRTOptionsFree(psOptions: *mut GDALBuildVRTOptions); +} +extern "C" { + pub fn GDALBuildVRTOptionsSetProgress( + psOptions: *mut GDALBuildVRTOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALBuildVRT( + pszDest: *const libc::c_char, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + papszSrcDSNames: *const *const libc::c_char, + psOptions: *const GDALBuildVRTOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimInfoOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimInfoOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALMultiDimInfoOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALMultiDimInfoOptionsForBinary, + ) -> *mut GDALMultiDimInfoOptions; +} +extern "C" { + pub fn GDALMultiDimInfoOptionsFree(psOptions: *mut GDALMultiDimInfoOptions); +} +extern "C" { + pub fn GDALMultiDimInfo( + hDataset: GDALDatasetH, + psOptions: *const GDALMultiDimInfoOptions, + ) -> *mut libc::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimTranslateOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALMultiDimTranslateOptionsForBinary { + _unused: [u8; 0], +} +extern "C" { + pub fn GDALMultiDimTranslateOptionsNew( + papszArgv: *mut *mut libc::c_char, + psOptionsForBinary: *mut GDALMultiDimTranslateOptionsForBinary, + ) -> *mut GDALMultiDimTranslateOptions; +} +extern "C" { + pub fn GDALMultiDimTranslateOptionsFree(psOptions: *mut GDALMultiDimTranslateOptions); +} +extern "C" { + pub fn GDALMultiDimTranslateOptionsSetProgress( + psOptions: *mut GDALMultiDimTranslateOptions, + pfnProgress: GDALProgressFunc, + pProgressData: *mut libc::c_void, + ); +} +extern "C" { + pub fn GDALMultiDimTranslate( + pszDest: *const libc::c_char, + hDstDataset: GDALDatasetH, + nSrcCount: libc::c_int, + pahSrcDS: *mut GDALDatasetH, + psOptions: *const GDALMultiDimTranslateOptions, + pbUsageError: *mut libc::c_int, + ) -> GDALDatasetH; +} +pub mod OGRAxisOrientation { + pub type Type = libc::c_uint; + pub const OAO_Other: Type = 0; + pub const OAO_North: Type = 1; + pub const OAO_South: Type = 2; + pub const OAO_East: Type = 3; + pub const OAO_West: Type = 4; + pub const OAO_Up: Type = 5; + pub const OAO_Down: Type = 6; +} +extern "C" { + pub fn OSRAxisEnumToName(eOrientation: OGRAxisOrientation::Type) -> *const libc::c_char; +} +extern "C" { + pub fn OSRSetPROJSearchPaths(papszPaths: *const *const libc::c_char); +} +extern "C" { + pub fn OSRGetPROJSearchPaths() -> *mut *mut libc::c_char; +} +extern "C" { + pub fn OSRSetPROJAuxDbPaths(papszPaths: *const *const libc::c_char); +} +extern "C" { + pub fn OSRGetPROJAuxDbPaths() -> *mut *mut libc::c_char; +} +extern "C" { + pub fn OSRGetPROJVersion( + pnMajor: *mut libc::c_int, + pnMinor: *mut libc::c_int, + pnPatch: *mut libc::c_int, + ); +} +extern "C" { + pub fn OSRNewSpatialReference(arg1: *const libc::c_char) -> OGRSpatialReferenceH; +} +extern "C" { + pub fn OSRCloneGeogCS(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; +} +extern "C" { + pub fn OSRClone(arg1: OGRSpatialReferenceH) -> OGRSpatialReferenceH; +} +extern "C" { + pub fn OSRDestroySpatialReference(arg1: OGRSpatialReferenceH); +} +extern "C" { + pub fn OSRReference(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRDereference(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRRelease(arg1: OGRSpatialReferenceH); +} +extern "C" { + pub fn OSRValidate(arg1: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromEPSG(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromEPSGA(arg1: OGRSpatialReferenceH, arg2: libc::c_int) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromWkt( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromProj4( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromESRI( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromPCI( + hSRS: OGRSpatialReferenceH, + arg1: *const libc::c_char, + arg2: *const libc::c_char, + arg3: *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromUSGS( + arg1: OGRSpatialReferenceH, + arg2: libc::c_long, + arg3: libc::c_long, + arg4: *mut f64, + arg5: libc::c_long, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromXML(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromDict( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromPanorama( + arg1: OGRSpatialReferenceH, + arg2: libc::c_long, + arg3: libc::c_long, + arg4: libc::c_long, + arg5: *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromOzi( + arg1: OGRSpatialReferenceH, + arg2: *const *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromMICoordSys( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromERM( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRImportFromUrl(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToWkt(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) + -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToWktEx( + arg1: OGRSpatialReferenceH, + ppszResult: *mut *mut libc::c_char, + papszOptions: *const *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPrettyWkt( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPROJJSON( + hSRS: OGRSpatialReferenceH, + ppszReturn: *mut *mut libc::c_char, + papszOptions: *const *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToProj4( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPCI( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: *mut *mut libc::c_char, + arg4: *mut *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToUSGS( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_long, + arg3: *mut libc::c_long, + arg4: *mut *mut f64, + arg5: *mut libc::c_long, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToXML( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + arg3: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToPanorama( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_long, + arg3: *mut libc::c_long, + arg4: *mut libc::c_long, + arg5: *mut libc::c_long, + arg6: *mut f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToMICoordSys( + arg1: OGRSpatialReferenceH, + arg2: *mut *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRExportToERM( + arg1: OGRSpatialReferenceH, + arg2: *mut libc::c_char, + arg3: *mut libc::c_char, + arg4: *mut libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRMorphToESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRMorphFromESRI(arg1: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRConvertToOtherProjection( + hSRS: OGRSpatialReferenceH, + pszTargetProjection: *const libc::c_char, + papszOptions: *const *const libc::c_char, + ) -> OGRSpatialReferenceH; +} +extern "C" { + pub fn OSRGetName(hSRS: OGRSpatialReferenceH) -> *const libc::c_char; +} +extern "C" { + pub fn OSRSetAttrValue( + hSRS: OGRSpatialReferenceH, + pszNodePath: *const libc::c_char, + pszNewNodeValue: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetAttrValue( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + iChild: libc::c_int, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRSetAngularUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetAngularUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; +} +extern "C" { + pub fn OSRSetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetTargetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *const libc::c_char, + arg4: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetLinearUnitsAndUpdateParameters( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetLinearUnits(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; +} +extern "C" { + pub fn OSRGetTargetLinearUnits( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: *mut *mut libc::c_char, + ) -> f64; +} +extern "C" { + pub fn OSRGetPrimeMeridian(arg1: OGRSpatialReferenceH, arg2: *mut *mut libc::c_char) -> f64; +} +extern "C" { + pub fn OSRIsGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsDerivedGeographic(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsLocal(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsProjected(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsCompound(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsGeocentric(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsVertical(arg1: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSameGeogCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSameVertCS(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSame(arg1: OGRSpatialReferenceH, arg2: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRIsSameEx( + arg1: OGRSpatialReferenceH, + arg2: OGRSpatialReferenceH, + papszOptions: *const *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn OSRSetLocalCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetProjCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGeocCS(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetWellKnownGeogCS( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetFromUserInput( + hSRS: OGRSpatialReferenceH, + arg1: *const libc::c_char, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRCopyGeogCSFrom( + hSRS: OGRSpatialReferenceH, + hSrcSRS: OGRSpatialReferenceH, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetTOWGS84( + hSRS: OGRSpatialReferenceH, + arg1: f64, + arg2: f64, + arg3: f64, + arg4: f64, + arg5: f64, + arg6: f64, + arg7: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetTOWGS84( + hSRS: OGRSpatialReferenceH, + arg1: *mut f64, + arg2: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRAddGuessedTOWGS84(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetCompoundCS( + hSRS: OGRSpatialReferenceH, + pszName: *const libc::c_char, + hHorizSRS: OGRSpatialReferenceH, + hVertSRS: OGRSpatialReferenceH, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRPromoteTo3D(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) + -> OGRErr::Type; +} +extern "C" { + pub fn OSRDemoteTo2D(hSRS: OGRSpatialReferenceH, pszName: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGeogCS( + hSRS: OGRSpatialReferenceH, + pszGeogName: *const libc::c_char, + pszDatumName: *const libc::c_char, + pszEllipsoidName: *const libc::c_char, + dfSemiMajor: f64, + dfInvFlattening: f64, + pszPMName: *const libc::c_char, + dfPMOffset: f64, + pszUnits: *const libc::c_char, + dfConvertToRadians: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetVertCS( + hSRS: OGRSpatialReferenceH, + pszVertCSName: *const libc::c_char, + pszVertDatumName: *const libc::c_char, + nVertDatumType: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetSemiMajor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRGetSemiMinor(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRGetInvFlattening(arg1: OGRSpatialReferenceH, arg2: *mut OGRErr::Type) -> f64; +} +extern "C" { + pub fn OSRSetAuthority( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + pszAuthority: *const libc::c_char, + nCode: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetAuthorityCode( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRGetAuthorityName( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRGetAreaOfUse( + hSRS: OGRSpatialReferenceH, + pdfWestLongitudeDeg: *mut f64, + pdfSouthLatitudeDeg: *mut f64, + pdfEastLongitudeDeg: *mut f64, + pdfNorthLatitudeDeg: *mut f64, + ppszAreaName: *mut *const libc::c_char, + ) -> libc::c_int; +} +extern "C" { + pub fn OSRSetProjection(arg1: OGRSpatialReferenceH, arg2: *const libc::c_char) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetProjParm( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetProjParm( + hSRS: OGRSpatialReferenceH, + pszParamName: *const libc::c_char, + dfDefault: f64, + arg1: *mut OGRErr::Type, + ) -> f64; +} +extern "C" { + pub fn OSRSetNormProjParm( + arg1: OGRSpatialReferenceH, + arg2: *const libc::c_char, + arg3: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetNormProjParm( + hSRS: OGRSpatialReferenceH, + pszParamName: *const libc::c_char, + dfDefault: f64, + arg1: *mut OGRErr::Type, + ) -> f64; +} +extern "C" { + pub fn OSRSetUTM( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNorth: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRGetUTMZone(hSRS: OGRSpatialReferenceH, pbNorth: *mut libc::c_int) -> libc::c_int; +} +extern "C" { + pub fn OSRSetStatePlane( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNAD83: libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetStatePlaneWithUnits( + hSRS: OGRSpatialReferenceH, + nZone: libc::c_int, + bNAD83: libc::c_int, + pszOverrideUnitName: *const libc::c_char, + dfOverrideUnit: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRAutoIdentifyEPSG(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRFindMatches( + hSRS: OGRSpatialReferenceH, + papszOptions: *mut *mut libc::c_char, + pnEntries: *mut libc::c_int, + ppanMatchConfidence: *mut *mut libc::c_int, + ) -> *mut OGRSpatialReferenceH; +} +extern "C" { + pub fn OSRFreeSRSArray(pahSRS: *mut OGRSpatialReferenceH); +} +extern "C" { + pub fn OSREPSGTreatsAsLatLong(hSRS: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSREPSGTreatsAsNorthingEasting(hSRS: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRGetAxis( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + iAxis: libc::c_int, + peOrientation: *mut OGRAxisOrientation::Type, + ) -> *const libc::c_char; +} +extern "C" { + pub fn OSRGetAxesCount(hSRS: OGRSpatialReferenceH) -> libc::c_int; +} +extern "C" { + pub fn OSRSetAxes( + hSRS: OGRSpatialReferenceH, + pszTargetKey: *const libc::c_char, + pszXAxisName: *const libc::c_char, + eXAxisOrientation: OGRAxisOrientation::Type, + pszYAxisName: *const libc::c_char, + eYAxisOrientation: OGRAxisOrientation::Type, + ) -> OGRErr::Type; +} +pub mod OSRAxisMappingStrategy { + pub type Type = libc::c_uint; + pub const OAMS_TRADITIONAL_GIS_ORDER: Type = 0; + pub const OAMS_AUTHORITY_COMPLIANT: Type = 1; + pub const OAMS_CUSTOM: Type = 2; +} +extern "C" { + pub fn OSRGetAxisMappingStrategy(hSRS: OGRSpatialReferenceH) -> OSRAxisMappingStrategy::Type; +} +extern "C" { + pub fn OSRSetAxisMappingStrategy( + hSRS: OGRSpatialReferenceH, + strategy: OSRAxisMappingStrategy::Type, + ); +} +extern "C" { + pub fn OSRGetDataAxisToSRSAxisMapping( + hSRS: OGRSpatialReferenceH, + pnCount: *mut libc::c_int, + ) -> *const libc::c_int; +} +extern "C" { + pub fn OSRSetDataAxisToSRSAxisMapping( + hSRS: OGRSpatialReferenceH, + nMappingSize: libc::c_int, + panMapping: *const libc::c_int, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetACEA( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetAE( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetBonne( + hSRS: OGRSpatialReferenceH, + dfStandardParallel: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetCEA( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetCS( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetEC( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetEckert( + hSRS: OGRSpatialReferenceH, + nVariation: libc::c_int, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetEckertIV( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetEckertVI( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetEquirectangular( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetEquirectangular2( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfPseudoStdParallel1: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGS( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGH( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetIGH(hSRS: OGRSpatialReferenceH) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGEOS( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfSatelliteHeight: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGaussSchreiberTMercator( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetGnomonic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetHOM( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfRectToSkew: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetHOMAC( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfRectToSkew: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetHOM2PNO( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfLat1: f64, + dfLong1: f64, + dfLat2: f64, + dfLong2: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetIWMPolyconic( + hSRS: OGRSpatialReferenceH, + dfLat1: f64, + dfLat2: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetKrovak( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfAzimuth: f64, + dfPseudoStdParallelLat: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetLAEA( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetLCC( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetLCC1SP( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetLCCB( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfStdP2: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetMC( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetMercator( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetMercator2SP( + hSRS: OGRSpatialReferenceH, + dfStdP1: f64, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetMollweide( + hSRS: OGRSpatialReferenceH, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetNZMG( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetOS( + hSRS: OGRSpatialReferenceH, + dfOriginLat: f64, + dfCMeridian: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetOrthographic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetPolyconic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetPS( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetRobinson( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetSinusoidal( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetStereographic( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetSOC( + hSRS: OGRSpatialReferenceH, + dfLatitudeOfOrigin: f64, + dfCentralMeridian: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetTM( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetTMVariant( + hSRS: OGRSpatialReferenceH, + pszVariantName: *const libc::c_char, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetTMG( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetTMSO( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + dfScale: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetTPED( + hSRS: OGRSpatialReferenceH, + dfLat1: f64, + dfLong1: f64, + dfLat2: f64, + dfLong2: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetVDG( + hSRS: OGRSpatialReferenceH, + dfCenterLong: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetWagner( + hSRS: OGRSpatialReferenceH, + nVariation: libc::c_int, + dfCenterLat: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetQSC( + hSRS: OGRSpatialReferenceH, + dfCenterLat: f64, + dfCenterLong: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetSCH( + hSRS: OGRSpatialReferenceH, + dfPegLat: f64, + dfPegLong: f64, + dfPegHeading: f64, + dfPegHgt: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRSetVerticalPerspective( + hSRS: OGRSpatialReferenceH, + dfTopoOriginLat: f64, + dfTopoOriginLon: f64, + dfTopoOriginHeight: f64, + dfViewPointHeight: f64, + dfFalseEasting: f64, + dfFalseNorthing: f64, + ) -> OGRErr::Type; +} +extern "C" { + pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; +} +extern "C" { + pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; +} +extern "C" { + pub fn OSRCleanup(); +} +pub mod OSRCRSType { + pub type Type = libc::c_uint; + pub const OSR_CRS_TYPE_GEOGRAPHIC_2D: Type = 0; + pub const OSR_CRS_TYPE_GEOGRAPHIC_3D: Type = 1; + pub const OSR_CRS_TYPE_GEOCENTRIC: Type = 2; + pub const OSR_CRS_TYPE_PROJECTED: Type = 3; + pub const OSR_CRS_TYPE_VERTICAL: Type = 4; + pub const OSR_CRS_TYPE_COMPOUND: Type = 5; + pub const OSR_CRS_TYPE_OTHER: Type = 6; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OSRCRSInfo { + pub pszAuthName: *mut libc::c_char, + pub pszCode: *mut libc::c_char, + pub pszName: *mut libc::c_char, + pub eType: OSRCRSType::Type, + pub bDeprecated: libc::c_int, + pub bBboxValid: libc::c_int, + pub dfWestLongitudeDeg: f64, + pub dfSouthLatitudeDeg: f64, + pub dfEastLongitudeDeg: f64, + pub dfNorthLatitudeDeg: f64, + pub pszAreaName: *mut libc::c_char, + pub pszProjectionMethod: *mut libc::c_char, +} +#[test] +fn bindgen_test_layout_OSRCRSInfo() { + assert_eq!( + ::std::mem::size_of::(), + 88usize, + concat!("Size of: ", stringify!(OSRCRSInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OSRCRSInfo)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszAuthName as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszAuthName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszCode as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszCode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszName as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eType as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(eType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bDeprecated as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(bDeprecated) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).bBboxValid as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(bBboxValid) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfWestLongitudeDeg as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfWestLongitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfSouthLatitudeDeg as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfSouthLatitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfEastLongitudeDeg as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfEastLongitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).dfNorthLatitudeDeg as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(dfNorthLatitudeDeg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszAreaName as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszAreaName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pszProjectionMethod as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(OSRCRSInfo), + "::", + stringify!(pszProjectionMethod) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OSRCRSListParameters { + _unused: [u8; 0], +} +extern "C" { + pub fn OSRGetCRSInfoListFromDatabase( + pszAuthName: *const libc::c_char, + params: *const OSRCRSListParameters, + pnOutResultCount: *mut libc::c_int, + ) -> *mut *mut OSRCRSInfo; +} +extern "C" { + pub fn OSRDestroyCRSInfoList(list: *mut *mut OSRCRSInfo); +} +extern "C" { + pub fn OCTNewCoordinateTransformation( + hSourceSRS: OGRSpatialReferenceH, + hTargetSRS: OGRSpatialReferenceH, + ) -> OGRCoordinateTransformationH; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OGRCoordinateTransformationOptions { + _unused: [u8; 0], +} +pub type OGRCoordinateTransformationOptionsH = *mut OGRCoordinateTransformationOptions; +extern "C" { + pub fn OCTNewCoordinateTransformationOptions() -> OGRCoordinateTransformationOptionsH; +} +extern "C" { + pub fn OCTCoordinateTransformationOptionsSetOperation( + hOptions: OGRCoordinateTransformationOptionsH, + pszCO: *const libc::c_char, + bReverseCO: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn OCTCoordinateTransformationOptionsSetAreaOfInterest( + hOptions: OGRCoordinateTransformationOptionsH, + dfWestLongitudeDeg: f64, + dfSouthLatitudeDeg: f64, + dfEastLongitudeDeg: f64, + dfNorthLatitudeDeg: f64, + ) -> libc::c_int; +} +extern "C" { + pub fn OCTCoordinateTransformationOptionsSetDesiredAccuracy( + hOptions: OGRCoordinateTransformationOptionsH, + dfAccuracy: f64, + ) -> libc::c_int; +} +extern "C" { + pub fn OCTCoordinateTransformationOptionsSetBallparkAllowed( + hOptions: OGRCoordinateTransformationOptionsH, + bAllowBallpark: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn OCTDestroyCoordinateTransformationOptions(arg1: OGRCoordinateTransformationOptionsH); +} +extern "C" { + pub fn OCTNewCoordinateTransformationEx( + hSourceSRS: OGRSpatialReferenceH, + hTargetSRS: OGRSpatialReferenceH, + hOptions: OGRCoordinateTransformationOptionsH, + ) -> OGRCoordinateTransformationH; +} +extern "C" { + pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); +} +extern "C" { + pub fn OCTTransform( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + ) -> libc::c_int; +} +extern "C" { + pub fn OCTTransformEx( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + pabSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn OCTTransform4D( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + t: *mut f64, + pabSuccess: *mut libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn OCTTransform4DWithErrorCodes( + hCT: OGRCoordinateTransformationH, + nCount: libc::c_int, + x: *mut f64, + y: *mut f64, + z: *mut f64, + t: *mut f64, + panErrorCodes: *mut libc::c_int, + ) -> libc::c_int; +} +pub type CPLThreadFunc = ::std::option::Option; +extern "C" { + pub fn CPLLockFile(pszPath: *const libc::c_char, dfWaitInSeconds: f64) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLUnlockFile(hLock: *mut libc::c_void); +} +extern "C" { + pub fn CPLCreateMutex() -> *mut libc::c_void; +} +extern "C" { + pub fn CPLCreateMutexEx(nOptions: libc::c_int) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLCreateOrAcquireMutex( + arg1: *mut *mut libc::c_void, + dfWaitInSeconds: f64, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLCreateOrAcquireMutexEx( + arg1: *mut *mut libc::c_void, + dfWaitInSeconds: f64, + nOptions: libc::c_int, + ) -> libc::c_int; +} +extern "C" { + pub fn CPLAcquireMutex(hMutex: *mut libc::c_void, dfWaitInSeconds: f64) -> libc::c_int; +} +extern "C" { + pub fn CPLReleaseMutex(hMutex: *mut libc::c_void); +} +extern "C" { + pub fn CPLDestroyMutex(hMutex: *mut libc::c_void); +} +extern "C" { + pub fn CPLCleanupMasterMutex(); +} +extern "C" { + pub fn CPLCreateCond() -> *mut libc::c_void; +} +extern "C" { + pub fn CPLCondWait(hCond: *mut libc::c_void, hMutex: *mut libc::c_void); +} +pub mod CPLCondTimedWaitReason { + pub type Type = libc::c_uint; + pub const COND_TIMED_WAIT_COND: Type = 0; + pub const COND_TIMED_WAIT_TIME_OUT: Type = 1; + pub const COND_TIMED_WAIT_OTHER: Type = 2; +} +extern "C" { + pub fn CPLCondTimedWait( + hCond: *mut libc::c_void, + hMutex: *mut libc::c_void, + dfWaitInSeconds: f64, + ) -> CPLCondTimedWaitReason::Type; +} +extern "C" { + pub fn CPLCondSignal(hCond: *mut libc::c_void); +} +extern "C" { + pub fn CPLCondBroadcast(hCond: *mut libc::c_void); +} +extern "C" { + pub fn CPLDestroyCond(hCond: *mut libc::c_void); +} +extern "C" { + pub fn CPLGetPID() -> GIntBig; +} +extern "C" { + pub fn CPLGetCurrentProcessID() -> libc::c_int; +} +extern "C" { + pub fn CPLCreateThread(pfnMain: CPLThreadFunc, pArg: *mut libc::c_void) -> libc::c_int; +} +extern "C" { + pub fn CPLCreateJoinableThread( + pfnMain: CPLThreadFunc, + pArg: *mut libc::c_void, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLJoinThread(hJoinableThread: *mut libc::c_void); +} +extern "C" { + pub fn CPLSleep(dfWaitInSeconds: f64); +} +extern "C" { + pub fn CPLGetThreadingModel() -> *const libc::c_char; +} +extern "C" { + pub fn CPLGetNumCPUs() -> libc::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _CPLLock { + _unused: [u8; 0], +} +pub type CPLLock = _CPLLock; +pub mod CPLLockType { + pub type Type = libc::c_uint; + pub const LOCK_RECURSIVE_MUTEX: Type = 0; + pub const LOCK_ADAPTIVE_MUTEX: Type = 1; + pub const LOCK_SPIN: Type = 2; +} +extern "C" { + pub fn CPLCreateLock(eType: CPLLockType::Type) -> *mut CPLLock; +} +extern "C" { + pub fn CPLCreateOrAcquireLock(arg1: *mut *mut CPLLock, eType: CPLLockType::Type) + -> libc::c_int; +} +extern "C" { + pub fn CPLAcquireLock(arg1: *mut CPLLock) -> libc::c_int; +} +extern "C" { + pub fn CPLReleaseLock(arg1: *mut CPLLock); +} +extern "C" { + pub fn CPLDestroyLock(arg1: *mut CPLLock); +} +extern "C" { + pub fn CPLLockSetDebugPerf(arg1: *mut CPLLock, bEnableIn: libc::c_int); +} +extern "C" { + pub fn CPLGetTLS(nIndex: libc::c_int) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLGetTLSEx( + nIndex: libc::c_int, + pbMemoryErrorOccurred: *mut libc::c_int, + ) -> *mut libc::c_void; +} +extern "C" { + pub fn CPLSetTLS(nIndex: libc::c_int, pData: *mut libc::c_void, bFreeOnExit: libc::c_int); +} +pub type CPLTLSFreeFunc = ::std::option::Option; +extern "C" { + pub fn CPLSetTLSWithFreeFunc( + nIndex: libc::c_int, + pData: *mut libc::c_void, + pfnFree: CPLTLSFreeFunc, + ); +} +extern "C" { + pub fn CPLSetTLSWithFreeFuncEx( + nIndex: libc::c_int, + pData: *mut libc::c_void, + pfnFree: CPLTLSFreeFunc, + pbMemoryErrorOccurred: *mut libc::c_int, + ); +} +extern "C" { + pub fn CPLCleanupTLS(); +} +pub mod GDALResampleAlg { + pub type Type = libc::c_uint; + pub const GRA_NearestNeighbour: Type = 0; + pub const GRA_Bilinear: Type = 1; + pub const GRA_Cubic: Type = 2; + pub const GRA_CubicSpline: Type = 3; + pub const GRA_Lanczos: Type = 4; + pub const GRA_Average: Type = 5; + pub const GRA_Mode: Type = 6; + pub const GRA_Max: Type = 8; + pub const GRA_Min: Type = 9; + pub const GRA_Med: Type = 10; + pub const GRA_Q1: Type = 11; + pub const GRA_Q3: Type = 12; + pub const GRA_Sum: Type = 13; + pub const GRA_RMS: Type = 14; + pub const GRA_LAST_VALUE: Type = 14; +} +pub type GDALMaskFunc = ::std::option::Option< + unsafe extern "C" fn( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + papabyImageData: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pMask: *mut libc::c_void, + ) -> libc::c_int, +>; +extern "C" { + pub fn GDALWarpNoDataMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + papabyImageData: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + pbOutAllValid: *mut libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpDstAlphaMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpSrcAlphaMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + pbOutAllOpaque: *mut libc::c_int, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpSrcMaskMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; +} +extern "C" { + pub fn GDALWarpCutlineMasker( + pMaskFuncArg: *mut libc::c_void, + nBandCount: libc::c_int, + eType: GDALDataType::Type, + nXOff: libc::c_int, + nYOff: libc::c_int, + nXSize: libc::c_int, + nYSize: libc::c_int, + arg1: *mut *mut GByte, + bMaskIsFloat: libc::c_int, + pValidityMask: *mut libc::c_void, + ) -> CPLErr::Type; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct GDALWarpOptions { + pub papszWarpOptions: *mut *mut libc::c_char, + pub dfWarpMemoryLimit: f64, + pub eResampleAlg: GDALResampleAlg::Type, + pub eWorkingDataType: GDALDataType::Type, + pub hSrcDS: GDALDatasetH, + pub hDstDS: GDALDatasetH, + pub nBandCount: libc::c_int, + pub panSrcBands: *mut libc::c_int, + pub panDstBands: *mut libc::c_int, + pub nSrcAlphaBand: libc::c_int, + pub nDstAlphaBand: libc::c_int, + pub padfSrcNoDataReal: *mut f64, + pub padfSrcNoDataImag: *mut f64, + pub padfDstNoDataReal: *mut f64, + pub padfDstNoDataImag: *mut f64, + pub pfnProgress: GDALProgressFunc, + pub pProgressArg: *mut libc::c_void, + pub pfnTransformer: GDALTransformerFunc, + pub pTransformerArg: *mut libc::c_void, + pub papfnSrcPerBandValidityMaskFunc: *mut GDALMaskFunc, + pub papSrcPerBandValidityMaskFuncArg: *mut *mut libc::c_void, + pub pfnSrcValidityMaskFunc: GDALMaskFunc, + pub pSrcValidityMaskFuncArg: *mut libc::c_void, + pub pfnSrcDensityMaskFunc: GDALMaskFunc, + pub pSrcDensityMaskFuncArg: *mut libc::c_void, + pub pfnDstDensityMaskFunc: GDALMaskFunc, + pub pDstDensityMaskFuncArg: *mut libc::c_void, + pub pfnDstValidityMaskFunc: GDALMaskFunc, + pub pDstValidityMaskFuncArg: *mut libc::c_void, + pub pfnPreWarpChunkProcessor: ::std::option::Option< + unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, + >, + pub pPreWarpProcessorArg: *mut libc::c_void, + pub pfnPostWarpChunkProcessor: ::std::option::Option< + unsafe extern "C" fn(pKern: *mut libc::c_void, pArg: *mut libc::c_void) -> CPLErr::Type, + >, + pub pPostWarpProcessorArg: *mut libc::c_void, + pub hCutline: *mut libc::c_void, + pub dfCutlineBlendDist: f64, +} +#[test] +fn bindgen_test_layout_GDALWarpOptions() { + assert_eq!( + ::std::mem::size_of::(), + 264usize, + concat!("Size of: ", stringify!(GDALWarpOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(GDALWarpOptions)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papszWarpOptions as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papszWarpOptions) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfWarpMemoryLimit as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(dfWarpMemoryLimit) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).eResampleAlg as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(eResampleAlg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).eWorkingDataType as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(eWorkingDataType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hSrcDS as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hSrcDS) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hDstDS as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hDstDS) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nBandCount as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nBandCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).panSrcBands as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(panSrcBands) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).panDstBands as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(panDstBands) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nSrcAlphaBand as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nSrcAlphaBand) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).nDstAlphaBand as *const _ as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(nDstAlphaBand) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfSrcNoDataReal as *const _ as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfSrcNoDataReal) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfSrcNoDataImag as *const _ as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfSrcNoDataImag) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfDstNoDataReal as *const _ as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfDstNoDataReal) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).padfDstNoDataImag as *const _ as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(padfDstNoDataImag) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pfnProgress as *const _ as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnProgress) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pProgressArg as *const _ as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pProgressArg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pfnTransformer as *const _ as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnTransformer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pTransformerArg as *const _ as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pTransformerArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papfnSrcPerBandValidityMaskFunc as *const _ + as usize + }, + 136usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papfnSrcPerBandValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).papSrcPerBandValidityMaskFuncArg as *const _ + as usize + }, + 144usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(papSrcPerBandValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnSrcValidityMaskFunc as *const _ as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnSrcValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSrcValidityMaskFuncArg as *const _ as usize + }, + 160usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pSrcValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnSrcDensityMaskFunc as *const _ as usize + }, + 168usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnSrcDensityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pSrcDensityMaskFuncArg as *const _ as usize + }, + 176usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pSrcDensityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnDstDensityMaskFunc as *const _ as usize + }, + 184usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnDstDensityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pDstDensityMaskFuncArg as *const _ as usize + }, + 192usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pDstDensityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnDstValidityMaskFunc as *const _ as usize + }, + 200usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnDstValidityMaskFunc) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pDstValidityMaskFuncArg as *const _ as usize + }, + 208usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pDstValidityMaskFuncArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnPreWarpChunkProcessor as *const _ + as usize + }, + 216usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnPreWarpChunkProcessor) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pPreWarpProcessorArg as *const _ as usize + }, + 224usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pPreWarpProcessorArg) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pfnPostWarpChunkProcessor as *const _ + as usize + }, + 232usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pfnPostWarpChunkProcessor) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).pPostWarpProcessorArg as *const _ as usize + }, + 240usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(pPostWarpProcessorArg) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).hCutline as *const _ as usize }, + 248usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(hCutline) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).dfCutlineBlendDist as *const _ as usize + }, + 256usize, + concat!( + "Offset of field: ", + stringify!(GDALWarpOptions), + "::", + stringify!(dfCutlineBlendDist) + ) + ); } extern "C" { - #[doc = " Polyconic"] - pub fn OSRSetPolyconic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALCreateWarpOptions() -> *mut GDALWarpOptions; } extern "C" { - #[doc = " Polar Stereographic"] - pub fn OSRSetPS( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALDestroyWarpOptions(arg1: *mut GDALWarpOptions); } extern "C" { - #[doc = " Robinson"] - pub fn OSRSetRobinson( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALCloneWarpOptions(arg1: *const GDALWarpOptions) -> *mut GDALWarpOptions; } extern "C" { - #[doc = " Sinusoidal"] - pub fn OSRSetSinusoidal( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitDstNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } extern "C" { - #[doc = " Stereographic"] - pub fn OSRSetStereographic( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitSrcNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } extern "C" { - #[doc = " Swiss Oblique Cylindrical"] - pub fn OSRSetSOC( - hSRS: OGRSpatialReferenceH, - dfLatitudeOfOrigin: f64, - dfCentralMeridian: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitNoDataReal(arg1: *mut GDALWarpOptions, dNoDataReal: f64); } extern "C" { - #[doc = " Transverse Mercator"] - #[doc = ""] - #[doc = " Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 :"] - #[doc = " see OGRSpatialReference::exportToProj4()."] - pub fn OSRSetTM( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitDstNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); } extern "C" { - #[doc = " Transverse Mercator variant"] - pub fn OSRSetTMVariant( - hSRS: OGRSpatialReferenceH, - pszVariantName: *const libc::c_char, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitSrcNoDataImag(arg1: *mut GDALWarpOptions, dNoDataImag: f64); } extern "C" { - #[doc = " Tunesia Mining Grid"] - pub fn OSRSetTMG( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpResolveWorkingDataType(arg1: *mut GDALWarpOptions); } extern "C" { - #[doc = " Transverse Mercator (South Oriented)"] - pub fn OSRSetTMSO( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - dfScale: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALWarpInitDefaultBandMapping(arg1: *mut GDALWarpOptions, nBandCount: libc::c_int); } extern "C" { - #[doc = " TPED (Two Point Equi Distant)"] - pub fn OSRSetTPED( - hSRS: OGRSpatialReferenceH, - dfLat1: f64, - dfLong1: f64, - dfLat2: f64, - dfLong2: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALSerializeWarpOptions(arg1: *const GDALWarpOptions) -> *mut CPLXMLNode; } extern "C" { - #[doc = " VanDerGrinten"] - pub fn OSRSetVDG( - hSRS: OGRSpatialReferenceH, - dfCenterLong: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALDeserializeWarpOptions(arg1: *mut CPLXMLNode) -> *mut GDALWarpOptions; } extern "C" { - #[doc = " Wagner I -- VII"] - pub fn OSRSetWagner( - hSRS: OGRSpatialReferenceH, - nVariation: libc::c_int, - dfCenterLat: f64, - dfFalseEasting: f64, - dfFalseNorthing: f64, - ) -> OGRErr::Type; + pub fn GDALReprojectImage( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + hDstDS: GDALDatasetH, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfWarpMemoryLimit: f64, + dfMaxError: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + psOptions: *mut GDALWarpOptions, + ) -> CPLErr::Type; } extern "C" { - #[doc = " Quadrilateralized Spherical Cube"] - pub fn OSRSetQSC( - hSRS: OGRSpatialReferenceH, - dfCenterLat: f64, - dfCenterLong: f64, - ) -> OGRErr::Type; + pub fn GDALCreateAndReprojectImage( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstFilename: *const libc::c_char, + pszDstWKT: *const libc::c_char, + hDstDriver: GDALDriverH, + papszCreateOptions: *mut *mut libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfWarpMemoryLimit: f64, + dfMaxError: f64, + pfnProgress: GDALProgressFunc, + pProgressArg: *mut libc::c_void, + psOptions: *mut GDALWarpOptions, + ) -> CPLErr::Type; } extern "C" { - #[doc = " Spherical, Cross-track, Height"] - pub fn OSRSetSCH( - hSRS: OGRSpatialReferenceH, - dfPegLat: f64, - dfPegLong: f64, - dfPegHeading: f64, - dfPegHgt: f64, - ) -> OGRErr::Type; + pub fn GDALAutoCreateWarpedVRT( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfMaxError: f64, + psOptions: *const GDALWarpOptions, + ) -> GDALDatasetH; } extern "C" { - pub fn OSRCalcInvFlattening(dfSemiMajor: f64, dfSemiMinor: f64) -> f64; + pub fn GDALAutoCreateWarpedVRTEx( + hSrcDS: GDALDatasetH, + pszSrcWKT: *const libc::c_char, + pszDstWKT: *const libc::c_char, + eResampleAlg: GDALResampleAlg::Type, + dfMaxError: f64, + psOptions: *const GDALWarpOptions, + papszTransformerOptions: CSLConstList, + ) -> GDALDatasetH; } extern "C" { - pub fn OSRCalcSemiMinorFromInvFlattening(dfSemiMajor: f64, dfInvFlattening: f64) -> f64; + pub fn GDALCreateWarpedVRT( + hSrcDS: GDALDatasetH, + nPixels: libc::c_int, + nLines: libc::c_int, + padfGeoTransform: *mut f64, + psOptions: *mut GDALWarpOptions, + ) -> GDALDatasetH; } extern "C" { - pub fn OSRCleanup(); + pub fn GDALInitializeWarpedVRT(hDS: GDALDatasetH, psWO: *mut GDALWarpOptions) -> CPLErr::Type; } +pub type GDALWarpOperationH = *mut libc::c_void; extern "C" { - pub fn OCTNewCoordinateTransformation( - hSourceSRS: OGRSpatialReferenceH, - hTargetSRS: OGRSpatialReferenceH, - ) -> OGRCoordinateTransformationH; + pub fn GDALCreateWarpOperation(arg1: *const GDALWarpOptions) -> GDALWarpOperationH; } extern "C" { - pub fn OCTDestroyCoordinateTransformation(arg1: OGRCoordinateTransformationH); + pub fn GDALDestroyWarpOperation(arg1: GDALWarpOperationH); } extern "C" { - pub fn OCTTransform( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - ) -> libc::c_int; + pub fn GDALChunkAndWarpImage( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OCTTransformEx( - hCT: OGRCoordinateTransformationH, - nCount: libc::c_int, - x: *mut f64, - y: *mut f64, - z: *mut f64, - pabSuccess: *mut libc::c_int, - ) -> libc::c_int; + pub fn GDALChunkAndWarpMulti( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - #[doc = " @cond Doxygen_Suppress"] - pub fn OCTProj4Normalize(pszProj4Src: *const libc::c_char) -> *mut libc::c_char; + pub fn GDALWarpRegion( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: libc::c_int, + arg7: libc::c_int, + arg8: libc::c_int, + arg9: libc::c_int, + ) -> CPLErr::Type; } extern "C" { - pub fn OCTCleanupProjMutex(); + pub fn GDALWarpRegionToBuffer( + arg1: GDALWarpOperationH, + arg2: libc::c_int, + arg3: libc::c_int, + arg4: libc::c_int, + arg5: libc::c_int, + arg6: *mut libc::c_void, + arg7: GDALDataType::Type, + arg8: libc::c_int, + arg9: libc::c_int, + arg10: libc::c_int, + arg11: libc::c_int, + ) -> CPLErr::Type; } pub mod OGRErr { #[doc = " Type for a OGR error"] #[doc = ""] #[doc = "
"] - pub type Type = u32; + pub type Type = libc::c_uint; #[doc = " Success"] #[doc = ""] #[doc = "
"] diff --git a/gdal-sys/wrapper.h b/gdal-sys/wrapper.h index b82d0a1a..755556fa 100644 --- a/gdal-sys/wrapper.h +++ b/gdal-sys/wrapper.h @@ -1,9 +1,30 @@ -#include -#include -#include -#include -#include -#include +/** + * includes as in gdal/autotest/cpp/test_include_from_c_file.c + */ + +#include "cpl_atomic_ops.h" +#include "cpl_conv.h" +#include "cpl_csv.h" +#include "cpl_error.h" +#include "cpl_hash_set.h" +#include "cpl_list.h" +#include "cpl_minixml.h" +#include "cpl_port.h" +#include "cpl_progress.h" +#include "cpl_quad_tree.h" +#include "cpl_vsi.h" +#include "gdal_alg.h" +#include "gdal_version.h" +#include "gdal.h" +#include "gdal_utils.h" +#include "ogr_api.h" +#include "ogr_core.h" +#include "ogr_srs_api.h" + +/** + * extra includes + */ +#include "gdalwarper.h" /** * Type for a OGR error diff --git a/src/dataset.rs b/src/dataset.rs index 62ccabe3..7950d031 100644 --- a/src/dataset.rs +++ b/src/dataset.rs @@ -687,7 +687,7 @@ impl Dataset { let dialect_ptr = match dialect_c_str { None => std::ptr::null(), - Some(ref d) => d.as_ptr(), + Some(d) => d.as_ptr(), }; if let Some(spatial_filter) = spatial_filter { diff --git a/src/driver.rs b/src/driver.rs index 820a92ff..16b477e0 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -123,6 +123,8 @@ impl Driver { options_c as *mut *mut i8, ) }; + unsafe { gdal_sys::CSLDestroy(options_c) }; + if c_dataset.is_null() { return Err(_last_null_pointer_err("GDALCreate")); }; diff --git a/src/metadata.rs b/src/metadata.rs index 363aec66..61dee23c 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -27,6 +27,7 @@ pub trait Metadata: MajorObject { domains.push(_string(p)); } } + unsafe { gdal_sys::CSLDestroy(c_res) }; domains } diff --git a/src/spatial_ref/srs.rs b/src/spatial_ref/srs.rs index 751c6b5c..0ae99dee 100644 --- a/src/spatial_ref/srs.rs +++ b/src/spatial_ref/srs.rs @@ -203,14 +203,16 @@ impl SpatialRef { pub fn to_wkt(&self) -> Result { let mut c_wkt = ptr::null_mut(); let rv = unsafe { gdal_sys::OSRExportToWkt(self.0, &mut c_wkt) }; - if rv != OGRErr::OGRERR_NONE { + let res = if rv != OGRErr::OGRERR_NONE { Err(GdalError::OgrError { err: rv, method_name: "OSRExportToWkt", }) } else { Ok(_string(c_wkt)) - } + }; + unsafe { gdal_sys::VSIFree(c_wkt.cast::()) }; + res } pub fn morph_to_esri(&self) -> Result<()> { @@ -227,40 +229,46 @@ impl SpatialRef { pub fn to_pretty_wkt(&self) -> Result { let mut c_wkt = ptr::null_mut(); let rv = unsafe { gdal_sys::OSRExportToPrettyWkt(self.0, &mut c_wkt, false as c_int) }; - if rv != OGRErr::OGRERR_NONE { + let res = if rv != OGRErr::OGRERR_NONE { Err(GdalError::OgrError { err: rv, method_name: "OSRExportToPrettyWkt", }) } else { Ok(_string(c_wkt)) - } + }; + unsafe { gdal_sys::VSIFree(c_wkt.cast::()) }; + res } pub fn to_xml(&self) -> Result { let mut c_raw_xml = ptr::null_mut(); let rv = unsafe { gdal_sys::OSRExportToXML(self.0, &mut c_raw_xml, ptr::null()) }; - if rv != OGRErr::OGRERR_NONE { + let res = if rv != OGRErr::OGRERR_NONE { Err(GdalError::OgrError { err: rv, method_name: "OSRExportToXML", }) } else { Ok(_string(c_raw_xml)) - } + }; + unsafe { gdal_sys::VSIFree(c_raw_xml.cast::()) }; + res } pub fn to_proj4(&self) -> Result { let mut c_proj4str = ptr::null_mut(); let rv = unsafe { gdal_sys::OSRExportToProj4(self.0, &mut c_proj4str) }; - if rv != OGRErr::OGRERR_NONE { + let res = if rv != OGRErr::OGRERR_NONE { Err(GdalError::OgrError { err: rv, method_name: "OSRExportToProj4", }) } else { Ok(_string(c_proj4str)) - } + }; + unsafe { gdal_sys::VSIFree(c_proj4str.cast::()) }; + res } pub fn auth_name(&self) -> Result { diff --git a/src/vector/layer.rs b/src/vector/layer.rs index 4467000b..a1de4a00 100644 --- a/src/vector/layer.rs +++ b/src/vector/layer.rs @@ -198,16 +198,17 @@ impl<'a> Layer<'a> { Ok(()) } pub fn create_feature(&mut self, geometry: Geometry) -> Result<()> { - let c_feature = unsafe { gdal_sys::OGR_F_Create(self.defn.c_defn()) }; + let feature = Feature::new(&self.defn)?; + let c_geometry = unsafe { geometry.into_c_geometry() }; - let rv = unsafe { gdal_sys::OGR_F_SetGeometryDirectly(c_feature, c_geometry) }; + let rv = unsafe { gdal_sys::OGR_F_SetGeometryDirectly(feature.c_feature(), c_geometry) }; if rv != OGRErr::OGRERR_NONE { return Err(GdalError::OgrError { err: rv, method_name: "OGR_F_SetGeometryDirectly", }); } - let rv = unsafe { gdal_sys::OGR_L_CreateFeature(self.c_layer, c_feature) }; + let rv = unsafe { gdal_sys::OGR_L_CreateFeature(self.c_layer, feature.c_feature()) }; if rv != OGRErr::OGRERR_NONE { return Err(GdalError::OgrError { err: rv,