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, Plus Code (Open Location Code), WKT, EWKT, JSON, and ECEF 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.
A number of the conversions can be accessed as field calculator functions. When in the Field Calculator find and expand the Lat Lon Tools menu. Clicking on each entry will give a description of the funciton with sample usage.
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, H3 (if the H3 library is installed), 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, Google Earth Web, 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 and creates a temporary marker at the location. For formats that represent a region rather than a point such as Geohash, H3, Maindenhead, and Plus Codes (Open Location Code), the region area is displayed along with the center point. 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, H3 geohash coordinates (if the H3 library is installed), or any other projection when configured in Settings or by the Select CRS Mode button. The Coordinate Order in Settings or Toggle Coordinate Order button below dictates whether the order is latitude followed by longitude (Y,X) or longitude followed by latitude (X,Y). The following actions can also be taken from the Zoom To dialog:
The following are acceptable coordinate formats when the Settings Zoom to Coordinate Type is set to WGS 84 (Latitude & Longitude). When the letters "N, S, E, W" are used, then the coordinate order is not important. These letters can be used before or after the coordinates. As long as the coordinate is understandable, punctuation, spaces, and ° ' " are optional. In these examples "d" represents degree digits, "m" minutes, and "s" seconds. Here are some example input formats:
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:
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.
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:
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:
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:
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.
ECEF to Lat, Lon, Altitude - Convert an ECEF (Earth-centered, Earth-fixed coordinate system) layer into a new point layer that includes the altitude as a part of the geometry and optionally as an attribute.
Lat, Lon, Altitude to ECEF - Convert a point vector layer that includes an altitude Z dimension as a part of the geometery or as a part of the attribute table into an ECEF (Earth-centered, Earth-fixed coordinate system) layer.
Geometry to WKT/JSON - Add a WKT, EWKT or JSON attribute to a vector layer and converts each feature's geometery to that format. This supports points, lines, and polygons.
WKT attribute to layers - This creates new layers from a vector or table layer that has an attribute field containing WKT notation coordinates. WKT can specify points, lines, and polygons with either single geometries or multi-geometries. This algorithm supports all of these and can potentially output three different layers. The attribute containing the WKT geometries is chosen by Select a WKT coordinate field. Note that this only supports point, line, and polygon WKT objects and it does not support GeometryCollection objects.
Settings - Displays the settings dialog box (see below).
Help - Displays this help page.
The CRS and coordinate order are set independently for the coordinate capture, zoom to, and multi-zoom to tools. Be careful when setting one of these settings, that you check the rest to make sure that they are set correctly for your needs.
There are 7 capture projections/formats that can be selected from the CRS/Projection of captured coordinate drop down menu. They are as follows.
Additional coordinate formatting can be specified with WGS 84 (Latitude & Longitude) Number Format.
For Other CRS number format such as Project CRS or Custom CRS the coordinate formatting options are:
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:
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:
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'
MGRS precision - This specifies the precision of MGRS coordinates ranging between 0 and 5 with precisions of 100km, 10km, 1km, 100m, 10m and 1m repectively.
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.
H3 precision - Used when formatting H3 coordinates when the H3 library is installed. Values range from 0 to 15.
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.
Add spaces to MGRS coordinates - This will add spaces to an MGRS coordinate when checked. Unchecked it looks like "16TDL8016526461" and checked it looks like "16T DL 80165 26461".
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:
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 coordinate resolution area - Some coordinate formats represent an area rather than a point depending on its resolution. These include Geohash, H3, Plus Codes, and Maindenhead. If this is checked, then when you zoom to a coordinate the area represented by the coordinate is displayed until you exit, zoom to another location, or click on the button.
You can Select an External Map Provider for Left Mouse. The options are:
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.
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 {lat}, {lon}, and {zoom}. For example the URL for Open Street Map would be entered as: http://www.openstreetmap.org/#map={zoom}/{lat}/{lon}. 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.
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:
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.
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
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.
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.
These are the default settings for the Coordinate Conversion dialog box.