Closed hello-willy closed 10 months ago
This is not a correct call because cellToChildren expects the last argument to be an array, not a pointer to a single value. There are many child hexagons for the parent hexagon. You may need something like the following:
uint64_t h12_1_size;
H3Error sizeError = cellToChildrenSize(h7, 12, &h12_1_size);
if (!sizeError) {
H3Index *h12_1 = calloc(h12_1_size, sizeof(H3Index));
H3Error childrenError = cellToChildren(h7, 12, h12_1);
if (!childrenError) {
// use h12_1
} else {
// handle error
}
free(h12_1);
}
H3Index
thanks for your reply, it work! thank you!!!
hi all: when i use h3 lib, an error occur by call the api cellToChildren, my code as follow:
H3 Version:4.1.0
i don't known why? Is there a problem with my writing style? plz help me, thank you very much!!!