|
@@ -32,8 +32,10 @@ def get_data(sql):
|
|
|
connection = psycopg2.connect(
|
|
|
database='datacenter',
|
|
|
user='postgres',
|
|
|
- password='123456',
|
|
|
- host='192.168.20.234',
|
|
|
+ # password='123456',
|
|
|
+ password='123qwe!@#',
|
|
|
+ # host='192.168.20.234',
|
|
|
+ host='47.94.89.44',
|
|
|
port='5432'
|
|
|
)
|
|
|
cursor = connection.cursor()
|
|
@@ -62,7 +64,6 @@ def transform_outline(obj):
|
|
|
column_outline = 'outline'
|
|
|
for space in obj:
|
|
|
outline = space.get(column_outline)
|
|
|
- print(type(outline))
|
|
|
outline_str = str(outline).replace('\'', '"')
|
|
|
space[column_outline] = outline_str
|
|
|
|
|
@@ -79,7 +80,7 @@ if __name__ == '__main__':
|
|
|
# print(poly1.almost_equals(poly2, -10))
|
|
|
# print(poly1.almost_equals(poly2, 2))
|
|
|
# print(poly1.almost_equals(poly2, 0.0001))
|
|
|
- floor_id = '7893fe0c6cd511ea83548fd73aa29e85'
|
|
|
+ floor_id = '16900f297e2911ea88f503a5b7a176d7'
|
|
|
floor_str = "SELECT id FROM public.floor where model_id = '{0}'".format(floor_id)
|
|
|
|
|
|
floor_data = get_data(floor_str)
|