Lukla is an API to create real world heightmaps based on Shuttle Radar Topography Mission (SRTM30m) digital elevation model.
This program is pretty incomplete yet. I need to write unit tests and add some features.
First, you need SRTM30 digital elevation model data files in order to create heightmap tiles. This dataset is huge, so it is impossible to host those files in this repository. This program will download the HGT files and put them in ./data/dem folder (you can change this directory using environment variables). You can also download them using this tool. Remember you need to create a NASA Earthdata account. You can register here, it's free.
You can use Make to compile. Just use one of the following commands to compile to your target OS:
make build-linux
make build-windows
make build-darwin
(MacOS)
None of the following variables are mandatory, but you will probably need some of them to correctly set up the API.
- LUKLA_ALLOWED_ORIGINS: API allowed origins, separated by commas (,). If not defined, default is http://localhost:PORT;
- LUKLA_PORT: API HTTP port. Default is 9000;
- LUKLA_BASE_PATH: API base path. Default is /;
- LUKLA_TILES_PATH: Directory where generated heightmap images are cached. Default is ./data/tiles;
- LUKLA_DEM_FILES_PATH: Directory where SRTM30 Digital elevation model .hgt files are stored. Default is ./data/dem;
- LUKLA_HTTP_CLIENT_TIMEOUT: Timeout in seconds for http.Client requests. Default is 60 seconds. Must be an integer.
This is a pretty simple project, and it might be improved.
- Write unit tests and improve the code testability;
- Dockerize the app;
Capability to create a heightmap based on a bounding box (instead of just use OSM tiles);(Implemented)- Support to different zoom levels when creating OSM tiles (lower zoom levels must use bigger DEM resolutions in order to maintain a good perfomance). Now, Lukla just support zoom levels bigger than 10;
Create a way to download SRTM30m files from NASA server;(Implemented)- Support to different image extensions (e.g.: maybe TIFF), instead of just PNG files;
- An option to cache tiles in AWS S3 (or other cloud storages);
- A CLI interface allowing heightmaps creation without API.