uber / h3-py

Python bindings for H3, a hierarchical hexagonal geospatial indexing system
https://uber.github.io/h3-py
Apache License 2.0
786 stars 128 forks source link

H3-py is capable only for raster files? #381

Open ventel-the-great opened 3 weeks ago

ventel-the-great commented 3 weeks ago

Can be h3-py be adopted to plot regular/irregular/curvelinear grids popular in netcdf format?

dfellis commented 3 weeks ago

I don't understand your question. H3 has many inputs for geospatial coordinates, including polygons defined in lat, lng pairs, which is by definition a vector. But the H3 grid is a discrete grid system to represent that data, and it's purpose is binning data for simpler and more uniform area analyses.

So you can take any other grid system's data and convert it to H3's grid system, but there will be conversion error as the grids won't perfectly line up, and how you do that is up to you (just centerpoint to centerpoint, or checking for all cells that intersect the input grid cell and then either distributing the value evenly amongst them or calculating the percentage of overlap and adding that percentage to each H3 cell; these are the most common solutions).