Add raster geometric operations (polygon clipping, rotation, seam blending)
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 35/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 972
- Forks
- 92
- Merge moyen
- 3 j 8 h
- PR mergées (30 j)
- 5
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de xarray-contrib/xarray-spatial
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 68/100
xarray-contrib/xarray-spatial#3726 ·
-
api area:surface bug severity:medium sweep-api-consistency
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
xarray-contrib/xarray-spatial#3712 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
xarray-contrib/xarray-spatial#3710 ·
-
benchmarks: cupy branch in get_xr_dataarray never raises NotImplementedError on non-GPU hostsOuvertebug
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
xarray-contrib/xarray-spatial#3707 ·
-
area:surface documentation user-guide-example
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
xarray-contrib/xarray-spatial#3464 ·
Toutes les issues de xarray-contrib/xarray-spatial
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
qgis/QGIS-Plugins-Website#459 ·
-
bug severity:medium
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 2 jours
-
bot-found bug priority: P3
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
madenvel/KalinkaPlayer#179 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
ls1intum/edutelligence#1098 ·
Les mainteneurs répondent en général sous 1 jour