Skip to content

MrMarlin/gdal-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

What is it?

This is a script I made to download a list of GeoTIFF files, join them to one big tile and convert it to be suitable for 3D printing. I do not offer any kind of support for the use and I do not provide any guarantees that the script works.

It is tested with Ubuntu 22.04 and data that can be found on https://www.swisstopo.admin.ch/de/geodata/height/alti3d.html.

How to install

mkdir gdal-script
cd gdal-script
mkdir output images
git clone https://github.com/ChHarding/TouchTerrain_for_CAGEO.git
cd TouchTerrain_for_CAGEO

# make sure python venv module is installed if not already satisfied
sudo apt install python3-venv

#install gdal
sudo apt install g++
sudo apt install pyhton3-dev
sudo apt install libgdal-dev

export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal

# create venv for required packages
python3 -m venv venv
. venv/bin/activate

# install required packages !!order is very important here because gdal can be a bit of a bitch!!
pip install numpy
pip install --no-cache-dir --force-reinstall GDAL=="$(gdal-config --version).*"
pip install -r requirements.txt
cd ..

How to use

The script takes a CSV file with a list of download link for individual GeoTIFF tiles. These tiles are then joinde into one big tile namen "chonk.tif". This "chonk.tif" is then converted into a printable STL file. If you only want to print a single GeoTIFF tile or have already a joined GeoTIFF file, you can place it in the "images" folder and rename it to "chonk.tif". If you do so, you can pass anything as the first argument and "skip" as the second argument.

python3 TouchTerrain_for_CAGEO/merge.py <link to CSV> [skip]

About

setup to generate STL files from 3D map data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages