![]() Hence, study the procedure detailed below. Here we will Convert Lat Long to UTM using some functions of the VBA language. VBA is used to execute various operations, and different user types operate the programming language for multiple purposes. Microsoft has created the Visual Basic for Application (VBA) programming language. Transform Lat Long to UTM Through Excel VBA The mathematical expression gives the values – Ģ. ![]() If latitude > choose Insert > click on Module > paste the below code > Save.įunction CalculateUTMZone(latitude As Double, longitude As Double) As StringĬalculateUTMZone = utmZone & LatitudeBandįunction GetLatitudeBand(latitude As Double) As Stringįirst, choose cell D5 > insert the following formula > drag the Fill Handle icon to D13.įor this formula to make sense, you need to know how to use the following Excel functions: Likewise, Open VBA Editor > choose Insert > click on Module > paste the following code > Save.įunction CalculateUTMNorthing(latitude As Double, longitude As Double) As Double Likewise, the CalculateUTMNorthing function takes Lat and Long and returns UTM Northing. Here, we will develop another function to calculate UTM Northing. UTMEasting = ScaleFactor * N * (A + (1 - T + C) * A ^ 3 / 6 + (5 - 18 * T + T ^ 2 + 72 * C - 58 * EccentricitySquared) * A ^ 5 / 120) + 500000ĬalculateUTMEasting = Format(UTMEasting, "0.00")ġ.2 User-defined Function for UTM Northing Later, choose Insert > click on Module > paste the following code > Save.įunction CalculateUTMEasting(latitude As Double, longitude As Double) As DoubleĬentralMeridian = (utmZone - 1) * 6 - 180 + 3 ![]() This function will take latitude and longitude values and return UTM Easting.įirst, navigate to Developer > click on Visual Basic. We will create a function named CalculateUTMEasting. Step 1: Implement Excel VBA Functions to Find UTM 1.1 User-defined Function for UTM Easting To achieve this, we must develop some Excel VBA user-defined functions. We will find the UTM Easting, UTM Northing, and UTM Zone from these Lat & Long values. Here, we consider some latitude (Lat) and longitude (Long) values. Sometimes, only N or S is added after the zone number to show the North or South hemisphere.Ĭonvert Lat Long to UTM in Excel: Step-by-step Procedures A grid zone comprises both a location and a band of latitude. The UTM system divides the Earth into 60 zones, each covering 6° longitude. Like the old way of using latitude and longitude, this is a horizontal way to show where you are. ![]() The Universal Transverse Mercator ( UTM) is a way to project maps and give coordinates to places on Earth’s surface.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |