npx skills add https://github.com/vamseeachanta/workspace-hub --skill gis跨应用地理空间技能,涵盖 digitalmodel.gis 模块(WRK-020)支持的坐标参考系统、数据格式和应用集成步骤。
| EPSG | 名称 | 使用场景 |
|---|---|---|
| EPSG:4326 | WGS84 地理坐标系 | GeoJSON、GPS、BSEE 井数据的默认坐标系 |
| EPSG:3857 | Web 墨卡托(伪墨卡托) | 瓦片地图(谷歌地图、OpenStreetMap) |
| EPSG:32601–32660 | UTM 1N–60N 区 | 北半球米级精度工作 |
| EPSG:32701–32760 | UTM 1S–60S 区 | 南半球米级精度工作 |
| EPSG:4269 | NAD83 | 美国陆上监管数据 |
根据经度自动检测 UTM 区:
from digitalmodel.gis.core.crs import get_utm_epsg
epsg = get_utm_epsg(longitude=-1.5, latitude=57.0) # 返回 "EPSG:32630"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 格式 | 扩展名 | 处理器 | 备注 |
|---|---|---|---|
| GeoJSON | .geojson, .json | io.geojson_handler.GeoJSONHandler | 无额外依赖;RFC 7946 |
| KML / KMZ | .kml, .kmz | io.kml_handler.KMLHandler | 纯标准库 xml.etree |
| Shapefile | .shp + .dbf + .shx | io.shapefile_handler.ShapefileHandler | 需要 geopandas/fiona |
| GeoTIFF | .tif, .tiff | io.geotiff_handler.GeoTIFFHandler | 需要 rasterio |
| CSV + 经纬度 | .csv | layers.feature_layer.FeatureLayer | 标准 pandas 读取 |
| WKT | 嵌入在 .qgs / .csv 中 | core.geometry | 用于 QGIS 项目文件 |
从 WellLayer 生成可直接打开的 .qgs 项目文件:
from digitalmodel.gis.integrations.qgis_export import QGISExporter
from digitalmodel.gis.layers.well_layer import WellLayer
layer = WellLayer.from_csv("wells.csv", lat_col="lat", lon_col="lon")
exporter = QGISExporter(layer)
exporter.generate_project("wells.qgs") # 在 QGIS 3.x 中打开
exporter.generate_well_qml("wells_style.qml") # 井标记样式
在 QGIS 处理 Python 控制台内加载 GeoTIFF 水深图层:
iface.addRasterLayer("/path/to/bathymetry.tif", "Bathymetry")
生成一个在 3D 空间中定位井圆柱体的 Blender Python 脚本:
from digitalmodel.gis.integrations.blender_export import BlenderExporter
from digitalmodel.gis.layers.well_layer import WellLayer
layer = WellLayer.from_csv("wells.csv", lat_col="lat", lon_col="lon")
exporter = BlenderExporter(layer)
exporter.write_well_script("add_wells.py")
# 在 Blender 中:文本编辑器 > 打开 add_wells.py > 运行脚本
将 GeoTIFF 转换为 Blender 可直接导入的 OBJ 网格:
python scripts/gis/geotiff-to-blender.py bathymetry.tif --output terrain.obj
# 可选:通过子采样减少顶点数量
python scripts/gis/geotiff-to-blender.py bathymetry.tif --output terrain.obj --subsample 4
在 Blender 中:文件 > 导入 > Wavefront (.obj) — 选择 terrain.obj。
默认缩放:1 米 = 0.001 Blender 单位(千米比例)。可使用 --scale-xy 和 --scale-z 覆盖。
python scripts/gis/geotiff-to-blender.py bathymetry.tif --output points.csv
# QGIS:图层 > 添加图层 > 添加分隔文本图层 > 选择 points.csv
# 设置 X=x, Y=y, Z=z, CRS = GeoTIFF 的源 CRS
# 访问支持 CRS 的 BSEE 井位
from worldenergydata.bsee import load_wells
wells_df = load_wells() # WGS84 坐标系中的经纬度列
| 数据源 | 分辨率 | 格式 | 备注 |
|---|---|---|---|
| GEBCO 2023 | 15 角秒(约 500 米) | GeoTIFF | 全球,免费下载 |
| 通过 GEE 获取 GEBCO | 可配置 | GeoTIFF 导出 | 参见 google-earth-engine 技能 |
| NOAA NCEI | 1 角秒(美国沿海) | GeoTIFF | ETOPO 系列 |
digitalmodel/gis/
coordinates.py — CoordinatePoint 数据类,批量坐标转换
core/
crs.py — CRS 定义,get_utm_epsg()
geometry.py — GeoPoint, GeoBoundingBox, GeoPolygon
spatial_query.py — 半径、边界框、多边形、最近邻查询
coordinate_transformer.py
io/
geojson_handler.py — GeoJSON 读写
kml_handler.py — KML/KMZ 读写
shapefile_handler.py — Shapefile(可选依赖 geopandas)
geotiff_handler.py — GeoTIFF 读写/to_xyz(可选依赖 rasterio)
layers/
feature_layer.py — FeatureLayer(基于 pandas 的 GIS 集合)
well_layer.py — WellLayer(井数据专用子类)
integrations/
blender_export.py — 用于井标记的 Blender 脚本生成器
qgis_export.py — QGIS .qgs 项目 + .qml 样式生成器
folium_maps.py — Folium/Leaflet HTML 地图
google_earth_export.py— 用于 Google Earth 的带样式 KML
plotly_maps.py — Plotly mapbox 散点图/仪表板
| 错误 | 原因 | 修复方法 |
|---|---|---|
ImportError: rasterio not installed | 未安装 rasterio | pip install rasterio |
CRS mismatch in spatial join | 图层使用不同的 CRS | gdf.to_crs("EPSG:32631") |
| Blender 中 OBJ 网格 Z 轴翻转 | 深度值为负 | 使用 --scale-z -0.001 反转 |
| QGIS .qgs 文件无法打开 | QGIS 版本不匹配 | 通过图层 > 添加矢量图层方式打开 |
| 大型 OBJ 导致 Blender 运行缓慢 | 全分辨率栅格数据 | 使用 --subsample 4 或更高值 |
每周安装量
80
代码仓库
GitHub 星标数
4
首次出现
2026年2月27日
安全审计
安装于
github-copilot80
codex80
gemini-cli80
amp79
cline79
kimi-cli79
Cross-application geospatial skill covering supported CRS, data formats, and application integration steps for the digitalmodel.gis module (WRK-020).
| EPSG | Name | Use case |
|---|---|---|
| EPSG:4326 | WGS84 geographic | Default for GeoJSON, GPS, BSEE well data |
| EPSG:3857 | Web Mercator (Pseudo-Mercator) | Tile maps (Google Maps, OpenStreetMap) |
| EPSG:32601–32660 | UTM Zone 1N–60N | Northern hemisphere metre-accurate work |
| EPSG:32701–32760 | UTM Zone 1S–60S | Southern hemisphere metre-accurate work |
| EPSG:4269 | NAD83 | US onshore regulatory data |
Auto-detect UTM zone from longitude:
from digitalmodel.gis.core.crs import get_utm_epsg
epsg = get_utm_epsg(longitude=-1.5, latitude=57.0) # returns "EPSG:32630"
| Format | Extensions | Handler | Notes |
|---|---|---|---|
| GeoJSON | .geojson, .json | io.geojson_handler.GeoJSONHandler | No extra deps; RFC 7946 |
| KML / KMZ | .kml, .kmz | io.kml_handler.KMLHandler | Pure stdlib xml.etree |
| Shapefile | .shp + .dbf + .shx | io.shapefile_handler.ShapefileHandler | Requires geopandas/fiona |
| GeoTIFF | .tif, .tiff | io.geotiff_handler.GeoTIFFHandler |
Generate a ready-to-open .qgs project file from a WellLayer:
from digitalmodel.gis.integrations.qgis_export import QGISExporter
from digitalmodel.gis.layers.well_layer import WellLayer
layer = WellLayer.from_csv("wells.csv", lat_col="lat", lon_col="lon")
exporter = QGISExporter(layer)
exporter.generate_project("wells.qgs") # open in QGIS 3.x
exporter.generate_well_qml("wells_style.qml") # well marker style
Load a GeoTIFF bathymetry layer inside QGIS Processing Python console:
iface.addRasterLayer("/path/to/bathymetry.tif", "Bathymetry")
Generate a Blender Python script that positions well cylinders in 3D:
from digitalmodel.gis.integrations.blender_export import BlenderExporter
from digitalmodel.gis.layers.well_layer import WellLayer
layer = WellLayer.from_csv("wells.csv", lat_col="lat", lon_col="lon")
exporter = BlenderExporter(layer)
exporter.write_well_script("add_wells.py")
# In Blender: Text editor > Open add_wells.py > Run Script
Convert a GeoTIFF to an OBJ mesh that Blender can import directly:
python scripts/gis/geotiff-to-blender.py bathymetry.tif --output terrain.obj
# Optional: subsample to reduce vertex count
python scripts/gis/geotiff-to-blender.py bathymetry.tif --output terrain.obj --subsample 4
In Blender: File > Import > Wavefront (.obj) — select terrain.obj.
Scale defaults: 1 m = 0.001 Blender units (km scale). Override with --scale-xy and --scale-z.
python scripts/gis/geotiff-to-blender.py bathymetry.tif --output points.csv
# QGIS: Layer > Add Layer > Add Delimited Text Layer > select points.csv
# Set X=x, Y=y, Z=z, CRS = source CRS of the GeoTIFF
# Access BSEE well locations with CRS support
from worldenergydata.bsee import load_wells
wells_df = load_wells() # lat/lon columns in WGS84
| Source | Resolution | Format | Notes |
|---|---|---|---|
| GEBCO 2023 | 15 arc-sec (~500 m) | GeoTIFF | Global, free download |
| GEBCO via GEE | configurable | GeoTIFF export | See google-earth-engine skill |
| NOAA NCEI | 1 arc-sec (coastal US) | GeoTIFF | ETOPO series |
digitalmodel/gis/
coordinates.py — CoordinatePoint dataclass, batch transforms
core/
crs.py — CRS definitions, get_utm_epsg()
geometry.py — GeoPoint, GeoBoundingBox, GeoPolygon
spatial_query.py — radius, bbox, polygon, nearest-N queries
coordinate_transformer.py
io/
geojson_handler.py — GeoJSON read/write
kml_handler.py — KML/KMZ read/write
shapefile_handler.py — Shapefile (optional geopandas)
geotiff_handler.py — GeoTIFF read/write/to_xyz (optional rasterio)
layers/
feature_layer.py — FeatureLayer (pandas-backed GIS collection)
well_layer.py — WellLayer (well-specific subclass)
integrations/
blender_export.py — Blender script generator for well markers
qgis_export.py — QGIS .qgs project + .qml style generator
folium_maps.py — Folium/Leaflet HTML maps
google_earth_export.py— Styled KML for Google Earth
plotly_maps.py — Plotly mapbox scatter/dashboard
| Error | Cause | Fix |
|---|---|---|
ImportError: rasterio not installed | rasterio absent | pip install rasterio |
CRS mismatch in spatial join | Layers in different CRS | gdf.to_crs("EPSG:32631") |
| OBJ mesh flipped Z in Blender | Depth values negative | Use --scale-z -0.001 to invert |
| QGIS .qgs file not opening | QGIS version mismatch | Open via Layer > Add Vector Layer instead |
Weekly Installs
80
Repository
GitHub Stars
4
First Seen
Feb 27, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
github-copilot80
codex80
gemini-cli80
amp79
cline79
kimi-cli79
FastAPI官方技能:Python Web开发最佳实践与CLI工具使用指南
1,100 周安装
| Requires rasterio |
| CSV + lat/lon | .csv | layers.feature_layer.FeatureLayer | Standard pandas read |
| WKT | embedded in .qgs / .csv | core.geometry | Used in QGIS project files |
| Large OBJ causes Blender slowdown | Full-resolution raster | Use --subsample 4 or higher |