GithubHelp home page GithubHelp logo

unickq / yandexgeocoder Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 26 KB

.NET wrapper of YandexGeocoder - the Yandex API for converting geographical coordinates to an address and back.

Home Page: https://tech.yandex.com/maps/geocoder/

License: MIT License

C# 100.00%
geocoder yandex-geocoder yandex-maps yandex geo-search geodata geocoding

yandexgeocoder's Introduction

Yandex Geocoder .NET wrapper

.NET API for converting geographical coordinates to an address and back.

Build:

Build status Test status

Download (NuGet):

NuGet YandexGeocoder

About:

Yandex Geocoder service can get the coordinates and other information about an object using its name or address, as well as the opposite, using the coordinates of an object to get its address (reverse geocoding).

For example, the geocoder receives the request “Türkiye, İstanbul, Kartal, Esentepe, Aydos Sokak, 32” and returns the geographical coordinates of this building: “29.198184 40.900640” (longitude, latitude). Conversely, if the request contains the geographical coordinates of the building “29.198184 40.900640”, the geocoder will return the address.

Note: Free version supports 25000 requests per day. Also not all countries supported - read geocoder documentation.

Example:

var geocoder = new YandexGeocoder {
    SearchQuery = "Kyiv, Ukraine, Maydan Nezalezhnosti",
    Results = 1,
    LanguageCode = LanguageCode.en_US
};
Console.WriteLine(geocoder.GetResults().First());
Output:
AddressLine: Kyiv, Nezalezhnosti Square
AdministrativeAreaName: Kyiv
CountryName: Ukraine
CountryCode: UA
Text: Ukraine, Kyiv, Nezalezhnosti Square
Kind: street
Name: Nezalezhnosti Square
Description: Kyiv, Ukraine
Point: 30.523846,50.450131
PointLowerCorner: 30.521681,50.448904
PointUpperCorner: 30.526056,50.451514

yandexgeocoder's People

Contributors

elcooleperco avatar u7nk avatar unickq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

elcooleperco u7nk

yandexgeocoder's Issues

Null reference exception when SearchQuery is "Зейский государственный природный заповедник"

image

Exception:

System.NullReferenceException : Object reference not set to an instance of an object.
   at Yandex.Geocoder.YandexResponse..ctor(GeoObject geoObject) in C:\src\YandexGeocoder\YandexGeocoder\src\YandexResponse.cs:line 34
   at Yandex.Geocoder.YandexGeocoder.<>c.<GetResultsAsync>b__26_0(FeatureMember geoObject) in C:\src\YandexGeocoder\YandexGeocoder\src\YandexGeocoder.cs:line 111
   at System.Linq.Enumerable.SelectListIterator`2.ToList()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Yandex.Geocoder.YandexGeocoder.GetResultsAsync() in C:\src\YandexGeocoder\YandexGeocoder\src\YandexGeocoder.cs:line 110
   at Yandex.Geocoder.Tests.BasicTests.NullReferenceOnCountryNullQuery() in C:\src\YandexGeocoder\YandexGeocoder.Tests\BasicTests.cs:line 26
   at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
   at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaitable)
   at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
   at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork()

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.