Python package for Earth data models management
- 2019-2020 Antonio Valentino
GeoModels provides tools for the management of Earth models like geoids, gravity models, and magnetic field models.
It also provides some utility function to download and install support data to that are necessary for Earth models computation.
$ python3 -m pip install geomodels
Please refer to the Pip user manual for details about installation options and to the installation section in the documentation for details about installation form sources.
Model data installation
GeoModels uses external data to perform geoid, gravity and magnetic field computations.
If required data are not already available on the system than they can be downloaded and installed using the command line interface provided by the GeoModels package:
$ python -m geomodels install-data [-d DATADIR] recommended
The above command installs the recommended subset of data (about 20MB) into the specified DATAROOT`folder. If `DATAROOT is not explicitly specified using the -d (or –datadir) option then the default system path is used (e.g. /usr/local/share/GeographicLib).
In any case it is necessary to have write permission on the DATADIR folder, so to install into the default system path it will be probably necessary to use sudo or some equivalent method.
If data are not installed into the default system folder than it is necessary to set the GEOGRAPHICLIB_DATA environment variable to the data installation path to allow GeographicLib to find data. E.g., on systems using bash one can use the following command:
Once the GeoModels package and necessary data have been installed, it is possible to run the test suite to be sure that all works correctly. The recommended way to test GeoModels with using PyTest:
$ env GEOGRAPHICLIB_DATA=/path/to/data \ python3 -m pytest --pyargs geomodels
>>> from geomodels import GeoidModel >>> geoid = GeoidModel() >>> geoid.description() 'WGS84 EGM96, 5-minute grid' >>> geoid(lat=40.667, lon=16.6) # -> geoid height 45.914894760480024
GeoModels is released under the terms of the MIT/X11 License (see LICENSE file).
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for geomodels-1.0.0b4-cp38-cp38-manylinux2010_x86_64.whl
Hashes for geomodels-1.0.0b4-cp37-cp37m-manylinux2010_x86_64.whl
Hashes for geomodels-1.0.0b4-cp36-cp36m-manylinux2010_x86_64.whl