Mathias Hauser
Mathias Hauser
Thanks for the feedback @jbusecke !
Also https://github.com/regionmask/regionmask/blob/1dc7895a00a15d26ab37e65f17acc7037608d162/regionmask/core/utils.py#L54
Thanks for the question - this can be achieved using a list: ```python regionmask.defined_regions.natural_earth_v5_0_0.countries_110[["Australia"]] ``` This is similar to the behavior in pandas but could probably be better documented...
> Also I am not 100% clear on what `abbrevs` vs `names` means in this context? Each region has 3 "indices" - a number, an abbreviation, and a name, e.g.:...
True `Asi` is not the best abbreviation. The issue is that the full names can have spaces, which does not work for `flag_meanings` (need to `replace(" ", "_")`) - i.e....
Yes, currently there is a custom function to do this & it would be nice to use `from_geopandas` - but it's actually not super complicated.
Note on wrapping the coords: The problem with using proj is that it requires the lon & lat coords for every grid point. You cannot just pass through the longitudes....
I tried to implement this feature, however, it is likely blocked by rasterio/rasterio#2925. When the border points don't get the correct numbers we cannot correctly assign grid points to regions...
```python import geopandas as gp import numpy as np import pooch import shapely import shapely.vectorized url = "https://naturalearth.s3.amazonaws.com/5.1.0/50m_cultural/ne_50m_admin_0_countries.zip" url = "https://naturalearth.s3.amazonaws.com/5.0.0/50m_cultural/ne_50m_admin_0_countries.zip" file = pooch.retrieve(url, None) df = gp.read_file("zip://" + file)...
I finally came around to implementing this. The logic is a slightly complicated, but I think it is mostly internal and should not bother the users too much.