Skip to main content

Coordinate Transformer by Gridded Correction Parameter (par file)

Project description

jgdtrans for Python

PyPI - Version Python Version from PEP 621 TOML GitHub Actions Workflow Status Read the Docs PyPI - License

Unofficial coordinate transformer by Gridded Correction Parameter which Geospatial Information Authority of Japan (GIAJ, formerly GSIJ) distributing for Python.

国土地理院が公開しているパラメータファイル(par ファイル)による座標変換(順逆変換)の非公式な実装です。

Features:

  • Supports offline transformation (no web API)
    • オフライン変換(web API 不使用)
  • Supports both original forward and backward transformation
    • 順変換と逆変換の両方をサポート
  • Supports verified backward transformation
    • 精度を保証した逆変換のサポート
  • Supports all TKY2JGD, PatchJGD, PatchJGD(H), HyokoRev, SemiDynaEXE and POS2JGD (geonetF3 and ITRF2014)
  • Clean implementation
    • 保守が容易な実装

Usage

You can install jgdtrans from PyPI:

pip install jgdtrans

jgdtrans depends on typing-extensions only, and requires Python >=3.9.

This package does not contain parameter files, download it from GIAJ.

このパッケージはパラメータファイルを提供しません。公式サイトよりダウンロードしてください。

Sample code:

import jgdtrans

with open('SemiDyna2023.par') as fp:
    tf = jgdtrans.load(fp, format='SemiDynaEXE')

# Geospatial Information Authority of Japan
origin = (36.10377479, 140.087855041, 2.34)

# forward transformation
result = tf.forward(*origin)
# prints Point(latitude=36.103773017086695, longitude=140.08785924333452, altitude=2.4363138578103)
print(result)

# backward transformation
point = tf.backward(*result)
# prints Point(latitude=36.10377479, longitude=140.087855041, altitude=2.34)
print(point)

# backward transformation compatible to GIAJ web app/APIs
p = tf.backward_compat(*result)
# prints Point(latitude=36.10377479000002, longitude=140.087855041, altitude=2.339999999578243)
print(p)

Licence

MIT

Reference

  1. Geospatial Information Authority of Japan (GIAJ, 国土地理院): https://www.gsi.go.jp/, (English) https://www.gsi.go.jp/ENGLISH/.
  2. TKY2JGD for Windows Ver.1.3.79 (reference implementation): https://www.gsi.go.jp/sokuchikijun/tky2jgd_download.html released under 国土地理院コンテンツ利用規約 which compatible to CC BY 4.0.
  3. Other implementation: Rust https://github.com/paqira/jgdtrans-rs, Java https://github.com/paqira/jgdtrans-java, JavaScript/TypeScript https://github.com/paqira/jgdtrans-js.

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

jgdtrans-0.2.3.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

jgdtrans-0.2.3-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file jgdtrans-0.2.3.tar.gz.

File metadata

  • Download URL: jgdtrans-0.2.3.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for jgdtrans-0.2.3.tar.gz
Algorithm Hash digest
SHA256 a15d31a95f7400f15f39d600700a3619864da939e4db9d7fe2e1b1d2a827f3e5
MD5 7f8c46af5825704f6897efc6fd3a0854
BLAKE2b-256 2f9009fce4682551a1b36992facda20641ae3779a4fa9b53be8310e9b1e5725a

See more details on using hashes here.

File details

Details for the file jgdtrans-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: jgdtrans-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for jgdtrans-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 df6892dce8a40f21295d79fe9f470cb8ad73d3d2388c8926beecddd2ca7277b5
MD5 692c8b2c903816bd2cc4075851d95dd7
BLAKE2b-256 8a8bf9be8e034ff5ddcfd74ebcfe7a9dc122c0f1bbdeecd86d76804b59cfea8c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page