geo-polygonize-core 0.7.0

A native Rust port of the JTS/GEOS polygonization algorithm. Reconstruct valid polygons from a set of lines.
Documentation
use arrow::ffi::{FFI_ArrowArray, FFI_ArrowSchema};
use geo_polygonize_core::ffi::{polygonize_ffi, PolygonizerOptions};

#[test]
fn test_ffi_null_pointers() {
    let mut array = FFI_ArrowArray::empty();
    let mut schema = FFI_ArrowSchema::empty();
    let options = PolygonizerOptions {
        node_input: 0,
        snap_grid_size: 1e-10,
        extract_only_polygonal: 0,
    };

    let status = unsafe {
        polygonize_ffi(
            std::ptr::null_mut(),
            &mut schema,
            &mut array,
            &mut schema,
            &options,
        )
    };
    assert_eq!(status, 1);
}