Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
-------------------------------------------------------------------------------
Copyright (C) 2014 Stichting Mapcode Foundation
For terms of use refer to http://www.mapcode.com/downloads.html
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
CREATING MAPCODE TEST SETS
-------------------------------------------------------------------------------

These test files have been created with the commands below.

Note: The syntax of the 'mapcode' command is:
      mapcode --random nrOfPoints [extraDigits] [seed]
      mapcode --grid   nrOfPoints [extraDigits]
      mapcode --boundaries        [extraDigits]

+----
mapcode --random 1000    0 12 > random_1k.txt
mapcode --random 10000   0 12 > random_10k.txt
mapcode --random 100000  0 12 > random_100k.txt

mapcode --grid   1000    0    > grid_1k.txt
mapcode --grid   10000   0    > grid_10k.txt
mapcode --grid   100000  0    > grid_100k.txt

mapcode --boundaries        > boundaries.txt
+----

And for the high-precision codes:

+----
mapcode --random 1000    3 12 > random_hp_1k.txt
mapcode --random 10000   3 12 > random_hp_10k.txt
mapcode --random 100000  3 12 > random_hp_100k.txt

mapcode --grid   1000    3    > grid_hp_1k.txt
mapcode --grid   10000   3    > grid_hp_10k.txt
mapcode --grid   100000  3    > grid_hp_100k.txt

mapcode --boundaries     3    > boundaries_hp.txt
+----

IMPORTANT: Please note that an explicit seed (12) is used for the generation of
random data sets, so they can be compared across different version of the software.

After generating the files, they must be split into smaller pieces (in this case
5Mb chunks) to allow uploading to Github or other source code control systems,
by executing:

+----
for f in *.txt; do split -l 200000 -a 1 $f $f.; rm $f; done
+----

-------------------------------------------------------------------------------
COMPILING THE MAPCODE UTILITY
-------------------------------------------------------------------------------

The application "mapcode" is found in project "mapcode-cpp", which is the
original reference CPP implementation for mapcode.

The reference files are the following format:

+----
<number-of-mapcode-aliases> <lat-deg> <lon-deg> <x> <y> <z>
<territory-code> <mapcode>      (repeated for every alias)

                                (repeated for every record)
+----

Example:

+----
1 -14.103223 -133.860523 -0.672020 -0.699296 -0.243670
AAA D3ZFY.3HP5

2 40.203512 26.190811 0.685341 0.337093 0.645505
TUR 0W6P.PVC
AAA SKR23.PH6G
+----

You can use the tool Processing (http://processing.org) with the application
in "show3d" to visualize the generated data.