geoplotlib
geoplotlib copied to clipboard
convexhull issue
Hi, I had this problem while using KMeansLayer: raise Exception('convexhull requires at least 3 points') how can I use it?
ps: my data file is a txt file, and it has three columns (id, lon, lat).
convexhull does require at least 3 points
Try modifying kmeans.py
for l in set(labels):
self.painter.set_color(self.cmap[l])
if len(x[labels == l]) >= 3:
self.painter.convexhull(x[labels == l], y[labels == l])
self.painter.points(x[labels == l], y[labels == l], 2)