diff --git a/server/lake_relations/overpass_query.txt b/server/lake_relations/overpass_query.txt index 611940c78356c3fa5bb70b635b7a784f80fcb0a6..4d011e2037b088d1bd4259f5ca7630fcf3318f13 100644 --- a/server/lake_relations/overpass_query.txt +++ b/server/lake_relations/overpass_query.txt @@ -1 +1,15 @@ -The following query \ No newline at end of file +The following query is used to retrieve the relation(shape) of a lake. +Go to https://overpass-turbo.eu/#, enter the query in the left field, add +the name of the lake you want to add, and press 'run'. +If a text box saying "" appears, press 'continue anyways'. Double check that you have +the correct lake, then press 'Export'. In the 'Export' menu, download the shape data as +GeoJson. Once downloaded, name the file the *lakeName.json, and move the file into +IceMap/server/lake_relations. Once you have added the file, run map division... + +[out:json]; +( + way["natural"="water"]["name"="lakeName"]; + relation["natural"="water"]["name"="lakeName"]; +); +(._;>;); +out body; \ No newline at end of file diff --git a/server/map/get_relation.py b/server/map/get_relation.py index 58175d85833ab2c7a903ac70675c7fe94a7ee25e..ab52cfcf269e442ccc99c5e47b834cca16af9605 100644 --- a/server/map/get_relation.py +++ b/server/map/get_relation.py @@ -104,7 +104,7 @@ def write_json_to_file(path: str, file_name: str, json_data: dict): if not os.path.exists(path): raise Exception("Directory from path does not exist") - with open(path + '/' + file_name, 'w') as f: + with open(path + '/' + file_name + '_div.json', 'w') as f: json.dump(json_data, f)