Decimal Degree To Utm Converter In Excel



Convert from: LLh. Enter lat-lon in decimal degrees. You may change the default UTM and SPC zones, where applicable. I was given an x value of (257139) an a Y value of (206146), Ok now when I set my layer properties to NAd83 Utm Zone 11, i then convert csv to events, i then convert to a shape file with the layers data frame, I now end up somewhere in mexico, this is the first issue. LatLongtoUTM(BaseLatitude, Base Longitude, Latitude, Longitude) Latitude Longitude UTM Base Latitude Base Long Degrees Minutes Seconds Decimal Degrees Minutes Seconds Decimal East North 45.00 123.00 42.00 15.00 4.00 42.25 60.00 60.00 121.00 30.00 10.00 121.50 60.00 529.81 UTMtoLatLong(BaseLatitude, Base Longitude, UTM.

  1. Convert Degrees Decimal Minutes To Utm
  2. Utm To Decimal Degrees Formula
  3. Decimal Degree To Utm Converter In Excel Format
  4. Excel Convert Coordinates To Decimal
  5. Convert Coordinate Degrees To Decimal
  6. Decimal Degree To Utm Converter In Excel Converter
  7. Coordinate Converter Degrees To Decimal
  1. To convert from decimal to DMS: you first need to strip the decimal portion away to be left with the degrees. I use the INT function for this because it rounds the number down to the closest integer. The formula looks like this: =INT(B2) 2. To calculate the minutes, you need the decimal part of the original number times 60.
  2. Excel - LAT/LONG to UTM Converter. ExpExchHelp asked on 2015-02-20. Microsoft Excel; Spreadsheets; 2 Comments. Last Modified: 2015-02-20.

Your primer for converting between varying geolocation systems

Decimal

Location services -- including GPS-based navigation systems and map sites such as Google Maps and Yahoo! Maps -- have become popular among consumers. Many organizations are already making use of location-aware services, and many more will do so as they realize the benefits and potential that these services hold. In 2006, Gartner noted that 'location-aware applications will hit mainstream adoption in the next two to five years' and that already an 'increasing number of organizations have deployed location-aware mobile business applications.'

When an organization decides to implement a location-aware application, it is eventually a developer's task to write such an application. Building a location-aware service involves many tasks, big and small, and one (relatively small) task may be to convert coordinates from one system to another. This article presents code that performs such conversions, which could save you many hours of work.

Two different coordinate systems

Before we dive into this article's code, we need to discuss the coordinate systems that the code is designed to handle: the familiar system of longitude and latitude and the Universal Transverse Mercator (UTM) system. We'll also touch on the Military Grid Reference System (MGRS), which is based on UTM.

Latitude and longitude

The latitude and longitude system is probably the best known way to designate geographic coordinates. It presents a location as two numbers. Latitude is the angle from the center of the Earth to some east-west line on the Earth's surface. Longitude is the angle from the center of the Earth to a north-south line on the Earth's surface. Latitude and longitude may be expressed as decimal degrees (DD) or as degrees, minutes, and seconds (DMS); the latter gives numbers in a format such as 49°30'00' S 12°30'00' E. This is the format typically used in GPS devices.

Earth is divided by the equator (0° latitude) into Northern and Southern Hemispheres and by 0° longitude (an imaginary line from the North Pole to the South Pole that goes through the city of Greenwich in the UK) into Eastern and Western Hemispheres. The Northern Hemisphere has latitudes between 0 and 90 degrees, and the Southern Hemisphere has latitudes between 0 and -90 degrees. The Eastern Hemisphere is between 0 and 180 degrees, and the Western Hemisphere between 0 and -180 degrees.

For example, the coordinates 61.44, 25.40 (in DD) or 61°26'24'N, 25°23'60'E (in DMS) are located in southern Finland. The coordinates -47.04, -73.48 (in DD) or 47°02'24'S, 73°28'48'W (in DMS) are located in southern Chile. Figure 1 shows the Earth overlaid with latitude and longitude lines:

Figure 1. The Earth, with latitude and longitude lines displayed

Universal Transverse Mercator

The UTM coordinate system is a grid-based method for specifying coordinates. The UTM system divides the Earth into 60 zones, each based on the Transverse Mercator projection. Map projection in cartography is a way to present a two-dimensional curved surface on a plane, such as a normal map. Figure 2 shows a Traverse Mercator projection:

Figure 2. A Transverse Mercator projection

The UTM longitude zones are numbered 1 through 60; all but two zones (more on which in a moment) are 6° wide from to east to west. The longitude zones cover the whole surface of the Earth between latitudes 80°S and 84°N.

There are 20 UTM latitude zones, each 8° high; the zones are lettered from C to X (with letters I and O omitted). Zones A, B, Y, and Z exist outside of this system; they cover the Antarctic and Arctic regions. Figure 3 shows UTM zones in Europe. The two nonstandard longitude zones are visible in Figure 3: zone 32V is extended to cover all of southern Norway, while zone 31V is shrunk so that it covers only open water.

Figure 3. UTM zones in Europe

UTM coordinates are presented in the format longitude zone latitude zone easting northing, where easting is the projected distance from longitude zone's central meridian and northing is the projected distance from the equator. The values of both easting and northing are given in meters. For example, the latitude/longitude coordinates 61.44, 25.40 are presented in UTM as 35 V 414668 6812844; the latitude/longitude coordinates -47.04, -73.48 are 18 G 615471 4789269 in UTM.

Military Grid Reference System

The MGRS is the standard used by NATO militaries. MGRS is based on UTM and further divides each zone to 100 km by 100 km squares. These squares are identified by two-letter digraphs: the first letter is the east-west position within the longitude zone and the second letter is the north-south position.

For example, the UTM point 35 V 414668 6812844 is equivalent to the MGRS point 35VMJ1466812844. This MGRS point is accurate within one meter and is presented using 15 characters, where the last 10 characters are the easting and northing values within the specified grid. MGRS may be presented using 15 characters (as in previous example), or 13, 11, 9, or 7 characters; the values so expressed would be accurate within 1, 10, 100, 1,000, or 10,000 meters, respectively.

Converting coordinates

To define latitude and longitude coordinates for a location on the Earth, at minimum, you must be able to see the stars or the Sun and have a sextant and clock that displays time in GMT. You can determine latitude from the angle between a celestial object and the horizon, and you can calculate longitude from the Earth's rotation. This article does not go into these details. Instead, we'll assume that we already have coordinates in DD, DMS, or UTM format.

Converting decimal degrees to degrees/minutes/seconds, and vice versa

It is easy to convert coordinates between DD and DMS. Here's the formula for converting from DD to DMS:

Here, gg is the fractional part of the calculation. Negative latitude denotes a location in the Southern Hemisphere (S) and negative longitude is a location in the Western Hemisphere (W). For example, imagine that you have the coordinates (in DD format) of 61.44, 25.40. You'd convert them as follows:

And:

Thus, in DMS format, the coordinates are 61°26'24'N 25°24'00'E.

The formula to go from DMS to DD is as follows:

Remember, locations in the Southern Hemisphere (S) are at negative latitudes, and locations in the Western Hemisphere (W) are at negative longitudes.

Convert Degrees Decimal Minutes To Utm

Let's convert the DMS coordinates 47°02'24'S, 73°28'48'W to DD notation:

Thus, the coordinates are -47.04, -73.48 in DD.

Converting from latitude/longitude to UTM and vice versa

Unlike decimal coordinates, which you can determine using a sextant and a chronometer, you cannot determine UTM coordinates without calculations. Although these calculations are nothing more than basic trigonometry and algebra, the formulas are very complicated. If you look at 'The Universal Grids: Universal Transverse Mercator (UTM) and Universal Polar Stereographic (UPS)', you'll see what I mean.

The UTM conversion formulas are not presented here, but the source code in the following section provides some light.

Converting coordinates with Java code

This section introduces the source code of a library class that performs coordinate conversion between decimal degrees and UTM. This Java class is named com.ibm.util.CoordinateConversion; my idea was to make a single class that has methods for conversions. The class includes inner classes that actually do the conversion; if necessary, the inner classes can be refactored out from the CoordinateConversion class to create a library package or add classes to existing package. The conversions that the class performs are accurate to within 1 meter.

The source for CoordinateConversion has about 750 lines of code, so it is not presented in this text of this article in its entirety. The relevant methods are described in the following sections, and the full source code is included in the Download section.

CoordinateConversion

CoordinateConversion is the main class and it is instantiated to perform coordinate conversion when required. Listing 1 presents the relevant public methods, along with private inner classes that are included in the CoordinateConversion class:

Listing 1. CoordinateConversion

The next section looks at the latitude/longitude and UTM conversions in more detail.

Conversion from latitude/longitude to UTM

Coordinates are converted from latitude/longitude to UTM with the String latLon2UTM(double latitude, double longitude) method. The method implementation creates a new instance of the inner class LatLon2UTM c = new LatLon2UTM(); and returns UTM coordinates as a 15-character string (that is, to 1-meter precision). The implementation of the LatLon2UTM methods is shown in Listing 2:

Utm To Decimal Degrees Formula

Listing 2. public String convertLatLonToUTM(double latitude, double longitude)

This method performs its conversion by calling various methods to get the latitude and longitude zone and calculating the easting and northing and so on. Input is validated using the validate() method; if the clause (latitude < -90.0 || latitude > 90.0 || longitude < -180.0 || longitude >= 180.0) is true, it throws an IllegalArgumentException.

The setVariables() method in Listing 3 sets various variables required for calculating conversions (take a look at 'The Universal Grids' for more information:

Listing 3. protected void setVariables(double latitude, double longitude)

The getLongZone() method in Listing 4 and the LatZones class (available in the source code) are used to get longitude and latitude zones. The longitude zone is calculated from the longitude parameter, and latitude zones are basically hard coded using an array in the LatZones class.

Listing 4. protected String getLongZone(double longitude)

The getNorthing() (in Listing 5) and getEasting() (in Listing 6) methods calculate the northing and easting values. Both methods use variables that were set in the setVariables() method in Listing 3.

Listing 5. protected double getNorthing(double latitude)
Listing 6. protected double getEasting()

Listing 7 includes some sample output, including some latitude/longitude coordinates and the corresponding UTM coordinates:

Listing 7. Latitude/longitude-to-UTM test values

Conversion from UTM to latitude/longitude

Converting from UTM coordinates to latitude and longitude is a little easier than the reverse process. Again, 'The Universal Grids' includes the formulas for the conversions. Listing 8 shows the code for the convertUTMToLatLong() method. This returns a double array, where the first element (array index [0]) is latitude and second element (array index [1]) is longitude. Because the UTM string parameter has an accuracy of 1 meter, the latitude/longitude coordinates have the same accuracy.

Listing 8. public double[] convertUTMToLatLong(String UTM)

The convertUTMToLatLong() method splits the incoming UTM string (which is in the format 34 G 683473 4942631) and uses the getHemisphere() method to determine the hemisphere that the location denoted by the string is in. Determining the hemisphere is easy: latitude zones A, C, D, E, F, G, H, J, K, L, and M are in the Southern Hemisphere, and the rest are in the Northern Hemisphere.

The setVariables() method, shown in Listing 9, sets the variables required for calculation and then immediately calculates latitude. Longitude is calculated using the longitude zone.

Listing 9. protected void setVariables()

setVariables() uses the easting and northing values to set required variables. These are both class variables and are set in the convertUTMToLatLong(String UTM) method (see Listing 8).

Other methods

The source code also includes other public and private methods and classes. For example, methods and classes to convert coordinates between latitude/longitude and some helper methods to perform degree-to-radian conversions (and vice versa) and for various mathematical operations (such as POW, SIN, COS, and TAN).

Summary

This article introduced a little bit of the theory of world coordinate systems, along with a Java class to perform coordinate transformation. Typically, this theory is not needed in everyday development work -- except in rare cases where there is no good way to do otherwise, as I recently discovered when I encountered a coordinate transformation task.

I needed to perform conversion between latitude and longitude, UTM, and MGRS, and so I did basic research and implemented the transformations in a Java class. For me, the development work took several hours; I hope that you will save those hours for other tasks and that you find CoordinateConversion useful in your own work.

Downloadable resources

  • Coordinate conversion source code (j-coordconvert.zip | 4KB): The download also includes MGRS methods, but conversion from MGRS is incorrect.

Related topics

YouTube tutorial:click

Decimal Degree To Utm Converter In Excel Format

STEP 1:Prepare your workspace by adding an extra column for latitude/longitude directions (here: N and W).

Excel Convert Coordinates To Decimal

STEP 2: Remove negative signs from latitude/longitude (if occurs). To do that, click Ctrl+H and choose a ‘Replace’ option. Type ‘-‘ in ‘Find What” window and then click ‘Replace All’.

STEP 3:Separate degrees from partial degrees

Select cells with latitude values > Click ‘Data’ from menu > Text to Columns > Fixed Width > Next > Create a break lilne (click at the desired position – between degrees and decimal separator) > Next > Finish

Convert degrees decimal minutes to utm

Repeat this step for longitude values.

Convert Coordinate Degrees To Decimal

STEP 4: Delete decimal places (zeros) using ‘Decrease Decimal’ option from ‘Home’ menu.

STEP 5:Creating minutes

In this step, you have yo multiply a decimal part by 60. Since we already separated degrees, we’re going to “create” minutes, by multiplying a decimal part by 60. (Don’t forget to copy your results and paste as a value. We don’t need a formula).

Decimal Degree To Utm Converter In Excel Converter

STEP 6: Now we have to separate minutes from partial minutes. To do that follow steps 3, 4 and 5.

STEP 7:Creating seconds

To get seconds from a decimal minute’s part, you have to follow the same steps just like we did it with minutes.

Coordinate Converter Degrees To Decimal

STEP 8:Degrees, minutes, seconds

In the last step, we’re going to combine all data to get a DMS coordinates. To do that we will use a CONCATENATE formula: