def handle(self, **options):
'''
In this example command, the values that come from the user input are
added up and the result is printed in the screen.
'''
stack = options['path'][0]
output_vector_file = '/Users/agutierrez/%s.gpkg' % get_basename(stack)
segmentation = bis.Model()
shapes, transform, meta = segmentation.predict(stack)
# Vectorize
#shapes = features.shapes(segments.astype(np.uint16), transform=transform)
start_time = time.time()
print 'about to start query'
query = persist_database(shapes, meta)
print 'done'
print time.time() - start_time
start_time = time.time()
with connection.cursor() as cursor:
cursor.execute(query)
transaction.commit()
print time.time() - start_time
#persist_file(shapes, output_vector_file, meta)
评论列表
文章目录