Geocode
A library of utility functions related to geo-coordinates used across a few different projects.
Provides functions for performing common activities such as:
Calculate distance between two coordinates using Vincenty's formula.
Check if a point falls within a bounding polygon.
Look up the street address for a specified geo-coordinate using positionstack.
Look up the geo-coordinate for a specified street address using positionstack.
Compute the centroid of a set of geo-coordinates.
Cluster a set of coordinates using k-means algorithm.
Convert coordinates into Open Location Code.
A simple shell application (geocodesh
) is also available for quickly invoking some of the interfaces provided by the library. Please note that operations involving use of the positionstack API needs an environment variable POSITION_STACK_KEY
to be set with the API key.
Examples
Examples of the library and CLI utility.
CLI

Library
Build
Build the library using cmake: