<commit_before>#Generic C# GeoCoding API

Includes a model and interface for communicating with three popular Geocoding providers.  Current implementations include:

  * [Google Maps](https://developers.google.com/maps/) - [docs](https://developers.google.com/maps/documentation/geocoding/)
  * [Yahoo! BOSS Geo Services](http://developer.yahoo.com/boss/geo/) - [docs](http://developer.yahoo.com/geo/placefinder/guide/index.html)
  * [Bing Maps (aka Virtual Earth)](http://www.microsoft.com/maps/) - [docs](http://msdn.microsoft.com/en-us/library/ff701715.aspx)

The API returns latitude/longitude coordinates and normalized address information.  This can be used to perform address validation, real time mapping of user-entered addresses, distance calculations, and much more.

See latest [release notes](https://github.com/chadly/Geocoding.net/wiki/Release-Notes).

##Installation

Install via nuget:

```
Install-Package Geocoding.net
```

Or download the [latest release](https://github.com/chadly/Geocoding.net/releases) and add a reference to `Geocoding.dll` in your project.

##Simple Example

```csharp
IGeoCoder geoCoder = new GoogleGeoCoder() { ApiKey = "this-is-my-optional-google-api-key" };
Address[] addresses = geoCoder.GeoCode("123 Main St");
```

It can also be used to return address information from latitude/longitude coordinates (aka reverse geocoding):

```csharp
IGeoCoder geoCoder = new YahooGeoCoder("consumer-key", "consumer-secret");
Address[] addresses = geoCoder.ReverseGeoCode(38.8976777, -77.036517);
```

###More Examples

A more in-depth runnable example can be found in the [examples folder](https://github.com/chadly/Geocoding.net/tree/master/examples) of this repository. Download it and run locally.


##API Keys

Google allows anonymous access to it's API, but if you start hitting rate limits, you must [sign up for a new Server API Key](https://developers.google.com/maps/documentation/javascript/tutorial#api_key).

Bing [requires an API key](http://msdn.microsoft.com/en-us/library/ff428642.aspx) to access its service.

You will need a [consumer secret and consumer key](http://developer.yahoo.com/boss/geo/BOSS_Signup.pdf) (PDF) for Yahoo.


##How to Build from Source

In order to compile the solution in Visual Studio, you must first run build.bat. This will run a basic Debug build without running any tests. The build process generates some files that are needed to compile in Visual Studio.

### Service Tests
You will need to generate API keys for each respective service to run the service tests. Edit App.config in the Tests project and put in your API keys.

------------------------------------------

Help support development: `<KEY>`

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/chadly/geocoding.net/trend.png)](https://bitdeli.com/free "Bitdeli Badge")<commit_msg>More tweaks to examples readme<commit_after>#Generic C# GeoCoding API

Includes a model and interface for communicating with three popular Geocoding providers.  Current implementations include:

  * [Google Maps](https://developers.google.com/maps/) - [docs](https://developers.google.com/maps/documentation/geocoding/)
  * [Yahoo! BOSS Geo Services](http://developer.yahoo.com/boss/geo/) - [docs](http://developer.yahoo.com/geo/placefinder/guide/index.html)
  * [Bing Maps (aka Virtual Earth)](http://www.microsoft.com/maps/) - [docs](http://msdn.microsoft.com/en-us/library/ff701715.aspx)

The API returns latitude/longitude coordinates and normalized address information.  This can be used to perform address validation, real time mapping of user-entered addresses, distance calculations, and much more.

See latest [release notes](https://github.com/chadly/Geocoding.net/wiki/Release-Notes).

##Installation

Install via nuget:

```
Install-Package Geocoding.net
```

Or download the [latest release](https://github.com/chadly/Geocoding.net/releases) and add a reference to `Geocoding.dll` in your project.

##Simple Example

```csharp
IGeoCoder geoCoder = new GoogleGeoCoder() { ApiKey = "this-is-my-optional-google-api-key" };
Address[] addresses = geoCoder.GeoCode("123 Main St");
```

It can also be used to return address information from latitude/longitude coordinates (aka reverse geocoding):

```csharp
IGeoCoder geoCoder = new YahooGeoCoder("consumer-key", "consumer-secret");
Address[] addresses = geoCoder.ReverseGeoCode(38.8976777, -77.036517);
```

###More Examples

A more in-depth runnable example of how this library can be integrated into an MVC4 application can be found in the [examples folder](https://github.com/chadly/Geocoding.net/tree/master/examples) of this repository. Download it and run locally.


##API Keys

Google allows anonymous access to it's API, but if you start hitting rate limits, you must [sign up for a new Server API Key](https://developers.google.com/maps/documentation/javascript/tutorial#api_key).

Bing [requires an API key](http://msdn.microsoft.com/en-us/library/ff428642.aspx) to access its service.

You will need a [consumer secret and consumer key](http://developer.yahoo.com/boss/geo/BOSS_Signup.pdf) (PDF) for Yahoo.


##How to Build from Source

In order to compile the solution in Visual Studio, you must first run build.bat. This will run a basic Debug build without running any tests. The build process generates some files that are needed to compile in Visual Studio.

### Service Tests
You will need to generate API keys for each respective service to run the service tests. Edit App.config in the Tests project and put in your API keys.

------------------------------------------

Help support development: `1K33yhGwx3zLopyJuAHWDn8XrMjM6Twwr8`

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/chadly/geocoding.net/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
{'fraction_non_alphanumeric': 0.12467532467532468, 'fraction_numerical': 0.014199134199134199, 'mean_word_length': 4.500952380952381, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 16, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4453087', 'n_tokens_mistral': 1842, 'n_tokens_neox': 1684, 'n_words': 564}