Skip to content

.NET toolkit that provides the utility functions for performing various tasks such as geocoding, reverse coding, country code translation, geo distance calculation, etc.

License

Notifications You must be signed in to change notification settings

cschen1205/cs-geo-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cs-geo-tools

.NET toolkit that provides the utility functions for performing various tasks such as geocoding, reverse coding, country code translation, geo distance calculation, etc.

Install

Install-Package cs-geo-tools

Usage

using System;
namespace GeoTools
{
    class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine(CountryCodeManager.Instance.GetCountryNameByCode("us"));
            string address = "NTU, Singapore";
            double lat, lng;
            GeoTool.FindLatLngByAddress(address, out lat, out lng);
            Console.WriteLine("{0} is at ({1}, {2})", address, lat, lng);
            string address2 = "NUS, Singapore";
            double lat2, lng2;
            GeoTool.FindLatLngByAddress(address2, out lat2, out lng2);
            Console.WriteLine("{0} is at ({1}, {2})", address2, lat2, lng2);
            Console.WriteLine("{0} is {1} away from {2}", address, GeoTool.GetDistance_km(lat, lng, lat2, lng2), address2);
        }
    }
}

About

.NET toolkit that provides the utility functions for performing various tasks such as geocoding, reverse coding, country code translation, geo distance calculation, etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages