Commit e6e05d6
authored
* Add from_template() study-area grid factory (#3484)
New xrspatial.templates module with from_template(name), exported at the
top level. Resolves curated region names (conus -> Albers EPSG:5070, nyc,
europe, world, ...) and ISO-3166 / GADM alpha-3 country codes (EPSG:4326)
to an empty NaN-filled DataArray that obeys the array contract. Supports
numpy, dask+numpy, cupy, and dask+cupy backends. Country bounding boxes
derived from Natural Earth 50m admin_0 (public domain).
* Add templates reference docs and README feature row (#3484)
* Add Templates user guide notebook (#3484)
* Address review: explicit dask+cupy meta, doc _MAX_CELLS, quiet slope test (#3484)
* Add preserve= to from_template: EPSG-coded projection by property (#3484)
preserve='area' returns an equal-area EPSG (curated national code, e.g.
5070/3035, or EPSG:8857 Equal Earth fallback); preserve='shape' returns a
conformal EPSG (the centroid's UTM/UPS zone, with curated overrides for
europe/world). attrs['crs'] stays an int EPSG. Reuses _edge_samples/
_transform_boundary to project the lon/lat bbox and query_utm_crs_info for
the zone; requires pyproj. distance/direction are not offered (no EPSG-coded
equidistant/azimuthal projections exist).
* Document preserve= in README and user guide notebook (#3484)
* Clamp world preserve-path latitude to +/-85 so shape (Mercator) doesn't diverge (#3484)
1 parent 52105da commit e6e05d6
9 files changed
Lines changed: 1964 additions & 1 deletion
File tree
- docs/source/reference
- examples/user_guide
- images
- xrspatial
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
273 | 281 | | |
274 | 282 | | |
275 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments