def setUp(self): self.oneSimplePoint = ["844134.284462888841517 6516568.605687109753489 0"] self.twoPointsHeight = [["844134.284462888841517 6516568.605687109753489 0", "10"], ["144134.284462888841517 6516568.605687109753489 0", "25"]] self.lineSimple = ["<IndexedLineSet coordIndex='0 1 2 3 4'><Coordinate point='847423.133840369875543 6519126.773986855521798 0 847427.16084886121098 6519029.311356557533145 0 847431.001942750066519 6518961.135681151412427 0 847435.155744896968827 6518878.69126517791301 0 847435.500586390029639 6518853.990726242773235 0 ' /></IndexedLineSet>"] self.lineWithHeight = [["<IndexedLineSet coordIndex='0 1 2 3 4'><Coordinate point='847423.133840369875543 6519126.773986855521798 0 847427.16084886121098 6519029.311356557533145 0 847431.001942750066519 6518961.135681151412427 0 847435.155744896968827 6518878.69126517791301 0 847435.500586390029639 6518853.990726242773235 0 ' /></IndexedLineSet>", "10"]] self.polygon = ['{"type":"Polygon","coordinates":[[[852321.383846897,6509501.96687314,0],[852320.082282889,6509513.99731137,0],[852322.110674802,6509514.19758986,0],[852322.79144221,6509508.14240802,0],[852323.452207997,6509502.16716017,0],[852321.383846897,6509501.96687314,0]]]}'] self.multipolygon = ['{"type":"MultiPolygon", "coordinates": [[[[30, 20, 0], [45, 40, 0], [10, 40, 0], [30, 20, 0]]], [[[15, 5, 0], [40, 10, 0], [10, 20, 0], [5, 10, 0], [15, 5, 0]]]]}'] self.tin = ["<IndexedTriangleSet index='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35'><Coordinate point='852320.082282889052294 6509501.966873140074313 11 852323.452207996975631 6509501.966873140074313 0 852323.452207996975631 6509501.966873140074313 11 852320.082282889052294 6509501.966873140074313 11 852320.082282889052294 6509501.966873140074313 0 852323.452207996975631 6509501.966873140074313 0 852320.082282889052294 6509514.19758986029774 11 852323.452207996975631 6509501.966873140074313 11 852323.452207996975631 6509514.19758986029774 11 852320.082282889052294 6509514.19758986029774 11 852320.082282889052294 6509501.966873140074313 11 852323.452207996975631 6509501.966873140074313 11 852323.452207996975631 6509501.966873140074313 11 852323.452207996975631 6509501.966873140074313 0 852323.452207996975631 6509514.19758986029774 0 852323.452207996975631 6509514.19758986029774 11 852323.452207996975631 6509501.966873140074313 11 852323.452207996975631 6509514.19758986029774 0 852320.082282889052294 6509501.966873140074313 0 852320.082282889052294 6509501.966873140074313 11 852320.082282889052294 6509514.19758986029774 11 852320.082282889052294 6509514.19758986029774 0 852320.082282889052294 6509501.966873140074313 0 852320.082282889052294 6509514.19758986029774 11 852320.082282889052294 6509514.19758986029774 0 852320.082282889052294 6509514.19758986029774 11 852323.452207996975631 6509514.19758986029774 11 852323.452207996975631 6509514.19758986029774 0 852320.082282889052294 6509514.19758986029774 0 852323.452207996975631 6509514.19758986029774 11 852320.082282889052294 6509501.966873140074313 0 852320.082282889052294 6509514.19758986029774 0 852323.452207996975631 6509514.19758986029774 0 852323.452207996975631 6509501.966873140074313 0 852320.082282889052294 6509501.966873140074313 0 852323.452207996975631 6509514.19758986029774 0'/></IndexedTriangleSet>"] self.hasHeight = True self.noHeight = False self.colors = "#000000" self.geomPoint = 'POINT' self.geomLine = 'LINESTRING' self.geomPolyg = 'POLYGON' self.geomMPolyg = 'MULTIPOLYGON' self.geomPolyh = 'POLYHEDRALSURFACE' self.translator = PostgisToJSON()
def connectionMade(self): print "WebSocket data opened" self.translator = PostgisToJSON()