Skip to main content

🌍 Create 3d-printable STLs from satellite elevation data 🌏

Project description

mapa 🌍

Create 3d-printable STLs from satellite elevation data

Installation

pip install mapa

Usage

mapa uses numpy and numba under the hood to crunch large amounts of data in little time.

mapa provides the following approaches for creating STL files:

1. Using the mapa interactive map

The easiest way is using the mapa cli. Simply type

mapa

A jupyter notebook will be started with an interactive map. Follow the described steps by executing the cells to create a 3d model of whatever place you like.

2. Using the dem2stl cli

The dem2stl cli lets you create a 3d-printable STL file based on your tiff file. You can run a demo computation to get a feeling of how the output STL will look like:

dem2stl demo

If you have your tiff file ready, you may run something like

dem2stl --input your_file.tiff --output output.stl --model-size 200 --z-offset 3.0 --z-scale 1.5

The full list of options and their intention can be found with dem2stl --help:

Usage: dem2stl [OPTIONS]

  🌍 Convert DEM data into STL files 🌏

Options:
  --input TEXT          Path to input TIFF file.
  --output TEXT         Path to output STL file.
  --as-ascii            Save output STL as ascii file. If not provided, output
                        file will be binary.
  --model-size INTEGER  Desired size of the generated 3d model in millimeter.
  --max-res             Whether maximum resolution should be used. Note, that
                        this flag potentially increases compute time
                        dramatically. The default behavior (i.e.
                        max_res=False) should return 3d models with sufficient
                        resolution, while the output stl file should be <= 200
                        MB.
  --z-offset FLOAT      Offset distance in millimeter to be put below the 3d
                        model. Defaults to 4.0. Is not influenced by z-scale.
  --z-scale FLOAT       Value to be multiplied to the z-axis elevation data to
                        scale up the height of the model. Defaults to 1.0.
  --demo                Converts a demo tif of Hawaii into a STL file.
  --make-square         If the input tiff is a rectangle and not a square, cut
                        the longer side to make the output STL file a square.
  --version             Show the version and exit.
  --help                Show this message and exit.

3. Using mapa as python library

In case you are building your own application you can simply use mapa's functionality as a within your application by importing the modules functions.

from mapa import convert_tif_to_stl

path_to_stl = convert_tif_to_stl(...)

Changelog

See Releases.

Contributing

Contributions are welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mapa-0.1.3.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

mapa-0.1.3-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file mapa-0.1.3.tar.gz.

File metadata

  • Download URL: mapa-0.1.3.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.12 Linux/5.11.0-1028-azure

File hashes

Hashes for mapa-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4d03d0b7c4fa2cf0cc474b3824be731d852b7bc3c298bd650fd56a04f4a50fb4
MD5 d7a532af0d1c5627b6239ca5bdb2ae50
BLAKE2b-256 acdb22cdd19a2479c4690ba41a230e4cb5410fe33799c19041e470564eb8c1a0

See more details on using hashes here.

File details

Details for the file mapa-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: mapa-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.12 Linux/5.11.0-1028-azure

File hashes

Hashes for mapa-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d5a8e1c24ecefad9acb1bdda3d5b0ad7f8f32c6f844410231909a10697d66b72
MD5 d38b0f745fb4ec8f2c40febcbc041dab
BLAKE2b-256 d19192542abe0cdfec2aec3c49dd4cde054bf61f723cf6070cbcb1f1480f8577

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page