Skip to content
/ phstl Public
forked from anoved/phstl

Convert GDAL rasters (like GeoTIFF heightmaps) to 3D STL surfaces.

License

Notifications You must be signed in to change notification settings

uclaros/phstl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Convert GDAL rasters (like GeoTIFF heightmaps) to 3D STL surfaces.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%