Open tinaok opened 8 months ago
this is what we've been discussing in #10: construct the boundaries of the cells and use xvec
to perform the point-in-polygon search.
(so in other words, I think this is a duplicate of #10)
From the title I initially thought the suggestion was to add a function to extract the areas of the cells (which we definitely should, e.g., ds.dggs.cell_areas()
), but yeah it looks more related to #10.
I have specific use cases: I possess an observation at a certain latitude and longitude, and I want to compare it with a model output already structured in a healpix grid using Xarray-healpix. I'd like to determine which cell_id corresponds to my observation.
Now, with XDGGS, each cell_id can contain lat/lon values, probably indicating the center of the cell. This determination should be based on whether the observation falls within the cell 'area', rather than the 'nearest center coordinate' (lat/lon).
Is it possible to obtain such information from XDGGS? Should we consider representing this area as a type of polygon, or could XDGGS have a function where each cell_id corresponds to an 'area' value specific to that cell_id index?