<p dir="auto">The Qhull library used for the Voronoi diagram calculation has floating number imprecision. If the points differ only 5 digits after the decimal point (e.g. geographic coordinates), only one region is determined.<br>
These imprecisions are already mentioned in the  <a href="http://www.qhull.org/html/qh-impre.htm" rel="nofollow">Qhull documentation</a>.</p>
<p dir="auto">Is a note/warning in the documentation appropriate? Maybe with a link to the correct Qhull flag Or could a check be added to get a warning, if there are probably imprecison?</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from scipy.spatial import voronoi_plot_2d, Voronoi
import numpy as np
import matplotlib.pyplot as plt

data_x = 40 + np.random.random(50) / 1000
data_y = 10 + np.random.random(50) / 1000
points = list(zip(data_x, data_y))

vor = Voronoi(points)
voronoi_plot_2d(vor)
plt.show()"><pre class="notranslate"><code class="notranslate">from scipy.spatial import voronoi_plot_2d, Voronoi
import numpy as np
import matplotlib.pyplot as plt

data_x = 40 + np.random.random(50) / 1000
data_y = 10 + np.random.random(50) / 1000
points = list(zip(data_x, data_y))

vor = Voronoi(points)
voronoi_plot_2d(vor)
plt.show()
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/15113257/61204212-e4a4a980-a6ec-11e9-895a-e79b40e2af4a.png"><img src="https://user-images.githubusercontent.com/15113257/61204212-e4a4a980-a6ec-11e9-895a-e79b40e2af4a.png" alt="grafik" style="max-width: 100%;"></a></p>
<h3 dir="auto">Scipy/Numpy/Python version information:</h3>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.3.0 1.17.0rc1 sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">1.3.0 1.17.0rc1 sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)
</code></pre></div>
<p dir="auto">A little context: We're trying to use Voronoi diagrams with points in GIS shapefiles, which have coordinates with large numbers like <code class="notranslate">[470121.0, 5118838.0999999996]</code></p>
<p dir="auto">When I run <code class="notranslate">scipy.spatial.Voronoi()</code> on raw points I get:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1063391/21623463/5922aa54-d1b7-11e6-8be1-2a4bed665584.png"><img src="https://cloud.githubusercontent.com/assets/1063391/21623463/5922aa54-d1b7-11e6-8be1-2a4bed665584.png" alt="figure_1" style="max-width: 100%;"></a></p>
<p dir="auto">And this is is weird to me. There are shapes but they are really sparse.</p>
<p dir="auto">If I shift everything closer to the origin and retry I get:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1063391/21623475/6611599a-d1b7-11e6-8052-170861748c86.png"><img src="https://cloud.githubusercontent.com/assets/1063391/21623475/6611599a-d1b7-11e6-8052-170861748c86.png" alt="figure_2" style="max-width: 100%;"></a></p>
<p dir="auto">That second case is what I expect. This is my first time using this library so I'm not 100% sure I'm not at fault here.</p>
<p dir="auto">Is this known behavior? Should I just transform my points every time I want to use this?</p>