Skip to main content

A SWEREF 99 map projection library

Project description

Version: 0.2 License: MIT

SWEREF 99 map projection

Python library for conversion between geodetic (latitude, longitude) coordinates and plane (N, E) grid coordinates. Implements a Transverse Mercator map projection (Gauss Conformal Projection) and projection parameters for the SWEREF 99 geodetic reference system. The ellipsoid is GRS80 but other ellipsoids can easily be defined.

Since the WGS 84 datum used by GPS is almost identical to SWEREF 99 they can be used interchangeably for most applications. More details on the relationship between WGS 84 and SWEREF 99 can be found here.

The map projection implementation is based on the Gauss-Krügers formula as published by Lantmäteriet.

Usage

from sweref99 import projections

if __name__ == '__main__':
    tm = projections.make_transverse_mercator("SWEREF_99_TM")
    lat, lon = 57.705918, 11.987286

    # Geodetic to grid
    northing, easting = tm.geodetic_to_grid(lat, lon)
    print(f"{lat:.6f}° N {lon:.6f}°E : {northing:.2f} N {easting:.2f} E")

    # Grid to geodetic
    lat, lon = tm.grid_to_geodetic(northing, easting)
    print(f"{northing:.2f} N {easting:.2f} E : {lat:.6f}° N {lon:.6f}°E")

Supported projections

  • SWEREF_99_TM
  • SWEREF_99_12_00
  • SWEREF_99_13_30
  • SWEREF_99_15_00
  • SWEREF_99_16_30
  • SWEREF_99_18_00
  • SWEREF_99_14_15
  • SWEREF_99_15_45
  • SWEREF_99_17_15
  • SWEREF_99_18_45
  • SWEREF_99_20_15
  • SWEREF_99_21_45
  • SWEREF_99_23_15

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sweref99-0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

sweref99-0.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file sweref99-0.2.tar.gz.

File metadata

  • Download URL: sweref99-0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/49.6.0 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.7.5

File hashes

Hashes for sweref99-0.2.tar.gz
Algorithm Hash digest
SHA256 d007b7e7d7c48e9bf871963674309bd64bd9af80e48f62b46cc68d7b1b4cb513
MD5 765ceba254bbdb231610b9bc288f5078
BLAKE2b-256 a4650e75dc3cf4390d1bfdb8d7c0230abfac0ffb590837014c19f3d7c2019d64

See more details on using hashes here.

File details

Details for the file sweref99-0.2-py3-none-any.whl.

File metadata

  • Download URL: sweref99-0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/49.6.0 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.7.5

File hashes

Hashes for sweref99-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7feae82f8989b51205af0a705a4f7460aaad3e15869e18632e085ad5b668558
MD5 4256464a8a02da94432560e262067c29
BLAKE2b-256 e87009541458661217a8a36ee957219c5654e2f049670416998f8b965c517483

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