uber / h3

Hexagonal hierarchical geospatial indexing system
https://h3geo.org
Apache License 2.0
4.83k stars 459 forks source link

getNearestEdge( Position ) #758

Open SkybuckFlying opened 1 year ago

SkybuckFlying commented 1 year ago

It would be interesting to give/enter a point, either in x,y,z or lat, long coordinates...

The library would then compute the cell index and maybe cell center.

And then the library would compute which edge is nearest to this point.

The edge could then be a number 0 to 5 or so... indicating which edge in a clock wise direction.

Alternatively it could be some edge index number... but preferably some number 0 to 5 for me at least, for coloring purposes...

(In general I think this library could benefit from all kinds of distance computation functions, for visualization purposes, see distance field rendering).

(But also ordering of the geometry and applieing some kind of order to the phenomenon like edges and verteces but at a local ordering scheme).

nrabinowitz commented 1 year ago

We've considered this - the output in this case would likely be a directedEdge. This isn't a high priority on the roadmap, but PRs are welcome :).