diff python/tests/moving.txt @ 661:dc70d9e711f5

some method name change and new methods for features in objects (MovingObject) and methods to access indicator values in interactions
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 18 May 2015 13:53:25 +0200
parents 2d1d33ae1c69
children 01b89182891a
line wrap: on
line diff
--- a/python/tests/moving.txt	Fri May 15 23:09:49 2015 +0200
+++ b/python/tests/moving.txt	Mon May 18 13:53:25 2015 +0200
@@ -1,4 +1,5 @@
 >>> from moving import *
+>>> import storage
 >>> import numpy as np
 
 >>> Interval().empty()
@@ -137,6 +138,16 @@
 >>> Point.midPoint(p1, p2)
 (0.500000,0.500000)
 
+>>> objects = storage.loadTrajectoriesFromSqlite('../samples/laurier.sqlite', 'object')
+>>> len(objects)
+5
+>>> objects[0].hasFeatures()
+False
+>>> features = storage.loadTrajectoriesFromSqlite('../samples/laurier.sqlite', 'feature')
+>>> for o in objects: o.setFeatures(features)
+>>> objects[0].hasFeatures()
+True
+
 >>> o1 = MovingObject.generate(Point(-5.,0.), Point(1.,0.), TimeInterval(0,10))
 >>> o2 = MovingObject.generate(Point(0.,-5.), Point(0.,1.), TimeInterval(0,10))
 >>> MovingObject.computePET(o1, o2, 0.1)