Skip to main content

No project description provided

Project description

PyGsiElev

This is a tiny Python package that can get the elevation of specified coordinates, using the open DEM data distributed from GSI.

Prepare data

  • Download DEM data from GSI's download service. The service is free of charge, but user registration is required.

  • Place the downloaded zip files together in a directory of your choice.

How to use

Install pygsielev package using pip.

$ pip install pygsielev

Import pygsielev.ElevationExtractor class and instanciate with data_dir. Then, call get_elevation() of the object with longitude and latitude.

>>> from pygsielev import ElevationExtractor
>>> engine = ElevationExtractor(data_dir="data/")
>>> print(engine.get_elevation(lon=138.727299, lat=35.360785))
(3774.9, 'その他')

It returns a tuple contains (elevation, surface type).

Note: When the data_dir paramater is omitted, the environmental variable GSIELEV_DATADIR will be used to get the data directory.

Operating environment

This package works with Python 3.9 or later. It uses only the standard library.

Contributing

Pull requests are welcome.

Author

Takeshi Sagara sagara@info-proto.com

License

This package can be used under the MIT License.

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

pygsielev-0.1.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygsielev-0.1.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file pygsielev-0.1.1.tar.gz.

File metadata

  • Download URL: pygsielev-0.1.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for pygsielev-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cc60c04bea7b749a9134a23624abc45cf31c495bb81294f4f16b7135f7ce565b
MD5 acd76d21bc31c74a887ea7202601005d
BLAKE2b-256 e67074134f2b18197dd77a6417a28e213bfb5271ef5ca5cd9053720d52caf06e

See more details on using hashes here.

File details

Details for the file pygsielev-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pygsielev-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for pygsielev-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b0fb3b91e3c7d659e05c108578ba62883a32ea884775c4743193610686fecbde
MD5 2b3f76ab418269c0894bc9b64f91406f
BLAKE2b-256 bf440248c41907f4485638fe410bf2aae997360048f8d03e6765cb64b520c8b7

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