Skip to main content

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.

Metadata

Release files for jgdtrans 0.3.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 jgdtrans 0.3.0
File Size Uploaded Provenance Actions
jgdtrans-0.3.0.tar.gz 24.0 kB Without provenance Details for jgdtrans-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jgdtrans 0.3.0
File Interpreter ABI Platform Actions
jgdtrans-0.3.0-py3-none-any.whl Python 3 none any Details for jgdtrans-0.3.0-py3-none-any.whl

Total release size: 50.9 kB

Release files / jgdtrans-0.3.0.tar.gz

Download URL jgdtrans-0.3.0.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fb1df5b2e6724314c318ffa5116d18d9eee34fac9b7a0c43c32138cdaad53f0d
BLAKE2b-256 checksum
How to use checksums
890bba86f6dc0aeed1a132a22ace9127e6b661b7cc7799514c999a5cbf255257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / jgdtrans-0.3.0-py3-none-any.whl

Download URL jgdtrans-0.3.0-py3-none-any.whl
Size 26.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47149a6635553b84284cc7916d88156d9380c84dbf34b2ed9b5125a3fd8d9edc
BLAKE2b-256 checksum
How to use checksums
70f00731e257b1255c2cd8a05b9a26488c5be6f227044b2b52e1124cdae29f0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Security for jgdtrans 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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