Giter VIP home page Giter VIP logo

dem-tools's Introduction

DEM-Tools

Python code for working with Digital Elevation Models and tile rendering.

License in "LICENSE" file.

Contents

Hillup: package for handling DEM modules and intermediate storage of slope and aspect in tiled GeoTIFF data format. The Hillup.data module simplifies access to digital elevation models from the SRTM and NED data sets. The module is a TileStache provider that automatically downloads elevation data for requested regions. It also renders that data into multiband TIFF files that have precalculated slope and azimuth data for the selected region. The Hillup.tiles module uses TileStache and PIL to turn the slope-and-aspect TIFF files generated by hillfarm-seed.py and turn them in to image tiles suitable for use in an online slippy map.

hillup-seed.py is a script for pre-generating slope-and-aspect TIFF files for a selected region. It is used to seed the data directories for rendering.

Installation

python setup.py install

DEM-Tools relies on a large stack of open source software. Version dependencies are not exact, but just notes on what is known to work.

  • Python (2.7)
  • gdal (1.8.1) and its dependencies
  • PIL (1.1.7)
  • ModestMaps (1.2)
  • TileStache (1.19.0)

On Debian or Ubuntu, all requirements can be installed via Apt and Python's easy_install/pip.

On MacOS, all requirements can be installed via HomeBrew and Python's easy_install/pip. Install Python first and pay close attention to HomeBrew's caveats about /usr/local/share/python in your PATH. There is a known bug (issue #1) on MacOS where the multiband slope-and-aspect TIFFs generated by hillup-seed.py are corrupt and unusuable. For now we generate those input tiles on Linux: rendering works on MacOS.

Usage

  1. Clone the git repository.
  2. Run python hillup-seed.py 10. That will download necessary DEM data and then populate the out directory with slope-and-azimuth TIFFs for a small region near San Francisco at zoom level 10. If that works, you can then generate a larger set of TIFFs via a line like python hillup-seed.py -b 41 -121 42 -120 4 5 6 7 8 9 10 11 12 13 14 15
  3. install render/tile.cgi as a CGI script in your favorite web server. You can then test it by loading a URL like http://localhost/tiles/hills/10/163/395.png where localhost/tiles/hills matches the installation path and 10/163/395.png is the slippy math pap to a tile (in this case, near San Francisco at 37.84, -122.50).

hillup-seed.py downloads and generates many gigabytes of data in the data/out and data/source directories for large scale renders. Provision accordingly.

dem-tools's People

Contributors

nelsonminar avatar migurski avatar brookstalley avatar recursify avatar

Watchers

Lee Shepherd 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.