Skip to content

Commit 8722c81

Browse files
committed
Fixed utility
1 parent 1fe66c9 commit 8722c81

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,29 +67,29 @@ This produces the following help text:
6767
Copyright (C) 2014-2016 Stichting Mapcode Foundation
6868

6969
Usage:
70-
./mapcode [-d| --decode] <default-territory> <mapcode> [<mapcode> ...]
70+
mapcode [-d| --decode] <default-territory> <mapcode> [<mapcode> ...]
7171

7272
Decode a mapcode to a lat/lon. The default territory code is used if
7373
the mapcode is a shorthand local code
7474

75-
./mapcode [-e[0-8] | --encode[0-8]] <lat:-90..90> <lon:-180..180> [territory]>
75+
mapcode [-e[0-8] | --encode[0-8]] <lat:-90..90> <lon:-180..180> [territory]>
7676

7777
Encode a lat/lon to a mapcode. If the territory code is specified, the
7878
encoding will only succeeed if the lat/lon is located in the territory.
7979
You can specify the number of additional digits, 0, 1 or 2 (default 0)
8080
for high-precision mapcodes.
8181

82-
./mapcode [-t | --territories]
82+
mapcode [-t | --territories]
8383

8484
Create a full set of territories in CSV format.
8585

86-
./mapcode [-a | --alphabets]
86+
mapcode [-a | --alphabets]
8787

8888
Create a full set of alphabet tests in CSV format.
8989

90-
./mapcode [-b[XYZ] | --boundaries[XYZ]] [<extraDigits>]
91-
./mapcode [-g[XYZ] | --grid[XYZ]] <nrOfPoints> [<extraDigits>]
92-
./mapcode [-r[XYZ] | --random[XYZ]] <nrOfPoints> [<extraDigits>] [<seed>]
90+
mapcode [-b[XYZ] | --boundaries[XYZ]] [<extraDigits>]
91+
mapcode [-g[XYZ] | --grid[XYZ]] <nrOfPoints> [<extraDigits>]
92+
mapcode [-r[XYZ] | --random[XYZ]] <nrOfPoints> [<extraDigits>] [<seed>]
9393

9494
Create a test set of lat/lon pairs based on the mapcode boundaries database
9595
as a fixed 3D grid or random uniformly distributed set of lat/lons with their
@@ -113,16 +113,16 @@ This produces the following help text:
113113
The (x, y, z) coordinates are primarily meant for visualization of the data set.
114114

115115
Example:
116-
./mapcode -g 100 : produces a grid of 100 points as lat/lon pairs
117-
./mapcode -gXYZ 100 : produces a grid of 100 points as (x, y, z) sphere coordinates)
116+
mapcode -g 100 : produces a grid of 100 points as lat/lon pairs
117+
mapcode -gXYZ 100 : produces a grid of 100 points as (x, y, z) sphere coordinates)
118118

119119
Notes on the use of stdout and stderr:
120-
stdout: used for outputting 3D point data; stderr: used for statistics.
120+
stdout: used for outputting 3D Point data; stderr: used for statistics.
121121
You can redirect stdout to a destination file, while stderr will show progress.
122122

123123
The result code is 0 when no error occurred, 1 if an input error occurred and 2
124124
if an internal error occurred.
125-
125+
126126
## Compile Options for Microsoft Visual C++
127127

128128
If you use **Microsoft Visual C++**, you may need to add the following compiler directives to your build:

utility/mapcode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ int main(const int argc, const char **argv) {
527527
printf("ccode,territorycodes(pipe-separated),alphabets(pipe-seperated),names(pipe-separated)\n");
528528
for (int i = _TERRITORY_MIN + 1; i < _TERRITORY_MAX; ++i) {
529529
const enum Territory ccode = (enum Territory) i;
530-
char territoryName[MAX_MAPCODE_RESULT_LEN];
530+
char territoryName[MAX_MAPCODE_RESULT_ASCII_LEN];
531531
printf("%d,", INDEX_OF_TERRITORY(i));
532532

533533
// Use internal knowledge of ALPHA_SEARCH to show aliases of territoryName.

0 commit comments

Comments
 (0)