Skip to content

Latest commit

 

History

History

resources

Folders and files

NameName
Last commit message
Last commit date

parent directory

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

-------------------------------------------------------------------------------
CREATING THE MAPCODE UTILITY
-------------------------------------------------------------------------------

To create the test files, you will first need to build the 'mapcode' utility
from the "Mapcode C++" library on Githgub.
You find the tool in the "example" directory and compile it with:

    gcc mapcode.cpp -o -mapcode

-------------------------------------------------------------------------------
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]

The parameters extraDigits is 0 for normal precision and 1 or 2 for higher and
highest precision codes.

+----
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

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

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

mapcode --boundaries     2    > boundaries_hp.txt

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

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,
hence the 'split' command.

-------------------------------------------------------------------------------
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.