I looked a bit closer at the numbers, and it seems the time is spent on figuring out which hexagons to create. Actual creating the hexagons takes around 10 minutes.
The problem is your complex regions with many holes and islands and generally many nodes.
I simplified the regions by adding a 200 km buffer and then adding a -200 buffer around the area. This will smooth out the polygons. But keep a polygon that is close to the coverage of the original:
Running the tool on the simplified boundaries took a shorter time. It now processes all 2,009,392 hexagons in around 45 minutes - compared to 177 minutes earlier.
Original Message:
Sent: 03-21-2023 15:47
From: Kathy Gillis
Subject: Errors Uber H3 Hexagon layers in MapInfo Pro
Thank you, Peter. I really appreciate your help through this.
Kathy
------------------------------
Kathy Gillis
AT&T
SAN RAMON OR
Original Message:
Sent: 03-21-2023 06:05
From: Peter Møller
Subject: Errors Uber H3 Hexagon layers in MapInfo Pro
It may take hours, yes.
I tried creating H3 Level 5 for your data. That took around 5 minutes to create 36,388 hexagons.
I then took it up a level and set it to create level 7 hexagons. This took 177 minutes and resulted in 1.781,416 hexagons.
Remember for each step down in size, you get 7 times more hexagons. I can see the times isn't a multiply of 49 for my 2 steps. It's only took around 35 times longer to generate level 7 compared to level 5.
If we extrude this to generate level 5. It will probably take around 35 * 177 minutes ~ 6,200 minutes ~ 103 hours - jaw dropping. I hope I made som miscalculations here
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 03-20-2023 19:13
From: Kathy Gillis
Subject: Errors Uber H3 Hexagon layers in MapInfo Pro
Thank you Peter. I did get the package to install and run. I'm executing the script with the attached tab file of the U.S.. It is taking a very long time for resolution 9 (only one I have tried thus far). Should it be taking hours to produce the output file?
Thank you for all of your help, Peter - Kathy
------------------------------
Kathy Gillis
AT&T
SAN RAMON OR
Original Message:
Sent: 03-20-2023 03:45
From: Peter Møller
Subject: Errors Uber H3 Hexagon layers in MapInfo Pro
Hi Kathy
The H3 tool seems to be failing to install the H3 Python module. Maybe we can try to get that installed "manually".
Open the Command Prompt by typing CMD in the search field with the Window Start button.
Now change the directory to the folder where you have MapInfo Pro installed.
Now change the folder to the PythonXXX subfolder. I think it's Python310 but I'm on MapInfo Pro v2021.1, and I can't recall if we change the Python version between 2021 and 2021.1 so check what your folder name is.
Now type this to get the H3 module installed: python -m pip install h3
As you can see I got a message telling me I already had that module: Requirement already satisfied
Now try to run the tool again in MapInfo Pro.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 03-17-2023 19:10
From: Kathy Gillis
Subject: Errors Uber H3 Hexagon layers in MapInfo Pro
Thank you Peter.
I am having the result when running as admin.
MapInfo Pro 2021 build 183.
Any other ideas for resolution? Thanks for your time - Kathy
------------------------------
Kathy Gillis
AT&T
SAN RAMON OR
Original Message:
Sent: 03-17-2023 08:58
From: Peter Møller
Subject: Errors Uber H3 Hexagon layers in MapInfo Pro
Hi Kathy
Can you try loading MapInfo Pro with administrator right? Right-click on your MapInfo Pro shortcut and use Run as Administrator.
Now try to load the H3 Hexagon tool again.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 03-15-2023 13:27
From: Kathy Gillis
Subject: Errors Uber H3 Hexagon layers in MapInfo Pro
Hi,
I read the discussion entitled "MapInfo Monday: Creating Uber H3 Hexagon layers in MapInfo Pro". In that post it mentions running MapInfo as admin and allowing the ad-in to install H3 Python Library. After opening MI as admin, then running CreateUberH3Hexagons.py (from Home>Open>Program) I'm still getting the following errors. Can you please provide guidance to resolve? Thank you - Kathy
ERRORS: module 'h3' is not installed. It will be installed
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/h3/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/h3/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/h3/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/h3/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/h3/
ERROR: Could not find a version that satisfies the requirement h3 (from versions: none)
ERROR: No matching distribution found for h3
ModuleNotFoundError : No module named 'h3'
------------------------------
Kathy Gillis
AT&T
SAN RAMON OR
------------------------------