# Convert and export lat longs from text layer - QGIS

I have imported aText Delimited Layerthat was acsvfile with three fieldsid, lat, long. The layer shows up correctly and the values are inFeet. I need to convert theFeettoDecimal Degreesand then export the file. None of the menu options seem to point towards this goal. Can this be done? I have been searching for solutions on the Internet without luck so far.

Edit: I tried right clicking on the layer andSave Asto csv, but it has the same values even after changing the CRS to a Decimal Degree projection.

1. Change coordinate reference system in Project Properties (Ctrl+Shift+P) to WGS84
2. Use Export/Add Geometry Columns (under Vector -> Geometry Tools). Calculate using Project CRS.

You may open your layer in tabular form (press F6) and copy-paste (Ctrl+A, Ctrl+C, Ctrl+V) all features into excel. There (usually, in the first column) you might notice your geometries in WKT (well-known text) format - every vertex is shown in form of decimal degree coordinates.

Alternatively, you may use field calculator (button ) and create new text field of 0 length (no length limitations) with geom_to_wkt(\$geometry) in 'Expression'. So that, explicit wkt representation of your geometries will be present in each feature attributes. From there you may export your layer to csv-file, for instance.

## 3 Answers 3

Did you try to repoject your data via GDAL_transform in the console:

Create a shape file within qGIS and then reproject from -s_srs "EPSG:3003" -t_srs "EPSG:4326".

Actually i solved this. I start creating a SHP file from the file in format CSV. This can be done by the ogr2ogr. Still using ogr2ogr by the shell i used the command ogr2ogr -s_srs EPSG:3003 -t_srs EPSG:4326 -f CSV [Dest file].csv [Source file].shp -lco GEOMETRY=AS_YX .

I had the same problem and I don't Why QGIS works like that.

The QGIS does convert from one coordinate to the other. Instead of reading the CSV file, try reading the shape files. Generally, the shape files contain more information than any other files..It is easy to read a shape file using java or python.

## 2 Answers 2

Right click your layer, select "Save As". The dialog "Save vector layer as. " will open. Select the following options:

Format: Comma Separated Value [CSV]
File name: Select a file name
CRS: EPSG:4326, WGS84

In the lower part, expand "Select fields to export" and click "Deselect All" if you just want the coordinates, or check the available items (columns from the attribute table) if you need place names, etc. By choosing WGS84 as the output CRS you'll receive your coordinates in decimal degrees (latitude, longitude).

## Convert and export lat longs from text layer - QGIS - Geographic Information Systems

Lat Lon Tools makes it easy to capture, zoom to coordinates, convert coordinates in text fields into new point layers, export point geometry into text fields, and interact with other on-line mapping tools. It adds MGRS, Standard UTM, UPS, Geohash, GEOREF, and Plus Code (Open Location Code) coordinate support to QGIS. When working with Google Earth, Google Maps or other on-line mapping tools, coordinates are specified in the order of 'Latitude, Longitude'. By default Lat Lon Tools uses the standard Google Map format, but is very flexible and can use virtually any projection and coordinate format for input and output. The following tools are available in Lat Lon Tools.

Here are the expanded Copy Extents to Clipboard menu items.

Some of the functions can be accessed from the Lat Lon Tools toolbar. If for some reason the toolbar is missing, select the menu item View->Toolbars and make sure Lat Lon Tools Toolbar is enabled. The conversion algorithms can be run from the QGIS Processing Toolbox.

Copy/Display Coordinate - This captures coordinates onto the clipboard when the user clicks on the map, using the standard Google Map format or a format specified in Settings. If the user specifies a Tab separator, then the coordinate can be pasted into a spreadsheet in separate columns. While this tool is selected, the coordinate the mouse is over is shown in the lower left-hand corner either in decimal degrees, DMS, Degrees Minutes, MGRS, Standard UTM, UPS, GEOREF, Plus Codes (Open Location Code), Geohash, Maidenhead Grid Locator, WKT POINT, or GeoJSON notation depending on the Settings. By default it uses the geographic Latitude and Longitude to snapshot the coordinate, but this can be configured in Settings to use the project CRS or any other projection desired. See the Settings section for more details on the all the possibilities. An additional prefix or suffix can be added to the coordinate and is configured in Settings. If snapping is enabled under QGIS Project->Snapping Options. menu, then Copy/Display Coordinate will snap to any close vector vertices according to the parameters set in the snapping options.

Show in External Map - With this tool, the user can click on the QGIS map which launches an external browser and displays the location on an external map. The left and right mouse buttons can be configured to show different maps. Currently Open Street Map, Google Maps, MapQuest, Mapillary, Open Street Map iD Editor, and Bing Maps are supported along with Google Earth if it is installed on the system. The desired map that is displayed can be configured in Settings along with additional user added map services. A temporary marker can be displayed on the map at the location clicked on. To turn this on go to Settings. If snapping is enabled, then the clicked location will snap to any close vector vertices according to the parameters set in the snapping options.

Zoom to Coordinate - With this tool, type or paste a coordinate into the text area and hit Enter. QGIS centers the map on the coordinate, highlights the location and creates a temporary marker at the location. Pressing the also causes QGIS to zoom to that location. The marker can be removed with the button. Pressing Paste Coordinate from Clipboard button pastes the contents of the clipboard into the text area. If the default WGS 84 (EPSG:4326 - latitude/longitude) coordinate system is specified, Zoom to Coordinate can interpret decimal degrees, DMS, WKT POINT, Standard UTM, UPS, MGRS, GEOREF, Plus Codes (Open Location Code), or GeoJSON coordinates. It can also zoom to Geohash coordinates, amateur radio Maidenhead grid coordinates, or any other projection when configured in Settings. The Coordinate Order in Settings dictates whether the order is latitude followed by longitude (Y,X) or longitude followed by latitude (X,Y). By default the order is "Latitude, Longitude", the format used by Google Maps. The behavior and coordinate types that are interpreted can be configured by pressing the Settings button .

• Decimal Degree: 38.959390°, -95.265483° / 38.959390, -95.265483 / 38.959390N, 95.265483 W (d.dddd, d.dddd)
• Degree, Minute: 38° 57.5634'N 95° 15.92890'W (d m.mmmm, d m.mmmm)
• Degree, Minute: 3857.5634N 09515.92890W (ddmm.mmmm, dddmm.mmmm) - In this format the degree digits need to be 0 padded using 2 digits for latitude, and 3 digits for longitude degrees.
• Degree, Minute, Second: 38°57'33.804"N, 95°15'55.739"W (d m s.ssss, d m s.ssss)
• Degree, Minute, Second: 385733.804N 0951555.739W (ddmmss.ssss, dddmmss.ssss) - In this format the degree digits need to be 0 padded with 2 digits for latitude, and 3 digits for longitude.
• Degree, Minute, Second: 004656S, 0093917E (ddmmss, dddmmss)- Notice the need for 0 padding in the decimal degree digits.
• WKT: POINT(-95.265483 38.959390)
• GeoJSON:
• Standard WGS84 UTM: Note that the UTM standard does not include the MGRS latitude band which some use. Lat Lon Tools uses the proper UTM standard with zone and hemisphere where hemisphere is either N (north of the equator) or S (south of the equator). UTM is valid from - 80°S to 84°N.
• 15N 303704.9 4314710.9 (ZoneHemisphere Easting Northing)
• 303704.9,4314710.9,15N (Easting,Northing,ZoneHemisphere)
• 303704.9mE,4314710.9mN,15N (Easting,Northing,ZoneHemisphere)
• 303704.9mE,4314710.9mN,15,N (Easting,Northing,Zone,Hemisphere)
• Z 2426773mE 1530125mN
• Z2426773E1530125N

Multi-location Zoom - Here the user can define a set of quick zoom-to locations. The user can also paste in or type in a coordinate in the Enter coordinate box to add it to the list. By default the format of the data entered is "latitude,longitude[,label,data1. data10]" where the contents in [. ] are optional. Various input formats are supported and can be configured in Settings by selecting the input projection and coordinate order. These include:

• "latitude,longitude[,label,data1. data10]"
• "longitude,latitude[,label,data1. data10]"
• "mgrs[,label,data1. data10]"
• "Y,X[,label,data1. data10]"
• "X,Y[,label,data1. data10]"
• "plus codes[,label,data1. data10]"
• "standard utm[,label,data1. data10]"

When the user clicks on a location in the list, QGIS centers the map on the location and highlights it. Double clicking on a Label or Data cell allows the text to be edited. By default the Data fields will not be visible, but can be added from Settings. More than one location can be selected by clicking on the first point and then Shift-Click to select a range or using Ctrl-Click to add additional selected items. Markers for all selected items will be displayed. The following are additional functions.

Open Location List reads in a set of coordinates that are comma separated with an optional label. There should only be one location per line and formatted as "latitude,longitude,label,data1. data10" or simply "latitude,longitude". Save Location List saves all of the zoom-to entries in a .csv file, formatted as "latitude,longitude,label,data1. data10". Delete Selected Location removes all selected locations. Clear All Locations clears the list of all locations. Create Vector Layer From Location List creates a memory layer out of the zoom-to locations. Show Style Settings chooses a style for the layer created from the create layer button. This displays the Settings dialog box. Start Capture enables the user to click on the map to capture coordinates directly to the list.

Copy Extents to Clipboard - There are four tools used to copy a bounding box extent to the clipboard. The bounding box format is determined in settings dialog. The output CRS for the bounding box extent is either that of the QGIS project or EPSG:4326. The four copy extent tools are:

- Copy the canvas bounding box extent to the clipboard. - Interactively select a region on the map to extract its bounding box extent and copy it to the clipboard. - Copy the selected layer's extent. In some vector layers, this value may be estimated and not exact depending on how the layer was imported into QGIS. - Copy the bounding box extent of selected features in a vector layer. If no features are selected then nothing will be copied. If the layer is not a vector layer, then the bounding box extent of the layer will be copied. In some vector layers, the bounding box extent may be estimated and not exact depending on how the layer was imported into QGIS.

Coordinate Conversion Tool - This dialog provides a way to either type in a coordinate or grab a coordinate from the map and convert it to a number of different formats.

Type in a coordinate in any one of the formats listed and then press the enter button and all the other coordinates will be populated. Here are the functions of the following icons:

/ Coordinate order - Select whether the coordinates should be displayed in an x,y (longitude, latitude) or y,x (latitude, longitude) order. Clear form - This clears the form of all values. Show coordinate conversion settings - This shows the default settings for coordinate conversion. Zoom to will zoom to the coordinate in the Decimal Degrees field. Capture coordinate enables the user to click on the map to capture a coordinate directly to the form and have it automatically converted. Copy to clipboard copies the value in the text area onto the clipboard.

Lat Lon Digitizing Tool - This tool digitizes points and add features the selcted layer using the same coordinate input formats as the Zoom, to Latitude, Longitude. A point vector layer must be selected and be edit mode for this tool to be enabled. When the user clicks on the tool, the following dialog is displayed.

Enter a coordinate in any of the Zoom to Latitude, Longitude formats and press Enter or click on the Add Feature button. If a layer contains fields then a secondary dialog box will popup to allow editing of the attributes.

The projection of the input coordinates can be specified by the CRS drop down menu which has the following options:

WGS84 Projection - This is the default specifying coordinates as latitudes and longitudes. MGRS Coordinate - This specifies an MGRS coordinate. Project Projection - With this selected, it is assumed that the input coordinates are in the projection of the project. New/Custom Projection - This allows the user to select any projection for the input coordinates. Plus Codes Coordinate - This specifies a Plus Code coordinate.

The next drop down menu specifies whether the coordinates are listed as Y,X (Latitude, Longitude) or X,Y (Longitude, Latitude). If the coordinate uses N, S, E, W then these take presidence and this setting is ignored.

Right below the text input box is a status line that tells you exactly what CRS and coordinate order you are using.

Conversions

All of the conversion routines can eighter be access from the Lat Lon Tool main menu or from the Processing Lat Lon Tools toolbox.

Fields to point layer - This converts ASCII coordinates found in one or two attribute fields into a new point geometry layer. If the coordinates are numeric and are in two fields, then the default QGIS importer can be used. This importer supports formats not available by the QGIS importer such as DMS, MGRS, Plus Codes (Open Location Code), Standard UTM, Geohash, Maidenhead grid locator, and X & Y (latitude & longitude) coordinates that are in a single field separated by a separator.

Point layer to fields - This takes a point vector layer and creates a new layer with the layer's latitude, longitude (Y, X) coordinates copied into one or two fields in the new output layer. The user has a lot of flexibility as to the output format. For Wgs84 the output can be in decimal degrees or DMS. Other formats include GeoJSON, WKT, MGRS, Standard UTM, Geohash, Plus Codes, and Maidenhead grid.

MGRS to point layer - The input for this conversion is a table or vector layer containing a field with MGRS coordinates. It converts the MGRS field to a new point vector layer where each record is converted to WGS 84 (EPSG:4326) geometry.

Point layer to MGRS - Convert a point vector layer into a new layer with an added MGRS column containing coordinates based on the vector layer's geometry. MGRS supports measuring precision's of 1m, 10m, 100m, 1km, 10km, and 100km. MGRS Precision of 5 is 1m and an MGRS Precision of 0 represents a point accuracy of 100km.

Plus Codes to point layer - Convert a Plus Codes field from a table or vector layer into a new point vector layer where each record is converted to WGS 84 (EPSG:4326) geometry.

Point layer to Plus Codes - Convert a point vector layer into a new layer with an Plus Codes column, containing coordinates based on the vector layer's geometry.

Settings - Displays the settings dialog box (see below).

Help - Displays this help page.

Capture & Display Settings

There are 7 capture projections/formats that can be selected from the CRS/Projection of captured coordinate drop down menu. They are as follows.

• WGS 84 (Latitude & Longitude) - This captures the coordinates as a latitude and longitude regardless of what the project CRS is set to. This is the default setting.
• Project CRS - This captures the coordinates using the project's specified CRS.
• Custom CRS - The captures the coordinate in any coordinate reference system regardless of what the project CRS is set to. When this is selected, then the Custom CRS dialog box is activated allowing selection of any projection.
• MGRS - This captures the coordinates in the MGRS format,
• Plus Codes - This captures the coordinate in Google Plus Codes format.
• Standard UTM - This has the form of '12N 417159.0 4515540.6'
• Geohash - This has the form of '9zpnbf0w9yuf'
• Amateur Radio Maidenhead Grid Locator - This has the form of 'EM28ix'
• UPS (Universal Polar Stereographic) - The string form of this format is one of the following: 'Z 2426773mE 1530125mN' or 'Z2426773E1530125N'
• GEOREF - An example coordinate is 'FJKJ4407157563'

Additional coordinate formatting can be specified with WGS 84 (Latitude & Longitude) Number Format.

• Decimal Degrees - "42.20391297, -86.023854202"
• DMS - "36° 47' 24.27" N, 99° 22' 9.39" W"
• D°MM' - "42° 12.2348' N, 86° 1.4313' W"
• DDMMSS - "400210.53N, 1050824.96 W"
• WKT POINT - POINT(-86.023854202 42.20391297)
• GeoJSON -

For Other CRS number format such as Project CRS or Custom CRS the coordinate formatting options are:

• Normal Coordinate - Decimal coordinate notation.
• WKT POINT

The order in which the coordinates are captured is determined by Coordinate order (Not used with MGRS, UTM, UPS, WKT, GeoJSON & Plus codes) and are one of the following:

Lat, Lon (Y,X) - Google Map Order

Lon, Lat (X,Y) Order.

Coordinate capture delimiter (Not used with MGRS, UTM, UPS, WKT, GeoJSON & Plus codes) - Specifies the delimiter that separates the two coordinates. The options are:

• Comma - Specifies a comma separator
• Comma Space - This is a comma followed by a space.
• Tab - This useful if you are pasting the coordinates into two columns of a spreadsheet.
• Space
• Other - With this selected, the contents of Other delimiter is used.

DMS second precision - Used when formatting DMS coordinates and specifies the number of digits after the decimal.

D°MM' precision - Used when formatting D°MM' coordinates and specifies the number of digits after the decimal for the minutes.

UTM precision - Used when formatting UTM coordinates and specifies the number of digits after the decimal.

UTM format - This specifies a UTM string format and is one of the following:

• '15N 755631 4283168'
• '755631,4283168,15N'
• '755631mE,4283168mN,15N'
• '755631mE,4283168mN,15,N'

UPS precision - Used when formatting UPS coordinates and specifies the number of digits after the decimal.

UPS format - This specifies a UPS string format and is one of the following: 'Z 2426773mE 1530125mN' or 'Z2426773E1530125N'

Plus codes length - Used when formatting Plus Code coordinates. The minimum value is 10.

Geohash precision - Used when formatting Geohash coordinates.

Maidenhead grid precision - Used when formatting Amateur Radio Maidenhead grid coordinates.The value ranges from 1 to 4.

GEOREF precision - Used when formatting GEOREF coordinates. The maximum value is 10.

Coordinate prefix - This text string is added to the beginning of the captured coordinate.

Coordinate suffix - This text string is added to the end of the captured coordinate.

Add space between D° M' S" and D° M.MM' numbers - When checked a space will be added between each pair of numbers.

Pad DMS and DM.MM output coordinates with leading zeros - When checked individual DMS coordinates will be padded with leading zero. A coordinate that normally looks like 1° 5' 15"N, 10° 19' 50"W would become 01° 05' 15"N, 010° 19' 50"W.

Show marker on QGIS map - When checked, a persistent marker stays on the map at the clicked location until another location is clicked on or a new tools is selected.

The Zoom to Latitude, Longitude tool accepts the following input coordinates as specified by Zoom to Coordinate Type:

• WGS 84 (Latitude & Longitude) / Auto Detect Format - Input coordinates can be either in decimal degrees, DMS degrees, WKT, or GeoJSON. For decimal and DMS formats, the order of the coordinates are determined by Zoom to Coordinate Order. It also auto detects MGRS, Plus Codes, Standard UTM, UPS, and GEOREF formats so it is generally unnecessary to specify them separately.
• Project CRS - This accepts coordinates formatted in the CRS of the QGIS project. The numbers can be formatted in decimal or WKT notation.
• Custom CRS - You can specify any CRS for the input coordinates and QGIS zooms to that coordinate regardless of the project CRS. The numbers can be formatted in decimal or WKT notation.
• MGRS - This only accepts MGRS coordinates as input.
• Plus Codes - This only accepts Plus Codes coordinates as input.
• Standard UTM - This only accepts Standard UTM coordinates as input.
• Geohash - This only accepts Geohash coordinates as input.
• Maidenhead Grid - This only accepts Maidenhead Grid coordinates as input.

The order in which the coordinates are parsed in the Zoom to Latitude, Longitude tool is specified by Zoom to Coordinate Type and has the following two options: This is not applicable for WKT, GeoJSON, MGRS, Plus Codes, and Standard UTM coordinates.

Use Persistent Marker - If this is checked, then when you zoom to a coordinate a persistent marker is displayed until you exit, zoom to another location, or click on the button.

• Show marker on QGIS map - If checked a temporary marker will be displayed at the location click on.

You can Select an External Map Provider for Left Mouse. The options are:

• OSM - Open Street Map
• Bing Map
• Bing Aerial
• MapQuest Map
• MapQuest Aerial
• Mapillary Street
• Mapillary Aerial
• iD Editor ESRI World Imagery
• iD Editor OpenTopoMap
• Google Earth - (This only works if it is installed on your system)
• User Added Map Services.

Select an External Map Provider for Right Mouse has the same set of options. These correspond to the left and right mouse buttons.

Map Hints are desired attributes you would like to see in the resulting map.

• Show placemark - When checked the external map shows a placemark at the location clicked on in the QGIS map. If this is not checked then the external map centers itself around clicked location, but will not display the placemark. Depending on the map service, this may or may not be available.
• Map Zoom Level - This is the desired default zoom level in the external map when it is launched.

Enable the following if a temporary marker is desired to be displayed at the location click on:

Add additional external map providers allows the user to add their own map providers by specifying a URL with latitude, longitude, and zoom level defined by the variables , , and . For example the URL for Open Street Map would be entered as: http://www.openstreetmap.org/#map=//. The button Add Provider adds a new service. Delete Provider deletes the selected provider. Once added the map providers will appear in the left and right mouse external map provider menus.

Multi-location Zoom Settings

These are settings for the Multi-location zoom dialog box.

CRS/Projection of input coordinates

The user sets the CRS/projection of the coordinates in the Enter coordinate text box. By default this is set to WGS 84, latitude and longitude. This has no effect on the coordinates in the Location List that can be read in. The location list must always be WGS 84. The options are:

• WGS 84 (Latitude & Longitude)
• Project CRS
• Custom CRS
• MGRS
• Plus Codes
• Standard UTM

When Custom CRS is selected, the user is allowed to select a custom CRS projection.

Coordinate Order of input coordinates

The user sets the order of coordinates in the Enter coordinate text box. The order is either latitude followed by longitude (Y,X) or longitude followed by latitude (X,Y). By default the order is "Latitude, Longitude", the format used by Google Maps. This is not applicable when MGRS or Plus Codes coordinates are being used.

Create Vector Layer Style

The user can specify a style when creating a layer from the zoom locations. It can be a simple default style, default with labels, or a .qml style file that contains advanced styling.

• Default style for multi-location zoom new layers determines the new layer style when Create Vector Layer From Location List is clicked on. The options are:
• Default - No style is applied.
• Label - The newly created layer will have labels next to the points.
• Custom - The user can create a QGIS .qml file that contains style information for a point vector layer. If a .qml file has been selected, then this setting will apply the style to the new layer.

The Browse button allows selection of the .qml style file. When a .qml file is selected, Custom is automatically selected as the default style.

Data Field Settings

• Number of extra data fields - Besides Latitude, Longitude, and Label, the user can add up to 10 additional data fields which are labeled as Data1, Data2, . Data10. By default this is set to 0.

BBox (Bounding Box Extent) Capture Settings

These are the settings for the bounding box capture to clipboard tool.

CRS/Projection of captured bounding box coordinates

Specify whether the captured bounding box will use WGS84 or the QGIS project's projections. The options are:

Format of the captured bounding box specifies the format of the bounding box captured on the clipboard. It can be one of the following formats.

• minX,minY,maxX,maxY (W,S,E,N) - Using the selected delimiter
• minX,maxX,minY,maxY (W,E,S,N) - Using the selected delimiter
• minY,minX,maxY,maxX (S,W,N,E) - Using the selected delimiter
• x1 y1,x2 y2,x3 y3,x4 y4,x1 y1 - Polygon format
• x1,y1 x2,y2 x3,y3 x4,y4, x1,y1 - Alternate polygon format
• WKT Polygon
• bbox: [minX, minY, maxX, maxY] - Format used by MapProxy
• bbox=minX,minY,maxX,maxY - Format used by GeoServer WFS, WMS

Delimiter between coordinates for non-specific formats - This affects only the first two of the above formats. It is used between coordinates with presets for Comma, Comma Space, Space, Tab, and Other.

BBOX prefix - This text string is added to the beginning of the captured bounding box string.

BBOX suffix - This text string is added to the end of the captured bounding box string.

Significant digits after decimal - This is the precision or number of digits after the decimal in the output coordinates.

Coordinate Conversion Settings

These are the default settings for the Coordinate Conversion dialog box.

• Default custom CRS / projection specifies the default projection when a custom CRS is selected.
• Coordinate order for decimal and DMS notations determines whether the coordinates will be formatted in an Lat, Lon (Y, X) or Lon, Lat (X, Y) order.
• EPSG:4326 decimal degree precision determines the number of digits after the decimal point for a WGS 84 latitude and longitude coordinate.
• Other Decimal degree precision is the number of digits after the decimal point for all other coordinate formats.
• DMS seconds precision is the number of decimal digits for the second in a DMS formatted coordinate.
• D°MM' precision is the number of decimal digits for the minute in a D°MM' formatted coordinate.
• UTM precision specifies the number of decimal digits for a UTM formatted coordinate.
• UTM format specifies one of these formats to be displayed: '15N 755631 4283168', '755631,4283168,15N','755631mE,4283168mN,15N', or '755631mE,4283168mN,15,N'.
• UPS precision specifies the number of decimal digits for a UPS formatted coordinate.
• UPS format specifies one of these formats to be displayed: 'Z 2426773mE 1530125mN', or 'Z2426773E1530125N'.
• Plus codes length is the number of digits in a plus code coordinate.
• Geohash precision is the number of digits in a geohash coordinate.
• Maidenhead precision specifies the maidenhead coordinate precision.
• GEOREF precision determins the number of digits in a GEOREF coordinate.
• Delimiter between coordinate pairs is the delimiter used between coordinate pairs for those representations that require a delimiter.
• DDMMSS delimiter is the delimiter used between DDMMSS coordinate pairs. Leave this blank if no space is desired between coordinates. The default is ", ".
• Add space between D° M' S" and D° M.MM' numbers - When checked a space will be added between each pair of numbers.
• Pad DMS and DM.MM output coordinates with leading zeros - When checked individual DMS coordinates will be padded with leading zero. A coordinate that normally looks like 1° 5' 15"N, 10° 19' 50"W would become 01° 05' 15"N, 010° 19' 50"W.

## Coordinates converter for WGS84, UTM, CH1903, UTMREF(MGRS), Gauß-Krüger, NAC, W3W

Input:
The input of the latitude is a decimal number between -89.999999 and 89.999999.
If the degree of latitude is given in S as south, the number should be preceded by a minus sign.
The input of the longitude is a decimal number between -179.999999 and 179.9999999.
If the longitude is given in W as west, the number should be preceded by a minus sign.
If these limit values are not kept with the input, the frame turns red, and/or the fields remain empty. Decimal degree (WGS84)

Example: North 47°1.122 | East 12° 20.553'

The input for the latitude must be between -89 and 89 and must be an integer.
The input for the longitude must be between -179 and 179 and must be integer.
The input of minutes for latitude and longitude is an optional decimal number, but if it is made it must be between 0 and 59.99999.
If these limits are not met, the frame will turn red or the fields will remain empty. Degrees Minutes (WGS84)

Example: North 47° 1' 7.359' | East 12° 20' 33.216'

The input for the latitude must be between -89 and 89 and must be an integer.
The input for the longitude must be between -179 and 179 and must be integer.
The input of minutes for latitude and longitude must be between 0 and 59 and must be integer.
The input of the seconds for latitude and longitude is optional, but if it is done it must be between 0 and 59.99999.

If these limits are not met during input, the frame will turn red or the fields will remain empty. Degrees Minutes Seconds (WGS84)

Example: E (East) = 2783009 | N (North) = 1223568

As these coordinates are only used in Switzerland and Liechtenstein, limit values for N and E apply.

The northernmost point is about 47.8 degrees and therefore the maximum value for N is 1,300,000.
The southernmost point is about 45.8 degrees and therefore the minimum value for N is 1,074,000.
The easternmost point is about 10.5 degrees and therefore the maximum for E is 2,834,000.
The westernmost point is about 5.9 degrees and therefore the minimum value for E is 2,484,000.

If these limits are not met, the frame turns red or the fields remain empty. CH1903+ / LV95 (Bessel 1841)

Example: Zone 32U | East value 691831 | North value 5337164

The zone determines the rough position of the point and should prevent mix-ups.
Valid zone values are from 01A-60X, but without O and I.

Eastern values must be between 100.000 and 900.000.
North values must be between 1 and 9,999,999.

If these limit values are not adhered to during input, the frame turns red or the fields remain empty.

The letter of the zone is corrected automatically with wrong input. UTM coordinates (WGS84)

Example: Zone 32U | Plan square PU | East value 91831 | North value 37164

The zone determines the rough position of the point and should prevent mix-ups.
Valid zone values are from 01A-60X, but without O and I.

The grid square determines the location in the zone and consists of the eastern value (A-Z without O and I) and the northern value (A-V without O and I).

East values must be between 1 and 99,999. Missing digits are filled in at the back.
North values must be between 1 and 99,999. Missing digits are padded at the back.
Values below 10,000 must be filled with zeros at the front so that the two numbers are 5 digits long each.

If these limit values are not adhered to during input, the frame turns red or the fields remain empty.

The letter of the zone is automatically corrected if the input is incorrect. MGRS / UTMREF (WGS84)

Example: R (right value) = 4468298 | H (high value) = 5333791

Since the underlying ellipsoid for these coordinates is only used in Germany, limit values for R and H apply.
The northernmost point is about 56 degrees and therefore the maximum value for H is 6200000.
The southernmost point is about 46 degrees and therefore the minimum value for H is 5000000.
The most westerly point is about 5 degrees and therefore the maximum value for R is 5700000.
The easternmost point is about 16 degrees and therefore the minimum value for R is 2400000.

If these limits are not met, the frame turns red or the fields remain empty. Gauss Kruger (Bessel, Potsdam)

Example:
X (longitude, longitude) = HQXT8G | Y (latitude, latitude) = R3WR5H

Input:
The following characters are permitted for X and Y: 0123456789 BCDFGHJKLMNPQRSTVWXZ.
The length can be between 1 and 6 characters. NAC (Natural Area Coding, WGS84)

Input:
The input must always consist of 3 words. Each word is separated by a period. W3W (What 3 Words)

Beispiel:
Short Code: 8QQ7+V8, Dublin
Full Code: 8FVHG4M6+2X

Eingabe:
Short Code besteht aus 4 Zeichen, gefolgt von einem + gefolgt von 2 Zeichen, gefolgt von einer Ortsbezeichung
Full Code besteht aus 8 Zeichen, gefolgt von einem + gefolgt von 2-3 Zeichen.
Erlaubte Zeichen sind außer beim Ortsnamen: 23456789CFGHJMPQRVWX Plus Code (google Open Location Code)

## Syntax

The table can be a text file or table. Point features are also valid.

The output point feature class. The attribute table will contain all fields of the input table along with the fields containing converted values in the output format.

A field from the input table containing the longitude value. For DD_2 , DD_NUMERIC , DDM_2 , this is the longitude field.

For DD_1 , DDM_1 , and DMS_1 , this field contains both latitude and longitude values in a single string.

For GARS , GEOREF , UTM_ZONES , UTM_BANDS , USNG , and MGRS , this field contains an alphanumeric system of notation in a single text field.

The y_field parameter is ignored when one of the single-string formats is chosen.

A field from the input table containing the latitude value. For DD_2 , DD_NUMERIC , DDM_2 , and DMS_2 , this is the longitude field.

For DD_1 , DDM_1 , and DMS_1 , this field contains both latitude and longitude values in a single string.

For GARS , GEOREF , UTM_ZONES , UTM_BANDS , USNG , and MGRS , this field contains an alphanumeric system of notation in a single text field.

This parameter is ignored when one of the single-string formats is chosen.

Coordinate format of the input fields. The default is DD_2 .

• DD_1 —Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
• DD_2 —Longitude and latitude values are in two separate fields.
• DDM_1 —Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
• DDM_2 — Longitude and latitude values are in two separate fields.
• DMS_1 —Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
• DMS_2 —Longitude and latitude values are in two separate fields.
• GARS —Global Area Reference System. Based on latitude and longitude, it divides and subdivides the world into cells.
• GEOREF —World Geographic Reference System. A grid-based system that divides the world into 15-degree quadrangles and then subdivides into smaller quadrangles.
• UTM_ZONES —The letter N or S after the UTM zone number designates only North or South hemisphere.
• UTM_BANDS —The letter after the UTM zone number designates one of the 20 latitude bands. N or S does not designate a hemisphere.
• USNG —United States National Grid. Almost exactly the same as MGRS but uses North American Datum 1983 (NAD83) as its datum.
• MGRS —Military Grid Reference System. Follows the UTM coordinates and divides the world into 6-degree longitude and 20 latitude bands, but MGRS then further subdivides the grid zones into smaller 100,000-meter grids. These 100,000-meter grids are then divided into 10,000-meter, 1,000-meter, 100-meter, 10-meter, and 1-meter grids.
• SHAPE —Only available when a point feature layer is selected as input. The coordinates of each point are used to define the output format.

DD, DDM, DMS, and UTM are also valid keywords they can be used just by typing in (on dialog) or passing the value in scripting. However, keywords with underscore and a qualifier tell more about the field values.

Coordinate format to which the input notations will be converted. The default is DD_2 .

• DD_1 —Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
• DD_2 —Longitude and latitude values are in two separate fields.
• DD_NUMERIC —Longitude and latitude values are in two separate fields of type Double. Values in the West and South are denoted by a minus sign, whereas in DD_2 , the values are in text and N, S, E, and W are used to denote direction.
• DDM_1 —Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
• DDM_2 — Longitude and latitude values are in two separate fields.
• DMS_1 —Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
• DMS_2 —Longitude and latitude values are in two separate fields.
• GARS —Global Area Reference System. Based on latitude and longitude, it divides and subdivides the world into cells.
• GEOREF —World Geographic Reference System. A grid-based system that divides the world into 15-degree quadrangles and then subdivides into smaller quadrangles.
• UTM_ZONES —The letter N or S after the UTM zone number designates only North or South hemisphere.
• UTM_BANDS —The letter after the UTM zone number designates one of the 20 latitude bands. N or S does not designate a hemisphere.
• USNG —United States National Grid. Almost exactly the same as MGRS but uses North American Datum 1983 (NAD83) as its datum.
• MGRS —Military Grid Reference System. Follows the UTM coordinates and divides the world into 6-degree longitude and 20 latitude bands, but MGRS then further subdivides the grid zones into smaller 100,000-meter grids. These 100,000-meter grids are then divided into 10,000-meter, 1,000-meter, 100-meter, 10-meter, and 1-meter grids.

DD, DDM, DMS, and UTM are also valid keywords they can be used just by typing in (on dialog) or passing the value in scripting. However, keywords with underscore and a qualifier tell more about the field values.

This parameter is ignored as all fields are transferred to output table.

Spatial reference of the output feature class. The default is GCS_WGS_1984.

The tool projects the output to the spatial reference specified. If the input and output coordinate systems are in a different datum, then a default transformation is used based on the coordinate systems of the input and the output and the extent of the data.

Spatial reference of the input data. If the input spatial reference cannot be obtained from the input table, a default of GCS_WGS_1984 is used.

When exclude_invalid_records is set to True , the output will only convert valid notations to points. Otherwise, invalid records will be included as null geometry.

• EXCLUDE_INVALID —Only valid records are converted to points in the output. This is the default.
• INCLUDE_INVALID —Valid records are converted to points in the output and invalid records will be included as null geometry.

## Collect Data with KoBoCollect on an Android Device¶

1. Select the form to which you would like to enter data and go through all the questions (swiping your finger from right to left). If you selected a “point” then use the map to determine your location. To proceed to the next question, select the arrow pointing to the dot on the top right of the screen.

If you selected a line as the desired answer type, then select “Start GeoTrace”. Wait for the screen to lock and add marker button to start by pressing down on where you would like to create a path. Once a pin is placed, proceed to press down on the map where you would like to connect from the previous point.

If you selected an area or polygon as the desired answer type, then create a polygon by long-pressing the screen to create a point. Once a point is placed, continue the process to create a polygon of three or more points.

For “Select One” answers, a drop-down screen will be available. Select one of the answers chosen to be an option.

### Upload Finalized Data¶

• Disclaimer: Data can be collected offline and then uploaded when there is an Internet connection. However, there is an advanced option to pull data locally. A user can transfer survey data from KoBoCollect using Open Data Kit through connecting the mobile devices by USB cable to a local computer. *
1. Go to the home screen and select “Send Finalized Forms”.

### Review Data Online¶

1. Review the data and select “Submit”. A pop-up will appear at the top of the screen “Record queued for submission”

### Upload Data to a computer without wifi¶

1. Plug in the device to a laptop or computer. A pop-up will appear on the bottom right of the desktop screen confirming successful installation.

## Converting KMZ file to KML

The procedure described above will not work on KMZ files directly. When you open KMZ (zipped KML file) in Notepad, you will not see XML formatted text as in example above, but some gabled code like:

To convert KMZ to KML you will need Google Earth installed. Bring KMZ to the map, right click on the layer you want to convert and select &ldquoSave Place As&rdquo

and &ldquoSave as KML&rdquo from drop down list. This will generally blow up the file size about 3 times. To bring those Coordinates to Excel, follow the instructions above for KML file.

## Download Excel template to convert between Geographic Coordinates and UTM

To convert into various coordinate formats, we freely offer our Excel template. Download the free Excel template to perform the following operations:

– Conversion of UTM Coordinates to Decimal Degrees.

– Conversion of Coordinates in Decimal Degrees to UTM.

– Conversion of Coordinates in Degrees, Minutes and Seconds to Decimal Degrees.

– Conversion of Decimal Degrees to Coordinates in Degrees, Minutes, and Seconds.

Do not forget to share and promote our website to learn GIS.

### 38 thoughts on &ldquoDownload Excel template to convert between Geographic Coordinates and UTM&rdquo

Is this Excel template only for the south hemisphere?

No, you can select South or North hemisphere.

This is Great. Unfortunately got more points to convert than the spreadsheet would allow, help please?

Thank you for your sharing but I found some mistake on Decimal to UTM which coordinate Y is plus to 10,000,000 . So, I minus 10,000,000 in Y formula and It seem accurate

Very very useful, thanks a ton for your effort.

Thank you very much, this is very helpfull

How do I adjust it to UTM zone 34S

This file is very helpful!!
My coordinates are showing up in the Southern Hemisphere?
Easting: 441336.44
Northing: 5233415.59

@watersail commented about editing the Y axis label, where is this?

Thanks so much to the creator for your effort!
I just have a quick doubt, how can I change from WGS84 to NAD27 (Mexico)? Is there like a couple of cells I can just change the values?

I’m having this same problem, not exactly sure how to remove the WGS84 and input NAD83

VERY USE FULL THANKS FOR IT

Thank you very much. Precision. good luck bro…

Thank you for this great file!

Super, thank you so much for this file!

These coordinates (UTM to decimal degree transformation) are about 200 m SSW of ground truthed position when plotted on Google Earth. Any thoughts on this? I am working in 37P area. Thank you.

Is there anyway to convert from one UTM Zone to another Zone? Say Zone 10 to Zone 11.

It’s very very good, except I’ve got quite a large data and I can’t convert it all at once, I have to do it in bits which is really time consuming.. any help or guide please?

This was amazing! I have been looking for a way to batch convert within excel for a long time and I stumbled upon this. I did the entry data modifications (Zone & Hemisphere) needed for my area, put in my coordinates, and double checked the output to my other coverage comparing the Google Earth map to ArcMap and it seems like it was perfect. You are an angel!

Thanks man you help me out

I can’t believe this works as well as it does. awesome job

Great code – here is a VB6 snippet that works based on this spreadsheet.
Private Sub cmdGetUTM_Click()
‘USER DEFINED
Dim C12 As Double ‘A SEMI MAJOR AXIS
Dim C13 As Double ‘B SEMI MINOR AXIS
Dim lat As Double
Dim lon As Double

‘CALCULATED
Dim C15 As Double ‘Eccentricity
Dim C16 As Double 𔃲ª Excentric. ( e’ )
Dim C17 As Double ‘e’ ²
Dim C18 As Double ‘c (polar radius of curvature)
Dim C21 As String ‘Hemisphere

‘HIDDEN VARS
Dim E5 As Double ‘LAT
Dim F5 As Double ‘LONG
Dim G5 As Double ‘RADIANS LONG
Dim H5 As Double ‘RADIANS LAT
Dim I5 As Double ‘ZONE
Dim J5 As Double ‘MERIDAN
Dim K5 As Double ‘LAMBDA
Dim L5 As Double ‘A
Dim M5 As Double ‘Xi
Dim N5 As Double ‘ETA
Dim O5 As Double ‘Ni
Dim P5 As Double ‘Zeta
Dim Q5 As Double ‘A1
Dim R5 As Double ‘A2
Dim S5 As Double ‘J2
Dim T5 As Double ‘J4
Dim U5 As Double ‘J6
Dim V5 As Double ‘ALFA
Dim W5 As Double ‘BETA
Dim X5 As Double ‘GAMMA
Dim Y5 As Double ‘B(FI)
Dim Z5 As String ‘Banda(-72 to -16)
Dim AA5 As String ‘Banda (-8 to 48)
Dim AB5 As String ‘Banda (56 to 84)
Dim AC5 As Double ‘UTM Easting X
Dim AD5 As Double ‘UTM Northing Y
Dim AE5 As Double ‘Zone
Dim AF5 As String ‘Band
Dim AG5 As Double ‘LONG DD
Dim AH5 As Double ‘LONG MM
Dim AI5 As Double ‘LONG SS
Dim AJ5 As Double ‘LAT DD
Dim AK5 As Double ‘LAT MM
Dim AL5 As Double ‘LAT SS
Dim AM5 As String ‘LAT DD MM SS
Dim AN5 As String ‘LONG DD MM SS

Dim PI As Double
Dim bigno As Double

‘USER DEFINED VALUES
E5 = CDbl(txtLat.Text) ‘latitude
F5 = CDbl(txtLong.Text) ‘longitude
C21 = UCase(txtHem.Text)

‘DATUM WGS84 DEFAULTS
C12 = 6378137
C13 = 6356752.314

‘FIXED VARS BASED ON GEODETIC DEFAULT
C15 = (Sqr(C12 ^ 2 – C13 ^ 2)) / C12
C16 = (Sqr(C12 ^ 2 – C13 ^ 2)) / C13
C17 = C16 ^ 2
C18 = (C12 ^ 2) / C13

‘HIDDEN CALCS
G5 = F5 * PI / 180 ‘RADIANS LONG
H5 = E5 * PI / 180 ‘RADIANS LAT
I5 = Fix((F5 / 6) + 31) ‘ZONE
J5 = 6 * I5 – 183 ‘MERIDAN
K5 = G5 – ((J5 * PI) / 180) ‘LAMBDA
L5 = Cos(H5) * Sin(K5) ‘A
M5 = (1 / 2) * (Log((1 + L5) / (1 – L5))) ‘Xi
N5 = Atn((Tan(H5)) / Cos(K5)) – H5 ‘ETA
O5 = (C18 / (1 + C17 * (Cos(H5)) ^ 2) ^ (1 / 2)) * 0.9996 ‘Ni
P5 = (C17 / 2) * M5 ^ 2 * (Cos(H5)) ^ 2 ‘Zeta
Q5 = Sin(2 * H5) ‘A1
R5 = Q5 * (Cos(H5)) ^ 2 ‘A2
S5 = H5 + (Q5 / 2) ‘J2
T5 = ((3 * S5) + R5) / 4 ‘J4
U5 = (5 * T5 + R5 * (Cos(H5)) ^ 2) / 3 ‘J6
V5 = (3 / 4) * C17 ‘ALFA
W5 = (5 / 3) * V5 ^ 2 ‘BETA
X5 = (35 / 27) * V5 ^ 3 ‘GAMMA
Y5 = 0.9996 * C18 * (H5 – (V5 * S5) + (W5 * T5) – (X5 * U5)) ‘B(FI)
‘T5
‘Banda(-72 to -16)
Select Case E5
Case Is < -72
Z5 = "C"
Case Is < -64
Z5 = "D"
Case Is < -56
Z5 = "E"
Case Is < -48
Z5 = "F"
Case Is < -40
Z5 = "G"
Case Is < -32
Z5 = "H"
Case Is < -24
Z5 = "J"
Case Is < -16
Z5 = "K"
Case Else
Z5 = "L"
End Select

'AA5
'Banda (-8 to 48)
Select Case E5
Case Is < -8
AA5 = "L"
Case Is < 0
AA5 = "M"
Case Is < 8
AA5 = "N"
Case Is < 16
AA5 = "P"
Case Is < 24
AA5 = "Q"
Case Is < 32
AA5 = "R"
Case Is < 40
AA5 = "S"
Case Is < 48
AA5 = "T"
Case Else
AA5 = "no"
End Select

'AB5
'Banda (56 to 84)
Select Case E5
Case Is < 56
AB5 = "U"
Case Is < 64
AB5 = "V"
Case Is < 72
AB5 = "W"
Case Is < 84
AB5 = "X"
Case Else
AB5 = "no"
End Select

'UTM Easting X
AC5 = M5 * O5 * (1 + P5 / 3) + 500000

'UTM Northing Y
If C21 = "S" Then
AD5 = N5 * O5 * (1 + P5) + Y5 + 10000000
Else
AD5 = N5 * O5 * (1 + P5) + Y5
End If

'AF5
'Band
Select Case E5
Case Is < -16
AF5 = Z5
Case Is < 64
AF5 = AA5
Case Is < 84
AF5 = AB5
Case Else
AF5 = "MALO"
End Select

AG5 = Fix(F5) 'LONG DD
AH5 = Fix((F5 – AG5) * 60) 'LONG MM
AI5 = Round((((F5 – AG5) * 60) – AH5) * 60, 3) 'LONG SS
AJ5 = Fix(E5) 'LAT DD
AK5 = Fix((E5 – AJ5) * 60) 'LAT MM
AL5 = Round((((E5 – AJ5) * 60) – AK5) * 60, 3) 'LAT SS
AM5 = AJ5 & "º " & AK5 & "' " & AL5 & " S" 'LAT DD MM SS
AN5 = AG5 & "º " & AH5 & "' " & AI5 & " W" 'LONG DD MM SS