Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.49 KB

Readme.md

File metadata and controls

39 lines (27 loc) · 1.49 KB

phstl

Convert GDAL rasters to STL mesh. Intended to produce landscape models from GeoTIFF heightmaps.

Usage

usage: phstl.py [-h] [-x X] [-y Y] [-z Z] [-b BASE] [-c] [-v] RASTER [STL]

Convert a GDAL raster (like a GeoTIFF heightmap) to an STL terrain surface.

positional arguments:
  RASTER                Input heightmap image
  STL                   Output STL path (stdout)

optional arguments:
  -h, --help            show this help message and exit
  -x X                  Fit output x to extent (mm)
  -y Y                  Fit output y to extent (mm)
  -z Z                  Vertical scale factor (1)
  -b BASE, --base BASE  Base height (0)
  -c, --clip            Clip z to minimum elevation
  -v, --verbose         Print log messages
  --band BAND           Raster data band (1)
  -m MINIMUM, --minimum MINIMUM
                        Omit vertices below minimum elevation
  -M MAXIMUM, --maximum MAXIMUM
                        Omit vertices above maximum elevation

Tips

The output of phstl is a surface mesh. To create a manifold solid suitable for 3D printing, use a separate tool to solidify the model. See these brief tutorials for Blender or Meshmixer.

Prerequisites

License

This project is released under an open source MIT license.