02 2025 档案

摘要:python读取tfrecord单个数据import numpy as np def parse_tfrec(filename): # 遍历每条样本 feature = None for raw_record in tf.data.TFRecordDataset(filename): example = tf.train.Example( 阅读全文
posted @ 2025-02-15 21:23 GeoRepublic 阅读(0) 评论(0) 推荐(0) 编辑
摘要:用python直接提取gee数据的value(无需下载),适合小体量的数据,免去了下载、提取的繁琐步骤 用@dataclass定义配置,后面可以继续沿用 from typing import List, Dict, Tuple, Callable import pandas as pd import 阅读全文
posted @ 2025-02-10 16:12 GeoRepublic 阅读(8) 评论(0) 推荐(0) 编辑
摘要:import rasterio import pandas as pd def extract_values_from_tif(df: pd.DataFrame, tif_path: str, keys: list) -> pd.DataFrame: """ 从 TIFF 影像中提取多个点的像素值, 阅读全文
posted @ 2025-02-10 16:08 GeoRepublic 阅读(15) 评论(0) 推荐(0) 编辑
摘要:用python从GEE导出数据到Google drive 替换compute_wet_days函数,实现导出不同的加工数据 # 读取数据 name = "wdc1_era" africa = ee.Geometry.Polygon( [[[-24.64931493978714, 41.3074154 阅读全文
posted @ 2025-02-10 16:07 GeoRepublic 阅读(13) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示