Skip to main content

A Python package to fetch terrain data easily.

Project description

pyterrain

A python package to fetch terrain.

Installation

You can install by pip $ pip install pyterrain

Usage

Register API Key

Pyterrain doesn't offer terrain data by itself, it fetches data from another website. Before downloading data, you should sign up an API key from nextzen.org. The key's pattern is like Dto0r88DQuaQizoxcQSxxx

Fetch DEM by bound box

When API key is reday, you can download DEM data like this:

bbox = 108.444319, 20.161757, 111.318897, 18.05883  # Hainan province of China

terrain = Terrain("Dto0r88DQuaQizoxcQSxxx")  # Pass API key
xs, ys, elevation = terrain.fetch(bbox=bbox, quiet=False, coord="lonlat", zoom=10)

If download is not completed because of connection, retry it.

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

pyterrain-0.0.2.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

pyterrain-0.0.2-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

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