Skip to content

Commit 4d69320

Browse files
committed
Fixed data
1 parent 9d9f526 commit 4d69320

File tree

10 files changed

+503640
-502810
lines changed

10 files changed

+503640
-502810
lines changed
File renamed without changes.

src/main/resources/com/mapcode/mminfo.dat

100644100755
0 Bytes
Binary file not shown.

src/test/resources/README

Lines changed: 0 additions & 82 deletions
This file was deleted.

src/test/resources/README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Creating Unit Test Reference Files
2+
3+
## Creating the Mapcode Utility
4+
5+
To create the test files, you will first need to build the 'mapcode' utility
6+
from the "Mapcode C++" library on Github: https://github.com/mapcode-foundation/mapcode-cpp
7+
8+
You find the tool in the `utility` directory and compile it with:
9+
10+
cd utility
11+
gcc mapcode.cpp -o -mapcode
12+
13+
## Creating Mapcode Test Sets
14+
15+
These test files have been created with the commands below.
16+
17+
Note: The syntax of the 'mapcode' command is:
18+
19+
mapcode --random nrOfPoints [extraDigits] [seed]
20+
mapcode --grid nrOfPoints [extraDigits]
21+
mapcode --boundaries [extraDigits]
22+
23+
The parameters extraDigits is 8 means the highest precision codes are generated.
24+
The unit tests will use cut-off version of these codes to check lower precisions
25+
as well.
26+
27+
mapcode --random 1000 8 1234 > random_e8_1k.txt
28+
mapcode --random 10000 8 1234 > random_e8_10k.txt
29+
mapcode --random 100000 8 1234 > random_e8_100k.txt
30+
mapcode --grid 1000 8 > grid_e8_1k.txt
31+
mapcode --grid 10000 8 > grid_e8_10k.txt
32+
mapcode --grid 100000 8 > grid_e8_100k.txt
33+
mapcode --boundaries 8 > boundaries_e8.txt
34+
35+
for f in *.txt; do split -l 200000 -a 1 $f $f.; rm $f; done
36+
37+
**IMPORTANT:** Please note that an explicit seed `1234` is used for the generation of
38+
random data sets, so they can be compared across different version of the software.
39+
40+
After generating the files, they must be split into smaller pieces (in this case
41+
5Mb chunks) to allow uploading to Github or other source code control systems,
42+
hence the `split` command.
43+
44+
## Reference File Format
45+
46+
The reference files are the following format:
47+
48+
<number-of-mapcode-aliases> <lat-deg> <lon-deg> <x> <y> <z>
49+
<territory-code> <mapcode> (repeated for every alias)
50+
(empty line)
51+
... (repeated for every record)
52+
53+
Example:
54+
55+
1 0.043244999999998867679 0.057660000000000266596
56+
HHHH1.CXRC-MMLH2S9M
57+
58+
6 41.851944000000003143 12.433113999999999777
59+
ITA 0Z.0Z-00000000
60+
ITA G5.20M-X0230000
61+
ITA 2MC.29K-JVDRH4CV
62+
ITA 65C.X5QK-CPNRRNPN
63+
ITA J0QN.7X4-B1R2S4P3
64+
TJKM1.D2Z6-L1N8FHY0
65+
66+
You can use the tool Processing (http://processing.org) with the application
67+
in `show3d` to visualize the generated data.

src/test/resources/boundaries_e8.txt.h

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -121154,20 +121154,20 @@ MNG NW6D.X4G0-JFL32041
121154121154
CN-NM MLT.210W-D49RXMHX
121155121155
TSW4C.V7HF-DPJG0Y7M
121156121156

121157-
3 5.119999999999997442 7.994999999999997442
121158-
NGA TS.RZJ7-4BR0L6X0
121159-
NGA FXQ8.3GH-05300000
121160-
JJ5Z9.096Y-VGW5NBCG
121161-
121162-
8 32.560000000000002274 92.75
121163-
CN-XZ PBQD.ZCF-C8781XD1
121164-
CN-XZ KF73.TQ58-R0231325
121165-
CN-GS 5FPN.F38-0FV7NHDD
121166-
CN-GS KF73.TQ58-R0231325
121167-
CN-QH 5FPN.F38-0FV7NHDD
121168-
CN-QH KF73.TQ58-R0231325
121169-
CHN KF73.TQ58-R0231325
121170-
RRGYY.7MJ2-PW5RKH1W
121157+
3 5.119999999999997442 8.2249999999999943157
121158+
NGA XD.JZD7-2CS3M9Y3
121159+
NGA GX98.5MZ-14000000
121160+
JJ5ZG.S94Y-YHT4P8DK
121161+
121162+
8 32.560000000000002274 92.290000000000006253
121163+
CN-XZ NNFD.ZNG-B6872XG4
121164+
CN-XZ KD8R.HQK8-Q3443333
121165+
CN-GS 4TC8.K8R-1DW8SFCJ
121166+
CN-GS KD8R.HQK8-Q3443333
121167+
CN-QH 4TC8.K8R-1DW8SFCJ
121168+
CN-QH KD8R.HQK8-Q3443333
121169+
CHN KD8R.HQK8-Q3443333
121170+
RRG6S.BM32-PW5RKH1W
121171121171

121172121172
8 32.560000000000002274 108.73999999999999488
121173121173
CN-HB 53KR.3K-T9P00322
@@ -121179,27 +121179,27 @@ CN-SN M7Q8.3LWY-XX7W0D0D
121179121179
CHN M7Q8.3LWY-XX7W0D0D
121180121180
RSW1P.XM12-NT9MHH0T
121181121181

121182-
4 42.799999999999997158 92.75
121183-
CN-XJ GDNF.7MJ-60LN0000
121184-
CN-XJ 3MH3.33Z7-TD0S5LHD
121185-
CHN 3MH3.33Z7-TD0S5LHD
121186-
TRHGN.S7CF-CGT5Q7FF
121182+
4 42.799999999999997158 92.290000000000006253
121183+
CN-XJ G5WH.8X9-74JQ4312
121184+
CN-XJ 3KKZ.63L7-TJ2T6QHD
121185+
CHN 3KKZ.63L7-TJ2T6QHD
121186+
TRFSW.Z7BF-DGX3S6DJ
121187121187

121188121188
4 42.799999999999997158 108.73999999999999488
121189121189
MNG DWTZ.WSL-XHC3X8B8
121190121190
MNG NW6D.X4G0-J0413320
121191121191
CN-NM MLT.210W-7XX0L5S1
121192121192
TSW4C.V7HF-DGX3S6DJ
121193121193

121194-
8 32.560000999999999749 92.750000999999997475
121195-
CN-XZ PBQD.ZCF-C8M6TWMW
121196-
CN-XZ KF73.TQ58-R1NBDGT1
121197-
CN-GS 5FPN.F38-0M7JJKRB
121198-
CN-GS KF73.TQ58-R1NBDGT1
121199-
CN-QH 5FPN.F38-0M7JJKRB
121200-
CN-QH KF73.TQ58-R1NBDGT1
121201-
CHN KF73.TQ58-R1NBDGT1
121202-
RRGYY.7MJ2-V3354213
121194+
8 32.560000999999999749 92.290001000000003728
121195+
CN-XZ NNFD.ZNG-B6MCVXKT
121196+
CN-XZ KD8R.HQK8-Q4QCGGT5
121197+
CN-GS 4TC8.K8R-1L9DHHR9
121198+
CN-GS KD8R.HQK8-Q4QCGGT5
121199+
CN-QH 4TC8.K8R-1L9DHHR9
121200+
CN-QH KD8R.HQK8-Q4QCGGT5
121201+
CHN KD8R.HQK8-Q4QCGGT5
121202+
RRG6S.BM32-V3354213
121203121203

121204121204
10 32.560000999999999749 108.73999899999999741
121205121205
CN-HB 53KR.3K-TG431514
@@ -121213,13 +121213,13 @@ CN-GS M7Q8.3LWX-33421123
121213121213
CHN M7Q8.3LWX-33421123
121214121214
RSW1P.XM12-T1103401
121215121215

121216-
6 42.799998999999999683 92.750000999999997475
121217-
CN-GS 599L.12F-BTDQPK3B
121218-
CN-GS 3MH3.33Z7-T6DJX2N6
121219-
CN-XJ GDNF.7MJ-609C0233
121220-
CN-XJ 3MH3.33Z7-T6DJX2N6
121221-
CHN 3MH3.33Z7-T6DJX2N6
121222-
TRHGN.S7CF-CG3W9LKJ
121216+
6 42.799998999999999683 92.290001000000003728
121217+
CN-GS 4NZ6.57X-CSGLNH39
121218+
CN-GS 3KKZ.63L7-TCBDT0N6
121219+
CN-XJ G5WH.8X9-74880000
121220+
CN-XJ 3KKZ.63L7-TCBDT0N6
121221+
CHN 3KKZ.63L7-TCBDT0N6
121222+
TRFSW.Z7BF-DH1V5RKF
121223121223

121224121224
8 42.799998999999999683 108.73999899999999741
121225121225
MNG DWTZ.WSL-XH02VSS4
@@ -121231,13 +121231,13 @@ CN-GS 4X0N.Q007-9HWBW39H
121231121231
CHN 4X0N.Q007-9HWBW39H
121232121232
TSW4C.V7HF-DG0Y7MLF
121233121233

121234-
6 32.559999000000004798 92.749999000000002525
121235-
CN-XZ PBQD.ZCF-C2T47X4B
121236-
CN-XZ KF73.TQ58-KY9NHK0W
121237-
CN-QH 5FPN.F38-0DM3YF0M
121238-
CN-QH KF73.TQ58-KY9NHK0W
121239-
CHN KF73.TQ58-KY9NHK0W
121240-
RRGYY.7MJ2-PNKK0X6N
121234+
6 32.559999000000004798 92.289999000000008778
121235+
CN-XZ NNFD.ZNG-B0V38Y28
121236+
CN-XZ KD8R.HQK8-KW6PKK1T
121237+
CN-QH 4TC8.K8R-1DH5WK0L
121238+
CN-QH KD8R.HQK8-KW6PKK1T
121239+
CHN KD8R.HQK8-KW6PKK1T
121240+
RRG6S.BM32-PNKK0X6N
121241121241

121242121242
8 32.559999000000004798 108.74000099999999236
121243121243
CN-HB 53KR.3K-T9D24130
@@ -121249,11 +121249,11 @@ CN-SN M7Q8.3LWY-XRHP3X73
121249121249
CHN M7Q8.3LWY-XRHP3X73
121250121250
RSW1P.XM12-NNKF2V5N
121251121251

121252-
4 42.800000999999994633 92.749999000000002525
121253-
CN-XJ GDNF.7MJ-66144312
121254-
CN-XJ 3MH3.33Y7-YKW1PBBD
121255-
CHN 3MH3.33Y7-YKW1PBBD
121256-
TRHGN.S7CF-CMLF0V8P
121252+
4 42.800000999999994633 92.289999000000008778
121253+
CN-XJ G5WH.8X9-7B014024
121254+
CN-XJ 3KKZ.63L7-THY2R8BD
121255+
CHN 3KKZ.63L7-THY2R8BD
121256+
TRFSW.Z7BF-DNHK2T8M
121257121257

121258121258
4 42.800000999999994633 108.74000099999999236
121259121259
MNG DWTZ.WSL-XHQ5NP1D

0 commit comments

Comments
 (0)