Better handling of anti-meridian cases
@djhoese ci sta già lavorando.
Dal 23/10/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Sorry for not following the template, but I'm not sure this fits.
Currently the DynamicAreaDefinition.freeze method has an antimeridian_mode keyword argument that I added for handling cases where the provided lon/lats cross the anti-meridian (-180/180 in lonlat space). This kwarg can be:
1 .modify_crs (default): Add a +pm=180 to shift the prime meridian of the projection to 180 degrees. This means the extents surround 0 instead of being discontinuous over -180/180. See downsides below.
2. modify_extents: Mess with extents of lon/lat projections so the longitudes are 0-360 instead of a -180-180 range. See downsides below.
3. global_extents: Change the extents to be the entire globe. Theoretically if resampling handling this properly you get a full globe with the input data split into two pieces.
The modify_crs is problematic because many tools don't respect +pm=180 (see https://proj.org/en/9.5/usage/projections.html#prime-meridian). The modify_extents is a problem because it seems some (all?) of our resamplers can't handle longitudes outside the -180-180 range either deliberately filtering them as invalid (kdtree nearest neighbor does this) or suffering from PROJ transformation automatically wrapping longitudes to the -180-180 range.
For these reasons I propose a few important changes:
- Deprecate
modify_exentsand combine it withmodify_crs, but at the same time changemodify_crsto use+lon_wrap=180instead of+pm=180. See https://proj.org/en/9.5/usage/projections.html#longitude-wrapping which I think is what we normally want anyway. - Change kdtree resamplers to only filter lon/lats
>=1e30instead of doing the full -180/180 and -90/90 validation. This would allow PROJ to handle the wrapping. - Update EWA resampler to use pyproj's Transformer class and be more explicit about convert lon/lats to the target projection. This should hopefully gracefully use the
+lon_wrap=180which I don't think is working right now.
Questions:
- What does
get_lonlatsfor an area return that has+lon_wrap=180. Should it return 0-360 or -180/180 even though they wouldn't be contiguous? In the past I think we updated this method to assert that lon/lats are always -180/180. - Edit: Does
+pm=180get us anything (is it useful to us or our users) that+lon_wrap=180doesn't?
- Lingua principale
- Python
- Stelle
- 388
- Fork
- 103
- Merge medio
- 7g 4h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pytroll/pyresample
-
Geometry `__eq__` and `__hash__` violate Python's hash/equality contractForse di nuovo libera @pnuu l’ha presa 47 giorni fa e non c’è nessuna pull request aperta. Apertabug Priority-Medium
pytroll/pyresample#745 · 1 commento · 3 assegnatari ·
-
Improve resampler x/y coordinate metadataForse di nuovo libera @djhoese l’ha presa 66 giorni fa e non c’è nessuna pull request aperta. Apertabug
pytroll/pyresample#739 · 1 assegnatario ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
pytroll/pyresample#698 · 1 commento ·
-
`AreaDefinition.get_area_slices` doesn't work for cropped geostationary areas like SEVIRI RSSAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
pytroll/pyresample#694 · 5 commenti ·
-
gradient_search comb effectForse di nuovo libera @mraspaud l’ha presa 386 giorni fa e non c’è nessuna pull request aperta. Aperta
pytroll/pyresample#682 · 7 commenti · 1 assegnatario ·
Tutte le issue di pytroll/pyresample
Issue simili
-
style: article/section 📝 system: cloud.rc ☁️ system: security 🔐
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
uabrc/uabrc.github.io#1262 ·
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
NCAR/miles-credit#526 ·
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
conda/conda-lock#957 ·
I maintainer di solito rispondono entro 1 giorno
-
Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
aws-samples/sample-per-model-bedrock#464 ·
I maintainer di solito rispondono entro 1 giorno