Skip to content
Snippets Groups Projects
Name Last commit Last update
..
app
images
server
.gitignore
README.md

PROG2900

Dependencies

Endpoints

\
\update_map
\get_relation
\add_new_lake?lake=name

Server

To run the server...

Application

Database

This project requires SQLite3. Download the precompiled binary for your operating system. Precompiled binaries can be found on https://www.sqlite.org/download.html. Extract the downloaded binary in a folder and note its path. Add the path to your system environment variables. Now you can manage the SQLite database.

Adding new lakes

To add a new lake to the system, go to https://overpass-turbo.eu/. Once you have navigated to Overpass API, enter the Overpass query below in the left field, but swap 'lakeName' out with the name of the lake you want to add. Once the query has been adjusted, press the 'Run' button.

[out:json];
(
  way["natural"="water"]["name"="lakeName"];
  relation["natural"="water"]["name"="lakeName"];
);
(._;>;);
out body;

img.png img.png

If a text box saying "This query returned quite a lot of data (approx. x MB). Your browser may have a hard time trying to render this. Do you really want to continue? " appears, press 'continue anyway'. 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...

img.png

The result will be two new files named lakeName_centers.txt and lakeName_div.json. The original lakeName.geojson file should also remain in the system. Additionally, the file named all_lake_names.json should be updated to contain the newly added lake name.

img.png

Known bugs

Developers