Java, convert lat/lon to UTM [closed]

No Library, No Nothing. Copy This! Using These Two Classes , You can Convert Degree(latitude/longitude) to UTM and Vice Versa! private class Deg2UTM { double Easting; double Northing; int Zone; char Letter; private Deg2UTM(double Lat,double Lon) { Zone= (int) Math.floor(Lon/6+31); if (Lat<-72) Letter=”C”; else if (Lat<-64) Letter=”D”; else if (Lat<-56) Letter=”E”; else if (Lat<-48) Letter=”F”; … Read more

Calculating area enclosed by arbitrary polygon on Earth’s surface

There several ways to do this. 1) Integrate the contributions from latitudinal strips. Here the area of each strip will be (Rcos(A)(B1-B0))(RdA), where A is the latitude, B1 and B0 are the starting and ending longitudes, and all angles are in radians. 2) Break the surface into spherical triangles, and calculate the area using Girard’s … Read more

Getting distance between two points based on latitude/longitude

Update: 04/2018: Vincenty distance is deprecated since GeoPy version 1.13 – you should use geopy.distance.distance() instead! The answers above are based on the Haversine formula, which assumes the earth is a sphere, which results in errors of up to about 0.5% (according to help(geopy.distance)). Vincenty distance uses more accurate ellipsoidal models such as WGS-84, and … Read more

tech