xarray-contrib / xdggs

Xarray extension for DGGS
https://xdggs.readthedocs.io
Apache License 2.0
79 stars 14 forks source link

DGGS-specific methods #27

Open keewis opened 12 months ago

keewis commented 12 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 12 months ago

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

keewis commented 12 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.