Files
geo_tools/tests/test1.py
2026-03-04 17:07:07 +08:00

20 lines
436 B
Python

import sys
import os
os.environ["OGR_ORGANIZE_POLYGONS"] = "SKIP"
from pathlib import Path
# 添加项目根目录到路径
sys.path.insert(0, str(Path(__file__).parent.parent))
import geo_tools
gdb_path = r"E:\@三普\@临时文件夹\临时数据库.gdb"
# 列出图层
# layers = geo_tools.list_gdb_layers(gdb_path)
# print(layers)
# 读取图层
gdf = geo_tools.read_gdb(gdb_path, layer="马关综合后图斑")
print(gdf.crs)