Function polyline_ffi::decode_polyline_ffi
[−]
[src]
pub extern fn decode_polyline_ffi(pl: *const c_char,
precision: uint32_t)
-> Array
Convert a Polyline into an array of coordinates
Callers must pass two arguments:
- a pointer to
NUL-terminated characters (char*) - an unsigned 32-bit
intfor precision (5 for Google Polylines, 6 for OSRM and Valhalla Polylines)
A decoding failure will return an Array whose data field is [[NaN, NaN]], and whose len field is 1.
Implementations calling this function must call drop_float_array
with the returned Array, in order to free the memory it allocates.
Safety
This function is unsafe because it accesses a raw pointer which could contain arbitrary data