Esempio n. 1
0
 def save(line):
     if len(line.points) <= 2:
         raise Exception("length of input or reference is below 3. Scale-Matching lines of size <3 is not possible.")
     # only use dbline if to be committed by session/stored or retrieved from db
     tobesaved = DBLine.from_numpy_array(line.to_numpy_array())
     tobesaved.store()
     log.info("created line id %d" % (tobesaved.id))
     return tobesaved.id