h3 icon indicating copy to clipboard operation
h3 copied to clipboard

I built a H3 visualisation tool

Open matthiasfeist opened this issue 2 years ago • 5 comments

Hi everyone!

I use H3 a lot and built a visualisation tool: https://github.com/matthiasfeist/what-the-h3index (live version here: https://what-the-h3index.vercel.app/). Mostly for my own needs.

Not sure if you find it useful but if you do, feel free to include it in the docs :)

/Matthias

matthiasfeist avatar Mar 16 '22 10:03 matthiasfeist

Very cool! It might make sense to add a doc section like Debugging Resources that could also include @nrabinowitz/h3-index-inspector and @nrabinowitz/h3-index-bit-layout.

One note - you might want to borrow https://observablehq.com/@nrabinowitz/mapbox-utils#fixTransmeridian for dealing with cells that cross the anti-meridian, otherwise these render poorly.

nrabinowitz avatar Mar 16 '22 16:03 nrabinowitz

I'd also consider padding the viewpoint - either expanding the viewport before polyfill, or buffering the results by one cell. But this is a really nice tool for exploring the grid!

nrabinowitz avatar Mar 16 '22 16:03 nrabinowitz

@nrabinowitz I've added the padding and your functions to fix the anti-meridian but that issue still doesn't render properly and I'm a bit at a loss there 😅

matthiasfeist avatar Mar 26 '22 09:03 matthiasfeist

The anti-meridian cells don't render properly?

nrabinowitz avatar Mar 28 '22 16:03 nrabinowitz

Oh, I see - this fixed the transmeridian cells, but now you're rendering areas outside of the "main" map bounds instead of inside, is that the issue? I think in this case you might be best off splitting the viewport in two and rendering both halves - I suspect what's happening is that it's picking the smaller of the two possible bounding boxes to polyfill.

nrabinowitz avatar Mar 28 '22 16:03 nrabinowitz