Skip to main content

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.5.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rs_fused_lib-0.1.5-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file rs_fused_lib-0.1.5.tar.gz.

File metadata

  • Download URL: rs_fused_lib-0.1.5.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for rs_fused_lib-0.1.5.tar.gz
Algorithm Hash digest
SHA256 b7d554967dda5dcac274927e1a13354c028e3c702da3d952b3a0a9cb9d03c291
MD5 80ff47ca5cad2748354bec9464f0ac36
BLAKE2b-256 fa4bc74c8cc3d2dc11b3535acd082bc9fa56d45467c30acf05227f4fa9ee0ee7

See more details on using hashes here.

File details

Details for the file rs_fused_lib-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: rs_fused_lib-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for rs_fused_lib-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9b1bc0f56c190639183652753bdbd67a0d68f8db53d8041acf50a0a3d92831d4
MD5 5ba4233e2ac7a77eb233ffb139915d9d
BLAKE2b-256 ac23324e9ccef1297fc14c47b9eab321853cac1607abac7e636f0e03deab8fe7

See more details on using hashes here.

Supported by

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