用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill run2-antimeridian-handling命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | run2_antimeridian_handling |
| description | Techniques for handling geometries that cross the 180/-180 degree longitude line. |
When working with data spanning the Pacific, geometries often cross the anti-meridian. Standard projections centered at 0° longitude will "rip" these geometries.
You can shift the longitude of all geometries to be in the [0, 360) range.
def shift_lon(geom):
from shapely.affinity import translate
# This is complex for polygons that cross the line.
# Better to use a specific CRS.
pass
The most robust way is to use a CRS centered on the Pacific (e.g., 150°E or 180°).
# Custom Equidistant Cylindrical centered at 150E
pacific_crs = "+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=150 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs"
gdf_pacific = gdf.to_crs(pacific_crs)
When reprojecting to a Pacific-centered CRS, GeoPandas/PyProj handles the wrap-around correctly for points. For polygons, they might need to be "unwrapped" first if they were originally defined in [-180, 180].
dateline_fix (if available)Some libraries have tools to split or join geometries at the dateline.