frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: A5

https://github.com/felixpalmer/a5
75•pheelicks•11h ago

Comments

carderne•8h 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•8h 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•4h ago
Very cool, thanks for the insight
jll29•7h 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•7h 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•6h 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•6h 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•6h 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•5h 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•5h 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•5h 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•5h ago
What's the advantage of this over HEALPix projection? https://en.wikipedia.org/wiki/HEALPix
pheelicks•4h 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

pama•1h ago
Not sure I understand—healpix starts from the rhombic dodecahedron and then bisects the generalizations of the 12 squares each time. Where do octahedra come into play?
michelpp•4h 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•3h 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•5h ago
Please please please include a description in your title. Just a couple of words will do.
divan•3h ago
It's obviously something about paper size A5.
panzagl•2h ago
On reading the comments it's about the healing powers of dodecahedrons.
riku_iki•1h ago
github also mentions it has pentagonal shape..
ralusek•4h 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•4h ago
If you're aggregating and comparing data across different locations for example: https://a5geo.org/examples/airbnb
Bedon292•1h ago
Is it primarily useful just for data visualization? Would there be an potential performance benefits for something like searching a database for nearby data?
pheelicks•49m ago
Yes, such indices (S2 & H3) are widely used for providing a index in databases, so geospatial features that are close by in the world and stored in nearby databases rows. https://cloud.google.com/bigquery/docs/grid-systems-spatial-...

Branch Privilege Injection: Exploiting branch predictor race conditions

https://comsec.ethz.ch/research/microarch/branch-privilege-injection/
253•alberto-m•4h ago•91 comments

Starcloud

https://www.ycombinator.com/companies/starcloud
21•wiley1454•1h ago•11 comments

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

https://github.com/HelixDB/helix-db/
76•GeorgeCurtis•4h ago•35 comments

Build Real-Time Knowledge Graph for Documents with LLM

https://cocoindex.io/blogs/knowledge-graph-for-docs/
20•badmonster•1h ago•2 comments

Multiple security issues in GNU Screen

https://www.openwall.com/lists/oss-security/2025/05/12/1
309•st_goliath•10h ago•182 comments

PDF to Text, a challenging problem

https://www.marginalia.nu/log/a_119_pdf/
185•ingve•6h ago•102 comments

Failed Soviet Venus lander Kosmos 482 crashes to Earth after 53 years in orbit

https://www.space.com/space-exploration/launches-spacecraft/failed-soviet-venus-lander-kosmos-482-crashes-to-earth-after-53-years-in-orbit
53•taubek•3d ago•33 comments

Launch HN: Miyagi (YC W25) turns YouTube videos into online, interactive courses

135•bestwillcui•8h ago•79 comments

It Awaits Your Experiments

https://www.rifters.com/crawl/?p=11511
95•pavel_lishin•6h ago•28 comments

Google is building its own DeX: First look at Android's Desktop Mode

https://www.androidauthority.com/android-desktop-mode-leak-3550321/
116•logic_node•6h ago•127 comments

OpenTelemetry protocol with Apache Arrow

https://opentelemetry.io/blog/2025/otel-arrow-phase-2/
31•tanelpoder•3h ago•8 comments

Ask HN: How are you acquiring your first hundred users?

421•amanchanda•12h ago•265 comments

Turritopsis dohrnii: Immortal jellyfish

https://www.nhm.ac.uk/discover/immortal-jellyfish-secret-to-cheating-death.html
17•vinnyglennon•4d ago•1 comments

Membrane: Media Framework for Elixir

https://membrane.stream/
92•lawik•3d ago•30 comments

I learned Snobol and then wrote a toy Forth

https://ratfactor.com/snobol/
107•ingve•2d ago•30 comments

Garbage Collection of Object Storage at Scale

https://www.warpstream.com/blog/taking-out-the-trash-garbage-collection-of-object-storage-at-massive-scale
4•ko_pivot•3d ago•0 comments

Why are banks still getting authentication so wrong?

https://jamal.haba.sh/its-2025-why-are-banks-still-getting-authentication-so-wrong/
152•kamikazee•2h ago•191 comments

The Battle to Bottle Palm Wine

https://www.atlasobscura.com/articles/palm-wine-in-united-states
8•prmph•3d ago•9 comments

Don't unwrap options: There are better ways (2024)

https://corrode.dev/blog/rust-option-handling-best-practices/
67•mu0n•3h ago•42 comments

Insurers launch cover for losses caused by AI chatbot errors

https://www.ft.com/content/1d35759f-f2a9-46c4-904b-4a78ccc027df
88•jmacd•2d ago•31 comments

Mill as a direct style build tool

https://mill-build.org/blog/12-direct-style-build-tool.html
24•lihaoyi•3d ago•3 comments

PyPI Organizations (2023)

https://blog.pypi.org/posts/2023-04-23-introducing-pypi-organizations/
35•calpaterson•3h ago•11 comments

TheForger's Win32 API Tutorial

https://winprog.org/tutorial/
39•xeonmc•7h ago•3 comments

A Taxonomy of Bugs

https://ruby0x1.github.io/machinery_blog_archive/post/a-taxonomy-of-bugs/index.html
29•lissine•6h ago•11 comments

One hundred and one rules of effective living

https://mitchhorowitz.substack.com/p/101-rules-of-effective-living
70•mathgenius•9h ago•62 comments

The world could run on older hardware if software optimization was a priority

https://twitter.com/ID_AA_Carmack/status/1922100771392520710
510•turrini•10h ago•472 comments

Odin: A programming language made for me

https://zylinski.se/posts/a-programming-language-for-me/
157•gingerBill•12h ago•160 comments

The great displacement is already well underway?

https://shawnfromportland.substack.com/p/the-great-displacement-is-already
237•JSLegendDev•1d ago•181 comments

In a high-stress work environment, prioritize relationships

https://wqtz.bearblog.dev/high-stress-job-relationships/
254•wqtz•8h ago•166 comments

Why are coffee stains darker at the edges?

https://www.why.is/svar.php?id=5513
124•michalpleban•2d ago•44 comments