[Az-Geocaching] Re: New Numbering System?

Brian Cluff listserv@azgeocaching.com
Wed, 23 Apr 2003 22:08:02 -0700


Scott Sparks wrote:

> About an hour and a half after I posted that question to the listserv 
> (and also e-mailed the admins at GEOCACHING.COM) everything was back 
> to normal.  And no, I hadn't been drinking anything. ;-)   My guess 
> is, they (the geocaching gods) were testing their upcoming  software 
> changes and have since returned them to normal.  Some of the "new" 
> waypoint numbers had alphabetic characters well outside the range of 
> hexadecimal. I specifically remember a "Q" in one of them.  In fact, I 
> have a printout in front of me of the '"A" Mountain Cache'  that has a 
> waypoint of  GCN7!  I printed it at 1:22 PM 4/22/03. 


 From the looks of it they went with a compromise.  I personally would 
have just completely redone the numbering system....

Anyway, from the looks of it, everything after GCFFFF will be base 36.
so they have a simple formula of (bad pseudo code to folow)

if(database_number<=65535)
    waypoint="GC"+hex_encode(database_number)
else
    waypoint="GC"+base36_encode(database_number+base36_decode(G000))

They just have to make sure they add whatever the heck G000 is in base 
36 to the real number that is in the database so that they don't step on 
the toes of the hex numbers.  It's not horribly complex....

Brian Cluff
Team Snaptek