[mapcode] 04/18: Added extraDigits to --boundaries
Stefan Fritsch
sf at moszumanska.debian.org
Wed Nov 2 23:27:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to annotated tag v1.40
in repository mapcode.
commit 30cf67a99bd4947c5120ab06cc45026be0708abf
Author: Rijn Buve <rijn at buve.nl>
Date: Wed Sep 17 11:39:19 2014 +0200
Added extraDigits to --boundaries
---
example/mapcode.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/example/mapcode.cpp b/example/mapcode.cpp
index 7bf03c6..4749abb 100644
--- a/example/mapcode.cpp
+++ b/example/mapcode.cpp
@@ -88,7 +88,7 @@ static void usage(const char* appName) {
printf(" Encode a lat/lon to a Mapcode. If the territory code is specified, the\n");
printf(" encoding will only succeeed if the lat/lon is located in the territory.\n");
printf("\n");
- printf(" %s [-b | --boundaries]\n", appName);
+ printf(" %s [-b | --boundaries] [<extraDigits>]\n", appName);
printf(" %s [-g | --grid] <nrOfPoints> [<extraDigits>]\n", appName);
printf(" %s [-r | --random] <nrOfPoints> [<extraDigits>] [<seed>]\n", appName);
printf("\n");
@@ -491,11 +491,14 @@ int main(const int argc, const char** argv)
// ------------------------------------------------------------------
// Generate a test set based on the Mapcode boundaries.
// ------------------------------------------------------------------
- if (argc != 2) {
+ if ((argc < 2) || (argc > 3)) {
fprintf(stderr, "error: incorrect number of arguments\n\n");
usage(appName);
return NORMAL_ERROR;
}
+ if (argc == 3) {
+ extraDigits = atoi(argv[2]);
+ }
resetStatistics(NR_BOUNDARY_RECS);
for (int i = 0; i < totalNrOfPoints; ++i) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapcode.git
More information about the Pkg-grass-devel
mailing list