# jgdtrans for Python
[![PyPI - Version](https://img.shields.io/pypi/v/jgdtrans?logo=PyPI&label=PyPI)](https://pypi.org/project/jgdtrans/)
![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?logo=Python&label=Python&&tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fpaqira%2Fjgdtrans-py%2Fmain%2Fpyproject.toml)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/paqira/jgdtrans-py/ci.yaml?logo=GitHub)
[![Read the Docs](https://img.shields.io/readthedocs/jgdtrans-py?logo=readthedocs)](https://jgdtrans-py.readthedocs.io)
![PyPI - License](https://img.shields.io/pypi/l/jgdtrans)
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)
- For example, Tokyo Datum to JGD2000 ([EPSG:4301] to [EPSG:4612])
and JGD2000 to JGD2011 ([EPSG:4612] to [EPSG:6668])
- 上記の全てをサポート
- Clean implementation
- 保守が容易な実装
[TKY2JGD]: https://www.gsi.go.jp/sokuchikijun/tky2jgd.html
[PatchJGD]: https://vldb.gsi.go.jp/sokuchi/surveycalc/patchjgd/index.html
[PatchJGD(H)]: https://vldb.gsi.go.jp/sokuchi/surveycalc/patchjgd_h/index.html
[HyokoRev]: https://vldb.gsi.go.jp/sokuchi/surveycalc/hyokorev/hyokorev.html
[SemiDynaEXE]: https://vldb.gsi.go.jp/sokuchi/surveycalc/semidyna/web/index.html
[POS2JGD]: https://positions.gsi.go.jp/cdcs
[EPSG:4301]: https://epsg.io/4301
[EPSG:4612]: https://epsg.io/4612
[EPSG:6668]: https://epsg.io/6668
## Usage
You can install `jgdtrans` from PyPI:
```sh
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:
```python
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>.
[国土地理院コンテンツ利用規約]: https://www.gsi.go.jp/kikakuchousei/kikakuchousei40182.html
Raw data
{
"_id": null,
"home_page": null,
"name": "jgdtrans",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "Coordinate Transformation, GIS, HyokoRev, ITRF2014, PatchJGD, PatchJGD(H), PatchJGD(HV), SemiDyna, SemiDynaEXE, TKY2JGD, geonetF3, par file",
"author": null,
"author_email": "Kentaro Tatsumi <paqira.2019@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/2f/90/09fce4682551a1b36992facda20641ae3779a4fa9b53be8310e9b1e5725a/jgdtrans-0.2.3.tar.gz",
"platform": null,
"description": "# jgdtrans for Python\n\n[![PyPI - Version](https://img.shields.io/pypi/v/jgdtrans?logo=PyPI&label=PyPI)](https://pypi.org/project/jgdtrans/)\n![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?logo=Python&label=Python&&tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fpaqira%2Fjgdtrans-py%2Fmain%2Fpyproject.toml)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/paqira/jgdtrans-py/ci.yaml?logo=GitHub)\n[![Read the Docs](https://img.shields.io/readthedocs/jgdtrans-py?logo=readthedocs)](https://jgdtrans-py.readthedocs.io)\n![PyPI - License](https://img.shields.io/pypi/l/jgdtrans)\n\nUnofficial coordinate transformer by _Gridded Correction Parameter_\nwhich Geospatial Information Authority of Japan (GIAJ, formerly GSIJ) distributing\nfor Python.\n\n\u56fd\u571f\u5730\u7406\u9662\u304c\u516c\u958b\u3057\u3066\u3044\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\uff08par \u30d5\u30a1\u30a4\u30eb\uff09\u306b\u3088\u308b\u5ea7\u6a19\u5909\u63db\uff08\u9806\u9006\u5909\u63db\uff09\u306e\u975e\u516c\u5f0f\u306a\u5b9f\u88c5\u3067\u3059\u3002\n\nFeatures:\n\n- Supports offline transformation (no web API)\n - \u30aa\u30d5\u30e9\u30a4\u30f3\u5909\u63db\uff08web API \u4e0d\u4f7f\u7528\uff09\n- Supports both original forward and backward transformation\n - \u9806\u5909\u63db\u3068\u9006\u5909\u63db\u306e\u4e21\u65b9\u3092\u30b5\u30dd\u30fc\u30c8\n- Supports verified backward transformation\n - \u7cbe\u5ea6\u3092\u4fdd\u8a3c\u3057\u305f\u9006\u5909\u63db\u306e\u30b5\u30dd\u30fc\u30c8\n- Supports all [TKY2JGD], [PatchJGD], [PatchJGD(H)], [HyokoRev], [SemiDynaEXE]\n and [POS2JGD] (geonetF3 and ITRF2014)\n - For example, Tokyo Datum to JGD2000 ([EPSG:4301] to [EPSG:4612])\n and JGD2000 to JGD2011 ([EPSG:4612] to [EPSG:6668])\n - \u4e0a\u8a18\u306e\u5168\u3066\u3092\u30b5\u30dd\u30fc\u30c8\n- Clean implementation\n - \u4fdd\u5b88\u304c\u5bb9\u6613\u306a\u5b9f\u88c5\n\n[TKY2JGD]: https://www.gsi.go.jp/sokuchikijun/tky2jgd.html\n[PatchJGD]: https://vldb.gsi.go.jp/sokuchi/surveycalc/patchjgd/index.html\n[PatchJGD(H)]: https://vldb.gsi.go.jp/sokuchi/surveycalc/patchjgd_h/index.html\n[HyokoRev]: https://vldb.gsi.go.jp/sokuchi/surveycalc/hyokorev/hyokorev.html\n[SemiDynaEXE]: https://vldb.gsi.go.jp/sokuchi/surveycalc/semidyna/web/index.html\n[POS2JGD]: https://positions.gsi.go.jp/cdcs\n\n[EPSG:4301]: https://epsg.io/4301\n[EPSG:4612]: https://epsg.io/4612\n[EPSG:6668]: https://epsg.io/6668\n\n## Usage\n\nYou can install `jgdtrans` from PyPI:\n\n```sh\npip install jgdtrans\n```\n\n`jgdtrans` depends on `typing-extensions` only, and requires Python `>=3.9`.\n\nThis package does not contain parameter files, download it from GIAJ.\n\n\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u3092\u63d0\u4f9b\u3057\u307e\u305b\u3093\u3002\u516c\u5f0f\u30b5\u30a4\u30c8\u3088\u308a\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\nSample code:\n\n```python\nimport jgdtrans\n\nwith open('SemiDyna2023.par') as fp:\n tf = jgdtrans.load(fp, format='SemiDynaEXE')\n\n# Geospatial Information Authority of Japan\norigin = (36.10377479, 140.087855041, 2.34)\n\n# forward transformation\nresult = tf.forward(*origin)\n# prints Point(latitude=36.103773017086695, longitude=140.08785924333452, altitude=2.4363138578103)\nprint(result)\n\n# backward transformation\npoint = tf.backward(*result)\n# prints Point(latitude=36.10377479, longitude=140.087855041, altitude=2.34)\nprint(point)\n\n# backward transformation compatible to GIAJ web app/APIs\np = tf.backward_compat(*result)\n# prints Point(latitude=36.10377479000002, longitude=140.087855041, altitude=2.339999999578243)\nprint(p)\n```\n\n## Licence\n\nMIT\n\n## Reference\n\n1. Geospatial Information Authority of Japan (GIAJ, \u56fd\u571f\u5730\u7406\u9662):\n <https://www.gsi.go.jp/>,\n (English) <https://www.gsi.go.jp/ENGLISH/>.\n2. _TKY2JGD for Windows Ver.1.3.79_ (reference implementation):\n <https://www.gsi.go.jp/sokuchikijun/tky2jgd_download.html>\n released under [\u56fd\u571f\u5730\u7406\u9662\u30b3\u30f3\u30c6\u30f3\u30c4\u5229\u7528\u898f\u7d04] which compatible to CC BY 4.0.\n3. Other implementation:\n Rust <https://github.com/paqira/jgdtrans-rs>,\n Java <https://github.com/paqira/jgdtrans-java>,\n JavaScript/TypeScript <https://github.com/paqira/jgdtrans-js>.\n\n[\u56fd\u571f\u5730\u7406\u9662\u30b3\u30f3\u30c6\u30f3\u30c4\u5229\u7528\u898f\u7d04]: https://www.gsi.go.jp/kikakuchousei/kikakuchousei40182.html\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Coordinate Transformer by Gridded Correction Parameter (par file)",
"version": "0.2.3",
"project_urls": {
"Documentation": "https://jgdtrans-py.readthedocs.io",
"Issues": "https://github.com/paqira/jgdtrans-py/issues",
"Source": "https://github.com/paqira/jgdtrans-py"
},
"split_keywords": [
"coordinate transformation",
" gis",
" hyokorev",
" itrf2014",
" patchjgd",
" patchjgd(h)",
" patchjgd(hv)",
" semidyna",
" semidynaexe",
" tky2jgd",
" geonetf3",
" par file"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8a8bf9be8e034ff5ddcfd74ebcfe7a9dc122c0f1bbdeecd86d76804b59cfea8c",
"md5": "692c8b2c903816bd2cc4075851d95dd7",
"sha256": "df6892dce8a40f21295d79fe9f470cb8ad73d3d2388c8926beecddd2ca7277b5"
},
"downloads": -1,
"filename": "jgdtrans-0.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "692c8b2c903816bd2cc4075851d95dd7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 25402,
"upload_time": "2024-11-09T14:46:08",
"upload_time_iso_8601": "2024-11-09T14:46:08.032707Z",
"url": "https://files.pythonhosted.org/packages/8a/8b/f9be8e034ff5ddcfd74ebcfe7a9dc122c0f1bbdeecd86d76804b59cfea8c/jgdtrans-0.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2f9009fce4682551a1b36992facda20641ae3779a4fa9b53be8310e9b1e5725a",
"md5": "7f8c46af5825704f6897efc6fd3a0854",
"sha256": "a15d31a95f7400f15f39d600700a3619864da939e4db9d7fe2e1b1d2a827f3e5"
},
"downloads": -1,
"filename": "jgdtrans-0.2.3.tar.gz",
"has_sig": false,
"md5_digest": "7f8c46af5825704f6897efc6fd3a0854",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 23312,
"upload_time": "2024-11-09T14:46:06",
"upload_time_iso_8601": "2024-11-09T14:46:06.188254Z",
"url": "https://files.pythonhosted.org/packages/2f/90/09fce4682551a1b36992facda20641ae3779a4fa9b53be8310e9b1e5725a/jgdtrans-0.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-09 14:46:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "paqira",
"github_project": "jgdtrans-py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "jgdtrans"
}