Skip to main content

ETRS-TM35FIN coordinate system

Project description

ETRS-TM35FIN coordinate system for Python 3.8+

This library provides utility classes to work with ETRS-TM35FIN coordinates and map tiles as utilized by the national government agencies of Finland.

Finnish map tiles show here.

Maturity level

Low. API may change. I will package this up properly with time.

This package was written mostly to convert from coordinates to TM35 Map Tiles (karttalehdet) and back.

Examples

from tm35fin import Coordinates, MapTile

# Helsinki railway station point
c = Coordinates(385784,6672298)
c.wgs84         # (60.17156012073224, 24.941409012372404)

t = c.tile
t.name          # 'L4133B3'
t.size          # (3000,3000)  = 3km x 3km    
t.bounding_box  # (Coordinates(383000,6672000), Coordinates(386000,6675000))

# In WGS84
[ p.wgs84 for p in t.bounding_box ]    #  [(60.16809771362508, 24.891441776018347), (60.19586617397734, 24.943783308698634)]

# Get a larger tile
t = c.get_tile(level=3)

# We got tile L413 and our initialization point was 29.8km E & 6.3km N of tile corner
repr(t)         # MapTile(L413+<29784,6298>m)

print(c in t)   # True, point is on the tile

# Create MapTile via name
mt = MapTile('L331')

# Get center point
mt.center       # Coordinates(236000,6678000)

Known limitations

  • So called "half tiles" (puolikaslehdet) designated with L & R (example: V3113R) are not supported
  • There are no real geo-helpers like checking distance between points etc, convert to WGS84 (Coordinates.wgs84) and use another library
  • The coordinate system and library are tested only with coordinates in Finland and surrounding Baltic Sea
  • I'm lazy

Acknowledgements

  • WGS84 coordinate conversions (c) 2012-2015,2022 Olli Lammi (olammi@iki.fi)
  • Original tile math with numpy 2012-2014 Lauri Kangas (@lkangas)

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

tm35fin-0.1.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

tm35fin-0.1.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file tm35fin-0.1.0.tar.gz.

File metadata

  • Download URL: tm35fin-0.1.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2

File hashes

Hashes for tm35fin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 563c545095bb7f08ef9275c847ed12b866d3b725c0a22d2cd975268b660d5817
MD5 d48169196fbe38fd0c5971aeaf330291
BLAKE2b-256 8df0a9c1b8e4c6efe0657bff441f992a4e01ce60aab8875be7a0802adb8264fa

See more details on using hashes here.

File details

Details for the file tm35fin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tm35fin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2

File hashes

Hashes for tm35fin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dad0e615363825f992be6f88ffcc0cb822a52b190c2e6cf3b10aba2c8aef629
MD5 7de6ec9741d919b0de5b474fe20e0a3f
BLAKE2b-256 b4c358d9ced076598498f39201f50a85268d3ac5694596ef544a1271003d4b42

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