Code Monkey home page Code Monkey logo

geolocation's People

Contributors

dependabot[bot] avatar jchristn avatar jfmg avatar rschiefer avatar scottschluer avatar shakuskyleigh avatar shinjiyoshida avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geolocation's Issues

Remove default rounding behavior in GetDistance

First, thanks for creating this great library!

Today, GetDistance accepts a decimalPlaces parameter which defaults to 1. I find this unintuitive from an API perspective; if I want to do rounding on the value I can easily do it myself after calling GetDistance, I would not expect that method to do it for me. I definitely would not expect it to round to 1 decimal place; that feels arbitrary to me especially when we support different distance units and so 1 decimal place implies many different levels of precision.

Another oddity with this is that the library uses .NET's default "banker's rounding" under the hood (MidpointRoundingMode.ToEven), which doesn't feel like an appropriate choice for coordinate math (I would use AwayFromZero).

My suggestion would be to take a breaking change and simply remove the rounding behavior from GetDistance. Consumers can easily call Math.Round themselves on the result if they so desire.

How accurate is it?

I checked with google maps for getting a distance in a straight line from point A to B in kilometers and it was accurate to 2 decimal points. Google doesn't seem to return more than 2 numbers after the "." so I have came here to ask.
Is it accurate to a meter?

Submit to NuGet

Hi Scott,

Thanks for making this code public. Any interest in submitting this to NuGet? Happy to help if you're open to it!

Cheers
Joel

International System of Units -> Km (not Miles)

Why american's developers only calculate distance with miles and never think about all the rest of the "standardized-world-developers" ?

Please, use the ISU (International System of Units) by default... it has been released in 1960... so any length must be expressed in meters (or cm/Km/...)

https://en.wikipedia.org/wiki/International_System_of_Units

And if you want to add an overload/option to get the result on miles, I'm not against ;-)
(For example, MAUI Location Extension ask the unit (Km or Miles) in parameter : https://www.andreasnesheim.no/calculating-distance-between-your-device-and-a-location-with-net-maui/)

Some rockets have already exploded in the past for this kind of imperial units problems... with unfortunate human deaths.

True Bearing vs. Magnetic

Hello,

I'd like to make a request for the bearing method to return both true and magnetic bearing.

Thanks

DLL not signed

Hi all,

If you have time, would you please sign the DLL?

Thanks,
Have a nice day,

Nuget package causes build warnings if used by .NET Core applications

Hi,

This library is really great and easy to use - so first thank you.

It's not a big deal, but when referencing the package downloaded from NuGet, I receive this warning when building my project.

Warning	NU1701	Package 'Geolocation 1.1.1' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project.

This is a shame because I see that there already is a project which is based upon .NET Standard. This issue could be fixed if the files inside the NuGet package were just rebuild targeting the .NET Standard.

Thanks,
Andrew

Licensing

What is the licensing of this code?

[Feature Request] Return coordinate based on Source + Distance + Bearing

Looking for a nice small C# library for GIS stuff and this package looks very promising.

Would it be possible to add a method that returns a Coordinate based on a source + distance + bearing? e.g.

Coordinate origin = new Coordinate(34.0675918, -118.3977091);
double bearing = 124; // Degrees
double distance = 10000; // Meters
Coordinate destination = GeoCalculator.GetCoordinate(origin, bearing, distance);

I can probably implement this myself using https://adhamhurani.blogspot.com/2010/08/c-how-to-add-distance-and-calculate-new.html and submit a pull request if this is an acceptable feature (and could you let me know the method name you would prefer?)

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.