"Paint connect" functional. Added to seed-based painting and unit-tested. "Path connect" still pending. Disabled. "Path connect" unit test added.

This commit is contained in:
jpcaram
2015-01-25 16:55:22 -05:00
parent 9632d9a98f
commit 6b51f03db2
5 changed files with 381 additions and 81 deletions

27
tests/test_pathconnect.py Normal file
View File

@@ -0,0 +1,27 @@
import unittest
from shapely.geometry import LineString, Polygon
from shapely.ops import cascaded_union, unary_union
from matplotlib.pyplot import plot, subplot, show, cla, clf, xlim, ylim, title
from camlib import *
class PathConnectTest1(unittest.TestCase):
def setUp(self):
pass
def test_simple_connect(self):
paths = [
LineString([[0, 0], [0, 1]]),
LineString([[0, 1], [0, 2]])
]
result = Geometry.path_connect(paths)
self.assertEqual(len(result), 1)
self.assertTrue(result[0].equals(LineString([[0, 0], [0, 2]])))
if __name__ == "__main__":
unittest.main()