Comments
You can use your Mastodon account to reply to this post.
By Leo Gaggl
One of the tasks Google Earth Pro is really useful is getting a quick idea of the viewshed from a specific location. This is particularly useful for planning solar installations or other infrastructure projects such as LoRaWAN gateway deployments.
Whilst the tool is quite powerful, it has a very limited viewshed (roughly 5km) and this is not really useful when looking at gateway deployments that in flat regions of Australia easily can reach 25km+. Also it is not at all obvious how to modify the radius of the viewshed since that has not been a feature in the GUI and it is not documented at all.
Download the .deb package from the Google Earth website.
wget https://dl.google.com/dl/earth/client/current/google-earth-pro-stable_current_amd64.deb
sudo apt install ./google-earth-pro-stable_current_amd64.deb
On Linux the header file is located in the following directory:
./opt/google/earth/pro/shaders/viewshed.h
The viewshed radius is defined as a fraction of the Earth’s circumference in meters as defined by WGS84, or 6,378,137 meters.
// Maximum world space radius of viewshed in fraction of Earth radius.
// Currently, kMaxWorldSpaceLength = 10000m / kWGS84Radius
// See earth/client/libs/math/units.cc
#define kMaxWorldSpaceLength 0.0015678559
To increase the radius, simply set kMaxWorldSpaceLength to whatever value represents that fraction. For example, I need my viewshed to extend to 25 kilometres. So 25000 / 6378137 = 0.039196442.
Just restart Google Earth Pro and you should have the longer radius.
Attribution: Kudos goes to Jerome O’Neil who posted the location and the parameter in question on the Google Maps Forum in 2018. Unfortunately the original post is no longer available.
And a huge thank you to archive.org for keeping this information available. As with so many things Archive.org’s Waybackmachine has been an invaluable tool for me over the years!:q