h3 3.4.0 → 3.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -1
  3. data/ext/h3/src/.travis.yml +5 -0
  4. data/ext/h3/src/CHANGELOG.md +25 -0
  5. data/ext/h3/src/CMakeLists.txt +5 -8
  6. data/ext/h3/src/CONTRIBUTING.md +2 -0
  7. data/ext/h3/src/README.md +6 -2
  8. data/ext/h3/src/VERSION +1 -1
  9. data/ext/h3/src/appveyor.yml +6 -1
  10. data/ext/h3/src/docs/api/misc.md +16 -0
  11. data/ext/h3/src/docs/community/bindings.md +9 -0
  12. data/ext/h3/src/docs/community/tutorials.md +4 -0
  13. data/ext/h3/src/scripts/binding_functions.ps1 +1 -2
  14. data/ext/h3/src/scripts/binding_functions.sh +3 -2
  15. data/ext/h3/src/scripts/coverage.sh.in +3 -3
  16. data/ext/h3/src/src/apps/applib/include/utility.h +60 -0
  17. data/ext/h3/src/src/apps/applib/lib/utility.c +196 -2
  18. data/ext/h3/src/src/apps/benchmarks/benchmarkPolyfill.c +7 -4
  19. data/ext/h3/src/src/apps/filters/geoToH3.c +73 -27
  20. data/ext/h3/src/src/apps/filters/h3ToGeo.c +63 -47
  21. data/ext/h3/src/src/apps/filters/h3ToGeoBoundary.c +64 -48
  22. data/ext/h3/src/src/apps/filters/h3ToLocalIj.c +4 -5
  23. data/ext/h3/src/src/apps/filters/hexRange.c +0 -1
  24. data/ext/h3/src/src/apps/filters/kRing.c +60 -28
  25. data/ext/h3/src/src/apps/filters/localIjToH3.c +75 -0
  26. data/ext/h3/src/src/apps/miscapps/generateBaseCellNeighbors.c +2 -2
  27. data/ext/h3/src/src/apps/testapps/testBBox.c +18 -0
  28. data/ext/h3/src/src/apps/testapps/testCompact.c +41 -0
  29. data/ext/h3/src/src/apps/testapps/testCoordIj.c +0 -1
  30. data/ext/h3/src/src/apps/testapps/testCoordIjk.c +53 -0
  31. data/ext/h3/src/src/apps/testapps/testH3Api.c +20 -0
  32. data/ext/h3/src/src/apps/testapps/testH3Distance.c +5 -3
  33. data/ext/h3/src/src/apps/testapps/testH3Line.c +18 -6
  34. data/ext/h3/src/src/apps/testapps/testH3ToLocalIj.c +75 -3
  35. data/ext/h3/src/src/apps/testapps/testH3UniEdge.c +17 -11
  36. data/ext/h3/src/src/apps/testapps/testHexRanges.c +10 -0
  37. data/ext/h3/src/src/apps/testapps/testKRing.c +11 -7
  38. data/ext/h3/src/src/h3lib/lib/algos.c +2 -1
  39. data/ext/h3/src/src/h3lib/lib/geoCoord.c +10 -10
  40. data/ext/h3/src/src/h3lib/lib/h3Index.c +1 -2
  41. data/ext/h3/src/src/h3lib/lib/localij.c +32 -36
  42. data/lib/h3/version.rb +1 -1
  43. metadata +4 -7
  44. data/ext/h3/src/cmake/CheckAlloca.cmake +0 -33
  45. data/ext/h3/src/cmake/CheckVLA.cmake +0 -33
  46. data/ext/h3/src/cmake/alloca_test.c +0 -29
  47. data/ext/h3/src/cmake/vla_test.c +0 -26
  48. data/ext/h3/src/src/h3lib/include/stackAlloc.h +0 -64
@@ -16,7 +16,6 @@
16
16
  #include "algos.h"
17
17
  #include "benchmark.h"
18
18
  #include "h3api.h"
19
- #include "stackAlloc.h"
20
19
 
21
20
  // Fixtures
22
21
  GeoCoord sfVerts[] = {
@@ -120,23 +119,27 @@ southernGeofence.verts = southernVerts;
120
119
  southernGeoPolygon.geofence = southernGeofence;
121
120
 
122
121
  int numHexagons;
122
+ H3Index* hexagons;
123
123
 
124
124
  BENCHMARK(polyfillSF, 500, {
125
125
  numHexagons = H3_EXPORT(maxPolyfillSize)(&sfGeoPolygon, 9);
126
- STACK_ARRAY_CALLOC(H3Index, hexagons, numHexagons);
126
+ hexagons = calloc(numHexagons, sizeof(H3Index));
127
127
  H3_EXPORT(polyfill)(&sfGeoPolygon, 9, hexagons);
128
+ free(hexagons);
128
129
  });
129
130
 
130
131
  BENCHMARK(polyfillAlameda, 500, {
131
132
  numHexagons = H3_EXPORT(maxPolyfillSize)(&alamedaGeoPolygon, 9);
132
- STACK_ARRAY_CALLOC(H3Index, hexagons, numHexagons);
133
+ hexagons = calloc(numHexagons, sizeof(H3Index));
133
134
  H3_EXPORT(polyfill)(&alamedaGeoPolygon, 9, hexagons);
135
+ free(hexagons);
134
136
  });
135
137
 
136
138
  BENCHMARK(polyfillSouthernExpansion, 10, {
137
139
  numHexagons = H3_EXPORT(maxPolyfillSize)(&southernGeoPolygon, 9);
138
- STACK_ARRAY_CALLOC(H3Index, hexagons, numHexagons);
140
+ hexagons = calloc(numHexagons, sizeof(H3Index));
139
141
  H3_EXPORT(polyfill)(&southernGeoPolygon, 9, hexagons);
142
+ free(hexagons);
140
143
  });
141
144
 
142
145
  END_BENCHMARKS();
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2016-2017 Uber Technologies, Inc.
2
+ * Copyright 2016-2017, 2019 Uber Technologies, Inc.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
17
17
  * @brief stdin/stdout filter that converts from lat/lon coordinates to integer
18
18
  * H3 indexes
19
19
  *
20
- * usage: `geoToH3 resolution`
20
+ * usage: `geoToH3 --resolution res [--latitude lat --longitude lon]`
21
21
  *
22
22
  * The program reads lat/lon pairs from stdin until EOF is encountered. For
23
23
  * each lat/lon the program outputs to stdout the integer H3 index of the
@@ -34,40 +34,86 @@
34
34
 
35
35
  #include <stdio.h>
36
36
  #include <stdlib.h>
37
- #include "coordijk.h"
38
37
  #include "h3Index.h"
39
38
  #include "utility.h"
40
39
 
40
+ /**
41
+ * Convert coordinates to cell and print it.
42
+ *
43
+ * @param lat Degrees latitude
44
+ * @param lon Degrees longitude
45
+ * @param res Resolution
46
+ */
47
+ void doCoords(double lat, double lon, int res) {
48
+ GeoCoord g;
49
+ setGeoDegs(&g, lat, lon);
50
+
51
+ H3Index h = H3_EXPORT(geoToH3)(&g, res);
52
+
53
+ h3Println(h);
54
+ }
55
+
41
56
  int main(int argc, char* argv[]) {
42
- // get the command line argument resolution
43
- if (argc != 2) {
44
- fprintf(stderr, "usage: %s resolution\n", argv[0]);
45
- exit(1);
46
- }
57
+ int res = 0;
58
+ double lat = 0;
59
+ double lon = 0;
47
60
 
48
- int res;
49
- if (!sscanf(argv[1], "%d", &res)) error("parsing resolution");
61
+ Arg helpArg = {.names = {"-h", "--help"},
62
+ .helpText = "Show this help message."};
63
+ Arg resArg = {.names = {"-r", "--resolution"},
64
+ .required = true,
65
+ .scanFormat = "%d",
66
+ .valueName = "res",
67
+ .value = &res,
68
+ .helpText = "Resolution, 0-15 inclusive."};
69
+ Arg latArg = {.names = {"--lat", "--latitude"},
70
+ .scanFormat = "%lf",
71
+ .valueName = "lat",
72
+ .value = &lat,
73
+ .helpText =
74
+ "Latitude in degrees. If not specified, \"latitude "
75
+ "longitude\" pairs will be read from stdin."};
76
+ Arg lonArg = {.names = {"--lon", "--longitude"},
77
+ .scanFormat = "%lf",
78
+ .valueName = "lon",
79
+ .value = &lon,
80
+ .helpText = "Longitude in degrees."};
50
81
 
51
- // process the lat/lon's on stdin
52
- char buff[BUFF_SIZE];
53
- double lat, lon;
54
- while (1) {
55
- // get a lat/lon from stdin
56
- if (!fgets(buff, BUFF_SIZE, stdin)) {
57
- if (feof(stdin))
58
- break;
59
- else
60
- error("reading lat/lon");
61
- }
82
+ Arg* args[] = {&helpArg, &resArg, &latArg, &lonArg};
83
+
84
+ const char* helpText =
85
+ "Convert degrees latitude/longitude coordinates to H3 indexes.";
86
+
87
+ if (parseArgs(argc, argv, 4, args, &helpArg, helpText)) {
88
+ return helpArg.found ? 0 : 1;
89
+ }
62
90
 
63
- if (sscanf(buff, "%lf %lf", &lat, &lon) != 2) error("parsing lat/lon");
91
+ if (latArg.found != lonArg.found) {
92
+ // One is found but the other is not.
93
+ printHelp(stderr, argv[0], helpText, 4, args,
94
+ "Latitude and longitude must both be specified.", NULL);
95
+ return 1;
96
+ }
64
97
 
65
- // convert to H3
66
- GeoCoord g;
67
- setGeoDegs(&g, lat, lon);
98
+ if (latArg.found) {
99
+ doCoords(lat, lon, res);
100
+ } else {
101
+ // process the lat/lon's on stdin
102
+ char buff[BUFF_SIZE];
103
+ while (1) {
104
+ // get a lat/lon from stdin
105
+ if (!fgets(buff, BUFF_SIZE, stdin)) {
106
+ if (feof(stdin))
107
+ break;
108
+ else
109
+ error("reading lat/lon");
110
+ }
68
111
 
69
- H3Index h = H3_EXPORT(geoToH3)(&g, res);
112
+ if (sscanf(buff, "%lf %lf", &lat, &lon) != 2)
113
+ error("parsing lat/lon");
70
114
 
71
- h3Println(h);
115
+ // convert to H3
116
+ doCoords(lat, lon, res);
117
+ }
72
118
  }
73
119
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2016-2017 Uber Technologies, Inc.
2
+ * Copyright 2016-2017, 2019 Uber Technologies, Inc.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -17,20 +17,17 @@
17
17
  * @brief stdin/stdout filter that converts from integer H3 indexes to lat/lon
18
18
  * cell center point
19
19
  *
20
- * usage: `h3ToGeo [outputMode kmlName kmlDesc]`
20
+ * usage: `h3ToGeo [--index index] [--kml [--kml-name name] [--kml-description
21
+ * desc]]`
21
22
  *
22
23
  * The program reads H3 indexes from stdin and outputs the corresponding
23
24
  * cell center points to stdout, until EOF is encountered. The H3 indexes
24
25
  * should be in integer form.
25
26
  *
26
- * `outputMode` indicates the type of output; the choices are 0 for
27
- * plain text output (the default) and 1 for KML output
28
- *
29
- * `kmlName` indicates the string for the name tag in KML output (only used
30
- * when `outputMode` == 1). The default is "geo from H3".
31
- *
32
- * `kmlName` indicates the string for the desc tag in KML output (only used
33
- * when `outputMode` == 1). The default is "generated by h3ToGeo".
27
+ * `--kml` causes KML output to be printed. `--kml-name` and
28
+ * `--kml-description` can be used to change the name and description in the
29
+ * KML header, which default to "H3 Geometry" and "Generated by h3ToGeo"
30
+ * respectively.
34
31
  *
35
32
  * Examples:
36
33
  *
@@ -38,22 +35,19 @@
38
35
  * - outputs plain text cell center points for the H3 indexes contained
39
36
  * in the file `indexes.txt`
40
37
  *
41
- * `h3ToGeo 1 "kml file" "h3 cells" < indexes.txt > cells.kml`
38
+ * `h3ToGeo --kml --kml-name "kml title" --kml-description "h3 cells" <
39
+ * indexes.txt > cells.kml`
42
40
  * - creates the KML file `cells.kml` containing the cell center points
43
41
  * for all of the H3 indexes contained in the file `indexes.txt`.
44
42
  */
45
43
 
44
+ #include <inttypes.h>
46
45
  #include <stdio.h>
47
46
  #include <stdlib.h>
48
47
  #include <string.h>
49
- #include "baseCells.h"
50
- #include "coordijk.h"
51
- #include "geoCoord.h"
52
- #include "h3Index.h"
53
48
  #include "h3api.h"
54
49
  #include "kml.h"
55
50
  #include "utility.h"
56
- #include "vec2d.h"
57
51
 
58
52
  void doCell(H3Index h, int isKmlOut) {
59
53
  GeoCoord g;
@@ -72,46 +66,68 @@ void doCell(H3Index h, int isKmlOut) {
72
66
  }
73
67
 
74
68
  int main(int argc, char *argv[]) {
75
- // check command line args
76
- if (argc > 5) {
77
- fprintf(stderr, "usage: %s [outputMode kmlName kmlDesc]\n", argv[0]);
78
- exit(1);
79
- }
69
+ H3Index index = 0;
70
+ char userKmlName[BUFF_SIZE] = {0};
71
+ char userKmlDesc[BUFF_SIZE] = {0};
80
72
 
81
- int isKmlOut = 0;
82
- if (argc > 1) {
83
- if (!sscanf(argv[1], "%d", &isKmlOut))
84
- error("outputMode must be an integer");
73
+ Arg helpArg = {.names = {"-h", "--help"},
74
+ .helpText = "Show this help message."};
75
+ Arg indexArg = {
76
+ .names = {"-i", "--index"},
77
+ .scanFormat = "%" PRIx64,
78
+ .valueName = "index",
79
+ .value = &index,
80
+ .helpText =
81
+ "Index, or not specified to read indexes from standard in."};
82
+ Arg kmlArg = {.names = {"-k", "--kml"},
83
+ .helpText = "Print output in KML format."};
84
+ Arg kmlNameArg = {.names = {"--kn", "--kml-name"},
85
+ .scanFormat = "%255c", // BUFF_SIZE - 1
86
+ .valueName = "name",
87
+ .value = &userKmlName,
88
+ .helpText = "Text for the KML name tag."};
89
+ Arg kmlDescArg = {.names = {"--kd", "--kml-description"},
90
+ .scanFormat = "%255c", // BUFF_SIZE - 1
91
+ .valueName = "description",
92
+ .value = &userKmlDesc,
93
+ .helpText = "Text for the KML description tag."};
85
94
 
86
- if (isKmlOut != 0 && isKmlOut != 1) error("outputMode must be 0 or 1");
87
- char *defaultKmlName = "geo from H3";
88
- char *defaultKmlDesc = "from h3ToGeo";
95
+ Arg *args[] = {&helpArg, &indexArg, &kmlArg, &kmlNameArg, &kmlDescArg};
89
96
 
90
- char *kmlName = defaultKmlName;
91
- char *kmlDesc = defaultKmlDesc;
97
+ if (parseArgs(argc, argv, 5, args, &helpArg,
98
+ "Converts indexes to latitude/longitude center coordinates "
99
+ "in degrees")) {
100
+ return helpArg.found ? 0 : 1;
101
+ }
92
102
 
93
- if (argc > 2) {
94
- kmlName = argv[2];
95
- if (argc > 3) kmlDesc = argv[3];
96
- }
103
+ if (kmlArg.found) {
104
+ char *kmlName = "H3 Geometry";
105
+ if (kmlNameArg.found) kmlName = userKmlName;
106
+
107
+ char *kmlDesc = "Generated by h3ToGeo";
108
+ if (kmlDescArg.found) kmlDesc = userKmlDesc;
97
109
 
98
110
  kmlPtsHeader(kmlName, kmlDesc);
99
111
  }
100
112
 
101
- // process the indexes on stdin
102
- char buff[BUFF_SIZE];
103
- while (1) {
104
- // get an index from stdin
105
- if (!fgets(buff, BUFF_SIZE, stdin)) {
106
- if (feof(stdin))
107
- break;
108
- else
109
- error("reading H3 index from stdin");
110
- }
113
+ if (indexArg.found) {
114
+ doCell(index, kmlArg.found);
115
+ } else {
116
+ // process the indexes on stdin
117
+ char buff[BUFF_SIZE];
118
+ while (1) {
119
+ // get an index from stdin
120
+ if (!fgets(buff, BUFF_SIZE, stdin)) {
121
+ if (feof(stdin))
122
+ break;
123
+ else
124
+ error("reading H3 index from stdin");
125
+ }
111
126
 
112
- H3Index h3 = H3_EXPORT(stringToH3)(buff);
113
- doCell(h3, isKmlOut);
127
+ H3Index h3 = H3_EXPORT(stringToH3)(buff);
128
+ doCell(h3, kmlArg.found);
129
+ }
114
130
  }
115
131
 
116
- if (isKmlOut) kmlPtsFooter();
132
+ if (kmlArg.found) kmlPtsFooter();
117
133
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2016-2017 Uber Technologies, Inc.
2
+ * Copyright 2016-2017, 2019 Uber Technologies, Inc.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -17,19 +17,16 @@
17
17
  * @brief stdin/stdout filter that converts from integer H3 indexes to lat/lon
18
18
  * cell boundaries
19
19
  *
20
- * usage: `h3ToGeoBoundary [outputMode kmlName kmlDesc]`
20
+ * usage: `h3ToGeoBoundary [--index index] [--kml [--kml-name name]
21
+ * [--kml-description desc]]`
21
22
  *
22
23
  * The program reads H3 indexes from stdin and outputs the corresponding
23
24
  * cell boundaries to stdout, until EOF is encountered.
24
25
  *
25
- * `outputMode` indicates the type of output; the choices are 0 for
26
- * plain text output (the default) and 1 for KML output
27
- *
28
- * `kmlName` indicates the string for the name tag in KML output (only used
29
- * when `outputMode` == 1). The default is "geo from H3".
30
- *
31
- * `kmlName` indicates the string for the desc tag in KML output (only used
32
- * when `outputMode` == 1). The default is "generated by h3ToGeoBoundary".
26
+ * `--kml` causes KML output to be printed. `--kml-name` and
27
+ * `--kml-description` can be used to change the name and description in the
28
+ * KML header, which default to "H3 Geometry" and "Generated by
29
+ * h3ToGeoBoundary" respectively.
33
30
  *
34
31
  * Examples:
35
32
  *
@@ -37,22 +34,19 @@
37
34
  * - outputs plain text cell boundaries for the H3 indexes contained
38
35
  * in the file `indexes.txt`
39
36
  *
40
- * `h3ToGeoBoundary 1 "kml file" "h3 cells" < indexes.txt > cells.kml`
37
+ * `h3ToGeoBoundary --kml --kml-name "kml title" --kml-description "h3
38
+ * cells" < indexes.txt > cells.kml`
41
39
  * - creates the KML file `cells.kml` containing the cell boundaries for
42
- * all of the H3 indexes contained in the file `indexes.txt`.
40
+ * all of the H3 indexes contained in the file `indexes.txt`.
43
41
  */
44
42
 
43
+ #include <inttypes.h>
45
44
  #include <stdio.h>
46
45
  #include <stdlib.h>
47
46
  #include <string.h>
48
- #include "baseCells.h"
49
- #include "coordijk.h"
50
- #include "geoCoord.h"
51
- #include "h3Index.h"
52
47
  #include "h3api.h"
53
48
  #include "kml.h"
54
49
  #include "utility.h"
55
- #include "vec2d.h"
56
50
 
57
51
  void doCell(H3Index h, int isKmlOut) {
58
52
  GeoBoundary b;
@@ -70,46 +64,68 @@ void doCell(H3Index h, int isKmlOut) {
70
64
  }
71
65
 
72
66
  int main(int argc, char *argv[]) {
73
- // check command line args
74
- if (argc > 5) {
75
- fprintf(stderr, "usage: %s [outputMode kmlName kmlDesc]\n", argv[0]);
76
- exit(1);
77
- }
67
+ H3Index index = 0;
68
+ char userKmlName[BUFF_SIZE] = {0};
69
+ char userKmlDesc[BUFF_SIZE] = {0};
78
70
 
79
- int isKmlOut = 0;
80
- if (argc > 1) {
81
- if (!sscanf(argv[1], "%d", &isKmlOut))
82
- error("outputMode must be an integer");
71
+ Arg helpArg = {.names = {"-h", "--help"},
72
+ .helpText = "Show this help message."};
73
+ Arg indexArg = {
74
+ .names = {"-i", "--index"},
75
+ .scanFormat = "%" PRIx64,
76
+ .valueName = "index",
77
+ .value = &index,
78
+ .helpText =
79
+ "Index, or not specified to read indexes from standard in."};
80
+ Arg kmlArg = {.names = {"-k", "--kml"},
81
+ .helpText = "Print output in KML format."};
82
+ Arg kmlNameArg = {.names = {"--kn", "--kml-name"},
83
+ .scanFormat = "%255c", // BUFF_SIZE - 1
84
+ .valueName = "name",
85
+ .value = &userKmlName,
86
+ .helpText = "Text for the KML name tag."};
87
+ Arg kmlDescArg = {.names = {"--kd", "--kml-description"},
88
+ .scanFormat = "%255c", // BUFF_SIZE - 1
89
+ .valueName = "description",
90
+ .value = &userKmlDesc,
91
+ .helpText = "Text for the KML description tag."};
83
92
 
84
- if (isKmlOut != 0 && isKmlOut != 1) error("outputMode must be 0 or 1");
85
- char *defaultKmlName = "geo from H3";
86
- char *defaultKmlDesc = "from h3ToGeo";
93
+ Arg *args[] = {&helpArg, &indexArg, &kmlArg, &kmlNameArg, &kmlDescArg};
87
94
 
88
- char *kmlName = defaultKmlName;
89
- char *kmlDesc = defaultKmlDesc;
95
+ if (parseArgs(argc, argv, 5, args, &helpArg,
96
+ "Converts indexes to latitude/longitude cell boundaries in "
97
+ "degrees")) {
98
+ return helpArg.found ? 0 : 1;
99
+ }
90
100
 
91
- if (argc > 2) {
92
- kmlName = argv[2];
93
- if (argc > 3) kmlDesc = argv[3];
94
- }
101
+ if (kmlArg.found) {
102
+ char *kmlName = "H3 Geometry";
103
+ if (kmlNameArg.found) kmlName = userKmlName;
104
+
105
+ char *kmlDesc = "Generated by h3ToGeoBoundary";
106
+ if (kmlDescArg.found) kmlDesc = userKmlDesc;
95
107
 
96
108
  kmlPtsHeader(kmlName, kmlDesc);
97
109
  }
98
110
 
99
- // process the indexes on stdin
100
- char buff[BUFF_SIZE];
101
- while (1) {
102
- // get an index from stdin
103
- if (!fgets(buff, BUFF_SIZE, stdin)) {
104
- if (feof(stdin))
105
- break;
106
- else
107
- error("reading H3 index from stdin");
108
- }
111
+ if (indexArg.found) {
112
+ doCell(index, kmlArg.found);
113
+ } else {
114
+ // process the indexes on stdin
115
+ char buff[BUFF_SIZE];
116
+ while (1) {
117
+ // get an index from stdin
118
+ if (!fgets(buff, BUFF_SIZE, stdin)) {
119
+ if (feof(stdin))
120
+ break;
121
+ else
122
+ error("reading H3 index from stdin");
123
+ }
109
124
 
110
- H3Index h3 = H3_EXPORT(stringToH3)(buff);
111
- doCell(h3, isKmlOut);
125
+ H3Index h3 = H3_EXPORT(stringToH3)(buff);
126
+ doCell(h3, kmlArg.found);
127
+ }
112
128
  }
113
129
 
114
- if (isKmlOut) kmlPtsFooter();
130
+ if (kmlArg.found) kmlPtsFooter();
115
131
  }