Implements precision on Decode and Encode

Some tools like OSRM uses the same algorithm but with different precision,; this patch allows to indicate precision on function Decode and Encode.