How To Install GeographicLib on CentOS 8

GeographicLib is Library for geographic coordinate transformations

Introduction

In this tutorial we learn how to install GeographicLib on CentOS 8.

What is GeographicLib

GeographicLib is a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local Cartesian coordinates, for gravity (e.g., EGM2008), geoid height and geomagnetic field (e.g., WMM2010) calculations, and for solving geodesic problems. The emphasis is on returning accurate results with errors close to round-off (about 5\u201315 nanometers). New accurate algorithms for Geodesics on an ellipsoid of revolution and Transverse Mercator projection have been developed for this library. The functionality of the library can be accessed from user code, from the Utility programs provided, or via the Implementations in other languages.

We can use yum or dnf to install GeographicLib on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install GeographicLib.

Install GeographicLib on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install GeographicLib using dnf by running the following command:

sudo dnf -y install GeographicLib

Install GeographicLib on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install GeographicLib using yum by running the following command:

sudo yum -y install GeographicLib

How To Uninstall GeographicLib on CentOS 8

To uninstall only the GeographicLib package we can use the following command:

sudo dnf remove GeographicLib

GeographicLib Package Contents on CentOS 8

/usr/bin/CartConvert
/usr/bin/ConicProj
/usr/bin/GeoConvert
/usr/bin/GeodSolve
/usr/bin/GeodesicProj
/usr/bin/GeoidEval
/usr/bin/Gravity
/usr/bin/MagneticField
/usr/bin/Planimeter
/usr/bin/RhumbSolve
/usr/bin/TransverseMercatorProj
/usr/lib/.build-id
/usr/lib/.build-id/0a
/usr/lib/.build-id/0a/a220c27415ed2b9740c49108f4ba2d0a7ba1dc
/usr/lib/.build-id/0d
/usr/lib/.build-id/0d/eea7344d3286913adaea5b09a6a991e2448f90
/usr/lib/.build-id/24
/usr/lib/.build-id/24/1047e3a0075fed7ea1debbf38f60a11f889df3
/usr/lib/.build-id/25
/usr/lib/.build-id/25/ebd959035ff30f380dbb57c865e226a8c88dbb
/usr/lib/.build-id/40
/usr/lib/.build-id/40/d177d6f75dd3a93363ff0e7e85b72e2c485aec
/usr/lib/.build-id/47
/usr/lib/.build-id/47/408edc5f3be908b9fbff3808e28a4225fe9dcb
/usr/lib/.build-id/56
/usr/lib/.build-id/56/dd96b4c041b22a529e7d2c7aa95e5767c80dd9
/usr/lib/.build-id/5d
/usr/lib/.build-id/5d/4506be84264aa5770c1e78b6e330b40dc63c1f
/usr/lib/.build-id/9d
/usr/lib/.build-id/9d/1b0623fd8197ebace596fa468b4a17c6aa348a
/usr/lib/.build-id/a5
/usr/lib/.build-id/a5/2ca904a99e9e14de4e9be7195e6a7c71817fd0
/usr/lib/.build-id/ad
/usr/lib/.build-id/ad/2e85b01f52b907a4d4d7ef7aab272184c259a8
/usr/lib/.build-id/d3
/usr/lib/.build-id/d3/32afbdccaea3332f0916d618d359e3f8df8838
/usr/lib64/libGeographic.so.19
/usr/lib64/libGeographic.so.19.0.1
/usr/sbin/geographiclib-get-geoids
/usr/sbin/geographiclib-get-gravity
/usr/sbin/geographiclib-get-magnetic
/usr/share/GeographicLib
/usr/share/doc/GeographicLib
/usr/share/doc/GeographicLib/AUTHORS
/usr/share/doc/GeographicLib/NEWS
/usr/share/licenses/GeographicLib
/usr/share/licenses/GeographicLib/LICENSE.txt
/usr/share/man/man1/CartConvert.1.gz
/usr/share/man/man1/ConicProj.1.gz
/usr/share/man/man1/GeoConvert.1.gz
/usr/share/man/man1/GeodSolve.1.gz
/usr/share/man/man1/GeodesicProj.1.gz
/usr/share/man/man1/GeoidEval.1.gz
/usr/share/man/man1/Gravity.1.gz
/usr/share/man/man1/MagneticField.1.gz
/usr/share/man/man1/Planimeter.1.gz
/usr/share/man/man1/RhumbSolve.1.gz
/usr/share/man/man1/TransverseMercatorProj.1.gz
/usr/share/man/man8/geographiclib-get-geoids.8.gz
/usr/share/man/man8/geographiclib-get-gravity.8.gz
/usr/share/man/man8/geographiclib-get-magnetic.8.gz

References

Summary

In this tutorial we learn how to install GeographicLib on CentOS 8 using yum and dnf.