Giter Site home page Giter Site logo

pooch11 / genegenie.geocoder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thegenegenieproject/genegenie.geocoder

0.0 2.0 0.0 130 KB

Geocoder for .Net Standard that uses multiple backend geocoder services.

License: GNU Affero General Public License v3.0

C# 99.58% Batchfile 0.42%

genegenie.geocoder's Introduction

GeneGenie.Geocoder

A .Net standard geocoder library that can query multiple backend geocoders and rotate between them (briefly named Neocoder, GeneGenie.Geocoder is the new name for the project).

Currently supports Google and Bing geocoder APIs.

Status

AppVeyor branch NuGet AppVeyor tests

Quickstart

See the GeneGenie.Geocoder.Console project for an example of the following. Set your Google and Bing geocoder API keys in appsettings.json. Register the geocoder for use with .Net Core Dependency Injection via;

        // This gets the geocoder settings out of your configuration file.
        var appSettings = configuration.GetSection("App").Get<AppSettings>();

        // Register the settings and Neocoder.
        return new ServiceCollection()
            .AddSingleton(appSettings.GeocoderSettings)
            .AddGeocoders()
            .BuildServiceProvider();

In your main code

            // Normally you'd get this injected via DI.
            var geocodeManager = serviceProvider.GetRequiredService<GeocodeManager>();

            var geocoded = await geocodeManager.GeocodeAddressAsync(address);

Running multiple instances

If using this library in a multi-process environment (such as serverless functions or a webfarm) then you'll need to implement your own Geocoder selector with the interface IGeocoderSelector. The class you implement would need to figure out what geocoder to select next based on what was used previously by accessing a shared resource (Redis, database layer etc), This would typically involve a locking fetch / update on the resource. See InMemoryGeocoderSelector.cs for ideas.

Code quality

Maintainability Quality gate Bugs Vulnerabilities Code smells Coverage Duplications Reliability Security Security Lines of code

Build stats

Contributing

We would love your help, see Contributing.md for guidelines.

genegenie.geocoder's People

Contributors

ryanoneill1970 avatar

Watchers

James Cloos avatar Adam avatar

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.