Add raster geometric operations (polygon clipping, rotation, seam blending)
还没有人认领这个 Issue。
评估
调研方向
Start by reading the existing crop() and rasterize() functions for clipping and mask behavior, then inspect merge() for current overlap handling. Define tests for polygon masking, affine transformations, and feathered blending; the work is complete when each requested operation has coverage for its stated inputs and expected raster output.
由索引模型根据 Issue 内容生成。
描述
Some basic raster manipulation operations are missing from xarray-spatial.
Scope
Polygon clipping
Clip a raster to an arbitrary polygon geometry, not just a bounding box like crop() does. Pixels outside the polygon get masked to nodata. This should accept shapely geometries or coordinate arrays for the clip mask.
This is probably the highest priority item here. It comes up constantly in analysis workflows where you need to extract data for an irregular study area, watershed boundary, administrative unit, etc.
Raster rotation and affine transformation
Arbitrary rotation and affine transforms beyond what reprojection handles. Useful for aligning imagery, rotating to a local coordinate frame, or correcting sensor geometry.
Mosaic with feathered blending
Distance-weighted blending at seam lines when mosaicking overlapping rasters. The existing merge() handles overlap by picking one value, but doesn't blend. Feathered blending produces much better results where rasters overlap, especially when there are brightness or exposure differences between tiles.
Notes
Polygon clipping involves rasterizing the polygon boundary and masking. The existing rasterize() function could potentially be reused for the polygon-to-mask step.
- 主要语言
- Python
- 星标
- 972
- 派生
- 92
- 平均合并
- 3 天 8 小时
- 30 天内合并 PR
- 5
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
xarray-contrib/xarray-spatial 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 68/100
xarray-contrib/xarray-spatial#3726 ·
-
api area:surface bug severity:medium sweep-api-consistency
难度 2/5 1-3 小时 新手友好度 82/100
xarray-contrib/xarray-spatial#3712 ·
-
难度 1/5 1 小时以内 新手友好度 88/100
xarray-contrib/xarray-spatial#3710 ·
-
bug
难度 1/5 1-3 小时 新手友好度 88/100
xarray-contrib/xarray-spatial#3707 ·
-
area:surface documentation user-guide-example
难度 2/5 1-3 小时 新手友好度 72/100
xarray-contrib/xarray-spatial#3464 ·
查看 xarray-contrib/xarray-spatial 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
难度 2/5 1-2 天 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 7 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
lmstudio-ai/mlx-engine#376 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
pyiron/bagofholding#166 ·