I am retrieving a set of latitude and longitudinal points from an sqlite database as this:
cur = con.execute("SELECT DISTINCT latitude, longitude FROM MessageType1 WHERE latitude>{bottomlat} AND latitude<={toplat} AND longitude>{bottomlong} AND longitude<={toplong}".format(bottomlat = bottomlat, toplat = toplat, bottomlong = bottomlong, toplong = toplong))
However, as I am supposed to make a ConvexHull (http://ift.tt/1K5xQtQ) which has an ndarray as input, I need to save the results for cur as a ndarray. How would I do that?
Right now I fetch the values as :
positions = [[floats(x[0]) floats(x[1])] for x in cur]
Is this correct?
Aucun commentaire:
Enregistrer un commentaire