Home NAC Technology Media Coverage NAC Society Clients Partners Contact
Commercial Services

FREE Online Services

Software products:

Digital Maps:

GPS Units

Printed Maps

NAC Sorter - Sorting All Mail In The World Automatically

NAC Mail Sorter makes it not only possible but also very simple to sort all mail pieces and parcels in any sorting center in the world automatically from the world level to final households no matter whether they have demestic or international destinations on any mail sorting systems embedded with NACSorter ActiveX Control in their sorting software, thanks to the introduction of the Universal Address as a new element of all addresses in the world.

Introduction

Automatic mail sorting can dramatically save time and money, but faces many challenges as there are more than 200 countries in the world, each of which has its own addressing tradition with different definition of addresses and postal codes in different language and characters and different writing direction.

In Western countries, addresses are usually from specific address to bigger administrations (street address, city/town, state/province, postal code, country). But in Eastern Asia such as Japan, addresses are written in the opposite convention, starting with the biggest geographical entities down to the more specific ones. The final three elements of an address in Jukyo hyōji style are the city district (chōme 丁目), the city block (ban 番) and finally the house number (gō 号), no street address part. In Iraq, an address is written from the name of the District followed by Mahla (Area) + Number, Zuqaq (Alley) + Number, Building number and then the name of Province, Postal code and Country, i.e., the most specific one is sandwiched between bigger areas.

Addresses can be written from left to right as in most countries, from right to left as in Middle Esatern countries, and from top to bottom as in Taiwan.

Even in Western countries, street addresses are written very differently. Some put street name ahead of the house number with/without a comma while others put the house number in front of the street name; some have street type name (street, avenue, blvd, etc) before the street name while others have the opposite order; some include the direction modifier (east, west, north, south, etc) in the beginning while others include it in the end. Not to mention where to put the appartment number in an address.

A postal code is put at very different location in an address block in different countries: at the very beginning as in China and Russia, in front of city/town as in Norway and Sweden, behind the city/town as in New Zealand, in front of the state/province as in India and Indonesia, behind the state/province as in Brazil and Australia. It can also be separated by a blank space, a comma or a line break.

Real addresses on envelopes are even more complicated as people don't strictly follow the guidelines of addressing of their own countries. There are also many countries without well established addresses yet.

All these problems make automatic mail sorting extremely difficult, especially sorting international mail. But they can be solved by the introduction of an efficient world wide valid address code called Universal Address.

The Universal Address

The Universal Address is based on the Natural Area Code (NAC) that can be used to specify all individual houses and buildings in the world with few characters. An eight character NAC can uniquely specify an area about 35 meters X 25 meters like a building; a ten character NAC can specify almost every square meter on the planet, i.e., every door of a house or building in the world.

The writing of a Universal Address should be strict: it always starts with "NAC: " followed by two character strings in numerals and/or capital letters of basic Latin alphabet without vowels (i.e. 0123456789BCDFGHJKLMNPQRSTVWXZ) separated by a blank space, while its position in an address block is flexible so that it can fit the conventions of different countries. You can put the Universal Address at the beginning, in the middle or at the end of an address block as shown in the following examples:
CHRIS NISWANDEE
SMALLSYS INC
795 E DRAGRAM
TUCSON AZ 85705
USA
NAC: 5QJ0J NCC5B

الشركة الخيالية المتحدة                                
حي الورود، طريق المطار الدولي، بناية النخيل، الطابق الثامن 
الرياض، الرمز البريدي 
NAC: ML8C7 M69MZ 
المملكة العربية السعودية

中国黑龙江省齐汽哈尔市
东直门大街15号202室
NAC: TJMNM QLP9Q
黄子常先生敬启

〒100-8994
東京都中央区八重洲一丁目5番3号
NAC: VMDS1 NXD9H
東京中央郵便局

135-283 서울특별시
용산구 서초2동 1308-25
하나 아파트 9층 912호
NAC: TKDS1 P7R61
박민호 선생님
But, no matter what language the address is written in, the NAC should always be in alphanumerals to let mail sorting systems in all countries able to handle.

You can find the Universal Address of any location in the world on the satellite image maps of NAC Locator.

When a Universal Address is embedded in the address block of each mail piece, all mail pieces can be automatically sorted from the world level to final mail boxes even without the help of any other elements in addresses, and if you want, you even don't need to write the address differently for local and international mail.

NAC Mail Sorting Algorithm

Unlike sorting traditional addresses and/or postal codes with database matchings, NAC based mail sorting uses a very different approach: firstly converting the NAC into a pair of latitude/longitude coordinates and then using a postal zones boundaries file to determine which bin to put the mail piece into. The boundaries file defines the postal zones specific to the sorting level and the corresponding sorting bins of a sorting machine.

For example, in a mail sorting center of the City of Toronto, one sorting machine may sort all mail pieces to six bins with bin numbers of 1, 2, 3, 4, 5 and 6 corresponding to six local districts (Toronto, East York, North York, York, Etobicode and Scarborough) and one extra bin with bin number of 0 for all other destinations; a second machine may sort all the mail pieces from the extra bin of the first machine into bins with bin numbers of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 corresponding to ten provinces and three territories and an extra bin with bin number of 0 for all mail pieces with international or unrecognized destinations; a third sorting machine may sort all the mail pieces from the extra bin of the second machine into bins corresponding to all countries in the world and an extra bin for pieces with unrecognized or wrong NAC. Depending on the volumes, one bin may collect mail pieces of multiple postal zones and one postal zone may be divided into multiple zones cared by multiple bins.

NAC Sorter Pluggin

Since Universal Addresses have not yet been used by everybody in the world, each address block on a mail piece may have or not have a NAC. Thus, mail sorting systems should take a mixed approach to handle both situations. A plugin called NAC Sorter has been developed for mail sorting systems now. NAC Sorter can be embedded in the software of a mail sorting system. When an address block is obtained, the mail sorting software first passes it to the Sort method of NAC Sorter to see which bin number the mail piece should be sorted into. If it is sorted to a bin with bin number not equal to 0, it means that the destination of the mail piece represented by the NAC in the address block has been successfully deciphered and the number of the corresponding bin has been determined. If the returned bin number is 0, it means that the mail piece can not be sorted by NAC Sorter and the mail sorting software has to sort it with its traditional sorting method or manually to decide which bin to collect this mail piece.

Zones Boundaries File

The current version of the zones boundaries file for NAC Sorter is a unicode text file always starting with "NAC Sorter Zones Boundaries File Version 1.0" in the first line followed by the zones mapping table, then one blank line and then zone blocks separated by double blank lines.

The mapping table contains entries to tell NAC Sorter which zone goes to which bin, and starts with "Mapping Table" as the first line followed by its entries. Each entry takes one line starting with zone name, followed by a colon and then bin number (e.g. "Red Valley:3"). There is no blank lines between entries. Note the bin number should be an integer larger than 0 as 0 is reserved for the extra bin.

A zone may represent a postal zone covering one or more polygon areas. A zone block in a zones boundaries file starts with the zone name in the first line followed by polygon blocks.

Each polygon block starts with the number/name of the polygon in the zone followed by its vertices, one vertex on each line. Each vertex starts with latitude in signed decimal degrees (positive for north and negative for south) followed by a comma and then longitude in signed decimal degrees (positive for east and negative for west). The latitude/longitude coordinates must be in the datum of WGS84.

The last vertex of a polygon must be the same as the first vertex to represent a closed polygon if the polygon does not have any hole. If a polygon has holes such as the polygon of South Africa which has a hole (Lesotho), you should first put all the vertices of the closed outer boundary in one direction e.g. clock-wise and then immediately followed by the vertices of each closed hole in the opposite direction e.g. counter-clock-wise without blank lines. Here "closed" means each loop must start and end with the same vertex.

Note a zone should never cross the 180th meridian (antimeridian). If a postal zone does cross the meridian, you should break it into two or more zones to avoid such crossings and make sure the resulted zones locate either completely in the western hemisphere or completely in the eastern hemisphere.

Since NAC Sorter is designed for all mail sorting centers in the world, the zones boundaries file should always be saved as a unicode text file to allow storing all kinds of characters. Here is a sample file:
NAC Sorter Zones Boundaries File Version 1.0
Mapping Table
红河地区:1
Sunbelt Area:2
Blue Valley:3
Old Well Town:4

红河地区
1
71.327812,-156.079086
71.324753,-156.036194
71.314194,-156.002792
71.313118,-156.009399
71.316444,-156.019943
71.322212,-156.052078
71.327812,-156.079086

2
71.322113,-156.065735
71.325493,-156.079208
71.325493,-156.079208
71.328568,-156.109848
71.330925,-156.116974
71.333511,-156.116287
71.327812,-156.079086
71.322113,-156.065735


Sunbelt Area
1
71.285873,-155.944321
71.293686,-155.957352
71.296272,-155.956635
71.304939,-155.978821
71.285873,-155.944321

2
71.308319,-155.976395
71.297607,-155.949463
71.290024,-155.936569
71.286644,-155.938995
71.285873,-155.944321
71.308319,-155.976395


Blue Valley
1
71.237915,-155.702713
71.238213,-155.717941
71.233505,-155.72757
71.235764,-155.73671
71.234642,-155.748306
71.237915,-155.702713

2
71.237358,-155.753387
71.240837,-155.740936
71.244591,-155.699173
71.237358,-155.753387

3
71.240349,-155.659515
71.237999,-155.656082
71.235062,-155.691818
71.227303,-155.722748
71.227356,-155.72995
71.240349,-155.659515

4
71.228928,-155.73082
71.233025,-155.711517
71.237915,-155.702713
71.228928,-155.73082


Old Well Town
1
71.213829,-155.463699
71.206184,-155.443146
71.205048,-155.451126
71.212029,-155.467041
71.212029,-155.467041
71.220306,-155.50946
71.224251,-155.542419
71.227631,-155.59375
71.230171,-155.593689
71.231468,-155.582901
71.230774,-155.558136
71.227127,-155.52388
71.213829,-155.463699

NAC Sorter ActiveX Control

Currently, NAC Sorter Pluggin is provided only as an ActiveX control for Windows. Pluggins for other platforms may be available in the future if there are such needs.

NACSorter ActiveX Control installation package can be downloaded here, and a license file for free trial can be requested through an email to Support with your name and position and company name and web address. Once the file downloaded in a folder, double click it to install the software package. Please record the location where the software is installed (the default folder is c:\Program Files (x86)\NAC Geographic Products Inc\NACSorter) because you need to copy the license file from us into the installation folder to activate NACSorter ActiveX Control. Once it is successfully installed in your computer, you will see five files in the stallation folder:
  CountriesBoundariesFile.txt
  NACSorter.lic
  NACSorter.ocx
  NACSorterTest.exe
  SampleAddressBlocks.txt
CountriesBoundariesFile.txt is a sample zones boundaries file containing the boundaries of all countries in the world. NACSorter.lic is your license file required to activate NACSorter ActiveX control. NACSorter.ocx is the ActiveX control of NACSorter. NACSorterTest.exe is a program for you to test the ActiveX control or your zones boundaries file. SampleAddressBlocks.txt is a text file listing sample addresses in different languages and different countries, each of which has embedded a Universal Address.

If it is your software developing computer, you will see NACSorter listed on the Visual Studio's Insert ActiveX Control dialog box and can insert it onto a Windows form. On Visual Studio, the insertion of the control will automatically create a wrapper class of the control in your project. NAC Sorter control exposes two public methods: Init and Sort for your program to call.

Method Init usually needs to be called just once when the sorting system starts. However, it can also be called multiple times whenever you need a different boundaries file for sorting. For example, firstly you sort all mail pieces into bins for local zones plus an extra bin for others and after finishing the local sorting you want to use the same machine to sort the mail pieces from the extra bin to zones of a higher level. The Init method takes a unicode string parameter for the full path of the zones boundaries file. If the parameter is empty (NULL or length equal to zero), NAC Sorter will pop up a dialog box to let you select a file on the file system. Once the file is specified, the Init method will read the file into the memory. If there is no fatal error, the Init method will return the number of zones it has read from the file to let you know whether all zones are read. A zone should have at least one polygon and each polygon should have at least 3 vertices. If the file can't be opened, contains fatal errors or misses valid polygons, the Init method will return 0.

Method Sort sort needs to be called whenever an address block is obtained from OCR in your mail sorting program. The Sort method takes one unicode string parameter for the obtained street block. It will search character string "NAC:" followed by two character strings that can be interpreted as a Natural Area Code (i.e. no vowels, no lower case letters, no special characters except hyphens). If a NAC is found within one of the postal zones, the bin number the mail piece should be sorted to will be returned together with the zone name and the polygon number containing the location of the NAC. The returned value is a character string starting with the bin number followed by a tab, then zone name, a tab, polygon number (for example, "3 Blue Valley 4"). You can use the tab to split the elements. If there is no NAC found in the address block or the NAC is not within any of the zones polygons, the Sort method will return "0 NotFound 0".









If you have any comments, questions and suggestions, please write to info@nacgeo.com



Copyright 1995 - 2018 NAC Geographic Products Inc. All rights reserved. Privacy Policy