Creating natural area codes
The Natural Area Code (NAC) is yet another way to encode geographic position information into a short character string. The whole NAC system can include altitude information along with the surface position. We'll focus on the latitude and longitude conversions for NAC.
See http://www.nacgeo.com/nacsite/documents/nac.asp, for more information
This uses base 30 instead of base 240; we can use most of the alphabets plus some digits to represent a single base 30 digit. This implementation will show a different approach to convert floating-point numbers to an integer approximation. This will combine multiple calculation steps into longer expressions.
NAC uses a 30-character encoding that employs digits and consonants. The string ...
Get Python for Secret Agents now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.