Wikipedia has detailed articles on:
Spherical Geometry and
Vincenty’s Formulae (for geometric calculations on an ellipsoid).
The spreadsheet Vincenty.zip uses those resources to perform the following calculations, using both on-sheet calculations and VBA user-defined functions (UDF’s):
- Calculation of distance and azimuth angles given latitude and longitude for two points.
- Calculation of latitude and longitude and azimuth for a second point, given the position and azimuth for the first point.
- Calculation of the area inside a closed polygon, using the excess angle method.
The spreadsheet contains full open source code, and documentation for the on-sheet calculations. Examples are shown in the screenshots below (click any image for full-size view):
Input and geometry constants required for the VincentyLen Function:
The on-sheet calculation follows the procedure given in the Wikipedia article. The VincentyLen function returns the same end results (in bold), and can also return the intermediate results:
The VincentyCoord function solves the “Direct Problem”, returning the latitude and longitude for a point at a specified distance and bearing from another point:
The VincentyArea Function finds the area inside a polygon specified by the latitude and longitude for a series of points, listed in clockwise order, using the “Excess angle method”. Note that as well as the returning the area, if the optional second argument is set to 2 the function returns additional data for each segment of the polygon, as shown in columns H to L below:
The VincentyArea function has been used to calculate the area of the Australian mainland, using a series of 2900 points:
The data for the points is listed with longitude first then latitude. All three functions have an optional third “XY” argument to deal with this convention with the values:
- 1 (default) – Latitude then Longitude
- 2 – Longitude, Latitude
Hi, if interested you can download and edit or implement the excel file with VBA in which I incorporated the Antipodal solution of Vincenty (1975b) to the 1975a and hence give exact results for any coordinates like Karney’s GeodSolve. The script of Geodsolve is large whereas this VBA is small and easier. It is shared for those interested and contain no malware. I spent some time on Vincenty’s solution and thought that some else also may benefit from it. If some are afraid of enabling VBA, and contact me I can share the vba alone. Link below:
https://drive.google.com/uc?export=download&id=1fJJkfaK-MJz6jUktoJKpRSAEU08KA9QW
Thanks,
LikeLiked by 1 person
Is the Australia mainland data available for download?
LikeLike
The Australian data is included in the Vincenty spreadsheet file.
You can also find a lot of other mapping resources specific to Australia at:
https://www.ga.gov.au/scientific-topics/positioning-navigation/australian-geospatial-reference-system/agrstoolsandmodels
For World data I’m looking for where I got it from. It might have been:
https://www.arcgis.com/index.html
but free data from there seems quite restricted now.
LikeLike
The file is missing Australian data … it just has a 4 pt. spherical area example.
LikeLike
Now fixed. The new file is 442,362 kB. Let me know if any problems.
LikeLike
Thanks
LikeLike