geokits
Professional geospatial and maritime computational utilities.
Built with Rust and PyO3 for Python 3.12+.
Installation
pip install maturin
maturin develop --release
Or build a wheel:
maturin build --release
pip install target/wheels/geokits-*.whl
Usage
import geokits
# 创建计算器:排水量(m³), 船长(m), 船宽(m), 吃水(m)
# vessel_type 可选:传入含 "container" 的字符串按集装箱船公式
calc = geokits.NavCalc(
displacement=50000.0,
length=200.0,
breadth=30.0,
draught=10.0,
)
# 设置航速(节)和装载状态(True=满载,False=压载)
calc.setup(speed_kts=12.0, laden=True)
# 计算综合失速(节):风向角, 蒲福风级, 浪高, 浪向角
speed_loss = calc.compute(
wind_beta=20.0, # 风向角(度)
wind_scale=6, # 蒲福风级 0~12
wave_height=4.0, # 浪高(米)
wave_beta=15.0, # 浪向角(度)
)
print(f"失速: {speed_loss:.2f} 节")
API
geokits.NavCalc(displacement, length, breadth, draught, vessel_type=None)
创建船舶计算器实例。
| 参数 | 类型 | 说明 |
|---|---|---|
displacement |
float |
排水量 (m³),必须 > 0 |
length |
float |
船长 (m),必须 > 0 |
breadth |
float |
船宽 (m),必须 > 0 |
draught |
float |
吃水 (m),必须 > 0 |
vessel_type |
str | None |
船型,含 "container" 则按集装箱船公式(可选) |
NavCalc.setup(speed_kts, laden)
设置航速和装载状态,自动重新计算内部参数。
| 参数 | 类型 | 说明 |
|---|---|---|
speed_kts |
float |
航速(节) |
laden |
bool |
True 满载,False 压载 |
NavCalc.compute(wind_beta, wind_scale, wave_height, wave_beta) -> float
计算风浪综合失速值(节)。负值表示减速。
| 参数 | 类型 | 说明 |
|---|---|---|
wind_beta |
float |
风向角(度) |
wind_scale |
int |
蒲福风级 0~12 |
wave_height |
float |
浪高(米) |
wave_beta |
float |
浪向角(度) |
Development
# 运行测试
cargo test
# 构建并安装到当前 Python 环境
maturin develop
Metadata
Release files for geokits 0.4.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| geokits-0.4.9-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details for geokits-0.4.9-cp312-cp312-win_amd64.whl |
| geokits-0.4.9-cp312-cp312-manylinux_2_34_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.34+ x86-64 | Details for geokits-0.4.9-cp312-cp312-manylinux_2_34_x86_64.whl |
| geokits-0.4.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.17+ ARM64 | Details for geokits-0.4.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| geokits-0.4.9-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.12 | CPython 3.12 | macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) | Details for geokits-0.4.9-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
Total release size: 978.6 kB
Release files / geokits-0.4.9-cp312-cp312-win_amd64.whl
| Download URL | geokits-0.4.9-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 128.3 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b760d7446fdbb4582d9be7df6f0fcc6afef13a2723e1ce6816628af864cc79d3
|
|
BLAKE2b-256 checksum How to use checksums |
f58504d345fa9cc4f140524c0d7c1ec943966a1ae8363891092039efb729c96e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / geokits-0.4.9-cp312-cp312-manylinux_2_34_x86_64.whl
| Download URL | geokits-0.4.9-cp312-cp312-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 230.2 kB |
| Tags | CPython 3.12 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
bf899b44af7d4ef91feb1ee375f55997ca8ac81c27382baf3f7d0066077132ae
|
|
BLAKE2b-256 checksum How to use checksums |
e2f20a842274c202c81c170713cdcecb75ed3b6a13aad3d31708186399e7e742
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / geokits-0.4.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | geokits-0.4.9-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 221.0 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
753b7e136cd6cef67e07510c8041c20dcb48ec568cd28b14c6914cb71a4485ea
|
|
BLAKE2b-256 checksum How to use checksums |
5dffd720141ae1f89f3d33e889cf70893d231843ff89cb7ff55ac7fca18cd72b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / geokits-0.4.9-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | geokits-0.4.9-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 399.2 kB |
| Tags | CPython 3.12 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d90ee72c8dc6847680c9ae83f3a01ffd4fa399aa2cc3efe13c2367782aa8dc20
|
|
BLAKE2b-256 checksum How to use checksums |
4e672914fb77aca57832f67c8ddbb55ae33839a3dc8d817f2f843a19f2aa12a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for geokits 0.4.9
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.