frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: A5

https://github.com/felixpalmer/a5
61•pheelicks•7h ago

Comments

carderne•4h ago
Can you give some examples of when this might be better to use than H3?

The ones that seem obvious:

- You need very high resolution. H3 is also 64 bit I think, but it seems like A5 highest resolution is about 4 orders of magnitude higher.

- Equal cell size: are the cells exactly equal in size (in m2)? H3 they vary by up to ~2x.

What are the downsides? The shapes are irregular, distances between centroids are not uniform...

pheelicks•4h ago
Yes, those are the obvious ones. This example: https://a5geo.org/examples/airbnb shows why the equal area is valuable in practice, while https://a5geo.org/examples/area shows the area variation vs h3.

The downsides are the characteristics that make h3 or s2 useful. For h3, the single neighbor type means it is well suited to flow analysis and S2 having exact cell subdivision means it is great for simplifying geometry.

However, there a number of use cases where choosing a spatial index is a more stylistic choice, like for visualization.

The aim of A5 is not to replace S2/H3 but rather to offer an alternative that has different strengths and weaknesses compared to existing solutions

spencerflem•1h ago
Very cool, thanks for the insight
jll29•4h ago
A5 uses pentagons, Uber's H3 uses hexagons:

H3: Uber’s Hexagonal Hierarchical Spatial Index https://www.uber.com/en-DE/blog/h3/

pheelicks•4h ago
Also check S2: http://s2geometry.io/, created at Google before H3, which uses squares and underpins the fast indexing in BigQuery amongst many other things
Tabular-Iceberg•3h ago
I once made a DGG without knowing that it was called a DGG so I could look up how to actually do it in the literature.

I ended up making it an icosahedron and recursively subdividing each face into four new ones by inscribing a new triangle. The project went nowhere for different reasons, so I never figured out if it would have worked, and given this isn’t one of the examples I suspect it wouldn’t have.

yencabulator•3h ago
So if I've understood correctly:

Google's S2 is all about performance and prefix-matching.

Uber's H3 makes the math a bit more complex to prioritize less variation in centerpoint-to-centerpoint distances (because they care most about driving times).

This makes the math even more complex to prioritize less variation in area covered by far away tiles (most applicable to e.g. analyzing density of something).

pheelicks•2h ago
As a user, you generally don’t care about the math (and S2 is hardly simple either, as it warps the squares prior to projection). You just call the API and use the indices for spatial joins or computations.

The primary benefit is indeed the ability to treat cells as if they are equal areas. This is something people do currently with H3, but it introduces a bias. Contrary to popular belief, this is not only an issue near the poles or in the ocean.

The other difference is aesthetics, people generally find H3 more pleasing to look at than S2, which is why it gets used in visualization more. You can make the same argument for A5, although of course it is a matter of taste!

Finally, you are correct that H3 was originally developed at Uber for their specific use case, however it has since been used in many other contexts and I think it doesn’t hurt to have some alternatives as conceptually S2/H3/A5 are similar

pheelicks•2h ago
For a visual explanation of how the system works, as well as interactive examples, check out the project website at https://a5geo.org/examples/
zX41ZdbW•2h ago
H3 and S2 are supported out of the box in ClickHouse and have reference libraries in C and C++. But it looks like A5 only has a reference implementation in TypeScript. Porting would not be a problem, though...
pheelicks•1h ago
Bear in mind that this is a "Show HN", the library was released just a few weeks ago! Whereas the other libraries have been around for a decade+

The plan is certainly to release versions in other languages, if you would like to be involved, please get in touch. I agree the porting shouldn't be too difficult, as by design the library has just one simple dependency and the code should translate nicely to other C-style languages

xioxox•2h ago
What's the advantage of this over HEALPix projection? https://en.wikipedia.org/wiki/HEALPix
pheelicks•1h ago
The base platonic solid that Healpix is based on is the octahedron (https://en.wikipedia.org/wiki/Octahedron), which A5 uses the dodecahedron(https://en.wikipedia.org/wiki/Regular_dodecahedron).

The octahedron has a much higher angular defect (https://en.wikipedia.org/wiki/Angular_defect) than the dodecahedron, and thus when it is projected onto the sphere the cells are warped a lot. So while their areas may be the same, the shapes vary.

This article explains the geometric construction, and how it leads to the cells being a similar size and shape: https://a5geo.org/docs/technical/platonic-solids

Also from a data visualization point of view, the rectangular cells of Healpix (like S2) are arguably less pleasing to look at than hexagons/pentagons: https://h3geo.org/docs/comparisons/s2#visualization

michelpp•54m ago
I'm not sure about A5, but I do know that HEALPix cell boundaries are not geodesics, whereas S2 cells are always bounded by four geodesics.
pheelicks•16m ago
A5 cell boundaries are geodesics. One more difference that I thought of is that HEALPix is generally not aligned with the continents (makes sense as it is mostly used for astrophysics), whereas the hilbert curve used to index A5 is aligned with the continental land masses: https://a5geo.org/examples/globe

As a result, when A5 is used as a spatial index, it will generally not have jumps in the cell index values when querying nearby locations on land

knowitnone•1h ago
Please please please include a description in your title. Just a couple of words will do.
ralusek•1h ago
> The benefit of choosing a dodecahedron is that it is the platonic solid with the lowest vertex curvature, and by this measure it is the most spherical of all the platonic solids. This is key for minimizing cell distortion as the process of projecting a platonic solid onto a sphere involves warping the cell geometry to force the vertex curvature to approach zero. Thus, the lower the original vertex curvature, the less distortion will be introduced by the projection.

This feels like an uncommon need to optimize for. Can't think of a reason I would reach for this over S2 or H3

pheelicks•1h ago
If you're aggregating and comparing data across different locations for example: https://a5geo.org/examples/airbnb

Show HN: Helixdb – Open-source vector-graph database for AI applications (Rust)

https://github.com/HelixDB/helix-db/
9•GeorgeCurtis•34m ago•0 comments

Show HN: Basecoat – shadcn/UI components, no React required

50•hunvreus•6h ago•25 comments

Show HN: A5

https://github.com/felixpalmer/a5
61•pheelicks•7h ago•18 comments

Show HN: AG-UI Protocol – Bring Agents into Frontend Applications

https://github.com/ag-ui-protocol/ag-ui
10•swiftlyTyped•1h ago•3 comments

Show HN: Downloads Director – Auto-organize your Downloads folder by file type

4•freakynit•2h ago•0 comments

Show HN: I made a site for finding people to build cool tech projects with

https://guildorigin.com/
10•quelup•3h ago•3 comments

Show HN: Lumoar – Free SOC 2 tool for SaaS startups

https://www.lumoar.com
84•asdxrfx•22h ago•31 comments

Show HN: Airweave – Let agents search any app

https://github.com/airweave-ai/airweave
150•lennertjansen•1d ago•37 comments

Show HN: Make your own voice AI in two clicks

https://unmute.sh/
10•unmute-sh•6h ago•1 comments

Show HN: CLI that spots fake GitHub stars, risky dependencies and licence traps

https://github.com/m-ahmed-elbeskeri/Starguard
113•artski•1d ago•67 comments

Show HN: Rama 0.2 – Modular Rust framework for proxies, servers, and clients

https://github.com/plabayo/rama/discussions/544
2•gdcbe•5h ago•0 comments

Show HN: Codigo – The Programming Language Repository

https://codigolangs.com
76•adamjhf•3d ago•24 comments

Show HN: An API for LLM capabilities and pricing, scraped from docs

https://paolino.me/standard-api-llm-capabilities-pricing-live/
2•earcar•9h ago•0 comments

Show HN: The missing inbox for GitHub pull requests

https://github.com/pvcnt/mergeable
25•pvcnt•1d ago•5 comments

Show HN: GlassFlow – OSS streaming dedup and joins from Kafka to ClickHouse

https://github.com/glassflow/clickhouse-etl
76•super_ar•2d ago•31 comments

Show HN: Blog comments, nice looking, open source – Talkyard

https://blog-comments.talkyard.io/demo/
21•KajMagnus•1d ago•3 comments

Show HN: Translate between dialects and share SQL queries on the browser

https://sqlscope.netlify.app
16•WhyIsItAlwaysHN•4d ago•2 comments

Show HN: MMORPG prototype inspired by World of Warcraft

https://github.com/nickyvanurk/everwilds
24•nickyvanurk•1d ago•9 comments

Show HN: LoopMix128 – Fast C PRNG (.46ns), 2^128 Period, BigCrush/PractRand Pass

https://github.com/danielcota/LoopMix128
75•the_othernet•2d ago•34 comments

Show HN: Triplex, a visual workspace for React / Three Fiber

https://github.com/trytriplex/triplex
3•madou•14h ago•0 comments

Show HN: Open-source MMORPG prototype inspired by World of Warcraft

http://everwilds.io/
4•nickyvanurk•15h ago•2 comments

Show HN: Code Claude Code

https://github.com/RVCA212/codesys
117•sean_•3d ago•25 comments

Show HN: LLM-God – An LLM Multiprompting App

https://github.com/czhou578/llm-god/tree/1.0.3
4•czhou578•17h ago•0 comments

Show HN: Hydra (YC W22) – Serverless Analytics on Postgres

https://www.hydra.so/
59•coatue•4d ago•33 comments

Show HN: Oliphaunt – A native Mastodon client for macOS

https://testflight.apple.com/join/Epq1P3Cw
103•anosidium•4d ago•38 comments

Show HN: AGI Hits a Structural Wall – A Billion-Dollar Problem

8•mmschlereth•18h ago•0 comments

Show HN: Xenolab – Rasp Pi monitor for my pet carnivourus plants

https://github.com/blackrabbit17/xenolab
131•malux85•2d ago•53 comments

Show HN: Open-source AI code review agent that's aware of your entire codebase

https://docs.sourcebot.dev/docs/agents/review-agent
4•msukkarieh•19h ago•1 comments

Show HN: Vom Decision Platform (Cursor for Decision Analyst)

https://www.vomdecision.com
15•davidreisbr•4d ago•13 comments

Show HN: Hyvector – A fast and modern SVG editor

https://www.hyvector.com
325•jansan•4d ago•92 comments