parsing origin data of remote sensor satellites
Project description
遥感卫星数据解析
安装
pip install satellite-parser
依赖
xmltodict
说明
本程序为遥感卫星原始数据解析,作为内部使用
类名
- GF1Satellite 高分一号数据处理类
- GF2Satellite 高分二号数据处理类
- GF3Satellite 高分三号数据处理类
- GF4Satellite 高分四号数据处理类
- GF5Satellite 高分五号数据处理类
- GF6Satellite 高分六号数据处理类
- GF7Satellite 高分七号数据处理类
- GF1BSatellite 高分一号B数据处理类
- GF1CSatellite 高分一号C数据处理类
- GF1DSatellite 高分一号D数据处理类
- SV101Satellite 高景一号01数据处理类
- SV102Satellite 高景一号02数据处理类
- SV103Satellite 高景一号03数据处理类
- SV104Satellite 高景一号04数据处理类
类变量
- file_name 文件名
- file_path 文件路径
- image_name 图片文件名
- xml_name xml文件名
- ext 文件后缀名
- satellite_id 星源 ID
- sensor_id 传感器 ID
- resolution 分辨率
- image 图片对象
- meta 解析 xml 后转换成 字典对象
- satellite_id
- sensor_id
- receive_time
- scene_id
- product_id
- product_level
- product_format
- produce_time
- bands
- resolution
- cloud_percent
- geometry Polygon Geometry 格式
API
初始化类
from satellite_parser import GF1Satellite
file_name = 'GF1_PMS1_E114.6_N22.7_20181006_L1A0003680028.tar.gz'
file_path = '/data/GF1_PMS1_E114.6_N22.7_20181006_L1A0003680028.tar.gz'
try:
satellite = GF1Satellite(file_name, file_path)
print(satellite.meta)
print(satellite.image_name)
print(satellite.xml_name)
except Exception as e:
print(e)
生成NID
generate_nid
from satellite_parser import GF1Satellite
file_name = 'GF1_PMS1_E114.6_N22.7_20181006_L1A0003680028.tar.gz'
file_path = '/data/GF1_PMS1_E114.6_N22.7_20181006_L1A0003680028.tar.gz'
try:
satellite = GF1Satellite(file_name, file_path)
print(satellite.generate_nid())
except Exception as e:
print(e)
更新日志
- v0.1 目前仅支持读取高分系列卫星
- v0.2 新增高景卫星处理类
- v0.2.3 卫星处理类新增两个变量 image_name 和 xml_name
- v0.2.4 修复bug,解析压缩包后执行 close
- v0.2.5 修复bug,在压缩包 close 前读取或解析所有需要的文件内容
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
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 satellite-parser-0.2.5.tar.gz.
File metadata
- Download URL: satellite-parser-0.2.5.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c7ba6253de36e1871fda5d94dede988deef2ca07a350ee3a388e7e58b3ead21
|
|
| MD5 |
dce717a7b07874c72fae5459249d61bc
|
|
| BLAKE2b-256 |
118e8f510c3e7a9f3f6bdc24c587cdd093c417265f65c19ee4c35d08858975f7
|
File details
Details for the file satellite_parser-0.2.5-py3-none-any.whl.
File metadata
- Download URL: satellite_parser-0.2.5-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e3df180d94bf9894521ccd2b82546e6c8c878e6fef39fa96e73f1184af30654
|
|
| MD5 |
01d75754c1a89c5bd69ec6de51295e2e
|
|
| BLAKE2b-256 |
f58c2e6c172ee12ff1789e197dbd86bcd586a6d0dbef9757c83bac3d5513db79
|