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 }
|
||||
|
||||
Reference in New Issue
Block a user