<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hexagon Grid library, I am trying to make a binding for Pascal with the help of H2PAS but it produces bad output, see example below.4</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Any advise how to improve the output ? Any help with converting this API would also be great. The multiple files kinda confuse me a little bit as well as the includes of foreign/strange c libraries...<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I will attach zip file containing debug and release DLLs so you don't need to build it yourself and save some time in case you want to try it out.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
The zip also contains TDUMP output showing it might have some VCRuntime dependency...</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<br>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<a href="https://h3geo.org/" id="LPlnkOWALinkPreview">https://h3geo.org/</a></div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1">
<div id="LPBorder_GTaHR0cHM6Ly9oM2dlby5vcmcv" class="LPBorder590138" style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;">
<table id="LPContainer590138" role="presentation" style="padding: 12px 36px 12px 12px; width: 100%; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px;">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td style="width: 100%;">
<div id="LPTitle590138" style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;">
<a target="_blank" id="LPUrlAnchor590138" href="https://h3geo.org/" style="text-decoration: none; color: var(--themePrimary);">H3 | H3</a></div>
<div id="LPDescription590138" style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;">
Algorithms and optimizations. H3 enables a range of algorithms and optimizations based on the grid, including nearest neighbors, shortest path, gradient smoothing, and more.</div>
<div id="LPMetadata590138" style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;">
h3geo.org</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<a href="https://github.com/uber/h3" id="LPlnkOWALinkPreview_1">https://github.com/uber/h3</a></div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview_1 _EReadonly_1">
<div id="LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL3ViZXIvaDM." class="LPBorder724449" style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;">
<table id="LPContainer724449" role="presentation" style="padding: 12px 36px 12px 12px; width: 100%; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px;">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td>
<div id="LPImageContainer724449" style="position: relative; margin-right: 12px; height: 160px; overflow: hidden;">
<a target="_blank" id="LPImageAnchor724449" href="https://github.com/uber/h3"><img id="LPThumbnailImageId724449" alt="" style="display: block;" width="160" height="160" src="https://repository-images.githubusercontent.com/114948816/18b86b00-4ccc-11ea-8c4b-48010a7f3c6c"></a></div>
</td>
<td style="width: 100%;">
<div id="LPTitle724449" style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;">
<a target="_blank" id="LPUrlAnchor724449" href="https://github.com/uber/h3" style="text-decoration: none; color: var(--themePrimary);">GitHub - uber/h3: Hexagonal hierarchical geospatial indexing system</a></div>
<div id="LPDescription724449" style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;">
Hexagonal hierarchical geospatial indexing system. Contribute to uber/h3 development by creating an account on GitHub.</div>
<div id="LPMetadata724449" style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;">
github.com</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<a href="https://github.com/uber/h3/tree/master/src/h3lib/include" id="LPlnkOWALinkPreview_2">https://github.com/uber/h3/tree/master/src/h3lib/include</a><br>
</div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview_2 _EReadonly_1">
<div id="LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL3ViZXIvaDMvdHJlZS9tYXN0ZXIvc3JjL2gzbGliL2luY2x1ZGU." class="LPBorder303842" style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;">
<table id="LPContainer303842" role="presentation" style="padding: 12px 36px 12px 12px; width: 100%; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px;">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td>
<div id="LPImageContainer303842" style="position: relative; margin-right: 12px; height: 160px; overflow: hidden;">
<a target="_blank" id="LPImageAnchor303842" href="https://github.com/uber/h3/tree/master/src/h3lib/include"><img id="LPThumbnailImageId303842" alt="" style="display: block;" width="160" height="160" src="https://repository-images.githubusercontent.com/114948816/18b86b00-4ccc-11ea-8c4b-48010a7f3c6c"></a></div>
</td>
<td style="width: 100%;">
<div id="LPTitle303842" style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;">
<a target="_blank" id="LPUrlAnchor303842" href="https://github.com/uber/h3/tree/master/src/h3lib/include" style="text-decoration: none; color: var(--themePrimary);">h3/src/h3lib/include at master · uber/h3</a></div>
<div id="LPDescription303842" style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;">
Hexagonal hierarchical geospatial indexing system. Contribute to uber/h3 development by creating an account on GitHub.</div>
<div id="LPMetadata303842" style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;">
github.com</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Input:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
/*
<div> * Copyright 2016-2021 Uber Technologies, Inc.</div>
<div> *</div>
<div> * Licensed under the Apache License, Version 2.0 (the "License");</div>
<div> * you may not use this file except in compliance with the License.</div>
<div> * You may obtain a copy of the License at</div>
<div> *</div>
<div> * http://www.apache.org/licenses/LICENSE-2.0</div>
<div> *</div>
<div> * Unless required by applicable law or agreed to in writing, software</div>
<div> * distributed under the License is distributed on an "AS IS" BASIS,</div>
<div> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</div>
<div> * See the License for the specific language governing permissions and</div>
<div> * limitations under the License.</div>
<div> */</div>
<div>/** @file h3api.h</div>
<div> * @brief Primary H3 core library entry points.</div>
<div> *</div>
<div> * This file defines the public API of the H3 library. Incompatible changes to</div>
<div> * these functions require the library's major version be increased.</div>
<div> */</div>
<div><br>
</div>
<div>#ifndef H3API_H</div>
<div>#define H3API_H</div>
<div><br>
</div>
<div>/*</div>
<div> * Preprocessor code to support renaming (prefixing) the public API.</div>
<div> * All public functions should be wrapped in H3_EXPORT so they can be</div>
<div> * renamed.</div>
<div> */</div>
<div>#ifdef H3_PREFIX</div>
<div>#define XTJOIN(a, b) a##b</div>
<div>#define TJOIN(a, b) XTJOIN(a, b)</div>
<div><br>
</div>
<div>/* export joins the user provided prefix with our exported function name */</div>
<div>#define H3_EXPORT(name) TJOIN(H3_PREFIX, name)</div>
<div>#else</div>
<div>#define H3_EXPORT(name) name</div>
<div>#endif</div>
<div><br>
</div>
<div>/* Windows DLL requires attributes indicating what to export */</div>
<div>#if _WIN32 && BUILD_SHARED_LIBS</div>
<div>#if BUILDING_H3</div>
<div>#define DECLSPEC __declspec(dllexport)</div>
<div>#else</div>
<div>#define DECLSPEC __declspec(dllimport)</div>
<div>#endif</div>
<div>#else</div>
<div>#define DECLSPEC</div>
<div>#endif</div>
<div><br>
</div>
<div>/* For uint64_t */</div>
<div>#include <stdint.h></div>
<div>/* For size_t */</div>
<div>#include <stdlib.h></div>
<div><br>
</div>
<div>/*</div>
<div> * H3 is compiled as C, not C++ code. `extern "C"` is needed for C++ code</div>
<div> * to be able to use the library.</div>
<div> */</div>
<div>#ifdef __cplusplus</div>
<div>extern "C" {</div>
<div>#endif</div>
<div><br>
</div>
<div>/** @brief Identifier for an object (cell, edge, etc) in the H3 system.</div>
<div> *</div>
<div> * The H3Index fits within a 64-bit unsigned integer.</div>
<div> */</div>
<div>typedef uint64_t H3Index;</div>
<div><br>
</div>
<div>/**</div>
<div> * Invalid index used to indicate an error from latLngToCell and related</div>
<div> * functions or missing data in arrays of H3 indices. Analogous to NaN in</div>
<div> * floating point.</div>
<div> */</div>
<div>#define H3_NULL 0</div>
<div><br>
</div>
<div>/** @brief Result code (success or specific error) from an H3 operation */</div>
<div>typedef uint32_t H3Error;</div>
<div><br>
</div>
<div>typedef enum {</div>
<div> E_SUCCESS = 0, // Success (no error)</div>
<div> E_FAILED =</div>
<div> 1, // The operation failed but a more specific error is not available</div>
<div> E_DOMAIN = 2, // Argument was outside of acceptable range (when a more</div>
<div> // specific error code is not available)</div>
<div> E_LATLNG_DOMAIN =</div>
<div> 3, // Latitude or longitude arguments were outside of acceptable range</div>
<div> E_RES_DOMAIN = 4, // Resolution argument was outside of acceptable range</div>
<div> E_CELL_INVALID = 5, // `H3Index` cell argument was not valid</div>
<div> E_DIR_EDGE_INVALID = 6, // `H3Index` directed edge argument was not valid</div>
<div> E_UNDIR_EDGE_INVALID =</div>
<div> 7, // `H3Index` undirected edge argument was not valid</div>
<div> E_VERTEX_INVALID = 8, // `H3Index` vertex argument was not valid</div>
<div> E_PENTAGON = 9, // Pentagon distortion was encountered which the algorithm</div>
<div> // could not handle it</div>
<div> E_DUPLICATE_INPUT = 10, // Duplicate input was encountered in the arguments</div>
<div> // and the algorithm could not handle it</div>
<div> E_NOT_NEIGHBORS = 11, // `H3Index` cell arguments were not neighbors</div>
<div> E_RES_MISMATCH =</div>
<div> 12, // `H3Index` cell arguments had incompatible resolutions</div>
<div> E_MEMORY_ALLOC = 13, // Necessary memory allocation failed</div>
<div> E_MEMORY_BOUNDS = 14, // Bounds of provided memory were not large enough</div>
<div> E_OPTION_INVALID = 15 // Mode or flags argument was not valid.</div>
<div>} H3ErrorCodes;</div>
<div><br>
</div>
<div>/* library version numbers generated from VERSION file */</div>
<div>// clang-format off</div>
<div>#define H3_VERSION_MAJOR 4</div>
<div>#define H3_VERSION_MINOR 0</div>
<div>#define H3_VERSION_PATCH 0</div>
<div>// clang-format on</div>
<div><br>
</div>
<div>/** Maximum number of cell boundary vertices; worst case is pentagon:</div>
<div> * 5 original verts + 5 edge crossings</div>
<div> */</div>
<div>#define MAX_CELL_BNDRY_VERTS 10</div>
<div><br>
</div>
<div>/** @struct LatLng</div>
<div> @brief latitude/longitude in radians</div>
<div>*/</div>
<div>typedef struct {</div>
<div> double lat; ///< latitude in radians</div>
<div> double lng; ///< longitude in radians</div>
<div>} LatLng;</div>
<div><br>
</div>
<div>/** @struct CellBoundary</div>
<div> @brief cell boundary in latitude/longitude</div>
<div>*/</div>
<div>typedef struct {</div>
<div> int numVerts; ///< number of vertices</div>
<div> LatLng verts[MAX_CELL_BNDRY_VERTS]; ///< vertices in ccw order</div>
<div>} CellBoundary;</div>
<div><br>
</div>
<div>/** @struct GeoLoop</div>
<div> * @brief similar to CellBoundary, but requires more alloc work</div>
<div> */</div>
<div>typedef struct {</div>
<div> int numVerts;</div>
<div> LatLng *verts;</div>
<div>} GeoLoop;</div>
<div><br>
</div>
<div>/** @struct GeoPolygon</div>
<div> * @brief Simplified core of GeoJSON Polygon coordinates definition</div>
<div> */</div>
<div>typedef struct {</div>
<div> GeoLoop geoloop; ///< exterior boundary of the polygon</div>
<div> int numHoles; ///< number of elements in the array pointed to by holes</div>
<div> GeoLoop *holes; ///< interior boundaries (holes) in the polygon</div>
<div>} GeoPolygon;</div>
<div><br>
</div>
<div>/** @struct GeoMultiPolygon</div>
<div> * @brief Simplified core of GeoJSON MultiPolygon coordinates definition</div>
<div> */</div>
<div>typedef struct {</div>
<div> int numPolygons;</div>
<div> GeoPolygon *polygons;</div>
<div>} GeoMultiPolygon;</div>
<div><br>
</div>
<div>/** @struct LinkedLatLng</div>
<div> * @brief A coordinate node in a linked geo structure, part of a linked list</div>
<div> */</div>
<div>typedef struct LinkedLatLng LinkedLatLng;</div>
<div>struct LinkedLatLng {</div>
<div> LatLng vertex;</div>
<div> LinkedLatLng *next;</div>
<div>};</div>
<div><br>
</div>
<div>/** @struct LinkedGeoLoop</div>
<div> * @brief A loop node in a linked geo structure, part of a linked list</div>
<div> */</div>
<div>typedef struct LinkedGeoLoop LinkedGeoLoop;</div>
<div>struct LinkedGeoLoop {</div>
<div> LinkedLatLng *first;</div>
<div> LinkedLatLng *last;</div>
<div> LinkedGeoLoop *next;</div>
<div>};</div>
<div><br>
</div>
<div>/** @struct LinkedGeoPolygon</div>
<div> * @brief A polygon node in a linked geo structure, part of a linked list.</div>
<div> */</div>
<div>typedef struct LinkedGeoPolygon LinkedGeoPolygon;</div>
<div>struct LinkedGeoPolygon {</div>
<div> LinkedGeoLoop *first;</div>
<div> LinkedGeoLoop *last;</div>
<div> LinkedGeoPolygon *next;</div>
<div>};</div>
<div><br>
</div>
<div>/** @struct CoordIJ</div>
<div> * @brief IJ hexagon coordinates</div>
<div> *</div>
<div> * Each axis is spaced 120 degrees apart.</div>
<div> */</div>
<div>typedef struct {</div>
<div> int i; ///< i component</div>
<div> int j; ///< j component</div>
<div>} CoordIJ;</div>
<div><br>
</div>
<div>/** @defgroup latLngToCell latLngToCell</div>
<div> * Functions for latLngToCell</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief find the H3 index of the resolution res cell containing the lat/lng</div>
<div> */</div>
<div>DECLSPEC H3Error H3_EXPORT(latLngToCell)(const LatLng *g, int res,</div>
<div> H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellToLatLng cellToLatLng</div>
<div> * Functions for cellToLatLng</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief find the lat/lng center point g of the cell h3 */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellToLatLng)(H3Index h3, LatLng *g);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellToBoundary cellToBoundary</div>
<div> * Functions for cellToBoundary</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief give the cell boundary in lat/lng coordinates for the cell h3 */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellToBoundary)(H3Index h3, CellBoundary *gp);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup gridDisk gridDisk</div>
<div> * Functions for gridDisk</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief maximum number of hexagons in k-ring */</div>
<div>DECLSPEC H3Error H3_EXPORT(maxGridDiskSize)(int k, int64_t *out);</div>
<div><br>
</div>
<div>/** @brief hexagons neighbors in all directions, assuming no pentagons */</div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskUnsafe)(H3Index origin, int k, H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @brief hexagons neighbors in all directions, assuming no pentagons,</div>
<div> * reporting distance from origin */</div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskDistancesUnsafe)(H3Index origin, int k,</div>
<div> H3Index *out,</div>
<div> int *distances);</div>
<div><br>
</div>
<div>/** @brief hexagons neighbors in all directions reporting distance from origin</div>
<div> */</div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskDistancesSafe)(H3Index origin, int k,</div>
<div> H3Index *out, int *distances);</div>
<div><br>
</div>
<div>/** @brief collection of hex rings sorted by ring for all given hexagons */</div>
<div>DECLSPEC H3Error H3_EXPORT(gridDisksUnsafe)(H3Index *h3Set, int length, int k,</div>
<div> H3Index *out);</div>
<div><br>
</div>
<div>/** @brief hexagon neighbors in all directions */</div>
<div>DECLSPEC H3Error H3_EXPORT(gridDisk)(H3Index origin, int k, H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup gridDiskDistances gridDiskDistances</div>
<div> * Functions for gridDiskDistances</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief hexagon neighbors in all directions, reporting distance from origin</div>
<div> */</div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskDistances)(H3Index origin, int k,</div>
<div> H3Index *out, int *distances);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup gridRingUnsafe gridRingUnsafe</div>
<div> * Functions for gridRingUnsafe</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief hollow hexagon ring at some origin */</div>
<div>DECLSPEC H3Error H3_EXPORT(gridRingUnsafe)(H3Index origin, int k, H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup polygonToCells polygonToCells</div>
<div> * Functions for polygonToCells</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief maximum number of hexagons that could be in the geoloop */</div>
<div>DECLSPEC H3Error H3_EXPORT(maxPolygonToCellsSize)(const GeoPolygon *geoPolygon,</div>
<div> int res, uint32_t flags,</div>
<div> int64_t *out);</div>
<div><br>
</div>
<div>/** @brief hexagons within the given geopolygon */</div>
<div>DECLSPEC H3Error H3_EXPORT(polygonToCells)(const GeoPolygon *geoPolygon,</div>
<div> int res, uint32_t flags,</div>
<div> H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellsToMultiPolygon cellsToMultiPolygon</div>
<div> * Functions for cellsToMultiPolygon (currently a binding-only concept)</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Create a LinkedGeoPolygon from a set of contiguous hexagons */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellsToLinkedMultiPolygon)(const H3Index *h3Set,</div>
<div> const int numHexes,</div>
<div> LinkedGeoPolygon *out);</div>
<div><br>
</div>
<div>/** @brief Free all memory created for a LinkedGeoPolygon */</div>
<div>DECLSPEC void H3_EXPORT(destroyLinkedMultiPolygon)(LinkedGeoPolygon *polygon);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup degsToRads degsToRads</div>
<div> * Functions for degsToRads</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief converts degrees to radians */</div>
<div>DECLSPEC double H3_EXPORT(degsToRads)(double degrees);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup radsToDegs radsToDegs</div>
<div> * Functions for radsToDegs</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief converts radians to degrees */</div>
<div>DECLSPEC double H3_EXPORT(radsToDegs)(double radians);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup greatCircleDistance greatCircleDistance</div>
<div> * Functions for distance</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief "great circle distance" between pairs of LatLng points in radians*/</div>
<div>DECLSPEC double H3_EXPORT(greatCircleDistanceRads)(const LatLng *a,</div>
<div> const LatLng *b);</div>
<div><br>
</div>
<div>/** @brief "great circle distance" between pairs of LatLng points in</div>
<div> * kilometers*/</div>
<div>DECLSPEC double H3_EXPORT(greatCircleDistanceKm)(const LatLng *a,</div>
<div> const LatLng *b);</div>
<div><br>
</div>
<div>/** @brief "great circle distance" between pairs of LatLng points in meters*/</div>
<div>DECLSPEC double H3_EXPORT(greatCircleDistanceM)(const LatLng *a,</div>
<div> const LatLng *b);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup getHexagonAreaAvg getHexagonAreaAvg</div>
<div> * Functions for getHexagonAreaAvg</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief average hexagon area in square kilometers (excludes pentagons) */</div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonAreaAvgKm2)(int res, double *out);</div>
<div><br>
</div>
<div>/** @brief average hexagon area in square meters (excludes pentagons) */</div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonAreaAvgM2)(int res, double *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellArea cellArea</div>
<div> * Functions for cellArea</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief exact area for a specific cell (hexagon or pentagon) in radians^2 */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellAreaRads2)(H3Index h, double *out);</div>
<div><br>
</div>
<div>/** @brief exact area for a specific cell (hexagon or pentagon) in kilometers^2</div>
<div> */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellAreaKm2)(H3Index h, double *out);</div>
<div><br>
</div>
<div>/** @brief exact area for a specific cell (hexagon or pentagon) in meters^2 */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellAreaM2)(H3Index h, double *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup getHexagonEdgeLengthAvg getHexagonEdgeLengthAvg</div>
<div> * Functions for getHexagonEdgeLengthAvg</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief average hexagon edge length in kilometers (excludes pentagons) */</div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonEdgeLengthAvgKm)(int res, double *out);</div>
<div><br>
</div>
<div>/** @brief average hexagon edge length in meters (excludes pentagons) */</div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonEdgeLengthAvgM)(int res, double *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup exactEdgeLength exactEdgeLength</div>
<div> * Functions for exactEdgeLength</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief exact length for a specific directed edge in radians*/</div>
<div>DECLSPEC H3Error H3_EXPORT(exactEdgeLengthRads)(H3Index edge, double *length);</div>
<div><br>
</div>
<div>/** @brief exact length for a specific directed edge in kilometers*/</div>
<div>DECLSPEC H3Error H3_EXPORT(exactEdgeLengthKm)(H3Index edge, double *length);</div>
<div><br>
</div>
<div>/** @brief exact length for a specific directed edge in meters*/</div>
<div>DECLSPEC H3Error H3_EXPORT(exactEdgeLengthM)(H3Index edge, double *length);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup getNumCells getNumCells</div>
<div> * Functions for getNumCells</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief number of cells (hexagons and pentagons) for a given resolution</div>
<div> *</div>
<div> * It works out to be `2 + 120*7^r` for resolution `r`.</div>
<div> *</div>
<div> * # Mathematical notes</div>
<div> *</div>
<div> * Let h(n) be the number of children n levels below</div>
<div> * a single *hexagon*.</div>
<div> *</div>
<div> * Then h(n) = 7^n.</div>
<div> *</div>
<div> * Let p(n) be the number of children n levels below</div>
<div> * a single *pentagon*.</div>
<div> *</div>
<div> * Then p(0) = 1, and p(1) = 6, since each pentagon</div>
<div> * has 5 hexagonal immediate children and 1 pentagonal</div>
<div> * immediate child.</div>
<div> *</div>
<div> * In general, we have the recurrence relation</div>
<div> *</div>
<div> * p(n) = 5*h(n-1) + p(n-1)</div>
<div> * = 5*7^(n-1) + p(n-1).</div>
<div> *</div>
<div> * Working through the recurrence, we get that</div>
<div> *</div>
<div> * p(n) = 1 + 5*\sum_{k=1}^n 7^{k-1}</div>
<div> * = 1 + 5*(7^n - 1)/6,</div>
<div> *</div>
<div> * using the closed form for a geometric series.</div>
<div> *</div>
<div> * Using the closed forms for h(n) and p(n), we can</div>
<div> * get a closed form for the total number of cells</div>
<div> * at resolution r:</div>
<div> *</div>
<div> * c(r) = 12*p(r) + 110*h(r)</div>
<div> * = 2 + 120*7^r.</div>
<div> *</div>
<div> *</div>
<div> * @param res H3 cell resolution</div>
<div> *</div>
<div> * @return number of cells at resolution `res`</div>
<div> */</div>
<div>DECLSPEC H3Error H3_EXPORT(getNumCells)(int res, int64_t *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup getRes0Cells getRes0Cells</div>
<div> * Functions for getRes0Cells</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief returns the number of resolution 0 cells (hexagons and pentagons) */</div>
<div>DECLSPEC int H3_EXPORT(res0CellCount)();</div>
<div><br>
</div>
<div>/** @brief provides all base cells in H3Index format*/</div>
<div>DECLSPEC H3Error H3_EXPORT(getRes0Cells)(H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup getPentagons getPentagons</div>
<div> * Functions for getPentagons</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief returns the number of pentagons per resolution */</div>
<div>DECLSPEC int H3_EXPORT(pentagonCount)();</div>
<div><br>
</div>
<div>/** @brief generates all pentagons at the specified resolution */</div>
<div>DECLSPEC H3Error H3_EXPORT(getPentagons)(int res, H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup getResolution getResolution</div>
<div> * Functions for getResolution</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief returns the resolution of the provided H3 index</div>
<div> * Works on both cells and directed edges. */</div>
<div>DECLSPEC int H3_EXPORT(getResolution)(H3Index h);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup getBaseCellNumber getBaseCellNumber</div>
<div> * Functions for getBaseCellNumber</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief returns the base cell "number" (0 to 121) of the provided H3 cell</div>
<div> *</div>
<div> * Note: Technically works on H3 edges, but will return base cell of the</div>
<div> * origin cell. */</div>
<div>DECLSPEC int H3_EXPORT(getBaseCellNumber)(H3Index h);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup stringToH3 stringToH3</div>
<div> * Functions for stringToH3</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief converts the canonical string format to H3Index format */</div>
<div>DECLSPEC H3Error H3_EXPORT(stringToH3)(const char *str, H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup h3ToString h3ToString</div>
<div> * Functions for h3ToString</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief converts an H3Index to a canonical string */</div>
<div>DECLSPEC H3Error H3_EXPORT(h3ToString)(H3Index h, char *str, size_t sz);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup isValidCell isValidCell</div>
<div> * Functions for isValidCell</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief confirms if an H3Index is a valid cell (hexagon or pentagon)</div>
<div> * In particular, returns 0 (False) for H3 directed edges or invalid data</div>
<div> */</div>
<div>DECLSPEC int H3_EXPORT(isValidCell)(H3Index h);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellToParent cellToParent</div>
<div> * Functions for cellToParent</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief returns the parent (or grandparent, etc) cell of the given cell</div>
<div> */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellToParent)(H3Index h, int parentRes,</div>
<div> H3Index *parent);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellToChildren cellToChildren</div>
<div> * Functions for cellToChildren</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief determines the exact number of children (or grandchildren, etc)</div>
<div> * that would be returned for the given cell */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellToChildrenSize)(H3Index h, int childRes,</div>
<div> int64_t *out);</div>
<div><br>
</div>
<div>/** @brief provides the children (or grandchildren, etc) of the given cell */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellToChildren)(H3Index h, int childRes,</div>
<div> H3Index *children);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellToCenterChild cellToCenterChild</div>
<div> * Functions for cellToCenterChild</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief returns the center child of the given cell at the specified</div>
<div> * resolution */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellToCenterChild)(H3Index h, int childRes,</div>
<div> H3Index *child);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup compactCells compactCells</div>
<div> * Functions for compactCells</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief compacts the given set of hexagons as best as possible */</div>
<div>DECLSPEC H3Error H3_EXPORT(compactCells)(const H3Index *h3Set,</div>
<div> H3Index *compactedSet,</div>
<div> const int64_t numHexes);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup uncompactCells uncompactCells</div>
<div> * Functions for uncompactCells</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief determines the exact number of hexagons that will be uncompacted</div>
<div> * from the compacted set */</div>
<div>DECLSPEC H3Error H3_EXPORT(uncompactCellsSize)(const H3Index *compactedSet,</div>
<div> const int64_t numCompacted,</div>
<div> const int res, int64_t *out);</div>
<div><br>
</div>
<div>/** @brief uncompacts the compacted hexagon set */</div>
<div>DECLSPEC H3Error H3_EXPORT(uncompactCells)(const H3Index *compactedSet,</div>
<div> const int64_t numCompacted,</div>
<div> H3Index *outSet,</div>
<div> const int64_t numOut, const int res);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup isResClassIII isResClassIII</div>
<div> * Functions for isResClassIII</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief determines if a hexagon is Class III (or Class II) */</div>
<div>DECLSPEC int H3_EXPORT(isResClassIII)(H3Index h);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup isPentagon isPentagon</div>
<div> * Functions for isPentagon</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief determines if an H3 cell is a pentagon */</div>
<div>DECLSPEC int H3_EXPORT(isPentagon)(H3Index h);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup getIcosahedronFaces getIcosahedronFaces</div>
<div> * Functions for getIcosahedronFaces</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Max number of icosahedron faces intersected by an index */</div>
<div>DECLSPEC H3Error H3_EXPORT(maxFaceCount)(H3Index h3, int *out);</div>
<div><br>
</div>
<div>/** @brief Find all icosahedron faces intersected by a given H3 index */</div>
<div>DECLSPEC H3Error H3_EXPORT(getIcosahedronFaces)(H3Index h3, int *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup areNeighborCells areNeighborCells</div>
<div> * Functions for areNeighborCells</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief returns whether or not the provided hexagons border */</div>
<div>DECLSPEC H3Error H3_EXPORT(areNeighborCells)(H3Index origin,</div>
<div> H3Index destination, int *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellsToDirectedEdge cellsToDirectedEdge</div>
<div> * Functions for cellsToDirectedEdge</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief returns the directed edge H3Index for the specified origin and</div>
<div> * destination */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellsToDirectedEdge)(H3Index origin,</div>
<div> H3Index destination,</div>
<div> H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup isValidDirectedEdge isValidDirectedEdge</div>
<div> * Functions for isValidDirectedEdge</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief returns whether the H3Index is a valid directed edge */</div>
<div>DECLSPEC int H3_EXPORT(isValidDirectedEdge)(H3Index edge);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup getDirectedEdgeOrigin \</div>
<div> * getDirectedEdgeOrigin</div>
<div> * Functions for getDirectedEdgeOrigin</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns the origin hexagon H3Index from the directed edge</div>
<div> * H3Index */</div>
<div>DECLSPEC H3Error H3_EXPORT(getDirectedEdgeOrigin)(H3Index edge, H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup getDirectedEdgeDestination \</div>
<div> * getDirectedEdgeDestination</div>
<div> * Functions for getDirectedEdgeDestination</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns the destination hexagon H3Index from the directed edge</div>
<div> * H3Index */</div>
<div>DECLSPEC H3Error H3_EXPORT(getDirectedEdgeDestination)(H3Index edge,</div>
<div> H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup directedEdgeToCells \</div>
<div> * directedEdgeToCells</div>
<div> * Functions for directedEdgeToCells</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns the origin and destination hexagons from the directed</div>
<div> * edge H3Index */</div>
<div>DECLSPEC H3Error H3_EXPORT(directedEdgeToCells)(H3Index edge,</div>
<div> H3Index *originDestination);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup originToDirectedEdges \</div>
<div> * originToDirectedEdges</div>
<div> * Functions for originToDirectedEdges</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns the 6 (or 5 for pentagons) edges associated with the H3Index</div>
<div> */</div>
<div>DECLSPEC H3Error H3_EXPORT(originToDirectedEdges)(H3Index origin,</div>
<div> H3Index *edges);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup directedEdgeToBoundary directedEdgeToBoundary</div>
<div> * Functions for directedEdgeToBoundary</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns the CellBoundary containing the coordinates of the edge */</div>
<div>DECLSPEC H3Error H3_EXPORT(directedEdgeToBoundary)(H3Index edge,</div>
<div> CellBoundary *gb);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellToVertex cellToVertex</div>
<div> * Functions for cellToVertex</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns a single vertex for a given cell, as an H3 index */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellToVertex)(H3Index origin, int vertexNum,</div>
<div> H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellToVertexes cellToVertexes</div>
<div> * Functions for cellToVertexes</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns all vertexes for a given cell, as H3 indexes */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellToVertexes)(H3Index origin, H3Index *vertexes);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup vertexToLatLng vertexToLatLng</div>
<div> * Functions for vertexToLatLng</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns a single vertex for a given cell, as an H3 index */</div>
<div>DECLSPEC H3Error H3_EXPORT(vertexToLatLng)(H3Index vertex, LatLng *point);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup isValidVertex isValidVertex</div>
<div> * Functions for isValidVertex</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Whether the input is a valid H3 vertex */</div>
<div>DECLSPEC int H3_EXPORT(isValidVertex)(H3Index vertex);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup gridDistance gridDistance</div>
<div> * Functions for gridDistance</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns grid distance between two indexes */</div>
<div>DECLSPEC H3Error H3_EXPORT(gridDistance)(H3Index origin, H3Index h3,</div>
<div> int64_t *distance);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup gridPathCells gridPathCells</div>
<div> * Functions for gridPathCells</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Number of indexes in a line connecting two indexes */</div>
<div>DECLSPEC H3Error H3_EXPORT(gridPathCellsSize)(H3Index start, H3Index end,</div>
<div> int64_t *size);</div>
<div><br>
</div>
<div>/** @brief Line of h3 indexes connecting two indexes */</div>
<div>DECLSPEC H3Error H3_EXPORT(gridPathCells)(H3Index start, H3Index end,</div>
<div> H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup cellToLocalIj cellToLocalIj</div>
<div> * Functions for cellToLocalIj</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns two dimensional coordinates for the given index */</div>
<div>DECLSPEC H3Error H3_EXPORT(cellToLocalIj)(H3Index origin, H3Index h3,</div>
<div> uint32_t mode, CoordIJ *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>/** @defgroup localIjToCell localIjToCell</div>
<div> * Functions for localIjToCell</div>
<div> * @{</div>
<div> */</div>
<div>/** @brief Returns index for the given two dimensional coordinates */</div>
<div>DECLSPEC H3Error H3_EXPORT(localIjToCell)(H3Index origin, const CoordIJ *ij,</div>
<div> uint32_t mode, H3Index *out);</div>
<div>/** @} */</div>
<div><br>
</div>
<div>#ifdef __cplusplus</div>
<div>} // extern "C"</div>
<div>#endif</div>
<div><br>
</div>
<div>#endif</div>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Output:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div>unit h3api;</div>
<div>interface</div>
<div><br>
</div>
<div>{</div>
<div> Automatically converted by H2Pas 1.0.0 from C:\crapho\h3api.tmp.h</div>
<div> The following command line parameters were used:</div>
<div> -e</div>
<div> -p</div>
<div> -D</div>
<div> -w</div>
<div> -o</div>
<div> C:\crapho\h3api.pas</div>
<div> C:\crapho\h3api.tmp.h</div>
<div>}</div>
<div><br>
</div>
<div> const</div>
<div> External_library='kernel32'; {Setup as you need}</div>
<div><br>
</div>
<div> { Pointers to basic pascal types, inserted by h2pas conversion program.}</div>
<div> Type</div>
<div> PLongint = ^Longint;</div>
<div> PSmallInt = ^SmallInt;</div>
<div> PByte = ^Byte;</div>
<div> PWord = ^Word;</div>
<div> PDWord = ^DWord;</div>
<div> PDouble = ^Double;</div>
<div><br>
</div>
<div> Type</div>
<div> PCellBoundary = ^CellBoundary;</div>
<div> PCoordIJ = ^CoordIJ;</div>
<div> PGeoLoop = ^GeoLoop;</div>
<div> PGeoMultiPolygon = ^GeoMultiPolygon;</div>
<div> PGeoPolygon = ^GeoPolygon;</div>
<div> PH3Error = ^H3Error;</div>
<div> PH3ErrorCodes = ^H3ErrorCodes;</div>
<div> PH3Index = ^H3Index;</div>
<div> PLatLng = ^LatLng;</div>
<div> PLinkedGeoLoop = ^LinkedGeoLoop;</div>
<div> PLinkedGeoPolygon = ^LinkedGeoPolygon;</div>
<div> PLinkedLatLng = ^LinkedLatLng;</div>
<div>{$IFDEF FPC}</div>
<div>{$PACKRECORDS C}</div>
<div>{$ENDIF}</div>
<div><br>
</div>
<div><br>
</div>
<div> {</div>
<div> * Copyright 2016-2021 Uber Technologies, Inc.</div>
<div> *</div>
<div> * Licensed under the Apache License, Version 2.0 (the "License");</div>
<div> * you may not use this file except in compliance with the License.</div>
<div> * You may obtain a copy of the License at</div>
<div> *</div>
<div> * http://www.apache.org/licenses/LICENSE-2.0</div>
<div> *</div>
<div> * Unless required by applicable law or agreed to in writing, software</div>
<div> * distributed under the License is distributed on an "AS IS" BASIS,</div>
<div> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</div>
<div> * See the License for the specific language governing permissions and</div>
<div> * limitations under the License.</div>
<div> }</div>
<div> {* @file h3api.h</div>
<div> * @brief Primary H3 core library entry points.</div>
<div> *</div>
<div> * This file defines the public API of the H3 library. Incompatible changes to</div>
<div> * these functions require the library's major version be increased.</div>
<div> }</div>
<div>{$ifndef H3API_H}</div>
<div>{$define H3API_H} </div>
<div> {</div>
<div> * Preprocessor code to support renaming (prefixing) the public API.</div>
<div> * All public functions should be wrapped in H3_EXPORT so they can be</div>
<div> * renamed.</div>
<div> }</div>
<div>{$ifdef H3_PREFIX}</div>
<div>(* error </div>
<div>#define XTJOIN(a, b) a##b</div>
<div>in define line 32 *)</div>
<div> { was #define dname(params) para_def_expr }</div>
<div> { argument types are unknown }</div>
<div> { return type might be wrong } </div>
<div><br>
</div>
<div> function TJOIN(a,b : longint) : longint; </div>
<div><br>
</div>
<div> { export joins the user provided prefix with our exported function name }</div>
<div> { was #define dname(params) para_def_expr }</div>
<div> { argument types are unknown }</div>
<div> { return type might be wrong } </div>
<div> function H3_EXPORT(name : longint) : longint; </div>
<div><br>
</div>
<div>{$else}</div>
<div> { was #define dname(params) para_def_expr }</div>
<div> { argument types are unknown }</div>
<div> { return type might be wrong } </div>
<div><br>
</div>
<div> function H3_EXPORT(name : longint) : longint; </div>
<div><br>
</div>
<div>{$endif}</div>
<div> { Windows DLL requires attributes indicating what to export }</div>
<div>{$if _WIN32 && BUILD_SHARED_LIBS}</div>
<div>{$if BUILDING_H3}</div>
<div><br>
</div>
<div> { was #define dname def_expr }</div>
<div> function DECLSPEC : longint; { return type might be wrong }</div>
<div><br>
</div>
<div>{$else}</div>
<div><br>
</div>
<div> { was #define dname def_expr }</div>
<div> function DECLSPEC : longint; { return type might be wrong }</div>
<div><br>
</div>
<div>{$endif}</div>
<div>{$else}</div>
<div>{$define DECLSPEC} </div>
<div>{$endif}</div>
<div> { For uint64_t }</div>
<div>{$include <stdint.h>}</div>
<div> { For size_t }</div>
<div>{$include <stdlib.h>}</div>
<div> {</div>
<div> * H3 is compiled as C, not C++ code. `extern "C"` is needed for C++ code</div>
<div> * to be able to use the library.</div>
<div> }</div>
<div>{ C++ extern C conditionnal removed }</div>
<div> {* @brief Identifier for an object (cell, edge, etc) in the H3 system.</div>
<div> *</div>
<div> * The H3Index fits within a 64-bit unsigned integer.</div>
<div> }</div>
<div><br>
</div>
<div> type</div>
<div> PH3Index = ^H3Index;</div>
<div> H3Index = uint64_t;</div>
<div> {*</div>
<div> * Invalid index used to indicate an error from latLngToCell and related</div>
<div> * functions or missing data in arrays of H3 indices. Analogous to NaN in</div>
<div> * floating point.</div>
<div> }</div>
<div><br>
</div>
<div> const</div>
<div> H3_NULL = 0; </div>
<div> {* @brief Result code (success or specific error) from an H3 operation }</div>
<div><br>
</div>
<div> type</div>
<div> PH3Error = ^H3Error;</div>
<div> H3Error = uint32_t;</div>
<div> { Success (no error) }</div>
<div> { The operation failed but a more specific error is not available }</div>
<div> { Argument was outside of acceptable range (when a more }</div>
<div> { specific error code is not available) }</div>
<div> { Latitude or longitude arguments were outside of acceptable range }</div>
<div> { Resolution argument was outside of acceptable range }</div>
<div> { `H3Index` cell argument was not valid }</div>
<div> { `H3Index` directed edge argument was not valid }</div>
<div> { `H3Index` undirected edge argument was not valid }</div>
<div> { `H3Index` vertex argument was not valid }</div>
<div> { Pentagon distortion was encountered which the algorithm }</div>
<div> { could not handle it }</div>
<div> { Duplicate input was encountered in the arguments }</div>
<div> { and the algorithm could not handle it }</div>
<div> { `H3Index` cell arguments were not neighbors }</div>
<div> { `H3Index` cell arguments had incompatible resolutions }</div>
<div> { Necessary memory allocation failed }</div>
<div> { Bounds of provided memory were not large enough }</div>
<div> { Mode or flags argument was not valid. }</div>
<div><br>
</div>
<div> PH3ErrorCodes = ^H3ErrorCodes;</div>
<div> H3ErrorCodes = Longint;</div>
<div> Const</div>
<div> E_SUCCESS = 0;</div>
<div> E_FAILED = 1;</div>
<div> E_DOMAIN = 2;</div>
<div> E_LATLNG_DOMAIN = 3;</div>
<div> E_RES_DOMAIN = 4;</div>
<div> E_CELL_INVALID = 5;</div>
<div> E_DIR_EDGE_INVALID = 6;</div>
<div> E_UNDIR_EDGE_INVALID = 7;</div>
<div> E_VERTEX_INVALID = 8;</div>
<div> E_PENTAGON = 9;</div>
<div> E_DUPLICATE_INPUT = 10;</div>
<div> E_NOT_NEIGHBORS = 11;</div>
<div> E_RES_MISMATCH = 12;</div>
<div> E_MEMORY_ALLOC = 13;</div>
<div> E_MEMORY_BOUNDS = 14;</div>
<div> E_OPTION_INVALID = 15;</div>
<div>;</div>
<div> { library version numbers generated from VERSION file }</div>
<div> { clang-format off }</div>
<div> H3_VERSION_MAJOR = 4; </div>
<div> H3_VERSION_MINOR = 0; </div>
<div> H3_VERSION_PATCH = 0; </div>
<div> { clang-format on }</div>
<div> {* Maximum number of cell boundary vertices; worst case is pentagon:</div>
<div> * 5 original verts + 5 edge crossings</div>
<div> }</div>
<div> MAX_CELL_BNDRY_VERTS = 10; </div>
<div> {* @struct LatLng</div>
<div> @brief latitude/longitude in radians</div>
<div> }</div>
<div> {/< latitude in radians }</div>
<div> {/< longitude in radians }</div>
<div><br>
</div>
<div> type</div>
<div> PLatLng = ^LatLng;</div>
<div> LatLng = record</div>
<div> lat : double;</div>
<div> lng : double;</div>
<div> end;</div>
<div> {* @struct CellBoundary</div>
<div> @brief cell boundary in latitude/longitude</div>
<div> }</div>
<div> {/< number of vertices }</div>
<div> {/< vertices in ccw order }</div>
<div><br>
</div>
<div> PCellBoundary = ^CellBoundary;</div>
<div> CellBoundary = record</div>
<div> numVerts : longint;</div>
<div> verts : array[0..(MAX_CELL_BNDRY_VERTS)-1] of LatLng;</div>
<div> end;</div>
<div> {* @struct GeoLoop</div>
<div> * @brief similar to CellBoundary, but requires more alloc work</div>
<div> }</div>
<div><br>
</div>
<div> PGeoLoop = ^GeoLoop;</div>
<div> GeoLoop = record</div>
<div> numVerts : longint;</div>
<div> verts : PLatLng;</div>
<div> end;</div>
<div> {* @struct GeoPolygon</div>
<div> * @brief Simplified core of GeoJSON Polygon coordinates definition</div>
<div> }</div>
<div> {/< exterior boundary of the polygon }</div>
<div> {/< number of elements in the array pointed to by holes }</div>
<div> {/< interior boundaries (holes) in the polygon }</div>
<div><br>
</div>
<div> PGeoPolygon = ^GeoPolygon;</div>
<div> GeoPolygon = record</div>
<div> geoloop : GeoLoop;</div>
<div> numHoles : longint;</div>
<div> holes : PGeoLoop;</div>
<div> end;</div>
<div> {* @struct GeoMultiPolygon</div>
<div> * @brief Simplified core of GeoJSON MultiPolygon coordinates definition</div>
<div> }</div>
<div><br>
</div>
<div> PGeoMultiPolygon = ^GeoMultiPolygon;</div>
<div> GeoMultiPolygon = record</div>
<div> numPolygons : longint;</div>
<div> polygons : PGeoPolygon;</div>
<div> end;</div>
<div> {* @struct LinkedLatLng</div>
<div> * @brief A coordinate node in a linked geo structure, part of a linked list</div>
<div> }</div>
<div> PLinkedLatLng = ^LinkedLatLng;</div>
<div> LinkedLatLng = record</div>
<div> vertex : LatLng;</div>
<div> next : PLinkedLatLng;</div>
<div> end;</div>
<div><br>
</div>
<div> {* @struct LinkedGeoLoop</div>
<div> * @brief A loop node in a linked geo structure, part of a linked list</div>
<div> }</div>
<div> PLinkedGeoLoop = ^LinkedGeoLoop;</div>
<div> LinkedGeoLoop = record</div>
<div> first : PLinkedLatLng;</div>
<div> last : PLinkedLatLng;</div>
<div> next : PLinkedGeoLoop;</div>
<div> end;</div>
<div><br>
</div>
<div> {* @struct LinkedGeoPolygon</div>
<div> * @brief A polygon node in a linked geo structure, part of a linked list.</div>
<div> }</div>
<div> PLinkedGeoPolygon = ^LinkedGeoPolygon;</div>
<div> LinkedGeoPolygon = record</div>
<div> first : PLinkedGeoLoop;</div>
<div> last : PLinkedGeoLoop;</div>
<div> next : PLinkedGeoPolygon;</div>
<div> end;</div>
<div><br>
</div>
<div> {* @struct CoordIJ</div>
<div> * @brief IJ hexagon coordinates</div>
<div> *</div>
<div> * Each axis is spaced 120 degrees apart.</div>
<div> }</div>
<div> {/< i component }</div>
<div> {/< j component }</div>
<div><br>
</div>
<div> PCoordIJ = ^CoordIJ;</div>
<div> CoordIJ = record</div>
<div> i : longint;</div>
<div> j : longint;</div>
<div> end;</div>
<div> {* @defgroup latLngToCell latLngToCell</div>
<div> * Functions for latLngToCell</div>
<div> * @</div>
<div> }</div>
<div> {* @brief find the H3 index of the resolution res cell containing the lat/lng</div>
<div> }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(latLngToCell)(const LatLng *g, int res,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(latLngToCell)(const LatLng *g, int res,</div>
<div>(* error </div>
<div> H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellToLatLng cellToLatLng</div>
<div> * Functions for cellToLatLng</div>
<div> * @</div>
<div> }</div>
<div> {* @brief find the lat/lng center point g of the cell h3 }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToLatLng)(H3Index h3, LatLng *g);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToLatLng)(H3Index h3, LatLng *g);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellToBoundary cellToBoundary</div>
<div> * Functions for cellToBoundary</div>
<div> * @</div>
<div> }</div>
<div> {* @brief give the cell boundary in lat/lng coordinates for the cell h3 }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToBoundary)(H3Index h3, CellBoundary *gp);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToBoundary)(H3Index h3, CellBoundary *gp);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup gridDisk gridDisk</div>
<div> * Functions for gridDisk</div>
<div> * @</div>
<div> }</div>
<div> {* @brief maximum number of hexagons in k-ring }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(maxGridDiskSize)(int k, int64_t *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(maxGridDiskSize)(int k, int64_t *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief hexagons neighbors in all directions, assuming no pentagons }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskUnsafe)(H3Index origin, int k, H3Index *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskUnsafe)(H3Index origin, int k, H3Index *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskUnsafe)(H3Index origin, int k, H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @brief hexagons neighbors in all directions, assuming no pentagons,</div>
<div> * reporting distance from origin }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskDistancesUnsafe)(H3Index origin, int k,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskDistancesUnsafe)(H3Index origin, int k,</div>
<div>(* error </div>
<div> H3Index *out,</div>
<div>(* error </div>
<div> int *distances);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief hexagons neighbors in all directions reporting distance from origin</div>
<div> }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskDistancesSafe)(H3Index origin, int k,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskDistancesSafe)(H3Index origin, int k,</div>
<div>(* error </div>
<div> H3Index *out, int *distances);</div>
<div>(* error </div>
<div> H3Index *out, int *distances);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief collection of hex rings sorted by ring for all given hexagons }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDisksUnsafe)(H3Index *h3Set, int length, int k,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDisksUnsafe)(H3Index *h3Set, int length, int k,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDisksUnsafe)(H3Index *h3Set, int length, int k,</div>
<div>(* error </div>
<div> H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief hexagon neighbors in all directions }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDisk)(H3Index origin, int k, H3Index *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDisk)(H3Index origin, int k, H3Index *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDisk)(H3Index origin, int k, H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup gridDiskDistances gridDiskDistances</div>
<div> * Functions for gridDiskDistances</div>
<div> * @</div>
<div> }</div>
<div> {* @brief hexagon neighbors in all directions, reporting distance from origin</div>
<div> }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskDistances)(H3Index origin, int k,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDiskDistances)(H3Index origin, int k,</div>
<div>(* error </div>
<div> H3Index *out, int *distances);</div>
<div>(* error </div>
<div> H3Index *out, int *distances);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup gridRingUnsafe gridRingUnsafe</div>
<div> * Functions for gridRingUnsafe</div>
<div> * @</div>
<div> }</div>
<div> {* @brief hollow hexagon ring at some origin }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridRingUnsafe)(H3Index origin, int k, H3Index *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridRingUnsafe)(H3Index origin, int k, H3Index *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridRingUnsafe)(H3Index origin, int k, H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup polygonToCells polygonToCells</div>
<div> * Functions for polygonToCells</div>
<div> * @</div>
<div> }</div>
<div> {* @brief maximum number of hexagons that could be in the geoloop }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(maxPolygonToCellsSize)(const GeoPolygon *geoPolygon,</div>
<div>(* error </div>
<div> int res, uint32_t flags,</div>
<div>(* error </div>
<div> int res, uint32_t flags,</div>
<div>(* error </div>
<div> int64_t *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief hexagons within the given geopolygon }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(polygonToCells)(const GeoPolygon *geoPolygon,</div>
<div>(* error </div>
<div> int res, uint32_t flags,</div>
<div>(* error </div>
<div> int res, uint32_t flags,</div>
<div>(* error </div>
<div> H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellsToMultiPolygon cellsToMultiPolygon</div>
<div> * Functions for cellsToMultiPolygon (currently a binding-only concept)</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Create a LinkedGeoPolygon from a set of contiguous hexagons }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellsToLinkedMultiPolygon)(const H3Index *h3Set,</div>
<div>(* error </div>
<div> const int numHexes,</div>
<div>(* error </div>
<div> LinkedGeoPolygon *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief Free all memory created for a LinkedGeoPolygon }</div>
<div>(* error </div>
<div>DECLSPEC void H3_EXPORT(destroyLinkedMultiPolygon)(LinkedGeoPolygon *polygon);</div>
<div>in declaration at line 298 *)</div>
<div> {* @ }</div>
<div> {* @defgroup degsToRads degsToRads</div>
<div> * Functions for degsToRads</div>
<div> * @</div>
<div> }</div>
<div> {* @brief converts degrees to radians }</div>
<div>(* error </div>
<div>DECLSPEC double H3_EXPORT(degsToRads)(double degrees);</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup radsToDegs radsToDegs</div>
<div> * Functions for radsToDegs</div>
<div> * @</div>
<div> }</div>
<div> {* @brief converts radians to degrees }</div>
<div>(* error </div>
<div>DECLSPEC double H3_EXPORT(radsToDegs)(double radians);</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup greatCircleDistance greatCircleDistance</div>
<div> * Functions for distance</div>
<div> * @</div>
<div> }</div>
<div> {* @brief "great circle distance" between pairs of LatLng points in radians }</div>
<div>(* error </div>
<div>DECLSPEC double H3_EXPORT(greatCircleDistanceRads)(const LatLng *a,</div>
<div>(* error </div>
<div> const LatLng *b);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief "great circle distance" between pairs of LatLng points in</div>
<div> * kilometers }</div>
<div>(* error </div>
<div>DECLSPEC double H3_EXPORT(greatCircleDistanceKm)(const LatLng *a,</div>
<div>(* error </div>
<div> const LatLng *b);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief "great circle distance" between pairs of LatLng points in meters }</div>
<div>(* error </div>
<div>DECLSPEC double H3_EXPORT(greatCircleDistanceM)(const LatLng *a,</div>
<div>(* error </div>
<div> const LatLng *b);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup getHexagonAreaAvg getHexagonAreaAvg</div>
<div> * Functions for getHexagonAreaAvg</div>
<div> * @</div>
<div> }</div>
<div> {* @brief average hexagon area in square kilometers (excludes pentagons) }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonAreaAvgKm2)(int res, double *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonAreaAvgKm2)(int res, double *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief average hexagon area in square meters (excludes pentagons) }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonAreaAvgM2)(int res, double *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonAreaAvgM2)(int res, double *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellArea cellArea</div>
<div> * Functions for cellArea</div>
<div> * @</div>
<div> }</div>
<div> {* @brief exact area for a specific cell (hexagon or pentagon) in radians^2 }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellAreaRads2)(H3Index h, double *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellAreaRads2)(H3Index h, double *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief exact area for a specific cell (hexagon or pentagon) in kilometers^2</div>
<div> }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellAreaKm2)(H3Index h, double *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellAreaKm2)(H3Index h, double *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief exact area for a specific cell (hexagon or pentagon) in meters^2 }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellAreaM2)(H3Index h, double *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellAreaM2)(H3Index h, double *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup getHexagonEdgeLengthAvg getHexagonEdgeLengthAvg</div>
<div> * Functions for getHexagonEdgeLengthAvg</div>
<div> * @</div>
<div> }</div>
<div> {* @brief average hexagon edge length in kilometers (excludes pentagons) }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonEdgeLengthAvgKm)(int res, double *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonEdgeLengthAvgKm)(int res, double *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief average hexagon edge length in meters (excludes pentagons) }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonEdgeLengthAvgM)(int res, double *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getHexagonEdgeLengthAvgM)(int res, double *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup exactEdgeLength exactEdgeLength</div>
<div> * Functions for exactEdgeLength</div>
<div> * @</div>
<div> }</div>
<div> {* @brief exact length for a specific directed edge in radians }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(exactEdgeLengthRads)(H3Index edge, double *length);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(exactEdgeLengthRads)(H3Index edge, double *length);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief exact length for a specific directed edge in kilometers }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(exactEdgeLengthKm)(H3Index edge, double *length);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(exactEdgeLengthKm)(H3Index edge, double *length);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief exact length for a specific directed edge in meters }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(exactEdgeLengthM)(H3Index edge, double *length);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(exactEdgeLengthM)(H3Index edge, double *length);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup getNumCells getNumCells</div>
<div> * Functions for getNumCells</div>
<div> * @</div>
<div> }</div>
<div> {* @brief number of cells (hexagons and pentagons) for a given resolution</div>
<div> *</div>
<div> * It works out to be `2 + 120*7^r` for resolution `r`.</div>
<div> *</div>
<div> * # Mathematical notes</div>
<div> *</div>
<div> * Let h(n) be the number of children n levels below</div>
<div> * a single *hexagon*.</div>
<div> *</div>
<div> * Then h(n) = 7^n.</div>
<div> *</div>
<div> * Let p(n) be the number of children n levels below</div>
<div> * a single *pentagon*.</div>
<div> *</div>
<div> * Then p(0) = 1, and p(1) = 6, since each pentagon</div>
<div> * has 5 hexagonal immediate children and 1 pentagonal</div>
<div> * immediate child.</div>
<div> *</div>
<div> * In general, we have the recurrence relation</div>
<div> *</div>
<div> * p(n) = 5*h(n-1) + p(n-1)</div>
<div> * = 5*7^(n-1) + p(n-1).</div>
<div> *</div>
<div> * Working through the recurrence, we get that</div>
<div> *</div>
<div> * p(n) = 1 + 5*\sum_k=1^n 7^k-1</div>
<div> * = 1 + 5*(7^n - 1)/6,</div>
<div> *</div>
<div> * using the closed form for a geometric series.</div>
<div> *</div>
<div> * Using the closed forms for h(n) and p(n), we can</div>
<div> * get a closed form for the total number of cells</div>
<div> * at resolution r:</div>
<div> *</div>
<div> * c(r) = 12*p(r) + 110*h(r)</div>
<div> * = 2 + 120*7^r.</div>
<div> *</div>
<div> *</div>
<div> * @param res H3 cell resolution</div>
<div> *</div>
<div> * @return number of cells at resolution `res`</div>
<div> }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getNumCells)(int res, int64_t *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getNumCells)(int res, int64_t *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup getRes0Cells getRes0Cells</div>
<div> * Functions for getRes0Cells</div>
<div> * @</div>
<div> }</div>
<div> {* @brief returns the number of resolution 0 cells (hexagons and pentagons) }</div>
<div>(* error </div>
<div>DECLSPEC int H3_EXPORT(res0CellCount)();</div>
<div>in declaration at line 440 *)</div>
<div> {* @brief provides all base cells in H3Index format }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getRes0Cells)(H3Index *out);</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup getPentagons getPentagons</div>
<div> * Functions for getPentagons</div>
<div> * @</div>
<div> }</div>
<div> {* @brief returns the number of pentagons per resolution }</div>
<div>(* error </div>
<div>DECLSPEC int H3_EXPORT(pentagonCount)();</div>
<div>in declaration at line 451 *)</div>
<div> {* @brief generates all pentagons at the specified resolution }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getPentagons)(int res, H3Index *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getPentagons)(int res, H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup getResolution getResolution</div>
<div> * Functions for getResolution</div>
<div> * @</div>
<div> }</div>
<div> {* @brief returns the resolution of the provided H3 index</div>
<div> * Works on both cells and directed edges. }</div>
<div>(* error </div>
<div>DECLSPEC int H3_EXPORT(getResolution)(H3Index h);</div>
<div>in declaration at line 463 *)</div>
<div> {* @ }</div>
<div> {* @defgroup getBaseCellNumber getBaseCellNumber</div>
<div> * Functions for getBaseCellNumber</div>
<div> * @</div>
<div> }</div>
<div> {* @brief returns the base cell "number" (0 to 121) of the provided H3 cell</div>
<div> *</div>
<div> * Note: Technically works on H3 edges, but will return base cell of the</div>
<div> * origin cell. }</div>
<div>(* error </div>
<div>DECLSPEC int H3_EXPORT(getBaseCellNumber)(H3Index h);</div>
<div>in declaration at line 474 *)</div>
<div> {* @ }</div>
<div> {* @defgroup stringToH3 stringToH3</div>
<div> * Functions for stringToH3</div>
<div> * @</div>
<div> }</div>
<div> {* @brief converts the canonical string format to H3Index format }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(stringToH3)(const char *str, H3Index *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(stringToH3)(const char *str, H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup h3ToString h3ToString</div>
<div> * Functions for h3ToString</div>
<div> * @</div>
<div> }</div>
<div> {* @brief converts an H3Index to a canonical string }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(h3ToString)(H3Index h, char *str, size_t sz);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(h3ToString)(H3Index h, char *str, size_t sz);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(h3ToString)(H3Index h, char *str, size_t sz);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup isValidCell isValidCell</div>
<div> * Functions for isValidCell</div>
<div> * @</div>
<div> }</div>
<div> {* @brief confirms if an H3Index is a valid cell (hexagon or pentagon)</div>
<div> * In particular, returns 0 (False) for H3 directed edges or invalid data</div>
<div> }</div>
<div>(* error </div>
<div>DECLSPEC int H3_EXPORT(isValidCell)(H3Index h);</div>
<div>in declaration at line 500 *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellToParent cellToParent</div>
<div> * Functions for cellToParent</div>
<div> * @</div>
<div> }</div>
<div> {* @brief returns the parent (or grandparent, etc) cell of the given cell</div>
<div> }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToParent)(H3Index h, int parentRes,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToParent)(H3Index h, int parentRes,</div>
<div>(* error </div>
<div> H3Index *parent);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellToChildren cellToChildren</div>
<div> * Functions for cellToChildren</div>
<div> * @</div>
<div> }</div>
<div> {* @brief determines the exact number of children (or grandchildren, etc)</div>
<div> * that would be returned for the given cell }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToChildrenSize)(H3Index h, int childRes,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToChildrenSize)(H3Index h, int childRes,</div>
<div>(* error </div>
<div> int64_t *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief provides the children (or grandchildren, etc) of the given cell }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToChildren)(H3Index h, int childRes,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToChildren)(H3Index h, int childRes,</div>
<div>(* error </div>
<div> H3Index *children);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellToCenterChild cellToCenterChild</div>
<div> * Functions for cellToCenterChild</div>
<div> * @</div>
<div> }</div>
<div> {* @brief returns the center child of the given cell at the specified</div>
<div> * resolution }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToCenterChild)(H3Index h, int childRes,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToCenterChild)(H3Index h, int childRes,</div>
<div>(* error </div>
<div> H3Index *child);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup compactCells compactCells</div>
<div> * Functions for compactCells</div>
<div> * @</div>
<div> }</div>
<div> {* @brief compacts the given set of hexagons as best as possible }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(compactCells)(const H3Index *h3Set,</div>
<div>(* error </div>
<div> H3Index *compactedSet,</div>
<div>(* error </div>
<div> const int64_t numHexes);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup uncompactCells uncompactCells</div>
<div> * Functions for uncompactCells</div>
<div> * @</div>
<div> }</div>
<div> {* @brief determines the exact number of hexagons that will be uncompacted</div>
<div> * from the compacted set }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(uncompactCellsSize)(const H3Index *compactedSet,</div>
<div>(* error </div>
<div> const int64_t numCompacted,</div>
<div>(* error </div>
<div> const int res, int64_t *out);</div>
<div>(* error </div>
<div> const int res, int64_t *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief uncompacts the compacted hexagon set }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(uncompactCells)(const H3Index *compactedSet,</div>
<div>(* error </div>
<div> const int64_t numCompacted,</div>
<div>(* error </div>
<div> H3Index *outSet,</div>
<div>(* error </div>
<div> const int64_t numOut, const int res);</div>
<div>(* error </div>
<div> const int64_t numOut, const int res);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup isResClassIII isResClassIII</div>
<div> * Functions for isResClassIII</div>
<div> * @</div>
<div> }</div>
<div> {* @brief determines if a hexagon is Class III (or Class II) }</div>
<div>(* error </div>
<div>DECLSPEC int H3_EXPORT(isResClassIII)(H3Index h);</div>
<div>in declaration at line 569 *)</div>
<div> {* @ }</div>
<div> {* @defgroup isPentagon isPentagon</div>
<div> * Functions for isPentagon</div>
<div> * @</div>
<div> }</div>
<div> {* @brief determines if an H3 cell is a pentagon }</div>
<div>(* error </div>
<div>DECLSPEC int H3_EXPORT(isPentagon)(H3Index h);</div>
<div>in declaration at line 577 *)</div>
<div> {* @ }</div>
<div> {* @defgroup getIcosahedronFaces getIcosahedronFaces</div>
<div> * Functions for getIcosahedronFaces</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Max number of icosahedron faces intersected by an index }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(maxFaceCount)(H3Index h3, int *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(maxFaceCount)(H3Index h3, int *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief Find all icosahedron faces intersected by a given H3 index }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getIcosahedronFaces)(H3Index h3, int *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getIcosahedronFaces)(H3Index h3, int *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup areNeighborCells areNeighborCells</div>
<div> * Functions for areNeighborCells</div>
<div> * @</div>
<div> }</div>
<div> {* @brief returns whether or not the provided hexagons border }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(areNeighborCells)(H3Index origin,</div>
<div>(* error </div>
<div> H3Index destination, int *out);</div>
<div>(* error </div>
<div> H3Index destination, int *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellsToDirectedEdge cellsToDirectedEdge</div>
<div> * Functions for cellsToDirectedEdge</div>
<div> * @</div>
<div> }</div>
<div> {* @brief returns the directed edge H3Index for the specified origin and</div>
<div> * destination }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellsToDirectedEdge)(H3Index origin,</div>
<div>(* error </div>
<div> H3Index destination,</div>
<div>(* error </div>
<div> H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup isValidDirectedEdge isValidDirectedEdge</div>
<div> * Functions for isValidDirectedEdge</div>
<div> * @</div>
<div> }</div>
<div> {* @brief returns whether the H3Index is a valid directed edge }</div>
<div>(* error </div>
<div>DECLSPEC int H3_EXPORT(isValidDirectedEdge)(H3Index edge);</div>
<div>in declaration at line 616 *)</div>
<div> {* @ }</div>
<div> {* @defgroup getDirectedEdgeOrigin \</div>
<div> * getDirectedEdgeOrigin</div>
<div> * Functions for getDirectedEdgeOrigin</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns the origin hexagon H3Index from the directed edge</div>
<div> * H3Index }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getDirectedEdgeOrigin)(H3Index edge, H3Index *out);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getDirectedEdgeOrigin)(H3Index edge, H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup getDirectedEdgeDestination \</div>
<div> * getDirectedEdgeDestination</div>
<div> * Functions for getDirectedEdgeDestination</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns the destination hexagon H3Index from the directed edge</div>
<div> * H3Index }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(getDirectedEdgeDestination)(H3Index edge,</div>
<div>(* error </div>
<div> H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup directedEdgeToCells \</div>
<div> * directedEdgeToCells</div>
<div> * Functions for directedEdgeToCells</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns the origin and destination hexagons from the directed</div>
<div> * edge H3Index }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(directedEdgeToCells)(H3Index edge,</div>
<div>(* error </div>
<div> H3Index *originDestination);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup originToDirectedEdges \</div>
<div> * originToDirectedEdges</div>
<div> * Functions for originToDirectedEdges</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns the 6 (or 5 for pentagons) edges associated with the H3Index</div>
<div> }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(originToDirectedEdges)(H3Index origin,</div>
<div>(* error </div>
<div> H3Index *edges);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup directedEdgeToBoundary directedEdgeToBoundary</div>
<div> * Functions for directedEdgeToBoundary</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns the CellBoundary containing the coordinates of the edge }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(directedEdgeToBoundary)(H3Index edge,</div>
<div>(* error </div>
<div> CellBoundary *gb);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellToVertex cellToVertex</div>
<div> * Functions for cellToVertex</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns a single vertex for a given cell, as an H3 index }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToVertex)(H3Index origin, int vertexNum,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToVertex)(H3Index origin, int vertexNum,</div>
<div>(* error </div>
<div> H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellToVertexes cellToVertexes</div>
<div> * Functions for cellToVertexes</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns all vertexes for a given cell, as H3 indexes }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToVertexes)(H3Index origin, H3Index *vertexes);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToVertexes)(H3Index origin, H3Index *vertexes);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup vertexToLatLng vertexToLatLng</div>
<div> * Functions for vertexToLatLng</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns a single vertex for a given cell, as an H3 index }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(vertexToLatLng)(H3Index vertex, LatLng *point);</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(vertexToLatLng)(H3Index vertex, LatLng *point);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup isValidVertex isValidVertex</div>
<div> * Functions for isValidVertex</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Whether the input is a valid H3 vertex }</div>
<div>(* error </div>
<div>DECLSPEC int H3_EXPORT(isValidVertex)(H3Index vertex);</div>
<div>in declaration at line 701 *)</div>
<div> {* @ }</div>
<div> {* @defgroup gridDistance gridDistance</div>
<div> * Functions for gridDistance</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns grid distance between two indexes }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDistance)(H3Index origin, H3Index h3,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridDistance)(H3Index origin, H3Index h3,</div>
<div>(* error </div>
<div> int64_t *distance);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup gridPathCells gridPathCells</div>
<div> * Functions for gridPathCells</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Number of indexes in a line connecting two indexes }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridPathCellsSize)(H3Index start, H3Index end,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridPathCellsSize)(H3Index start, H3Index end,</div>
<div>(* error </div>
<div> int64_t *size);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @brief Line of h3 indexes connecting two indexes }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridPathCells)(H3Index start, H3Index end,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(gridPathCells)(H3Index start, H3Index end,</div>
<div>(* error </div>
<div> H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup cellToLocalIj cellToLocalIj</div>
<div> * Functions for cellToLocalIj</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns two dimensional coordinates for the given index }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToLocalIj)(H3Index origin, H3Index h3,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(cellToLocalIj)(H3Index origin, H3Index h3,</div>
<div>(* error </div>
<div> uint32_t mode, CoordIJ *out);</div>
<div>(* error </div>
<div> uint32_t mode, CoordIJ *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div> {* @defgroup localIjToCell localIjToCell</div>
<div> * Functions for localIjToCell</div>
<div> * @</div>
<div> }</div>
<div> {* @brief Returns index for the given two dimensional coordinates }</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(localIjToCell)(H3Index origin, const CoordIJ *ij,</div>
<div>(* error </div>
<div>DECLSPEC H3Error H3_EXPORT(localIjToCell)(H3Index origin, const CoordIJ *ij,</div>
<div>(* error </div>
<div> uint32_t mode, H3Index *out);</div>
<div>(* error </div>
<div> uint32_t mode, H3Index *out);</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> in declarator_list *)</div>
<div> {* @ }</div>
<div>{$endif}</div>
<div><br>
</div>
<div>implementation</div>
<div><br>
</div>
<div> { was #define dname(params) para_def_expr }</div>
<div> { argument types are unknown }</div>
<div> { return type might be wrong } </div>
<div> function TJOIN(a,b : longint) : longint;</div>
<div> begin</div>
<div> TJOIN:=XTJOIN(a,b);</div>
<div> end;</div>
<div><br>
</div>
<div> { was #define dname(params) para_def_expr }</div>
<div> { argument types are unknown }</div>
<div> { return type might be wrong } </div>
<div> function H3_EXPORT(name : longint) : longint;</div>
<div> begin</div>
<div> H3_EXPORT:=TJOIN(H3_PREFIX,name);</div>
<div> end;</div>
<div><br>
</div>
<div> { was #define dname(params) para_def_expr }</div>
<div> { argument types are unknown }</div>
<div> { return type might be wrong } </div>
<div> function H3_EXPORT(name : longint) : longint;</div>
<div> begin</div>
<div> H3_EXPORT:=name;</div>
<div> end;</div>
<div><br>
</div>
<div> { was #define dname def_expr }</div>
<div> function DECLSPEC : longint; { return type might be wrong }</div>
<div> begin</div>
<div> DECLSPEC:=__declspec(dllexport);</div>
<div> end;</div>
<div><br>
</div>
<div> { was #define dname def_expr }</div>
<div> function DECLSPEC : longint; { return type might be wrong }</div>
<div> begin</div>
<div> DECLSPEC:=__declspec(dllimport);</div>
<div> end;</div>
<div><br>
</div>
<div><br>
</div>
<div>end.</div>
<div><br>
</div>
<div>Bye,</div>
<div> Skybuck.<br>
</div>
</div>
</body>
</html>