Skip to main content

Midgard, the Python Geodesy library

Midgard is a collection of useful Python utilities used by the Geodetic institute at the Norwegian Mapping Authority (Kartverket). Although some of these are geodesy-specific, many are also useful in more general settings.

Note: Midgard is still in pre-alpha status. Its functionality will change, and it should not be depended on in any production-like setting.

Latest version Python versions Code style: black

Installing Midgard

Midgard is available at PyPI. You can install it by simply running

python -m pip install midgard

Installing Midgard from source

Midgard depends on several other brilliant Python packages, like for instance numpy, scipy, etc. We recommend using the Anaconda distribution to ease the installation of these dependencies.

Install Anaconda

Go to www.anaconda.com/download, and download Anaconda for Python 3.

Download the Midgard source code

If you have not already done so, download the Midgard source code from Github: github.com/kartverket/midgard. Then enter the main midgard directory before running the install command below.

cd midgard

Install dependencies

You should now install the necessary dependencies using the environment.yml-file. You can do this either in your current conda environment, or choose to create a new midgard-environment. In order to use midgard in other projects you need to install midgard in the same environment as those projects.

To install midgard in your current environment, do

conda env update -f environment.yml

To install midgard in a new environment named midgard and activate it, do

conda env create -n midgard -f environment.yml
conda activate midgard

Install the Midgard package

To do the actual installation of Midgard, use the flit packaging tool:

python -m flit install --dep production

If you want to develop the Midgard package, install it in editable mode using

python -m flit install -s

On Windows, you can install in editable mode using

python -m flit install --pth-file

Using Midgard

Midgard comes organized into different subpackages. To see info about the different subpackages, use the Python help system:

>>> import midgard
>>> help(midgard)

Information about individual subpackages is also available on the Midgard website.

Metadata

Release files for midgard 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for midgard 1.4.0
File Size Uploaded
midgard-1.4.0.tar.gz 10.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for midgard 1.4.0
File Interpreter ABI Platform
midgard-1.4.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 11.1 MB

Release files / midgard-1.4.0.tar.gz

Download URL midgard-1.4.0.tar.gz
Size 10.6 MB
Tags Source
SHA-256 checksum
How to use checksums
efd2549b81eb4180e5a0c0d489031221dc013bdc353284808e553510adb382b8
BLAKE2b-256 checksum
How to use checksums
6313a5989500167acc5448e5f7f06199e6d3240ca2ef6607b214eb75598dccf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.33.1

Release files / midgard-1.4.0-py2.py3-none-any.whl

Download URL midgard-1.4.0-py2.py3-none-any.whl
Size 472.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9a659b84f712e197d1e2295932c46397c97faa7333cd8660e104065dc6107092
BLAKE2b-256 checksum
How to use checksums
dce36a370f6f032ab6d7b61f99a1fc1891b29897888468a50c0b014165090e33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.33.1

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page