pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/Necrolis/GeoSharp

GitHub - Necrolis/GeoSharp: An offline Geocoding library for C# · GitHub
Skip to content

Necrolis/GeoSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoSharp

An offline Geocoding library for .Net coded in C#. Based on the awesome Java lib by AReallyGoodName: https://github.com/AReallyGoodName/OfflineReverseGeocode You may also be interested in https://github.com/RobThree/NGeoNames (also under MIT).

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.
  • Here 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 datasets and filtering out places or areas that are not of interest (like water bodies) can be used to improve load speed and reduce memory usage.

Filtering of data can be done offline using the GeoDBOptimize class to create tailored geoname tables.

Usage

Load a database from a file

GeoSharp.ReverseGeoCode geocode = new GeoSharp.ReverseGeoCode(@"C:\allCountries.txt", true);
Console.WriteLine(geocode.NearestPlaceName(40.730885, -73.997383));

Load a database from a Stream

using (MemoryStream ms = new MemoryStream(MemoryDB))
{
	GeoSharp.ReverseGeoCode geocode = new GeoSharp.ReverseGeoCode(ms, true);
	Console.WriteLine(geocode.NearestPlaceName(40.730885, -73.997383));
}

License

Licensed under The MIT License.

About

An offline Geocoding library for C#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy