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 don't offer terrain data 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 complete 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.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

pyterrain-0.0.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file pyterrain-0.0.1.tar.gz.

File metadata

  • Download URL: pyterrain-0.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pyterrain-0.0.1.tar.gz
Algorithm Hash digest
SHA256 151df30226f5002b3438a9c50aa3466ad898d2ecf9d4efb2ebd965ce32642262
MD5 ed6a8dce18219fceccca19ea76182ee9
BLAKE2b-256 90c67dd81380291f622d3ffaad671892099458681856372bc4993782cfd789d7

See more details on using hashes here.

File details

Details for the file pyterrain-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyterrain-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pyterrain-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2cdc4ef74f493edb3c48aa39c33cb18df54a82e0a622eb89060acca64460f731
MD5 83256ab838ee0a5846c22ec433564625
BLAKE2b-256 9291a601b7cdbc1d0c37122e3ece72272b9473f40086899467fa723bf1ce710d

See more details on using hashes here.

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