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.

Installation

It's in pypi:

pip install tm35fin

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.1.tar.gz (15.7 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.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tm35fin-0.1.1.tar.gz
  • Upload date:
  • Size: 15.7 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.1.tar.gz
Algorithm Hash digest
SHA256 5b1102bfca74b3f5b0606de4d22dac7f4d8dc91548e3f98c56df8a19187c1532
MD5 26e9dd48fd9499f212546be2ae66cb85
BLAKE2b-256 8c2fbb245798ee25ffc348ac8552631a5839afef426be8cfb29585e08209bc61

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tm35fin-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9690cf29be010ff08c7ac34ace9e0c2eaf64aaca12d8c18db7ff7f1c4a1002ce
MD5 d570fa56d9f295c0ce73c537bc435eae
BLAKE2b-256 2827b8cac8e2d5777d329d8b95012b57582614c75777b46a5fcbe310a33b814e

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