Giter Site home page Giter Site logo

ewquon / dem2stl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cvr/dem2stl

0.0 0.0 0.0 163 KB

Converts a Digital Elevation Model (DEM) raster surface to the STereoLithography (STL) format using the GDAL library

License: GNU General Public License v3.0

Python 100.00%

dem2stl's Introduction

dem2stl

Converts a Digital Elevation Model (DEM) topography surface to the STereoLithography (STL) format using the GDAL library.

Summary

The dem2stl.py python script converts a Digital Elevation Model (DEM) (such as GeoTIFF) to a STereoLithography (STL) file. The result is a topography surface that may be used to generate computational grids such as those required by OpenFOAM meshing programs.

The dem2stl.py script can cope with DEM raster files referenced to geographic coordinates (longitude and latitude), internally projecting into an UTM coordinate system using Proj4.

Example

The following example uses the GeoTIFF sample file GeogToWGS84GeoKey5.tif:

./dem2stl.py example/GeogToWGS84GeoKey5.tif example/GeogToWGS84GeoKey5.stl

The GeogToWGS84GeoKey5.stl output file may be viewed using meshlab:

GeogToWGS84GeoKey5.stl

Usage

usage: dem2stl.py [-h] [-v] [--band BAND] RASTER STL

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

positional arguments:
  RASTER         Input GeoTIFF image
  STL            Output STL path

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  Print log messages
  --band BAND    Raster data band, defaults to 1

Requirements to run

The following python modules are required to run dem2stl.py:

On Debian-based systems these modules may be installed running:

apt-get install libpython2.7-stdlib libpython2.7-minimal \
    python-numpy python-gdal python-pyproj

Acknowledgments

dem2stl.py was based from the following python scripts:

dem2stl's People

Contributors

ewquon avatar cvr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.