|
@@ -20,20 +20,16 @@ import json
|
|
|
|
|
|
def is_in_meta_polygon(point, single_poly, radius):
|
|
|
poly_len = len(single_poly)
|
|
|
- plpy.info(poly_len)
|
|
|
poly = []
|
|
|
for i in range(poly_len):
|
|
|
pair = single_poly[i]
|
|
|
poly.append((pair["X"], pair["Y"]))
|
|
|
- plpy.info(pair["X"])
|
|
|
-
|
|
|
p = Path(poly)
|
|
|
return p.contains_points([point], None, radius)
|
|
|
|
|
|
|
|
|
def is_in_polygon(point, polygons):
|
|
|
polygons_length = len(polygons)
|
|
|
- plpy.info(polygons_length)
|
|
|
if polygons_length == 0:
|
|
|
return False
|
|
|
for j in range(polygons_length):
|
|
@@ -64,8 +60,6 @@ def is_point_in_polygon(x, y, json_poly):
|
|
|
# 将下面对数据库的操作作为一个事务, 出异常则自动rollback
|
|
|
input_table_list = tables.split(',')
|
|
|
output_table_list = out_tables.split(',')
|
|
|
-#if len(input_table_list) > 0
|
|
|
- #plpy.info(input_table_list[0])
|
|
|
with plpy.subtransaction():
|
|
|
for i in range(0, len(input_table_list)):
|
|
|
in_table_name = input_table_list[i]
|
|
@@ -90,7 +84,6 @@ with plpy.subtransaction():
|
|
|
if len(spaces) == 0:
|
|
|
continue
|
|
|
# 判断设备的bim_location是否在业务空间的outline内
|
|
|
- # plpy.info("设备有{0}个, 业务空间有{1}个".format(len(equips), len(spaces)))
|
|
|
for equip in equips:
|
|
|
for space in spaces:
|
|
|
try:
|