private static double [ ] randomLatitudeLongitude ( Random r ) { // Make marginally more realistic looking data by non-uniformly sampling // latitude, since Earth is a sphere, and there is not much at the poles double lat = Math . pow ( 1. - r . nextDouble ( ) * 2. , 2 ) / 2. * 180 ; double lng = ( .5 - r . nextDouble ( ) ) * 360. ; return new double [ ] { lat , lng } ; }
Generate random coordinates .