Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 1.64 KB

Uber-Api-Indexing.md

File metadata and controls

66 lines (43 loc) · 1.64 KB

Indexing Functions

These functions are used for finding the H3 index containing coordinates, and for finding the center and boundary of H3 indexes.

GeoToH3

H3Index Api.GeoToH3(GeoCoord g, int r)

GeoToH3 Summary

Find the H3 index of the resolution res cell containing the lat/lng

GeoToH3 Parameters

Name Type Description
g H3Lib.GeoCoord Geographical coordinate (in radians) data type
r int Resolution (0-15 inclusive) of resulting H3Index

H3ToGeo

void Api.H3ToGeo(H3Index h3, out GeoCoord g) 

H3ToGeo Summary

Find the lat/lon center point g of the cell h3

Note: This is provided to map the same general syntax of the C library. You will probably want to use the ToGeo method for H3Index data types.

H3ToGeo Parameters

Name Type Description
h3 H3Lib.H3Index The H3Index cell to find the centroid of
g out H3Lib.GeoCoord The geographical coordinate that is the center of the cell

H3ToGeoBoundary

void Api.H3ToGeoBoundary(H3Index h3, out GeoBoundary gb)

H3ToGeoBoundary Summary

Gives the cell boundary in lat/lon coordinates for the cell h3

Note: Similar to H3ToGeo in regards to C API mapping, and an assigned variable. The preferred method would be ToGeoBoundary().

H3ToGeoBoundary Parameters

Name Tyoe Description
h3 H3Lib.H3Index The H3Index to find the GeoBoundary of
g out H3Lib.GeoBoundary The GeoBoundary defining the vertices of the H3Index cell

Return to Uber API Table of Contents