Add granularity parameter to specify the precision of the generated coordinates

(1000 by default for 0.001 as smallest diff)