[mapguide-users] Base64 decoding process

Jim O'Leary joleary.public at gmail.com
Fri Dec 28 17:55:58 EST 2007


I'm trying to figure out the Base64 decoding process that MapGuide uses
to store the user's selections on the map.

When I select a given parcel in Sheboygan, the Properties pane tells me 
 
FeatId = 11430 

When I capture the selection XML for this feature, it gives me the 
the ID tag as

<ID>piwAAA==</ID>

I break down this Base64-encoded string as follows, using a Base64
translation table:

p = 41 = 101001
i = 34 = 100010
w = 48 = 100000

Putting those three 6 bit binary numbers in one line yields

101001 100010 100000

I am assuming that the A characters represent 0, or no valid bits.

Recombining these three 6 bit binary numbers into 8 bit numbers yields

10100110 00101000 00

Turning these binary numbers in decimal yields

10100111 = 166
00101000 = 40

Here I am lost. How does 166 and 40 equate to 11430, which is the FeatId
that this Base64-encoded string evaluates to?

Thanks
-- 
View this message in context: http://www.nabble.com/Base64-decoding-process-tp14532589s16610p14532589.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list