Either way, you can optimize the performance of this approach by first doing a cheaper comparison (like coordinate count) and only computing the normalized geometry when you need to.
Either way, you can optimize the performance of this approach by first doing a cheaper comparison (like coordinate count) and only computing the normalized geometry when you need to.
Actually the flow of this project was implementing everything on my own, and at a later stage realizing that JTS already does a lot, and then refactoring and dropping most of my features :D
I was just fiddling around in Kotlin, JTS seems like a banger library though.
One aspect that I didn't deal with (yet) is also, that a Polygon can have redundant points (think A(1|1) B(2|2) C(3|3) D(1|2)), which you should simplify.
Ideally you would also split the map into hexagons, and compute which Geometry lays within which hexagon(s), and then only compare the geometry that shares a hexagon(s), but this information should be persisted and not computed each runtime, making it a bit out-of-scope for pure GeoJSON hashing.