A Python library for RS fused operations
Project description
rs-fused-lib
一个用于遥感数据处理的Python库,提供UDF(用户定义函数)功能。
安装
pip install rs-fused-lib
使用方法
1. 使用UDF装饰器
from rs_fused_lib import udf
@udf(
name="ndvi_calculator",
description="计算NDVI指数",
parameters={
"red_band": {"type": "int", "description": "红波段索引"},
"nir_band": {"type": "int", "description": "近红外波段索引"}
}
)
def calculate_ndvi(data, red_band=3, nir_band=4):
red = data[..., red_band]
nir = data[..., nir_band]
return (nir - red) / (nir + red)
2. 运行UDF函数
from rs_fused_lib import run
# 直接运行UDF函数
result = run(calculate_ndvi, data, red_band=3, nir_band=4)
# 或者通过函数名运行
result = run("calculate_ndvi", data, red_band=3, nir_band=4)
功能特点
- 支持UDF函数装饰器
- 支持通过函数名或函数对象运行UDF
- 支持参数传递和验证
- 支持元数据管理
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
rs_fused_lib-0.1.1.tar.gz
(12.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rs_fused_lib-0.1.1.tar.gz.
File metadata
- Download URL: rs_fused_lib-0.1.1.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0736a095ed37a214fdf21b83d91240c3bdb4cfb7f4ce7d5646cba9a6533f1d09
|
|
| MD5 |
256b753c457c624afc3729003eab5482
|
|
| BLAKE2b-256 |
3c06cfd5890d4564d181703abbbcc59a68dd5e7d15af00deb45f96d093494f0b
|
File details
Details for the file rs_fused_lib-0.1.1-py3-none-any.whl.
File metadata
- Download URL: rs_fused_lib-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86f7953bf66c39ead6bfaeb2c1f3c16c45a5883131ba38d8df5678a4efcfce3c
|
|
| MD5 |
332d9ccbfd9c87a8e03b6c43344865ba
|
|
| BLAKE2b-256 |
a32b06de12b3df23569659434328e06fb8ac559921a42f8cdd9358636cfaf818
|