Polylabel-rs
A Rust implementation of the Polylabel algorithm
How to Use
extern crate polylabel;
use polylabel;
extern crate geo;
use ;
let coords = vec!;
let ls = LineString;
let poly = Polygon;
let label_pos = polylabel;
// Point(0.5625, 0.5625)
FFI
Call polylabel_ffi
with:
Array
(exterior Polygon ring)WrapperArray
(interior Polygon rings)tolerance
ac_float
The function returns a struct with two c_double
fields:
x_pos
y_pos
A Python example is available in ffi.py