xarray-contrib / xdggs

Xarray extension for DGGS
Apache License 2.0
54 stars 9 forks source link

DGGS-specific methods #27

Open keewis opened 9 months ago

keewis commented 9 months ago

DGGS have a lot in common, but we might have a need for methods and properties that are specific to a certain DGGS. For example, healpix has multiple indexing schemes and so it might make sense to expose a method that allows converting between each of them. Another example would be H3's conversion of integer IDs to string.

This would be very easy to add to the index itself, but we need to figure out a way to also expose that on the accessor.

benbovy commented 9 months ago

Maybe we could expose system-specific methods via their own accessor? Like ds.healpix in this case.

keewis commented 9 months ago

I guess that could work, but would have a less "standardized" feel to it. I'd say let's go with that (or ds.dggs.healpix.to_scheme) for now, and should we find a clean / good way to add additional methods onto the main namespace we can always change later.