Select to view content in your preferred language

Add Option to Output Integer IDs for H3 Spatial Grin in Generate Tessellation GP Tool

1112
1
01-26-2024 08:30 AM
Status: Open
Labels (1)
GIS_Spellblade
Frequent Contributor

This ArcGIS Idea is to allow an additional option, when utilizing the H3 spatial index, to output the integer-based ID in either a BigInt or String format. This functionality would be a huge quality of life improvement and create better interoperability for utilizing this open-source spatial index specification.

 

While the new addition to utilizing the open-source H3 Spatial Index within the Generate Tessellation (basic, standard, advanced licenses) and Generate Grids and Hexagons (business analyst extension) is an excellent step forward; however, there currently exists a limitation that severely impacts interoperability with other platforms that utilize H3 which is that these hex tiles can be identified through their integer-based or hexadecimaI IDs.

The current toolset in ArcGIS only outputs H3 tiles utilizing their hexadecimal IDs, this is an issue because the integer IDs require a somewhat complex formula for translating this into the integer ID-- --this is not a well-known piece of knowledge and a cursory search in a stack exchange will bring up results for a simple hexadecimal to integer conversion function. The easiest way to convert the two IDs (without looking up the formula spec on the H3 API documentation) is to utilize the Python library h3-py which can be downloaded utilizing the ArcGIS Pro GUI-based package manager (if a user knew that this is what was required). This significantly ups the requirement to interoperability with other H3 datasets (that may not have the hexadecimal ID included in favor of the integer-based ID) as a user will need to have in-depth knowledge that may not be required for what would otherwise be a simple data request/process.

 

import h3

some_hex_id = "8826c20001fffff"
print(h3.string_to_h3(some_hex_id))
#613171383972659199

 

This ArcGIS Idea is to allow an additional option when utilizing the H3 spatial index to optionally output the integer-based ID in either a BigInt or String format. This would be a huge quality of life improvement and create better interoperability for utilizing this open-source spatial index specification.

https://www.esri.com/arcgis-blog/products/arcgis-pro/analytics/use-h3-to-create-multiresolution-hexa...

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/generatetesellation.htm

https://pro.arcgis.com/en/pro-app/latest/tool-reference/business-analyst/generate-grids-and-hexagons...

@MargaretCrawford 

 

1 Comment
andrew3092
I hear your pain, It would be nice but I've encountered a significant limitation with Esri's Big Integer field type when working with H3 indexes. Unlike BIGINT implementations in databases such as PostgreSQL and SQL Server, Esri's Big Integer does not fully support the 64-bit integer range required for H3 values. As a result, H3 indexes cannot be reliably stored as integers and must instead be stored as strings. I am sure there are reasons for ESRI doing things differently. It would be nice if a 64 BIGINT was supported.