inquisitorjax / wibci.countryreversegeocode Goto Github PK
View Code? Open in Web Editor NEWOffline reverse geocode a country or american state based on location point (latitude ; longitude)
License: MIT License
Offline reverse geocode a country or american state based on location point (latitude ; longitude)
License: MIT License
This is a great source of finding Country by Longitude and Latitude. Is there are possibility/intention of making this more detailed by adding cities?
Like it is now for country:
LocationInfo countryResult = GeocodeService.FindCountry(location);
Would be great to have city support:
LocationInfo cityResult = GeocodeService.FindCity(location);
All cities support maybe too much, but at least most major once.
Hi,
seems to me that the longitude and latitude are reversed somewhere, I take a point in the middle of the Switzerland country polygon,
GeoLocation myloc = new GeoLocation { Latitude = 46.74, Longitude = 8.48 };
should return Switzerland, but I get Somaliland instead,
if I reverse latitude and longitude:
GeoLocation myloc = new GeoLocation { Latitude = 8.48, Longitude = 46.75 };
I get the expected answer, Switzerland
I try get info by this coordinates but its not find it
Lon
40.587502313216
lat
50.064546356068
GeoLocation country = new GeoLocation {Longitude = lon, Latitude = lat};
CountryReverseGeocodeService _service = new CountryReverseGeocodeService();
var info = _service.FindCountry(country);
I just updated the library from Nuget to version 2.1.0, and it started to fail.
After a debug session, I figured out that the library at Nuget is not based on actual repository code.
I'm having this error message from a CultureNotFound exception:
Culture is not supported. (Parameter 'culture')\n4096 (0x1000) is an invalid culture identifier.
The problem seems to be that the library is calling FetchCurrencySymbol method, that is not part of the repository.
Probably the nuget package is based on some changes you're testing, but I can confirm to you that it's giving problems with Fedora Linux and .net core 3.1. I had those problems previously because I was looking for a region by its LCID, the solution is to uset the REGION NAME instead of REGION LCID.
Example:
// This fails
RegionInfo region = new RegionInfo(culture.LCID);
// This works
RegionInfo region = new RegionInfo(culture.Name);
Is it possible to update the nuget version with actual source code (that do works because it doesn't have the FetchCurrencySymbol, or in other case update the source code and fix this issue to avoid crashes in Linux distributions?
Thanks!
I came across this specific lat/long coordinate that returns null instead of California (it is in SF).
Probably there are inaccuracies in the polygon data.
I see that the original project is shipped under MIT. Is this shipped under MIT as well? If so, can you add the license file? Thank you!
Exception: System.Globalization.CultureNotFoundException: Culture is not supported. (Parameter 'culture')
4096 (0x1000) is an invalid culture identifier.
at System.Globalization.CultureData.GetCultureData(Int32 culture, Boolean bUseUserOverride)
at System.Globalization.RegionInfo..ctor(Int32 culture)
at Wibci.CountryReverseGeocode.CountryReverseGeocodeService.<>c.b__2_0(CultureInfo x)
at System.Linq.Enumerable.SelectArrayIterator2.ToList() at Wibci.CountryReverseGeocode.CountryReverseGeocodeService.FetchCurrencySymbol(String threeLetterISO) at Wibci.CountryReverseGeocode.CountryReverseGeocodeService.FindLocationInfo(GeoLocation location, AreaData data, List
1 coordinates)
at Wibci.CountryReverseGeocode.CountryReverseGeocodeService.FindAreaData(GeoLocation location, List`1 jsonDataList)
at Wibci.CountryReverseGeocode.CountryReverseGeocodeService.FindCountry(GeoLocation location)
https://stackoverflow.com/questions/41851613/culture-is-suddenly-not-supported-anymore-on-azure-web-app/41879861#41879861
https://andrewlock.net/dotnet-core-docker-and-cultures-solving-culture-issues-porting-a-net-core-app-from-windows-to-linux/
Co-ordinates given near to the Sea is not getting Identified.
Long Lat
US -122.402194 47.300385
US -73.967911 40.591473
US -73.991833 40.693588
US -81.4614137 30.634195
US -73.99889 40.591781
US -73.97161 40.60922
US -73.97161 40.60922
US -82.76768 28.19649
US -80.330018 27.574174
US -74.43718 39.37761
BM -64.69583333 32.37027126
US -122.494706 47.213552
Can you please check. I tried but not able to get to the point.
I beleive you mixed the lat and long values.
For Hungary for example 47;18 gives Saudi Arabia, which is 18;47
This may answer the Russia problem also.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.