Geohash: the algorithm inside and out - Part 1

Поделиться
HTML-код
  • Опубликовано: 20 янв 2025
  • Most videos only show you how to use a geohash-not how to create one. I'm changing that. Geohashes are everywhere. Twitter's "Algorithm" keeps track of location solely with geohashes. Why are they so powerful?
    Part 1 of 2
    GM Morton's original geohash: dominoweb.drac...
    Slides: josiahparry.gi...
    Written notes: josiahparry.gi...
    0:00 - introduction

Комментарии • 36

  • @cicakmuhamed
    @cicakmuhamed 3 месяца назад +4

    Thank you for doing humanity a big favor. Somebody who is uncomfortable with people just accepting things and explaining the concept under the hood. Appreciate it!

  • @Veezkox
    @Veezkox Год назад +4

    This video is well made. I've looked into others and they just confused me. This one and part 2 contain everything you need to understand and implement on your own.
    Key points make it easy to understand and how to apply it to the real world. One thing I would add is about corner cases - 2 points very close to each other could end up in a different grid ending with a different last character in hash (I don't think there are other cases?).
    Please keep it going and grow the channel! Thank you so much!

  • @cakcakcak
    @cakcakcak Год назад +6

    i just watched this video start to finish and when i went to subscribe i couldn’t BELIEVE how few subscribers you have. this was really well-made and i have a feeling your numbers are gonna start to take off pretty soon

    • @josiahparry
      @josiahparry  Год назад +1

      Thank you, Christopher! If you have any requests for topics, please let me know here or in a github issue :) github.com/JosiahParry/youtube-tutorials/issues/1

    • @aayush9080
      @aayush9080 3 месяца назад

      less subscribers, maybe because people dont deep dive into concepts

  • @HorrorInsides-dm8fc
    @HorrorInsides-dm8fc 10 месяцев назад +1

    Keep up the good work Josiah. This is fantastic. Hope to see you hit the 100K subscriber soon.

  • @dcnnvtr
    @dcnnvtr Год назад +1

    Elegant, well done! I had no idea what was going on under the covers!

  • @woshiyizhihouzi
    @woshiyizhihouzi Месяц назад

    wow this was crazy interesting! thanks for explaining this super cool concept so clearly!

  • @nishanksoni7120
    @nishanksoni7120 3 месяца назад

    You have explained really well..hats off to you. Great work.

  • @mukulbhave9376
    @mukulbhave9376 7 месяцев назад

    super clear ,easy and concise walkthrough. Amazing

  • @raist78231
    @raist78231 Год назад

    This was fantastic! It was an excellent explanation. I'm going to build a geohash function for full understanding. Thanks!

  • @amitkrthkr
    @amitkrthkr Год назад +1

    Liked the explanation of this subtle concept. At 11:46, the longitude decimal value used for example is not clear. It is not same as 19, as used in 10:46. Further, at 13:52, the sequence in the video is of 30 bits, in contrast to 32 bits in the audio. I guess we pad extra bits to make a combination of 5 bits for mapping.

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 Год назад

    Excellent! Very nice explanation of how geohash works.

  • @monishchhadwa777
    @monishchhadwa777 Год назад +1

    Great explanation! I am surely going to be a strong hire if they ask this to me in the interview :D

  • @AutomateAaron
    @AutomateAaron Год назад +1

    This is a fantastic video!

  • @stefanstefanov00
    @stefanstefanov00 Год назад

    I'm about 6 mins into the video and I gotta say this is pretty neat.

  • @shobhitarya1637
    @shobhitarya1637 9 месяцев назад

    Very well explained.Thank you

  • @lxn7404
    @lxn7404 Месяц назад

    That was wonderful 👍

  • @asmitarai845
    @asmitarai845 Год назад +1

    This question may sound dumb, but want to know so after interleaving the total number of bits are going to be 64, we are splitting that into combination of 5 bits to generate a number which we will then look into BASE32 to get the character, 12*5 =60 , what about the remaining 4 bits if we include that is going to be 13 character long geohash. Am i missing something?

    • @josiahparry
      @josiahparry  Год назад

      Not dumb! You ignore the last 4.

    • @Survivor420
      @Survivor420 2 месяца назад

      ​@@josiahparrywhich 4 bits to ignore? The left most or the right most?

    • @josiahparry
      @josiahparry  2 месяца назад

      @@Survivor420 right most

  • @HorrorInsides-dm8fc
    @HorrorInsides-dm8fc 10 месяцев назад

    Hi Josiah - do we know why interleaving is being done?

    • @josiahparry
      @josiahparry  10 месяцев назад

      The interleaving is done to create a z-coordinate in a z-order curve (en.wikipedia.org/wiki/Z-order_curve#Coordinate_values) which helps identify a 2 dimensional position with only one value

  • @SumanGhosh-r4d
    @SumanGhosh-r4d День назад

    can we use redis geo?

  • @elbarzwalid7344
    @elbarzwalid7344 10 месяцев назад

    amazing content

  • @wyattstevens8574
    @wyattstevens8574 11 месяцев назад

    2:17 You forgot Plus codes!

    • @josiahparry
      @josiahparry  11 месяцев назад

      Never heard of them! They sound like an S2 derivative of placekeys! Thanks for sharing

    • @wyattstevens8574
      @wyattstevens8574 11 месяцев назад

      ​@@josiahparryI don't think that's what it's from, but Google Maps uses it. It could be an S2 variant, but I don't know.

  • @crookeddream
    @crookeddream Год назад

    i may sound stupid. but i dont undrestand how you truncated it. i mean output is vastly different from input. and other algorithms say that we should interleave the actual binary values

    • @josiahparry
      @josiahparry  Год назад

      You don't interleave the actual binary values. That tripped me up quite a bit at the beginning. There's a way to do the geohash algorithm using bit-shifting but that's not the way it was initially designed as i'm showing here.
      You need to create the binary values your self as described around 10:35. Then after you've encoded longitude and latitude, you interleave those results. Then you truncate the resultant interleaving.

    • @crookeddream
      @crookeddream Год назад

      @@josiahparry now i understand. tnx

    • @josiahparry
      @josiahparry  Год назад

      @@crookeddream dope! lmk if you end up writing it from scratch your self :)

    • @crookeddream
      @crookeddream Год назад

      @@josiahparry definitely

  • @ElonTusk..
    @ElonTusk.. 10 месяцев назад

    subbed, keep up dwag