Code Monkey home page Code Monkey logo

simplelatlng's People

simplelatlng's Issues

Calculate initial bearing

I'd like to see the addition of calculation of initial bearing from one LatLng 
to another. I need this along with distance and calculated it using the 
forumula given here http://williams.best.vwh.net/avform.htm and (in Javascript) 
here http://www.movable-type.co.uk/scripts/latlong.html.

I'm not sure it's worth the trouble, but there could be some optimization when 
calculating both distance and initial bearing since both calculations need some 
of the same intermediate values (including at least the radian-converted 
latitudes of each LatLng and the cosines of each of those values).

If you'd be interested in having this in the library I may be able to 
contribute a patch.

Original issue reported on code.google.com by [email protected] on 7 Oct 2011 at 9:11

Slow LatLng.hashCode() performance

The LatLng.hashCode() use formatting, string concatenation and 
String.hashCode() to produce hash code for LatLng with good distribution.

However, this is slow and takes time even when there is no changes to the 
LatLng value.

A simple way to improve it is by caching the hash code instead of 
recalculation, similar to the way String.hashCode() works.

See this as a suggested solution: 
https://code.google.com/r/hagaishatz-fasthash/source/browse/src/main/java/com/ja
vadocmd/simplelatlng/LatLng.java

Thanks.


Original issue reported on code.google.com by [email protected] on 6 May 2014 at 3:48

localization issue on LatLng.toString()

The following JUnit fails :
Locale.setDefault(Locale.FRANCE);
assertEquals("(6.123456,45.123456)", new  LatLng(6.123456, 
45.123456).toString());

The decimal separator is localized to ','
The result is then "(6,123456,45,123456)" which is confusing.

I would suggest the following fixe on LatLngConfig:34
public static final NumberFormat DEGREE_FORMAT = new DecimalFormat(
            "0.000000", new DecimalFormatSymbols(Locale.US)); 
instead of :
public static final NumberFormat DEGREE_FORMAT = new DecimalFormat(
            "0.000000"); 

BTW: DecimalFormat.format is not thread safe, you may consider creating a new 
DecimalFormat object on each format use. 


Original issue reported on code.google.com by [email protected] on 18 Jun 2013 at 8:50

geohash

Any chanse this will be merged with http://github.com/kungfoo/geohash-java?

Original issue reported on code.google.com by [email protected] on 2 Nov 2010 at 3:00

geohash implementation issue : decode(hash(X)) != X

The following JUnit fails :
assertEquals(new LatLng(44.869797, 6.599944), 
Geohasher.decode(Geohasher.hash(new LatLng(44.869797, 6.599944))));

I was assuming that Geohasher.decode(Geohasher.hash(X))) equals X. Is that true 
? 
The geohash precision is the default 12 characters. 
simplelatlng-1.1.0.

It may be a rounding issue, as the computed latitude from geohash decode, 
before new Latlng(x, y) is  44.869,796,94105685 and expected result is 
44.869,797. see Geohash.decode:83.

Best regards,
-Leo

Original issue reported on code.google.com by [email protected] on 5 Jun 2013 at 7:40

LatLng not serializable

Currently the class LatLng doesn't implement Serializable although with only 
two long field to it there is not reason why it shouldn't.
All it need is a simple "implements java.io.Serializable"

It would be helpful in several ways, especially for persistence purposes as in 
my case, tomcat session and session attribute persistence between server 
restarts. Non serializable session attributes cannot be handled and throw a 
java.io.NotSerializableException.


Would it be possible to include this in a minor release, like 1.0.1?

Cheers, Andy



Original issue reported on code.google.com by [email protected] on 9 Sep 2011 at 10:01

CircularWindow.filter() to return sorted collection

What steps will reproduce the problem?
Say I am using CircularWindow.filter()/filterCopy() to get the filtered points. 
I would like to have these points in sorted order close to the actual 
CircularWindow object. Currently the filter returns the CircularWindow 
containing points in the same order as the Collection passed in filter(). I 
have to recheck the distance for each of these points to the actual 
CircularWindow point and reorder. This affects the performance if I have many 
records.

What is the expected output? What do you see instead?
I would like to have the filtered collection is a sorted order of the distance 
along with the distance value(may be a new method in LatLng class, that can 
return the distance).

What version of the product are you using? On what operating system?
1.1.0, WinXP and Linux

Please provide any additional information below :
I'm not sure it's worth the trouble.

Original issue reported on code.google.com by [email protected] on 11 May 2013 at 2:09

Mavenize

Any chance to see this lib in some maven repo?

Original issue reported on code.google.com by [email protected] on 2 Nov 2010 at 3:01

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.