Giter Site home page Giter Site logo

grumlimited / geocalc Goto Github PK

View Code? Open in Web Editor NEW
107.0 7.0 40.0 132 KB

Helper classes to calculate Earth distances, bearing, etc.

License: BSD 3-Clause "New" or "Revised" License

Java 100.00%
geodesy java vincenty-formula haversine-formula geocalc distance bearing standpoint azimuth meters

geocalc's People

Contributors

dependabot[bot] avatar dusiema avatar gr211 avatar thomasfischersm 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

geocalc's Issues

Missing jar file in Maven

I've modified my pom.xml to include the dependency as written in your README, but the jar file isn't in maven. The URL for http://repo.maven.apache.org/maven2/com/grum returns a 404 response. Has this code been moved elsewhere?

10/22/14, 11:10:47 AM EDT: [INFO] Downloaded http://repo.maven.apache.org/maven2/com/grum/geocalc/0.1.2/geocalc-0.1.2.pom
10/22/14, 11:10:47 AM EDT: [WARN] The POM for com.grum:geocalc:jar:0.1.2 is missing, no dependency information available
10/22/14, 11:10:48 AM EDT: [INFO] Downloaded http://repo.maven.apache.org/maven2/com/grum/geocalc/0.1.2/geocalc-0.1.2.jar
10/22/14, 11:10:48 AM EDT: [INFO] Using 'UTF-8' encoding to copy filtered resources.
10/22/14, 11:10:48 AM EDT: [INFO] Copying 0 resource
10/22/14, 11:10:48 AM EDT: [INFO] Using 'UTF-8' encoding to copy filtered resources.
10/22/14, 11:10:48 AM EDT: [INFO] Copying 0 resource
10/22/14, 11:11:13 AM EDT: [WARN] The POM for com.grum:geocalc:jar:0.1.2 is missing, no dependency information available

Allow users to use geocalc through Jitpack

I wanted to suggest you to update the readme to offer developers to use geocalc through Jitpack.io

You can see that the project is already available so it might ease the integration process for developers, and for you avoid the culprit of submitting the project on Maven central.

I tried it on one of my local project, and it worked smoothly. You did a great job guys ;)

Compiler say's always method is not public

I wanted to use your lib but getting under JDK16/JDK17 always the following error message:
"toDMSCoordinate() is not public in Coordinate; cannot be accessed from outside package"

The lib is on the classpath and not on the modulepath.

How can I use it ?

Distance calculation incorrect

The distance calculation is only correct for small distances.

import com.grum.geocalc.*;

public class Bug {
    public static void main(String[] args) {
        //Kew, London
        Coordinate lat = new DegreeCoordinate(51.4843774);
        Coordinate lng = new DegreeCoordinate(-0.2912044);
        Point kew = new Point(lat, lng);

        //Buenos Aires, as per wolframalpha.com
        lat = new DegreeCoordinate(34.61);
        lng = new DegreeCoordinate(-58.37);
        Point richmond = new Point(lat, lng);

        double distance = EarthCalc.getDistance(richmond, kew); //in meters 
        System.out.println(distance);
    }
}

As you can see in wolframalpha.com, it is supposed to be more than 11000 Km.
http://www.wolframalpha.com/input/?i=buenos+aires+to+london

Bearing calculation incorrect

standpoint is 31.194326398628462:121.42127048962534
forepoint is 31.194353394639606:121.4212814985147

bearing is 340.76940494442715

but the correct result is 19.213575108209017

Spelling

It seems you have memorized the spelling of haversine incorrectly.

You spell it: haRvesine
While the correct spelling is: haveRsine

Here the wikipedia entry and a dictionary entry as source :Ü™

Publish in Maven Central Repo

Have you thought about publishing the library to Maven's central repository?
I think it is a problem when using the library in a project.

I can help you publish it and automate it with travis.

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.