Skip to main content

Create upsampled DEMs for InSAR processing

Project description

Build Status Coverage Status

DEM creator

Tool for making Digital Elevation Maps (DEMs) in Roipac data format (16-bit integers, little endian) for using in and Interferometric SAR (InSAR) processing

sardem creates a cropped (and possibly upsampled) digital elevation map.

Setup and installation

# Optional for using virtualenv
virtualenv ~/envs/sardem && source ~/envs/sardem/bin/activate  # Or wherever you store your virtual envs
# Or if you have virtualenv wrapper: mkvirtualenv sardem
pip install sardem

This will put the executable sardem on your path with several commands available to use:

virtualenv is optional but recommended.

Command Line Interface Reference

The command line tool in sardem/cli.py was made using the click library.

$ sardem --help
sardem --geojson data/hawaii.geojson --rate 2 --output elevation.dem
sardem -g data/forrest.geojson -r 5 --output elevation.dem

The geojson can be any valid simple Polygon- you can get one easily from http://geojson.io , for example.

Functions for working with digital elevation maps (DEMs) are mostly contained in the Downloader and Stitcher classes within sardem/dem.py.

Once you have made this, if you want to get a quick look in python, the script sardem view opens the file and plots with matplotlib.

If you have multiple, you can plot them using matplotlib for a quick look.

sardem view elevation1.dem elevation2.dem

The default datasource is NASA's SRTM version 3 global 1 degree data. See https://lpdaac.usgs.gov/dataset_discovery/measures/measures_products_table/srtmgl3s_v003

This data requires a username and password from here: https://urs.earthdata.nasa.gov/users/new

You will be prompted for a username and password when running with NASA data. It will save into your ~/.netrc file for future use, which means you will not have to enter a username and password any subsequent times. The entry will look like this:

machine urs.earthdata.nasa.gov
    login USERNAME
    password PASSWORD

If you want to avoid this entirely, you can use Mapzen's data hosted on AWS by specifying

sardem -g data/hawaii.geojson --data-source AWS

--data-source NASA is the default.

Mapzen combines SRTM data with other sources, so the .hgt files will be slightly different. They also list that they are discontinuing some services, which is why NASA is the default.

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

sardem-0.1.2.tar.gz (38.6 kB view details)

Uploaded Source

File details

Details for the file sardem-0.1.2.tar.gz.

File metadata

  • Download URL: sardem-0.1.2.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2

File hashes

Hashes for sardem-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e6e62c5ee2f8f14c5a3a5ccbd2f71efe40f1a2d1222e93033437a3e6134d8b33
MD5 bbe83ea7b8a4a5ca42388dffbd187835
BLAKE2b-256 89ae2bd504ed7d5bc2442c1947fdabd3ec5b2183afbb8776d0788fd0ace8dab1

See more details on using hashes here.

Supported by

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