<commit_before>GeoSharp
========

An offline Geocoding library for .Net coded in C#.
Based on the awesome Java lib by AReallyGoodName: https://github.com/AReallyGoodName/OfflineReverseGeocode

## Requirements

This library is built for .Net 4, however it should work fine with 3.5 and Mono.
The data that is fed in needs to be in the geoname format as described [here](http://download.geonames.org/export/dump/readme.txt).
[Here](http://download.geonames.org/export/dump/) you'll find various sets of data to use for the geocoding.

## Performance

The look ups are very fast, `O(logn)`, however building the initial KD-Tree is not so fast, `O(kn * logn)`),
so pre-selecting your initial datasets and filtering out minor places can be used to improve load speed and reduce
memory usage.

## Usage

Load a database from a file
```cs
GeoSharp.ReverseGeoCode geocode = new GeoSharp.ReverseGeoCode(@"C:\allCountries.txt", true);
Console.WriteLine(geocode.NearestPlaceName(40.730885, -73.997383));
```

Load a database from a `Stream`
```cs
using (MemoryStream ms = new MemoryStream(MemoryDB))
{
	GeoSharp.ReverseGeoCode geocode = new GeoSharp.ReverseGeoCode(, true);
	Console.WriteLine(geocode.NearestPlaceName(40.730885, -73.997383));
}
```

## License<commit_msg>Tidied up the README.md a little<commit_after>GeoSharp
========

An offline Geocoding library for .Net coded in C#.
Based on the awesome Java lib by AReallyGoodName: https://github.com/AReallyGoodName/OfflineReverseGeocode

## Requirements

- This library is built for .Net 4, however it should work fine with 3.5 and Mono.
- The data that is fed in needs to be in the `geoname` format as described [here](http://download.geonames.org/export/dump/readme.txt).
- [Here](http://download.geonames.org/export/dump/) you'll find various sets of formatted data to use for the reverse geocoding.

## Performance

The look ups are very fast, `O(logn)`, however building the initial KD-Tree is not so fast, `O(kn * logn)`),
so pre-selecting your initial datasets and filtering out minor places can be used to improve load speed and reduce
memory usage.

## Usage

Load a database from a file
```cs
GeoSharp.ReverseGeoCode geocode = new GeoSharp.ReverseGeoCode(@"C:\allCountries.txt", true);
Console.WriteLine(geocode.NearestPlaceName(40.730885, -73.997383));
```

Load a database from a `Stream`
```cs
using (MemoryStream ms = new MemoryStream(MemoryDB))
{
	GeoSharp.ReverseGeoCode geocode = new GeoSharp.ReverseGeoCode(, true);
	Console.WriteLine(geocode.NearestPlaceName(40.730885, -73.997383));
}
```

## License
{'fraction_non_alphanumeric': 0.11219322165952474, 'fraction_numerical': 0.027269185820023373, 'mean_word_length': 4.958236658932715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '1284328', 'n_tokens_mistral': 906, 'n_tokens_neox': 806, 'n_words': 284}