slowe,
@slowe@mastodon.me.uk avatar

Thanks to @benjohn, @gilesdring and others who have helped me work out how to update HexJSON to include boundaries. I'll write it up soon.

slowe,
@slowe@mastodon.me.uk avatar

For anyone interested in #HexJSON, here's the definition of the new boundaries option https://open-innovations.org/projects/hexmaps/hexjson#boundaries

benjohn,
@benjohn@todon.nl avatar

@slowe @gilesdring

A property of the encoding I noticed is that (I think!) each directed edge element has two possible equal encodings (ie, there are two ways to encode the same edge in the same direction).

If the edge signing was disallowed, there would only be only one possible encoding for each directed edge.

I would usually try to minimise redundancy in an encoding as this tends to make tooling and documentation simpler.

In this case I think the redundancy can be taken away by only having the positive edge number. Any negative edge (which goes anti-clockwise) can be replaced with a positive edge on a neighbouring hex – right? 🤔

However, there are definitely other concerns in a format, such as making hand editing easy, so this modest redundancy might be fine and quite useful?

Or I might be missing something, or just completely mistaken!

It seems like a really nice enhancement to the format 👍

gilesdring,
@gilesdring@mastodon.me.uk avatar

@benjohn @slowe You’re right about the redundancy… but, for example, having a Scotland / England border encoded only from Scottish or English hexes might make sense when it comes to maintenance (spoiler alert: geographies change! 🤣).

slowe,
@slowe@mastodon.me.uk avatar

@gilesdring @benjohn Yep. And, in practice, I've found that it makes it more obvious to construct a border especially if you need to go anti-clockwise around multiple faces of a hex as you don't have to find the coordinates of all the different hexes. It has made it easier to find bits of border when going back to a list.

gilesdring,
@gilesdring@mastodon.me.uk avatar

@benjohn @slowe There’s also the fact that to continuous boundary around a single hex only allowing clockwise edges would require referencing four individual hexes, and if you decided to flip from even to odd layouts, that boundary would become discontinuous. Granted, this is an edge case, but the directionality allows slightly more expressive intent.

gilesdring,
@gilesdring@mastodon.me.uk avatar

@slowe @benjohn thank you for the opportunity to use the word chirality.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • InstantRegret
  • tacticalgear
  • rosin
  • love
  • Youngstown
  • slotface
  • ngwrru68w68
  • kavyap
  • cubers
  • thenastyranch
  • mdbf
  • provamag3
  • modclub
  • GTA5RPClips
  • normalnudes
  • khanakhh
  • everett
  • cisconetworking
  • osvaldo12
  • anitta
  • Leos
  • Durango
  • tester
  • megavids
  • JUstTest
  • All magazines