Mathias Hauser

Results 175 comments of Mathias Hauser

```python from operator import attrgetter import regionmask import regionmask.tests.utils import shapely REGIONS = regionmask.tests.utils.REGIONS REGIONS_REQUIRING_CARTOPY = regionmask.tests.utils.REGIONS_REQUIRING_CARTOPY REGIONS.update(REGIONS_REQUIRING_CARTOPY) def find_overlap(polygons): total_area = sum(p.area for p in polygons) flattened_area = shapely.ops.unary_union(polygons).area...

Now we have a region that overlaps - the [PRUDENCE regions](https://regionmask.readthedocs.io/en/latest/defined_scientific.html#prudence-regions). They overlap by 0.54 %. I had expected more but this is a good test. | region | overlap...

I lean towards using a keyword argument. Not very satisfactory but it's just too slow. Also using pygeos does not help - the limiting factor is the union...

The other possibility is to always create overlapping masks (requires #228) and warn if a gridpoint belongs to more than one region.

The NINO indices should be easy to add - these are just square boxes, right? As they overlap (at least NINO3.4) we'll have to do them individually. I am fine...

This is still missing docs and tests but maybe you can take a look, @jbusecke? Open question (but not super important): do we assign the flags for all regions or...

No worries - another look is certainly very welcome. That being said I went over the code again and from my side this is ready to be merged.

The disadvantage is that it would give more weight to `"lat"` and `"lon"` and I still prefer ```python region.mask(ds) ``` over ```python region.mask(ds.lon, ds.lat) ``` `dims` (or `coords`?) would read...

Playing around in another project I came to like `x_dim` & `y_dim`. But that's probably not worth a deprecation.

Potential other API is to use `regionmask.set_options`, e.g.: ```python with regionmask.set_options(y_dim="latitude"): r.mask() # OR with regionmask.set_options(y_coords="latitude"): r.mask() # OR with regionmask.set_options(lat_name="latitude"): r.mask() ``` The idea behind this is that it's...