Add more test
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from .database import *
|
||||
from .s0_base import get_node_links
|
||||
from .s32_region_util import calculate_boundary, calculate_convex_hull, inflate_boundary
|
||||
#from .s32_region_util import calculate_boundary, calculate_convex_hull, inflate_boundary
|
||||
|
||||
|
||||
def calculate_virtual_district(name: str, centers: list[str]) -> dict[str, Any]:
|
||||
@@ -62,9 +62,9 @@ def calculate_virtual_district(name: str, centers: list[str]) -> dict[str, Any]:
|
||||
vds: list[dict[str, Any]] = []
|
||||
|
||||
for center, value in center_node.items():
|
||||
p = calculate_boundary(name, value)
|
||||
b = inflate_boundary(name, p)
|
||||
c = calculate_convex_hull(name, value)
|
||||
vds.append({ 'center': center, 'nodes': value, 'path': p, 'boundary': b, 'convex_hull': c})
|
||||
#p = calculate_boundary(name, value)
|
||||
#b = inflate_boundary(name, p)
|
||||
#c = calculate_convex_hull(name, value)
|
||||
vds.append({ 'center': center, 'nodes': value })
|
||||
|
||||
return { 'virtual_districts': vds, 'isolated_nodes': isolated_nodes }
|
||||
|
||||
@@ -5573,7 +5573,9 @@ class TestApi:
|
||||
open_project(p)
|
||||
|
||||
vds = calculate_virtual_district(p, ['107', '139', '267', '211'])['virtual_districts']
|
||||
nodes = get_nodes_in_boundary(p, vds[0]['boundary'])
|
||||
boundary = calculate_boundary(p, vds[0]['nodes'])
|
||||
boundary = inflate_boundary(p, boundary)
|
||||
nodes = get_nodes_in_boundary(p, boundary)
|
||||
assert nodes == ['10', '101', '103', '105', '107', '109', '111', '115', '117', '119', '120', '257', '259', '261', '263', 'Lake']
|
||||
|
||||
self.leave(p)
|
||||
@@ -5585,7 +5587,10 @@ class TestApi:
|
||||
open_project(p)
|
||||
|
||||
vds = calculate_virtual_district(p, ['107', '139', '267', '211'])['virtual_districts']
|
||||
add_region(p, ChangeSet({'id': 'r', 'boundary': vds[0]['boundary']}))
|
||||
boundary = calculate_boundary(p, vds[0]['nodes'])
|
||||
boundary = inflate_boundary(p, boundary)
|
||||
|
||||
add_region(p, ChangeSet({'id': 'r', 'boundary': boundary}))
|
||||
|
||||
nodes = get_nodes_in_region(p, 'r')
|
||||
assert nodes == ['10', '101', '103', '105', '107', '109', '111', '115', '117', '119', '120', '257', '259', '261', '263', 'Lake']
|
||||
@@ -5605,6 +5610,45 @@ class TestApi:
|
||||
self.leave(p)
|
||||
|
||||
|
||||
def test_calculate_boundary(self):
|
||||
p = 'test_calculate_boundary'
|
||||
read_inp(p, f'./inp/net3.inp', '3')
|
||||
open_project(p)
|
||||
|
||||
nodes = ['10', '101', '103', '105', '107', '109', '111', '115', '117', '119', '120', '257', '259', '261', '263', 'Lake']
|
||||
b = calculate_boundary(p, nodes)
|
||||
assert b == [(23.7, 22.76), (22.08, 23.1), (21.17, 23.32), (20.8, 23.4), (20.32, 21.57), (16.97, 21.28), (13.81, 22.94), (9.0, 27.85), (8.0, 27.53), (9.0, 27.85), (13.81, 22.94), (12.96, 21.31), (17.64, 18.92), (20.21, 17.53), (20.98, 19.18), (21.69, 21.28), (22.08, 23.1), (23.7, 22.76)]
|
||||
|
||||
self.leave(p)
|
||||
|
||||
|
||||
def test_inflate_boundary(self):
|
||||
p = 'test_inflate_boundary'
|
||||
read_inp(p, f'./inp/net3.inp', '3')
|
||||
open_project(p)
|
||||
|
||||
nodes = ['10', '101', '103', '105', '107', '109', '111', '115', '117', '119', '120', '257', '259', '261', '263', 'Lake']
|
||||
b = calculate_boundary(p, nodes)
|
||||
b = inflate_boundary(p, b)
|
||||
assert b == [(20.57, 17.12), (21.44, 18.98), (21.45, 19.01), (22.17, 21.13), (22.18, 21.16), (22.46, 22.5), (24.09, 22.17), (24.29, 23.150000000000002), (22.19, 23.580000000000002), (22.2, 23.59), (21.28, 23.81), (20.71, 23.93), (20.37, 23.72), (19.92, 22.03), (17.06, 21.79), (14.120000000000001, 23.330000000000002), (9.26, 28.3), (8.98, 28.37), (7.37, 27.85), (7.68, 26.900000000000002), (8.85, 27.27), (13.19, 22.84), (12.42, 21.36), (12.55, 20.96), (17.41, 18.47), (20.16, 16.990000000000002), (20.57, 17.12)]
|
||||
|
||||
self.leave(p)
|
||||
|
||||
|
||||
def test_inflate_region(self):
|
||||
p = 'test_inflate_region'
|
||||
read_inp(p, f'./inp/net3.inp', '3')
|
||||
open_project(p)
|
||||
|
||||
vds = calculate_virtual_district(p, ['107', '139', '267', '211'])['virtual_districts']
|
||||
boundary = calculate_boundary(p, vds[0]['nodes'])
|
||||
add_region(p, ChangeSet({'id': 'r', 'boundary': boundary}))
|
||||
b = inflate_region(p, 'r')
|
||||
assert b == [(20.57, 17.12), (21.44, 18.98), (21.45, 19.01), (22.17, 21.13), (22.18, 21.16), (22.46, 22.5), (24.09, 22.17), (24.29, 23.150000000000002), (22.19, 23.580000000000002), (22.2, 23.59), (21.28, 23.81), (20.71, 23.93), (20.37, 23.72), (19.92, 22.03), (17.06, 21.79), (14.120000000000001, 23.330000000000002), (9.26, 28.3), (8.98, 28.37), (7.37, 27.85), (7.68, 26.900000000000002), (8.85, 27.27), (13.19, 22.84), (12.42, 21.36), (12.55, 20.96), (17.41, 18.47), (20.16, 16.990000000000002), (20.57, 17.12)]
|
||||
|
||||
self.leave(p)
|
||||
|
||||
|
||||
# 33 region
|
||||
|
||||
|
||||
@@ -5696,40 +5740,51 @@ class TestApi:
|
||||
open_project(p)
|
||||
|
||||
result = calculate_virtual_district(p, ['107', '139', '267', '211'])
|
||||
assert result['isolated_nodes'] == []
|
||||
vds = result['virtual_districts']
|
||||
assert len(vds) == 4
|
||||
assert vds[0]['center'] == '107'
|
||||
assert vds[0]['nodes'] == ['10', '101', '103', '105', '107', '109', '111', '115', '117', '119', '120', '257', '259', '261', '263', 'Lake']
|
||||
assert vds[1]['center'] == '139'
|
||||
assert vds[1]['nodes'] == ['15', '20', '60', '601', '61', '121', '123', '125', '127', '129', '131', '139', '141', '143', '145', '147', '149', '151', '153', 'River', '3']
|
||||
assert vds[2]['center'] == '267'
|
||||
assert vds[2]['nodes'] == ['35', '40', '113', '157', '159', '161', '163', '164', '166', '167', '169', '171', '173', '177', '179', '181', '183', '184', '185', '187', '189', '191', '193', '195', '197', '204', '265', '267', '269', '271', '1']
|
||||
assert vds[3]['center'] == '211'
|
||||
assert vds[3]['nodes'] == ['50', '199', '201', '203', '205', '206', '207', '208', '209', '211', '213', '215', '217', '219', '225', '229', '231', '237', '239', '241', '243', '247', '249', '251', '253', '255', '273', '275', '2']
|
||||
|
||||
assert result == {
|
||||
'virtual_districts':
|
||||
[
|
||||
{
|
||||
'center': '107',
|
||||
'nodes': ['10', '101', '103', '105', '107', '109', '111', '115', '117', '119', '120', '257', '259', '261', '263', 'Lake'],
|
||||
'path': [(23.7, 22.76), (22.08, 23.1), (21.17, 23.32), (20.8, 23.4), (20.32, 21.57), (16.97, 21.28), (13.81, 22.94), (9.0, 27.85), (8.0, 27.53), (9.0, 27.85), (13.81, 22.94), (12.96, 21.31), (17.64, 18.92), (20.21, 17.53), (20.98, 19.18), (21.69, 21.28), (22.08, 23.1)],
|
||||
'boundary': [(20.57, 17.12), (21.44, 18.98), (21.45, 19.01), (22.17, 21.13), (22.18, 21.16), (22.46, 22.5), (24.09, 22.17), (24.29, 23.150000000000002), (22.19, 23.580000000000002), (22.2, 23.59), (21.28, 23.81), (20.71, 23.93), (20.37, 23.72), (19.92, 22.03), (17.06, 21.79), (14.120000000000001, 23.330000000000002), (9.26, 28.3), (8.98, 28.37), (7.37, 27.85), (7.68, 26.900000000000002), (8.85, 27.27), (13.19, 22.84), (12.42, 21.36), (12.55, 20.96), (17.41, 18.47), (20.16, 16.990000000000002), (20.57, 17.12)],
|
||||
'convex_hull': [(20.21, 17.53), (12.96, 21.31), (8.0, 27.53), (9.0, 27.85), (23.7, 22.76), (20.21, 17.53)]
|
||||
},
|
||||
{
|
||||
'center': '139',
|
||||
'nodes': ['15', '20', '60', '601', '61', '121', '123', '125', '127', '129', '131', '139', '141', '143', '145', '147', '149', '151', '153', 'River', '3'],
|
||||
'path': [(38.68, 23.76), (37.47, 21.97), (35.68, 23.08), (33.28, 24.54), (30.32, 26.39), (37.89, 29.55), (30.32, 26.39), (29.29, 26.4), (29.44, 26.91), (29.41, 27.27), (29.44, 26.91), (29.29, 26.4), (24.59, 25.64), (23.54, 25.5), (23.37, 27.31), (23.71, 29.03), (23.9, 29.94), (24.15, 31.06), (23.9, 29.94), (23.0, 29.49), (23.71, 29.03), (23.37, 27.31), (23.54, 25.5), (24.59, 25.64), (28.13, 22.63), (28.29, 21.39), (29.62, 20.74), (30.24, 20.38), (33.02, 19.29), (35.68, 23.08), (37.47, 21.97)],
|
||||
'boundary': [(33.33, 18.86), (35.82, 22.400000000000002), (37.38, 21.44), (37.77, 21.52), (39.37, 23.89), (38.550000000000004, 24.45), (37.32, 22.64), (35.94, 23.51), (33.54, 24.97), (33.53, 24.96), (31.39, 26.29), (38.54, 29.28), (38.160000000000004, 30.2), (30.22, 26.89), (29.93, 26.89), (29.94, 26.91), (29.87, 27.810000000000002), (28.87, 27.73), (28.93, 26.95), (28.89, 26.830000000000002), (24.52, 26.13), (24.52, 26.14), (23.990000000000002, 26.060000000000002), (23.87, 27.29), (24.2, 28.93), (24.39, 29.830000000000002), (24.75, 31.44), (23.77, 31.66), (23.46, 30.28), (22.52, 29.810000000000002), (22.48, 29.23), (23.150000000000002, 28.79), (22.87, 27.37), (22.87, 27.3), (23.06, 25.240000000000002), (23.400000000000002, 24.98), (24.44, 25.11), (27.650000000000002, 22.38), (27.810000000000002, 21.2), (27.96, 21.0), (29.400000000000002, 20.29), (30.01, 19.94), (30.04, 19.92), (33.0, 18.76), (33.33, 18.86)],
|
||||
'convex_hull': [(33.02, 19.29), (30.24, 20.38), (28.29, 21.39), (23.54, 25.5), (23.0, 29.49), (24.15, 31.06), (37.89, 29.55), (38.68, 23.76), (37.47, 21.97), (33.02, 19.29)]
|
||||
},
|
||||
{
|
||||
'center': '267',
|
||||
'nodes': ['35', '40', '113', '157', '159', '161', '163', '164', '166', '167', '169', '171', '173', '177', '179', '181', '183', '184', '185', '187', '189', '191', '193', '195', '197', '204', '265', '267', '269', '271', '1'],
|
||||
'path': [(27.46, 9.84), (27.02, 9.81), (25.71, 10.4), (25.45, 10.18), (24.15, 11.37), (25.03, 12.14), (25.97, 11.0), (25.72, 10.74), (25.46, 10.52), (25.72, 10.74), (25.97, 11.0), (26.65, 11.8), (26.87, 11.59), (26.65, 11.8), (25.68, 12.74), (25.88, 12.98), (25.68, 12.74), (25.39, 13.6), (25.39, 14.98), (25.98, 15.14), (26.48, 15.13), (25.98, 15.14), (25.39, 14.98), (25.1, 15.28), (23.12, 17.5), (24.85, 20.16), (23.12, 17.5), (25.1, 15.28), (23.18, 14.72), (22.88, 14.35), (22.04, 16.61), (22.88, 14.35), (22.1, 14.07), (20.97, 15.18), (22.1, 14.07), (23.64, 11.04), (23.8, 10.9), (25.01, 9.67), (25.15, 9.52), (25.01, 9.67), (25.45, 10.18), (25.71, 10.4), (27.02, 9.81)],
|
||||
'boundary': [(25.86, 9.5), (25.68, 9.68), (25.79, 9.8), (26.87, 9.33), (26.990000000000002, 9.31), (27.990000000000002, 9.38), (27.92, 10.370000000000001), (27.12, 10.31), (26.34, 10.66), (26.35, 10.67), (26.68, 11.07), (26.89, 10.88), (27.580000000000002, 11.61), (27.0, 12.16), (26.36, 12.77), (26.580000000000002, 13.040000000000001), (25.91, 13.6), (25.89, 13.67), (25.89, 14.6), (26.03, 14.63), (26.97, 14.620000000000001), (26.990000000000002, 15.620000000000001), (25.95, 15.64), (25.88, 15.63), (25.54, 15.530000000000001), (25.46, 15.63), (25.45, 15.620000000000001), (23.740000000000002, 17.54), (25.54, 20.31), (24.7, 20.85), (22.61, 17.63), (22.63, 17.29), (24.2, 15.530000000000001), (23.09, 15.21), (22.330000000000002, 17.25), (21.400000000000002, 16.9), (22.23, 14.64), (22.22, 14.64), (20.96, 15.89), (20.26, 15.17), (21.68, 13.77), (23.22, 10.77), (23.27, 10.700000000000001), (23.47, 10.52), (24.650000000000002, 9.32), (25.13, 8.81), (25.86, 9.5)],
|
||||
'convex_hull': [(25.15, 9.52), (23.64, 11.04), (20.97, 15.18), (22.04, 16.61), (24.85, 20.16), (26.48, 15.13), (27.46, 9.84), (25.15, 9.52)]
|
||||
},
|
||||
{
|
||||
'center': '211',
|
||||
'nodes': ['50', '199', '201', '203', '205', '206', '207', '208', '209', '211', '213', '215', '217', '219', '225', '229', '231', '237', '239', '241', '243', '247', '249', '251', '253', '255', '273', '275', '2'],
|
||||
'path': [(44.86, 9.32), (42.11, 8.67), (39.95, 8.73), (35.26, 6.16), (34.2, 5.54), (33.76, 6.59), (32.54, 6.81), (31.66, 6.64), (31.0, 6.61), (31.07, 8.29), (30.89, 8.57), (31.14, 8.89), (30.89, 8.57), (29.42, 8.44), (29.16, 7.38), (29.2, 6.46), (31.0, 6.61), (31.66, 6.64), (32.54, 6.81), (33.76, 6.59), (34.2, 5.54), (35.37, 3.08), (35.76, 2.31), (35.02, 1.81), (35.02, 2.05), (35.87, 2.11), (37.04, 0.0), (35.87, 2.11), (35.76, 2.31), (35.37, 3.08), (36.16, 3.49), (38.38, 2.54), (36.16, 3.49), (35.26, 6.16), (39.95, 8.73), (42.11, 8.67), (43.53, 7.38), (42.11, 8.67)],
|
||||
'boundary': [(37.72, -0.19), (36.31, 2.35), (36.2, 2.5300000000000002), (36.21, 2.54), (36.04, 2.86), (36.17, 2.93), (38.64, 1.8800000000000001), (39.04, 2.8000000000000003), (36.550000000000004, 3.86), (35.86, 5.91), (40.07, 8.22), (41.9, 8.17), (43.56, 6.67), (44.24, 7.41), (43.15, 8.39), (45.46, 8.950000000000001), (45.230000000000004, 9.92), (42.04, 9.17), (39.9, 9.23), (39.77, 9.200000000000001), (35.02, 6.6000000000000005), (35.01, 6.59), (34.43, 6.25), (34.17, 6.9), (33.97, 7.0600000000000005), (32.58, 7.3100000000000005), (32.49, 7.3100000000000005), (31.61, 7.13), (31.52, 7.13), (31.57, 8.35), (31.53, 8.5), (31.5, 8.540000000000001), (31.84, 8.98), (31.05, 9.59), (30.63, 9.040000000000001), (29.22, 8.92), (28.97, 8.71), (28.67, 7.46), (28.66, 7.390000000000001), (28.71, 6.23), (29.03, 5.94), (31.04, 6.11), (31.03, 6.11), (31.7, 6.140000000000001), (31.740000000000002, 6.15), (32.54, 6.3), (33.4, 6.140000000000001), (33.74, 5.34), (33.75, 5.33), (34.92, 2.86), (35.11, 2.47), (34.74, 2.22), (35.02, 1.81), (35.04, 1.81), (35.06, 1.55), (35.58, 1.58), (36.85, -0.68), (37.72, -0.19)],
|
||||
'convex_hull': [(37.04, 0.0), (34.15, 1.1), (32.17, 1.88), (29.2, 6.46), (29.16, 7.38), (29.42, 8.44), (31.14, 8.89), (44.86, 9.32), (43.53, 7.38), (37.04, 0.0)]
|
||||
}
|
||||
],
|
||||
'isolated_nodes': []}
|
||||
#assert result == {
|
||||
# 'virtual_districts':
|
||||
# [
|
||||
# {
|
||||
# 'center': '107',
|
||||
# 'nodes': ['10', '101', '103', '105', '107', '109', '111', '115', '117', '119', '120', '257', '259', '261', '263', 'Lake'],
|
||||
# 'boundary': [(23.7, 22.76), (22.08, 23.1), (21.17, 23.32), (20.8, 23.4), (20.32, 21.57), (16.97, 21.28), (13.81, 22.94), (9.0, 27.85), (8.0, 27.53), (9.0, 27.85), (13.81, 22.94), (12.96, 21.31), (17.64, 18.92), (20.21, 17.53), (20.98, 19.18), (21.69, 21.28), (22.08, 23.1)],
|
||||
# 'inflated_boundary': [(20.57, 17.12), (21.44, 18.98), (21.45, 19.01), (22.17, 21.13), (22.18, 21.16), (22.46, 22.5), (24.09, 22.17), (24.29, 23.150000000000002), (22.19, 23.580000000000002), (22.2, 23.59), (21.28, 23.81), (20.71, 23.93), (20.37, 23.72), (19.92, 22.03), (17.06, 21.79), (14.120000000000001, 23.330000000000002), (9.26, 28.3), (8.98, 28.37), (7.37, 27.85), (7.68, 26.900000000000002), (8.85, 27.27), (13.19, 22.84), (12.42, 21.36), (12.55, 20.96), (17.41, 18.47), (20.16, 16.990000000000002), (20.57, 17.12)],
|
||||
# 'convex_hull': [(20.21, 17.53), (12.96, 21.31), (8.0, 27.53), (9.0, 27.85), (23.7, 22.76), (20.21, 17.53)]
|
||||
# },
|
||||
# {
|
||||
# 'center': '139',
|
||||
# 'nodes': ['15', '20', '60', '601', '61', '121', '123', '125', '127', '129', '131', '139', '141', '143', '145', '147', '149', '151', '153', 'River', '3'],
|
||||
# 'boundary': [(38.68, 23.76), (37.47, 21.97), (35.68, 23.08), (33.28, 24.54), (30.32, 26.39), (37.89, 29.55), (30.32, 26.39), (29.29, 26.4), (29.44, 26.91), (29.41, 27.27), (29.44, 26.91), (29.29, 26.4), (24.59, 25.64), (23.54, 25.5), (23.37, 27.31), (23.71, 29.03), (23.9, 29.94), (24.15, 31.06), (23.9, 29.94), (23.0, 29.49), (23.71, 29.03), (23.37, 27.31), (23.54, 25.5), (24.59, 25.64), (28.13, 22.63), (28.29, 21.39), (29.62, 20.74), (30.24, 20.38), (33.02, 19.29), (35.68, 23.08), (37.47, 21.97)],
|
||||
# 'inflated_boundary': [(33.33, 18.86), (35.82, 22.400000000000002), (37.38, 21.44), (37.77, 21.52), (39.37, 23.89), (38.550000000000004, 24.45), (37.32, 22.64), (35.94, 23.51), (33.54, 24.97), (33.53, 24.96), (31.39, 26.29), (38.54, 29.28), (38.160000000000004, 30.2), (30.22, 26.89), (29.93, 26.89), (29.94, 26.91), (29.87, 27.810000000000002), (28.87, 27.73), (28.93, 26.95), (28.89, 26.830000000000002), (24.52, 26.13), (24.52, 26.14), (23.990000000000002, 26.060000000000002), (23.87, 27.29), (24.2, 28.93), (24.39, 29.830000000000002), (24.75, 31.44), (23.77, 31.66), (23.46, 30.28), (22.52, 29.810000000000002), (22.48, 29.23), (23.150000000000002, 28.79), (22.87, 27.37), (22.87, 27.3), (23.06, 25.240000000000002), (23.400000000000002, 24.98), (24.44, 25.11), (27.650000000000002, 22.38), (27.810000000000002, 21.2), (27.96, 21.0), (29.400000000000002, 20.29), (30.01, 19.94), (30.04, 19.92), (33.0, 18.76), (33.33, 18.86)],
|
||||
# 'convex_hull': [(33.02, 19.29), (30.24, 20.38), (28.29, 21.39), (23.54, 25.5), (23.0, 29.49), (24.15, 31.06), (37.89, 29.55), (38.68, 23.76), (37.47, 21.97), (33.02, 19.29)]
|
||||
# },
|
||||
# {
|
||||
# 'center': '267',
|
||||
# 'nodes': ['35', '40', '113', '157', '159', '161', '163', '164', '166', '167', '169', '171', '173', '177', '179', '181', '183', '184', '185', '187', '189', '191', '193', '195', '197', '204', '265', '267', '269', '271', '1'],
|
||||
# 'boundary': [(27.46, 9.84), (27.02, 9.81), (25.71, 10.4), (25.45, 10.18), (24.15, 11.37), (25.03, 12.14), (25.97, 11.0), (25.72, 10.74), (25.46, 10.52), (25.72, 10.74), (25.97, 11.0), (26.65, 11.8), (26.87, 11.59), (26.65, 11.8), (25.68, 12.74), (25.88, 12.98), (25.68, 12.74), (25.39, 13.6), (25.39, 14.98), (25.98, 15.14), (26.48, 15.13), (25.98, 15.14), (25.39, 14.98), (25.1, 15.28), (23.12, 17.5), (24.85, 20.16), (23.12, 17.5), (25.1, 15.28), (23.18, 14.72), (22.88, 14.35), (22.04, 16.61), (22.88, 14.35), (22.1, 14.07), (20.97, 15.18), (22.1, 14.07), (23.64, 11.04), (23.8, 10.9), (25.01, 9.67), (25.15, 9.52), (25.01, 9.67), (25.45, 10.18), (25.71, 10.4), (27.02, 9.81)],
|
||||
# 'inflated_boundary': [(25.86, 9.5), (25.68, 9.68), (25.79, 9.8), (26.87, 9.33), (26.990000000000002, 9.31), (27.990000000000002, 9.38), (27.92, 10.370000000000001), (27.12, 10.31), (26.34, 10.66), (26.35, 10.67), (26.68, 11.07), (26.89, 10.88), (27.580000000000002, 11.61), (27.0, 12.16), (26.36, 12.77), (26.580000000000002, 13.040000000000001), (25.91, 13.6), (25.89, 13.67), (25.89, 14.6), (26.03, 14.63), (26.97, 14.620000000000001), (26.990000000000002, 15.620000000000001), (25.95, 15.64), (25.88, 15.63), (25.54, 15.530000000000001), (25.46, 15.63), (25.45, 15.620000000000001), (23.740000000000002, 17.54), (25.54, 20.31), (24.7, 20.85), (22.61, 17.63), (22.63, 17.29), (24.2, 15.530000000000001), (23.09, 15.21), (22.330000000000002, 17.25), (21.400000000000002, 16.9), (22.23, 14.64), (22.22, 14.64), (20.96, 15.89), (20.26, 15.17), (21.68, 13.77), (23.22, 10.77), (23.27, 10.700000000000001), (23.47, 10.52), (24.650000000000002, 9.32), (25.13, 8.81), (25.86, 9.5)],
|
||||
# 'convex_hull': [(25.15, 9.52), (23.64, 11.04), (20.97, 15.18), (22.04, 16.61), (24.85, 20.16), (26.48, 15.13), (27.46, 9.84), (25.15, 9.52)]
|
||||
# },
|
||||
# {
|
||||
# 'center': '211',
|
||||
# 'nodes': ['50', '199', '201', '203', '205', '206', '207', '208', '209', '211', '213', '215', '217', '219', '225', '229', '231', '237', '239', '241', '243', '247', '249', '251', '253', '255', '273', '275', '2'],
|
||||
# 'boundary': [(44.86, 9.32), (42.11, 8.67), (39.95, 8.73), (35.26, 6.16), (34.2, 5.54), (33.76, 6.59), (32.54, 6.81), (31.66, 6.64), (31.0, 6.61), (31.07, 8.29), (30.89, 8.57), (31.14, 8.89), (30.89, 8.57), (29.42, 8.44), (29.16, 7.38), (29.2, 6.46), (31.0, 6.61), (31.66, 6.64), (32.54, 6.81), (33.76, 6.59), (34.2, 5.54), (35.37, 3.08), (35.76, 2.31), (35.02, 1.81), (35.02, 2.05), (35.87, 2.11), (37.04, 0.0), (35.87, 2.11), (35.76, 2.31), (35.37, 3.08), (36.16, 3.49), (38.38, 2.54), (36.16, 3.49), (35.26, 6.16), (39.95, 8.73), (42.11, 8.67), (43.53, 7.38), (42.11, 8.67)],
|
||||
# 'inflated_boundary': [(37.72, -0.19), (36.31, 2.35), (36.2, 2.5300000000000002), (36.21, 2.54), (36.04, 2.86), (36.17, 2.93), (38.64, 1.8800000000000001), (39.04, 2.8000000000000003), (36.550000000000004, 3.86), (35.86, 5.91), (40.07, 8.22), (41.9, 8.17), (43.56, 6.67), (44.24, 7.41), (43.15, 8.39), (45.46, 8.950000000000001), (45.230000000000004, 9.92), (42.04, 9.17), (39.9, 9.23), (39.77, 9.200000000000001), (35.02, 6.6000000000000005), (35.01, 6.59), (34.43, 6.25), (34.17, 6.9), (33.97, 7.0600000000000005), (32.58, 7.3100000000000005), (32.49, 7.3100000000000005), (31.61, 7.13), (31.52, 7.13), (31.57, 8.35), (31.53, 8.5), (31.5, 8.540000000000001), (31.84, 8.98), (31.05, 9.59), (30.63, 9.040000000000001), (29.22, 8.92), (28.97, 8.71), (28.67, 7.46), (28.66, 7.390000000000001), (28.71, 6.23), (29.03, 5.94), (31.04, 6.11), (31.03, 6.11), (31.7, 6.140000000000001), (31.740000000000002, 6.15), (32.54, 6.3), (33.4, 6.140000000000001), (33.74, 5.34), (33.75, 5.33), (34.92, 2.86), (35.11, 2.47), (34.74, 2.22), (35.02, 1.81), (35.04, 1.81), (35.06, 1.55), (35.58, 1.58), (36.85, -0.68), (37.72, -0.19)],
|
||||
# 'convex_hull': [(37.04, 0.0), (34.15, 1.1), (32.17, 1.88), (29.2, 6.46), (29.16, 7.38), (29.42, 8.44), (31.14, 8.89), (44.86, 9.32), (43.53, 7.38), (37.04, 0.0)]
|
||||
# }
|
||||
# ],
|
||||
# 'isolated_nodes': []}
|
||||
|
||||
self.leave(p)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user